@shipstatic/ship 2.0.0-beta.17 → 2.0.0-beta.19
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/browser.d.ts +113 -113
- package/dist/browser.js +1 -1
- package/dist/browser.js.map +1 -1
- package/dist/cli.cjs +2 -2
- package/dist/cli.cjs.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +113 -113
- package/dist/index.d.ts +113 -113
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.d.cts
CHANGED
|
@@ -79,97 +79,6 @@ interface DeploymentCreateResponse extends Deployment {
|
|
|
79
79
|
/** Claim URL for public deployments. Present when deployed without credentials. */
|
|
80
80
|
readonly claim?: string;
|
|
81
81
|
}
|
|
82
|
-
/**
|
|
83
|
-
* Every path the public API answers on, declared once.
|
|
84
|
-
*
|
|
85
|
-
* The URL surface was written out in four places — the API's mounts, the
|
|
86
|
-
* SDK's client, the dashboard's client, and the post-deploy smoke — so a
|
|
87
|
-
* rename meant finding all four. The first three now read this table.
|
|
88
|
-
*
|
|
89
|
-
* The smoke (`cloudflare/api/smoke.mjs`) deliberately still spells its own:
|
|
90
|
-
* five of its nine paths are `/admin/*`, which this table excludes by
|
|
91
|
-
* design, and splitting one list between a registry and literals reads worse
|
|
92
|
-
* than keeping it uniform.
|
|
93
|
-
*
|
|
94
|
-
* **What this guarantees, exactly.** Collection paths are mounted from here,
|
|
95
|
-
* so producer and consumer cannot diverge. Item paths are declared here and
|
|
96
|
-
* consumed by clients, but the API spells them relative to their mount
|
|
97
|
-
* (`/:deployment/config`), so the table does not *generate* them — it is
|
|
98
|
-
* held to them by `api/tests/architecture/api-paths.test.ts`, which fails if
|
|
99
|
-
* any entry names a path no route answers. Some entries have no client yet
|
|
100
|
-
* (`DEPLOYMENT_CONFIG`, `DOMAIN_PROPAGATION` — endpoints the SDK
|
|
101
|
-
* deliberately does not reach); the fence is what keeps those honest rather
|
|
102
|
-
* than merely asserted.
|
|
103
|
-
*
|
|
104
|
-
* **The operator surface is deliberately absent.** `/admin/*` paths belong
|
|
105
|
-
* to `web/my`, for the same reason its row types do: this package is
|
|
106
|
-
* published, and the operator surface is not public (see `CLAUDE.md`, "Admin
|
|
107
|
-
* types"). A path here is a promise to every npm consumer; `/admin` is a
|
|
108
|
-
* promise to one dashboard.
|
|
109
|
-
*
|
|
110
|
-
* Item paths are functions rather than templates so the key is interpolated
|
|
111
|
-
* in one place, encoded the same way by every caller.
|
|
112
|
-
*/
|
|
113
|
-
declare const API_PATHS: {
|
|
114
|
-
readonly DEPLOYMENTS: "/deployments";
|
|
115
|
-
readonly DEPLOYMENT: (deployment: string) => string;
|
|
116
|
-
readonly DEPLOYMENT_CONFIG: (deployment: string) => string;
|
|
117
|
-
readonly DOMAINS: "/domains";
|
|
118
|
-
readonly DOMAIN: (domain: string) => string;
|
|
119
|
-
readonly DOMAIN_VERIFY: (domain: string) => string;
|
|
120
|
-
readonly DOMAIN_DNS: (domain: string) => string;
|
|
121
|
-
readonly DOMAIN_RECORDS: (domain: string) => string;
|
|
122
|
-
readonly DOMAIN_SHARE: (domain: string) => string;
|
|
123
|
-
readonly DOMAIN_PROPAGATION: (domain: string) => string;
|
|
124
|
-
readonly DOMAINS_VALIDATE: "/domains/validate";
|
|
125
|
-
readonly TOKENS: "/tokens";
|
|
126
|
-
readonly TOKEN: (token: string) => string;
|
|
127
|
-
readonly ACCOUNT: "/account";
|
|
128
|
-
readonly ACCOUNT_KEY: "/account/key";
|
|
129
|
-
readonly ACCOUNT_CLAIM: "/account/claim";
|
|
130
|
-
readonly ACTIVITIES: "/activities";
|
|
131
|
-
readonly LABELS: "/labels";
|
|
132
|
-
readonly LIMITS: "/limits";
|
|
133
|
-
readonly PING: "/ping";
|
|
134
|
-
readonly SETUP: "/setup";
|
|
135
|
-
readonly SPA_CHECK: "/spa-check";
|
|
136
|
-
readonly UPLOAD: "/upload";
|
|
137
|
-
};
|
|
138
|
-
/**
|
|
139
|
-
* The deploy request's multipart field names — the other half of the wire
|
|
140
|
-
* surface beside {@link API_PATHS}. `POST /deployments` (and the first-party
|
|
141
|
-
* `/upload`) is multipart/form-data, and these are the names the API reads.
|
|
142
|
-
*
|
|
143
|
-
* Declared once because the body has three independent WRITERS — the SDK's
|
|
144
|
-
* Node and browser body builders, and the n8n community node's hand-rolled
|
|
145
|
-
* client (which cannot import this under n8n Cloud's zero-dependency rule,
|
|
146
|
-
* and fences its restated copy instead) — and until this export every writer
|
|
147
|
-
* restated the strings the API parses, with nothing comparing them.
|
|
148
|
-
*
|
|
149
|
-
* `FILES` carries one entry per file (the API reads it with `getAll`); every
|
|
150
|
-
* other field is single. The `@internal` flags are serialized as the literal
|
|
151
|
-
* string `'true'` and belong to first-party surfaces only.
|
|
152
|
-
*/
|
|
153
|
-
declare const DEPLOY_FIELDS: {
|
|
154
|
-
/** One entry per file — read with `getAll`. */
|
|
155
|
-
readonly FILES: "files[]";
|
|
156
|
-
/** JSON array of MD5 hex digests, index-aligned with `FILES`. */
|
|
157
|
-
readonly CHECKSUMS: "checksums";
|
|
158
|
-
/** JSON array of label strings. */
|
|
159
|
-
readonly LABELS: "labels";
|
|
160
|
-
/** The deploying surface's {@link DeploymentVia} member. */
|
|
161
|
-
readonly VIA: "via";
|
|
162
|
-
/** Plaintext password — the API hashes it server-side. */
|
|
163
|
-
readonly PASSWORD: "password";
|
|
164
|
-
/** @internal Server-processing flag — first-party `/upload` only. */
|
|
165
|
-
readonly BUILD: "build";
|
|
166
|
-
/** @internal Server-processing flag — first-party `/upload` only. */
|
|
167
|
-
readonly PRERENDER: "prerender";
|
|
168
|
-
/** @internal Server-processing flag — first-party `/upload` only. */
|
|
169
|
-
readonly SPA: "spa";
|
|
170
|
-
/** @internal reCAPTCHA proof — `web/www`'s public uploader only. */
|
|
171
|
-
readonly CAPTCHA: "captcha";
|
|
172
|
-
};
|
|
173
82
|
/**
|
|
174
83
|
* The half of a list response that is identical on every list.
|
|
175
84
|
*
|
|
@@ -188,6 +97,28 @@ interface ListResponse {
|
|
|
188
97
|
/** Opaque cursor from this page; `null` on the last page. */
|
|
189
98
|
cursor: string | null;
|
|
190
99
|
}
|
|
100
|
+
/**
|
|
101
|
+
* Pagination options for every list endpoint. The response's `cursor` feeds
|
|
102
|
+
* the next request; a `null` cursor means the last page. Omitting both
|
|
103
|
+
* returns the server's default first page.
|
|
104
|
+
*
|
|
105
|
+
* A list answers `{ <collection>, cursor }` and nothing else — `cursor`
|
|
106
|
+
* carries the entire has-more signal, so no redundant boolean, and no
|
|
107
|
+
* `total`. **A count is an aggregate over a collection, not a property of a
|
|
108
|
+
* page:** including one makes every read pay for a full scan it did not ask
|
|
109
|
+
* for, which is precisely the cost keyset pagination exists to avoid.
|
|
110
|
+
*
|
|
111
|
+
* Counts therefore live on the summary resource that owns them —
|
|
112
|
+
* `GET /account` (`usage`) for a caller's own totals, `GET /admin/stats` for
|
|
113
|
+
* platform-wide ones. Ask for a count when you want a count; ask for a page
|
|
114
|
+
* when you want a page.
|
|
115
|
+
*/
|
|
116
|
+
interface ListOptions {
|
|
117
|
+
/** Maximum number of items to return in one page. */
|
|
118
|
+
limit?: number;
|
|
119
|
+
/** Opaque cursor from the previous page's response. */
|
|
120
|
+
cursor?: string;
|
|
121
|
+
}
|
|
191
122
|
/**
|
|
192
123
|
* Response for listing deployments
|
|
193
124
|
*/
|
|
@@ -658,6 +589,97 @@ interface AccountOverrides {
|
|
|
658
589
|
/** Override for maximum total deployment size in bytes */
|
|
659
590
|
totalSize?: number;
|
|
660
591
|
}
|
|
592
|
+
/**
|
|
593
|
+
* Every path the public API answers on, declared once.
|
|
594
|
+
*
|
|
595
|
+
* The URL surface was written out in four places — the API's mounts, the
|
|
596
|
+
* SDK's client, the dashboard's client, and the post-deploy smoke — so a
|
|
597
|
+
* rename meant finding all four. The first three now read this table.
|
|
598
|
+
*
|
|
599
|
+
* The smoke (`cloudflare/api/smoke.mjs`) deliberately still spells its own:
|
|
600
|
+
* five of its nine paths are `/admin/*`, which this table excludes by
|
|
601
|
+
* design, and splitting one list between a registry and literals reads worse
|
|
602
|
+
* than keeping it uniform.
|
|
603
|
+
*
|
|
604
|
+
* **What this guarantees, exactly.** Collection paths are mounted from here,
|
|
605
|
+
* so producer and consumer cannot diverge. Item paths are declared here and
|
|
606
|
+
* consumed by clients, but the API spells them relative to their mount
|
|
607
|
+
* (`/:deployment/config`), so the table does not *generate* them — it is
|
|
608
|
+
* held to them by `api/tests/architecture/api-paths.test.ts`, which fails if
|
|
609
|
+
* any entry names a path no route answers. Some entries have no client yet
|
|
610
|
+
* (`DEPLOYMENT_CONFIG`, `DOMAIN_PROPAGATION` — endpoints the SDK
|
|
611
|
+
* deliberately does not reach); the fence is what keeps those honest rather
|
|
612
|
+
* than merely asserted.
|
|
613
|
+
*
|
|
614
|
+
* **The operator surface is deliberately absent.** `/admin/*` paths belong
|
|
615
|
+
* to `web/my`, for the same reason its row types do: this package is
|
|
616
|
+
* published, and the operator surface is not public (see `CLAUDE.md`, "Admin
|
|
617
|
+
* types"). A path here is a promise to every npm consumer; `/admin` is a
|
|
618
|
+
* promise to one dashboard.
|
|
619
|
+
*
|
|
620
|
+
* Item paths are functions rather than templates so the key is interpolated
|
|
621
|
+
* in one place, encoded the same way by every caller.
|
|
622
|
+
*/
|
|
623
|
+
declare const API_PATHS: {
|
|
624
|
+
readonly DEPLOYMENTS: "/deployments";
|
|
625
|
+
readonly DEPLOYMENT: (deployment: string) => string;
|
|
626
|
+
readonly DEPLOYMENT_CONFIG: (deployment: string) => string;
|
|
627
|
+
readonly DOMAINS: "/domains";
|
|
628
|
+
readonly DOMAIN: (domain: string) => string;
|
|
629
|
+
readonly DOMAIN_VERIFY: (domain: string) => string;
|
|
630
|
+
readonly DOMAIN_DNS: (domain: string) => string;
|
|
631
|
+
readonly DOMAIN_RECORDS: (domain: string) => string;
|
|
632
|
+
readonly DOMAIN_SHARE: (domain: string) => string;
|
|
633
|
+
readonly DOMAIN_PROPAGATION: (domain: string) => string;
|
|
634
|
+
readonly DOMAINS_VALIDATE: "/domains/validate";
|
|
635
|
+
readonly TOKENS: "/tokens";
|
|
636
|
+
readonly TOKEN: (token: string) => string;
|
|
637
|
+
readonly ACCOUNT: "/account";
|
|
638
|
+
readonly ACCOUNT_KEY: "/account/key";
|
|
639
|
+
readonly ACCOUNT_CLAIM: "/account/claim";
|
|
640
|
+
readonly ACTIVITIES: "/activities";
|
|
641
|
+
readonly LABELS: "/labels";
|
|
642
|
+
readonly LIMITS: "/limits";
|
|
643
|
+
readonly PING: "/ping";
|
|
644
|
+
readonly SETUP: "/setup";
|
|
645
|
+
readonly SPA_CHECK: "/spa-check";
|
|
646
|
+
readonly UPLOAD: "/upload";
|
|
647
|
+
};
|
|
648
|
+
/**
|
|
649
|
+
* The deploy request's multipart field names — the other half of the wire
|
|
650
|
+
* surface beside {@link API_PATHS}. `POST /deployments` (and the first-party
|
|
651
|
+
* `/upload`) is multipart/form-data, and these are the names the API reads.
|
|
652
|
+
*
|
|
653
|
+
* Declared once because the body has three independent WRITERS — the SDK's
|
|
654
|
+
* Node and browser body builders, and the n8n community node's hand-rolled
|
|
655
|
+
* client (which cannot import this under n8n Cloud's zero-dependency rule,
|
|
656
|
+
* and fences its restated copy instead) — and until this export every writer
|
|
657
|
+
* restated the strings the API parses, with nothing comparing them.
|
|
658
|
+
*
|
|
659
|
+
* `FILES` carries one entry per file (the API reads it with `getAll`); every
|
|
660
|
+
* other field is single. The `@internal` flags are serialized as the literal
|
|
661
|
+
* string `'true'` and belong to first-party surfaces only.
|
|
662
|
+
*/
|
|
663
|
+
declare const DEPLOY_FIELDS: {
|
|
664
|
+
/** One entry per file — read with `getAll`. */
|
|
665
|
+
readonly FILES: "files[]";
|
|
666
|
+
/** JSON array of MD5 hex digests, index-aligned with `FILES`. */
|
|
667
|
+
readonly CHECKSUMS: "checksums";
|
|
668
|
+
/** JSON array of label strings. */
|
|
669
|
+
readonly LABELS: "labels";
|
|
670
|
+
/** The deploying surface's {@link DeploymentVia} member. */
|
|
671
|
+
readonly VIA: "via";
|
|
672
|
+
/** Plaintext password — the API hashes it server-side. */
|
|
673
|
+
readonly PASSWORD: "password";
|
|
674
|
+
/** @internal Server-processing flag — first-party `/upload` only. */
|
|
675
|
+
readonly BUILD: "build";
|
|
676
|
+
/** @internal Server-processing flag — first-party `/upload` only. */
|
|
677
|
+
readonly PRERENDER: "prerender";
|
|
678
|
+
/** @internal Server-processing flag — first-party `/upload` only. */
|
|
679
|
+
readonly SPA: "spa";
|
|
680
|
+
/** @internal reCAPTCHA proof — `web/www`'s public uploader only. */
|
|
681
|
+
readonly CAPTCHA: "captcha";
|
|
682
|
+
};
|
|
661
683
|
/**
|
|
662
684
|
* All possible error types in the ShipStatic platform.
|
|
663
685
|
*
|
|
@@ -1309,28 +1331,6 @@ interface DeploymentUploadOptions {
|
|
|
1309
1331
|
*/
|
|
1310
1332
|
idempotencyKey?: string;
|
|
1311
1333
|
}
|
|
1312
|
-
/**
|
|
1313
|
-
* Pagination options for every list endpoint. The response's `cursor` feeds
|
|
1314
|
-
* the next request; a `null` cursor means the last page. Omitting both
|
|
1315
|
-
* returns the server's default first page.
|
|
1316
|
-
*
|
|
1317
|
-
* A list answers `{ <collection>, cursor }` and nothing else — `cursor`
|
|
1318
|
-
* carries the entire has-more signal, so no redundant boolean, and no
|
|
1319
|
-
* `total`. **A count is an aggregate over a collection, not a property of a
|
|
1320
|
-
* page:** including one makes every read pay for a full scan it did not ask
|
|
1321
|
-
* for, which is precisely the cost keyset pagination exists to avoid.
|
|
1322
|
-
*
|
|
1323
|
-
* Counts therefore live on the summary resource that owns them —
|
|
1324
|
-
* `GET /account` (`usage`) for a caller's own totals, `GET /admin/stats` for
|
|
1325
|
-
* platform-wide ones. Ask for a count when you want a count; ask for a page
|
|
1326
|
-
* when you want a page.
|
|
1327
|
-
*/
|
|
1328
|
-
interface ListOptions {
|
|
1329
|
-
/** Maximum number of items to return in one page. */
|
|
1330
|
-
limit?: number;
|
|
1331
|
-
/** Opaque cursor from the previous page's response. */
|
|
1332
|
-
cursor?: string;
|
|
1333
|
-
}
|
|
1334
1334
|
/**
|
|
1335
1335
|
* What a caller may change on an existing deployment.
|
|
1336
1336
|
*
|
package/dist/index.d.ts
CHANGED
|
@@ -79,97 +79,6 @@ interface DeploymentCreateResponse extends Deployment {
|
|
|
79
79
|
/** Claim URL for public deployments. Present when deployed without credentials. */
|
|
80
80
|
readonly claim?: string;
|
|
81
81
|
}
|
|
82
|
-
/**
|
|
83
|
-
* Every path the public API answers on, declared once.
|
|
84
|
-
*
|
|
85
|
-
* The URL surface was written out in four places — the API's mounts, the
|
|
86
|
-
* SDK's client, the dashboard's client, and the post-deploy smoke — so a
|
|
87
|
-
* rename meant finding all four. The first three now read this table.
|
|
88
|
-
*
|
|
89
|
-
* The smoke (`cloudflare/api/smoke.mjs`) deliberately still spells its own:
|
|
90
|
-
* five of its nine paths are `/admin/*`, which this table excludes by
|
|
91
|
-
* design, and splitting one list between a registry and literals reads worse
|
|
92
|
-
* than keeping it uniform.
|
|
93
|
-
*
|
|
94
|
-
* **What this guarantees, exactly.** Collection paths are mounted from here,
|
|
95
|
-
* so producer and consumer cannot diverge. Item paths are declared here and
|
|
96
|
-
* consumed by clients, but the API spells them relative to their mount
|
|
97
|
-
* (`/:deployment/config`), so the table does not *generate* them — it is
|
|
98
|
-
* held to them by `api/tests/architecture/api-paths.test.ts`, which fails if
|
|
99
|
-
* any entry names a path no route answers. Some entries have no client yet
|
|
100
|
-
* (`DEPLOYMENT_CONFIG`, `DOMAIN_PROPAGATION` — endpoints the SDK
|
|
101
|
-
* deliberately does not reach); the fence is what keeps those honest rather
|
|
102
|
-
* than merely asserted.
|
|
103
|
-
*
|
|
104
|
-
* **The operator surface is deliberately absent.** `/admin/*` paths belong
|
|
105
|
-
* to `web/my`, for the same reason its row types do: this package is
|
|
106
|
-
* published, and the operator surface is not public (see `CLAUDE.md`, "Admin
|
|
107
|
-
* types"). A path here is a promise to every npm consumer; `/admin` is a
|
|
108
|
-
* promise to one dashboard.
|
|
109
|
-
*
|
|
110
|
-
* Item paths are functions rather than templates so the key is interpolated
|
|
111
|
-
* in one place, encoded the same way by every caller.
|
|
112
|
-
*/
|
|
113
|
-
declare const API_PATHS: {
|
|
114
|
-
readonly DEPLOYMENTS: "/deployments";
|
|
115
|
-
readonly DEPLOYMENT: (deployment: string) => string;
|
|
116
|
-
readonly DEPLOYMENT_CONFIG: (deployment: string) => string;
|
|
117
|
-
readonly DOMAINS: "/domains";
|
|
118
|
-
readonly DOMAIN: (domain: string) => string;
|
|
119
|
-
readonly DOMAIN_VERIFY: (domain: string) => string;
|
|
120
|
-
readonly DOMAIN_DNS: (domain: string) => string;
|
|
121
|
-
readonly DOMAIN_RECORDS: (domain: string) => string;
|
|
122
|
-
readonly DOMAIN_SHARE: (domain: string) => string;
|
|
123
|
-
readonly DOMAIN_PROPAGATION: (domain: string) => string;
|
|
124
|
-
readonly DOMAINS_VALIDATE: "/domains/validate";
|
|
125
|
-
readonly TOKENS: "/tokens";
|
|
126
|
-
readonly TOKEN: (token: string) => string;
|
|
127
|
-
readonly ACCOUNT: "/account";
|
|
128
|
-
readonly ACCOUNT_KEY: "/account/key";
|
|
129
|
-
readonly ACCOUNT_CLAIM: "/account/claim";
|
|
130
|
-
readonly ACTIVITIES: "/activities";
|
|
131
|
-
readonly LABELS: "/labels";
|
|
132
|
-
readonly LIMITS: "/limits";
|
|
133
|
-
readonly PING: "/ping";
|
|
134
|
-
readonly SETUP: "/setup";
|
|
135
|
-
readonly SPA_CHECK: "/spa-check";
|
|
136
|
-
readonly UPLOAD: "/upload";
|
|
137
|
-
};
|
|
138
|
-
/**
|
|
139
|
-
* The deploy request's multipart field names — the other half of the wire
|
|
140
|
-
* surface beside {@link API_PATHS}. `POST /deployments` (and the first-party
|
|
141
|
-
* `/upload`) is multipart/form-data, and these are the names the API reads.
|
|
142
|
-
*
|
|
143
|
-
* Declared once because the body has three independent WRITERS — the SDK's
|
|
144
|
-
* Node and browser body builders, and the n8n community node's hand-rolled
|
|
145
|
-
* client (which cannot import this under n8n Cloud's zero-dependency rule,
|
|
146
|
-
* and fences its restated copy instead) — and until this export every writer
|
|
147
|
-
* restated the strings the API parses, with nothing comparing them.
|
|
148
|
-
*
|
|
149
|
-
* `FILES` carries one entry per file (the API reads it with `getAll`); every
|
|
150
|
-
* other field is single. The `@internal` flags are serialized as the literal
|
|
151
|
-
* string `'true'` and belong to first-party surfaces only.
|
|
152
|
-
*/
|
|
153
|
-
declare const DEPLOY_FIELDS: {
|
|
154
|
-
/** One entry per file — read with `getAll`. */
|
|
155
|
-
readonly FILES: "files[]";
|
|
156
|
-
/** JSON array of MD5 hex digests, index-aligned with `FILES`. */
|
|
157
|
-
readonly CHECKSUMS: "checksums";
|
|
158
|
-
/** JSON array of label strings. */
|
|
159
|
-
readonly LABELS: "labels";
|
|
160
|
-
/** The deploying surface's {@link DeploymentVia} member. */
|
|
161
|
-
readonly VIA: "via";
|
|
162
|
-
/** Plaintext password — the API hashes it server-side. */
|
|
163
|
-
readonly PASSWORD: "password";
|
|
164
|
-
/** @internal Server-processing flag — first-party `/upload` only. */
|
|
165
|
-
readonly BUILD: "build";
|
|
166
|
-
/** @internal Server-processing flag — first-party `/upload` only. */
|
|
167
|
-
readonly PRERENDER: "prerender";
|
|
168
|
-
/** @internal Server-processing flag — first-party `/upload` only. */
|
|
169
|
-
readonly SPA: "spa";
|
|
170
|
-
/** @internal reCAPTCHA proof — `web/www`'s public uploader only. */
|
|
171
|
-
readonly CAPTCHA: "captcha";
|
|
172
|
-
};
|
|
173
82
|
/**
|
|
174
83
|
* The half of a list response that is identical on every list.
|
|
175
84
|
*
|
|
@@ -188,6 +97,28 @@ interface ListResponse {
|
|
|
188
97
|
/** Opaque cursor from this page; `null` on the last page. */
|
|
189
98
|
cursor: string | null;
|
|
190
99
|
}
|
|
100
|
+
/**
|
|
101
|
+
* Pagination options for every list endpoint. The response's `cursor` feeds
|
|
102
|
+
* the next request; a `null` cursor means the last page. Omitting both
|
|
103
|
+
* returns the server's default first page.
|
|
104
|
+
*
|
|
105
|
+
* A list answers `{ <collection>, cursor }` and nothing else — `cursor`
|
|
106
|
+
* carries the entire has-more signal, so no redundant boolean, and no
|
|
107
|
+
* `total`. **A count is an aggregate over a collection, not a property of a
|
|
108
|
+
* page:** including one makes every read pay for a full scan it did not ask
|
|
109
|
+
* for, which is precisely the cost keyset pagination exists to avoid.
|
|
110
|
+
*
|
|
111
|
+
* Counts therefore live on the summary resource that owns them —
|
|
112
|
+
* `GET /account` (`usage`) for a caller's own totals, `GET /admin/stats` for
|
|
113
|
+
* platform-wide ones. Ask for a count when you want a count; ask for a page
|
|
114
|
+
* when you want a page.
|
|
115
|
+
*/
|
|
116
|
+
interface ListOptions {
|
|
117
|
+
/** Maximum number of items to return in one page. */
|
|
118
|
+
limit?: number;
|
|
119
|
+
/** Opaque cursor from the previous page's response. */
|
|
120
|
+
cursor?: string;
|
|
121
|
+
}
|
|
191
122
|
/**
|
|
192
123
|
* Response for listing deployments
|
|
193
124
|
*/
|
|
@@ -658,6 +589,97 @@ interface AccountOverrides {
|
|
|
658
589
|
/** Override for maximum total deployment size in bytes */
|
|
659
590
|
totalSize?: number;
|
|
660
591
|
}
|
|
592
|
+
/**
|
|
593
|
+
* Every path the public API answers on, declared once.
|
|
594
|
+
*
|
|
595
|
+
* The URL surface was written out in four places — the API's mounts, the
|
|
596
|
+
* SDK's client, the dashboard's client, and the post-deploy smoke — so a
|
|
597
|
+
* rename meant finding all four. The first three now read this table.
|
|
598
|
+
*
|
|
599
|
+
* The smoke (`cloudflare/api/smoke.mjs`) deliberately still spells its own:
|
|
600
|
+
* five of its nine paths are `/admin/*`, which this table excludes by
|
|
601
|
+
* design, and splitting one list between a registry and literals reads worse
|
|
602
|
+
* than keeping it uniform.
|
|
603
|
+
*
|
|
604
|
+
* **What this guarantees, exactly.** Collection paths are mounted from here,
|
|
605
|
+
* so producer and consumer cannot diverge. Item paths are declared here and
|
|
606
|
+
* consumed by clients, but the API spells them relative to their mount
|
|
607
|
+
* (`/:deployment/config`), so the table does not *generate* them — it is
|
|
608
|
+
* held to them by `api/tests/architecture/api-paths.test.ts`, which fails if
|
|
609
|
+
* any entry names a path no route answers. Some entries have no client yet
|
|
610
|
+
* (`DEPLOYMENT_CONFIG`, `DOMAIN_PROPAGATION` — endpoints the SDK
|
|
611
|
+
* deliberately does not reach); the fence is what keeps those honest rather
|
|
612
|
+
* than merely asserted.
|
|
613
|
+
*
|
|
614
|
+
* **The operator surface is deliberately absent.** `/admin/*` paths belong
|
|
615
|
+
* to `web/my`, for the same reason its row types do: this package is
|
|
616
|
+
* published, and the operator surface is not public (see `CLAUDE.md`, "Admin
|
|
617
|
+
* types"). A path here is a promise to every npm consumer; `/admin` is a
|
|
618
|
+
* promise to one dashboard.
|
|
619
|
+
*
|
|
620
|
+
* Item paths are functions rather than templates so the key is interpolated
|
|
621
|
+
* in one place, encoded the same way by every caller.
|
|
622
|
+
*/
|
|
623
|
+
declare const API_PATHS: {
|
|
624
|
+
readonly DEPLOYMENTS: "/deployments";
|
|
625
|
+
readonly DEPLOYMENT: (deployment: string) => string;
|
|
626
|
+
readonly DEPLOYMENT_CONFIG: (deployment: string) => string;
|
|
627
|
+
readonly DOMAINS: "/domains";
|
|
628
|
+
readonly DOMAIN: (domain: string) => string;
|
|
629
|
+
readonly DOMAIN_VERIFY: (domain: string) => string;
|
|
630
|
+
readonly DOMAIN_DNS: (domain: string) => string;
|
|
631
|
+
readonly DOMAIN_RECORDS: (domain: string) => string;
|
|
632
|
+
readonly DOMAIN_SHARE: (domain: string) => string;
|
|
633
|
+
readonly DOMAIN_PROPAGATION: (domain: string) => string;
|
|
634
|
+
readonly DOMAINS_VALIDATE: "/domains/validate";
|
|
635
|
+
readonly TOKENS: "/tokens";
|
|
636
|
+
readonly TOKEN: (token: string) => string;
|
|
637
|
+
readonly ACCOUNT: "/account";
|
|
638
|
+
readonly ACCOUNT_KEY: "/account/key";
|
|
639
|
+
readonly ACCOUNT_CLAIM: "/account/claim";
|
|
640
|
+
readonly ACTIVITIES: "/activities";
|
|
641
|
+
readonly LABELS: "/labels";
|
|
642
|
+
readonly LIMITS: "/limits";
|
|
643
|
+
readonly PING: "/ping";
|
|
644
|
+
readonly SETUP: "/setup";
|
|
645
|
+
readonly SPA_CHECK: "/spa-check";
|
|
646
|
+
readonly UPLOAD: "/upload";
|
|
647
|
+
};
|
|
648
|
+
/**
|
|
649
|
+
* The deploy request's multipart field names — the other half of the wire
|
|
650
|
+
* surface beside {@link API_PATHS}. `POST /deployments` (and the first-party
|
|
651
|
+
* `/upload`) is multipart/form-data, and these are the names the API reads.
|
|
652
|
+
*
|
|
653
|
+
* Declared once because the body has three independent WRITERS — the SDK's
|
|
654
|
+
* Node and browser body builders, and the n8n community node's hand-rolled
|
|
655
|
+
* client (which cannot import this under n8n Cloud's zero-dependency rule,
|
|
656
|
+
* and fences its restated copy instead) — and until this export every writer
|
|
657
|
+
* restated the strings the API parses, with nothing comparing them.
|
|
658
|
+
*
|
|
659
|
+
* `FILES` carries one entry per file (the API reads it with `getAll`); every
|
|
660
|
+
* other field is single. The `@internal` flags are serialized as the literal
|
|
661
|
+
* string `'true'` and belong to first-party surfaces only.
|
|
662
|
+
*/
|
|
663
|
+
declare const DEPLOY_FIELDS: {
|
|
664
|
+
/** One entry per file — read with `getAll`. */
|
|
665
|
+
readonly FILES: "files[]";
|
|
666
|
+
/** JSON array of MD5 hex digests, index-aligned with `FILES`. */
|
|
667
|
+
readonly CHECKSUMS: "checksums";
|
|
668
|
+
/** JSON array of label strings. */
|
|
669
|
+
readonly LABELS: "labels";
|
|
670
|
+
/** The deploying surface's {@link DeploymentVia} member. */
|
|
671
|
+
readonly VIA: "via";
|
|
672
|
+
/** Plaintext password — the API hashes it server-side. */
|
|
673
|
+
readonly PASSWORD: "password";
|
|
674
|
+
/** @internal Server-processing flag — first-party `/upload` only. */
|
|
675
|
+
readonly BUILD: "build";
|
|
676
|
+
/** @internal Server-processing flag — first-party `/upload` only. */
|
|
677
|
+
readonly PRERENDER: "prerender";
|
|
678
|
+
/** @internal Server-processing flag — first-party `/upload` only. */
|
|
679
|
+
readonly SPA: "spa";
|
|
680
|
+
/** @internal reCAPTCHA proof — `web/www`'s public uploader only. */
|
|
681
|
+
readonly CAPTCHA: "captcha";
|
|
682
|
+
};
|
|
661
683
|
/**
|
|
662
684
|
* All possible error types in the ShipStatic platform.
|
|
663
685
|
*
|
|
@@ -1309,28 +1331,6 @@ interface DeploymentUploadOptions {
|
|
|
1309
1331
|
*/
|
|
1310
1332
|
idempotencyKey?: string;
|
|
1311
1333
|
}
|
|
1312
|
-
/**
|
|
1313
|
-
* Pagination options for every list endpoint. The response's `cursor` feeds
|
|
1314
|
-
* the next request; a `null` cursor means the last page. Omitting both
|
|
1315
|
-
* returns the server's default first page.
|
|
1316
|
-
*
|
|
1317
|
-
* A list answers `{ <collection>, cursor }` and nothing else — `cursor`
|
|
1318
|
-
* carries the entire has-more signal, so no redundant boolean, and no
|
|
1319
|
-
* `total`. **A count is an aggregate over a collection, not a property of a
|
|
1320
|
-
* page:** including one makes every read pay for a full scan it did not ask
|
|
1321
|
-
* for, which is precisely the cost keyset pagination exists to avoid.
|
|
1322
|
-
*
|
|
1323
|
-
* Counts therefore live on the summary resource that owns them —
|
|
1324
|
-
* `GET /account` (`usage`) for a caller's own totals, `GET /admin/stats` for
|
|
1325
|
-
* platform-wide ones. Ask for a count when you want a count; ask for a page
|
|
1326
|
-
* when you want a page.
|
|
1327
|
-
*/
|
|
1328
|
-
interface ListOptions {
|
|
1329
|
-
/** Maximum number of items to return in one page. */
|
|
1330
|
-
limit?: number;
|
|
1331
|
-
/** Opaque cursor from the previous page's response. */
|
|
1332
|
-
cursor?: string;
|
|
1333
|
-
}
|
|
1334
1334
|
/**
|
|
1335
1335
|
* What a caller may change on an existing deployment.
|
|
1336
1336
|
*
|