@w6w/sdk 0.4.0 → 0.6.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.
Files changed (86) hide show
  1. package/README.md +24 -21
  2. package/dist/mod.d.ts +6 -2
  3. package/dist/mod.d.ts.map +1 -1
  4. package/dist/mod.js +4 -2
  5. package/dist/mod.js.map +1 -1
  6. package/dist/src/client.d.ts +32 -9
  7. package/dist/src/client.d.ts.map +1 -1
  8. package/dist/src/client.js +33 -8
  9. package/dist/src/client.js.map +1 -1
  10. package/dist/src/config.d.ts +2 -2
  11. package/dist/src/config.js +3 -3
  12. package/dist/src/config.js.map +1 -1
  13. package/dist/src/connections.d.ts +2 -2
  14. package/dist/src/connections.js +1 -1
  15. package/dist/src/console/aliases.d.ts +137 -0
  16. package/dist/src/console/aliases.d.ts.map +1 -0
  17. package/dist/src/console/aliases.js +113 -0
  18. package/dist/src/console/aliases.js.map +1 -0
  19. package/dist/src/console/api-calls.d.ts +2 -2
  20. package/dist/src/console/api-calls.js +1 -1
  21. package/dist/src/console/apps.d.ts +4 -4
  22. package/dist/src/console/apps.js +3 -3
  23. package/dist/src/console/auth.d.ts +204 -6
  24. package/dist/src/console/auth.d.ts.map +1 -1
  25. package/dist/src/console/auth.js +155 -5
  26. package/dist/src/console/auth.js.map +1 -1
  27. package/dist/src/console/connections.d.ts +2 -2
  28. package/dist/src/console/connections.js +1 -1
  29. package/dist/src/console/dashboard.d.ts +2 -2
  30. package/dist/src/console/dashboard.js +1 -1
  31. package/dist/src/console/endpoints.d.ts +25 -7
  32. package/dist/src/console/endpoints.d.ts.map +1 -1
  33. package/dist/src/console/endpoints.js +1 -1
  34. package/dist/src/console/endpoints.js.map +1 -1
  35. package/dist/src/console/functions.d.ts +2 -2
  36. package/dist/src/console/functions.js +1 -1
  37. package/dist/src/console/mod.d.ts +15 -5
  38. package/dist/src/console/mod.d.ts.map +1 -1
  39. package/dist/src/console/mod.js +12 -2
  40. package/dist/src/console/mod.js.map +1 -1
  41. package/dist/src/console/passkeys.d.ts +246 -0
  42. package/dist/src/console/passkeys.d.ts.map +1 -0
  43. package/dist/src/console/passkeys.js +192 -0
  44. package/dist/src/console/passkeys.js.map +1 -0
  45. package/dist/src/console/projects.d.ts +2 -2
  46. package/dist/src/console/projects.js +1 -1
  47. package/dist/src/console/reliability.d.ts +2 -2
  48. package/dist/src/console/reliability.js +1 -1
  49. package/dist/src/console/saved-tests.d.ts +3 -3
  50. package/dist/src/console/saved-tests.js +2 -2
  51. package/dist/src/console/schedules.d.ts +2 -2
  52. package/dist/src/console/schedules.js +1 -1
  53. package/dist/src/console/step-tests.d.ts +3 -3
  54. package/dist/src/console/step-tests.js +2 -2
  55. package/dist/src/console/subscriptions.d.ts +2 -2
  56. package/dist/src/console/subscriptions.js +1 -1
  57. package/dist/src/console/tenant-oauth-apps.d.ts +2 -2
  58. package/dist/src/console/tenant-oauth-apps.js +1 -1
  59. package/dist/src/console/tokens.d.ts +2 -2
  60. package/dist/src/console/tokens.js +1 -1
  61. package/dist/src/console/vault.d.ts +2 -2
  62. package/dist/src/console/vault.js +1 -1
  63. package/dist/src/console/workflows.d.ts +2 -2
  64. package/dist/src/console/workflows.js +1 -1
  65. package/dist/src/documents.d.ts +2 -2
  66. package/dist/src/documents.js +1 -1
  67. package/dist/src/endpoints.d.ts +75 -0
  68. package/dist/src/endpoints.d.ts.map +1 -0
  69. package/dist/src/endpoints.js +47 -0
  70. package/dist/src/endpoints.js.map +1 -0
  71. package/dist/src/functions.d.ts +88 -0
  72. package/dist/src/functions.d.ts.map +1 -0
  73. package/dist/src/functions.js +56 -0
  74. package/dist/src/functions.js.map +1 -0
  75. package/dist/src/me.d.ts +2 -2
  76. package/dist/src/me.js +1 -1
  77. package/dist/src/run.d.ts +9 -4
  78. package/dist/src/run.d.ts.map +1 -1
  79. package/dist/src/run.js +3 -2
  80. package/dist/src/run.js.map +1 -1
  81. package/dist/src/vars.d.ts +2 -2
  82. package/dist/src/vars.js +1 -1
  83. package/dist/src/version.js +1 -1
  84. package/dist/src/workflows.d.ts +2 -2
  85. package/dist/src/workflows.js +1 -1
  86. package/package.json +1 -1
@@ -0,0 +1,47 @@
1
+ import { ApiError } from "./errors.js";
2
+ import { path } from "./http.js";
3
+ /**
4
+ * The `endpoints` namespace on a `W6WClient`.
5
+ *
6
+ * @example
7
+ * ```ts
8
+ * const envelope = await client.endpoints.run("send-email", { payload: { to } });
9
+ * if (envelope.kind === "workflow") console.log(envelope.runId); // async arm
10
+ * ```
11
+ */
12
+ export class EndpointsApi {
13
+ #host;
14
+ /**
15
+ * @param host - The client this namespace issues requests through.
16
+ */
17
+ constructor(host) {
18
+ this.#host = host;
19
+ }
20
+ /**
21
+ * Run one Endpoint; the envelope's `kind` says which arm answered.
22
+ *
23
+ * @param name - The Endpoint's key (`"send-email"`) or its `ep_…` id. Percent-encoded into the path.
24
+ * @param options - `payload`, the Endpoint's input.
25
+ * @returns The `kind`-discriminated envelope, returned exactly as it arrived.
26
+ * @throws {ApiError} `404 unknown_endpoint` when no Endpoint of that name exists for the caller.
27
+ * @throws {ApiError} `bad_response` when a success body carries no string `kind`.
28
+ */
29
+ async run(name, options) {
30
+ const res = await this.#host.request({
31
+ method: "POST",
32
+ path: path `/endpoints/${name}/invoke`,
33
+ body: { input: options?.payload ?? {} },
34
+ });
35
+ const body = res.body;
36
+ // The same guard `run.ts` applies, for the same reason: an object-only
37
+ // check lets `{}` and `[]` through and hands back an envelope whose `kind`
38
+ // is `undefined` at runtime — a lie the compiler cannot catch.
39
+ if (typeof body !== "object" || body === null ||
40
+ typeof body.kind !== "string") {
41
+ throw new ApiError(res.status, "bad_response", `Server returned a ${res.status} with no "kind" in the response body.`, body);
42
+ }
43
+ // Returned as it arrived — an unknown `kind` reaches the caller intact.
44
+ return body;
45
+ }
46
+ }
47
+ //# sourceMappingURL=endpoints.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"endpoints.js","sourceRoot":"","sources":["../../src/endpoints.ts"],"names":[],"mappings":"AA0BA,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAqB,IAAI,EAAuB,MAAM,WAAW,CAAC;AAyBzE;;;;;;;;GAQG;AACH,MAAM,OAAO,YAAY;IACd,KAAK,CAAgB;IAE9B;;OAEG;IACH,YAAY,IAAmB;QAC7B,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;IACpB,CAAC;IAED;;;;;;;;OAQG;IACH,KAAK,CAAC,GAAG,CAAC,IAAY,EAAE,OAA4B;QAClD,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,OAAO,CAAU;YAC5C,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,IAAI,CAAA,cAAc,IAAI,SAAS;YACrC,IAAI,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,IAAI,EAAE,EAAE;SACxC,CAAC,CAAC;QAEH,MAAM,IAAI,GAAG,GAAG,CAAC,IAAI,CAAC;QACtB,uEAAuE;QACvE,2EAA2E;QAC3E,+DAA+D;QAC/D,IACE,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,IAAI;YACzC,OAAQ,IAA2B,CAAC,IAAI,KAAK,QAAQ,EACrD,CAAC;YACD,MAAM,IAAI,QAAQ,CAChB,GAAG,CAAC,MAAM,EACV,cAAc,EACd,qBAAqB,GAAG,CAAC,MAAM,uCAAuC,EACtE,IAAI,CACL,CAAC;QACJ,CAAC;QACD,wEAAwE;QACxE,OAAO,IAAmB,CAAC;IAC7B,CAAC;CACF"}
@@ -0,0 +1,88 @@
1
+ /**
2
+ * `client.functions.*` — run a Function by the name you gave it.
3
+ *
4
+ * A Function is a canonical, vendor-stable interface bound to one swappable app
5
+ * Action. Before this namespace existed, calling one meant the URN operation:
6
+ *
7
+ * ```ts
8
+ * await client.run({ urn: "fn_a9b39917-cd4e-4eea-ab89-c3d079684193", payload });
9
+ * ```
10
+ *
11
+ * — an opaque id, buried inside an object, for a Function the user named
12
+ * `send-email`. `client.run` is still the right tool when the caller is
13
+ * *dispatching* something whose kind it does not know; it is the wrong tool for
14
+ * "call my send-email Function", which is what this is:
15
+ *
16
+ * ```ts
17
+ * await client.functions.run("send-email", { payload: { to, subject, html } });
18
+ * ```
19
+ *
20
+ * The name is the FIRST argument, matching `workflows.run(id, opts?)` — the
21
+ * namespace already shaped this way — so all three runnable kinds read alike.
22
+ *
23
+ * ID OR KEY, one argument. The server's `/functions/{idOrKey}/invoke` accepts
24
+ * either, because the two shapes cannot collide: an id carries a kind prefix and
25
+ * therefore an underscore, and a key is kebab-case, which forbids one. So this
26
+ * takes no flag and no prefix to say which you meant — pass whichever you have.
27
+ */
28
+ import type { ResolvedConfig } from "./config.ts";
29
+ import { type HttpResponse, type RequestOptions } from "./http.ts";
30
+ /**
31
+ * What this namespace needs from the client — the same narrow seam
32
+ * `WorkflowsApi` takes, so it is constructible in a test and this module never
33
+ * imports the client back.
34
+ */
35
+ export interface FunctionsHost {
36
+ /** The resolved configuration. */
37
+ readonly config: ResolvedConfig;
38
+ /** Perform one request. */
39
+ request<T>(options: RequestOptions): Promise<HttpResponse<T>>;
40
+ }
41
+ /** Per-call options for `functions.run`. */
42
+ export interface FunctionRunOptions {
43
+ /**
44
+ * The Function's canonical inputs, by input key.
45
+ *
46
+ * Named `payload` rather than `inputs` so every runnable kind in this SDK
47
+ * takes the same word — the wire spells it `inputs` for a Function and
48
+ * `input` for an Endpoint, and reconciling that is exactly the job of a
49
+ * wrapper. Defaults to `{}` rather than being omitted: the server's parameter
50
+ * schemas are written against an object, and `{}` says "no input" where an
51
+ * absent key says "I forgot".
52
+ */
53
+ payload?: Record<string, unknown>;
54
+ }
55
+ /**
56
+ * The `functions` namespace on a `W6WClient`.
57
+ *
58
+ * @example
59
+ * ```ts
60
+ * const output = await client.functions.run("send-email", {
61
+ * payload: { to: "ada@example.com", subject: "Hi", html: "<p>Hello</p>" },
62
+ * });
63
+ * ```
64
+ */
65
+ export declare class FunctionsApi {
66
+ #private;
67
+ /**
68
+ * @param host - The client this namespace issues requests through.
69
+ */
70
+ constructor(host: FunctionsHost);
71
+ /**
72
+ * Run one Function and return its output.
73
+ *
74
+ * Returns the Function's OUTPUT, not an envelope. `client.run` returns a
75
+ * `kind`-discriminated envelope because the caller does not know what the URN
76
+ * will resolve to; here the kind is in the method name, so the discriminant
77
+ * would be a field the caller has to unwrap to learn nothing.
78
+ *
79
+ * @param name - The Function's key (`"send-email"`) or its `fn_…` id. Percent-encoded into the path.
80
+ * @param options - `payload`, the Function's canonical inputs.
81
+ * @returns The Function's output, unwrapped from the `output` envelope.
82
+ * @throws {ApiError} `404 unknown_function` when no Function of that name exists for the caller.
83
+ * @throws {ApiError} `422 function_incomplete` when the Function has no runnable `impl`.
84
+ * @throws {ApiError} `bad_response` when a success body carries no `output` key at all.
85
+ */
86
+ run(name: string, options?: FunctionRunOptions): Promise<unknown>;
87
+ }
88
+ //# sourceMappingURL=functions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"functions.d.ts","sourceRoot":"","sources":["../../src/functions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAElD,OAAO,EAAE,KAAK,YAAY,EAAQ,KAAK,cAAc,EAAE,MAAM,WAAW,CAAC;AAEzE;;;;GAIG;AACH,MAAM,WAAW,aAAa;IAC5B,kCAAkC;IAClC,QAAQ,CAAC,MAAM,EAAE,cAAc,CAAC;IAChC,2BAA2B;IAC3B,OAAO,CAAC,CAAC,EAAE,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC;CAC/D;AAED,4CAA4C;AAC5C,MAAM,WAAW,kBAAkB;IACjC;;;;;;;;;OASG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACnC;AAED;;;;;;;;;GASG;AACH,qBAAa,YAAY;;IAGvB;;OAEG;gBACS,IAAI,EAAE,aAAa;IAI/B;;;;;;;;;;;;;;OAcG;IACG,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,kBAAkB,GAAG,OAAO,CAAC,OAAO,CAAC;CAyBxE"}
@@ -0,0 +1,56 @@
1
+ import { ApiError } from "./errors.js";
2
+ import { path } from "./http.js";
3
+ /**
4
+ * The `functions` namespace on a `W6WClient`.
5
+ *
6
+ * @example
7
+ * ```ts
8
+ * const output = await client.functions.run("send-email", {
9
+ * payload: { to: "ada@example.com", subject: "Hi", html: "<p>Hello</p>" },
10
+ * });
11
+ * ```
12
+ */
13
+ export class FunctionsApi {
14
+ #host;
15
+ /**
16
+ * @param host - The client this namespace issues requests through.
17
+ */
18
+ constructor(host) {
19
+ this.#host = host;
20
+ }
21
+ /**
22
+ * Run one Function and return its output.
23
+ *
24
+ * Returns the Function's OUTPUT, not an envelope. `client.run` returns a
25
+ * `kind`-discriminated envelope because the caller does not know what the URN
26
+ * will resolve to; here the kind is in the method name, so the discriminant
27
+ * would be a field the caller has to unwrap to learn nothing.
28
+ *
29
+ * @param name - The Function's key (`"send-email"`) or its `fn_…` id. Percent-encoded into the path.
30
+ * @param options - `payload`, the Function's canonical inputs.
31
+ * @returns The Function's output, unwrapped from the `output` envelope.
32
+ * @throws {ApiError} `404 unknown_function` when no Function of that name exists for the caller.
33
+ * @throws {ApiError} `422 function_incomplete` when the Function has no runnable `impl`.
34
+ * @throws {ApiError} `bad_response` when a success body carries no `output` key at all.
35
+ */
36
+ async run(name, options) {
37
+ const res = await this.#host.request({
38
+ method: "POST",
39
+ path: path `/functions/${name}/invoke`,
40
+ body: { inputs: options?.payload ?? {} },
41
+ });
42
+ // Deliberately NOT `unwrap(res, "output")`. That helper treats `null` as
43
+ // "the server did not send what it promised" — correct for a `documents` or
44
+ // `vars` envelope, where null is never a document. It is wrong here: a
45
+ // Function's output is an OPAQUE pass-through, and an action that returns
46
+ // nothing yields `{"output": null}`, which is a successful run and not a
47
+ // malformed response. So the guard is PRESENCE of the key, not truthiness
48
+ // of the value.
49
+ const body = res.body;
50
+ if (typeof body !== "object" || body === null || !("output" in body)) {
51
+ throw new ApiError(res.status, "bad_response", `Server returned a ${res.status} with no "output" in the response body.`, body);
52
+ }
53
+ return body.output;
54
+ }
55
+ }
56
+ //# sourceMappingURL=functions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"functions.js","sourceRoot":"","sources":["../../src/functions.ts"],"names":[],"mappings":"AA4BA,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAqB,IAAI,EAAuB,MAAM,WAAW,CAAC;AA6BzE;;;;;;;;;GASG;AACH,MAAM,OAAO,YAAY;IACd,KAAK,CAAgB;IAE9B;;OAEG;IACH,YAAY,IAAmB;QAC7B,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;IACpB,CAAC;IAED;;;;;;;;;;;;;;OAcG;IACH,KAAK,CAAC,GAAG,CAAC,IAAY,EAAE,OAA4B;QAClD,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,OAAO,CAAU;YAC5C,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,IAAI,CAAA,cAAc,IAAI,SAAS;YACrC,IAAI,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,IAAI,EAAE,EAAE;SACzC,CAAC,CAAC;QAEH,yEAAyE;QACzE,4EAA4E;QAC5E,uEAAuE;QACvE,0EAA0E;QAC1E,yEAAyE;QACzE,0EAA0E;QAC1E,gBAAgB;QAChB,MAAM,IAAI,GAAG,GAAG,CAAC,IAAI,CAAC;QACtB,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,IAAI,IAAI,CAAC,CAAC,QAAQ,IAAI,IAAI,CAAC,EAAE,CAAC;YACrE,MAAM,IAAI,QAAQ,CAChB,GAAG,CAAC,MAAM,EACV,cAAc,EACd,qBAAqB,GAAG,CAAC,MAAM,yCAAyC,EACxE,IAAI,CACL,CAAC;QACJ,CAAC;QACD,OAAQ,IAA4B,CAAC,MAAM,CAAC;IAC9C,CAAC;CACF"}
package/dist/src/me.d.ts CHANGED
@@ -16,7 +16,7 @@
16
16
  *
17
17
  * It is deliberately not a namespace class. `endpoints.json` names this
18
18
  * operation `client.me()`, a method on the client itself, so the module exports
19
- * a function over a narrow host interface and `W6wClient` delegates to it —
19
+ * a function over a narrow host interface and `W6WClient` delegates to it —
20
20
  * same layering as the namespaces, without inventing a `client.me.me()`.
21
21
  *
22
22
  * @module
@@ -24,7 +24,7 @@
24
24
  import type { HttpResponse, RequestOptions } from "./http.ts";
25
25
  import type { Me } from "./types.ts";
26
26
  /**
27
- * The slice of `W6wClient` this operation needs: the transport, and nothing
27
+ * The slice of `W6WClient` this operation needs: the transport, and nothing
28
28
  * else. Structural rather than a concrete client type, so it stays
29
29
  * independently callable in a test and this module never imports the client
30
30
  * back.
package/dist/src/me.js CHANGED
@@ -16,7 +16,7 @@
16
16
  *
17
17
  * It is deliberately not a namespace class. `endpoints.json` names this
18
18
  * operation `client.me()`, a method on the client itself, so the module exports
19
- * a function over a narrow host interface and `W6wClient` delegates to it —
19
+ * a function over a narrow host interface and `W6WClient` delegates to it —
20
20
  * same layering as the namespaces, without inventing a `client.me.me()`.
21
21
  *
22
22
  * @module
package/dist/src/run.d.ts CHANGED
@@ -2,8 +2,9 @@
2
2
  * `client.run({urn, action, payload})` — run anything a URN addresses.
3
3
  *
4
4
  * One POST, one kind-tagged body, no envelope key. The URN resolves over the
5
- * four runnable arms — `conn_…`, `wf_…`, `fn_…`, `ep_…` (D16) — and the answer
6
- * says which one it hit:
5
+ * `conn_…`, `wf_…`, `fn_…` and `ep_…` arms (D16), and, additionally, an
6
+ * account-scoped alias name (kebab-slug, `_`-free, which is why no flag is
7
+ * needed to disambiguate the two) — and the answer says which one it hit:
7
8
  *
8
9
  * | `kind` | Field | HTTP |
9
10
  * |---|---|---|
@@ -45,7 +46,7 @@
45
46
  import type { HttpResponse, RequestOptions } from "./http.ts";
46
47
  import type { RunEnvelope } from "./types.ts";
47
48
  /**
48
- * The slice of `W6wClient` this operation needs: the transport, and nothing
49
+ * The slice of `W6WClient` this operation needs: the transport, and nothing
49
50
  * else. Structural rather than a concrete client type, so it stays
50
51
  * independently callable in a test and this module never imports the client
51
52
  * back.
@@ -63,7 +64,11 @@ export interface RunHost {
63
64
  * uses it for its `wf_…` id.)
64
65
  */
65
66
  export interface RunInput {
66
- /** What to run: `conn_…`, `wf_…`, `fn_…` or `ep_…`. */
67
+ /**
68
+ * What to run: `conn_…`, `wf_…`, `fn_…`, `ep_…`, or, additionally, an
69
+ * account-scoped alias name (kebab-slug, `_`-free, which is why no flag is
70
+ * needed to disambiguate the two).
71
+ */
67
72
  urn: string;
68
73
  /**
69
74
  * Which action to invoke. Optional, because a workflow, function or endpoint
@@ -1 +1 @@
1
- {"version":3,"file":"run.d.ts","sourceRoot":"","sources":["../../src/run.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;AAGH,OAAO,KAAK,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAC9D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAE9C;;;;;GAKG;AACH,MAAM,WAAW,OAAO;IACtB,2BAA2B;IAC3B,OAAO,CAAC,CAAC,EAAE,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC;CAC/D;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,QAAQ;IACvB,uDAAuD;IACvD,GAAG,EAAE,MAAM,CAAC;IACZ;;;;OAIG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,+DAA+D;IAC/D,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACnC;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAsB,MAAM,CAAC,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,GAAG,OAAO,CAAC,WAAW,CAAC,CA8BjF"}
1
+ {"version":3,"file":"run.d.ts","sourceRoot":"","sources":["../../src/run.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AAGH,OAAO,KAAK,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAC9D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAE9C;;;;;GAKG;AACH,MAAM,WAAW,OAAO;IACtB,2BAA2B;IAC3B,OAAO,CAAC,CAAC,EAAE,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC;CAC/D;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,QAAQ;IACvB;;;;OAIG;IACH,GAAG,EAAE,MAAM,CAAC;IACZ;;;;OAIG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,+DAA+D;IAC/D,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACnC;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAsB,MAAM,CAAC,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,GAAG,OAAO,CAAC,WAAW,CAAC,CA8BjF"}
package/dist/src/run.js CHANGED
@@ -2,8 +2,9 @@
2
2
  * `client.run({urn, action, payload})` — run anything a URN addresses.
3
3
  *
4
4
  * One POST, one kind-tagged body, no envelope key. The URN resolves over the
5
- * four runnable arms — `conn_…`, `wf_…`, `fn_…`, `ep_…` (D16) — and the answer
6
- * says which one it hit:
5
+ * `conn_…`, `wf_…`, `fn_…` and `ep_…` arms (D16), and, additionally, an
6
+ * account-scoped alias name (kebab-slug, `_`-free, which is why no flag is
7
+ * needed to disambiguate the two) — and the answer says which one it hit:
7
8
  *
8
9
  * | `kind` | Field | HTTP |
9
10
  * |---|---|---|
@@ -1 +1 @@
1
- {"version":3,"file":"run.js","sourceRoot":"","sources":["../../src/run.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAoCvC;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,KAAK,UAAU,MAAM,CAAC,IAAa,EAAE,KAAe;IACzD,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,OAAO,CAAU;QACtC,MAAM,EAAE,MAAM;QACd,IAAI,EAAE,MAAM;QACZ,IAAI,EAAE;YACJ,GAAG,EAAE,KAAK,CAAC,GAAG;YACd,MAAM,EAAE,KAAK,CAAC,MAAM;YACpB,oEAAoE;YACpE,0EAA0E;YAC1E,mBAAmB;YACnB,OAAO,EAAE,KAAK,CAAC,OAAO,IAAI,EAAE;SAC7B;KACF,CAAC,CAAC;IAEH,MAAM,IAAI,GAAG,GAAG,CAAC,IAAI,CAAC;IACtB,IACE,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,IAAI;QACzC,OAAQ,IAA2B,CAAC,IAAI,KAAK,QAAQ,EACrD,CAAC;QACD,MAAM,IAAI,QAAQ,CAChB,GAAG,CAAC,MAAM,EACV,cAAc,EACd,qBAAqB,GAAG,CAAC,MAAM,uCAAuC,EACtE,IAAI,CACL,CAAC;IACJ,CAAC;IACD,qEAAqE;IACrE,yEAAyE;IACzE,wBAAwB;IACxB,OAAO,IAAmB,CAAC;AAC7B,CAAC"}
1
+ {"version":3,"file":"run.js","sourceRoot":"","sources":["../../src/run.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAwCvC;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,KAAK,UAAU,MAAM,CAAC,IAAa,EAAE,KAAe;IACzD,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,OAAO,CAAU;QACtC,MAAM,EAAE,MAAM;QACd,IAAI,EAAE,MAAM;QACZ,IAAI,EAAE;YACJ,GAAG,EAAE,KAAK,CAAC,GAAG;YACd,MAAM,EAAE,KAAK,CAAC,MAAM;YACpB,oEAAoE;YACpE,0EAA0E;YAC1E,mBAAmB;YACnB,OAAO,EAAE,KAAK,CAAC,OAAO,IAAI,EAAE;SAC7B;KACF,CAAC,CAAC;IAEH,MAAM,IAAI,GAAG,GAAG,CAAC,IAAI,CAAC;IACtB,IACE,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,IAAI;QACzC,OAAQ,IAA2B,CAAC,IAAI,KAAK,QAAQ,EACrD,CAAC;QACD,MAAM,IAAI,QAAQ,CAChB,GAAG,CAAC,MAAM,EACV,cAAc,EACd,qBAAqB,GAAG,CAAC,MAAM,uCAAuC,EACtE,IAAI,CACL,CAAC;IACJ,CAAC;IACD,qEAAqE;IACrE,yEAAyE;IACzE,wBAAwB;IACxB,OAAO,IAAmB,CAAC;AAC7B,CAAC"}
@@ -24,7 +24,7 @@
24
24
  import { type HttpResponse, type RequestOptions } from "./http.ts";
25
25
  import { type Var, type VarType } from "./types.ts";
26
26
  /**
27
- * The slice of `W6wClient` this namespace needs: the transport, and nothing
27
+ * The slice of `W6WClient` this namespace needs: the transport, and nothing
28
28
  * else. Structural rather than a concrete client type, so the namespace stays
29
29
  * independently constructible in a test and this module never imports the
30
30
  * client back.
@@ -68,7 +68,7 @@ export interface VarPatch {
68
68
  description?: string;
69
69
  }
70
70
  /**
71
- * The `vars` namespace on a `W6wClient`.
71
+ * The `vars` namespace on a `W6WClient`.
72
72
  *
73
73
  * @example
74
74
  * ```ts
package/dist/src/vars.js CHANGED
@@ -24,7 +24,7 @@
24
24
  import { path } from "./http.js";
25
25
  import { unwrap } from "./types.js";
26
26
  /**
27
- * The `vars` namespace on a `W6wClient`.
27
+ * The `vars` namespace on a `W6WClient`.
28
28
  *
29
29
  * @example
30
30
  * ```ts
@@ -10,5 +10,5 @@
10
10
  * this file as TypeScript source and rejects inferred public types ("no slow
11
11
  * types").
12
12
  */
13
- export const VERSION = "0.4.0";
13
+ export const VERSION = "0.6.0";
14
14
  //# sourceMappingURL=version.js.map
@@ -47,7 +47,7 @@ import type { ResolvedConfig } from "./config.ts";
47
47
  import { type HttpResponse, type RequestOptions } from "./http.ts";
48
48
  import { type RunResult, type WorkflowSummary } from "./types.ts";
49
49
  /**
50
- * The slice of `W6wClient` this namespace needs: the transport, plus the
50
+ * The slice of `W6WClient` this namespace needs: the transport, plus the
51
51
  * resolved configuration it reads the **default project** out of. Structural
52
52
  * rather than a concrete client type, so the namespace stays independently
53
53
  * constructible in a test and this module never imports the client back.
@@ -131,7 +131,7 @@ export interface WorkflowRunResult extends RunResult {
131
131
  httpStatus: number;
132
132
  }
133
133
  /**
134
- * The `workflows` namespace on a `W6wClient`.
134
+ * The `workflows` namespace on a `W6WClient`.
135
135
  *
136
136
  * @example
137
137
  * ```ts
@@ -47,7 +47,7 @@ import { ApiError } from "./errors.js";
47
47
  import { path } from "./http.js";
48
48
  import { isTerminalRunStatus, unwrap, } from "./types.js";
49
49
  /**
50
- * The `workflows` namespace on a `W6wClient`.
50
+ * The `workflows` namespace on a `W6WClient`.
51
51
  *
52
52
  * @example
53
53
  * ```ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@w6w/sdk",
3
- "version": "0.4.0",
3
+ "version": "0.6.0",
4
4
  "description": "Typed client for the w6w HTTP API. Thin transport, auth and error mapping — nothing else.",
5
5
  "license": "MIT",
6
6
  "repository": {