@w6w/sdk 0.5.0 → 0.9.8
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 +185 -32
- package/dist/mod.d.ts +10 -4
- package/dist/mod.d.ts.map +1 -1
- package/dist/mod.js +3 -0
- package/dist/mod.js.map +1 -1
- package/dist/src/client.d.ts +37 -5
- package/dist/src/client.d.ts.map +1 -1
- package/dist/src/client.js +40 -5
- package/dist/src/client.js.map +1 -1
- package/dist/src/config.d.ts +83 -6
- package/dist/src/config.d.ts.map +1 -1
- package/dist/src/config.js +41 -5
- package/dist/src/config.js.map +1 -1
- package/dist/src/connections.d.ts +3 -2
- package/dist/src/connections.d.ts.map +1 -1
- package/dist/src/connections.js +7 -2
- package/dist/src/connections.js.map +1 -1
- package/dist/src/console/aliases.d.ts +137 -0
- package/dist/src/console/aliases.d.ts.map +1 -0
- package/dist/src/console/aliases.js +113 -0
- package/dist/src/console/aliases.js.map +1 -0
- package/dist/src/console/api-calls.d.ts +4 -3
- package/dist/src/console/api-calls.d.ts.map +1 -1
- package/dist/src/console/api-calls.js +4 -3
- package/dist/src/console/api-calls.js.map +1 -1
- package/dist/src/console/apps.d.ts +181 -8
- package/dist/src/console/apps.d.ts.map +1 -1
- package/dist/src/console/apps.js +67 -12
- package/dist/src/console/apps.js.map +1 -1
- package/dist/src/console/auth.d.ts +245 -7
- package/dist/src/console/auth.d.ts.map +1 -1
- package/dist/src/console/auth.js +177 -8
- package/dist/src/console/auth.js.map +1 -1
- package/dist/src/console/commerce.d.ts +428 -0
- package/dist/src/console/commerce.d.ts.map +1 -0
- package/dist/src/console/commerce.js +220 -0
- package/dist/src/console/commerce.js.map +1 -0
- package/dist/src/console/dashboard.d.ts +8 -0
- package/dist/src/console/dashboard.d.ts.map +1 -1
- package/dist/src/console/dashboard.js.map +1 -1
- package/dist/src/console/endpoints.d.ts +79 -6
- package/dist/src/console/endpoints.d.ts.map +1 -1
- package/dist/src/console/endpoints.js.map +1 -1
- package/dist/src/console/functions.d.ts +35 -4
- package/dist/src/console/functions.d.ts.map +1 -1
- package/dist/src/console/functions.js +13 -0
- package/dist/src/console/functions.js.map +1 -1
- package/dist/src/console/mod.d.ts +32 -7
- package/dist/src/console/mod.d.ts.map +1 -1
- package/dist/src/console/mod.js +26 -1
- package/dist/src/console/mod.js.map +1 -1
- package/dist/src/console/otp.d.ts +127 -0
- package/dist/src/console/otp.d.ts.map +1 -0
- package/dist/src/console/otp.js +118 -0
- package/dist/src/console/otp.js.map +1 -0
- package/dist/src/console/passkeys.d.ts +246 -0
- package/dist/src/console/passkeys.d.ts.map +1 -0
- package/dist/src/console/passkeys.js +192 -0
- package/dist/src/console/passkeys.js.map +1 -0
- package/dist/src/console/reliability.d.ts +101 -6
- package/dist/src/console/reliability.d.ts.map +1 -1
- package/dist/src/console/reliability.js +16 -5
- package/dist/src/console/reliability.js.map +1 -1
- package/dist/src/console/step-tests.d.ts +7 -1
- package/dist/src/console/step-tests.d.ts.map +1 -1
- package/dist/src/console/step-tests.js +1 -1
- package/dist/src/console/step-tests.js.map +1 -1
- package/dist/src/console/subscriptions.d.ts +38 -16
- package/dist/src/console/subscriptions.d.ts.map +1 -1
- package/dist/src/console/subscriptions.js +7 -13
- package/dist/src/console/subscriptions.js.map +1 -1
- package/dist/src/console/tenant-login-flags.d.ts +106 -0
- package/dist/src/console/tenant-login-flags.d.ts.map +1 -0
- package/dist/src/console/tenant-login-flags.js +113 -0
- package/dist/src/console/tenant-login-flags.js.map +1 -0
- package/dist/src/console/tenant-oauth-apps.d.ts +75 -14
- package/dist/src/console/tenant-oauth-apps.d.ts.map +1 -1
- package/dist/src/console/tenant-oauth-apps.js +37 -11
- package/dist/src/console/tenant-oauth-apps.js.map +1 -1
- package/dist/src/console/tokens.d.ts +2 -0
- package/dist/src/console/tokens.d.ts.map +1 -1
- package/dist/src/console/tokens.js.map +1 -1
- package/dist/src/console/workflows.d.ts +14 -0
- package/dist/src/console/workflows.d.ts.map +1 -1
- package/dist/src/console/workflows.js +13 -0
- package/dist/src/console/workflows.js.map +1 -1
- package/dist/src/documents.d.ts +9 -5
- package/dist/src/documents.d.ts.map +1 -1
- package/dist/src/documents.js +6 -3
- package/dist/src/documents.js.map +1 -1
- package/dist/src/endpoints.d.ts +75 -0
- package/dist/src/endpoints.d.ts.map +1 -0
- package/dist/src/endpoints.js +47 -0
- package/dist/src/endpoints.js.map +1 -0
- package/dist/src/functions.d.ts +236 -0
- package/dist/src/functions.d.ts.map +1 -0
- package/dist/src/functions.js +201 -0
- package/dist/src/functions.js.map +1 -0
- package/dist/src/http.d.ts +58 -10
- package/dist/src/http.d.ts.map +1 -1
- package/dist/src/http.js +82 -11
- package/dist/src/http.js.map +1 -1
- package/dist/src/me.d.ts +3 -2
- package/dist/src/me.d.ts.map +1 -1
- package/dist/src/me.js +7 -2
- package/dist/src/me.js.map +1 -1
- package/dist/src/run.d.ts +19 -5
- package/dist/src/run.d.ts.map +1 -1
- package/dist/src/run.js +14 -4
- package/dist/src/run.js.map +1 -1
- package/dist/src/server/mod.d.ts +100 -0
- package/dist/src/server/mod.d.ts.map +1 -0
- package/dist/src/server/mod.js +121 -0
- package/dist/src/server/mod.js.map +1 -0
- package/dist/src/team.d.ts +204 -0
- package/dist/src/team.d.ts.map +1 -0
- package/dist/src/team.js +161 -0
- package/dist/src/team.js.map +1 -0
- package/dist/src/types.d.ts +143 -10
- package/dist/src/types.d.ts.map +1 -1
- package/dist/src/types.js +27 -0
- package/dist/src/types.js.map +1 -1
- package/dist/src/vars.d.ts +5 -3
- package/dist/src/vars.d.ts.map +1 -1
- package/dist/src/vars.js +14 -4
- package/dist/src/vars.js.map +1 -1
- package/dist/src/version.js +1 -1
- package/dist/src/workflows.d.ts +261 -9
- package/dist/src/workflows.d.ts.map +1 -1
- package/dist/src/workflows.js +246 -7
- package/dist/src/workflows.js.map +1 -1
- package/package.json +5 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"subscriptions.js","sourceRoot":"","sources":["../../../src/console/subscriptions.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"subscriptions.js","sourceRoot":"","sources":["../../../src/console/subscriptions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AAEH,OAAO,EAAqB,IAAI,EAAuB,MAAM,YAAY,CAAC;AAC1E,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAsFrC;;;;;;;;;;;GAWG;AACH,MAAM,OAAO,gBAAgB;IAClB,KAAK,CAAoB;IAElC;;OAEG;IACH,YAAY,IAAuB;QACjC,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;IACpB,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,IAAI;QACR,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,OAAO,CAAU;YAC5C,MAAM,EAAE,KAAK;YACb,IAAI,EAAE,gBAAgB;SACvB,CAAC,CAAC;QACH,OAAO,MAAM,CAAiB,GAAG,EAAE,eAAe,CAAC,CAAC;IACtD,CAAC;IAED;;;;;;OAMG;IACH,KAAK,CAAC,eAAe,CAAC,UAAkB;QACtC,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,OAAO,CAAU;YAC5C,MAAM,EAAE,KAAK;YACb,IAAI,EAAE,IAAI,CAAA,cAAc,UAAU,gBAAgB;SACnD,CAAC,CAAC;QACH,OAAO,MAAM,CAAiB,GAAG,EAAE,eAAe,CAAC,CAAC;IACtD,CAAC;IAED;;;;;;;;;;;;OAYG;IACH,KAAK,CAAC,GAAG,CAAC,EAAU;QAClB,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,OAAO,CAAU;YAC5C,MAAM,EAAE,KAAK;YACb,IAAI,EAAE,IAAI,CAAA,kBAAkB,EAAE,EAAE;SACjC,CAAC,CAAC;QACH,OAAO,MAAM,CAAe,GAAG,EAAE,cAAc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**Studio-internal, not the published partner contract.** This namespace
|
|
6
|
+
* lives under the `console` subpath export (`@w6w/sdk/console`), excluded from
|
|
7
|
+
* `endpoints.json` and from the root barrel (`mod.ts`) — see `docs/console.md`.
|
|
8
|
+
* `@w6w/sdk`'s instance-state mechanism pin still applies here exactly as it
|
|
9
|
+
* does to every other namespace (`docs/implementation.md` §MECHANISM PIN —
|
|
10
|
+
* instance state, never globals): this class holds no state of its own beyond
|
|
11
|
+
* the injected host, so two clients in one process never share a credential.
|
|
12
|
+
*
|
|
13
|
+
* **The tenant is never a parameter here** — mirrors `console.tenantOAuthApps`
|
|
14
|
+
* exactly: both routes are scoped by the caller's own credential (the tenant
|
|
15
|
+
* claim on the bearer) plus a server-side `requireTenantAdmin` check
|
|
16
|
+
* (T2.1.1's wire pin), never by an id this client sends.
|
|
17
|
+
*
|
|
18
|
+
* **`put`'s body is built by OMISSION, key by key — absence means "leave
|
|
19
|
+
* whatever is stored alone".** T2.1.1's wire pin states it directly: "absent
|
|
20
|
+
* means preserve, `null` is refused." Unlike
|
|
21
|
+
* `console.tenantOAuthApps.SetTenantOAuthAppInput`, neither field here ever
|
|
22
|
+
* accepts `null` — both are plain optional booleans — so {@linkcode toSetBody}
|
|
23
|
+
* is the simpler of the two omission builders, but the discipline (never
|
|
24
|
+
* `JSON.stringify`'s own `undefined`-dropping behaviour, an explicit
|
|
25
|
+
* allowlist of exactly two keys) is the same one for the same reason: a
|
|
26
|
+
* caller-widened input type must not be able to smuggle a third key onto the
|
|
27
|
+
* wire from here.
|
|
28
|
+
*
|
|
29
|
+
* **The one refusal this domain can produce, `409 no_fallback_login`, is not
|
|
30
|
+
* caught here.** Disabling password with OTP off (or vice versa) would leave
|
|
31
|
+
* the tenant with no way in at all; the server refuses it and this method
|
|
32
|
+
* propagates the `ApiError` unchanged, exactly like every other write in this
|
|
33
|
+
* package — the caller (`packages/studio/src/pages/TenantSettingsPage.tsx`)
|
|
34
|
+
* is what turns the code into a sentence.
|
|
35
|
+
*
|
|
36
|
+
* @module
|
|
37
|
+
*/
|
|
38
|
+
import { type HttpResponse, type RequestOptions } from "../http.ts";
|
|
39
|
+
/**
|
|
40
|
+
* The slice of `W6WClient` this namespace needs: the transport, and nothing
|
|
41
|
+
* else. Structural rather than a concrete client type, so the namespace stays
|
|
42
|
+
* independently constructible in a test and this module never imports the
|
|
43
|
+
* client back — mirrors `TenantOAuthAppsHost` in `./tenant-oauth-apps.ts`.
|
|
44
|
+
*/
|
|
45
|
+
export interface TenantLoginFlagsHost {
|
|
46
|
+
/** Perform one request. */
|
|
47
|
+
request<T>(options: RequestOptions): Promise<HttpResponse<T>>;
|
|
48
|
+
}
|
|
49
|
+
/** The tenant's current sign-in configuration — `GET`/`PUT /tenant/login-flags` (T2.1.1's wire pin). */
|
|
50
|
+
export interface TenantLoginFlags {
|
|
51
|
+
/** Whether email one-time-code sign-in is turned on for this tenant. */
|
|
52
|
+
otpEnabled: boolean;
|
|
53
|
+
/** Whether password sign-in is turned OFF for this tenant. */
|
|
54
|
+
passwordDisabled: boolean;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* The body `put` sends — built by OMISSION, key by key. Both fields are
|
|
58
|
+
* optional; an omitted field is left untouched server-side. See this
|
|
59
|
+
* module's header for why neither ever carries `null` (unlike
|
|
60
|
+
* `console.tenantOAuthApps.SetTenantOAuthAppInput`).
|
|
61
|
+
*/
|
|
62
|
+
export interface SetTenantLoginFlagsInput {
|
|
63
|
+
otpEnabled?: boolean;
|
|
64
|
+
passwordDisabled?: boolean;
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* The `console.tenantLoginFlags` namespace on a `W6WClient` — the caller's
|
|
68
|
+
* own tenant, never a tenant of its choosing.
|
|
69
|
+
*
|
|
70
|
+
* @example
|
|
71
|
+
* ```ts
|
|
72
|
+
* const flags = await client.console.tenantLoginFlags.get();
|
|
73
|
+
* await client.console.tenantLoginFlags.put({ otpEnabled: true });
|
|
74
|
+
* ```
|
|
75
|
+
*/
|
|
76
|
+
export declare class TenantLoginFlagsApi {
|
|
77
|
+
#private;
|
|
78
|
+
/**
|
|
79
|
+
* @param host - The client this namespace issues requests through.
|
|
80
|
+
*/
|
|
81
|
+
constructor(host: TenantLoginFlagsHost);
|
|
82
|
+
/**
|
|
83
|
+
* The caller's tenant's current sign-in flags.
|
|
84
|
+
*
|
|
85
|
+
* AUTHENTICATED, `requireTenantAdmin` — the default `requireAuth` applies.
|
|
86
|
+
*
|
|
87
|
+
* @returns `{ otpEnabled, passwordDisabled }`.
|
|
88
|
+
* @throws {ApiError} `403` when the caller does not administer its tenant.
|
|
89
|
+
*/
|
|
90
|
+
get(): Promise<TenantLoginFlags>;
|
|
91
|
+
/**
|
|
92
|
+
* Update the caller's tenant's sign-in flags, sending **only the fields
|
|
93
|
+
* `input` sets**.
|
|
94
|
+
*
|
|
95
|
+
* AUTHENTICATED, `requireTenantAdmin` — the default `requireAuth` applies.
|
|
96
|
+
*
|
|
97
|
+
* @param input - The flags to set; an omitted field is left untouched server-side.
|
|
98
|
+
* @returns The stored flags after the update.
|
|
99
|
+
* @throws {ApiError} `403` when the caller does not administer its tenant;
|
|
100
|
+
* `400 invalid_body` for a non-boolean present value; `409
|
|
101
|
+
* no_fallback_login` when the change would leave the tenant with no way
|
|
102
|
+
* in — NOT caught here, propagated unchanged (see this module's header).
|
|
103
|
+
*/
|
|
104
|
+
put(input: SetTenantLoginFlagsInput): Promise<TenantLoginFlags>;
|
|
105
|
+
}
|
|
106
|
+
//# sourceMappingURL=tenant-login-flags.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tenant-login-flags.d.ts","sourceRoot":"","sources":["../../../src/console/tenant-login-flags.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AAEH,OAAO,EAAE,KAAK,YAAY,EAAE,KAAK,cAAc,EAAE,MAAM,YAAY,CAAC;AAEpE;;;;;GAKG;AACH,MAAM,WAAW,oBAAoB;IACnC,2BAA2B;IAC3B,OAAO,CAAC,CAAC,EAAE,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC;CAC/D;AAED,wGAAwG;AACxG,MAAM,WAAW,gBAAgB;IAC/B,wEAAwE;IACxE,UAAU,EAAE,OAAO,CAAC;IACpB,8DAA8D;IAC9D,gBAAgB,EAAE,OAAO,CAAC;CAC3B;AAED;;;;;GAKG;AACH,MAAM,WAAW,wBAAwB;IACvC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B;AAoBD;;;;;;;;;GASG;AACH,qBAAa,mBAAmB;;IAG9B;;OAEG;gBACS,IAAI,EAAE,oBAAoB;IAItC;;;;;;;OAOG;IACG,GAAG,IAAI,OAAO,CAAC,gBAAgB,CAAC;IAQtC;;;;;;;;;;;;OAYG;IACG,GAAG,CAAC,KAAK,EAAE,wBAAwB,GAAG,OAAO,CAAC,gBAAgB,CAAC;CAQtE"}
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `client.console.tenantLoginFlags.*` — a tenant administrator's own
|
|
3
|
+
* password/OTP sign-in toggles (T2.1.3).
|
|
4
|
+
*
|
|
5
|
+
* **Studio-internal, not the published partner contract.** This namespace
|
|
6
|
+
* lives under the `console` subpath export (`@w6w/sdk/console`), excluded from
|
|
7
|
+
* `endpoints.json` and from the root barrel (`mod.ts`) — see `docs/console.md`.
|
|
8
|
+
* `@w6w/sdk`'s instance-state mechanism pin still applies here exactly as it
|
|
9
|
+
* does to every other namespace (`docs/implementation.md` §MECHANISM PIN —
|
|
10
|
+
* instance state, never globals): this class holds no state of its own beyond
|
|
11
|
+
* the injected host, so two clients in one process never share a credential.
|
|
12
|
+
*
|
|
13
|
+
* **The tenant is never a parameter here** — mirrors `console.tenantOAuthApps`
|
|
14
|
+
* exactly: both routes are scoped by the caller's own credential (the tenant
|
|
15
|
+
* claim on the bearer) plus a server-side `requireTenantAdmin` check
|
|
16
|
+
* (T2.1.1's wire pin), never by an id this client sends.
|
|
17
|
+
*
|
|
18
|
+
* **`put`'s body is built by OMISSION, key by key — absence means "leave
|
|
19
|
+
* whatever is stored alone".** T2.1.1's wire pin states it directly: "absent
|
|
20
|
+
* means preserve, `null` is refused." Unlike
|
|
21
|
+
* `console.tenantOAuthApps.SetTenantOAuthAppInput`, neither field here ever
|
|
22
|
+
* accepts `null` — both are plain optional booleans — so {@linkcode toSetBody}
|
|
23
|
+
* is the simpler of the two omission builders, but the discipline (never
|
|
24
|
+
* `JSON.stringify`'s own `undefined`-dropping behaviour, an explicit
|
|
25
|
+
* allowlist of exactly two keys) is the same one for the same reason: a
|
|
26
|
+
* caller-widened input type must not be able to smuggle a third key onto the
|
|
27
|
+
* wire from here.
|
|
28
|
+
*
|
|
29
|
+
* **The one refusal this domain can produce, `409 no_fallback_login`, is not
|
|
30
|
+
* caught here.** Disabling password with OTP off (or vice versa) would leave
|
|
31
|
+
* the tenant with no way in at all; the server refuses it and this method
|
|
32
|
+
* propagates the `ApiError` unchanged, exactly like every other write in this
|
|
33
|
+
* package — the caller (`packages/studio/src/pages/TenantSettingsPage.tsx`)
|
|
34
|
+
* is what turns the code into a sentence.
|
|
35
|
+
*
|
|
36
|
+
* @module
|
|
37
|
+
*/
|
|
38
|
+
import {} from "../http.js";
|
|
39
|
+
/**
|
|
40
|
+
* Serialise {@linkcode SetTenantLoginFlagsInput} for the wire: **only the
|
|
41
|
+
* keys actually present.** Written as explicit `!== undefined` tests rather
|
|
42
|
+
* than a spread, mirroring `./tenant-oauth-apps.ts`'s `toSetBody` — it keeps
|
|
43
|
+
* `undefined` off the wire without relying on `JSON.stringify` to drop it,
|
|
44
|
+
* and it is an allowlist: a caller that widens the input type cannot get a
|
|
45
|
+
* third key onto the wire from here.
|
|
46
|
+
*
|
|
47
|
+
* @param input - The caller's partial update.
|
|
48
|
+
* @returns A body carrying exactly the keys `input` set.
|
|
49
|
+
*/
|
|
50
|
+
function toSetBody(input) {
|
|
51
|
+
const body = {};
|
|
52
|
+
if (input.otpEnabled !== undefined)
|
|
53
|
+
body.otpEnabled = input.otpEnabled;
|
|
54
|
+
if (input.passwordDisabled !== undefined)
|
|
55
|
+
body.passwordDisabled = input.passwordDisabled;
|
|
56
|
+
return body;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* The `console.tenantLoginFlags` namespace on a `W6WClient` — the caller's
|
|
60
|
+
* own tenant, never a tenant of its choosing.
|
|
61
|
+
*
|
|
62
|
+
* @example
|
|
63
|
+
* ```ts
|
|
64
|
+
* const flags = await client.console.tenantLoginFlags.get();
|
|
65
|
+
* await client.console.tenantLoginFlags.put({ otpEnabled: true });
|
|
66
|
+
* ```
|
|
67
|
+
*/
|
|
68
|
+
export class TenantLoginFlagsApi {
|
|
69
|
+
#host;
|
|
70
|
+
/**
|
|
71
|
+
* @param host - The client this namespace issues requests through.
|
|
72
|
+
*/
|
|
73
|
+
constructor(host) {
|
|
74
|
+
this.#host = host;
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* The caller's tenant's current sign-in flags.
|
|
78
|
+
*
|
|
79
|
+
* AUTHENTICATED, `requireTenantAdmin` — the default `requireAuth` applies.
|
|
80
|
+
*
|
|
81
|
+
* @returns `{ otpEnabled, passwordDisabled }`.
|
|
82
|
+
* @throws {ApiError} `403` when the caller does not administer its tenant.
|
|
83
|
+
*/
|
|
84
|
+
async get() {
|
|
85
|
+
const res = await this.#host.request({
|
|
86
|
+
method: "GET",
|
|
87
|
+
path: "/tenant/login-flags",
|
|
88
|
+
});
|
|
89
|
+
return res.body.flags;
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Update the caller's tenant's sign-in flags, sending **only the fields
|
|
93
|
+
* `input` sets**.
|
|
94
|
+
*
|
|
95
|
+
* AUTHENTICATED, `requireTenantAdmin` — the default `requireAuth` applies.
|
|
96
|
+
*
|
|
97
|
+
* @param input - The flags to set; an omitted field is left untouched server-side.
|
|
98
|
+
* @returns The stored flags after the update.
|
|
99
|
+
* @throws {ApiError} `403` when the caller does not administer its tenant;
|
|
100
|
+
* `400 invalid_body` for a non-boolean present value; `409
|
|
101
|
+
* no_fallback_login` when the change would leave the tenant with no way
|
|
102
|
+
* in — NOT caught here, propagated unchanged (see this module's header).
|
|
103
|
+
*/
|
|
104
|
+
async put(input) {
|
|
105
|
+
const res = await this.#host.request({
|
|
106
|
+
method: "PUT",
|
|
107
|
+
path: "/tenant/login-flags",
|
|
108
|
+
body: toSetBody(input),
|
|
109
|
+
});
|
|
110
|
+
return res.body.flags;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
//# sourceMappingURL=tenant-login-flags.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tenant-login-flags.js","sourceRoot":"","sources":["../../../src/console/tenant-login-flags.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AAEH,OAAO,EAA0C,MAAM,YAAY,CAAC;AAgCpE;;;;;;;;;;GAUG;AACH,SAAS,SAAS,CAAC,KAA+B;IAChD,MAAM,IAAI,GAA4B,EAAE,CAAC;IACzC,IAAI,KAAK,CAAC,UAAU,KAAK,SAAS;QAAE,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC,UAAU,CAAC;IACvE,IAAI,KAAK,CAAC,gBAAgB,KAAK,SAAS;QAAE,IAAI,CAAC,gBAAgB,GAAG,KAAK,CAAC,gBAAgB,CAAC;IACzF,OAAO,IAAI,CAAC;AACd,CAAC;AAED;;;;;;;;;GASG;AACH,MAAM,OAAO,mBAAmB;IACrB,KAAK,CAAuB;IAErC;;OAEG;IACH,YAAY,IAA0B;QACpC,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;IACpB,CAAC;IAED;;;;;;;OAOG;IACH,KAAK,CAAC,GAAG;QACP,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,OAAO,CAA8B;YAChE,MAAM,EAAE,KAAK;YACb,IAAI,EAAE,qBAAqB;SAC5B,CAAC,CAAC;QACH,OAAO,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC;IACxB,CAAC;IAED;;;;;;;;;;;;OAYG;IACH,KAAK,CAAC,GAAG,CAAC,KAA+B;QACvC,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,OAAO,CAA8B;YAChE,MAAM,EAAE,KAAK;YACb,IAAI,EAAE,qBAAqB;YAC3B,IAAI,EAAE,SAAS,CAAC,KAAK,CAAC;SACvB,CAAC,CAAC;QACH,OAAO,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC;IACxB,CAAC;CACF"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* `client.console.tenantOAuthApps.*` — a tenant administrator's own OAuth
|
|
3
|
-
* client overrides (list, upsert, remove)
|
|
4
|
-
* to.
|
|
3
|
+
* client overrides (list, upsert, remove) and the candidate apps they can still
|
|
4
|
+
* configure (`listCandidates`), for the apps their tenant connects to.
|
|
5
5
|
*
|
|
6
6
|
* **Studio-internal, not the published partner contract.** This namespace
|
|
7
7
|
* lives under the `console` subpath export (`@w6w/sdk/console`), excluded from
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
* instance state, never globals): this class holds no state of its own beyond
|
|
12
12
|
* the injected host, so two clients in one process never share a credential.
|
|
13
13
|
*
|
|
14
|
-
* **The tenant is never a parameter here.** These
|
|
14
|
+
* **The tenant is never a parameter here.** These four routes are scoped by
|
|
15
15
|
* the caller's own credential (the tenant claim on the bearer) plus a
|
|
16
16
|
* server-side tenant-admin check — unlike the operator family
|
|
17
17
|
* (`GET/PUT/DELETE /tenants/:id/oauth-app…`, `api/admin/tenants.ts:307-309`),
|
|
@@ -29,8 +29,8 @@
|
|
|
29
29
|
*
|
|
30
30
|
* **Response shapes are flat, no envelope key to peel with `unwrap()`** —
|
|
31
31
|
* mirroring `console/auth.ts:29-32` for this whole family. `list` returns the
|
|
32
|
-
* whole body deliberately,
|
|
33
|
-
*
|
|
32
|
+
* whole body deliberately, so the response is exactly what the server sent
|
|
33
|
+
* (each row carries the server-derived `callbackUrl`: the same URL for every app, never assembled client-side); `put` reaches one level in
|
|
34
34
|
* for `body.config`, which is the shape the server answers with (W4).
|
|
35
35
|
*
|
|
36
36
|
* **Wire shapes are planner pins, not reverse-engineered from a merged route.**
|
|
@@ -76,6 +76,11 @@ export interface TenantOAuthAppSummary {
|
|
|
76
76
|
* {@linkcode SetTenantOAuthAppInput} carries no `redirectUri` key.
|
|
77
77
|
*/
|
|
78
78
|
redirectUri: string | null;
|
|
79
|
+
/**
|
|
80
|
+
* This row's OAuth callback URL, derived SERVER-SIDE and specific to this
|
|
81
|
+
* app and auth method. Display it; never assemble it. Absent from an older server.
|
|
82
|
+
*/
|
|
83
|
+
callbackUrl?: string;
|
|
79
84
|
/** Provider-specific extras (scopes, audience, …). `{}` when none. */
|
|
80
85
|
extra: Record<string, unknown>;
|
|
81
86
|
/** Whether a client secret is stored. **Never the secret itself.** */
|
|
@@ -87,8 +92,6 @@ export interface TenantOAuthAppSummary {
|
|
|
87
92
|
export interface TenantOAuthAppsResponse {
|
|
88
93
|
/** Every override this tenant has, in the server's order. */
|
|
89
94
|
configs: TenantOAuthAppSummary[];
|
|
90
|
-
/** This host's OAuth callback, derived SERVER-SIDE. Display it; never assemble it. */
|
|
91
|
-
callbackUrl: string;
|
|
92
95
|
}
|
|
93
96
|
/**
|
|
94
97
|
* The body `put` sends (W4) — **built by OMISSION, key by key.**
|
|
@@ -111,7 +114,7 @@ export interface TenantOAuthAppsResponse {
|
|
|
111
114
|
* the user did not touch, never send `""`.
|
|
112
115
|
*
|
|
113
116
|
* **No `redirectUri` and no `force`.** Neither exists on this surface — the
|
|
114
|
-
* callback URL is derived server-side (
|
|
117
|
+
* callback URL is derived server-side (each row's `callbackUrl`) and the operator's
|
|
115
118
|
* `?force` affordance is not offered to a tenant admin (W4). A field the SDK
|
|
116
119
|
* declares is a field a form will fill, so neither is declared, and
|
|
117
120
|
* {@linkcode toSetBody} additionally refuses to forward either at runtime.
|
|
@@ -130,14 +133,55 @@ export interface SetTenantOAuthAppInput {
|
|
|
130
133
|
/** Whether to switch the override off. */
|
|
131
134
|
disabled?: boolean;
|
|
132
135
|
}
|
|
136
|
+
/**
|
|
137
|
+
* One app a tenant administrator may register an OAuth client for — the picker
|
|
138
|
+
* subset `GET /tenant/oauth-apps/candidates` answers with. Flat; carries no
|
|
139
|
+
* OAuth configuration and no secret.
|
|
140
|
+
*/
|
|
141
|
+
export interface TenantOAuthCandidate {
|
|
142
|
+
id: string;
|
|
143
|
+
displayName: string;
|
|
144
|
+
version: string;
|
|
145
|
+
description: string;
|
|
146
|
+
categories?: string[];
|
|
147
|
+
/** Omitted by the server when larger than 8192 UTF-8 bytes. */
|
|
148
|
+
iconSvg?: string;
|
|
149
|
+
/** Omitted by the server when larger than 8192 UTF-8 bytes. */
|
|
150
|
+
iconSvgDark?: string;
|
|
151
|
+
brandColor?: string;
|
|
152
|
+
brandColorDark?: string;
|
|
153
|
+
owner: {
|
|
154
|
+
tenant: string;
|
|
155
|
+
subject: string;
|
|
156
|
+
};
|
|
157
|
+
}
|
|
158
|
+
/** One page of candidates. `nextCursor` is ABSENT (not `null`) on the last page. */
|
|
159
|
+
export interface TenantOAuthCandidatesPage {
|
|
160
|
+
apps: TenantOAuthCandidate[];
|
|
161
|
+
nextCursor?: string;
|
|
162
|
+
}
|
|
163
|
+
/**
|
|
164
|
+
* Options for {@linkcode TenantOAuthAppsApi.listCandidates}. Each member is
|
|
165
|
+
* sent under its own wire name; an omitted member is absent from the request.
|
|
166
|
+
*/
|
|
167
|
+
export interface ListTenantOAuthCandidatesOptions {
|
|
168
|
+
/** Case-insensitive substring filter; the server trims it and rejects more than 200 characters. */
|
|
169
|
+
q?: string;
|
|
170
|
+
/** Page size, 1..200; the server defaults to 50. */
|
|
171
|
+
limit?: number;
|
|
172
|
+
/** Opaque cursor from a previous page's `nextCursor`. */
|
|
173
|
+
cursor?: string;
|
|
174
|
+
/** Aborts the request; an abort rejects with `ApiError` `code: "cancelled"`. */
|
|
175
|
+
signal?: AbortSignal;
|
|
176
|
+
}
|
|
133
177
|
/**
|
|
134
178
|
* The `console.tenantOAuthApps` namespace on a `W6WClient` — the caller's own
|
|
135
179
|
* tenant, never a tenant of its choosing.
|
|
136
180
|
*
|
|
137
181
|
* @example
|
|
138
182
|
* ```ts
|
|
139
|
-
* const { configs
|
|
140
|
-
* // Register `callbackUrl` with the provider — never assemble it client-side.
|
|
183
|
+
* const { configs } = await client.console.tenantOAuthApps.list();
|
|
184
|
+
* // Register each row's `callbackUrl` with the provider — never assemble it client-side.
|
|
141
185
|
* await client.console.tenantOAuthApps.put("sendgrid", "oauth2", { clientId: "abc" });
|
|
142
186
|
* await client.console.tenantOAuthApps.remove("sendgrid", "oauth2");
|
|
143
187
|
* ```
|
|
@@ -149,15 +193,32 @@ export declare class TenantOAuthAppsApi {
|
|
|
149
193
|
*/
|
|
150
194
|
constructor(host: TenantOAuthAppsHost);
|
|
151
195
|
/**
|
|
152
|
-
* List the caller's tenant's OAuth overrides
|
|
196
|
+
* List the caller's tenant's OAuth overrides; each row carries its own
|
|
197
|
+
* server-derived `callbackUrl`.
|
|
153
198
|
*
|
|
154
|
-
* Returns the body VERBATIM rather than unwrapping `configs
|
|
155
|
-
*
|
|
199
|
+
* Returns the body VERBATIM rather than unwrapping `configs`, so the
|
|
200
|
+
* response stays exactly what the server sent.
|
|
156
201
|
*
|
|
157
|
-
* @returns Every override for this tenant
|
|
202
|
+
* @returns Every override for this tenant.
|
|
158
203
|
* @throws {ApiError} `403` when the caller does not administer its tenant.
|
|
159
204
|
*/
|
|
160
205
|
list(): Promise<TenantOAuthAppsResponse>;
|
|
206
|
+
/**
|
|
207
|
+
* Page through the apps this tenant could still register an OAuth client
|
|
208
|
+
* for (`GET /tenant/oauth-apps/candidates`).
|
|
209
|
+
*
|
|
210
|
+
* Returns the body VERBATIM. Every app eligible for the whole walk, with an
|
|
211
|
+
* unchanged display name, appears exactly once; an app whose eligibility or
|
|
212
|
+
* display name changes mid-walk may be missed or repeated, so restart with
|
|
213
|
+
* no cursor after a registration or removal.
|
|
214
|
+
*
|
|
215
|
+
* @param options - Optional `q`, `limit`, `cursor` and `signal`.
|
|
216
|
+
* @returns One page: `{apps, nextCursor}`; `nextCursor` is absent on the last page.
|
|
217
|
+
* @throws {ApiError} `400 invalid_query`/`invalid_cursor` on a bad parameter;
|
|
218
|
+
* `403` when the caller does not administer its tenant; `code: "cancelled"`
|
|
219
|
+
* when `options.signal` was aborted.
|
|
220
|
+
*/
|
|
221
|
+
listCandidates(options?: ListTenantOAuthCandidatesOptions): Promise<TenantOAuthCandidatesPage>;
|
|
161
222
|
/**
|
|
162
223
|
* Create or update one override, sending **only the fields `input` sets**.
|
|
163
224
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tenant-oauth-apps.d.ts","sourceRoot":"","sources":["../../../src/console/tenant-oauth-apps.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+CG;AAEH,OAAO,EAAE,KAAK,YAAY,EAAQ,KAAK,cAAc,EAAE,MAAM,YAAY,CAAC;AAE1E;;;;;GAKG;AACH,MAAM,WAAW,mBAAmB;IAClC,2BAA2B;IAC3B,OAAO,CAAC,CAAC,EAAE,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC;CAC/D;AAED;;;;;GAKG;AACH,MAAM,WAAW,qBAAqB;IACpC,wCAAwC;IACxC,KAAK,EAAE,MAAM,CAAC;IACd,mDAAmD;IACnD,OAAO,EAAE,MAAM,CAAC;IAChB,wEAAwE;IACxE,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB;;;;OAIG;IACH,WAAW,EAA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AED;;;;;;;;;;;GAWG;AACH,qBAAa,kBAAkB;;IAG7B;;OAEG;gBACS,IAAI,EAAE,mBAAmB;IAIrC;;;;;;;;;OASG;IACG,IAAI,IAAI,OAAO,CAAC,uBAAuB,CAAC;IAQ9C;;;;;;;;;;;;;;OAcG;IACG,cAAc,CAClB,OAAO,GAAE,gCAAqC,GAC7C,OAAO,CAAC,yBAAyB,CAAC;IAWrC;;;;;;;;;;;OAWG;IACG,GAAG,CACP,KAAK,EAAE,MAAM,EACb,OAAO,EAAE,MAAM,EACf,KAAK,EAAE,sBAAsB,GAC5B,OAAO,CAAC,qBAAqB,CAAC;IASjC;;;;;;;;;;;OAWG;IACG,MAAM,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAM5D"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* `client.console.tenantOAuthApps.*` — a tenant administrator's own OAuth
|
|
3
|
-
* client overrides (list, upsert, remove)
|
|
4
|
-
* to.
|
|
3
|
+
* client overrides (list, upsert, remove) and the candidate apps they can still
|
|
4
|
+
* configure (`listCandidates`), for the apps their tenant connects to.
|
|
5
5
|
*
|
|
6
6
|
* **Studio-internal, not the published partner contract.** This namespace
|
|
7
7
|
* lives under the `console` subpath export (`@w6w/sdk/console`), excluded from
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
* instance state, never globals): this class holds no state of its own beyond
|
|
12
12
|
* the injected host, so two clients in one process never share a credential.
|
|
13
13
|
*
|
|
14
|
-
* **The tenant is never a parameter here.** These
|
|
14
|
+
* **The tenant is never a parameter here.** These four routes are scoped by
|
|
15
15
|
* the caller's own credential (the tenant claim on the bearer) plus a
|
|
16
16
|
* server-side tenant-admin check — unlike the operator family
|
|
17
17
|
* (`GET/PUT/DELETE /tenants/:id/oauth-app…`, `api/admin/tenants.ts:307-309`),
|
|
@@ -29,8 +29,8 @@
|
|
|
29
29
|
*
|
|
30
30
|
* **Response shapes are flat, no envelope key to peel with `unwrap()`** —
|
|
31
31
|
* mirroring `console/auth.ts:29-32` for this whole family. `list` returns the
|
|
32
|
-
* whole body deliberately,
|
|
33
|
-
*
|
|
32
|
+
* whole body deliberately, so the response is exactly what the server sent
|
|
33
|
+
* (each row carries the server-derived `callbackUrl`: the same URL for every app, never assembled client-side); `put` reaches one level in
|
|
34
34
|
* for `body.config`, which is the shape the server answers with (W4).
|
|
35
35
|
*
|
|
36
36
|
* **Wire shapes are planner pins, not reverse-engineered from a merged route.**
|
|
@@ -80,8 +80,8 @@ function toSetBody(input) {
|
|
|
80
80
|
*
|
|
81
81
|
* @example
|
|
82
82
|
* ```ts
|
|
83
|
-
* const { configs
|
|
84
|
-
* // Register `callbackUrl` with the provider — never assemble it client-side.
|
|
83
|
+
* const { configs } = await client.console.tenantOAuthApps.list();
|
|
84
|
+
* // Register each row's `callbackUrl` with the provider — never assemble it client-side.
|
|
85
85
|
* await client.console.tenantOAuthApps.put("sendgrid", "oauth2", { clientId: "abc" });
|
|
86
86
|
* await client.console.tenantOAuthApps.remove("sendgrid", "oauth2");
|
|
87
87
|
* ```
|
|
@@ -95,12 +95,13 @@ export class TenantOAuthAppsApi {
|
|
|
95
95
|
this.#host = host;
|
|
96
96
|
}
|
|
97
97
|
/**
|
|
98
|
-
* List the caller's tenant's OAuth overrides
|
|
98
|
+
* List the caller's tenant's OAuth overrides; each row carries its own
|
|
99
|
+
* server-derived `callbackUrl`.
|
|
99
100
|
*
|
|
100
|
-
* Returns the body VERBATIM rather than unwrapping `configs
|
|
101
|
-
*
|
|
101
|
+
* Returns the body VERBATIM rather than unwrapping `configs`, so the
|
|
102
|
+
* response stays exactly what the server sent.
|
|
102
103
|
*
|
|
103
|
-
* @returns Every override for this tenant
|
|
104
|
+
* @returns Every override for this tenant.
|
|
104
105
|
* @throws {ApiError} `403` when the caller does not administer its tenant.
|
|
105
106
|
*/
|
|
106
107
|
async list() {
|
|
@@ -110,6 +111,31 @@ export class TenantOAuthAppsApi {
|
|
|
110
111
|
});
|
|
111
112
|
return res.body;
|
|
112
113
|
}
|
|
114
|
+
/**
|
|
115
|
+
* Page through the apps this tenant could still register an OAuth client
|
|
116
|
+
* for (`GET /tenant/oauth-apps/candidates`).
|
|
117
|
+
*
|
|
118
|
+
* Returns the body VERBATIM. Every app eligible for the whole walk, with an
|
|
119
|
+
* unchanged display name, appears exactly once; an app whose eligibility or
|
|
120
|
+
* display name changes mid-walk may be missed or repeated, so restart with
|
|
121
|
+
* no cursor after a registration or removal.
|
|
122
|
+
*
|
|
123
|
+
* @param options - Optional `q`, `limit`, `cursor` and `signal`.
|
|
124
|
+
* @returns One page: `{apps, nextCursor}`; `nextCursor` is absent on the last page.
|
|
125
|
+
* @throws {ApiError} `400 invalid_query`/`invalid_cursor` on a bad parameter;
|
|
126
|
+
* `403` when the caller does not administer its tenant; `code: "cancelled"`
|
|
127
|
+
* when `options.signal` was aborted.
|
|
128
|
+
*/
|
|
129
|
+
async listCandidates(options = {}) {
|
|
130
|
+
const { signal, q, limit, cursor } = options;
|
|
131
|
+
const res = await this.#host.request({
|
|
132
|
+
method: "GET",
|
|
133
|
+
path: "/tenant/oauth-apps/candidates",
|
|
134
|
+
query: { q, limit, cursor },
|
|
135
|
+
signal,
|
|
136
|
+
});
|
|
137
|
+
return res.body;
|
|
138
|
+
}
|
|
113
139
|
/**
|
|
114
140
|
* Create or update one override, sending **only the fields `input` sets**.
|
|
115
141
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tenant-oauth-apps.js","sourceRoot":"","sources":["../../../src/console/tenant-oauth-apps.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+CG;AAEH,OAAO,EAAqB,IAAI,EAAuB,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"tenant-oauth-apps.js","sourceRoot":"","sources":["../../../src/console/tenant-oauth-apps.ts"],"names":[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,KAAK,CAAC,OAAO,CAA4B;YAC9D,MAAM,EAAE,KAAK;YACb,IAAI,EAAE,+BAA+B;YACrC,KAAK,EAAE,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE;YAC3B,MAAM;SACP,CAAC,CAAC;QACH,OAAO,GAAG,CAAC,IAAI,CAAC;IAClB,CAAC;IAED;;;;;;;;;;;OAWG;IACH,KAAK,CAAC,GAAG,CACP,KAAa,EACb,OAAe,EACf,KAA6B;QAE7B,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,OAAO,CAAoC;YACtE,MAAM,EAAE,KAAK;YACb,IAAI,EAAE,IAAI,CAAA,qBAAqB,KAAK,IAAI,OAAO,EAAE;YACjD,IAAI,EAAE,SAAS,CAAC,KAAK,CAAC;SACvB,CAAC,CAAC;QACH,OAAO,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC;IACzB,CAAC;IAED;;;;;;;;;;;OAWG;IACH,KAAK,CAAC,MAAM,CAAC,KAAa,EAAE,OAAe;QACzC,MAAM,IAAI,CAAC,KAAK,CAAC,OAAO,CAAU;YAChC,MAAM,EAAE,QAAQ;YAChB,IAAI,EAAE,IAAI,CAAA,qBAAqB,KAAK,IAAI,OAAO,EAAE;SAClD,CAAC,CAAC;IACL,CAAC;CACF"}
|
|
@@ -72,6 +72,8 @@ export interface ApiToken {
|
|
|
72
72
|
updatedAt: string;
|
|
73
73
|
/** ISO-8601 timestamp of revocation, or `null` while active/disabled. */
|
|
74
74
|
revokedAt: string | null;
|
|
75
|
+
/** ISO-8601 timestamp of the token's last authenticated use, or `null` while unused. Optional: absent on a server build that predates this field. */
|
|
76
|
+
lastUsedAt?: string | null;
|
|
75
77
|
}
|
|
76
78
|
/**
|
|
77
79
|
* `create`'s result — the token's metadata plus its plaintext secret, shown
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tokens.d.ts","sourceRoot":"","sources":["../../../src/console/tokens.ts"],"names":[],"mappings":"AAAA;;;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OAAO,MAAM,CAAW,GAAG,EAAE,OAAO,CAAC,CAAC;IACxC,CAAC;IAED;;;;;;;OAOG;IACH,KAAK,CAAC,MAAM,CAAC,EAAU;QACrB,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,OAAO,CAAU;YAC5C,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,IAAI,CAAA,WAAW,EAAE,SAAS;YAChC,IAAI,EAAE,EAAE;SACT,CAAC,CAAC;QACH,OAAO,MAAM,CAAW,GAAG,EAAE,OAAO,CAAC,CAAC;IACxC,CAAC;IAED;;;;;;OAMG;IACH,KAAK,CAAC,MAAM,CAAC,EAAU;QACrB,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,OAAO,CAAU;YAC5C,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,IAAI,CAAA,WAAW,EAAE,SAAS;YAChC,IAAI,EAAE,EAAE;SACT,CAAC,CAAC;QACH,OAAO,MAAM,CAAW,GAAG,EAAE,OAAO,CAAC,CAAC;IACxC,CAAC;CACF"}
|
|
@@ -25,6 +25,19 @@
|
|
|
25
25
|
* documented partner story exists yet either) — that promotion, if it ever
|
|
26
26
|
* happens, is a dedicated future project.
|
|
27
27
|
*
|
|
28
|
+
* **That promotion has since happened, and this namespace deliberately stayed.**
|
|
29
|
+
* At contract `0.5.0` the definition lifecycle left `outOfScope` and landed on
|
|
30
|
+
* the BASE namespace in all three lanes — `client.workflows.get`/`create`/
|
|
31
|
+
* `update`/`archive`/`delete` (`../workflows.ts`). The two surfaces now overlap
|
|
32
|
+
* on four routes, and the split is by SHAPE, not by capability: the base methods
|
|
33
|
+
* take a definition and answer the wire's own envelope, while these keep the
|
|
34
|
+
* shapes studio's components are already written against (`upsert`'s single
|
|
35
|
+
* definition-plus-precondition argument, `get`'s three-field body). New callers
|
|
36
|
+
* — and every partner — want `client.workflows.*`. What is still ONLY here is
|
|
37
|
+
* the run history: `listRuns` and `getRun` stay console-only, and
|
|
38
|
+
* `endpoints.json` names `workflows.listRuns` in `outOfScope` so that stays
|
|
39
|
+
* deliberate rather than accidental.
|
|
40
|
+
*
|
|
28
41
|
* **`list` and `run` are NOT part of this domain.** Both already exist on the
|
|
29
42
|
* BASE namespace (`client.workflows.list()`/`client.workflows.run()`,
|
|
30
43
|
* `../workflows.ts`) and studio reuses them verbatim — adding a duplicate
|
|
@@ -184,6 +197,7 @@ export declare class WorkflowsApi {
|
|
|
184
197
|
workflow: {
|
|
185
198
|
id: string;
|
|
186
199
|
name: string;
|
|
200
|
+
key: string | null;
|
|
187
201
|
};
|
|
188
202
|
scheduled: boolean;
|
|
189
203
|
updatedAt: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workflows.d.ts","sourceRoot":"","sources":["../../../src/console/workflows.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"workflows.d.ts","sourceRoot":"","sources":["../../../src/console/workflows.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiEG;AAEH,OAAO,EAAE,KAAK,YAAY,EAAQ,KAAK,cAAc,EAAE,MAAM,YAAY,CAAC;AAC1E,OAAO,EAAE,KAAK,SAAS,EAAE,KAAK,SAAS,EAAU,MAAM,aAAa,CAAC;AAKrE;;;;;GAKG;AACH,MAAM,WAAW,aAAa;IAC5B,2BAA2B;IAC3B,OAAO,CAAC,CAAC,EAAE,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC;CAC/D;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,WAAW,QAAQ;IACvB,yCAAyC;IACzC,KAAK,EAAE,MAAM,CAAC;IACd,wCAAwC;IACxC,UAAU,EAAE,MAAM,CAAC;IACnB,gCAAgC;IAChC,MAAM,EAAE,SAAS,CAAC;IAClB,+DAA+D;IAC/D,SAAS,EAAE,MAAM,C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AC;QACnB,SAAS,EAAE,MAAM,CAAC;KACnB,CACF;IAmBD;;;;;;;;;;OAUG;IACG,OAAO,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC;QAAE,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;KAAE,CAAC;IAQzE;;;;;;;;;;;;;;;OAeG;IACG,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAIvC;;;;;;OAMG;IACG,QAAQ,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,EAAE,CAAC;IAQjD;;;;;;;;;;OAUG;IACG,MAAM,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,QAAQ,CAAC;CAO/C"}
|
|
@@ -25,6 +25,19 @@
|
|
|
25
25
|
* documented partner story exists yet either) — that promotion, if it ever
|
|
26
26
|
* happens, is a dedicated future project.
|
|
27
27
|
*
|
|
28
|
+
* **That promotion has since happened, and this namespace deliberately stayed.**
|
|
29
|
+
* At contract `0.5.0` the definition lifecycle left `outOfScope` and landed on
|
|
30
|
+
* the BASE namespace in all three lanes — `client.workflows.get`/`create`/
|
|
31
|
+
* `update`/`archive`/`delete` (`../workflows.ts`). The two surfaces now overlap
|
|
32
|
+
* on four routes, and the split is by SHAPE, not by capability: the base methods
|
|
33
|
+
* take a definition and answer the wire's own envelope, while these keep the
|
|
34
|
+
* shapes studio's components are already written against (`upsert`'s single
|
|
35
|
+
* definition-plus-precondition argument, `get`'s three-field body). New callers
|
|
36
|
+
* — and every partner — want `client.workflows.*`. What is still ONLY here is
|
|
37
|
+
* the run history: `listRuns` and `getRun` stay console-only, and
|
|
38
|
+
* `endpoints.json` names `workflows.listRuns` in `outOfScope` so that stays
|
|
39
|
+
* deliberate rather than accidental.
|
|
40
|
+
*
|
|
28
41
|
* **`list` and `run` are NOT part of this domain.** Both already exist on the
|
|
29
42
|
* BASE namespace (`client.workflows.list()`/`client.workflows.run()`,
|
|
30
43
|
* `../workflows.ts`) and studio reuses them verbatim — adding a duplicate
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workflows.js","sourceRoot":"","sources":["../../../src/console/workflows.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"workflows.js","sourceRoot":"","sources":["../../../src/console/workflows.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiEG;AAEH,OAAO,EAAqB,IAAI,EAAuB,MAAM,YAAY,CAAC;AAC1E,OAAO,EAAkC,MAAM,EAAE,MAAM,aAAa,CAAC;AAErE,gFAAgF;AAChF,MAAM,mBAAmB,GAAG,2BAA2B,CAAC;AAoExD;;;;;;;;;;;;GAYG;AACH,MAAM,OAAO,YAAY;IACd,KAAK,CAAgB;IAE9B;;OAEG;IACH,YAAY,IAAmB;QAC7B,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;IACpB,CAAC;IAED;;;;;;;;;;;;;;;;OAgBG;IACH,KAAK,CAAC,GAAG,CACP,EAAU;QAEV,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,OAAO,CAElC;YACA,MAAM,EAAE,KAAK;YACb,IAAI,EAAE,IAAI,CAAA,cAAc,EAAE,EAAE;SAC7B,CAAC,CAAC;QACH,OAAO,GAAG,CAAC,IAAI,CAAC;IAClB,CAAC;IAED;;;;;;;;;;;;;;;;;;;OAmBG;IACH,KAAK,CAAC,MAAM,CACV,UAAmB,EACnB,OAAiE;QAQjE,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,OAAO,CAMlC;YACA,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,YAAY;YAClB,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE;YACpC,IAAI,EAAE,UAAU;YAChB,GAAG,CAAC,OAAO,EAAE,iBAAiB;gBAC5B,CAA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