You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/vault-sdk/src/types.ts
+11-30Lines changed: 11 additions & 30 deletions
Original file line number
Diff line number
Diff line change
@@ -403,7 +403,7 @@ type SignTypedDataData = {
403
403
signature: string;
404
404
};
405
405
406
-
typeCreateAccessTokenData={
406
+
exporttypeAccessTokenData={
407
407
accessToken: string;
408
408
id: string;// UUID
409
409
issuerId: string;// UUID
@@ -413,19 +413,15 @@ type CreateAccessTokenData = {
413
413
metadata: Record<string,MetadataValue>;
414
414
createdAt: string;// ISO date string
415
415
updatedAt: string;// ISO date string
416
+
/**
417
+
* If nullish then token hasn't been explicitly revoked, otherwise the ISO date string of the revocation.
418
+
* Note that an access token will be "implicitly" revoked if the token issuer account gets rotated. Check the isRotated field for this
419
+
*/
416
420
revokedAt?: string;// ISO date string
417
-
};
418
-
419
-
typeRevokeAccessTokenData={
420
-
id: string;// UUID
421
-
issuerId: string;// UUID
422
-
issuerType: OwnerType;
423
-
policies: PolicyComponent[];
424
-
expiresAt: string;// ISO date string
425
-
metadata: Record<string,MetadataValue>;
426
-
createdAt: string;// ISO date string
427
-
updatedAt: string;// ISO date string
428
-
revokedAt?: string;// ISO date string
421
+
/**
422
+
* Reflects whether the issuer of this token has "rotated" their account, which implicitly revokes the token, but is not tracked by the revokedAt? field.
423
+
*/
424
+
isRotated: boolean;
429
425
};
430
426
431
427
// Update SignAuthorizationData to use the defined SignedAuthorization type
@@ -439,21 +435,6 @@ export type SignStructuredMessageData = {
439
435
message: string;// This likely represents the UserOp hash in Rust
440
436
};
441
437
442
-
// Add AccessTokenData (as defined previously, ensure OwnerType/MetadataValue are correct)
443
-
exporttypeAccessTokenData={
444
-
id: string;// UUID
445
-
issuerId: string;// UUID
446
-
// Only revealed if revealSensitive is true for the policy being used to read, otherwise redacted/masked
447
-
accessToken: string;
448
-
issuerType: OwnerType;
449
-
policies: PolicyComponent[];
450
-
expiresAt: string;// ISO date string
451
-
metadata: Record<string,MetadataValue>;
452
-
createdAt: string;// ISO date string
453
-
updatedAt: string;// ISO date string
454
-
revokedAt?: string|null;// ISO date string or null
455
-
};
456
-
457
438
// Add GetAccessTokensData (as defined previously)
458
439
exporttypeGetAccessTokensData={
459
440
items: AccessTokenData[];
@@ -555,7 +536,7 @@ export type CreateAccessTokenPayload = GenericPayload<{
555
536
operation: "accessToken:create";
556
537
auth: Auth;
557
538
options: CreateAccessTokenOptions;
558
-
data: CreateAccessTokenData;
539
+
data: AccessTokenData;
559
540
}>;
560
541
561
542
// Add ListAccessTokensPayload (using defined types)
@@ -569,7 +550,7 @@ export type RevokeAccessTokenPayload = GenericPayload<{
0 commit comments