@shipstatic/types 0.5.2 → 0.5.3

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
@@ -152,17 +152,6 @@ export interface DomainValidateResponse {
152
152
  /** Error message, null when valid */
153
153
  error: string | null;
154
154
  }
155
- /**
156
- * Response for deployment removal
157
- */
158
- export interface DeploymentRemoveResponse {
159
- /** Operation success status */
160
- success: boolean;
161
- /** The deployment ID */
162
- deployment: string;
163
- /** Human-readable message */
164
- message: string;
165
- }
166
155
  /**
167
156
  * Deployment token for automated deployments
168
157
  */
@@ -182,14 +171,30 @@ export interface Token {
182
171
  /** Unix timestamp (seconds) when token was last used, null if never used */
183
172
  readonly used: number | null;
184
173
  }
174
+ /**
175
+ * Token as returned by the list endpoint.
176
+ * Security-redacted: shows truncated prefix instead of full hash, omits account.
177
+ */
178
+ export interface TokenListItem {
179
+ /** Truncated token prefix for identification (e.g., "hash12345678...") */
180
+ readonly token: string;
181
+ /** Labels for categorization and filtering. Always present, empty array when none. */
182
+ labels: string[];
183
+ /** Unix timestamp (seconds) when token was created */
184
+ readonly created: number;
185
+ /** Unix timestamp (seconds) when token expires, null for never */
186
+ readonly expires: number | null;
187
+ /** Unix timestamp (seconds) when token was last used, null if never used */
188
+ readonly used: number | null;
189
+ }
185
190
  /**
186
191
  * Response for listing tokens
187
192
  */
188
193
  export interface TokenListResponse {
189
- /** Array of tokens */
190
- tokens: Token[];
191
- /** Total count of tokens */
192
- count: number;
194
+ /** Array of tokens (security-redacted for list display) */
195
+ tokens: TokenListItem[];
196
+ /** Total number of tokens */
197
+ total: number;
193
198
  }
194
199
  /**
195
200
  * Response for token creation
@@ -429,15 +434,6 @@ export declare const ALLOWED_MIME_TYPES: readonly ["text/html", "text/css", "tex
429
434
  * isAllowedMimeType('application/wasm') // false (not allowed)
430
435
  */
431
436
  export declare function isAllowedMimeType(mimeType: string): boolean;
432
- /**
433
- * Generic success response wrapper
434
- */
435
- export interface SuccessResponse<T = any> {
436
- /** Always true for success */
437
- success: true;
438
- /** Response data */
439
- data: T;
440
- }
441
437
  /**
442
438
  * Simple ping response for health checks
443
439
  */
@@ -782,17 +778,6 @@ export interface ValidationIssue {
782
778
  /** Display-ready message explaining the issue */
783
779
  message: string;
784
780
  }
785
- /**
786
- * Legacy validation error structure
787
- *
788
- * @deprecated Use ValidationIssue[] from FileValidationResult instead
789
- */
790
- export interface ValidationError {
791
- error: string;
792
- details: string;
793
- errors: string[];
794
- isClientError: true;
795
- }
796
781
  /**
797
782
  * Minimal file interface required for validation
798
783
  */
@@ -800,7 +785,7 @@ export interface ValidatableFile {
800
785
  name: string;
801
786
  size: number;
802
787
  type: string;
803
- status?: string;
788
+ status?: FileValidationStatusType;
804
789
  statusMessage?: string;
805
790
  }
806
791
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shipstatic/types",
3
- "version": "0.5.2",
3
+ "version": "0.5.3",
4
4
  "description": "Shared types for Shipstatic platform",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
package/src/index.ts CHANGED
@@ -174,18 +174,6 @@ export interface DomainValidateResponse {
174
174
  error: string | null;
175
175
  }
176
176
 
177
- /**
178
- * Response for deployment removal
179
- */
180
- export interface DeploymentRemoveResponse {
181
- /** Operation success status */
182
- success: boolean;
183
- /** The deployment ID */
184
- deployment: string;
185
- /** Human-readable message */
186
- message: string;
187
- }
188
-
189
177
  // =============================================================================
190
178
  // TOKEN TYPES
191
179
  // =============================================================================
@@ -210,14 +198,31 @@ export interface Token {
210
198
  readonly used: number | null;
211
199
  }
212
200
 
201
+ /**
202
+ * Token as returned by the list endpoint.
203
+ * Security-redacted: shows truncated prefix instead of full hash, omits account.
204
+ */
205
+ export interface TokenListItem {
206
+ /** Truncated token prefix for identification (e.g., "hash12345678...") */
207
+ readonly token: string;
208
+ /** Labels for categorization and filtering. Always present, empty array when none. */
209
+ labels: string[];
210
+ /** Unix timestamp (seconds) when token was created */
211
+ readonly created: number;
212
+ /** Unix timestamp (seconds) when token expires, null for never */
213
+ readonly expires: number | null;
214
+ /** Unix timestamp (seconds) when token was last used, null if never used */
215
+ readonly used: number | null;
216
+ }
217
+
213
218
  /**
214
219
  * Response for listing tokens
215
220
  */
216
221
  export interface TokenListResponse {
217
- /** Array of tokens */
218
- tokens: Token[];
219
- /** Total count of tokens */
220
- count: number;
222
+ /** Array of tokens (security-redacted for list display) */
223
+ tokens: TokenListItem[];
224
+ /** Total number of tokens */
225
+ total: number;
221
226
  }
222
227
 
223
228
  /**
@@ -751,16 +756,6 @@ export function isAllowedMimeType(mimeType: string): boolean {
751
756
  // COMMON RESPONSE PATTERNS
752
757
  // =============================================================================
753
758
 
754
- /**
755
- * Generic success response wrapper
756
- */
757
- export interface SuccessResponse<T = any> {
758
- /** Always true for success */
759
- success: true;
760
- /** Response data */
761
- data: T;
762
- }
763
-
764
759
  /**
765
760
  * Simple ping response for health checks
766
761
  */
@@ -1289,18 +1284,6 @@ export interface ValidationIssue {
1289
1284
  message: string;
1290
1285
  }
1291
1286
 
1292
- /**
1293
- * Legacy validation error structure
1294
- *
1295
- * @deprecated Use ValidationIssue[] from FileValidationResult instead
1296
- */
1297
- export interface ValidationError {
1298
- error: string;
1299
- details: string;
1300
- errors: string[];
1301
- isClientError: true;
1302
- }
1303
-
1304
1287
  /**
1305
1288
  * Minimal file interface required for validation
1306
1289
  */
@@ -1308,7 +1291,7 @@ export interface ValidatableFile {
1308
1291
  name: string;
1309
1292
  size: number;
1310
1293
  type: string;
1311
- status?: string;
1294
+ status?: FileValidationStatusType;
1312
1295
  statusMessage?: string;
1313
1296
  }
1314
1297