@shipstatic/types 0.2.7 → 0.2.9

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.
package/dist/index.d.ts CHANGED
@@ -103,6 +103,45 @@ export interface DeploymentRemoveResponse {
103
103
  /** Human-readable message */
104
104
  message?: string;
105
105
  }
106
+ /**
107
+ * Deployment token for automated deployments
108
+ */
109
+ export interface Token {
110
+ /** The token hash (not the actual token value) */
111
+ readonly token: string;
112
+ /** The account this token belongs to */
113
+ readonly account: string;
114
+ /** Optional IP address binding for security */
115
+ readonly ip?: string;
116
+ /** Optional array of tags for categorization and filtering (lowercase, alphanumeric with separators) */
117
+ tags?: string[];
118
+ /** Unix timestamp (seconds) when token was created */
119
+ readonly created: number;
120
+ /** Unix timestamp (seconds) when token expires, or null for never */
121
+ readonly expires?: number;
122
+ /** Unix timestamp (seconds) when token was last used */
123
+ readonly used?: number;
124
+ }
125
+ /**
126
+ * Response for listing tokens
127
+ */
128
+ export interface TokenListResponse {
129
+ /** Array of tokens */
130
+ tokens: Token[];
131
+ /** Total count of tokens */
132
+ count?: number;
133
+ }
134
+ /**
135
+ * Response for token creation
136
+ */
137
+ export interface TokenCreateResponse {
138
+ /** The actual token value (only returned on creation) */
139
+ token: string;
140
+ /** Unix timestamp (seconds) when token expires, or null for never */
141
+ expires?: number;
142
+ /** Success message */
143
+ message?: string;
144
+ }
106
145
  /**
107
146
  * Account plan constants
108
147
  */
@@ -353,6 +392,18 @@ export interface AliasResource {
353
392
  confirm: (aliasName: string) => Promise<{
354
393
  message: string;
355
394
  }>;
395
+ dns: (aliasName: string) => Promise<{
396
+ alias: string;
397
+ dns: any;
398
+ }>;
399
+ records: (aliasName: string) => Promise<{
400
+ alias: string;
401
+ records: any[];
402
+ }>;
403
+ share: (aliasName: string) => Promise<{
404
+ alias: string;
405
+ hash: string;
406
+ }>;
356
407
  }
357
408
  /**
358
409
  * Account resource interface - the contract all implementations must follow
@@ -360,6 +411,14 @@ export interface AliasResource {
360
411
  export interface AccountResource {
361
412
  get: () => Promise<Account>;
362
413
  }
414
+ /**
415
+ * Token resource interface - the contract all implementations must follow
416
+ */
417
+ export interface TokenResource {
418
+ create: (ttl?: number, tags?: string[]) => Promise<TokenCreateResponse>;
419
+ list: () => Promise<TokenListResponse>;
420
+ remove: (token: string) => Promise<void>;
421
+ }
363
422
  /**
364
423
  * Keys resource interface - the contract all implementations must follow
365
424
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shipstatic/types",
3
- "version": "0.2.7",
3
+ "version": "0.2.9",
4
4
  "description": "Shared types for Shipstatic platform",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
package/src/index.ts CHANGED
@@ -122,6 +122,52 @@ export interface DeploymentRemoveResponse {
122
122
  message?: string;
123
123
  }
124
124
 
125
+ // =============================================================================
126
+ // TOKEN TYPES
127
+ // =============================================================================
128
+
129
+ /**
130
+ * Deployment token for automated deployments
131
+ */
132
+ export interface Token {
133
+ /** The token hash (not the actual token value) */
134
+ readonly token: string;
135
+ /** The account this token belongs to */
136
+ readonly account: string;
137
+ /** Optional IP address binding for security */
138
+ readonly ip?: string;
139
+ /** Optional array of tags for categorization and filtering (lowercase, alphanumeric with separators) */
140
+ tags?: string[];
141
+ /** Unix timestamp (seconds) when token was created */
142
+ readonly created: number;
143
+ /** Unix timestamp (seconds) when token expires, or null for never */
144
+ readonly expires?: number;
145
+ /** Unix timestamp (seconds) when token was last used */
146
+ readonly used?: number;
147
+ }
148
+
149
+ /**
150
+ * Response for listing tokens
151
+ */
152
+ export interface TokenListResponse {
153
+ /** Array of tokens */
154
+ tokens: Token[];
155
+ /** Total count of tokens */
156
+ count?: number;
157
+ }
158
+
159
+ /**
160
+ * Response for token creation
161
+ */
162
+ export interface TokenCreateResponse {
163
+ /** The actual token value (only returned on creation) */
164
+ token: string;
165
+ /** Unix timestamp (seconds) when token expires, or null for never */
166
+ expires?: number;
167
+ /** Success message */
168
+ message?: string;
169
+ }
170
+
125
171
  // =============================================================================
126
172
  // ACCOUNT TYPES
127
173
  // =============================================================================
@@ -597,6 +643,9 @@ export interface AliasResource {
597
643
  list: () => Promise<AliasListResponse>;
598
644
  remove: (aliasName: string) => Promise<void>;
599
645
  confirm: (aliasName: string) => Promise<{ message: string }>;
646
+ dns: (aliasName: string) => Promise<{ alias: string; dns: any }>;
647
+ records: (aliasName: string) => Promise<{ alias: string; records: any[] }>;
648
+ share: (aliasName: string) => Promise<{ alias: string; hash: string }>;
600
649
  }
601
650
 
602
651
  /**
@@ -606,6 +655,15 @@ export interface AccountResource {
606
655
  get: () => Promise<Account>;
607
656
  }
608
657
 
658
+ /**
659
+ * Token resource interface - the contract all implementations must follow
660
+ */
661
+ export interface TokenResource {
662
+ create: (ttl?: number, tags?: string[]) => Promise<TokenCreateResponse>;
663
+ list: () => Promise<TokenListResponse>;
664
+ remove: (token: string) => Promise<void>;
665
+ }
666
+
609
667
  /**
610
668
  * Keys resource interface - the contract all implementations must follow
611
669
  */