@greatwait/contracts 0.1.0-alpha.3 → 0.1.0-alpha.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +12 -10
- package/dist/authority.d.ts +33 -27
- package/dist/authority.js +12 -2
- package/dist/billing.d.ts +1231 -0
- package/dist/billing.js +833 -0
- package/dist/callback-safety.d.ts +2 -2
- package/dist/callback-safety.js +15 -5
- package/dist/compatibility.d.ts +3 -3
- package/dist/compatibility.js +1 -1
- package/dist/configuration-bounds.d.ts +13 -0
- package/dist/configuration-bounds.js +13 -0
- package/dist/data-export.d.ts +67 -0
- package/dist/data-export.js +182 -0
- package/dist/effective-limits.d.ts +40 -0
- package/dist/effective-limits.js +42 -0
- package/dist/endpoints.d.ts +186 -245
- package/dist/endpoints.js +82 -86
- package/dist/events.d.ts +17 -17
- package/dist/events.js +1 -1
- package/dist/first-value-journey.d.ts +50 -56
- package/dist/first-value-journey.js +17 -20
- package/dist/forecast.d.ts +182 -92
- package/dist/forecast.js +88 -25
- package/dist/identifiers.d.ts +20 -20
- package/dist/identifiers.js +1 -1
- package/dist/identity.d.ts +41 -37
- package/dist/identity.js +5 -4
- package/dist/index.d.ts +12 -6
- package/dist/index.js +12 -6
- package/dist/mcp.d.ts +21 -19
- package/dist/mcp.js +2 -2
- package/dist/naming.d.ts +45 -0
- package/dist/naming.js +159 -0
- package/dist/oauth.d.ts +186 -172
- package/dist/oauth.js +1 -1
- package/dist/operation-definitions.d.ts +9 -0
- package/dist/operation-definitions.js +7 -0
- package/dist/operational-config.d.ts +101 -0
- package/dist/operational-config.js +341 -0
- package/dist/operations.d.ts +4742 -2170
- package/dist/operations.js +3064 -932
- package/dist/organization-lifecycle.d.ts +34 -0
- package/dist/organization-lifecycle.js +122 -0
- package/dist/partition.d.ts +43 -9
- package/dist/partition.js +3 -3
- package/dist/policy.d.ts +4 -4
- package/dist/policy.js +9 -5
- package/dist/problems.d.ts +57 -28
- package/dist/problems.js +55 -3
- package/dist/protocol.d.ts +209 -80
- package/dist/protocol.js +110 -37
- package/dist/scheduling-records.d.ts +349 -285
- package/dist/scheduling-records.js +1 -1
- package/dist/scheduling.d.ts +707 -361
- package/dist/scheduling.js +443 -61
- package/dist/secrets.d.ts +119 -105
- package/dist/secrets.js +1 -1
- package/dist/signatures.d.ts +74 -74
- package/dist/signatures.js +1 -1
- package/dist/tenancy.d.ts +142 -68
- package/dist/tenancy.js +70 -17
- package/dist/test-sink.d.ts +127 -127
- package/dist/test-sink.js +1 -1
- package/dist/time.d.ts +4 -4
- package/dist/time.js +1 -1
- package/dist/timing.d.ts +65 -0
- package/dist/timing.js +82 -0
- package/dist/usage.d.ts +103 -47
- package/dist/usage.js +183 -32
- package/dist/workspace.d.ts +34 -34
- package/dist/workspace.js +1 -1
- package/dist/zod-values.d.ts +3 -0
- package/dist/zod-values.js +2 -0
- package/dist/zod.d.ts +2 -0
- package/dist/zod.js +2 -0
- package/generated/v1/examples/attempts.list.response.json +6 -0
- package/generated/v1/examples/attempts.read.response.json +6 -0
- package/generated/v1/examples/billing.autotopup.request.json +5 -0
- package/generated/v1/examples/billing.autotopup.response.json +120 -0
- package/generated/v1/examples/billing.autotopuppreview.request.json +19 -0
- package/generated/v1/examples/billing.autotopuppreview.response.json +45 -0
- package/generated/v1/examples/billing.budgets.request.json +13 -0
- package/generated/v1/examples/billing.budgets.response.json +22 -0
- package/generated/v1/examples/billing.ceiling.request.json +8 -0
- package/generated/v1/examples/billing.ceiling.response.json +120 -0
- package/generated/v1/examples/billing.change.request.json +5 -0
- package/generated/v1/examples/billing.change.response.json +12 -0
- package/generated/v1/examples/billing.funding.response.json +120 -0
- package/generated/v1/examples/billing.fundingconfirm.response.json +120 -0
- package/generated/v1/examples/billing.fundingquote.request.json +7 -0
- package/generated/v1/examples/billing.fundingquote.response.json +13 -0
- package/generated/v1/examples/billing.invoicehistory.response.json +6 -0
- package/generated/v1/examples/billing.invoices.response.json +15 -0
- package/generated/v1/examples/billing.ledger.response.json +23 -0
- package/generated/v1/examples/billing.notices.response.json +41 -0
- package/generated/v1/examples/billing.notificationsettings.response.json +17 -0
- package/generated/v1/examples/billing.notificationsettingsupdate.request.json +9 -0
- package/generated/v1/examples/billing.notificationsettingsupdate.response.json +17 -0
- package/generated/v1/examples/billing.paymenthistory.response.json +6 -0
- package/generated/v1/examples/billing.paymentmethod.response.json +16 -0
- package/generated/v1/examples/billing.paymentmethodconfirm.request.json +3 -0
- package/generated/v1/examples/billing.paymentmethodconfirm.response.json +16 -0
- package/generated/v1/examples/billing.paymentmethodremove.request.json +3 -0
- package/generated/v1/examples/billing.paymentmethodremove.response.json +4 -0
- package/generated/v1/examples/billing.paymentmethodsetup.request.json +1 -0
- package/generated/v1/examples/billing.paymentmethodsetup.response.json +3 -0
- package/generated/v1/examples/billing.portal.response.json +3 -0
- package/generated/v1/examples/billing.projects.response.json +12 -0
- package/generated/v1/examples/billing.purchase.request.json +5 -0
- package/generated/v1/examples/billing.purchase.response.json +120 -0
- package/generated/v1/examples/billing.quote.request.json +4 -0
- package/generated/v1/examples/billing.quote.response.json +19 -0
- package/generated/v1/examples/billing.reconcile.response.json +73 -0
- package/generated/v1/examples/billing.refundrequest.request.json +10 -0
- package/generated/v1/examples/billing.refundrequest.response.json +11 -0
- package/generated/v1/examples/billing.refundresolution.request.json +4 -0
- package/generated/v1/examples/billing.refundresolution.response.json +120 -0
- package/generated/v1/examples/billing.summary.response.json +73 -0
- package/generated/v1/examples/endpoints.acknowledgeSigningKeyRotation.response.json +18 -0
- package/generated/v1/examples/endpoints.create.response.json +1 -1
- package/generated/v1/examples/endpoints.disable.response.json +0 -1
- package/generated/v1/examples/{endpoints.verify.response.json → endpoints.enable.response.json} +4 -5
- package/generated/v1/examples/endpoints.list.response.json +1 -2
- package/generated/v1/examples/endpoints.read.response.json +2 -2
- package/generated/v1/examples/endpoints.revealSigningSecret.response.json +7 -0
- package/generated/v1/examples/endpoints.rotateSigningKey.response.json +1 -2
- package/generated/v1/examples/endpoints.update.response.json +1 -1
- package/generated/v1/examples/executions.list.response.json +20 -0
- package/generated/v1/examples/exports.cancel.response.json +11 -0
- package/generated/v1/examples/exports.create.request.json +1 -0
- package/generated/v1/examples/exports.create.response.json +8 -0
- package/generated/v1/examples/exports.part.response.json +5 -0
- package/generated/v1/examples/exports.read.response.json +8 -0
- package/generated/v1/examples/limits.read.response.json +16 -0
- package/generated/v1/examples/occurrences.read.response.json +4 -0
- package/generated/v1/examples/occurrences.redeliver.response.json +2 -0
- package/generated/v1/examples/organizations.close.request.json +5 -0
- package/generated/v1/examples/organizations.close.response.json +10 -0
- package/generated/v1/examples/organizations.lifecycle.response.json +10 -0
- package/generated/v1/examples/organizations.restore.request.json +3 -0
- package/generated/v1/examples/organizations.restore.response.json +10 -0
- package/generated/v1/examples/projects.archive.request.json +3 -0
- package/generated/v1/examples/projects.archive.response.json +14 -0
- package/generated/v1/examples/projects.create.response.json +10 -1
- package/generated/v1/examples/projects.delete.response.json +9 -0
- package/generated/v1/examples/projects.list.response.json +12 -2
- package/generated/v1/examples/projects.rename.request.json +3 -0
- package/generated/v1/examples/projects.rename.response.json +14 -0
- package/generated/v1/examples/schedules.archive.response.json +3 -0
- package/generated/v1/examples/schedules.cancel.response.json +3 -0
- package/generated/v1/examples/schedules.create.request.json +4 -0
- package/generated/v1/examples/schedules.create.response.json +3 -0
- package/generated/v1/examples/schedules.list.response.json +3 -0
- package/generated/v1/examples/schedules.pause.response.json +3 -0
- package/generated/v1/examples/schedules.read.response.json +6 -0
- package/generated/v1/examples/schedules.replace.request.json +4 -0
- package/generated/v1/examples/schedules.replace.response.json +3 -0
- package/generated/v1/examples/schedules.resume.response.json +3 -0
- package/generated/v1/examples/timing.summary.response.json +35 -0
- package/generated/v1/examples/usage.read.response.json +1 -0
- package/generated/v1/first-value-journey.json +43 -18
- package/generated/v1/manifest.json +1287 -42
- package/generated/v1/openapi.json +36033 -5982
- package/generated/v1/policy-matrix.json +341 -47
- package/generated/v1/schemas/attempts.list.response.json +39 -1
- package/generated/v1/schemas/attempts.read.response.json +39 -1
- package/generated/v1/schemas/billing.autotopup.request-headers.json +13 -0
- package/generated/v1/schemas/billing.autotopup.request.json +22 -0
- package/generated/v1/schemas/billing.autotopup.response-headers.json +10 -0
- package/generated/v1/schemas/billing.autotopup.response.json +552 -0
- package/generated/v1/schemas/billing.autotopuppreview.request.json +77 -0
- package/generated/v1/schemas/billing.autotopuppreview.response.json +277 -0
- package/generated/v1/schemas/billing.budgets.request-headers.json +13 -0
- package/generated/v1/schemas/billing.budgets.request.json +66 -0
- package/generated/v1/schemas/billing.budgets.response-headers.json +10 -0
- package/generated/v1/schemas/billing.budgets.response.json +92 -0
- package/generated/v1/schemas/billing.ceiling.request-headers.json +13 -0
- package/generated/v1/schemas/billing.ceiling.request.json +40 -0
- package/generated/v1/schemas/billing.ceiling.response-headers.json +10 -0
- package/generated/v1/schemas/billing.ceiling.response.json +552 -0
- package/generated/v1/schemas/billing.change.request-headers.json +13 -0
- package/generated/v1/schemas/billing.change.request.json +22 -0
- package/generated/v1/schemas/billing.change.response.json +119 -0
- package/generated/v1/schemas/billing.funding.response.json +552 -0
- package/generated/v1/schemas/billing.fundingconfirm.response.json +552 -0
- package/generated/v1/schemas/billing.fundingquote.request.json +28 -0
- package/generated/v1/schemas/billing.fundingquote.response.json +61 -0
- package/generated/v1/schemas/billing.invoicehistory.query.json +16 -0
- package/generated/v1/schemas/billing.invoicehistory.response.json +88 -0
- package/generated/v1/schemas/billing.invoices.response.json +51 -0
- package/generated/v1/schemas/billing.ledger.query.json +16 -0
- package/generated/v1/schemas/billing.ledger.response.json +130 -0
- package/generated/v1/schemas/billing.notices.query.json +16 -0
- package/generated/v1/schemas/billing.notices.response.json +278 -0
- package/generated/v1/schemas/billing.notificationsettings.response.json +70 -0
- package/generated/v1/schemas/billing.notificationsettingsupdate.request-headers.json +13 -0
- package/generated/v1/schemas/billing.notificationsettingsupdate.request.json +43 -0
- package/generated/v1/schemas/billing.notificationsettingsupdate.response-headers.json +10 -0
- package/generated/v1/schemas/billing.notificationsettingsupdate.response.json +70 -0
- package/generated/v1/schemas/billing.paymenthistory.query.json +16 -0
- package/generated/v1/schemas/billing.paymenthistory.response.json +182 -0
- package/generated/v1/schemas/billing.paymentmethod.response.json +137 -0
- package/generated/v1/schemas/billing.paymentmethodconfirm.request.json +14 -0
- package/generated/v1/schemas/billing.paymentmethodconfirm.response.json +137 -0
- package/generated/v1/schemas/billing.paymentmethodremove.request.json +12 -0
- package/generated/v1/schemas/billing.paymentmethodremove.response.json +137 -0
- package/generated/v1/schemas/billing.paymentmethodsetup.request.json +12 -0
- package/generated/v1/schemas/billing.paymentmethodsetup.response.json +11 -0
- package/generated/v1/schemas/billing.portal.response.json +11 -0
- package/generated/v1/schemas/billing.projects.response.json +119 -0
- package/generated/v1/schemas/billing.purchase.request-headers.json +13 -0
- package/generated/v1/schemas/billing.purchase.request.json +26 -0
- package/generated/v1/schemas/billing.purchase.response-headers.json +10 -0
- package/generated/v1/schemas/billing.purchase.response.json +552 -0
- package/generated/v1/schemas/billing.quote.request.json +20 -0
- package/generated/v1/schemas/billing.quote.response.json +86 -0
- package/generated/v1/schemas/billing.reconcile.response.json +468 -0
- package/generated/v1/schemas/billing.refundrequest.request-headers.json +13 -0
- package/generated/v1/schemas/billing.refundrequest.request.json +42 -0
- package/generated/v1/schemas/billing.refundrequest.response-headers.json +10 -0
- package/generated/v1/schemas/billing.refundrequest.response.json +45 -0
- package/generated/v1/schemas/billing.refundresolution.request-headers.json +13 -0
- package/generated/v1/schemas/billing.refundresolution.request.json +61 -0
- package/generated/v1/schemas/billing.refundresolution.response-headers.json +10 -0
- package/generated/v1/schemas/billing.refundresolution.response.json +552 -0
- package/generated/v1/schemas/billing.summary.response.json +468 -0
- package/generated/v1/schemas/context.read.response.json +2 -0
- package/generated/v1/schemas/credentials.connection.response.json +2 -0
- package/generated/v1/schemas/credentials.create.request.json +2 -0
- package/generated/v1/schemas/credentials.create.response.json +2 -0
- package/generated/v1/schemas/credentials.list.response.json +2 -0
- package/generated/v1/schemas/credentials.revoke.response.json +2 -0
- package/generated/v1/schemas/credentials.rotate.response.json +4 -0
- package/generated/v1/schemas/{endpoints.verify.request-headers.json → endpoints.acknowledgeSigningKeyRotation.request-headers.json} +2 -1
- package/generated/v1/schemas/{endpoints.verify.response.json → endpoints.acknowledgeSigningKeyRotation.response.json} +8 -21
- package/generated/v1/schemas/endpoints.create.request.json +5 -0
- package/generated/v1/schemas/endpoints.create.response.json +8 -21
- package/generated/v1/schemas/endpoints.disable.response.json +8 -21
- package/generated/v1/schemas/endpoints.enable.response-headers.json +11 -0
- package/generated/v1/schemas/endpoints.enable.response.json +87 -0
- package/generated/v1/schemas/endpoints.list.response.json +8 -21
- package/generated/v1/schemas/endpoints.read.response.json +8 -21
- package/generated/v1/schemas/endpoints.revealSigningSecret.response.json +43 -0
- package/generated/v1/schemas/endpoints.rotateSigningKey.response.json +8 -21
- package/generated/v1/schemas/endpoints.update.request.json +5 -0
- package/generated/v1/schemas/endpoints.update.response.json +8 -21
- package/generated/v1/schemas/executions.list.query.json +46 -0
- package/generated/v1/schemas/executions.list.response.json +116 -0
- package/generated/v1/schemas/exports.cancel.response.json +48 -0
- package/generated/v1/schemas/exports.create.request.json +6 -0
- package/generated/v1/schemas/exports.create.response.json +38 -0
- package/generated/v1/schemas/exports.part.query.json +11 -0
- package/generated/v1/schemas/exports.part.response.json +22 -0
- package/generated/v1/schemas/exports.read.response.json +38 -0
- package/generated/v1/schemas/forecast.read.request-headers.json +10 -0
- package/generated/v1/schemas/forecast.read.response.json +148 -0
- package/generated/v1/schemas/grants.list.response.json +2 -0
- package/generated/v1/schemas/grants.revoke.response.json +2 -0
- package/generated/v1/schemas/limits.read.response.json +79 -0
- package/generated/v1/schemas/occurrences.list.query.json +5 -0
- package/generated/v1/schemas/occurrences.list.response.json +23 -0
- package/generated/v1/schemas/occurrences.read.response.json +23 -0
- package/generated/v1/schemas/occurrences.redeliver.response.json +39 -1
- package/generated/v1/schemas/organizations.close.request.json +20 -0
- package/generated/v1/schemas/organizations.close.response.json +68 -0
- package/generated/v1/schemas/organizations.lifecycle.response.json +68 -0
- package/generated/v1/schemas/organizations.restore.request.json +13 -0
- package/generated/v1/schemas/organizations.restore.response.json +68 -0
- package/generated/v1/schemas/projects.archive.request-headers.json +11 -0
- package/generated/v1/schemas/projects.archive.request.json +10 -0
- package/generated/v1/schemas/projects.archive.response-headers.json +11 -0
- package/generated/v1/schemas/projects.archive.response.json +79 -0
- package/generated/v1/schemas/projects.create.response.json +55 -1
- package/generated/v1/schemas/projects.delete.request-headers.json +11 -0
- package/generated/v1/schemas/projects.delete.response.json +37 -0
- package/generated/v1/schemas/projects.list.response.json +61 -2
- package/generated/v1/schemas/projects.rename.request-headers.json +11 -0
- package/generated/v1/schemas/projects.rename.request.json +12 -0
- package/generated/v1/schemas/projects.rename.response-headers.json +11 -0
- package/generated/v1/schemas/projects.rename.response.json +79 -0
- package/generated/v1/schemas/schedules.archive.response.json +90 -2
- package/generated/v1/schemas/schedules.cancel.response.json +90 -2
- package/generated/v1/schemas/schedules.create.request.json +24 -3
- package/generated/v1/schemas/schedules.create.response.json +90 -2
- package/generated/v1/schemas/schedules.list.query.json +13 -0
- package/generated/v1/schemas/schedules.list.response.json +67 -2
- package/generated/v1/schemas/schedules.pause.response.json +90 -2
- package/generated/v1/schemas/schedules.read.response.json +90 -2
- package/generated/v1/schemas/schedules.replace.request.json +24 -3
- package/generated/v1/schemas/schedules.replace.response.json +90 -2
- package/generated/v1/schemas/schedules.resume.response.json +90 -2
- package/generated/v1/schemas/timing.summary.response.json +191 -0
- package/generated/v1/schemas/usage.read.query.json +7 -0
- package/generated/v1/schemas/usage.read.response.json +36 -1
- package/generated/v1/snippets/billing.autotopup.json +6 -0
- package/generated/v1/snippets/billing.autotopuppreview.json +6 -0
- package/generated/v1/snippets/billing.budgets.json +6 -0
- package/generated/v1/snippets/billing.ceiling.json +6 -0
- package/generated/v1/snippets/billing.change.json +6 -0
- package/generated/v1/snippets/billing.funding.json +6 -0
- package/generated/v1/snippets/billing.fundingconfirm.json +6 -0
- package/generated/v1/snippets/billing.fundingquote.json +6 -0
- package/generated/v1/snippets/billing.invoicehistory.json +6 -0
- package/generated/v1/snippets/billing.invoices.json +6 -0
- package/generated/v1/snippets/billing.ledger.json +6 -0
- package/generated/v1/snippets/billing.notices.json +6 -0
- package/generated/v1/snippets/billing.notificationsettings.json +6 -0
- package/generated/v1/snippets/billing.notificationsettingsupdate.json +6 -0
- package/generated/v1/snippets/billing.paymenthistory.json +6 -0
- package/generated/v1/snippets/billing.paymentmethod.json +6 -0
- package/generated/v1/snippets/billing.paymentmethodconfirm.json +6 -0
- package/generated/v1/snippets/billing.paymentmethodremove.json +6 -0
- package/generated/v1/snippets/billing.paymentmethodsetup.json +6 -0
- package/generated/v1/snippets/billing.portal.json +6 -0
- package/generated/v1/snippets/billing.projects.json +6 -0
- package/generated/v1/snippets/billing.purchase.json +6 -0
- package/generated/v1/snippets/billing.quote.json +6 -0
- package/generated/v1/snippets/billing.reconcile.json +6 -0
- package/generated/v1/snippets/billing.refundrequest.json +6 -0
- package/generated/v1/snippets/billing.refundresolution.json +6 -0
- package/generated/v1/snippets/billing.summary.json +6 -0
- package/generated/v1/snippets/endpoints.acknowledgeSigningKeyRotation.json +6 -0
- package/generated/v1/snippets/{endpoints.verify.json → endpoints.enable.json} +3 -3
- package/generated/v1/snippets/endpoints.revealSigningSecret.json +6 -0
- package/generated/v1/snippets/executions.list.json +6 -0
- package/generated/v1/snippets/exports.cancel.json +6 -0
- package/generated/v1/snippets/exports.create.json +6 -0
- package/generated/v1/snippets/exports.part.json +6 -0
- package/generated/v1/snippets/exports.read.json +6 -0
- package/generated/v1/snippets/forecast.windows.json +1 -1
- package/generated/v1/snippets/limits.read.json +6 -0
- package/generated/v1/snippets/organizations.close.json +6 -0
- package/generated/v1/snippets/organizations.lifecycle.json +6 -0
- package/generated/v1/snippets/organizations.restore.json +6 -0
- package/generated/v1/snippets/projects.archive.json +6 -0
- package/generated/v1/snippets/projects.delete.json +6 -0
- package/generated/v1/snippets/projects.rename.json +6 -0
- package/generated/v1/snippets/schedules.create.json +3 -3
- package/generated/v1/snippets/schedules.replace.json +3 -3
- package/generated/v1/snippets/timing.summary.json +6 -0
- package/package.json +7 -7
- package/dist/callback-ownership.d.ts +0 -58
- package/dist/callback-ownership.js +0 -71
- package/generated/v1/callback-endpoint-verification.json +0 -59
- /package/generated/v1/schemas/{endpoints.verify.response-headers.json → endpoints.acknowledgeSigningKeyRotation.response-headers.json} +0 -0
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
* DNS is deliberately not represented here: names are resolved and every
|
|
5
5
|
* returned address is passed through `isPublicCallbackAddress` by the caller.
|
|
6
6
|
*
|
|
7
|
-
* **That caller is endpoint creation and
|
|
8
|
-
*
|
|
7
|
+
* **That caller is endpoint creation and update, and since 2026-08-11 it is
|
|
8
|
+
* nowhere else.** This comment used to end "and immediately before a send",
|
|
9
9
|
* which FXO-1566 made false when it removed the send-time re-resolution. What
|
|
10
10
|
* runs at send time is `evaluateCallbackUrl` alone — a string check, which
|
|
11
11
|
* cannot see where a hostname points now. FXO-1575 measured what the platform
|
package/dist/callback-safety.js
CHANGED
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
* DNS is deliberately not represented here: names are resolved and every
|
|
5
5
|
* returned address is passed through `isPublicCallbackAddress` by the caller.
|
|
6
6
|
*
|
|
7
|
-
* **That caller is endpoint creation and
|
|
8
|
-
*
|
|
7
|
+
* **That caller is endpoint creation and update, and since 2026-08-11 it is
|
|
8
|
+
* nowhere else.** This comment used to end "and immediately before a send",
|
|
9
9
|
* which FXO-1566 made false when it removed the send-time re-resolution. What
|
|
10
10
|
* runs at send time is `evaluateCallbackUrl` alone — a string check, which
|
|
11
11
|
* cannot see where a hostname points now. FXO-1575 measured what the platform
|
|
@@ -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) {
|
package/dist/compatibility.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
1
|
+
import { z } from "./zod.js";
|
|
2
2
|
/**
|
|
3
3
|
* What may change, and what that costs.
|
|
4
4
|
*
|
|
@@ -7,7 +7,7 @@ import { z } from "zod";
|
|
|
7
7
|
* day, and a contract change must be visible even when no code deployed.
|
|
8
8
|
*/
|
|
9
9
|
export declare const CONTRACT_VERSION: "2026-08-22";
|
|
10
|
-
export declare const contractVersionSchema:
|
|
10
|
+
export declare const contractVersionSchema: import("zod").ZodLiteral<"2026-08-22">;
|
|
11
11
|
/**
|
|
12
12
|
* Three kinds of change, and only the first is free.
|
|
13
13
|
*
|
|
@@ -29,7 +29,7 @@ export declare const contractVersionSchema: z.ZodLiteral<"2026-08-22">;
|
|
|
29
29
|
* exercised by fixtures, so "we thought it was additive" is a testable claim.
|
|
30
30
|
*/
|
|
31
31
|
export declare const CHANGE_KINDS: readonly ["additive", "breaking", "deployment-only"];
|
|
32
|
-
export declare const changeKindSchema:
|
|
32
|
+
export declare const changeKindSchema: import("zod").ZodEnum<{
|
|
33
33
|
additive: "additive";
|
|
34
34
|
breaking: "breaking";
|
|
35
35
|
"deployment-only": "deployment-only";
|
package/dist/compatibility.js
CHANGED
|
@@ -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
|
+
});
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { z } from "./zod.js";
|
|
2
|
+
import { type RandomBytes } from "./identifiers.js";
|
|
3
|
+
/** A server-assigned export identifier. */
|
|
4
|
+
export declare const dataExportIdSchema: import("zod").ZodString;
|
|
5
|
+
/** Mints the export id without extending the shared identifier vocabulary. */
|
|
6
|
+
export declare function newDataExportId(randomBytes?: RandomBytes): string;
|
|
7
|
+
export declare const DATA_EXPORT_STATES: readonly ["active", "complete", "cancelled"];
|
|
8
|
+
export declare const dataExportStateSchema: import("zod").ZodEnum<{
|
|
9
|
+
active: "active";
|
|
10
|
+
cancelled: "cancelled";
|
|
11
|
+
complete: "complete";
|
|
12
|
+
}>;
|
|
13
|
+
/** Creating an export takes no authority from the body. */
|
|
14
|
+
export declare const dataExportCreateRequestSchema: import("zod").ZodObject<{}, import("zod/v4/core").$strict>;
|
|
15
|
+
export declare const dataExportSchema: import("zod").ZodObject<{
|
|
16
|
+
createdAt: import("zod").ZodString;
|
|
17
|
+
consistency: import("zod").ZodLiteral<"creation-cutoff-current-values">;
|
|
18
|
+
cutoffAt: import("zod").ZodString;
|
|
19
|
+
id: import("zod").ZodString;
|
|
20
|
+
state: import("zod").ZodEnum<{
|
|
21
|
+
active: "active";
|
|
22
|
+
cancelled: "cancelled";
|
|
23
|
+
complete: "complete";
|
|
24
|
+
}>;
|
|
25
|
+
updatedAt: import("zod").ZodString;
|
|
26
|
+
}, import("zod/v4/core").$strip>;
|
|
27
|
+
export declare const dataExportPartRequestSchema: import("zod").ZodObject<{
|
|
28
|
+
cursor: import("zod").ZodOptional<import("zod").ZodString>;
|
|
29
|
+
}, import("zod/v4/core").$strict>;
|
|
30
|
+
/**
|
|
31
|
+
* One bounded file transported inside the ordinary JSON response envelope.
|
|
32
|
+
* `content` is NDJSON so callers can save it without interpreting customer
|
|
33
|
+
* payload fields, while the response itself stays compatible with the SDK.
|
|
34
|
+
*/
|
|
35
|
+
export declare const dataExportPartSchema: import("zod").ZodObject<{
|
|
36
|
+
content: import("zod").ZodString;
|
|
37
|
+
fileName: import("zod").ZodString;
|
|
38
|
+
mediaType: import("zod").ZodLiteral<"application/x-ndjson">;
|
|
39
|
+
nextCursor: import("zod").ZodOptional<import("zod").ZodString>;
|
|
40
|
+
}, import("zod/v4/core").$strip>;
|
|
41
|
+
export declare const dataExportCancelledSchema: import("zod").ZodObject<{
|
|
42
|
+
cancelled: import("zod").ZodLiteral<true>;
|
|
43
|
+
export: import("zod").ZodObject<{
|
|
44
|
+
createdAt: import("zod").ZodString;
|
|
45
|
+
consistency: import("zod").ZodLiteral<"creation-cutoff-current-values">;
|
|
46
|
+
cutoffAt: import("zod").ZodString;
|
|
47
|
+
id: import("zod").ZodString;
|
|
48
|
+
state: import("zod").ZodEnum<{
|
|
49
|
+
active: "active";
|
|
50
|
+
cancelled: "cancelled";
|
|
51
|
+
complete: "complete";
|
|
52
|
+
}>;
|
|
53
|
+
updatedAt: import("zod").ZodString;
|
|
54
|
+
}, import("zod/v4/core").$strip>;
|
|
55
|
+
}, import("zod/v4/core").$strip>;
|
|
56
|
+
export type DataExport = z.infer<typeof dataExportSchema>;
|
|
57
|
+
export type DataExportPart = z.infer<typeof dataExportPartSchema>;
|
|
58
|
+
/** Additive operation declarations, merged into the canonical registry by the API wiring. */
|
|
59
|
+
export declare const DATA_EXPORT_OPERATIONS: readonly [import("./operations.js").OperationDefinition & {
|
|
60
|
+
readonly id: "exports.create";
|
|
61
|
+
}, import("./operations.js").OperationDefinition & {
|
|
62
|
+
readonly id: "exports.read";
|
|
63
|
+
}, import("./operations.js").OperationDefinition & {
|
|
64
|
+
readonly id: "exports.part";
|
|
65
|
+
}, import("./operations.js").OperationDefinition & {
|
|
66
|
+
readonly id: "exports.cancel";
|
|
67
|
+
}];
|
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
import { z } from "./zod.js";
|
|
2
|
+
import { API_UNUSED_RESPONSE_SCHEMA, defineOperations, } from "./operation-definitions.js";
|
|
3
|
+
import { newId } from "./identifiers.js";
|
|
4
|
+
import { timestampSchema } from "./time.js";
|
|
5
|
+
/** A server-assigned export identifier. */
|
|
6
|
+
export const dataExportIdSchema = z
|
|
7
|
+
.string()
|
|
8
|
+
.regex(/^exp_[0-9abcdefghjkmnpqrstvwxyz]{26}$/u);
|
|
9
|
+
/** Mints the export id without extending the shared identifier vocabulary. */
|
|
10
|
+
export function newDataExportId(randomBytes) {
|
|
11
|
+
return newId("schedule", randomBytes).replace("sch", "exp");
|
|
12
|
+
}
|
|
13
|
+
export const DATA_EXPORT_STATES = ["active", "complete", "cancelled"];
|
|
14
|
+
export const dataExportStateSchema = /* @__PURE__ */ z.enum(DATA_EXPORT_STATES);
|
|
15
|
+
/** Creating an export takes no authority from the body. */
|
|
16
|
+
export const dataExportCreateRequestSchema = z.object({}).strict();
|
|
17
|
+
export const dataExportSchema = /* @__PURE__ */ (() => z.object({
|
|
18
|
+
createdAt: timestampSchema,
|
|
19
|
+
consistency: z.literal("creation-cutoff-current-values"),
|
|
20
|
+
cutoffAt: timestampSchema,
|
|
21
|
+
id: dataExportIdSchema,
|
|
22
|
+
state: dataExportStateSchema,
|
|
23
|
+
updatedAt: timestampSchema,
|
|
24
|
+
}))();
|
|
25
|
+
export const dataExportPartRequestSchema = z
|
|
26
|
+
.object({ cursor: z.string().min(1).optional() })
|
|
27
|
+
.strict();
|
|
28
|
+
/**
|
|
29
|
+
* One bounded file transported inside the ordinary JSON response envelope.
|
|
30
|
+
* `content` is NDJSON so callers can save it without interpreting customer
|
|
31
|
+
* payload fields, while the response itself stays compatible with the SDK.
|
|
32
|
+
*/
|
|
33
|
+
export const dataExportPartSchema = /* @__PURE__ */ (() => z.object({
|
|
34
|
+
content: z.string(),
|
|
35
|
+
fileName: z
|
|
36
|
+
.string()
|
|
37
|
+
.regex(/^greatwait-export-exp_[0-9abcdefghjkmnpqrstvwxyz]{26}\.ndjson$/u),
|
|
38
|
+
mediaType: z.literal("application/x-ndjson"),
|
|
39
|
+
nextCursor: z.string().min(1).optional(),
|
|
40
|
+
}))();
|
|
41
|
+
export const dataExportCancelledSchema = /* @__PURE__ */ (() => z.object({
|
|
42
|
+
cancelled: z.literal(true),
|
|
43
|
+
export: dataExportSchema,
|
|
44
|
+
}))();
|
|
45
|
+
const EXAMPLE = {
|
|
46
|
+
createdAt: "2035-03-04T12:00:00.000Z",
|
|
47
|
+
consistency: "creation-cutoff-current-values",
|
|
48
|
+
cutoffAt: "2035-03-04T12:00:00.000Z",
|
|
49
|
+
id: "exp_0123456789abcdefghjkmnpqrs",
|
|
50
|
+
state: "active",
|
|
51
|
+
updatedAt: "2035-03-04T12:00:00.000Z",
|
|
52
|
+
};
|
|
53
|
+
/** Additive operation declarations, merged into the canonical registry by the API wiring. */
|
|
54
|
+
export const DATA_EXPORT_OPERATIONS = defineOperations([
|
|
55
|
+
{
|
|
56
|
+
creates: true,
|
|
57
|
+
description: globalThis.GREATWAIT_RUNTIME_CONTRACTS_ONLY
|
|
58
|
+
? ""
|
|
59
|
+
: "Starts an export for the authenticated project and environment. Records created or planned after cutoffAt are excluded; mutable fields have their current value when each part is read. Authority comes from the verified principal; no scope fields are accepted in the body.",
|
|
60
|
+
example: globalThis.GREATWAIT_RUNTIME_WITHOUT_EXAMPLES
|
|
61
|
+
? {}
|
|
62
|
+
: EXAMPLE,
|
|
63
|
+
id: "exports.create",
|
|
64
|
+
idempotent: false,
|
|
65
|
+
mcp: { destructive: false, kind: "tool", openWorld: false },
|
|
66
|
+
method: "POST",
|
|
67
|
+
mutates: true,
|
|
68
|
+
path: "/v1/exports",
|
|
69
|
+
principals: ["api-credential", "oauth", "session"],
|
|
70
|
+
problems: [
|
|
71
|
+
"invalid_request",
|
|
72
|
+
"plan_limit_reached",
|
|
73
|
+
"service_unavailable",
|
|
74
|
+
"state_conflict",
|
|
75
|
+
],
|
|
76
|
+
request: dataExportCreateRequestSchema,
|
|
77
|
+
requestExample: globalThis
|
|
78
|
+
.GREATWAIT_RUNTIME_WITHOUT_EXAMPLES
|
|
79
|
+
? {}
|
|
80
|
+
: {},
|
|
81
|
+
response: globalThis.GREATWAIT_API_REQUEST_REGISTRY
|
|
82
|
+
? API_UNUSED_RESPONSE_SCHEMA
|
|
83
|
+
: dataExportSchema,
|
|
84
|
+
scopes: ["schedules:read", "endpoints:read"],
|
|
85
|
+
sessionAuthority: "headers",
|
|
86
|
+
summary: globalThis.GREATWAIT_API_REQUEST_REGISTRY
|
|
87
|
+
? ""
|
|
88
|
+
: "Create a data export",
|
|
89
|
+
surfaces: ["api", "mock"],
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
creates: false,
|
|
93
|
+
description: globalThis.GREATWAIT_RUNTIME_CONTRACTS_ONLY
|
|
94
|
+
? ""
|
|
95
|
+
: "Reads export progress inside the authenticated authority tuple.",
|
|
96
|
+
example: globalThis.GREATWAIT_RUNTIME_WITHOUT_EXAMPLES
|
|
97
|
+
? {}
|
|
98
|
+
: EXAMPLE,
|
|
99
|
+
id: "exports.read",
|
|
100
|
+
idempotent: true,
|
|
101
|
+
mcp: { destructive: false, kind: "tool", openWorld: false },
|
|
102
|
+
method: "GET",
|
|
103
|
+
mutates: false,
|
|
104
|
+
path: "/v1/exports/{exportId}",
|
|
105
|
+
principals: ["api-credential", "oauth", "session"],
|
|
106
|
+
problems: ["not_found", "service_unavailable", "state_conflict"],
|
|
107
|
+
response: globalThis.GREATWAIT_API_REQUEST_REGISTRY
|
|
108
|
+
? API_UNUSED_RESPONSE_SCHEMA
|
|
109
|
+
: dataExportSchema,
|
|
110
|
+
scopes: ["schedules:read", "endpoints:read"],
|
|
111
|
+
sessionAuthority: "headers",
|
|
112
|
+
summary: globalThis.GREATWAIT_API_REQUEST_REGISTRY
|
|
113
|
+
? ""
|
|
114
|
+
: "Read a data export",
|
|
115
|
+
surfaces: ["api", "mock"],
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
creates: false,
|
|
119
|
+
description: globalThis.GREATWAIT_RUNTIME_CONTRACTS_ONLY
|
|
120
|
+
? ""
|
|
121
|
+
: "Returns one bounded NDJSON file part. Cursors are opaque, authenticated, and bound to this export job.",
|
|
122
|
+
example: globalThis.GREATWAIT_RUNTIME_WITHOUT_EXAMPLES
|
|
123
|
+
? {}
|
|
124
|
+
: {
|
|
125
|
+
content: '{"kind":"schedule","value":{"id":"sch_0123456789abcdefghjkmnpq"}}\n',
|
|
126
|
+
fileName: "greatwait-export-exp_0123456789abcdefghjkmnpqrs.ndjson",
|
|
127
|
+
mediaType: "application/x-ndjson",
|
|
128
|
+
},
|
|
129
|
+
id: "exports.part",
|
|
130
|
+
idempotent: true,
|
|
131
|
+
mcp: {
|
|
132
|
+
kind: "unavailable",
|
|
133
|
+
reason: "A file part may contain customer payload plaintext; MCP exposes export metadata but never raw export content.",
|
|
134
|
+
},
|
|
135
|
+
method: "GET",
|
|
136
|
+
mutates: false,
|
|
137
|
+
path: "/v1/exports/{exportId}/parts",
|
|
138
|
+
principals: ["api-credential", "oauth", "session"],
|
|
139
|
+
problems: [
|
|
140
|
+
"invalid_request",
|
|
141
|
+
"not_found",
|
|
142
|
+
"service_unavailable",
|
|
143
|
+
"state_conflict",
|
|
144
|
+
],
|
|
145
|
+
query: dataExportPartRequestSchema,
|
|
146
|
+
response: globalThis.GREATWAIT_API_REQUEST_REGISTRY
|
|
147
|
+
? API_UNUSED_RESPONSE_SCHEMA
|
|
148
|
+
: dataExportPartSchema,
|
|
149
|
+
scopes: ["schedules:read", "endpoints:read"],
|
|
150
|
+
sessionAuthority: "headers",
|
|
151
|
+
summary: globalThis.GREATWAIT_API_REQUEST_REGISTRY
|
|
152
|
+
? ""
|
|
153
|
+
: "Download a data export part",
|
|
154
|
+
surfaces: ["api", "mock"],
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
creates: false,
|
|
158
|
+
description: globalThis.GREATWAIT_RUNTIME_CONTRACTS_ONLY
|
|
159
|
+
? ""
|
|
160
|
+
: "Permanently cancels an export job. Repeating cancellation is safe and cancelled jobs cannot serve file parts.",
|
|
161
|
+
example: globalThis.GREATWAIT_RUNTIME_WITHOUT_EXAMPLES
|
|
162
|
+
? {}
|
|
163
|
+
: { cancelled: true, export: { ...EXAMPLE, state: "cancelled" } },
|
|
164
|
+
id: "exports.cancel",
|
|
165
|
+
idempotent: true,
|
|
166
|
+
mcp: { destructive: true, kind: "tool", openWorld: false },
|
|
167
|
+
method: "POST",
|
|
168
|
+
mutates: true,
|
|
169
|
+
path: "/v1/exports/{exportId}/cancel",
|
|
170
|
+
principals: ["api-credential", "oauth", "session"],
|
|
171
|
+
problems: ["not_found", "service_unavailable", "state_conflict"],
|
|
172
|
+
response: globalThis.GREATWAIT_API_REQUEST_REGISTRY
|
|
173
|
+
? API_UNUSED_RESPONSE_SCHEMA
|
|
174
|
+
: dataExportCancelledSchema,
|
|
175
|
+
scopes: ["schedules:read", "endpoints:read"],
|
|
176
|
+
sessionAuthority: "headers",
|
|
177
|
+
summary: globalThis.GREATWAIT_API_REQUEST_REGISTRY
|
|
178
|
+
? ""
|
|
179
|
+
: "Cancel a data export",
|
|
180
|
+
surfaces: ["api", "mock"],
|
|
181
|
+
},
|
|
182
|
+
]);
|
|
@@ -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>;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { z } from "./zod.js";
|
|
2
|
+
import { MAX_INLINE_PAYLOAD_BYTES, MAX_FORECAST_HORIZON_SECONDS, MAX_USAGE_WINDOW_DAYS, MAX_PARTITION_KEY_CEILING, } from "./configuration-bounds.js";
|
|
3
|
+
const layer = z.enum(["default", "global", "deployment", "organization"]);
|
|
4
|
+
export const effectiveCustomerLimitsSchema = z
|
|
5
|
+
.object({
|
|
6
|
+
limits: z
|
|
7
|
+
.object({
|
|
8
|
+
inlinePayloadBytes: z
|
|
9
|
+
.number()
|
|
10
|
+
.int()
|
|
11
|
+
.min(0)
|
|
12
|
+
.max(MAX_INLINE_PAYLOAD_BYTES),
|
|
13
|
+
partitionKeyCeiling: z
|
|
14
|
+
.number()
|
|
15
|
+
.int()
|
|
16
|
+
.min(1)
|
|
17
|
+
.max(MAX_PARTITION_KEY_CEILING)
|
|
18
|
+
.optional(),
|
|
19
|
+
forecastHorizonSeconds: z
|
|
20
|
+
.number()
|
|
21
|
+
.int()
|
|
22
|
+
.min(60)
|
|
23
|
+
.max(MAX_FORECAST_HORIZON_SECONDS),
|
|
24
|
+
usageWindowDays: z.number().int().min(1).max(MAX_USAGE_WINDOW_DAYS),
|
|
25
|
+
})
|
|
26
|
+
.strict(),
|
|
27
|
+
provenance: z
|
|
28
|
+
.object({
|
|
29
|
+
inlinePayloadBytes: layer,
|
|
30
|
+
partitionKeyCeiling: layer.optional(),
|
|
31
|
+
forecastHorizonSeconds: layer,
|
|
32
|
+
usageWindowDays: layer,
|
|
33
|
+
})
|
|
34
|
+
.strict(),
|
|
35
|
+
revision: z
|
|
36
|
+
.object({
|
|
37
|
+
global: z.number().int().nonnegative(),
|
|
38
|
+
organization: z.number().int().nonnegative(),
|
|
39
|
+
})
|
|
40
|
+
.strict(),
|
|
41
|
+
})
|
|
42
|
+
.strict();
|