@shipstatic/types 2.5.0-beta.10 → 2.5.0-beta.11

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
@@ -20,14 +20,20 @@ npm install @shipstatic/types
20
20
 
21
21
  ```typescript
22
22
  import type {
23
- Deployment, DeploymentListResponse,
24
- Domain, DomainSetResult, DomainListResponse, DnsRecord, DomainDnsResponse, DomainRecordsResponse, DomainValidateResponse,
25
- Token, TokenListItem, TokenListResponse, TokenCreateResponse,
26
- Account, AccountUsage, AccountOverrides,
23
+ ListResponse,
24
+ Deployment, DeploymentListResponse, DeploymentDeleteResponse,
25
+ Domain, DomainSetResult, DomainListResponse, DnsRecord, DomainDnsResponse, DomainRecordsResponse, DomainValidateResponse, DomainDeleteResponse, DomainVerifyResponse,
26
+ Token, TokenListResponse, TokenCreateResponse, TokenDeleteResponse,
27
+ Account, AccountUsage, AccountOverrides, AccountDeleteResponse, AccountKeyResponse,
27
28
  StaticFile
28
29
  } from '@shipstatic/types';
29
30
  ```
30
31
 
32
+ A mutation answers with the resource it affected — the entity when it
33
+ survives, otherwise the `*DeleteResponse` shape: the resource noun carrying
34
+ the canonical key, plus the resource's own state field where the resource is
35
+ mid-transition. No `message`, no `success`, no constant flags.
36
+
31
37
  ### Error System
32
38
 
33
39
  ```typescript
@@ -82,7 +88,7 @@ import {
82
88
  DomainStatus, // pending | partial | success | paused
83
89
  AccountPlan, // free | standard | sponsored | enterprise | suspended | terminating | terminated
84
90
  FileValidationStatus, // pending | processing_error | excluded | validation_failed | ready
85
- AuthMethod, // jwt | apiKey | token | webhook | system
91
+ AuthMethod, // session | apiKey | token | agent | oauth | webhook | system
86
92
  } from '@shipstatic/types';
87
93
  ```
88
94
 
@@ -132,7 +138,6 @@ import type {
132
138
  FileValidationResult,
133
139
  ValidationIssue,
134
140
  UploadedFile,
135
- ProgressInfo,
136
141
  } from '@shipstatic/types';
137
142
  ```
138
143
 
package/dist/index.d.ts CHANGED
@@ -74,6 +74,31 @@ export interface DeploymentListResponse extends ListResponse {
74
74
  /** Array of deployments */
75
75
  deployments: Deployment[];
76
76
  }
77
+ /**
78
+ * Acknowledgement of `DELETE /deployments/:deployment` — and the shape every
79
+ * mutation with no entity left to return follows.
80
+ *
81
+ * **The law:** a mutation answers with the resource it affected. If the
82
+ * resource still exists, that means the entity itself (`Deployment`,
83
+ * `Domain`, …). Otherwise it means this: the resource noun carrying the
84
+ * item's canonical key, plus the resource's own state field — and ONLY when
85
+ * the resource survived in a transitional state, as an async deletion's does.
86
+ * Where the resource is simply gone, the key alone is the whole answer
87
+ * ({@link DomainDeleteResponse}, {@link TokenDeleteResponse}).
88
+ *
89
+ * Nothing else rides along. No prose (`message`), because an acknowledgement
90
+ * is data and each surface composes its own copy; and no constant
91
+ * (`changed: true`, `queued: true`, `success: true`), because a field whose
92
+ * value the type already fixes tells a caller nothing it did not know before
93
+ * it made the request. Sync versus accepted is the HTTP status code's job —
94
+ * 200 versus 202 — not a boolean's.
95
+ */
96
+ export interface DeploymentDeleteResponse {
97
+ /** The deployment hostname that was marked for removal */
98
+ readonly deployment: string;
99
+ /** The state the deployment is in while background cleanup runs */
100
+ readonly status: DeploymentStatusType;
101
+ }
77
102
  /**
78
103
  * Domain status constants
79
104
  *
@@ -131,6 +156,25 @@ export interface DomainListResponse extends ListResponse {
131
156
  /** Array of domains */
132
157
  domains: Domain[];
133
158
  }
159
+ /**
160
+ * Acknowledgement of `DELETE /domains/:domain`. The row is gone, so there is
161
+ * no state to state — the canonical domain name is the whole answer. See
162
+ * {@link DeploymentDeleteResponse} for the law.
163
+ */
164
+ export interface DomainDeleteResponse {
165
+ /** The domain name that was removed, normalized */
166
+ readonly domain: string;
167
+ }
168
+ /**
169
+ * Acknowledgement of `POST /domains/:domain/verify` (202). The DNS check is
170
+ * queued, not performed — the accepted status code says so, and the domain's
171
+ * own status is unchanged until the check runs, which is why none is stated
172
+ * here. See {@link DeploymentDeleteResponse} for the law.
173
+ */
174
+ export interface DomainVerifyResponse {
175
+ /** The domain whose DNS verification was queued, normalized */
176
+ readonly domain: string;
177
+ }
134
178
  /**
135
179
  * DNS record types supported for domain configuration
136
180
  */
@@ -224,6 +268,15 @@ export interface TokenCreateResponse extends Token {
224
268
  /** The raw credential value (shown once at creation, then never again) */
225
269
  readonly secret: string;
226
270
  }
271
+ /**
272
+ * Acknowledgement of `DELETE /tokens/:token`. The credential is revoked and
273
+ * its row is gone, so the management identifier is the whole answer. See
274
+ * {@link DeploymentDeleteResponse} for the law.
275
+ */
276
+ export interface TokenDeleteResponse {
277
+ /** The 7-char management identifier that was revoked */
278
+ readonly token: string;
279
+ }
227
280
  /**
228
281
  * Account plan constants
229
282
  */
@@ -313,6 +366,32 @@ export interface AccountGetResponse extends Account {
313
366
  /** Present only during read-only admin impersonation: the operator's account id. */
314
367
  readonly impersonatedBy?: string;
315
368
  }
369
+ /**
370
+ * Acknowledgement of `DELETE /account` (202). Termination is asynchronous —
371
+ * a cleanup consumer finishes the job — so the account survives long enough
372
+ * to state the plan it is transitioning through. `plan` is the account's
373
+ * state field, the way `status` is a deployment's. See
374
+ * {@link DeploymentDeleteResponse} for the law.
375
+ */
376
+ export interface AccountDeleteResponse {
377
+ /** The account that was marked for termination */
378
+ readonly account: string;
379
+ /** The plan the account is in while cleanup runs */
380
+ readonly plan: AccountPlanType;
381
+ }
382
+ /**
383
+ * Response from `PUT /account/key` — the account's single API key, minted in
384
+ * place of whatever was there before.
385
+ *
386
+ * There is no entity to return: only the key's last-4 `hint` is durable
387
+ * (`Account.hint`), and the plaintext exists exactly once, in this response.
388
+ * The raw credential is `secret` on every surface that mints one — the same
389
+ * field `TokenCreateResponse` carries — because one concept gets one name.
390
+ */
391
+ export interface AccountKeyResponse {
392
+ /** The raw API key (shown once at mint, then never again) */
393
+ readonly secret: string;
394
+ }
316
395
  /**
317
396
  * Account-specific configuration overrides
318
397
  * Allows per-account customization of limits without changing plan
@@ -892,9 +971,7 @@ export interface DomainResource {
892
971
  list: (options?: ListOptions) => Promise<DomainListResponse>;
893
972
  get: (name: string) => Promise<Domain>;
894
973
  remove: (name: string) => Promise<void>;
895
- verify: (name: string) => Promise<{
896
- message: string;
897
- }>;
974
+ verify: (name: string) => Promise<DomainVerifyResponse>;
898
975
  validate: (name: string) => Promise<DomainValidateResponse>;
899
976
  dns: (name: string) => Promise<DomainDnsResponse>;
900
977
  records: (name: string) => Promise<DomainRecordsResponse>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shipstatic/types",
3
- "version": "2.5.0-beta.10",
3
+ "version": "2.5.0-beta.11",
4
4
  "description": "Shared types for ShipStatic platform",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
package/src/index.ts CHANGED
@@ -85,6 +85,32 @@ export interface DeploymentListResponse extends ListResponse {
85
85
  deployments: Deployment[];
86
86
  }
87
87
 
88
+ /**
89
+ * Acknowledgement of `DELETE /deployments/:deployment` — and the shape every
90
+ * mutation with no entity left to return follows.
91
+ *
92
+ * **The law:** a mutation answers with the resource it affected. If the
93
+ * resource still exists, that means the entity itself (`Deployment`,
94
+ * `Domain`, …). Otherwise it means this: the resource noun carrying the
95
+ * item's canonical key, plus the resource's own state field — and ONLY when
96
+ * the resource survived in a transitional state, as an async deletion's does.
97
+ * Where the resource is simply gone, the key alone is the whole answer
98
+ * ({@link DomainDeleteResponse}, {@link TokenDeleteResponse}).
99
+ *
100
+ * Nothing else rides along. No prose (`message`), because an acknowledgement
101
+ * is data and each surface composes its own copy; and no constant
102
+ * (`changed: true`, `queued: true`, `success: true`), because a field whose
103
+ * value the type already fixes tells a caller nothing it did not know before
104
+ * it made the request. Sync versus accepted is the HTTP status code's job —
105
+ * 200 versus 202 — not a boolean's.
106
+ */
107
+ export interface DeploymentDeleteResponse {
108
+ /** The deployment hostname that was marked for removal */
109
+ readonly deployment: string;
110
+ /** The state the deployment is in while background cleanup runs */
111
+ readonly status: DeploymentStatusType;
112
+ }
113
+
88
114
  // =============================================================================
89
115
  // DOMAIN TYPES
90
116
  // =============================================================================
@@ -151,6 +177,27 @@ export interface DomainListResponse extends ListResponse {
151
177
  domains: Domain[];
152
178
  }
153
179
 
180
+ /**
181
+ * Acknowledgement of `DELETE /domains/:domain`. The row is gone, so there is
182
+ * no state to state — the canonical domain name is the whole answer. See
183
+ * {@link DeploymentDeleteResponse} for the law.
184
+ */
185
+ export interface DomainDeleteResponse {
186
+ /** The domain name that was removed, normalized */
187
+ readonly domain: string;
188
+ }
189
+
190
+ /**
191
+ * Acknowledgement of `POST /domains/:domain/verify` (202). The DNS check is
192
+ * queued, not performed — the accepted status code says so, and the domain's
193
+ * own status is unchanged until the check runs, which is why none is stated
194
+ * here. See {@link DeploymentDeleteResponse} for the law.
195
+ */
196
+ export interface DomainVerifyResponse {
197
+ /** The domain whose DNS verification was queued, normalized */
198
+ readonly domain: string;
199
+ }
200
+
154
201
  /**
155
202
  * DNS record types supported for domain configuration
156
203
  */
@@ -255,6 +302,16 @@ export interface TokenCreateResponse extends Token {
255
302
  readonly secret: string;
256
303
  }
257
304
 
305
+ /**
306
+ * Acknowledgement of `DELETE /tokens/:token`. The credential is revoked and
307
+ * its row is gone, so the management identifier is the whole answer. See
308
+ * {@link DeploymentDeleteResponse} for the law.
309
+ */
310
+ export interface TokenDeleteResponse {
311
+ /** The 7-char management identifier that was revoked */
312
+ readonly token: string;
313
+ }
314
+
258
315
  // =============================================================================
259
316
  // ACCOUNT TYPES
260
317
  // =============================================================================
@@ -353,6 +410,34 @@ export interface AccountGetResponse extends Account {
353
410
  readonly impersonatedBy?: string;
354
411
  }
355
412
 
413
+ /**
414
+ * Acknowledgement of `DELETE /account` (202). Termination is asynchronous —
415
+ * a cleanup consumer finishes the job — so the account survives long enough
416
+ * to state the plan it is transitioning through. `plan` is the account's
417
+ * state field, the way `status` is a deployment's. See
418
+ * {@link DeploymentDeleteResponse} for the law.
419
+ */
420
+ export interface AccountDeleteResponse {
421
+ /** The account that was marked for termination */
422
+ readonly account: string;
423
+ /** The plan the account is in while cleanup runs */
424
+ readonly plan: AccountPlanType;
425
+ }
426
+
427
+ /**
428
+ * Response from `PUT /account/key` — the account's single API key, minted in
429
+ * place of whatever was there before.
430
+ *
431
+ * There is no entity to return: only the key's last-4 `hint` is durable
432
+ * (`Account.hint`), and the plaintext exists exactly once, in this response.
433
+ * The raw credential is `secret` on every surface that mints one — the same
434
+ * field `TokenCreateResponse` carries — because one concept gets one name.
435
+ */
436
+ export interface AccountKeyResponse {
437
+ /** The raw API key (shown once at mint, then never again) */
438
+ readonly secret: string;
439
+ }
440
+
356
441
  /**
357
442
  * Account-specific configuration overrides
358
443
  * Allows per-account customization of limits without changing plan
@@ -1386,7 +1471,7 @@ export interface DomainResource {
1386
1471
  list: (options?: ListOptions) => Promise<DomainListResponse>;
1387
1472
  get: (name: string) => Promise<Domain>;
1388
1473
  remove: (name: string) => Promise<void>;
1389
- verify: (name: string) => Promise<{ message: string }>;
1474
+ verify: (name: string) => Promise<DomainVerifyResponse>;
1390
1475
  validate: (name: string) => Promise<DomainValidateResponse>;
1391
1476
  dns: (name: string) => Promise<DomainDnsResponse>;
1392
1477
  records: (name: string) => Promise<DomainRecordsResponse>;