@substrat-run/contracts 0.201.0 → 0.203.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/connections.d.ts +27 -0
- package/dist/connections.d.ts.map +1 -1
- package/dist/connections.js +30 -0
- package/dist/connections.js.map +1 -1
- package/dist/connector-call-target.d.ts +12 -0
- package/dist/connector-call-target.d.ts.map +1 -1
- package/dist/connector-call-target.js +18 -0
- package/dist/connector-call-target.js.map +1 -1
- package/dist/control-plane.d.ts +5 -0
- package/dist/control-plane.d.ts.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/mail-in.d.ts +62 -0
- package/dist/mail-in.d.ts.map +1 -1
- package/dist/mail-in.js +33 -0
- package/dist/mail-in.js.map +1 -1
- package/dist/managed-client.d.ts +84 -0
- package/dist/managed-client.d.ts.map +1 -0
- package/dist/managed-client.js +97 -0
- package/dist/managed-client.js.map +1 -0
- package/dist/model-usage.d.ts +6 -0
- package/dist/model-usage.d.ts.map +1 -1
- package/dist/model-usage.js +9 -0
- package/dist/model-usage.js.map +1 -1
- package/dist/script-names.d.ts +11 -2
- package/dist/script-names.d.ts.map +1 -1
- package/dist/script-names.js +16 -3
- package/dist/script-names.js.map +1 -1
- package/dist/social-relay.d.ts +33 -0
- package/dist/social-relay.d.ts.map +1 -1
- package/dist/social-relay.js +28 -0
- package/dist/social-relay.js.map +1 -1
- package/dist/vertical-connector.d.ts +148 -0
- package/dist/vertical-connector.d.ts.map +1 -1
- package/dist/vertical-connector.js +81 -45
- package/dist/vertical-connector.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { scopeId, tenantId } from './ids.js';
|
|
3
|
+
/**
|
|
4
|
+
* A MANAGED tenant's sign-in client at its manager's team auth-server (#3202, D-72, #3261).
|
|
5
|
+
*
|
|
6
|
+
* A `provision-tenant` request may name one of the manager's own team auth-servers as the new
|
|
7
|
+
* tenant's issuer. The platform then registers the tenant a sign-in client there, delivers it
|
|
8
|
+
* to the tenant's scope as `substrat:auth`, and registers the scope as a place under the
|
|
9
|
+
* tenant's own key. Registering by open dynamic registration made a retry register a second
|
|
10
|
+
* client and orphan the first, and left nothing that could remove the client when the tenant
|
|
11
|
+
* ended. So the platform registers it through this protocol instead: two platform-gated
|
|
12
|
+
* routes on the issuer, each addressed by the issuer's OWN scope and refused unless that scope
|
|
13
|
+
* is the named tenant's instance, as for the machine client (#3134):
|
|
14
|
+
*
|
|
15
|
+
* - `POST /internal/managed-client` — ensure the managed app's client: register it, or give
|
|
16
|
+
* the one recorded for it a new secret.
|
|
17
|
+
* - `DELETE /internal/managed-client` — remove the managed app's client, and its place and
|
|
18
|
+
* redirect record at this issuer.
|
|
19
|
+
*
|
|
20
|
+
* ## One client per managed app, found by the app's scope
|
|
21
|
+
*
|
|
22
|
+
* The issuer records each client it registered here in its own `managed_client` table, keyed by
|
|
23
|
+
* the managed app's scope. The platform's retry repeats that scope id (it is the request's own),
|
|
24
|
+
* so a retry finds the client the first pass registered rather than registering another. Every
|
|
25
|
+
* verb finds its client there and nowhere else, so no verb can reach a client an operator
|
|
26
|
+
* registered in the console, somebody registered dynamically, or the dashboard registered for an
|
|
27
|
+
* app it installed.
|
|
28
|
+
*
|
|
29
|
+
* ## Every ensure answers a secret
|
|
30
|
+
*
|
|
31
|
+
* The issuer stores secrets hashed, and the platform keeps no copy of delivered config, so a
|
|
32
|
+
* retry cannot learn the secret the first pass delivered. An ensure therefore always answers
|
|
33
|
+
* one: the new client's, or a new one for the recorded client, which keeps its id. Its caller
|
|
34
|
+
* delivers it to the managed scope straight away. Tokens already issued are left alone.
|
|
35
|
+
*
|
|
36
|
+
* ## URIs come from the hostname
|
|
37
|
+
*
|
|
38
|
+
* An ensure names the managed app's hostname, never a URI. The issuer derives the callback and
|
|
39
|
+
* the post-logout targets from it (`clientRedirectUris`), as it does for a redirects delivery, so
|
|
40
|
+
* no call can register an arbitrary redirect.
|
|
41
|
+
*/
|
|
42
|
+
/** The issuer-side path of both verbs. */
|
|
43
|
+
export const MANAGED_CLIENT_PATH = '/internal/managed-client';
|
|
44
|
+
/** The issuer the call addresses: its own scope, and the tenant (the manager's) it must belong to. */
|
|
45
|
+
const issuerAddress = {
|
|
46
|
+
tenantId,
|
|
47
|
+
scopeId,
|
|
48
|
+
};
|
|
49
|
+
/** The managed app the client is for: the provisioned tenant, and its scope. */
|
|
50
|
+
const managedApp = {
|
|
51
|
+
appTenantId: tenantId,
|
|
52
|
+
appScopeId: scopeId,
|
|
53
|
+
};
|
|
54
|
+
/** A bare hostname: lowercase labels, no scheme, no port. */
|
|
55
|
+
const managedHostname = z
|
|
56
|
+
.string()
|
|
57
|
+
.max(253)
|
|
58
|
+
.regex(/^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]*[a-z0-9])?)+$/, 'a bare hostname');
|
|
59
|
+
/**
|
|
60
|
+
* `POST /internal/managed-client` — ensure the managed app's sign-in client. With none recorded
|
|
61
|
+
* for `appScopeId` the issuer registers one for `hostname`; with one recorded it gives it a new
|
|
62
|
+
* secret, sets its name, and adds `hostname`'s URIs if they are missing. Either way it answers
|
|
63
|
+
* the secret.
|
|
64
|
+
*/
|
|
65
|
+
export const managedClientEnsure = z
|
|
66
|
+
.object({
|
|
67
|
+
...issuerAddress,
|
|
68
|
+
...managedApp,
|
|
69
|
+
hostname: managedHostname,
|
|
70
|
+
clientName: z.string().trim().min(1).max(200),
|
|
71
|
+
})
|
|
72
|
+
.strict();
|
|
73
|
+
/** What an ensure answers. The issuer stores the secret hashed, and cannot answer it again. */
|
|
74
|
+
export const ensuredManagedClient = z.object({
|
|
75
|
+
clientId: z.string().min(1),
|
|
76
|
+
clientSecret: z.string().min(1),
|
|
77
|
+
/** True when this call registered the client, false when it gave the recorded one a new secret. */
|
|
78
|
+
registered: z.boolean(),
|
|
79
|
+
});
|
|
80
|
+
/**
|
|
81
|
+
* `DELETE /internal/managed-client` — remove the managed app's client and what it holds, its
|
|
82
|
+
* place (the `place_app` row under `appTenantId`, and the members reported under it) and the
|
|
83
|
+
* platform's redirect record for `appScopeId`. The place and the record go even when no client
|
|
84
|
+
* is recorded, so an app registered before this protocol is unlisted too. Repeating it is a no-op.
|
|
85
|
+
*/
|
|
86
|
+
export const managedClientRemove = z
|
|
87
|
+
.object({
|
|
88
|
+
...issuerAddress,
|
|
89
|
+
...managedApp,
|
|
90
|
+
})
|
|
91
|
+
.strict();
|
|
92
|
+
/** What a remove did: the client it deleted (null when none was recorded), and whether a place went. */
|
|
93
|
+
export const removedManagedClient = z.object({
|
|
94
|
+
removed: z.string().nullable(),
|
|
95
|
+
unlisted: z.boolean(),
|
|
96
|
+
});
|
|
97
|
+
//# sourceMappingURL=managed-client.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"managed-client.js","sourceRoot":"","sources":["../src/managed-client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAE7C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AAEH,0CAA0C;AAC1C,MAAM,CAAC,MAAM,mBAAmB,GAAG,0BAA0B,CAAC;AAE9D,sGAAsG;AACtG,MAAM,aAAa,GAAG;IACpB,QAAQ;IACR,OAAO;CACR,CAAC;AAEF,gFAAgF;AAChF,MAAM,UAAU,GAAG;IACjB,WAAW,EAAE,QAAQ;IACrB,UAAU,EAAE,OAAO;CACpB,CAAC;AAEF,6DAA6D;AAC7D,MAAM,eAAe,GAAG,CAAC;KACtB,MAAM,EAAE;KACR,GAAG,CAAC,GAAG,CAAC;KACR,KAAK,CAAC,yEAAyE,EAAE,iBAAiB,CAAC,CAAC;AAEvG;;;;;GAKG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC;KACjC,MAAM,CAAC;IACN,GAAG,aAAa;IAChB,GAAG,UAAU;IACb,QAAQ,EAAE,eAAe;IACzB,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC;CAC9C,CAAC;KACD,MAAM,EAAE,CAAC;AAGZ,+FAA+F;AAC/F,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC3C,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAC3B,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAC/B,mGAAmG;IACnG,UAAU,EAAE,CAAC,CAAC,OAAO,EAAE;CACxB,CAAC,CAAC;AAGH;;;;;GAKG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC;KACjC,MAAM,CAAC;IACN,GAAG,aAAa;IAChB,GAAG,UAAU;CACd,CAAC;KACD,MAAM,EAAE,CAAC;AAGZ,wGAAwG;AACxG,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC3C,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC9B,QAAQ,EAAE,CAAC,CAAC,OAAO,EAAE;CACtB,CAAC,CAAC"}
|
package/dist/model-usage.d.ts
CHANGED
|
@@ -131,6 +131,8 @@ export declare const modelUsageSummaryRow: z.ZodObject<{
|
|
|
131
131
|
cacheWriteTokens: z.ZodNumber;
|
|
132
132
|
listUsd: z.ZodString;
|
|
133
133
|
billedUsd: z.ZodString;
|
|
134
|
+
zeroRatedCalls: z.ZodDefault<z.ZodNumber>;
|
|
135
|
+
zeroRatedUsd: z.ZodDefault<z.ZodString>;
|
|
134
136
|
}, z.core.$strip>;
|
|
135
137
|
export type ModelUsageSummaryRow = z.infer<typeof modelUsageSummaryRow>;
|
|
136
138
|
export declare const modelUsageSummary: z.ZodObject<{
|
|
@@ -152,6 +154,8 @@ export declare const modelUsageSummary: z.ZodObject<{
|
|
|
152
154
|
cacheWriteTokens: z.ZodNumber;
|
|
153
155
|
listUsd: z.ZodString;
|
|
154
156
|
billedUsd: z.ZodString;
|
|
157
|
+
zeroRatedCalls: z.ZodDefault<z.ZodNumber>;
|
|
158
|
+
zeroRatedUsd: z.ZodDefault<z.ZodString>;
|
|
155
159
|
}, z.core.$strip>>;
|
|
156
160
|
totals: z.ZodObject<{
|
|
157
161
|
calls: z.ZodNumber;
|
|
@@ -160,6 +164,8 @@ export declare const modelUsageSummary: z.ZodObject<{
|
|
|
160
164
|
outputTokens: z.ZodNumber;
|
|
161
165
|
listUsd: z.ZodString;
|
|
162
166
|
billedUsd: z.ZodString;
|
|
167
|
+
zeroRatedCalls: z.ZodDefault<z.ZodNumber>;
|
|
168
|
+
zeroRatedUsd: z.ZodDefault<z.ZodString>;
|
|
163
169
|
}, z.core.$strip>;
|
|
164
170
|
}, z.core.$strip>;
|
|
165
171
|
export type ModelUsageSummary = z.infer<typeof modelUsageSummary>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"model-usage.d.ts","sourceRoot":"","sources":["../src/model-usage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,gBAAgB;;;;;;kBAclB,CAAC;AACZ,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAEhE,QAAA,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;iBA6BxB,CAAC;AAEH;;;;;;;;GAQG;AACH,eAAO,MAAM,iBAAiB,SAAU,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,KAA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H,eAAO,MAAM,gBAAgB,gBAAgB,CAAC;AAE9C,yFAAyF;AACzF,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;iBAUiC,CAAC;AAC9D,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AAE9D;;;;;;;;;;GAUG;AACH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;iBAqB/B,CAAC;AACH,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAExE,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAiB5B,CAAC;AACH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAElE;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CASpD"}
|
package/dist/model-usage.js
CHANGED
|
@@ -124,6 +124,13 @@ export const modelUsageSummaryRow = z.object({
|
|
|
124
124
|
cacheWriteTokens: z.number().int().nonnegative(),
|
|
125
125
|
listUsd: z.string(),
|
|
126
126
|
billedUsd: z.string(),
|
|
127
|
+
/**
|
|
128
|
+
* Calls priced at zero for now (#2365: a code review, in the runner's preview phases), and what
|
|
129
|
+
* they would cost at the platform's rate. Their list price stays in `listUsd`; `billedUsd`
|
|
130
|
+
* leaves them out. Default 0, so a summary from a plane before this field still parses.
|
|
131
|
+
*/
|
|
132
|
+
zeroRatedCalls: z.number().int().nonnegative().default(0),
|
|
133
|
+
zeroRatedUsd: z.string().default('0'),
|
|
127
134
|
});
|
|
128
135
|
export const modelUsageSummary = z.object({
|
|
129
136
|
readAt: instant,
|
|
@@ -139,6 +146,8 @@ export const modelUsageSummary = z.object({
|
|
|
139
146
|
outputTokens: z.number().int().nonnegative(),
|
|
140
147
|
listUsd: z.string(),
|
|
141
148
|
billedUsd: z.string(),
|
|
149
|
+
zeroRatedCalls: z.number().int().nonnegative().default(0),
|
|
150
|
+
zeroRatedUsd: z.string().default('0'),
|
|
142
151
|
}),
|
|
143
152
|
});
|
|
144
153
|
/**
|
package/dist/model-usage.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"model-usage.js","sourceRoot":"","sources":["../src/model-usage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAEtD;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC;KAC9B,MAAM,CAAC;IACN,MAAM,EAAE,QAAQ;IAChB,KAAK,EAAE,OAAO;IACd;;;OAGG;IACH,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAC3B,oFAAoF;IACpF,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAC1B,6EAA6E;IAC7E,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;CAC7B,CAAC;KACD,MAAM,EAAE,CAAC;AAGZ,MAAM,oBAAoB,GAAG,CAAC,CAAC,MAAM,CAAC;IACpC,WAAW,EAAE,gBAAgB;IAC7B,qCAAqC;IACrC,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACxB,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAC3B,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAC1B;;;OAGG;IACH,QAAQ,EAAE,CAAC,CAAC,OAAO,EAAE;IACrB,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,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,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,GAAG,GAAG,CAAC,CAAC;IAC5C,MAAM,IAAI,GAAG,MAAM,CAAC,OAAO,GAAG,GAAG,CAAC;SAC/B,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC;SAChB,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;IACtB,OAAO,IAAI,CAAC,CAAC,CAAC,GAAG,KAAK,IAAI,IAAI,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AACnD,CAAC"}
|
package/dist/script-names.d.ts
CHANGED
|
@@ -29,6 +29,15 @@ export declare function verticalScriptStem(slug: string): string;
|
|
|
29
29
|
* prefix or starts with it, which covers its stable, jurisdictional and per-version scripts.
|
|
30
30
|
*/
|
|
31
31
|
export declare const SCOPE_STORE_SCRIPT_PREFIX = "substrat-store-";
|
|
32
|
+
/**
|
|
33
|
+
* The name space first-party connector scripts are deployed into (docs/rfc/connector-scripts.md):
|
|
34
|
+
* `substrat-connector-<provider>`, in the same dispatch namespace as every vertical's scripts. Held
|
|
35
|
+
* like {@link SCOPE_STORE_SCRIPT_PREFIX}: {@link platformScriptCollision} refuses a slug whose stem
|
|
36
|
+
* falls inside it, so the router can never be pointed at a vertical through a connector's name.
|
|
37
|
+
*/
|
|
38
|
+
export declare const CONNECTOR_SCRIPT_PREFIX = "substrat-connector-";
|
|
39
|
+
/** The script a first-party connector is deployed as. A provider slug is already script-safe. */
|
|
40
|
+
export declare function connectorScriptName(provider: string): string;
|
|
32
41
|
/** A store driver id (L20). No `-` and no `_`, which is what keeps {@link scopeStoreScriptName} injective. */
|
|
33
42
|
export declare const STORE_DRIVER_ID: RegExp;
|
|
34
43
|
/**
|
|
@@ -59,8 +68,8 @@ export declare function scopeStoreCanaryScriptName(driver: string): string;
|
|
|
59
68
|
/**
|
|
60
69
|
* The platform script name a vertical with this slug would deploy under, or `null`. Checks the
|
|
61
70
|
* stable script and its jurisdictional variants. A per-version script ends in a 26-character
|
|
62
|
-
* ULID, which no platform name does. A stem inside the scope-store
|
|
63
|
-
* itself: every script the slug could deploy under would fall in it.
|
|
71
|
+
* ULID, which no platform name does. A stem inside the scope-store or the connector-script name
|
|
72
|
+
* space is returned as itself: every script the slug could deploy under would fall in it.
|
|
64
73
|
*/
|
|
65
74
|
export declare function platformScriptCollision(slug: string): string | null;
|
|
66
75
|
/** The refusal a registration or a deploy gives for {@link platformScriptCollision}. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"script-names.d.ts","sourceRoot":"","sources":["../src/script-names.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,iFAAiF;AACjF,eAAO,MAAM,mBAAmB,EAAE,SAAS,MAAM,EAAgD,CAAC;AAElG,uEAAuE;AACvE,eAAO,MAAM,qBAAqB,EAAE,WAAW,CAAC,MAAM,CAcpD,CAAC;AAKH;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEvD;AAED;;;;;GAKG;AACH,eAAO,MAAM,yBAAyB,oBAAoB,CAAC;AAE3D,8GAA8G;AAC9G,eAAO,MAAM,eAAe,QAAgB,CAAC;AAK7C;;;;;;;;;;;;GAYG;AACH,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAQ7E;AAED;;;GAGG;AACH,eAAO,MAAM,kBAAkB,YAAY,CAAC;AAE5C;;;;GAIG;AACH,wBAAgB,0BAA0B,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAKjE;AAED;;;;;GAKG;AACH,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAOnE;AAED,wFAAwF;AACxF,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,CAE7E"}
|
|
1
|
+
{"version":3,"file":"script-names.d.ts","sourceRoot":"","sources":["../src/script-names.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,iFAAiF;AACjF,eAAO,MAAM,mBAAmB,EAAE,SAAS,MAAM,EAAgD,CAAC;AAElG,uEAAuE;AACvE,eAAO,MAAM,qBAAqB,EAAE,WAAW,CAAC,MAAM,CAcpD,CAAC;AAKH;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEvD;AAED;;;;;GAKG;AACH,eAAO,MAAM,yBAAyB,oBAAoB,CAAC;AAE3D;;;;;GAKG;AACH,eAAO,MAAM,uBAAuB,wBAAwB,CAAC;AAE7D,iGAAiG;AACjG,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAG5D;AAED,8GAA8G;AAC9G,eAAO,MAAM,eAAe,QAAgB,CAAC;AAK7C;;;;;;;;;;;;GAYG;AACH,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAQ7E;AAED;;;GAGG;AACH,eAAO,MAAM,kBAAkB,YAAY,CAAC;AAE5C;;;;GAIG;AACH,wBAAgB,0BAA0B,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAKjE;AAED;;;;;GAKG;AACH,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAOnE;AAED,wFAAwF;AACxF,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,CAE7E"}
|
package/dist/script-names.js
CHANGED
|
@@ -47,6 +47,19 @@ export function verticalScriptStem(slug) {
|
|
|
47
47
|
* prefix or starts with it, which covers its stable, jurisdictional and per-version scripts.
|
|
48
48
|
*/
|
|
49
49
|
export const SCOPE_STORE_SCRIPT_PREFIX = 'substrat-store-';
|
|
50
|
+
/**
|
|
51
|
+
* The name space first-party connector scripts are deployed into (docs/rfc/connector-scripts.md):
|
|
52
|
+
* `substrat-connector-<provider>`, in the same dispatch namespace as every vertical's scripts. Held
|
|
53
|
+
* like {@link SCOPE_STORE_SCRIPT_PREFIX}: {@link platformScriptCollision} refuses a slug whose stem
|
|
54
|
+
* falls inside it, so the router can never be pointed at a vertical through a connector's name.
|
|
55
|
+
*/
|
|
56
|
+
export const CONNECTOR_SCRIPT_PREFIX = 'substrat-connector-';
|
|
57
|
+
/** The script a first-party connector is deployed as. A provider slug is already script-safe. */
|
|
58
|
+
export function connectorScriptName(provider) {
|
|
59
|
+
if (!/^[a-z0-9][a-z0-9-]*$/.test(provider))
|
|
60
|
+
throw new Error(`not a first-party provider: '${provider}'`);
|
|
61
|
+
return `${CONNECTOR_SCRIPT_PREFIX}${provider}`;
|
|
62
|
+
}
|
|
50
63
|
/** A store driver id (L20). No `-` and no `_`, which is what keeps {@link scopeStoreScriptName} injective. */
|
|
51
64
|
export const STORE_DRIVER_ID = /^[a-z0-9]+$/;
|
|
52
65
|
/** The registry id grammar `verticalSlug` parses (ids.ts), repeated so this file imports nothing. */
|
|
@@ -92,12 +105,12 @@ export function scopeStoreCanaryScriptName(driver) {
|
|
|
92
105
|
/**
|
|
93
106
|
* The platform script name a vertical with this slug would deploy under, or `null`. Checks the
|
|
94
107
|
* stable script and its jurisdictional variants. A per-version script ends in a 26-character
|
|
95
|
-
* ULID, which no platform name does. A stem inside the scope-store
|
|
96
|
-
* itself: every script the slug could deploy under would fall in it.
|
|
108
|
+
* ULID, which no platform name does. A stem inside the scope-store or the connector-script name
|
|
109
|
+
* space is returned as itself: every script the slug could deploy under would fall in it.
|
|
97
110
|
*/
|
|
98
111
|
export function platformScriptCollision(slug) {
|
|
99
112
|
const stem = verticalScriptStem(slug);
|
|
100
|
-
if (`${stem}-`.startsWith(SCOPE_STORE_SCRIPT_PREFIX))
|
|
113
|
+
if (`${stem}-`.startsWith(SCOPE_STORE_SCRIPT_PREFIX) || `${stem}-`.startsWith(CONNECTOR_SCRIPT_PREFIX))
|
|
101
114
|
return stem;
|
|
102
115
|
for (const name of [stem, ...JURISDICTION_SUFFIXES.map((j) => `${stem}-${j}`)]) {
|
|
103
116
|
if (PLATFORM_SCRIPT_NAMES.has(name))
|
package/dist/script-names.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"script-names.js","sourceRoot":"","sources":["../src/script-names.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,iFAAiF;AACjF,MAAM,CAAC,MAAM,mBAAmB,GAAsB,CAAC,iBAAiB,EAAE,sBAAsB,CAAC,CAAC;AAElG,uEAAuE;AACvE,MAAM,CAAC,MAAM,qBAAqB,GAAwB,IAAI,GAAG,CAAC;IAChE,GAAG,mBAAmB;IACtB,sBAAsB;IACtB,kBAAkB;IAClB,uBAAuB;IACvB,wBAAwB;IACxB,6BAA6B;IAC7B,oBAAoB;IACpB,yBAAyB;IACzB,eAAe;IACf,uBAAuB;IACvB,4BAA4B;IAC5B,0BAA0B;IAC1B,+BAA+B;CAChC,CAAC,CAAC;AAEH,sGAAsG;AACtG,MAAM,qBAAqB,GAAG,CAAC,IAAI,EAAE,IAAI,CAAU,CAAC;AAEpD;;;;GAIG;AACH,MAAM,UAAU,kBAAkB,CAAC,IAAY;IAC7C,OAAO,IAAI,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,eAAe,EAAE,GAAG,CAAC,CAAC,OAAO,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC;AAClF,CAAC;AAED;;;;;GAKG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,iBAAiB,CAAC;AAE3D,8GAA8G;AAC9G,MAAM,CAAC,MAAM,eAAe,GAAG,aAAa,CAAC;AAE7C,qGAAqG;AACrG,MAAM,aAAa,GAAG,uEAAuE,CAAC;AAE9F;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,oBAAoB,CAAC,QAAgB,EAAE,MAAc;IACnE,IAAI,CAAC,eAAe,CA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const socialRelayDelivery: z.ZodObject<{
|
|
|
95
95
|
}, z.core.$strip>>;
|
|
96
96
|
}, z.core.$strip>;
|
|
97
97
|
export type SocialRelayDelivery = z.infer<typeof socialRelayDelivery>;
|
|
98
|
+
/**
|
|
99
|
+
* Where an Auth Server install asks the control plane to reconcile ITS OWN relay client (#1544):
|
|
100
|
+
* the self-heal for an install whose install-time reconcile failed, that predates the relay, or
|
|
101
|
+
* that was registered before the relay gained a provider. Gated like every relay the control
|
|
102
|
+
* plane serves (the platform credential, and the caller the egress worker proves), and held to
|
|
103
|
+
* the caller's own scope there.
|
|
104
|
+
*
|
|
105
|
+
* `hasClient` is what the install says about itself: that it holds a relay client already. It
|
|
106
|
+
* can only NARROW what the call may do — with it the platform never rotates the client's secret,
|
|
107
|
+
* and without it a rotation still happens only when the install's own delivery answers
|
|
108
|
+
* `SOCIAL_RELAY_SECRET_NEEDED`, which an install holding a working secret never does.
|
|
109
|
+
*/
|
|
110
|
+
export declare const SOCIAL_RELAY_SELF_PATH = "/internal/social-relay/self";
|
|
111
|
+
export declare const socialRelaySelfRequest: z.ZodObject<{
|
|
112
|
+
tenantId: z.core.$ZodBranded<z.ZodString, "TenantId", "out">;
|
|
113
|
+
scopeId: z.core.$ZodBranded<z.ZodString, "ScopeId", "out">;
|
|
114
|
+
hasClient: z.ZodBoolean;
|
|
115
|
+
}, z.core.$strip>;
|
|
116
|
+
export type SocialRelaySelfRequest = z.infer<typeof socialRelaySelfRequest>;
|
|
117
|
+
/**
|
|
118
|
+
* What the self call answers on a 200: the reconcile's outcome. `delivered` names the providers
|
|
119
|
+
* delivered; `skipped` says why nothing was (no hostname yet, no provider, or a rotation only a
|
|
120
|
+
* platform operator may make). Read loosely by the install, which shows it to its operator.
|
|
121
|
+
*/
|
|
122
|
+
export declare const socialRelaySelfOutcome: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
123
|
+
status: z.ZodLiteral<"delivered">;
|
|
124
|
+
providers: z.ZodArray<z.ZodString>;
|
|
125
|
+
rotated: z.ZodBoolean;
|
|
126
|
+
}, z.core.$loose>, z.ZodObject<{
|
|
127
|
+
status: z.ZodLiteral<"skipped">;
|
|
128
|
+
reason: z.ZodString;
|
|
129
|
+
}, z.core.$loose>], "status">;
|
|
130
|
+
export type SocialRelaySelfOutcome = z.infer<typeof socialRelaySelfOutcome>;
|
|
98
131
|
//# sourceMappingURL=social-relay.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"social-relay.d.ts","sourceRoot":"","sources":["../src/social-relay.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"social-relay.d.ts","sourceRoot":"","sources":["../src/social-relay.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,eAAO,MAAM,uBAAuB,0BAA0B,CAAC;AAE/D;;;;;GAKG;AACH,eAAO,MAAM,sBAAsB,EAAE,SAAS,MAAM,EAAoB,CAAC;AAEzE;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAExD;AAED,+FAA+F;AAC/F,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAE1D;AAED,yFAAyF;AACzF,eAAO,MAAM,oBAAoB;;;;;iBAK/B,CAAC;AACH,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAExE,+FAA+F;AAC/F,eAAO,MAAM,mBAAmB;;;;;;;;;;iBAK9B,CAAC;AACH,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAEtE,eAAO,MAAM,oBAAoB;;;;;;;;;;;;iBAAgE,CAAC;AAElG,wGAAwG;AACxG,eAAO,MAAM,0BAA0B,+BAA+B,CAAC;AAEvE,sDAAsD;AACtD,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;iBAI9B,CAAC;AACH,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAEtE;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,sBAAsB,gCAAgC,CAAC;AAEpE,eAAO,MAAM,sBAAsB;;;;iBAIjC,CAAC;AACH,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAE5E;;;;GAIG;AACH,eAAO,MAAM,sBAAsB;;;;;;;6BAGjC,CAAC;AACH,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC"}
|
package/dist/social-relay.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
+
import { scopeId, tenantId } from './ids.js';
|
|
2
3
|
/**
|
|
3
4
|
* PLATFORM-PROVIDED social sign-in for a team Auth Server (#1544).
|
|
4
5
|
*
|
|
@@ -69,4 +70,31 @@ export const socialRelayDelivery = z.object({
|
|
|
69
70
|
clientSecret: z.string().min(1).max(500).optional(),
|
|
70
71
|
providers: z.array(socialRelayProvider).max(32),
|
|
71
72
|
});
|
|
73
|
+
/**
|
|
74
|
+
* Where an Auth Server install asks the control plane to reconcile ITS OWN relay client (#1544):
|
|
75
|
+
* the self-heal for an install whose install-time reconcile failed, that predates the relay, or
|
|
76
|
+
* that was registered before the relay gained a provider. Gated like every relay the control
|
|
77
|
+
* plane serves (the platform credential, and the caller the egress worker proves), and held to
|
|
78
|
+
* the caller's own scope there.
|
|
79
|
+
*
|
|
80
|
+
* `hasClient` is what the install says about itself: that it holds a relay client already. It
|
|
81
|
+
* can only NARROW what the call may do — with it the platform never rotates the client's secret,
|
|
82
|
+
* and without it a rotation still happens only when the install's own delivery answers
|
|
83
|
+
* `SOCIAL_RELAY_SECRET_NEEDED`, which an install holding a working secret never does.
|
|
84
|
+
*/
|
|
85
|
+
export const SOCIAL_RELAY_SELF_PATH = '/internal/social-relay/self';
|
|
86
|
+
export const socialRelaySelfRequest = z.object({
|
|
87
|
+
tenantId,
|
|
88
|
+
scopeId,
|
|
89
|
+
hasClient: z.boolean(),
|
|
90
|
+
});
|
|
91
|
+
/**
|
|
92
|
+
* What the self call answers on a 200: the reconcile's outcome. `delivered` names the providers
|
|
93
|
+
* delivered; `skipped` says why nothing was (no hostname yet, no provider, or a rotation only a
|
|
94
|
+
* platform operator may make). Read loosely by the install, which shows it to its operator.
|
|
95
|
+
*/
|
|
96
|
+
export const socialRelaySelfOutcome = z.discriminatedUnion('status', [
|
|
97
|
+
z.object({ status: z.literal('delivered'), providers: z.array(z.string()), rotated: z.boolean() }).passthrough(),
|
|
98
|
+
z.object({ status: z.literal('skipped'), reason: z.string() }).passthrough(),
|
|
99
|
+
]);
|
|
72
100
|
//# sourceMappingURL=social-relay.js.map
|
package/dist/social-relay.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"social-relay.js","sourceRoot":"","sources":["../src/social-relay.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"social-relay.js","sourceRoot":"","sources":["../src/social-relay.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAE7C;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,uBAAuB,CAAC;AAE/D;;;;;GAKG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAsB,CAAC,aAAa,CAAC,CAAC;AAEzE;;;;GAIG;AACH,MAAM,UAAU,eAAe,CAAC,QAAgB;IAC9C,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CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC;IACpC,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE;IACnD,SAAS,EAAE,CAAC,CAAC,KAAK,CAAC,mBAAmB,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC;CAChD,CAAC,CAAC;AAGH;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,6BAA6B,CAAC;AAEpE,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC7C,QAAQ;IACR,OAAO;IACP,SAAS,EAAE,CAAC,CAAC,OAAO,EAAE;CACvB,CAAC,CAAC;AAGH;;;;GAIG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,CAAC,kBAAkB,CAAC,QAAQ,EAAE;IACnE,CAAC,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,OAAO,CAAC,WAAW,CAAC,EAAE,SAAS,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,WAAW,EAAE;IAChH,CAAC,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,WAAW,EAAE;CAC7E,CAAC,CAAC"}
|
|
@@ -124,6 +124,12 @@ export declare const verticalConnectorBinding: z.ZodObject<{
|
|
|
124
124
|
boundAt: z.core.$ZodBranded<z.ZodString, "Instant", "out">;
|
|
125
125
|
}, z.core.$strict>;
|
|
126
126
|
export type VerticalConnectorBinding = z.infer<typeof verticalConnectorBinding>;
|
|
127
|
+
/**
|
|
128
|
+
* A first-party provider: a plain slug, no dot (§4). What a connector deployed as its own platform
|
|
129
|
+
* script is called for (docs/rfc/connector-scripts.md), so the two kinds can never be confused on
|
|
130
|
+
* one wire.
|
|
131
|
+
*/
|
|
132
|
+
export declare const firstPartyConnectorProvider: z.ZodString;
|
|
127
133
|
/** The connection a call is made for, with its opened credential. Never anything else's. */
|
|
128
134
|
export declare const connectorCallConnection: z.ZodObject<{
|
|
129
135
|
id: z.core.$ZodBranded<z.ZodString, "ConnectionId", "out">;
|
|
@@ -262,6 +268,148 @@ export declare const connectorCallRequest: z.ZodDiscriminatedUnion<[z.ZodObject<
|
|
|
262
268
|
}, z.core.$strict>>;
|
|
263
269
|
}, z.core.$strict>], "role">;
|
|
264
270
|
export type ConnectorCallRequest = z.infer<typeof connectorCallRequest>;
|
|
271
|
+
/** Keys a connector script's per-call configuration may carry. */
|
|
272
|
+
export declare const CONNECTOR_SCRIPT_CONFIG_MAX_KEYS = 16;
|
|
273
|
+
/**
|
|
274
|
+
* The deployment's configuration for one call into a first-party connector script: which provider
|
|
275
|
+
* environment, which host overrides. Sent by the control plane, which holds it, so a script holds
|
|
276
|
+
* no configuration of its own and the hosts its egress admits are derived from the same values.
|
|
277
|
+
* Never a credential: that travels as `secret` or `connection.secret`.
|
|
278
|
+
*/
|
|
279
|
+
export declare const connectorScriptConfig: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
280
|
+
/**
|
|
281
|
+
* The same call, made to a first-party connector deployed as its own platform script rather than
|
|
282
|
+
* run inside the control plane (docs/rfc/connector-scripts.md). The response is
|
|
283
|
+
* `connectorCallResponse`, unchanged.
|
|
284
|
+
*/
|
|
285
|
+
export declare const connectorScriptCallRequest: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
286
|
+
role: z.ZodLiteral<"probe-candidate">;
|
|
287
|
+
provider: z.ZodString;
|
|
288
|
+
secret: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
289
|
+
config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
290
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
291
|
+
role: z.ZodLiteral<"probe">;
|
|
292
|
+
provider: z.ZodString;
|
|
293
|
+
connection: z.ZodObject<{
|
|
294
|
+
id: z.core.$ZodBranded<z.ZodString, "ConnectionId", "out">;
|
|
295
|
+
tenantId: z.core.$ZodBranded<z.ZodString, "TenantId", "out">;
|
|
296
|
+
vertical: z.ZodString;
|
|
297
|
+
provider: z.ZodString;
|
|
298
|
+
externalAccountRef: z.ZodNullable<z.ZodString>;
|
|
299
|
+
expiresAt: z.ZodNullable<z.core.$ZodBranded<z.ZodString, "Instant", "out">>;
|
|
300
|
+
secret: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
301
|
+
}, z.core.$strict>;
|
|
302
|
+
state: z.ZodArray<z.ZodObject<{
|
|
303
|
+
key: z.ZodString;
|
|
304
|
+
value: z.ZodUnknown;
|
|
305
|
+
}, z.core.$strict>>;
|
|
306
|
+
config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
307
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
308
|
+
role: z.ZodLiteral<"bind">;
|
|
309
|
+
provider: z.ZodString;
|
|
310
|
+
connection: z.ZodObject<{
|
|
311
|
+
id: z.core.$ZodBranded<z.ZodString, "ConnectionId", "out">;
|
|
312
|
+
tenantId: z.core.$ZodBranded<z.ZodString, "TenantId", "out">;
|
|
313
|
+
vertical: z.ZodString;
|
|
314
|
+
provider: z.ZodString;
|
|
315
|
+
externalAccountRef: z.ZodNullable<z.ZodString>;
|
|
316
|
+
expiresAt: z.ZodNullable<z.core.$ZodBranded<z.ZodString, "Instant", "out">>;
|
|
317
|
+
secret: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
318
|
+
}, z.core.$strict>;
|
|
319
|
+
scopeId: z.core.$ZodBranded<z.ZodString, "ScopeId", "out">;
|
|
320
|
+
options: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
321
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
322
|
+
role: z.ZodLiteral<"sweep">;
|
|
323
|
+
provider: z.ZodString;
|
|
324
|
+
connection: z.ZodObject<{
|
|
325
|
+
id: z.core.$ZodBranded<z.ZodString, "ConnectionId", "out">;
|
|
326
|
+
tenantId: z.core.$ZodBranded<z.ZodString, "TenantId", "out">;
|
|
327
|
+
vertical: z.ZodString;
|
|
328
|
+
provider: z.ZodString;
|
|
329
|
+
externalAccountRef: z.ZodNullable<z.ZodString>;
|
|
330
|
+
expiresAt: z.ZodNullable<z.core.$ZodBranded<z.ZodString, "Instant", "out">>;
|
|
331
|
+
secret: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
332
|
+
}, z.core.$strict>;
|
|
333
|
+
binding: z.ZodObject<{
|
|
334
|
+
scopeId: z.core.$ZodBranded<z.ZodString, "ScopeId", "out">;
|
|
335
|
+
operation: z.ZodString;
|
|
336
|
+
permission: z.core.$ZodBranded<z.ZodString, "PermissionKey", "out">;
|
|
337
|
+
options: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
338
|
+
declared: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
339
|
+
boundAt: z.core.$ZodBranded<z.ZodString, "Instant", "out">;
|
|
340
|
+
}, z.core.$strict>;
|
|
341
|
+
state: z.ZodArray<z.ZodObject<{
|
|
342
|
+
key: z.ZodString;
|
|
343
|
+
value: z.ZodUnknown;
|
|
344
|
+
}, z.core.$strict>>;
|
|
345
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
346
|
+
role: z.ZodLiteral<"dispatch">;
|
|
347
|
+
provider: z.ZodString;
|
|
348
|
+
connection: z.ZodObject<{
|
|
349
|
+
id: z.core.$ZodBranded<z.ZodString, "ConnectionId", "out">;
|
|
350
|
+
tenantId: z.core.$ZodBranded<z.ZodString, "TenantId", "out">;
|
|
351
|
+
vertical: z.ZodString;
|
|
352
|
+
provider: z.ZodString;
|
|
353
|
+
externalAccountRef: z.ZodNullable<z.ZodString>;
|
|
354
|
+
expiresAt: z.ZodNullable<z.core.$ZodBranded<z.ZodString, "Instant", "out">>;
|
|
355
|
+
secret: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
356
|
+
}, z.core.$strict>;
|
|
357
|
+
scopeId: z.core.$ZodBranded<z.ZodString, "ScopeId", "out">;
|
|
358
|
+
binding: z.ZodNullable<z.ZodObject<{
|
|
359
|
+
scopeId: z.core.$ZodBranded<z.ZodString, "ScopeId", "out">;
|
|
360
|
+
operation: z.ZodString;
|
|
361
|
+
permission: z.core.$ZodBranded<z.ZodString, "PermissionKey", "out">;
|
|
362
|
+
options: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
363
|
+
declared: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
364
|
+
boundAt: z.core.$ZodBranded<z.ZodString, "Instant", "out">;
|
|
365
|
+
}, z.core.$strict>>;
|
|
366
|
+
event: z.ZodObject<{
|
|
367
|
+
id: z.core.$ZodBranded<z.ZodString, "EventId", "out">;
|
|
368
|
+
type: z.ZodString;
|
|
369
|
+
schemaVersion: z.ZodNumber;
|
|
370
|
+
occurredAt: z.core.$ZodBranded<z.ZodString, "Instant", "out">;
|
|
371
|
+
tenantId: z.core.$ZodBranded<z.ZodString, "TenantId", "out">;
|
|
372
|
+
scopeId: z.core.$ZodBranded<z.ZodString, "ScopeId", "out">;
|
|
373
|
+
actor: z.ZodUnion<readonly [z.core.$ZodBranded<z.ZodString, "PrincipalId", "out">, z.ZodObject<{
|
|
374
|
+
system: z.core.$ZodBranded<z.ZodString, "ModuleId", "out">;
|
|
375
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
376
|
+
connection: z.ZodString;
|
|
377
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
378
|
+
capability: z.core.$ZodBranded<z.ZodString, "CapabilityId", "out">;
|
|
379
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
380
|
+
vertical: z.ZodString;
|
|
381
|
+
scope: z.core.$ZodBranded<z.ZodString, "ScopeId", "out">;
|
|
382
|
+
}, z.core.$strip>]>;
|
|
383
|
+
entity: z.ZodObject<{
|
|
384
|
+
entityType: z.ZodString;
|
|
385
|
+
entityId: z.ZodString;
|
|
386
|
+
}, z.core.$strip>;
|
|
387
|
+
piiClass: z.ZodEnum<{
|
|
388
|
+
direct: "direct";
|
|
389
|
+
none: "none";
|
|
390
|
+
pseudonymous: "pseudonymous";
|
|
391
|
+
}>;
|
|
392
|
+
subjectId: z.ZodOptional<z.core.$ZodBranded<z.ZodString, "DataSubjectId", "out">>;
|
|
393
|
+
authorization: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
394
|
+
permission: z.core.$ZodBranded<z.ZodString, "PermissionKey", "out">;
|
|
395
|
+
grant: z.ZodOptional<z.ZodString>;
|
|
396
|
+
}, z.core.$strip>>>;
|
|
397
|
+
impersonation: z.ZodOptional<z.ZodObject<{
|
|
398
|
+
session: z.core.$ZodBranded<z.ZodString, "ImpersonationSessionId", "out">;
|
|
399
|
+
by: z.core.$ZodBranded<z.ZodString, "PlatformActorId", "out">;
|
|
400
|
+
}, z.core.$strip>>;
|
|
401
|
+
delegation: z.ZodOptional<z.ZodObject<{
|
|
402
|
+
actor: z.ZodString;
|
|
403
|
+
}, z.core.$strip>>;
|
|
404
|
+
operation: z.ZodOptional<z.ZodString>;
|
|
405
|
+
payload: z.ZodUnknown;
|
|
406
|
+
}, z.core.$strip>;
|
|
407
|
+
state: z.ZodArray<z.ZodObject<{
|
|
408
|
+
key: z.ZodString;
|
|
409
|
+
value: z.ZodUnknown;
|
|
410
|
+
}, z.core.$strict>>;
|
|
411
|
+
}, z.core.$strict>], "role">;
|
|
412
|
+
export type ConnectorScriptCallRequest = z.infer<typeof connectorScriptCallRequest>;
|
|
265
413
|
/**
|
|
266
414
|
* The vertical's answer. On `ok: false` no state write is applied; `refused` says the connector
|
|
267
415
|
* threw `ConnectorRefusal` (terminal) rather than failing in a way worth retrying.
|
|
@@ -1 +1 @@
|
|
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