@greatwait/contracts 0.1.0-alpha.2 → 0.1.0-alpha.4
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 +11 -9
- package/dist/authority.d.ts +84 -21
- package/dist/authority.js +47 -2
- package/dist/billing.d.ts +1001 -0
- package/dist/billing.js +684 -0
- package/dist/callback-safety.d.ts +2 -2
- package/dist/callback-safety.js +2 -2
- package/dist/compatibility.d.ts +3 -3
- package/dist/compatibility.js +1 -1
- package/dist/data-export.d.ts +67 -0
- package/dist/data-export.js +182 -0
- package/dist/endpoints.d.ts +181 -240
- package/dist/endpoints.js +77 -81
- package/dist/events.d.ts +17 -17
- package/dist/events.js +1 -1
- package/dist/first-value-journey.d.ts +192 -42
- package/dist/first-value-journey.js +212 -6
- package/dist/forecast.d.ts +71 -71
- package/dist/forecast.js +1 -1
- package/dist/identifiers.d.ts +20 -20
- package/dist/identifiers.js +1 -1
- package/dist/identity.d.ts +45 -41
- package/dist/identity.js +5 -4
- package/dist/index.d.ts +13 -8
- package/dist/index.js +13 -8
- package/dist/mcp.d.ts +201 -0
- package/dist/mcp.js +214 -0
- package/dist/naming.d.ts +45 -0
- package/dist/naming.js +159 -0
- package/dist/oauth.d.ts +186 -172
- package/dist/oauth.js +84 -8
- package/dist/operation-definitions.d.ts +9 -0
- package/dist/operation-definitions.js +7 -0
- package/dist/operations.d.ts +4359 -2214
- package/dist/operations.js +2754 -881
- package/dist/organization-lifecycle.d.ts +34 -0
- package/dist/organization-lifecycle.js +122 -0
- package/dist/partition.d.ts +26 -0
- package/dist/policy.d.ts +4 -4
- package/dist/policy.js +9 -5
- package/dist/problems.d.ts +32 -26
- package/dist/problems.js +6 -2
- package/dist/protocol.d.ts +204 -75
- package/dist/protocol.js +108 -36
- package/dist/scheduling-records.d.ts +343 -285
- package/dist/scheduling-records.js +1 -1
- package/dist/scheduling.d.ts +670 -360
- package/dist/scheduling.js +382 -56
- 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 +197 -31
- 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 +4 -0
- package/generated/v1/examples/attempts.read.response.json +4 -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.fundingquote.request.json +7 -0
- package/generated/v1/examples/billing.fundingquote.response.json +13 -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.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/context.read.response.json +6 -0
- package/generated/v1/examples/credentials.connection.response.json +16 -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/occurrences.read.response.json +4 -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 +19 -10
- package/generated/v1/manifest.json +1019 -53
- package/generated/v1/openapi.json +30597 -5709
- package/generated/v1/policy-matrix.json +290 -45
- package/generated/v1/schemas/attempts.list.response.json +24 -1
- package/generated/v1/schemas/attempts.read.response.json +24 -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.fundingquote.request.json +28 -0
- package/generated/v1/schemas/billing.fundingquote.response.json +61 -0
- package/generated/v1/schemas/billing.ledger.query.json +16 -0
- package/generated/v1/schemas/billing.ledger.response.json +125 -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 +36 -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.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 +22 -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 +45 -0
- package/generated/v1/schemas/credentials.connection.response.json +66 -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/grants.list.response.json +2 -0
- package/generated/v1/schemas/grants.revoke.response.json +2 -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 +24 -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/attempts.list.json +1 -0
- package/generated/v1/snippets/attempts.read.json +1 -0
- 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.fundingquote.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.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/context.read.json +6 -0
- package/generated/v1/snippets/credentials.connection.json +6 -0
- package/generated/v1/snippets/credentials.create.json +1 -0
- package/generated/v1/snippets/credentials.list.json +1 -0
- package/generated/v1/snippets/credentials.revoke.json +1 -0
- package/generated/v1/snippets/credentials.rotate.json +1 -0
- package/generated/v1/snippets/endpoints.acknowledgeSigningKeyRotation.json +6 -0
- package/generated/v1/snippets/endpoints.create.json +1 -0
- package/generated/v1/snippets/endpoints.disable.json +1 -0
- package/generated/v1/snippets/{endpoints.verify.json → endpoints.enable.json} +4 -3
- package/generated/v1/snippets/endpoints.list.json +1 -0
- package/generated/v1/snippets/endpoints.read.json +1 -0
- package/generated/v1/snippets/endpoints.revealSigningSecret.json +6 -0
- package/generated/v1/snippets/endpoints.rotateSigningKey.json +1 -0
- package/generated/v1/snippets/endpoints.update.json +1 -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.read.json +1 -0
- package/generated/v1/snippets/forecast.windows.json +1 -0
- package/generated/v1/snippets/grants.list.json +1 -0
- package/generated/v1/snippets/grants.revoke.json +1 -0
- package/generated/v1/snippets/journey/await-occurrence.json +6 -0
- package/generated/v1/snippets/journey/check-credential.json +6 -0
- package/generated/v1/snippets/journey/check-service.json +6 -0
- package/generated/v1/snippets/journey/clean-up.json +6 -0
- package/generated/v1/snippets/journey/create-destination.json +6 -0
- package/generated/v1/snippets/journey/create-one-shot.json +6 -0
- package/generated/v1/snippets/journey/read-attempt.json +6 -0
- package/generated/v1/snippets/journey/read-schedule.json +6 -0
- package/generated/v1/snippets/journey/replay-one-shot.json +6 -0
- package/generated/v1/snippets/meta.scaffold.json +1 -0
- package/generated/v1/snippets/meta.version.json +1 -0
- package/generated/v1/snippets/occurrences.list.json +1 -0
- package/generated/v1/snippets/occurrences.read.json +1 -0
- package/generated/v1/snippets/occurrences.redeliver.json +1 -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.create.json +1 -0
- package/generated/v1/snippets/projects.delete.json +6 -0
- package/generated/v1/snippets/projects.list.json +1 -0
- package/generated/v1/snippets/projects.rename.json +6 -0
- package/generated/v1/snippets/schedules.archive.json +1 -0
- package/generated/v1/snippets/schedules.cancel.json +1 -0
- package/generated/v1/snippets/schedules.create.json +4 -3
- package/generated/v1/snippets/schedules.list.json +1 -0
- package/generated/v1/snippets/schedules.pause.json +1 -0
- package/generated/v1/snippets/schedules.read.json +1 -0
- package/generated/v1/snippets/schedules.replace.json +4 -3
- package/generated/v1/snippets/schedules.resume.json +1 -0
- package/generated/v1/snippets/sinkdeliveries.list.json +1 -0
- package/generated/v1/snippets/sinkdeliveries.read.json +1 -0
- package/generated/v1/snippets/testsinks.configure.json +1 -0
- package/generated/v1/snippets/testsinks.create.json +1 -0
- package/generated/v1/snippets/testsinks.delete.json +1 -0
- package/generated/v1/snippets/testsinks.list.json +1 -0
- package/generated/v1/snippets/testsinks.read.json +1 -0
- package/generated/v1/snippets/timing.summary.json +6 -0
- package/generated/v1/snippets/usage.read.json +1 -0
- package/package.json +2 -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
package/README.md
CHANGED
|
@@ -32,20 +32,22 @@ are not JavaScript.
|
|
|
32
32
|
|
|
33
33
|
## What ships
|
|
34
34
|
|
|
35
|
-
| Path | What it is
|
|
36
|
-
| --------------------------------------- |
|
|
37
|
-
| `generated/v1/openapi.json` | The public API, as OpenAPI
|
|
38
|
-
| `generated/v1/
|
|
39
|
-
| `generated/v1/
|
|
40
|
-
| `generated/v1/
|
|
41
|
-
| `generated/v1/
|
|
42
|
-
| `generated/v1/
|
|
43
|
-
| `generated/v1/manifest.json` | The index of everything above, with the contract version |
|
|
35
|
+
| Path | What it is |
|
|
36
|
+
| --------------------------------------- | -------------------------------------------------------- |
|
|
37
|
+
| `generated/v1/openapi.json` | The public API, as OpenAPI |
|
|
38
|
+
| `generated/v1/schemas/` | JSON Schema per operation, request and response |
|
|
39
|
+
| `generated/v1/snippets/` | curl, JavaScript and MCP examples per operation |
|
|
40
|
+
| `generated/v1/first-value-journey.json` | The canonical first-value sequence, as data |
|
|
41
|
+
| `generated/v1/policy-matrix.json` | Who may call what, derived from the registry |
|
|
42
|
+
| `generated/v1/manifest.json` | The index of everything above, with the contract version |
|
|
44
43
|
|
|
45
44
|
All of it is generated from one registry, so a change to an operation changes
|
|
46
45
|
every artifact at once. Nothing here is hand-maintained beside the code it
|
|
47
46
|
describes.
|
|
48
47
|
|
|
48
|
+
The repository also generates `openapi.mock.json` for contract-mock validation.
|
|
49
|
+
That internal QA surface is deliberately excluded from the published package.
|
|
50
|
+
|
|
49
51
|
## The conventions the schemas encode
|
|
50
52
|
|
|
51
53
|
- **Identifiers** are opaque, prefixed and server-assigned. Compare them for
|
package/dist/authority.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
1
|
+
import { z } from "./zod.js";
|
|
2
2
|
import type { ProblemCode } from "./problems.js";
|
|
3
3
|
/**
|
|
4
4
|
* Who is asking, and what they may do.
|
|
@@ -26,20 +26,20 @@ import type { ProblemCode } from "./problems.js";
|
|
|
26
26
|
* third if one is ever added.
|
|
27
27
|
*/
|
|
28
28
|
export declare const ENVIRONMENT_KINDS_IN_ORDER: readonly ["test", "live"];
|
|
29
|
-
export declare const environmentKindSchema:
|
|
29
|
+
export declare const environmentKindSchema: import("zod").ZodEnum<{
|
|
30
30
|
test: "test";
|
|
31
31
|
live: "live";
|
|
32
32
|
}>;
|
|
33
33
|
export type EnvironmentKind = z.infer<typeof environmentKindSchema>;
|
|
34
|
-
export declare const authoritySchema:
|
|
35
|
-
environment:
|
|
36
|
-
environmentKind:
|
|
34
|
+
export declare const authoritySchema: import("zod").ZodObject<{
|
|
35
|
+
environment: import("zod").ZodString;
|
|
36
|
+
environmentKind: import("zod").ZodEnum<{
|
|
37
37
|
test: "test";
|
|
38
38
|
live: "live";
|
|
39
39
|
}>;
|
|
40
|
-
organization:
|
|
41
|
-
project:
|
|
42
|
-
},
|
|
40
|
+
organization: import("zod").ZodString;
|
|
41
|
+
project: import("zod").ZodString;
|
|
42
|
+
}, import("zod/v4/core").$strip>;
|
|
43
43
|
export type Authority = z.infer<typeof authoritySchema>;
|
|
44
44
|
/**
|
|
45
45
|
* The initial scope vocabulary. Scopes are `resource:action`, lower case, and
|
|
@@ -50,9 +50,10 @@ 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", "credentials:read", "credentials:write", "endpoints:read", "endpoints:write", "forecast:read", "grants:read", "grants:write", "occurrences:read", "occurrences:redeliver", "projects:read", "projects:write", "schedules:read", "schedules:write", "usage:read"];
|
|
54
|
-
export declare const scopeSchema:
|
|
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"];
|
|
54
|
+
export declare const scopeSchema: import("zod").ZodEnum<{
|
|
55
55
|
"credentials:administer": "credentials:administer";
|
|
56
|
+
"billing:write": "billing:write";
|
|
56
57
|
"credentials:read": "credentials:read";
|
|
57
58
|
"credentials:write": "credentials:write";
|
|
58
59
|
"endpoints:read": "endpoints:read";
|
|
@@ -62,6 +63,7 @@ export declare const scopeSchema: z.ZodEnum<{
|
|
|
62
63
|
"grants:write": "grants:write";
|
|
63
64
|
"occurrences:read": "occurrences:read";
|
|
64
65
|
"occurrences:redeliver": "occurrences:redeliver";
|
|
66
|
+
"projects:administer": "projects:administer";
|
|
65
67
|
"projects:read": "projects:read";
|
|
66
68
|
"projects:write": "projects:write";
|
|
67
69
|
"schedules:read": "schedules:read";
|
|
@@ -95,24 +97,25 @@ export declare function effectiveScopes(granted: readonly Scope[]): Set<Scope>;
|
|
|
95
97
|
* gives for one that does not exist.
|
|
96
98
|
*/
|
|
97
99
|
export declare const PRINCIPAL_KINDS: readonly ["api-credential", "oauth", "session"];
|
|
98
|
-
export declare const principalKindSchema:
|
|
100
|
+
export declare const principalKindSchema: import("zod").ZodEnum<{
|
|
99
101
|
"api-credential": "api-credential";
|
|
100
102
|
oauth: "oauth";
|
|
101
103
|
session: "session";
|
|
102
104
|
}>;
|
|
103
105
|
export type PrincipalKind = z.infer<typeof principalKindSchema>;
|
|
104
|
-
export declare const principalSchema:
|
|
105
|
-
authority:
|
|
106
|
-
environment:
|
|
107
|
-
environmentKind:
|
|
106
|
+
export declare const principalSchema: import("zod").ZodObject<{
|
|
107
|
+
authority: import("zod").ZodObject<{
|
|
108
|
+
environment: import("zod").ZodString;
|
|
109
|
+
environmentKind: import("zod").ZodEnum<{
|
|
108
110
|
test: "test";
|
|
109
111
|
live: "live";
|
|
110
112
|
}>;
|
|
111
|
-
organization:
|
|
112
|
-
project:
|
|
113
|
-
},
|
|
114
|
-
scopes:
|
|
113
|
+
organization: import("zod").ZodString;
|
|
114
|
+
project: import("zod").ZodString;
|
|
115
|
+
}, import("zod/v4/core").$strip>;
|
|
116
|
+
scopes: import("zod").ZodArray<import("zod").ZodEnum<{
|
|
115
117
|
"credentials:administer": "credentials:administer";
|
|
118
|
+
"billing:write": "billing:write";
|
|
116
119
|
"credentials:read": "credentials:read";
|
|
117
120
|
"credentials:write": "credentials:write";
|
|
118
121
|
"endpoints:read": "endpoints:read";
|
|
@@ -122,18 +125,19 @@ export declare const principalSchema: z.ZodObject<{
|
|
|
122
125
|
"grants:write": "grants:write";
|
|
123
126
|
"occurrences:read": "occurrences:read";
|
|
124
127
|
"occurrences:redeliver": "occurrences:redeliver";
|
|
128
|
+
"projects:administer": "projects:administer";
|
|
125
129
|
"projects:read": "projects:read";
|
|
126
130
|
"projects:write": "projects:write";
|
|
127
131
|
"schedules:read": "schedules:read";
|
|
128
132
|
"schedules:write": "schedules:write";
|
|
129
133
|
"usage:read": "usage:read";
|
|
130
134
|
}>>;
|
|
131
|
-
via:
|
|
135
|
+
via: import("zod").ZodEnum<{
|
|
132
136
|
"api-credential": "api-credential";
|
|
133
137
|
oauth: "oauth";
|
|
134
138
|
session: "session";
|
|
135
139
|
}>;
|
|
136
|
-
},
|
|
140
|
+
}, import("zod/v4/core").$strip>;
|
|
137
141
|
export type Principal = z.infer<typeof principalSchema>;
|
|
138
142
|
export interface AccessRequest {
|
|
139
143
|
readonly principal: Principal;
|
|
@@ -215,3 +219,62 @@ export declare const SESSION_AUTHORITY_HEADERS: {
|
|
|
215
219
|
readonly environment: "Greatwait-Environment";
|
|
216
220
|
readonly project: "Greatwait-Project";
|
|
217
221
|
};
|
|
222
|
+
/**
|
|
223
|
+
* The authority a presented credential carries, answered back to its holder.
|
|
224
|
+
*
|
|
225
|
+
* **Why this exists at all.** The authority tuple is fixed at issue for a key
|
|
226
|
+
* and at consent for a grant — and until W10-01 nothing published it. A holder
|
|
227
|
+
* could act, and could not ask what it was acting *on*. The gap is invisible
|
|
228
|
+
* to a browser, which resolves its own project from a session it can see, and
|
|
229
|
+
* invisible to a documentation page, which tells a reader to substitute values
|
|
230
|
+
* they already know. It is not invisible to a command-line client: after
|
|
231
|
+
* `login` it holds a working token and cannot tell the person in front of it
|
|
232
|
+
* which project it is in, or whether the schedule they are about to create is
|
|
233
|
+
* a `test` one or a `live` one. Both were observable only by listing something
|
|
234
|
+
* the project already owned, which a new project does not have.
|
|
235
|
+
*
|
|
236
|
+
* **No organization, following every other `/v1` response.** Tenancy above the
|
|
237
|
+
* project is not a name this surface publishes, and a caller that cannot name
|
|
238
|
+
* an organization anywhere has no use for one here.
|
|
239
|
+
*
|
|
240
|
+
* **`scopes` is what was granted, not what was asked for and not what it
|
|
241
|
+
* implies.** A grant is capped by the consenting member's role and a key by
|
|
242
|
+
* what the issuer chose, so this is narrower than any request; it is also the
|
|
243
|
+
* *raw* list rather than `effectiveScopes`, which expands a write into its
|
|
244
|
+
* read. Publishing the expansion would make this answer disagree with the
|
|
245
|
+
* credential's own row in `credentials.list` and with what the consent screen
|
|
246
|
+
* showed the member — three places, two answers — and a caller that needs to
|
|
247
|
+
* know whether a scope is implied can apply the same published expansion the
|
|
248
|
+
* service does.
|
|
249
|
+
*/
|
|
250
|
+
export declare const credentialContextSchema: import("zod").ZodObject<{
|
|
251
|
+
environmentKind: import("zod").ZodEnum<{
|
|
252
|
+
test: "test";
|
|
253
|
+
live: "live";
|
|
254
|
+
}>;
|
|
255
|
+
principal: import("zod").ZodEnum<{
|
|
256
|
+
"api-credential": "api-credential";
|
|
257
|
+
oauth: "oauth";
|
|
258
|
+
}>;
|
|
259
|
+
project: import("zod").ZodString;
|
|
260
|
+
scopes: import("zod").ZodArray<import("zod").ZodEnum<{
|
|
261
|
+
"credentials:administer": "credentials:administer";
|
|
262
|
+
"billing:write": "billing:write";
|
|
263
|
+
"credentials:read": "credentials:read";
|
|
264
|
+
"credentials:write": "credentials:write";
|
|
265
|
+
"endpoints:read": "endpoints:read";
|
|
266
|
+
"endpoints:write": "endpoints:write";
|
|
267
|
+
"forecast:read": "forecast:read";
|
|
268
|
+
"grants:read": "grants:read";
|
|
269
|
+
"grants:write": "grants:write";
|
|
270
|
+
"occurrences:read": "occurrences:read";
|
|
271
|
+
"occurrences:redeliver": "occurrences:redeliver";
|
|
272
|
+
"projects:administer": "projects:administer";
|
|
273
|
+
"projects:read": "projects:read";
|
|
274
|
+
"projects:write": "projects:write";
|
|
275
|
+
"schedules:read": "schedules:read";
|
|
276
|
+
"schedules:write": "schedules:write";
|
|
277
|
+
"usage:read": "usage:read";
|
|
278
|
+
}>>;
|
|
279
|
+
}, import("zod/v4/core").$strip>;
|
|
280
|
+
export type CredentialContext = z.infer<typeof credentialContextSchema>;
|
package/dist/authority.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
1
|
+
import { z } from "./zod.js";
|
|
2
2
|
import { environmentIdSchema, organizationIdSchema, projectIdSchema, } from "./identifiers.js";
|
|
3
3
|
/**
|
|
4
4
|
* Who is asking, and what they may do.
|
|
@@ -60,6 +60,8 @@ export const SCOPES = [
|
|
|
60
60
|
* the row rather than of the route.
|
|
61
61
|
*/
|
|
62
62
|
"credentials:administer",
|
|
63
|
+
/** Change desired billing policy and advance an approved policy revision. */
|
|
64
|
+
"billing:write",
|
|
63
65
|
"credentials:read",
|
|
64
66
|
"credentials:write",
|
|
65
67
|
"endpoints:read",
|
|
@@ -83,6 +85,14 @@ export const SCOPES = [
|
|
|
83
85
|
"grants:write",
|
|
84
86
|
"occurrences:read",
|
|
85
87
|
"occurrences:redeliver",
|
|
88
|
+
/**
|
|
89
|
+
* Stop, restore, or permanently destroy a whole project.
|
|
90
|
+
*
|
|
91
|
+
* Kept separate from `projects:write`: renaming is ordinary reversible work,
|
|
92
|
+
* while these operations affect every member and every schedule in the
|
|
93
|
+
* project. Organization administrators hold this scope; members do not.
|
|
94
|
+
*/
|
|
95
|
+
"projects:administer",
|
|
86
96
|
"projects:read",
|
|
87
97
|
/**
|
|
88
98
|
* Create a project, with its `test` and `live` environments.
|
|
@@ -104,7 +114,7 @@ export const SCOPES = [
|
|
|
104
114
|
"schedules:read",
|
|
105
115
|
"schedules:write",
|
|
106
116
|
/**
|
|
107
|
-
* See
|
|
117
|
+
* See terminal occurrence volume and the organization's exact attempt ledger.
|
|
108
118
|
*
|
|
109
119
|
* A scope of its own rather than a corner of `schedules:read`, because the
|
|
110
120
|
* two answer to different people: a service account that lists schedules to
|
|
@@ -259,3 +269,38 @@ export const SESSION_AUTHORITY_HEADERS = {
|
|
|
259
269
|
environment: "Greatwait-Environment",
|
|
260
270
|
project: "Greatwait-Project",
|
|
261
271
|
};
|
|
272
|
+
/**
|
|
273
|
+
* The authority a presented credential carries, answered back to its holder.
|
|
274
|
+
*
|
|
275
|
+
* **Why this exists at all.** The authority tuple is fixed at issue for a key
|
|
276
|
+
* and at consent for a grant — and until W10-01 nothing published it. A holder
|
|
277
|
+
* could act, and could not ask what it was acting *on*. The gap is invisible
|
|
278
|
+
* to a browser, which resolves its own project from a session it can see, and
|
|
279
|
+
* invisible to a documentation page, which tells a reader to substitute values
|
|
280
|
+
* they already know. It is not invisible to a command-line client: after
|
|
281
|
+
* `login` it holds a working token and cannot tell the person in front of it
|
|
282
|
+
* which project it is in, or whether the schedule they are about to create is
|
|
283
|
+
* a `test` one or a `live` one. Both were observable only by listing something
|
|
284
|
+
* the project already owned, which a new project does not have.
|
|
285
|
+
*
|
|
286
|
+
* **No organization, following every other `/v1` response.** Tenancy above the
|
|
287
|
+
* project is not a name this surface publishes, and a caller that cannot name
|
|
288
|
+
* an organization anywhere has no use for one here.
|
|
289
|
+
*
|
|
290
|
+
* **`scopes` is what was granted, not what was asked for and not what it
|
|
291
|
+
* implies.** A grant is capped by the consenting member's role and a key by
|
|
292
|
+
* what the issuer chose, so this is narrower than any request; it is also the
|
|
293
|
+
* *raw* list rather than `effectiveScopes`, which expands a write into its
|
|
294
|
+
* read. Publishing the expansion would make this answer disagree with the
|
|
295
|
+
* credential's own row in `credentials.list` and with what the consent screen
|
|
296
|
+
* showed the member — three places, two answers — and a caller that needs to
|
|
297
|
+
* know whether a scope is implied can apply the same published expansion the
|
|
298
|
+
* service does.
|
|
299
|
+
*/
|
|
300
|
+
export const credentialContextSchema = z.object({
|
|
301
|
+
environmentKind: environmentKindSchema,
|
|
302
|
+
/** How this credential authenticated. Never `session`: see the operation. */
|
|
303
|
+
principal: z.enum(["api-credential", "oauth"]),
|
|
304
|
+
project: projectIdSchema,
|
|
305
|
+
scopes: z.array(scopeSchema).min(1),
|
|
306
|
+
});
|