@greatwait/contracts 0.1.0-alpha.4 → 0.1.0-alpha.6

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.
Files changed (190) hide show
  1. package/README.md +1 -1
  2. package/dist/authority.d.ts +4 -1
  3. package/dist/authority.js +1 -0
  4. package/dist/billing.d.ts +231 -1
  5. package/dist/billing.js +150 -1
  6. package/dist/callback-safety.js +13 -3
  7. package/dist/configuration-bounds.d.ts +13 -0
  8. package/dist/configuration-bounds.js +13 -0
  9. package/dist/data-export.d.ts +2 -0
  10. package/dist/delivery.d.ts +26 -0
  11. package/dist/delivery.js +2 -0
  12. package/dist/effective-limits.d.ts +40 -0
  13. package/dist/effective-limits.js +42 -0
  14. package/dist/endpoints.d.ts +173 -5
  15. package/dist/endpoints.js +77 -6
  16. package/dist/first-value-journey.d.ts +1 -1
  17. package/dist/first-value-journey.js +11 -7
  18. package/dist/forecast.d.ts +111 -21
  19. package/dist/forecast.js +87 -24
  20. package/dist/http-request.d.ts +193 -0
  21. package/dist/http-request.js +305 -0
  22. package/dist/identity.d.ts +4 -4
  23. package/dist/index.d.ts +9 -6
  24. package/dist/index.js +8 -5
  25. package/dist/mcp.d.ts +2 -1
  26. package/dist/mcp.js +1 -1
  27. package/dist/members.d.ts +141 -0
  28. package/dist/members.js +223 -0
  29. package/dist/oauth.d.ts +7 -0
  30. package/dist/operation-definitions.d.ts +20 -4
  31. package/dist/operation-definitions.js +9 -1
  32. package/dist/operational-config.d.ts +101 -0
  33. package/dist/operational-config.js +341 -0
  34. package/dist/operations.d.ts +1299 -52
  35. package/dist/operations.js +466 -32
  36. package/dist/organization-lifecycle.d.ts +10 -0
  37. package/dist/partition.d.ts +17 -9
  38. package/dist/partition.js +3 -3
  39. package/dist/policy.js +5 -2
  40. package/dist/problems.d.ts +25 -2
  41. package/dist/problems.js +49 -1
  42. package/dist/protocol.d.ts +5 -5
  43. package/dist/protocol.js +2 -1
  44. package/dist/scheduling-records.d.ts +226 -0
  45. package/dist/scheduling-records.js +5 -0
  46. package/dist/scheduling.d.ts +273 -1
  47. package/dist/scheduling.js +91 -4
  48. package/dist/secrets.d.ts +7 -0
  49. package/dist/tenancy.d.ts +1 -1
  50. package/dist/tenancy.js +1 -1
  51. package/dist/usage.js +6 -21
  52. package/dist/zod-values.d.ts +2 -2
  53. package/dist/zod-values.js +1 -1
  54. package/generated/v1/examples/attempts.list.response.json +2 -0
  55. package/generated/v1/examples/attempts.read.response.json +2 -0
  56. package/generated/v1/examples/billing.fundingconfirm.response.json +120 -0
  57. package/generated/v1/examples/billing.invoicehistory.response.json +6 -0
  58. package/generated/v1/examples/billing.invoices.response.json +15 -0
  59. package/generated/v1/examples/billing.paymenthistory.response.json +6 -0
  60. package/generated/v1/examples/billing.paymentmethod.response.json +16 -0
  61. package/generated/v1/examples/billing.paymentmethodconfirm.request.json +3 -0
  62. package/generated/v1/examples/billing.paymentmethodconfirm.response.json +16 -0
  63. package/generated/v1/examples/billing.paymentmethodremove.request.json +3 -0
  64. package/generated/v1/examples/billing.paymentmethodremove.response.json +4 -0
  65. package/generated/v1/examples/billing.paymentmethodsetup.request.json +1 -0
  66. package/generated/v1/examples/billing.paymentmethodsetup.response.json +3 -0
  67. package/generated/v1/examples/endpoints.ensure.request.json +3 -0
  68. package/generated/v1/examples/endpoints.ensure.response.json +20 -0
  69. package/generated/v1/examples/invitations.create.request.json +5 -0
  70. package/generated/v1/examples/invitations.create.response.json +7 -0
  71. package/generated/v1/examples/invitations.list.response.json +11 -0
  72. package/generated/v1/examples/invitations.resend.request.json +1 -0
  73. package/generated/v1/examples/invitations.resend.response.json +4 -0
  74. package/generated/v1/examples/invitations.revoke.request.json +3 -0
  75. package/generated/v1/examples/invitations.revoke.response.json +4 -0
  76. package/generated/v1/examples/limits.read.response.json +16 -0
  77. package/generated/v1/examples/members.list.response.json +13 -0
  78. package/generated/v1/examples/members.remove.request.json +3 -0
  79. package/generated/v1/examples/members.remove.response.json +4 -0
  80. package/generated/v1/examples/members.role.request.json +3 -0
  81. package/generated/v1/examples/members.role.response.json +4 -0
  82. package/generated/v1/examples/occurrences.redeliver.response.json +2 -0
  83. package/generated/v1/examples/projectmembers.add.request.json +1 -0
  84. package/generated/v1/examples/projectmembers.add.response.json +4 -0
  85. package/generated/v1/examples/projectmembers.remove.request.json +3 -0
  86. package/generated/v1/examples/projectmembers.remove.response.json +4 -0
  87. package/generated/v1/first-value-journey.json +24 -8
  88. package/generated/v1/manifest.json +627 -10
  89. package/generated/v1/openapi.json +29081 -15663
  90. package/generated/v1/policy-matrix.json +137 -2
  91. package/generated/v1/schemas/attempts.list.response.json +15 -0
  92. package/generated/v1/schemas/attempts.read.response.json +15 -0
  93. package/generated/v1/schemas/billing.fundingconfirm.response.json +552 -0
  94. package/generated/v1/schemas/billing.invoicehistory.query.json +16 -0
  95. package/generated/v1/schemas/billing.invoicehistory.response.json +88 -0
  96. package/generated/v1/schemas/billing.invoices.response.json +51 -0
  97. package/generated/v1/schemas/billing.ledger.response.json +5 -0
  98. package/generated/v1/schemas/billing.notificationsettingsupdate.request.json +24 -17
  99. package/generated/v1/schemas/billing.paymenthistory.query.json +16 -0
  100. package/generated/v1/schemas/billing.paymenthistory.response.json +182 -0
  101. package/generated/v1/schemas/billing.paymentmethod.response.json +137 -0
  102. package/generated/v1/schemas/billing.paymentmethodconfirm.request.json +14 -0
  103. package/generated/v1/schemas/billing.paymentmethodconfirm.response.json +137 -0
  104. package/generated/v1/schemas/billing.paymentmethodremove.request.json +12 -0
  105. package/generated/v1/schemas/billing.paymentmethodremove.response.json +137 -0
  106. package/generated/v1/schemas/billing.paymentmethodsetup.request.json +12 -0
  107. package/generated/v1/schemas/billing.paymentmethodsetup.response.json +11 -0
  108. package/generated/v1/schemas/billing.purchase.request.json +4 -0
  109. package/generated/v1/schemas/context.read.response.json +1 -0
  110. package/generated/v1/schemas/credentials.connection.response.json +1 -0
  111. package/generated/v1/schemas/credentials.create.request.json +1 -0
  112. package/generated/v1/schemas/credentials.create.response.json +1 -0
  113. package/generated/v1/schemas/credentials.list.response.json +1 -0
  114. package/generated/v1/schemas/credentials.revoke.response.json +1 -0
  115. package/generated/v1/schemas/credentials.rotate.response.json +2 -0
  116. package/generated/v1/schemas/endpoints.acknowledgeSigningKeyRotation.response.json +59 -0
  117. package/generated/v1/schemas/endpoints.create.request.json +74 -0
  118. package/generated/v1/schemas/endpoints.create.response.json +59 -0
  119. package/generated/v1/schemas/endpoints.disable.response.json +59 -0
  120. package/generated/v1/schemas/endpoints.enable.response.json +59 -0
  121. package/generated/v1/schemas/endpoints.ensure.request.json +91 -0
  122. package/generated/v1/schemas/endpoints.ensure.response.json +169 -0
  123. package/generated/v1/schemas/endpoints.list.response.json +59 -0
  124. package/generated/v1/schemas/endpoints.read.response.json +59 -0
  125. package/generated/v1/schemas/endpoints.rotateSigningKey.response.json +59 -0
  126. package/generated/v1/schemas/endpoints.update.request.json +74 -0
  127. package/generated/v1/schemas/endpoints.update.response.json +59 -0
  128. package/generated/v1/schemas/forecast.read.request-headers.json +10 -0
  129. package/generated/v1/schemas/forecast.read.response.json +148 -0
  130. package/generated/v1/schemas/grants.list.response.json +1 -0
  131. package/generated/v1/schemas/grants.revoke.response.json +1 -0
  132. package/generated/v1/schemas/invitations.create.request-headers.json +13 -0
  133. package/generated/v1/schemas/invitations.create.request.json +24 -0
  134. package/generated/v1/schemas/invitations.create.response.json +31 -0
  135. package/generated/v1/schemas/invitations.list.response.json +40 -0
  136. package/generated/v1/schemas/invitations.resend.request-headers.json +13 -0
  137. package/generated/v1/schemas/invitations.resend.request.json +6 -0
  138. package/generated/v1/schemas/invitations.resend.response.json +27 -0
  139. package/generated/v1/schemas/invitations.revoke.request-headers.json +13 -0
  140. package/generated/v1/schemas/invitations.revoke.request.json +12 -0
  141. package/generated/v1/schemas/invitations.revoke.response.json +27 -0
  142. package/generated/v1/schemas/limits.read.response.json +79 -0
  143. package/generated/v1/schemas/members.list.response.json +53 -0
  144. package/generated/v1/schemas/members.remove.request-headers.json +13 -0
  145. package/generated/v1/schemas/members.remove.request.json +12 -0
  146. package/generated/v1/schemas/members.remove.response.json +27 -0
  147. package/generated/v1/schemas/members.role.request-headers.json +13 -0
  148. package/generated/v1/schemas/members.role.request.json +12 -0
  149. package/generated/v1/schemas/members.role.response.json +27 -0
  150. package/generated/v1/schemas/occurrences.redeliver.response.json +15 -0
  151. package/generated/v1/schemas/projectmembers.add.request-headers.json +13 -0
  152. package/generated/v1/schemas/projectmembers.add.request.json +6 -0
  153. package/generated/v1/schemas/projectmembers.add.response.json +27 -0
  154. package/generated/v1/schemas/projectmembers.remove.request-headers.json +13 -0
  155. package/generated/v1/schemas/projectmembers.remove.request.json +12 -0
  156. package/generated/v1/schemas/projectmembers.remove.response.json +27 -0
  157. package/generated/v1/schemas/schedules.archive.response.json +138 -1
  158. package/generated/v1/schemas/schedules.cancel.response.json +138 -1
  159. package/generated/v1/schemas/schedules.create.request.json +150 -1
  160. package/generated/v1/schemas/schedules.create.response.json +156 -1
  161. package/generated/v1/schemas/schedules.list.response.json +138 -1
  162. package/generated/v1/schemas/schedules.pause.response.json +138 -1
  163. package/generated/v1/schemas/schedules.read.response.json +138 -1
  164. package/generated/v1/schemas/schedules.replace.request.json +150 -1
  165. package/generated/v1/schemas/schedules.replace.response.json +156 -1
  166. package/generated/v1/schemas/schedules.resume.response.json +138 -1
  167. package/generated/v1/snippets/billing.fundingconfirm.json +6 -0
  168. package/generated/v1/snippets/billing.invoicehistory.json +6 -0
  169. package/generated/v1/snippets/billing.invoices.json +6 -0
  170. package/generated/v1/snippets/billing.notificationsettingsupdate.json +1 -1
  171. package/generated/v1/snippets/billing.paymenthistory.json +6 -0
  172. package/generated/v1/snippets/billing.paymentmethod.json +6 -0
  173. package/generated/v1/snippets/billing.paymentmethodconfirm.json +6 -0
  174. package/generated/v1/snippets/billing.paymentmethodremove.json +6 -0
  175. package/generated/v1/snippets/billing.paymentmethodsetup.json +6 -0
  176. package/generated/v1/snippets/endpoints.create.json +1 -1
  177. package/generated/v1/snippets/endpoints.ensure.json +6 -0
  178. package/generated/v1/snippets/forecast.windows.json +1 -1
  179. package/generated/v1/snippets/invitations.create.json +6 -0
  180. package/generated/v1/snippets/invitations.list.json +6 -0
  181. package/generated/v1/snippets/invitations.resend.json +6 -0
  182. package/generated/v1/snippets/invitations.revoke.json +6 -0
  183. package/generated/v1/snippets/journey/create-destination.json +1 -1
  184. package/generated/v1/snippets/limits.read.json +6 -0
  185. package/generated/v1/snippets/members.list.json +6 -0
  186. package/generated/v1/snippets/members.remove.json +6 -0
  187. package/generated/v1/snippets/members.role.json +6 -0
  188. package/generated/v1/snippets/projectmembers.add.json +6 -0
  189. package/generated/v1/snippets/projectmembers.remove.json +6 -0
  190. package/package.json +7 -2
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @greatwait/contracts
2
2
 
3
- The public contracts for [Greatwait](https://greatwait.dev): the schemas every
3
+ The public contracts for [GreatWait](https://greatwait.dev): the schemas every
4
4
  response is parsed with, the stable refusal catalog, the operation registry, and
5
5
  the generated OpenAPI documents.
6
6
 
@@ -50,8 +50,9 @@ export type Authority = z.infer<typeof authoritySchema>;
50
50
  * client is permitted, and what the granting member's current role allows.
51
51
  * Nothing here can exceed a human's own access.
52
52
  */
53
- export declare const SCOPES: readonly ["credentials:administer", "billing:write", "credentials:read", "credentials:write", "endpoints:read", "endpoints:write", "forecast:read", "grants:read", "grants:write", "occurrences:read", "occurrences:redeliver", "projects:administer", "projects:read", "projects:write", "schedules:read", "schedules:write", "usage:read"];
53
+ export declare const SCOPES: readonly ["members:manage", "credentials:administer", "billing:write", "credentials:read", "credentials:write", "endpoints:read", "endpoints:write", "forecast:read", "grants:read", "grants:write", "occurrences:read", "occurrences:redeliver", "projects:administer", "projects:read", "projects:write", "schedules:read", "schedules:write", "usage:read"];
54
54
  export declare const scopeSchema: import("zod").ZodEnum<{
55
+ "members:manage": "members:manage";
55
56
  "credentials:administer": "credentials:administer";
56
57
  "billing:write": "billing:write";
57
58
  "credentials:read": "credentials:read";
@@ -114,6 +115,7 @@ export declare const principalSchema: import("zod").ZodObject<{
114
115
  project: import("zod").ZodString;
115
116
  }, import("zod/v4/core").$strip>;
116
117
  scopes: import("zod").ZodArray<import("zod").ZodEnum<{
118
+ "members:manage": "members:manage";
117
119
  "credentials:administer": "credentials:administer";
118
120
  "billing:write": "billing:write";
119
121
  "credentials:read": "credentials:read";
@@ -258,6 +260,7 @@ export declare const credentialContextSchema: import("zod").ZodObject<{
258
260
  }>;
259
261
  project: import("zod").ZodString;
260
262
  scopes: import("zod").ZodArray<import("zod").ZodEnum<{
263
+ "members:manage": "members:manage";
261
264
  "credentials:administer": "credentials:administer";
262
265
  "billing:write": "billing:write";
263
266
  "credentials:read": "credentials:read";
package/dist/authority.js CHANGED
@@ -43,6 +43,7 @@ export const authoritySchema = z.object({
43
43
  * Nothing here can exceed a human's own access.
44
44
  */
45
45
  export const SCOPES = [
46
+ "members:manage",
46
47
  /**
47
48
  * Act on a credential somebody else issued.
48
49
  *
package/dist/billing.d.ts CHANGED
@@ -13,6 +13,15 @@ export declare const nonnegativeMicrodollarAmountSchema: import("zod").ZodString
13
13
  export declare const BILLING_ACTIVATION_MODES: readonly ["disabled", "shadow", "enforced"];
14
14
  export declare const BILLING_BLOCK_REASONS: readonly ["billing-state-missing", "billing-account-closed", "project-ineligible", "insufficient-credit", "execution-cap-reached"];
15
15
  export declare const BILLING_ENTRY_KINDS: readonly ["credit_granted", "credit_reversed", "attempt_debited", "attempt_released", "shadow_attempt_debited", "shadow_attempt_released", "late_evidence_waived", "policy_installed", "budget_policy_updated", "budget_threshold_reached", "budget_exhausted", "budget_recovered", "automatic_charge_ceiling_updated", "payment_reserved", "payment_submitted", "payment_pending", "payment_paid", "payment_failed", "payment_canceled", "payment_authentication_required", "payment_action_required", "payment_refunded", "payment_disputed", "payment_reversed", "payment_dispute_restored", "refund_requested", "payment_refund_canceled", "automatic_top_up_cap_reached", "automatic_charge_threshold_reached", "automatic_charge_threshold_recovered", "low_credit_reached", "low_credit_recovered", "notification_settings_updated", "service_blocked", "service_restored"];
16
+ /**
17
+ * Why a ledger entry that looks like money moved none.
18
+ *
19
+ * `provider-details-attached`: the payment provider reported details of a
20
+ * payment the ledger already recorded — its charge, receipt, hosted page or
21
+ * tax. The entry repeats the payment's kind and shows a zero amount, so one
22
+ * purchase never reads as two.
23
+ */
24
+ export declare const BILLING_LEDGER_ENTRY_NOTES: readonly ["provider-details-attached"];
16
25
  export declare const BILLING_PAYMENT_KINDS: readonly ["manual", "automatic"];
17
26
  export declare const BILLING_PAYMENT_STATES: readonly ["pending", "paid", "failed", "authentication-required", "action-required", "canceled", "refunded", "reversed", "disputed"];
18
27
  declare const nonnegativeExactMoneySchema: import("zod").ZodObject<{
@@ -97,6 +106,7 @@ export declare const billingFundingQuoteSchema: import("zod").ZodObject<{
97
106
  taxStatus: import("zod").ZodLiteral<"calculated-at-checkout">;
98
107
  }, import("zod/v4/core").$strict>;
99
108
  export declare const billingPurchaseRequestSchema: import("zod").ZodObject<{
109
+ automaticTopUp: import("zod").ZodOptional<import("zod").ZodBoolean>;
100
110
  confirmed: import("zod").ZodLiteral<true>;
101
111
  expectedRevision: import("zod").ZodNumber;
102
112
  quote: import("zod").ZodString;
@@ -475,7 +485,12 @@ export interface BillingNotificationSettings {
475
485
  }
476
486
  export interface BillingNotificationSettingsUpdateRequest {
477
487
  readonly expectedRevision: number;
478
- readonly lowCreditThreshold: z.infer<typeof exactCentMoneySchema>;
488
+ /**
489
+ * A chosen threshold; `null` to warn at one fifth of the most recent credit
490
+ * purchase or grant again, which is the default; omitted to leave the
491
+ * threshold exactly as it is, chosen or not.
492
+ */
493
+ readonly lowCreditThreshold?: z.infer<typeof exactCentMoneySchema> | null | undefined;
479
494
  readonly noncriticalEmail: boolean;
480
495
  }
481
496
  export declare const billingNoticeRecoveryPathSchema: import("zod").ZodEnum<{
@@ -838,6 +853,9 @@ export declare const billingLedgerEntrySchema: import("zod").ZodObject<{
838
853
  service_blocked: "service_blocked";
839
854
  service_restored: "service_restored";
840
855
  }>;
856
+ note: import("zod").ZodOptional<import("zod").ZodEnum<{
857
+ "provider-details-attached": "provider-details-attached";
858
+ }>>;
841
859
  period: import("zod").ZodOptional<import("zod").ZodString>;
842
860
  recordedAt: import("zod").ZodString;
843
861
  reference: import("zod").ZodObject<{
@@ -898,6 +916,9 @@ export declare const billingLedgerPageSchema: import("zod").ZodObject<{
898
916
  service_blocked: "service_blocked";
899
917
  service_restored: "service_restored";
900
918
  }>;
919
+ note: import("zod").ZodOptional<import("zod").ZodEnum<{
920
+ "provider-details-attached": "provider-details-attached";
921
+ }>>;
901
922
  period: import("zod").ZodOptional<import("zod").ZodString>;
902
923
  recordedAt: import("zod").ZodString;
903
924
  reference: import("zod").ZodObject<{
@@ -994,8 +1015,217 @@ export declare const projectBillingStateSchema: import("zod").ZodObject<{
994
1015
  export declare const billingPortalSchema: import("zod").ZodObject<{
995
1016
  url: import("zod").ZodString;
996
1017
  }, import("zod/v4/core").$strip>;
1018
+ /**
1019
+ * The organization's saved payment method (W9-09, widened by W9-14): the one
1020
+ * method automatic top-ups and project subscriptions charge. It is the Stripe
1021
+ * customer's default payment method, read by authenticated provider call and
1022
+ * never stored by GreatWait beyond the provider's own identifier.
1023
+ *
1024
+ * `method` says what it is. A card keeps its brand and last four digits; Link
1025
+ * carries the email it is registered to when the provider reports one; any
1026
+ * other type the provider's checkout offered (Cash App Pay, Amazon Pay,
1027
+ * Klarna) carries the provider's type name. Every variant carries `label`,
1028
+ * the sentence-ready name the dashboard, command line and MCP all show, so no
1029
+ * client needs its own table of provider types. `method` is null when nothing
1030
+ * is saved.
1031
+ *
1032
+ * `card` is the pre-W9-14 field, kept so a client written against it keeps
1033
+ * working: it is set exactly when `method.type` is `card`, and null otherwise
1034
+ * — including when a non-card method is saved, which such a client reads as
1035
+ * "no card".
1036
+ */
1037
+ export declare const billingPaymentMethodSchema: import("zod").ZodObject<{
1038
+ card: import("zod").ZodNullable<import("zod").ZodObject<{
1039
+ brand: import("zod").ZodString;
1040
+ last4: import("zod").ZodString;
1041
+ expMonth: import("zod").ZodNumber;
1042
+ expYear: import("zod").ZodNumber;
1043
+ }, import("zod/v4/core").$strict>>;
1044
+ method: import("zod").ZodNullable<import("zod").ZodDiscriminatedUnion<[import("zod").ZodObject<{
1045
+ brand: import("zod").ZodString;
1046
+ last4: import("zod").ZodString;
1047
+ expMonth: import("zod").ZodNumber;
1048
+ expYear: import("zod").ZodNumber;
1049
+ type: import("zod").ZodLiteral<"card">;
1050
+ label: import("zod").ZodString;
1051
+ }, import("zod/v4/core").$strict>, import("zod").ZodObject<{
1052
+ type: import("zod").ZodLiteral<"link">;
1053
+ label: import("zod").ZodString;
1054
+ email: import("zod").ZodNullable<import("zod").ZodString>;
1055
+ }, import("zod/v4/core").$strict>, import("zod").ZodObject<{
1056
+ type: import("zod").ZodLiteral<"other">;
1057
+ label: import("zod").ZodString;
1058
+ providerType: import("zod").ZodString;
1059
+ }, import("zod/v4/core").$strict>], "type">>;
1060
+ }, import("zod/v4/core").$strict>;
1061
+ /**
1062
+ * Where hosted card setup returns. Optional: the configured dashboard billing
1063
+ * page is the default, and a supplied address must share its origin, so the
1064
+ * operation cannot be used to send a customer to a page GreatWait does not own.
1065
+ */
1066
+ export declare const billingPaymentMethodSetupRequestSchema: import("zod").ZodObject<{
1067
+ returnUrl: import("zod").ZodOptional<import("zod").ZodString>;
1068
+ }, import("zod/v4/core").$strict>;
1069
+ /** The hosted card-setup Checkout session a browser returned from. */
1070
+ export declare const billingPaymentMethodConfirmRequestSchema: import("zod").ZodObject<{
1071
+ checkoutSession: import("zod").ZodString;
1072
+ }, import("zod/v4/core").$strict>;
1073
+ /**
1074
+ * Removing the card on file (W9-09). The literal `true` is the caller's
1075
+ * acknowledgement of what removal does: project subscriptions stop renewing,
1076
+ * paid projects run to the end of the period already paid for and then stop,
1077
+ * and automatic top-up turns off.
1078
+ */
1079
+ export declare const billingPaymentMethodRemoveRequestSchema: import("zod").ZodObject<{
1080
+ confirmed: import("zod").ZodLiteral<true>;
1081
+ }, import("zod/v4/core").$strict>;
1082
+ /**
1083
+ * One project subscription charge (W9-09): a provider invoice for the
1084
+ * organization's project subscription, listed beside execution-credit
1085
+ * payments so a customer who was charged for a project sees the charge and its
1086
+ * receipt. `amount` is the invoice total, tax included. `receiptUrl` is the
1087
+ * provider-hosted invoice page when there is one.
1088
+ */
1089
+ export declare const billingInvoiceSchema: import("zod").ZodObject<{
1090
+ id: import("zod").ZodString;
1091
+ createdAt: import("zod").ZodString;
1092
+ amount: import("zod").ZodObject<{
1093
+ currency: import("zod").ZodLiteral<"USD">;
1094
+ microdollars: import("zod").ZodString;
1095
+ scale: import("zod").ZodLiteral<6>;
1096
+ }, import("zod/v4/core").$strip>;
1097
+ state: import("zod").ZodEnum<{
1098
+ void: "void";
1099
+ paid: "paid";
1100
+ open: "open";
1101
+ uncollectible: "uncollectible";
1102
+ }>;
1103
+ receiptUrl: import("zod").ZodOptional<import("zod").ZodString>;
1104
+ }, import("zod/v4/core").$strict>;
1105
+ /** Execution-credit payment history, with a bounded continuation. */
1106
+ export declare const billingPaymentHistoryPageSchema: import("zod").ZodObject<{
1107
+ data: import("zod").ZodArray<import("zod").ZodObject<{
1108
+ createdAt: import("zod").ZodString;
1109
+ credit: import("zod").ZodObject<{
1110
+ currency: import("zod").ZodLiteral<"USD">;
1111
+ microdollars: import("zod").ZodString;
1112
+ scale: import("zod").ZodLiteral<6>;
1113
+ }, import("zod/v4/core").$strip>;
1114
+ gross: import("zod").ZodNullable<import("zod").ZodObject<{
1115
+ currency: import("zod").ZodLiteral<"USD">;
1116
+ microdollars: import("zod").ZodString;
1117
+ scale: import("zod").ZodLiteral<6>;
1118
+ }, import("zod/v4/core").$strip>>;
1119
+ id: import("zod").ZodString;
1120
+ kind: import("zod").ZodEnum<{
1121
+ manual: "manual";
1122
+ automatic: "automatic";
1123
+ }>;
1124
+ paymentUrl: import("zod").ZodOptional<import("zod").ZodString>;
1125
+ reason: import("zod").ZodOptional<import("zod").ZodString>;
1126
+ receiptUrl: import("zod").ZodOptional<import("zod").ZodString>;
1127
+ state: import("zod").ZodEnum<{
1128
+ pending: "pending";
1129
+ paid: "paid";
1130
+ failed: "failed";
1131
+ "authentication-required": "authentication-required";
1132
+ "action-required": "action-required";
1133
+ canceled: "canceled";
1134
+ refunded: "refunded";
1135
+ reversed: "reversed";
1136
+ disputed: "disputed";
1137
+ }>;
1138
+ tax: import("zod").ZodNullable<import("zod").ZodObject<{
1139
+ currency: import("zod").ZodLiteral<"USD">;
1140
+ microdollars: import("zod").ZodString;
1141
+ scale: import("zod").ZodLiteral<6>;
1142
+ }, import("zod/v4/core").$strip>>;
1143
+ taxStatus: import("zod").ZodEnum<{
1144
+ confirmed: "confirmed";
1145
+ "calculated-at-checkout": "calculated-at-checkout";
1146
+ }>;
1147
+ updatedAt: import("zod").ZodString;
1148
+ }, import("zod/v4/core").$strict>>;
1149
+ freshness: import("zod").ZodDiscriminatedUnion<[import("zod").ZodObject<{
1150
+ kind: import("zod").ZodLiteral<"authoritative">;
1151
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
1152
+ asOf: import("zod").ZodString;
1153
+ kind: import("zod").ZodLiteral<"projected">;
1154
+ lagSeconds: import("zod").ZodNumber;
1155
+ }, import("zod/v4/core").$strip>], "kind">;
1156
+ nextCursor: import("zod").ZodOptional<import("zod").ZodString>;
1157
+ }, import("zod/v4/core").$strict>;
1158
+ export type BillingPaymentHistoryPage = z.infer<typeof billingPaymentHistoryPageSchema>;
1159
+ /** Project subscription history; an empty filtered page may still have a cursor. */
1160
+ export declare const billingInvoiceHistoryPageSchema: import("zod").ZodObject<{
1161
+ data: import("zod").ZodArray<import("zod").ZodObject<{
1162
+ id: import("zod").ZodString;
1163
+ createdAt: import("zod").ZodString;
1164
+ amount: import("zod").ZodObject<{
1165
+ currency: import("zod").ZodLiteral<"USD">;
1166
+ microdollars: import("zod").ZodString;
1167
+ scale: import("zod").ZodLiteral<6>;
1168
+ }, import("zod/v4/core").$strip>;
1169
+ state: import("zod").ZodEnum<{
1170
+ void: "void";
1171
+ paid: "paid";
1172
+ open: "open";
1173
+ uncollectible: "uncollectible";
1174
+ }>;
1175
+ receiptUrl: import("zod").ZodOptional<import("zod").ZodString>;
1176
+ }, import("zod/v4/core").$strict>>;
1177
+ freshness: import("zod").ZodDiscriminatedUnion<[import("zod").ZodObject<{
1178
+ kind: import("zod").ZodLiteral<"authoritative">;
1179
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
1180
+ asOf: import("zod").ZodString;
1181
+ kind: import("zod").ZodLiteral<"projected">;
1182
+ lagSeconds: import("zod").ZodNumber;
1183
+ }, import("zod/v4/core").$strip>], "kind">;
1184
+ nextCursor: import("zod").ZodOptional<import("zod").ZodString>;
1185
+ }, import("zod/v4/core").$strict>;
1186
+ export type BillingInvoiceHistoryPage = z.infer<typeof billingInvoiceHistoryPageSchema>;
1187
+ /** Project subscription charges, most recent first, at most 24. */
1188
+ export declare const billingInvoiceListSchema: import("zod").ZodObject<{
1189
+ data: import("zod").ZodArray<import("zod").ZodObject<{
1190
+ id: import("zod").ZodString;
1191
+ createdAt: import("zod").ZodString;
1192
+ amount: import("zod").ZodObject<{
1193
+ currency: import("zod").ZodLiteral<"USD">;
1194
+ microdollars: import("zod").ZodString;
1195
+ scale: import("zod").ZodLiteral<6>;
1196
+ }, import("zod/v4/core").$strip>;
1197
+ state: import("zod").ZodEnum<{
1198
+ void: "void";
1199
+ paid: "paid";
1200
+ open: "open";
1201
+ uncollectible: "uncollectible";
1202
+ }>;
1203
+ receiptUrl: import("zod").ZodOptional<import("zod").ZodString>;
1204
+ }, import("zod/v4/core").$strict>>;
1205
+ }, import("zod/v4/core").$strict>;
1206
+ /**
1207
+ * The stable title of the refusal a card-dependent change receives when the
1208
+ * organization has no card on file (W9-09): enabling or resuming automatic
1209
+ * top-up, and quoting or confirming a paid project addition.
1210
+ *
1211
+ * **Why a title and not a new problem code.** The published CLI and SDK parse
1212
+ * error bodies with this package's `problemSchema`, whose `code` is a closed
1213
+ * enum, so a code an installed client does not know turns a precise refusal into
1214
+ * "failed with status 409" with no problem at all. The refusal is therefore
1215
+ * `state_conflict` — which is what it is: the request is well formed and would
1216
+ * succeed once a card is saved — and this exact title is the discriminator.
1217
+ * Detect it as `code === "state_conflict" && title ===
1218
+ * BILLING_PAYMENT_METHOD_REQUIRED_TITLE`.
1219
+ */
1220
+ export declare const BILLING_PAYMENT_METHOD_REQUIRED_TITLE: "A card on file is required";
997
1221
  export type ProjectBillingQuoteRequest = z.infer<typeof projectBillingQuoteRequestSchema>;
998
1222
  export type ProjectBillingQuote = z.infer<typeof projectBillingQuoteSchema>;
999
1223
  export type ProjectBillingChangeRequest = z.infer<typeof projectBillingChangeRequestSchema>;
1000
1224
  export type ProjectBillingState = z.infer<typeof projectBillingStateSchema>;
1225
+ export type BillingPaymentMethod = z.infer<typeof billingPaymentMethodSchema>;
1226
+ export type BillingInvoice = z.infer<typeof billingInvoiceSchema>;
1227
+ export type BillingInvoiceList = z.infer<typeof billingInvoiceListSchema>;
1228
+ export type BillingPaymentMethodSetupRequest = z.infer<typeof billingPaymentMethodSetupRequestSchema>;
1229
+ export type BillingPaymentMethodConfirmRequest = z.infer<typeof billingPaymentMethodConfirmRequestSchema>;
1230
+ export type BillingPaymentMethodRemoveRequest = z.infer<typeof billingPaymentMethodRemoveRequestSchema>;
1001
1231
  export {};
package/dist/billing.js CHANGED
@@ -65,6 +65,17 @@ export const BILLING_ENTRY_KINDS = [
65
65
  "service_blocked",
66
66
  "service_restored",
67
67
  ];
68
+ /**
69
+ * Why a ledger entry that looks like money moved none.
70
+ *
71
+ * `provider-details-attached`: the payment provider reported details of a
72
+ * payment the ledger already recorded — its charge, receipt, hosted page or
73
+ * tax. The entry repeats the payment's kind and shows a zero amount, so one
74
+ * purchase never reads as two.
75
+ */
76
+ export const BILLING_LEDGER_ENTRY_NOTES = [
77
+ "provider-details-attached",
78
+ ];
68
79
  export const BILLING_PAYMENT_KINDS = ["manual", "automatic"];
69
80
  export const BILLING_PAYMENT_STATES = [
70
81
  "pending",
@@ -188,6 +199,12 @@ export const billingFundingQuoteSchema = z
188
199
  .strict();
189
200
  export const billingPurchaseRequestSchema = z
190
201
  .object({
202
+ automaticTopUp: z
203
+ .boolean()
204
+ .meta({
205
+ description: "true: the customer also asks to top up automatically when credit runs low. The hosted payment then saves the payment method for later off-session charges (it offers every method the account enables except Klarna, which cannot be charged that way), and once the provider confirms this payment paid, automatic top-up is enabled with the default rule (add USD 10.00 when available credit falls below USD 2.00, at most USD 50.00 of automatic charges a month) using that payment method. A rule that is already ready is left unchanged; an enabled rule waiting for a payment method keeps its own amounts and gains this one. Omitted or false: the purchase does exactly what it always did. An unpaid, expired or cancelled payment enables nothing.",
206
+ })
207
+ .optional(),
191
208
  confirmed: z.literal(true),
192
209
  expectedRevision: z.number().int().nonnegative(),
193
210
  quote: z.string().min(1).max(128),
@@ -476,7 +493,7 @@ export const billingNotificationSettingsSchema = z
476
493
  export const billingNotificationSettingsUpdateRequestSchema = z
477
494
  .object({
478
495
  expectedRevision: z.number().int().nonnegative(),
479
- lowCreditThreshold: positiveExactCentMoneySchema,
496
+ lowCreditThreshold: positiveExactCentMoneySchema.nullable().optional(),
480
497
  noncriticalEmail: z.boolean(),
481
498
  })
482
499
  .strict();
@@ -615,6 +632,12 @@ export const billingLedgerEntrySchema = z.object({
615
632
  scale: z.literal(BILLING_AMOUNT_SCALE),
616
633
  }),
617
634
  kind: z.enum(BILLING_ENTRY_KINDS),
635
+ note: z
636
+ .enum(BILLING_LEDGER_ENTRY_NOTES)
637
+ .meta({
638
+ description: "Present when an entry moved no money despite its kind. provider-details-attached: the provider reported details of a payment already recorded; the amount is zero.",
639
+ })
640
+ .optional(),
618
641
  period: timestampSchema.optional(),
619
642
  recordedAt: timestampSchema,
620
643
  reference: z.object({
@@ -682,3 +705,129 @@ export const projectBillingStateSchema = z.object({
682
705
  })),
683
706
  });
684
707
  export const billingPortalSchema = z.object({ url: z.string().url() });
708
+ const savedCardSchema = z
709
+ .object({
710
+ brand: z.string().min(1).max(32),
711
+ last4: z.string().regex(/^\d{4}$/u),
712
+ expMonth: z.number().int().min(1).max(12),
713
+ expYear: z.number().int().min(2000).max(2200),
714
+ })
715
+ .strict();
716
+ /** How a saved payment method is named to a person, on every surface alike. */
717
+ const paymentMethodLabelSchema = z.string().min(1).max(200);
718
+ /**
719
+ * The organization's saved payment method (W9-09, widened by W9-14): the one
720
+ * method automatic top-ups and project subscriptions charge. It is the Stripe
721
+ * customer's default payment method, read by authenticated provider call and
722
+ * never stored by GreatWait beyond the provider's own identifier.
723
+ *
724
+ * `method` says what it is. A card keeps its brand and last four digits; Link
725
+ * carries the email it is registered to when the provider reports one; any
726
+ * other type the provider's checkout offered (Cash App Pay, Amazon Pay,
727
+ * Klarna) carries the provider's type name. Every variant carries `label`,
728
+ * the sentence-ready name the dashboard, command line and MCP all show, so no
729
+ * client needs its own table of provider types. `method` is null when nothing
730
+ * is saved.
731
+ *
732
+ * `card` is the pre-W9-14 field, kept so a client written against it keeps
733
+ * working: it is set exactly when `method.type` is `card`, and null otherwise
734
+ * — including when a non-card method is saved, which such a client reads as
735
+ * "no card".
736
+ */
737
+ export const billingPaymentMethodSchema = z
738
+ .object({
739
+ card: savedCardSchema.nullable(),
740
+ method: z
741
+ .discriminatedUnion("type", [
742
+ savedCardSchema
743
+ .extend({
744
+ type: z.literal("card"),
745
+ label: paymentMethodLabelSchema,
746
+ })
747
+ .strict(),
748
+ z
749
+ .object({
750
+ type: z.literal("link"),
751
+ label: paymentMethodLabelSchema,
752
+ email: z.string().min(3).max(320).nullable(),
753
+ })
754
+ .strict(),
755
+ z
756
+ .object({
757
+ type: z.literal("other"),
758
+ label: paymentMethodLabelSchema,
759
+ providerType: z.string().regex(/^[a-z][a-z0-9_]{0,63}$/u),
760
+ })
761
+ .strict(),
762
+ ])
763
+ .nullable(),
764
+ })
765
+ .strict();
766
+ /**
767
+ * Where hosted card setup returns. Optional: the configured dashboard billing
768
+ * page is the default, and a supplied address must share its origin, so the
769
+ * operation cannot be used to send a customer to a page GreatWait does not own.
770
+ */
771
+ export const billingPaymentMethodSetupRequestSchema = z
772
+ .object({
773
+ returnUrl: z.string().url().max(2048).optional(),
774
+ })
775
+ .strict();
776
+ /** The hosted card-setup Checkout session a browser returned from. */
777
+ export const billingPaymentMethodConfirmRequestSchema = z
778
+ .object({
779
+ checkoutSession: z
780
+ .string()
781
+ .min(4)
782
+ .max(255)
783
+ .regex(/^cs_[A-Za-z0-9_]+$/u),
784
+ })
785
+ .strict();
786
+ /**
787
+ * Removing the card on file (W9-09). The literal `true` is the caller's
788
+ * acknowledgement of what removal does: project subscriptions stop renewing,
789
+ * paid projects run to the end of the period already paid for and then stop,
790
+ * and automatic top-up turns off.
791
+ */
792
+ export const billingPaymentMethodRemoveRequestSchema = z
793
+ .object({ confirmed: z.literal(true) })
794
+ .strict();
795
+ /**
796
+ * One project subscription charge (W9-09): a provider invoice for the
797
+ * organization's project subscription, listed beside execution-credit
798
+ * payments so a customer who was charged for a project sees the charge and its
799
+ * receipt. `amount` is the invoice total, tax included. `receiptUrl` is the
800
+ * provider-hosted invoice page when there is one.
801
+ */
802
+ export const billingInvoiceSchema = z
803
+ .object({
804
+ id: z.string().min(1).max(255),
805
+ createdAt: timestampSchema,
806
+ amount: nonnegativeExactMoneySchema,
807
+ state: z.enum(["paid", "open", "void", "uncollectible"]),
808
+ receiptUrl: z.string().url().optional(),
809
+ })
810
+ .strict();
811
+ /** Execution-credit payment history, with a bounded continuation. */
812
+ export const billingPaymentHistoryPageSchema = pageSchema(billingPaymentOperationSchema).strict();
813
+ /** Project subscription history; an empty filtered page may still have a cursor. */
814
+ export const billingInvoiceHistoryPageSchema = pageSchema(billingInvoiceSchema).strict();
815
+ /** Project subscription charges, most recent first, at most 24. */
816
+ export const billingInvoiceListSchema = z
817
+ .object({ data: z.array(billingInvoiceSchema) })
818
+ .strict();
819
+ /**
820
+ * The stable title of the refusal a card-dependent change receives when the
821
+ * organization has no card on file (W9-09): enabling or resuming automatic
822
+ * top-up, and quoting or confirming a paid project addition.
823
+ *
824
+ * **Why a title and not a new problem code.** The published CLI and SDK parse
825
+ * error bodies with this package's `problemSchema`, whose `code` is a closed
826
+ * enum, so a code an installed client does not know turns a precise refusal into
827
+ * "failed with status 409" with no problem at all. The refusal is therefore
828
+ * `state_conflict` — which is what it is: the request is well formed and would
829
+ * succeed once a card is saved — and this exact title is the discriminator.
830
+ * Detect it as `code === "state_conflict" && title ===
831
+ * BILLING_PAYMENT_METHOD_REQUIRED_TITLE`.
832
+ */
833
+ export const BILLING_PAYMENT_METHOD_REQUIRED_TITLE = "A card on file is required";
@@ -136,10 +136,20 @@ const FORBIDDEN_NAME_SUFFIXES = [
136
136
  * surface this rule exists to deny. The old form stays because the old names
137
137
  * keep resolving until their custom domains are detached, and because a DNS
138
138
  * record somebody forgets is precisely what this should still refuse.
139
+ *
140
+ * **`docs` joined the vocabulary at FXO-2441**, with `docs.greatwait.dev`. It
141
+ * is a static site with no Worker script behind it, which is an argument for
142
+ * why aiming a callback there is harmless *today* and no argument at all for
143
+ * allowing it: the rule is about names this product answers on as itself, and
144
+ * `scripts/deployables.test.ts` asserts it over the deployment model rather
145
+ * than over this list, so a hostname added there and not here fails. *
146
+ * **The apex joined it at W9-05**, when the marketing site started serving
147
+ * `greatwait.dev` itself rather than only forwarding it. It is an address this
148
+ * product answers on as itself, so it is refused on the same argument.
139
149
  */
140
- const GREATWAIT_RUNTIME_NAME = /^(?:greatwait-(?:api|app|scheduler|contract-mock|postgres-runtime)(?:-[a-z0-9-]+)?\.flowxo\.com|(?:api|app|scheduler|contract-mock|postgres-runtime)(?:-[a-z0-9-]+)?\.greatwait\.dev)$/u;
141
- const GREATWAIT_PROVIDER_NAME = /^greatwait-(?:api|app|scheduler|contract-mock|postgres-runtime)(?:-[a-z0-9-]+)?(?:\..+)?\.(?:workers|pages)\.dev$/u;
142
- const GREATWAIT_WORKER_NAME = /^greatwait-(?:api|app|scheduler|contract-mock|postgres-runtime)(?:-[a-z0-9-]+)?$/u;
150
+ const GREATWAIT_RUNTIME_NAME = /^(?:greatwait-(?:api|app|docs|scheduler|contract-mock|postgres-runtime)(?:-[a-z0-9-]+)?\.flowxo\.com|(?:api|app|docs|scheduler|contract-mock|postgres-runtime)(?:-[a-z0-9-]+)?\.greatwait\.dev|greatwait\.dev)$/u;
151
+ const GREATWAIT_PROVIDER_NAME = /^greatwait-(?:api|app|docs|marketing|scheduler|contract-mock|postgres-runtime)(?:-[a-z0-9-]+)?(?:\..+)?\.(?:workers|pages)\.dev$/u;
152
+ const GREATWAIT_WORKER_NAME = /^greatwait-(?:api|app|docs|marketing|scheduler|contract-mock|postgres-runtime)(?:-[a-z0-9-]+)?$/u;
143
153
  /** Evaluate the URL-only half of the callback destination policy. */
144
154
  export function evaluateCallbackUrl(value) {
145
155
  if (value.trim() !== value) {
@@ -0,0 +1,13 @@
1
+ /** Scalar owners shared by contracts and small runtime bundles. */
2
+ export declare const FIXED_INTERVAL_MIN_SECONDS = 60;
3
+ export declare const FIXED_INTERVAL_MAX_SECONDS: number;
4
+ export declare const MAX_INLINE_PAYLOAD_BYTES = 65536;
5
+ export declare const MAX_FORECAST_HORIZON_SECONDS: number;
6
+ export declare const MAX_HOST_CONNECTIONS = 100000;
7
+ export declare const MAX_USAGE_WINDOW_DAYS = 366;
8
+ export declare const MAX_PARTITION_KEY_CEILING = 10000;
9
+ export declare const PUBLIC_PAGE_SIZE: Readonly<{
10
+ default: 25;
11
+ max: 100;
12
+ min: 1;
13
+ }>;
@@ -0,0 +1,13 @@
1
+ /** Scalar owners shared by contracts and small runtime bundles. */
2
+ export const FIXED_INTERVAL_MIN_SECONDS = 60;
3
+ export const FIXED_INTERVAL_MAX_SECONDS = 365 * 24 * 60 * 60;
4
+ export const MAX_INLINE_PAYLOAD_BYTES = 65_536;
5
+ export const MAX_FORECAST_HORIZON_SECONDS = 25 * 60 * 60;
6
+ export const MAX_HOST_CONNECTIONS = 100_000;
7
+ export const MAX_USAGE_WINDOW_DAYS = 366;
8
+ export const MAX_PARTITION_KEY_CEILING = 10_000;
9
+ export const PUBLIC_PAGE_SIZE = Object.freeze({
10
+ default: 25,
11
+ max: 100,
12
+ min: 1,
13
+ });
@@ -58,6 +58,8 @@ export type DataExportPart = z.infer<typeof dataExportPartSchema>;
58
58
  /** Additive operation declarations, merged into the canonical registry by the API wiring. */
59
59
  export declare const DATA_EXPORT_OPERATIONS: readonly [import("./operations.js").OperationDefinition & {
60
60
  readonly id: "exports.create";
61
+ } & {
62
+ readonly request: import("zod").ZodObject<{}, import("zod/v4/core").$strict>;
61
63
  }, import("./operations.js").OperationDefinition & {
62
64
  readonly id: "exports.read";
63
65
  }, import("./operations.js").OperationDefinition & {
@@ -21,6 +21,31 @@ export interface EncryptedSchedulePayload {
21
21
  readonly keyId: string;
22
22
  readonly nonce: string;
23
23
  }
24
+ /** Encrypted custom HTTP settings, internal only; never a public read shape. */
25
+ export type StoredHttpHeader = {
26
+ readonly name: string;
27
+ readonly secret: false;
28
+ readonly value: string;
29
+ readonly valueBytes: number;
30
+ } | {
31
+ readonly name: string;
32
+ readonly secret: true;
33
+ readonly envelope: EncryptedSchedulePayload;
34
+ readonly valueBytes: number;
35
+ readonly ownerKind: "endpoint" | "schedule";
36
+ readonly ownerId: string;
37
+ } | {
38
+ readonly name: string;
39
+ readonly suppressed: true;
40
+ };
41
+ export interface StoredHttpRequest {
42
+ readonly method: "POST" | "PUT" | "GET";
43
+ readonly bodyMode: "envelope" | "json" | "none";
44
+ readonly headers: readonly StoredHttpHeader[];
45
+ readonly encryptedTemplate?: EncryptedSchedulePayload;
46
+ }
47
+ export declare const HTTP_HEADER_AAD_VERSION: "greatwait.http-header.v1";
48
+ export declare const HTTP_TEMPLATE_AAD_VERSION: "greatwait.http-template.v1";
24
49
  /**
25
50
  * One immutable delivery attempt, minted by the Scheduler Partition from its
26
51
  * verified authority. No member of this tuple comes from callback request
@@ -46,6 +71,7 @@ export interface CallbackAttemptDispatch {
46
71
  /** Monotonic partition fence for duplicate/late dispatch and report RPCs. */
47
72
  readonly dispatchEpoch: number;
48
73
  readonly encryptedPayloadEnvelope: EncryptedSchedulePayload;
74
+ readonly http?: StoredHttpRequest;
49
75
  readonly endpointId: EndpointId;
50
76
  readonly latencyClass: "realtime" | "bulk";
51
77
  /**
package/dist/delivery.js CHANGED
@@ -7,6 +7,8 @@
7
7
  * decryption oracle.
8
8
  */
9
9
  export const SCHEDULE_PAYLOAD_AAD_VERSION = "greatwait.schedule-payload.v1";
10
+ export const HTTP_HEADER_AAD_VERSION = "greatwait.http-header.v1";
11
+ export const HTTP_TEMPLATE_AAD_VERSION = "greatwait.http-template.v1";
10
12
  /**
11
13
  * What a receiver says about work it acknowledged and then finished.
12
14
  *
@@ -0,0 +1,40 @@
1
+ import { z } from "./zod.js";
2
+ export declare const effectiveCustomerLimitsSchema: import("zod").ZodObject<{
3
+ limits: import("zod").ZodObject<{
4
+ inlinePayloadBytes: import("zod").ZodNumber;
5
+ partitionKeyCeiling: import("zod").ZodOptional<import("zod").ZodNumber>;
6
+ forecastHorizonSeconds: import("zod").ZodNumber;
7
+ usageWindowDays: import("zod").ZodNumber;
8
+ }, import("zod/v4/core").$strict>;
9
+ provenance: import("zod").ZodObject<{
10
+ inlinePayloadBytes: import("zod").ZodEnum<{
11
+ organization: "organization";
12
+ default: "default";
13
+ global: "global";
14
+ deployment: "deployment";
15
+ }>;
16
+ partitionKeyCeiling: import("zod").ZodOptional<import("zod").ZodEnum<{
17
+ organization: "organization";
18
+ default: "default";
19
+ global: "global";
20
+ deployment: "deployment";
21
+ }>>;
22
+ forecastHorizonSeconds: import("zod").ZodEnum<{
23
+ organization: "organization";
24
+ default: "default";
25
+ global: "global";
26
+ deployment: "deployment";
27
+ }>;
28
+ usageWindowDays: import("zod").ZodEnum<{
29
+ organization: "organization";
30
+ default: "default";
31
+ global: "global";
32
+ deployment: "deployment";
33
+ }>;
34
+ }, import("zod/v4/core").$strict>;
35
+ revision: import("zod").ZodObject<{
36
+ global: import("zod").ZodNumber;
37
+ organization: import("zod").ZodNumber;
38
+ }, import("zod/v4/core").$strict>;
39
+ }, import("zod/v4/core").$strict>;
40
+ export type EffectiveCustomerLimits = z.infer<typeof effectiveCustomerLimitsSchema>;