@shipstatic/ship 3.4.0 → 3.6.0-beta.0

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.cts CHANGED
@@ -72,7 +72,7 @@ declare const DeploymentVia: {
72
72
  readonly GIT: "git";
73
73
  /** The n8n community node. */
74
74
  readonly N8N: "n8n";
75
- /** Channel: the ChatGPT App listing → `mcp.<domain>/gpt`. */
75
+ /** Channel: the ChatGPT plugin → `mcp.<domain>/gpt`. */
76
76
  readonly GPT: "gpt";
77
77
  /** The VS Code extension. */
78
78
  readonly VSC: "vsc";
@@ -116,7 +116,7 @@ interface Deployment {
116
116
  readonly config: boolean;
117
117
  /** Whether deployment has a password set */
118
118
  readonly password: boolean;
119
- /** Labels for categorization and filtering (lowercase, alphanumeric with separators). Always present, empty array when none. */
119
+ /** Labels for categorization and filtering (a word like `production`, or a key and a value like `env:production`). Always present, empty array when none. */
120
120
  labels: string[];
121
121
  /**
122
122
  * The client/tool that created this deployment. Every deployment created
@@ -380,7 +380,7 @@ interface Domain {
380
380
  verifications: number;
381
381
  /** Unix timestamp (seconds) when plan enforcement paused serving, null while the plan has room for it */
382
382
  paused: number | null;
383
- /** Labels for categorization and filtering (lowercase, alphanumeric with separators). Always present, empty array when none. */
383
+ /** Labels for categorization and filtering (a word like `production`, or a key and a value like `env:production`). Always present, empty array when none. */
384
384
  labels: string[];
385
385
  /** Unix timestamp (seconds) when domain was created */
386
386
  readonly created: number;
@@ -511,8 +511,7 @@ interface DomainShareResponse {
511
511
  * the console sends a stuck reader to it rather than to the general docs. If
512
512
  * the spellings ever diverged, nothing would fail: the link would open the page
513
513
  * at its top and nobody would be told, the silent-drift class this
514
- * constitution exists to delete ({@link SIGN_IN_RETURN_PARAM} is the same shape
515
- * one domain over).
514
+ * constitution exists to delete.
516
515
  */
517
516
  declare const SETUP_TROUBLESHOOTING_ANCHOR = "troubleshooting";
518
517
  /**
@@ -717,13 +716,13 @@ declare const AccountPlan: {
717
716
  };
718
717
  type AccountPlanType = (typeof AccountPlan)[keyof typeof AccountPlan];
719
718
  /**
720
- * The three things an account ACCUMULATES, and therefore the three things a
719
+ * The four things an account ACCUMULATES, and therefore the four things a
721
720
  * plan caps. One word for the count and for the ceiling: `Account.usage` and
722
721
  * `Account.caps` are the same shape, so a surface renders "2 of 3" by
723
722
  * dividing one by the other and can never divide by a different denominator
724
723
  * than the 403 uses.
725
724
  *
726
- * All three are counts plans SELL, and every plan publishes a number for each.
725
+ * All four are counts plans SELL, and every plan publishes a number for each.
727
726
  * A platform domain (`my-app.shipstatic.com`) is among them: the namespace
728
727
  * is the platform's, so every plan bounds how many names one account may take
729
728
  * from it — which is not the address every deployment gets by construction
@@ -763,12 +762,81 @@ interface Caps {
763
762
  */
764
763
  readonly customDomains: number;
765
764
  /**
766
- * Members of the account, the owner included: one membership row each, so
767
- * a pending invitation is not yet a member. As `usage` it is how many the
768
- * account has, as `caps` how many its plan allows.
765
+ * Member places. As `caps` it is how many people the plan allows in the
766
+ * account, the owner included. As `usage` it is the members the account
767
+ * has: one membership row each. A pending invitation holds a place too,
768
+ * counted beside it as {@link AccountUsage.invitations}, so what stands
769
+ * against this cap is {@link placesTaken}, members and invitations
770
+ * together.
769
771
  */
770
772
  readonly members: number;
771
773
  }
774
+ /**
775
+ * What the account holds: every cap's count, and the pending invitations.
776
+ *
777
+ * A member place is taken by a member or by a pending invitation, and an
778
+ * account never holds more of the two together than its plan's `members`
779
+ * cap: the invite door refuses a new invitation when the places are taken,
780
+ * and a move down a tier is booked only when the places fit the destination.
781
+ * The count has no cap of its own, which is why it is a field of the usage
782
+ * and not of {@link Caps}: the place it takes is a member's.
783
+ *
784
+ * Only a member pauses, though. An account over its members cap pauses every
785
+ * member while it does not fit; a pending invitation pauses nobody and
786
+ * counts toward no pause.
787
+ */
788
+ interface AccountUsage extends Caps {
789
+ /**
790
+ * Invitations still open: pending, and not yet expired. An expired one
791
+ * holds nothing, whether or not a sweep has removed its row.
792
+ */
793
+ readonly invitations: number;
794
+ }
795
+ /** The member places an account has taken: its members, and its pending invitations. */
796
+ declare function placesTaken(usage: Pick<AccountUsage, 'members' | 'invitations'>): number;
797
+ /**
798
+ * The kind each count of {@link AccountUsage} names, as a person reads it:
799
+ * one and many. The one vocabulary every surface that says a count uses, the
800
+ * api's cap refusals and the console's room notes alike, so "custom domain"
801
+ * is one word wherever it is met. A person reads "ShipStatic domain" where
802
+ * the code says platform domain; the code's word never reaches them.
803
+ */
804
+ declare const USAGE_KIND: Record<keyof AccountUsage, {
805
+ readonly one: string;
806
+ readonly many: string;
807
+ }>;
808
+ /**
809
+ * What an account holds beyond a set of caps, per kind, only the kinds that
810
+ * are over: what a move down a tier must shed before it is booked, and what
811
+ * the console notes on a cheaper card.
812
+ *
813
+ * Member places are read against `caps.members`: the places over the cap are
814
+ * counted once ({@link placesTaken} less the cap), members are named first,
815
+ * because a member over the cap has to go whatever else the account holds,
816
+ * and what is over after them is the invitations to cancel. So two members
817
+ * and one invitation against a cap of one is one member and one invitation,
818
+ * and five members against the same cap is four members and no invitation.
819
+ * The two domain kinds are read against their own caps. Deployments are not
820
+ * read at all: nothing pauses them, and above their cap they only block
821
+ * creation (see {@link Caps}).
822
+ */
823
+ declare function excessOver(usage: AccountUsage, caps: Caps): Partial<AccountUsage>;
824
+ /**
825
+ * Counts of kinds in words, people first: "4 members and 2 custom domains",
826
+ * or nothing. The order is {@link USAGE_KIND}'s minus the two kinds a count never
827
+ * names here, deployments and invitations, which have their own sentence
828
+ * ({@link fitPhrase}).
829
+ */
830
+ declare function countPhrase(excess: Partial<AccountUsage>): string;
831
+ /**
832
+ * What to do before an account fits a set of caps, in words: "remove 1
833
+ * member and cancel 1 invitation", "remove 2 custom domains", "cancel 2
834
+ * invitations", or nothing when it fits. Two verbs, because a member place is
835
+ * freed two ways: a member is removed, a pending invitation is cancelled. The
836
+ * api's change door and the console's room notes say this one phrase, so a
837
+ * refusal and the note that preceded it cannot differ.
838
+ */
839
+ declare function fitPhrase(excess: Partial<AccountUsage>): string;
772
840
  /**
773
841
  * A person's standing in an account. `owner` founded it and alone manages
774
842
  * billing, credentials, members and deletion; `member` uses its resources
@@ -836,13 +904,17 @@ interface Account {
836
904
  * still work, every write is refused. The plan is unchanged underneath.
837
905
  */
838
906
  readonly suspended: boolean;
839
- /** What the account currently holds — see {@link Caps}. */
840
- readonly usage: Caps;
841
907
  /**
842
- * What the account is allowed to hold, under the same keys as
843
- * {@link usage}, so the pair divides. These are the account's EFFECTIVE
844
- * caps: its plan's numbers, plus whatever the operator granted it
845
- * individually.
908
+ * What the account currently holds: every cap's count, and the pending
909
+ * invitations beside them — see {@link AccountUsage}.
910
+ */
911
+ readonly usage: AccountUsage;
912
+ /**
913
+ * What the account is allowed to hold, under {@link usage}'s cap keys, so
914
+ * the pair divides. These are the account's EFFECTIVE caps: its plan's
915
+ * numbers, plus whatever the operator granted it individually. The one key
916
+ * of `usage` absent here is `invitations`, which has no cap of its own: a
917
+ * pending invitation takes a member place, so it counts against `members`.
846
918
  */
847
919
  readonly caps: Caps;
848
920
  /**
@@ -862,15 +934,16 @@ interface Account {
862
934
  */
863
935
  readonly access?: AccountAccess;
864
936
  /**
865
- * Whether the account's MEMBERS are admitted today: `paused` while it holds
866
- * more members than its plan allows, until the owner upgrades or removes
867
- * members. It is {@link access} for everyone who is not the owner, published
868
- * for the account so the one person it never pauses can be told; the API
869
- * derives both from one rule, so a console reads the pause here rather than
870
- * re-deriving it from the member counts. Optional by the additive-evolution
871
- * law: a response that predates it is `active`.
937
+ * The account's own standing, beside the credential's ({@link access}):
938
+ * whether its MEMBERS are admitted today, `paused` while it holds more
939
+ * members than its plan allows, until the owner upgrades or removes
940
+ * members. It is {@link access} for everyone who is not the owner,
941
+ * published for the account so the one person it never pauses can be told;
942
+ * the API derives both from one rule, so a console reads the pause here
943
+ * rather than re-deriving it from the member counts. Optional by the
944
+ * additive-evolution law: a response that predates it is `active`.
872
945
  */
873
- readonly members?: AccountAccess;
946
+ readonly membership?: AccountAccess;
874
947
  /** Unix timestamp (seconds) when account was created */
875
948
  readonly created: number;
876
949
  /** Unix timestamp (seconds) when account was activated (first deployment), null if not yet activated */
@@ -1077,9 +1150,9 @@ declare const API_PATHS: {
1077
1150
  readonly UPLOAD: "/upload";
1078
1151
  };
1079
1152
  /**
1080
- * The deploy request's multipart field names — the other half of the wire
1081
- * surface beside {@link API_PATHS}. `POST /deployments` (and the first-party
1082
- * `/upload`) is multipart/form-data, and these are the names the API reads.
1153
+ * The deploy request's multipart field names: the other half of the wire
1154
+ * surface beside {@link API_PATHS}. These are the names the API reads from a
1155
+ * multipart body on `POST /deployments` and the first-party `/upload`.
1083
1156
  *
1084
1157
  * Declared once because the body has three independent WRITERS — the SDK's
1085
1158
  * Node and browser body builders, and the n8n community node's hand-rolled
@@ -1126,10 +1199,10 @@ declare const DEPLOY_FIELDS: {
1126
1199
  readonly CAPTCHA: "captcha";
1127
1200
  };
1128
1201
  /**
1129
- * The JSON deploy body's file grammar: the OTHER body `POST /upload` accepts,
1130
- * beside the multipart one {@link DEPLOY_FIELDS} names. A JSON caller sends
1131
- * `{ files: [{ path, content, encoding? }] }`, and this is the whole of what
1132
- * one entry may say: three field names, two encodings, one default.
1202
+ * The JSON deploy body's file grammar: the OTHER body both deploy doors
1203
+ * accept, beside the multipart one {@link DEPLOY_FIELDS} names. A JSON caller
1204
+ * sends `{ files: [{ path, content, encoding? }] }`, and this is the whole
1205
+ * of what one entry may say: three field names, two encodings, one default.
1133
1206
  *
1134
1207
  * Declared once because the grammar has three independent holders that the
1135
1208
  * wire forces to restate it: the API's zod schema (the original), the hosted
@@ -1613,20 +1686,6 @@ interface PingResponse {
1613
1686
  * already share the credential prefixes below.
1614
1687
  */
1615
1688
  declare const AUTH_BASE_PATH = "/auth";
1616
- /**
1617
- * The query marker a completed sign-in LANDS with.
1618
- *
1619
- * The API's magic-link verify leg stamps `?signing-in=1` onto its success
1620
- * redirect, and the console boots into its wait screen on seeing it — two
1621
- * repos, one spelling, which is why it lives here. Success is marked and the
1622
- * error leg deliberately is NOT: the console gives the marker precedence, so
1623
- * a marked error would render a wait that resolves to bare doors with the
1624
- * error's sentence lost. If the spellings ever diverged the failure would be
1625
- * invisible to every suite — email landings would flash the doors for one
1626
- * round trip instead of waiting — which is exactly the silent-drift class
1627
- * this constitution exists to delete.
1628
- */
1629
- declare const SIGN_IN_RETURN_PARAM = "signing-in";
1630
1689
  /**
1631
1690
  * How a request (or recorded activity) was authorized.
1632
1691
  *
@@ -2049,6 +2108,9 @@ declare const SECTIONS: {
2049
2108
  readonly settings: {
2050
2109
  readonly owner: false;
2051
2110
  };
2111
+ readonly claim: {
2112
+ readonly owner: false;
2113
+ };
2052
2114
  readonly upgrade: {
2053
2115
  readonly owner: true;
2054
2116
  };
@@ -2061,6 +2123,10 @@ declare const SECTIONS: {
2061
2123
  };
2062
2124
  /** A section's first segment. */
2063
2125
  type ConsoleSection = keyof typeof SECTIONS;
2126
+ /** The pages that exist before an account is known, by first segment. */
2127
+ declare const DOOR_SEGMENTS: readonly ["login", "register", "logout", "invitation", "consent"];
2128
+ /** A door's first segment. */
2129
+ type DoorSegment = (typeof DOOR_SEGMENTS)[number];
2064
2130
  /** The two fragments of the settings page a link may name. */
2065
2131
  type SettingsFragment = 'members' | 'api-key';
2066
2132
  /**
@@ -2094,6 +2160,8 @@ declare function consolePaths(account?: string): {
2094
2160
  deployment: (domain: string) => string;
2095
2161
  };
2096
2162
  settings: (fragment?: SettingsFragment) => string;
2163
+ /** The claim of an anonymous deployment into this account; the API mails the bare form. */
2164
+ claim: (code: string) => string;
2097
2165
  /** Settings, marked as the landing of a Stripe Customer Portal return. */
2098
2166
  settingsAfterBilling: () => string;
2099
2167
  upgrade: (plan?: AccountPlanType) => string;
@@ -2104,13 +2172,31 @@ declare function consolePaths(account?: string): {
2104
2172
  };
2105
2173
  /** The builders `consolePaths` returns. */
2106
2174
  type ConsolePaths = ReturnType<typeof consolePaths>;
2107
- /** The doors: the pages that exist before an account is known. */
2175
+ /** Where a sign-in door's journey goes on: the console path a `?next` carries. */
2176
+ interface Journey {
2177
+ readonly next?: string;
2178
+ }
2179
+ /**
2180
+ * The doors: the pages a PERSON stands on before an account is known, one
2181
+ * builder per door segment and named for it: signing in and out, joining an
2182
+ * account, granting an app access. A door's object rides its path (the
2183
+ * sign-in link's token, the invitation's id), and the journey rides the
2184
+ * query, so the three doors a sign-in moves through take it by name. What a
2185
+ * person does IN an account is a section (`consolePaths`), the claim among
2186
+ * them.
2187
+ *
2188
+ * ```ts
2189
+ * doors.login({ token, next: '/claim/abc' })
2190
+ * // '/login/<token>?next=%2Fclaim%2Fabc'
2191
+ * ```
2192
+ */
2108
2193
  declare const doors: {
2109
- readonly login: (next?: string) => string;
2110
- readonly register: (next?: string) => string;
2111
- readonly logout: () => string;
2194
+ readonly login: ({ token, next }?: Journey & {
2195
+ readonly token?: string;
2196
+ }) => string;
2197
+ readonly register: ({ next }?: Journey) => string;
2198
+ readonly logout: ({ next }?: Journey) => string;
2112
2199
  readonly invitation: (invitation: string) => string;
2113
- readonly claim: (code: string) => string;
2114
2200
  readonly consent: () => string;
2115
2201
  };
2116
2202
  /**
@@ -2125,10 +2211,21 @@ declare function billingReturnOf(search: string): BillingReturn | null;
2125
2211
  * the account exists is the server's answer, never the path's.
2126
2212
  */
2127
2213
  declare function accountOfPath(path: string): string | null;
2128
- /** Whether a path names a claim link (`/claim/:code`, a bearer credential). */
2214
+ /**
2215
+ * The door a path names, or null for an account place or the operator
2216
+ * partition. Every question about doors reads this one answer: which page is
2217
+ * an auth page, which errand a destination carries, what a vendor must not
2218
+ * see. `/login/<token>` is the login door, as `/invitation/<id>` is the
2219
+ * invitation door: a door's object is the rest of its path.
2220
+ */
2221
+ declare function doorOf(path: string): DoorSegment | null;
2222
+ /**
2223
+ * Whether a path names the claim section, in either form: `/claim/:code`, and
2224
+ * the same under `/<account>/`. The code is a bearer credential, which is why
2225
+ * a reader asks about this section by name: the doors title their visitor by
2226
+ * it, and analytics elides it.
2227
+ */
2129
2228
  declare const isClaimPath: (path: string) => boolean;
2130
- /** Whether a path names an invitation (`/invitations/:invitation`). */
2131
- declare const isInvitationPath: (path: string) => boolean;
2132
2229
  /**
2133
2230
  * Whether a path names the upgrade section, in either form: `/upgrade`,
2134
2231
  * `/upgrade/:plan`, and the same under `/<account>/`.
@@ -2461,20 +2558,6 @@ interface Plan {
2461
2558
  * nothing (a plan sold by conversation publishes no numbers).
2462
2559
  */
2463
2560
  readonly caps: Caps | null;
2464
- /**
2465
- * Why this row cannot be ordered right now — the closed door's own sentence,
2466
- * verbatim — or absent when the way is open. A menu lists what can be
2467
- * ordered, and a row that is sold but not yet orderable (its door is closed:
2468
- * checkout unbuilt, a feature unfinished) SAYS SO on the menu instead of
2469
- * only at the order.
2470
- *
2471
- * Clients branch on PRESENCE and render the sentence unchanged — they know
2472
- * *that* the row is closed, never *which* door or *when it lifts*; the
2473
- * vocabulary of doors stays server-side. The same rule the refusal follows:
2474
- * `POST /billing/change` onto a closed row answers 400 with
2475
- * `details.closed`, and its `message` is this sentence.
2476
- */
2477
- readonly closed?: string;
2478
2561
  }
2479
2562
  /**
2480
2563
  * Response for `GET /plans` — the whole public menu, in display order.
@@ -2512,17 +2595,18 @@ interface PlanChangeRequest {
2512
2595
  }
2513
2596
  /**
2514
2597
  * `details` of the change door's refusal of a move down a tier the account
2515
- * does not fit: the account holds more members, custom domains or platform
2516
- * domains than the destination allows.
2598
+ * does not fit: the account holds more members, pending invitations, custom
2599
+ * domains or platform domains than the destination allows.
2517
2600
  *
2518
2601
  * `excess` counts what to REMOVE before asking again, per kind, keyed like
2519
- * {@link Caps}; only the kinds over the destination's caps appear. The
2520
- * door's `message` names the same counts in a sentence, and that sentence is
2521
- * what a surface shows; the counts are for a client that acts on the
2522
- * refusal.
2602
+ * {@link AccountUsage}; only the kinds over the destination's caps appear
2603
+ * ({@link excessOver}). Members and invitations are counted apart, since one
2604
+ * is removed and the other cancelled. The door's `message` names the same
2605
+ * counts in a sentence, and that sentence is what a surface shows; the
2606
+ * counts are for a client that acts on the refusal.
2523
2607
  */
2524
2608
  interface PlanChangeRefusalDetails {
2525
- readonly excess: Partial<Caps>;
2609
+ readonly excess: Partial<AccountUsage>;
2526
2610
  }
2527
2611
  /**
2528
2612
  * The pending plan change — a Stripe Subscription Schedule, mirrored onto the
@@ -2814,28 +2898,64 @@ declare function generateDeploymentUrl(deployment: string): string;
2814
2898
  */
2815
2899
  declare function generateDomainUrl(domain: string): string;
2816
2900
  /**
2817
- * Label validation constraints shared across UI and API.
2818
- * These rules define the single source of truth for label validation.
2901
+ * A label is a short identifier attached to a deployment, a domain or a token.
2902
+ * It has one of two forms:
2903
+ *
2904
+ * - a word: `production`, `v1.2.3`, `us-east-1`
2905
+ * - a key and a value, split by one `:`: `env:production`, `team:web`
2906
+ *
2907
+ * Each side is lowercase letters and digits, with single `.`, `_` or `-`
2908
+ * between them. The whole label, the key and the `:` and the value together,
2909
+ * counts toward {@link LABEL_CONSTRAINTS.MAX_LENGTH}.
2910
+ *
2911
+ * The platform stores a label and shows it as written. It reads nothing from
2912
+ * a key or a value and changes no behaviour because of one: a label describes
2913
+ * a resource and lets its owner find it. So a resource may carry several
2914
+ * values for one key (`team:web` and `team:api`), and only the same label
2915
+ * twice is refused.
2916
+ *
2917
+ * Labels stay a list of strings on the wire and in storage. A caller that
2918
+ * wants a key's value splits on the `:` itself.
2819
2919
  */
2820
2920
  declare const LABEL_CONSTRAINTS: {
2821
- /** Minimum label length in characters */
2921
+ /** Minimum label length in characters. */
2822
2922
  readonly MIN_LENGTH: 3;
2823
- /** Maximum label length in characters (concise labels, matches Stack Overflow's original limit) */
2824
- readonly MAX_LENGTH: 25;
2825
- /** Maximum number of labels allowed per resource */
2923
+ /** Maximum label length in characters. A key, its `:` and its value share it. */
2924
+ readonly MAX_LENGTH: 63;
2925
+ /** Maximum number of labels on one resource. */
2826
2926
  readonly MAX_COUNT: 10;
2827
- /** Allowed separator characters between label segments */
2828
- readonly SEPARATORS: "._-";
2829
2927
  };
2830
2928
  /**
2831
- * Label validation pattern.
2832
- * Must start and end with alphanumeric (a-z, 0-9).
2833
- * Can contain separators (. _ -) between segments, but not consecutive.
2929
+ * The shape of a label: one segment, or two with a `:` between them. Length
2930
+ * is {@link LABEL_CONSTRAINTS}' rule, and {@link validateLabel} applies both.
2834
2931
  *
2835
- * Valid examples: 'production', 'v1.2.3', 'api_v2', 'us-east-1'
2836
- * Invalid examples: 'ab' (too short), '-prod' (starts with separator), 'foo--bar' (consecutive separators)
2932
+ * Matches: `production`, `v1.2.3`, `env:production`, `commit:3f9c2ab`
2933
+ * Refuses: `-prod`, `foo--bar`, `:production`, `env:`, `a:b:c`, `Env:Prod`
2837
2934
  */
2838
2935
  declare const LABEL_PATTERN: RegExp;
2936
+ /**
2937
+ * Validate one label and return it normalized: trimmed and lowercased, then
2938
+ * held to {@link LABEL_CONSTRAINTS}' length and to {@link LABEL_PATTERN}.
2939
+ * Throws `ShipError.validation` when it does not fit.
2940
+ *
2941
+ * Lowercasing is the one normalization and it applies to both sides of a
2942
+ * `:`, so `Env:Prod` is stored as `env:prod`. A value that must keep its
2943
+ * case does not belong in a label.
2944
+ *
2945
+ * The one label check on the platform: the SDK and the console call it for
2946
+ * fast feedback and the API calls it as the boundary, so all three refuse
2947
+ * the same strings in the same words.
2948
+ */
2949
+ declare function validateLabel(value: unknown): string;
2950
+ /**
2951
+ * Validate a resource's labels and return them normalized, each through
2952
+ * {@link validateLabel}. Absent (`undefined` / `null`) returns `undefined`;
2953
+ * an empty array returns as is, which is how an update clears every label.
2954
+ * At most {@link LABEL_CONSTRAINTS.MAX_COUNT}, and no label twice after
2955
+ * normalization.
2956
+ */
2957
+ declare function validateLabels(labels: string[]): string[];
2958
+ declare function validateLabels(labels: string[] | undefined | null): string[] | undefined;
2839
2959
  /**
2840
2960
  * Serialize labels array to JSON string for database storage.
2841
2961
  * Returns null for empty or undefined arrays.
@@ -2956,8 +3076,8 @@ type ApiDeployOptions = Omit<DeploymentOptions, 'pathDetect'>;
2956
3076
  */
2957
3077
  interface DeployBodyContext {
2958
3078
  /**
2959
- * Deployment labels for categorization. Each label must satisfy
2960
- * `LABEL_CONSTRAINTS` (length and pattern, lowercased+trimmed).
3079
+ * Deployment labels, each a word (`production`) or a key and a value
3080
+ * (`env:production`), already through `validateLabels`.
2961
3081
  */
2962
3082
  labels?: string[];
2963
3083
  /**
@@ -3855,6 +3975,6 @@ declare class Ship extends Ship$1 {
3855
3975
  }
3856
3976
 
3857
3977
  declare namespace Ship {
3858
- export { ACCOUNT_HEADER, API_KEY, API_PATHS, AUTH_BASE_PATH, Account, AccountAccess, AccountDeleteResponse, AccountKeyResponse, AccountPlan, AccountPlanType, AccountRefusal, AccountRefusalType, AccountResource, AccountRole, Activity, ActivityEvent, ActivityListResponse, ActivityMeta, ApiDeployOptions, ApiHttp, ApiHttpOptions, AuthMethod, AuthMethodType, BUILD_SETTINGS, BillingInterval, BillingPortalSession, BillingSyncResponse, BuildFailureDetails, CALLER, Caps, ConsoleErrand, ConsolePaths, ConsoleSection, DEFAULT_API, DEPLOYMENT_CONFIG_FILENAME, DEPLOY_FIELDS, DEPLOY_FILE_GRAMMAR, DEPLOY_TOKEN, DeployBodyContext, DeployFile, DeployFileEncoding, DeployFileSpec, DeployInput, DeployTransport, Deployment, DeploymentCreateResponse, DeploymentDeleteResponse, DeploymentListResponse, DeploymentOptions, DeploymentResource, DeploymentResourceContext, DeploymentSetOptions, DeploymentStatus, DeploymentStatusType, DeploymentUploadOptions, DeploymentVia, DeploymentViaType, DnsLookup, DnsProvider, DnsRecord, DnsRecordType, Domain, DomainDeleteResponse, DomainDnsResponse, DomainListResponse, DomainRecordsResponse, DomainResource, DomainSetOptions, DomainSetResult, DomainShareResponse, DomainStatus, DomainStatusType, DomainValidateResponse, DomainVerification, DomainVerificationType, DomainVerifyResponse, ErrorResponse, ErrorType, ExecutionEnvironment, FileValidationStatus as FILE_VALIDATION_STATUS, Fetch, FileValidationResult, FileValidationStatus, FileValidationStatusType, IDEMPOTENCY_KEY_CONSTRAINTS, JUNK_DIRECTORIES, LABEL_CONSTRAINTS, LABEL_PATTERN, LabelsResponse, ListOptions, ListResponse, MD5Result, MY_API_KEY_URL, OAUTH_TOKEN, OAuthScope, OAuthScopeType, PASSWORD_CONSTRAINTS, PUBLIC_DEPLOYMENT_TTL_SECONDS, PingResponse, Plan, PlanChangeRefusalDetails, PlanChangeRequest, PlanChangeResponse, PlanDestination, PlansResponse, PlatformLimitKey, PlatformLimits, RequestResult, ResourceContext, SECTIONS, SETUP_TROUBLESHOOTING_ANCHOR, SHIP_ENV, SHIP_VIA_ENV, SIGN_IN_RETURN_PARAM, SPACheckRequest, SPACheckResponse, SPA_CHECK_CONSTRAINTS, SPA_DEFAULT_CONFIG, ScheduledChange, SettingsFragment, SetupInstructionsResponse, ShipClientOptions, ShipError, ShipEvents, ShipRequestInit, StaticFile, TTL_CONSTRAINTS, Token, TokenCreateOptions, TokenCreateResponse, TokenDeleteResponse, TokenKind, TokenKindType, TokenListResponse, TokenProvider, TokenResource, Transport, UNBUILT_PROJECT_MARKERS, UNSAFE_FILENAME_CHARS, USER_VISIBLE_EVENTS, UploadedFile, UserVisibleActivityEvent, ValidatableFile, ValidationIssue, WEB_FILE_ACCEPT, __setTestEnvironment, accountOfPath, allValidFilesReady, assertShipJsonSyntax, billingReturnOf, calculateMD5, classifyToken, consolePaths, createAccountResource, createDeploymentResource, createDomainResource, createTokenResource, deserializeLabels, doors, errandOf, extractSubdomain, filterJunk, formatDuration, formatFileSize, formatTimeRemaining, generateDeploymentUrl, generateDomainUrl, getENV, getValidFiles, hasUnbuiltMarker, hasUnsafeChars, isBlockedExtension, isClaimPath, isCustomDomain, isDeployment, isInvitationPath, isPlatformDomain, isShipError, isUpgradePath, normalizeVia, optimizeDeployPaths, personName, personShortName, pluralize, processFilesForNode, readBearerValue, serializeLabels, validateApiKey, validateApiUrl, validateBuildCommand, validateCaller, validateDeployCount, validateDeployFile, validateDeployPath, validateDeployToken, validateFileName, validateFiles, validateIdempotencyKey, validateOAuthToken, validateOutputDir, validatePassword, validateToken, validateTtl };
3978
+ export { ACCOUNT_HEADER, API_KEY, API_PATHS, AUTH_BASE_PATH, Account, AccountAccess, AccountDeleteResponse, AccountKeyResponse, AccountPlan, AccountPlanType, AccountRefusal, AccountRefusalType, AccountResource, AccountRole, AccountUsage, Activity, ActivityEvent, ActivityListResponse, ActivityMeta, ApiDeployOptions, ApiHttp, ApiHttpOptions, AuthMethod, AuthMethodType, BUILD_SETTINGS, BillingInterval, BillingPortalSession, BillingSyncResponse, BuildFailureDetails, CALLER, Caps, ConsoleErrand, ConsolePaths, ConsoleSection, DEFAULT_API, DEPLOYMENT_CONFIG_FILENAME, DEPLOY_FIELDS, DEPLOY_FILE_GRAMMAR, DEPLOY_TOKEN, DeployBodyContext, DeployFile, DeployFileEncoding, DeployFileSpec, DeployInput, DeployTransport, Deployment, DeploymentCreateResponse, DeploymentDeleteResponse, DeploymentListResponse, DeploymentOptions, DeploymentResource, DeploymentResourceContext, DeploymentSetOptions, DeploymentStatus, DeploymentStatusType, DeploymentUploadOptions, DeploymentVia, DeploymentViaType, DnsLookup, DnsProvider, DnsRecord, DnsRecordType, Domain, DomainDeleteResponse, DomainDnsResponse, DomainListResponse, DomainRecordsResponse, DomainResource, DomainSetOptions, DomainSetResult, DomainShareResponse, DomainStatus, DomainStatusType, DomainValidateResponse, DomainVerification, DomainVerificationType, DomainVerifyResponse, DoorSegment, ErrorResponse, ErrorType, ExecutionEnvironment, FileValidationStatus as FILE_VALIDATION_STATUS, Fetch, FileValidationResult, FileValidationStatus, FileValidationStatusType, IDEMPOTENCY_KEY_CONSTRAINTS, JUNK_DIRECTORIES, LABEL_CONSTRAINTS, LABEL_PATTERN, LabelsResponse, ListOptions, ListResponse, MD5Result, MY_API_KEY_URL, OAUTH_TOKEN, OAuthScope, OAuthScopeType, PASSWORD_CONSTRAINTS, PUBLIC_DEPLOYMENT_TTL_SECONDS, PingResponse, Plan, PlanChangeRefusalDetails, PlanChangeRequest, PlanChangeResponse, PlanDestination, PlansResponse, PlatformLimitKey, PlatformLimits, RequestResult, ResourceContext, SECTIONS, SETUP_TROUBLESHOOTING_ANCHOR, SHIP_ENV, SHIP_VIA_ENV, SPACheckRequest, SPACheckResponse, SPA_CHECK_CONSTRAINTS, SPA_DEFAULT_CONFIG, ScheduledChange, SettingsFragment, SetupInstructionsResponse, ShipClientOptions, ShipError, ShipEvents, ShipRequestInit, StaticFile, TTL_CONSTRAINTS, Token, TokenCreateOptions, TokenCreateResponse, TokenDeleteResponse, TokenKind, TokenKindType, TokenListResponse, TokenProvider, TokenResource, Transport, UNBUILT_PROJECT_MARKERS, UNSAFE_FILENAME_CHARS, USAGE_KIND, USER_VISIBLE_EVENTS, UploadedFile, UserVisibleActivityEvent, ValidatableFile, ValidationIssue, WEB_FILE_ACCEPT, __setTestEnvironment, accountOfPath, allValidFilesReady, assertShipJsonSyntax, billingReturnOf, calculateMD5, classifyToken, consolePaths, countPhrase, createAccountResource, createDeploymentResource, createDomainResource, createTokenResource, deserializeLabels, doorOf, doors, errandOf, excessOver, extractSubdomain, filterJunk, fitPhrase, formatDuration, formatFileSize, formatTimeRemaining, generateDeploymentUrl, generateDomainUrl, getENV, getValidFiles, hasUnbuiltMarker, hasUnsafeChars, isBlockedExtension, isClaimPath, isCustomDomain, isDeployment, isPlatformDomain, isShipError, isUpgradePath, normalizeVia, optimizeDeployPaths, personName, personShortName, placesTaken, pluralize, processFilesForNode, readBearerValue, serializeLabels, validateApiKey, validateApiUrl, validateBuildCommand, validateCaller, validateDeployCount, validateDeployFile, validateDeployPath, validateDeployToken, validateFileName, validateFiles, validateIdempotencyKey, validateLabel, validateLabels, validateOAuthToken, validateOutputDir, validatePassword, validateToken, validateTtl };
3859
3979
  }
3860
3980
  export = Ship;