@archildata/api-types 0.0.1 → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.d.ts +35 -0
  2. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -485,6 +485,15 @@ export interface components {
485
485
  * @description Deprecated. Last 4 characters of the token. Required when principal is provided; ignored when the server generates the token.
486
486
  */
487
487
  tokenSuffix?: string;
488
+ /** @description Optional time-to-live for the token as a Go duration string (e.g. "1h", "30m", "24h"). The server computes expiresAt = now + ttl. Maximum 365 days ("8760h"). Expired tokens are rejected at mount time but remain visible in the disk's authorized users list. Mutually exclusive with expiresAt. */
489
+ ttl?: string;
490
+ /**
491
+ * Format: date-time
492
+ * @description Optional absolute expiration time as an RFC3339 timestamp (e.g. "2026-07-15T00:00:00Z"). Must be in the future. Mutually exclusive with ttl.
493
+ */
494
+ expiresAt?: string;
495
+ /** @description When true, the token can only be used for a single mount authentication. After the first successful mount, subsequent attempts are rejected. Consumed tokens remain visible in the disk's authorized users list. */
496
+ oneUse?: boolean;
488
497
  };
489
498
  AwsStsUser: {
490
499
  /**
@@ -494,6 +503,15 @@ export interface components {
494
503
  type: "awssts";
495
504
  /** @description IAM principal ARN */
496
505
  principal: string;
506
+ /** @description Optional time-to-live as a Go duration string (e.g. "1h", "30m"). Maximum 365 days ("8760h"). Mutually exclusive with expiresAt. */
507
+ ttl?: string;
508
+ /**
509
+ * Format: date-time
510
+ * @description Optional absolute expiration time as an RFC3339 timestamp. Must be in the future. Mutually exclusive with ttl.
511
+ */
512
+ expiresAt?: string;
513
+ /** @description When true, the credential can only be used for a single mount authentication. */
514
+ oneUse?: boolean;
497
515
  };
498
516
  DiskUser: components["schemas"]["TokenUser"] | components["schemas"]["AwsStsUser"];
499
517
  DiskResponse: {
@@ -630,6 +648,23 @@ export interface components {
630
648
  identifier?: string;
631
649
  /** Format: date-time */
632
650
  createdAt?: string;
651
+ /**
652
+ * Format: date-time
653
+ * @description When the token expires. Absent for tokens without a TTL.
654
+ */
655
+ expiresAt?: string;
656
+ /** @description Whether this token is single-use. */
657
+ oneUse?: boolean;
658
+ /**
659
+ * Format: date-time
660
+ * @description When the one-use token was consumed (first successful mount auth). Absent if the token has not been consumed or is not one-use.
661
+ */
662
+ consumedAt?: string;
663
+ /**
664
+ * @description Current lifecycle status of the token.
665
+ * @enum {string}
666
+ */
667
+ status?: "active" | "expired" | "consumed";
633
668
  };
634
669
  /** @description All API responses use a standard envelope with `success: boolean` and `data` (on success) or `error: string` (on failure). The ApiResponse_* schemas each define the specific `data` shape for their endpoint. */
635
670
  ApiResponse_DiskList: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@archildata/api-types",
3
- "version": "0.0.1",
3
+ "version": "0.0.2",
4
4
  "description": "API types for the Archil control plane",
5
5
  "type": "module",
6
6
  "types": "index.d.ts",