Skip to content

Commit

Permalink
fix: event timestamp fetching, types
Browse files Browse the repository at this point in the history
  • Loading branch information
Dwynr committed May 12, 2024
1 parent e521df2 commit dd85af4
Show file tree
Hide file tree
Showing 10 changed files with 10 additions and 24 deletions.
2 changes: 1 addition & 1 deletion dist/browser/api/v3/user/events.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 1 addition & 3 deletions dist/browser/user/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/browser/user/index.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/node/api/v3/user/events.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 1 addition & 3 deletions dist/node/user/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/node/user/index.js.map

Large diffs are not rendered by default.

5 changes: 1 addition & 4 deletions dist/types/api/v3/user/events.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -188,14 +188,11 @@ export type UserEvent = UserEventBase & ({
} | {
type: "failedLogin";
info: UserEventInfoBase;
} | {
type: "failedLogin";
info: UserEventInfoBase;
} | {
type: "deleteFolderPermanently";
info: UserEventInfoBase & {
name: string;
nameDecrypted: FolderMetadata | null;
nameDecrypted: FolderMetadata;
};
} | {
type: "deleteFilePermanently";
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@filen/sdk",
"version": "0.1.74",
"version": "0.1.75",
"description": "Filen SDK",
"main": "dist/node/index.js",
"browser": "dist/browser/index.js",
Expand Down
6 changes: 1 addition & 5 deletions src/api/v3/user/events.ts
Original file line number Diff line number Diff line change
Expand Up @@ -227,15 +227,11 @@ export type UserEvent = UserEventBase &
type: "failedLogin"
info: UserEventInfoBase
}
| {
type: "failedLogin"
info: UserEventInfoBase
}
| {
type: "deleteFolderPermanently"
info: UserEventInfoBase & {
name: string
nameDecrypted: FolderMetadata | null
nameDecrypted: FolderMetadata
}
}
| {
Expand Down
5 changes: 1 addition & 4 deletions src/user/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -369,10 +369,7 @@ export class User {
.v3()
.user()
.events({
lastTimestamp:
params && params.timestamp
? parseInt(Math.floor(params.timestamp / 1000).toString())
: Math.floor(Date.now() / 1000) + 60,
lastTimestamp: params && params.timestamp ? params.timestamp : Math.floor(Date.now() / 1000) + 60,
filter: params && params.filter ? params.filter : "all"
})

Expand Down

0 comments on commit dd85af4

Please sign in to comment.