@shipstatic/types 0.8.1 → 0.8.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
@@ -18,6 +18,8 @@ export type DeploymentStatusType = typeof DeploymentStatus[keyof typeof Deployme
18
18
  export interface Deployment {
19
19
  /** The deployment hostname (e.g., 'happy-cat-abc1234.shipstatic.com') */
20
20
  readonly deployment: string;
21
+ /** Full URL to the deployment (e.g., 'https://happy-cat-abc1234.shipstatic.com') */
22
+ readonly url: string;
21
23
  /** Number of files in this deployment */
22
24
  readonly files: number;
23
25
  /** Total size of all files in bytes */
@@ -35,6 +37,14 @@ export interface Deployment {
35
37
  /** Unix timestamp (seconds) when deployment expires, null if never */
36
38
  expires: number | null;
37
39
  }
40
+ /**
41
+ * Response from deployment creation. Extends Deployment with one-time fields
42
+ * only present on creation (not on subsequent GET requests).
43
+ */
44
+ export interface DeploymentCreateResponse extends Deployment {
45
+ /** Claim URL for public deployments. Present when deployed without credentials. */
46
+ readonly claim?: string;
47
+ }
38
48
  /**
39
49
  * Response for listing deployments
40
50
  */
@@ -67,6 +77,8 @@ export type DomainStatusType = typeof DomainStatus[keyof typeof DomainStatus];
67
77
  export interface Domain {
68
78
  /** The domain name */
69
79
  readonly domain: string;
80
+ /** Full URL to the domain (e.g., 'https://www.example.com') */
81
+ readonly url: string;
70
82
  /** The deployment hostname this domain points to (null = domain added but not yet linked) */
71
83
  deployment: string | null;
72
84
  /** Current domain status */
@@ -575,7 +587,7 @@ export interface DeploymentUploadOptions {
575
587
  * Deployment resource interface - the contract all implementations must follow
576
588
  */
577
589
  export interface DeploymentResource {
578
- upload: (input: DeployInput, options?: DeploymentUploadOptions) => Promise<Deployment>;
590
+ upload: (input: DeployInput, options?: DeploymentUploadOptions) => Promise<DeploymentCreateResponse>;
579
591
  list: () => Promise<DeploymentListResponse>;
580
592
  get: (id: string) => Promise<Deployment>;
581
593
  set: (id: string, options: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shipstatic/types",
3
- "version": "0.8.1",
3
+ "version": "0.8.3",
4
4
  "description": "Shared types for ShipStatic platform",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
package/src/index.ts CHANGED
@@ -25,6 +25,8 @@ export type DeploymentStatusType = typeof DeploymentStatus[keyof typeof Deployme
25
25
  export interface Deployment {
26
26
  /** The deployment hostname (e.g., 'happy-cat-abc1234.shipstatic.com') */
27
27
  readonly deployment: string;
28
+ /** Full URL to the deployment (e.g., 'https://happy-cat-abc1234.shipstatic.com') */
29
+ readonly url: string;
28
30
  /** Number of files in this deployment */
29
31
  readonly files: number;
30
32
  /** Total size of all files in bytes */
@@ -44,6 +46,15 @@ export interface Deployment {
44
46
  }
45
47
 
46
48
 
49
+ /**
50
+ * Response from deployment creation. Extends Deployment with one-time fields
51
+ * only present on creation (not on subsequent GET requests).
52
+ */
53
+ export interface DeploymentCreateResponse extends Deployment {
54
+ /** Claim URL for public deployments. Present when deployed without credentials. */
55
+ readonly claim?: string;
56
+ }
57
+
47
58
  /**
48
59
  * Response for listing deployments
49
60
  */
@@ -83,6 +94,8 @@ export type DomainStatusType = typeof DomainStatus[keyof typeof DomainStatus];
83
94
  export interface Domain {
84
95
  /** The domain name */
85
96
  readonly domain: string;
97
+ /** Full URL to the domain (e.g., 'https://www.example.com') */
98
+ readonly url: string;
86
99
  /** The deployment hostname this domain points to (null = domain added but not yet linked) */
87
100
  deployment: string | null; // Mutable - can be updated to point to different deployment
88
101
  /** Current domain status */
@@ -882,7 +895,7 @@ export interface DeploymentUploadOptions {
882
895
  * Deployment resource interface - the contract all implementations must follow
883
896
  */
884
897
  export interface DeploymentResource {
885
- upload: (input: DeployInput, options?: DeploymentUploadOptions) => Promise<Deployment>;
898
+ upload: (input: DeployInput, options?: DeploymentUploadOptions) => Promise<DeploymentCreateResponse>;
886
899
  list: () => Promise<DeploymentListResponse>;
887
900
  get: (id: string) => Promise<Deployment>;
888
901
  set: (id: string, options: { labels: string[] }) => Promise<Deployment>;