@shipstatic/types 0.2.1 → 0.2.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.
package/README.md CHANGED
@@ -50,8 +50,6 @@ interface Account {
50
50
  picture?: string; // Profile picture URL
51
51
  plan: 'free' | 'active' | 'suspended'; // Account plan status
52
52
  created: number; // Unix timestamp (seconds)
53
- subscribed?: number; // Unix timestamp (seconds) when plan started
54
- suspended?: number; // Unix timestamp (seconds) when suspended
55
53
  }
56
54
  ```
57
55
 
@@ -212,7 +210,7 @@ const serverConfig = {
212
210
  maxFileSize: 10 * 1024 * 1024, // 10MB
213
211
  maxFilesCount: 1000, // Files per deployment
214
212
  maxTotalSize: 100 * 1024 * 1024, // 100MB total
215
- deploymentExpiryHours: 168, // 7 days
213
+ deploymentExpiryHours: 120, // 5 days
216
214
  defaultLimit: 50, // Pagination default
217
215
  maxLimit: 100, // Pagination maximum
218
216
  } as const;
package/dist/index.d.ts CHANGED
@@ -12,8 +12,8 @@ export interface Deployment {
12
12
  files: number;
13
13
  /** Total size of all files in bytes */
14
14
  size: number;
15
- /** Current deployment status */
16
- status: 'pending' | 'success' | 'failed' | 'deleting';
15
+ /** Current deployment status - computed from verified field */
16
+ status: 'incomplete' | 'complete';
17
17
  /** Whether deployment has configuration */
18
18
  config?: boolean;
19
19
  /** The deployment URL */
@@ -91,10 +91,6 @@ export interface Account {
91
91
  plan: 'free' | 'active' | 'suspended';
92
92
  /** Unix timestamp (seconds) when account was created */
93
93
  created: number;
94
- /** Unix timestamp (seconds) when plan started */
95
- subscribed?: number;
96
- /** Unix timestamp (seconds) when account was suspended */
97
- suspended?: number;
98
94
  }
99
95
  /**
100
96
  * All possible error types in the Shipstatic platform
@@ -182,7 +178,7 @@ export declare const serverConfig: {
182
178
  /** Maximum total deployment size in bytes (100MB) */
183
179
  readonly maxTotalSize: number;
184
180
  /** Deployment expiry in hours */
185
- readonly deploymentExpiryHours: 168;
181
+ readonly deploymentExpiryHours: 120;
186
182
  /** Pagination limits */
187
183
  readonly defaultLimit: 50;
188
184
  readonly maxLimit: 100;
@@ -352,13 +348,11 @@ export interface UploadedFile {
352
348
  validated?: boolean;
353
349
  }
354
350
  /**
355
- * Upload/deployment status enum
351
+ * Deployment status - computed from verified timestamp
356
352
  */
357
- export declare enum UploadStatus {
358
- PENDING = "pending",
359
- SUCCESS = "success",
360
- FAILED = "failed",
361
- DELETING = "deleting"
353
+ export declare enum DeploymentStatus {
354
+ INCOMPLETE = "incomplete",// verified IS NULL
355
+ COMPLETE = "complete"
362
356
  }
363
357
  /**
364
358
  * Rate limiting data structure
package/dist/index.js CHANGED
@@ -156,7 +156,7 @@ export const serverConfig = {
156
156
  /** Maximum total deployment size in bytes (100MB) */
157
157
  maxTotalSize: 100 * 1024 * 1024,
158
158
  /** Deployment expiry in hours */
159
- deploymentExpiryHours: 168, // 7 days
159
+ deploymentExpiryHours: 120, // 5 days
160
160
  /** Pagination limits */
161
161
  defaultLimit: 50,
162
162
  maxLimit: 100,
@@ -240,15 +240,13 @@ export function validateSubdomain(input) {
240
240
  /** Default API URL if not otherwise configured. */
241
241
  export const DEFAULT_API = 'https://api.shipstatic.com';
242
242
  /**
243
- * Upload/deployment status enum
243
+ * Deployment status - computed from verified timestamp
244
244
  */
245
- export var UploadStatus;
246
- (function (UploadStatus) {
247
- UploadStatus["PENDING"] = "pending";
248
- UploadStatus["SUCCESS"] = "success";
249
- UploadStatus["FAILED"] = "failed";
250
- UploadStatus["DELETING"] = "deleting";
251
- })(UploadStatus || (UploadStatus = {}));
245
+ export var DeploymentStatus;
246
+ (function (DeploymentStatus) {
247
+ DeploymentStatus["INCOMPLETE"] = "incomplete";
248
+ DeploymentStatus["COMPLETE"] = "complete"; // verified IS NOT NULL
249
+ })(DeploymentStatus || (DeploymentStatus = {}));
252
250
  // =============================================================================
253
251
  // URL GENERATION UTILITIES
254
252
  // =============================================================================
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shipstatic/types",
3
- "version": "0.2.1",
3
+ "version": "0.2.2",
4
4
  "description": "Shared types for Shipstatic platform",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
package/src/index.ts CHANGED
@@ -17,8 +17,8 @@ export interface Deployment {
17
17
  files: number;
18
18
  /** Total size of all files in bytes */
19
19
  size: number;
20
- /** Current deployment status */
21
- status: 'pending' | 'success' | 'failed' | 'deleting';
20
+ /** Current deployment status - computed from verified field */
21
+ status: 'incomplete' | 'complete';
22
22
  /** Whether deployment has configuration */
23
23
  config?: boolean;
24
24
  /** The deployment URL */
@@ -110,10 +110,6 @@ export interface Account {
110
110
  plan: 'free' | 'active' | 'suspended';
111
111
  /** Unix timestamp (seconds) when account was created */
112
112
  created: number;
113
- /** Unix timestamp (seconds) when plan started */
114
- subscribed?: number;
115
- /** Unix timestamp (seconds) when account was suspended */
116
- suspended?: number;
117
113
  }
118
114
 
119
115
  // =============================================================================
@@ -313,7 +309,7 @@ export const serverConfig = {
313
309
  /** Maximum total deployment size in bytes (100MB) */
314
310
  maxTotalSize: 100 * 1024 * 1024,
315
311
  /** Deployment expiry in hours */
316
- deploymentExpiryHours: 168, // 7 days
312
+ deploymentExpiryHours: 120, // 5 days
317
313
  /** Pagination limits */
318
314
  defaultLimit: 50,
319
315
  maxLimit: 100,
@@ -593,13 +589,11 @@ export interface UploadedFile {
593
589
  }
594
590
 
595
591
  /**
596
- * Upload/deployment status enum
592
+ * Deployment status - computed from verified timestamp
597
593
  */
598
- export enum UploadStatus {
599
- PENDING = 'pending',
600
- SUCCESS = 'success',
601
- FAILED = 'failed',
602
- DELETING = 'deleting'
594
+ export enum DeploymentStatus {
595
+ INCOMPLETE = 'incomplete', // verified IS NULL
596
+ COMPLETE = 'complete' // verified IS NOT NULL
603
597
  }
604
598
 
605
599
  /**