@amigo-ai/platform-sdk 0.41.0 → 0.44.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/api.md +13 -0
- package/dist/index.cjs +98 -0
- package/dist/index.cjs.map +4 -4
- package/dist/index.js +5 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +98 -0
- package/dist/index.mjs.map +4 -4
- package/dist/resources/channels/index.js +27 -0
- package/dist/resources/channels/index.js.map +1 -0
- package/dist/resources/channels/ses-setup.js +79 -0
- package/dist/resources/channels/ses-setup.js.map +1 -0
- package/dist/resources/functions.js +8 -0
- package/dist/resources/functions.js.map +1 -1
- package/dist/types/generated/api.d.ts +57 -1
- package/dist/types/generated/api.d.ts.map +1 -1
- package/dist/types/index.d.cts +4 -0
- package/dist/types/index.d.cts.map +1 -1
- package/dist/types/index.d.ts +4 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/resources/channels/index.d.ts +26 -0
- package/dist/types/resources/channels/index.d.ts.map +1 -0
- package/dist/types/resources/channels/ses-setup.d.ts +61 -0
- package/dist/types/resources/channels/ses-setup.d.ts.map +1 -0
- package/dist/types/resources/functions.d.ts +9 -6
- package/dist/types/resources/functions.d.ts.map +1 -1
- package/dist/types/resources/intake.d.ts.map +1 -1
- package/dist/types/resources/metrics.d.ts.map +1 -1
- package/dist/types/resources/operators.d.ts.map +1 -1
- package/dist/types/resources/settings.d.ts.map +1 -1
- package/dist/types/resources/surfaces.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Channels namespace — workspace-scoped CRUD over the channel-manager-backed
|
|
3
|
+
* proxy mounted at ``/v1/{workspace_id}/channels/...`` on platform-api.
|
|
4
|
+
*
|
|
5
|
+
* Each subresource (``sesSetup``, future ``twilioSetup``, ``email``, etc.)
|
|
6
|
+
* lands in its own module; this barrel composes them onto a single
|
|
7
|
+
* ``ChannelsResource`` so callers can write
|
|
8
|
+
* ``client.channels.sesSetup.create(...)``.
|
|
9
|
+
*
|
|
10
|
+
* Extends ``WorkspaceScopedResource`` so ``client.channels.withOptions(...)``
|
|
11
|
+
* matches the universal pattern documented in api.md. The inherited
|
|
12
|
+
* ``withOptions`` reconstructs ``ChannelsResource`` with a scoped
|
|
13
|
+
* ``PlatformFetch`` client; the constructor below forwards that scoped
|
|
14
|
+
* client into a fresh ``SesSetupResource``, so the scoped headers /
|
|
15
|
+
* timeout / retry flow through to subresource calls automatically.
|
|
16
|
+
*/
|
|
17
|
+
import { WorkspaceScopedResource } from '../base.js';
|
|
18
|
+
import { SesSetupResource } from './ses-setup.js';
|
|
19
|
+
export { SesSetupResource } from './ses-setup.js';
|
|
20
|
+
export class ChannelsResource extends WorkspaceScopedResource {
|
|
21
|
+
sesSetup;
|
|
22
|
+
constructor(client, workspaceId) {
|
|
23
|
+
super(client, workspaceId);
|
|
24
|
+
this.sesSetup = new SesSetupResource(client, workspaceId);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/resources/channels/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAGH,OAAO,EAAE,uBAAuB,EAAE,MAAM,YAAY,CAAA;AACpD,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAA;AAEjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAA;AASjD,MAAM,OAAO,gBAAiB,SAAQ,uBAAuB;IAClD,QAAQ,CAAkB;IAEnC,YAAY,MAAqB,EAAE,WAAmB;QACpD,KAAK,CAAC,MAAM,EAAE,WAAW,CAAC,CAAA;QAC1B,IAAI,CAAC,QAAQ,GAAG,IAAI,gBAAgB,CAAC,MAAM,EAAE,WAAW,CAAC,CAAA;IAC3D,CAAC;CACF"}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SES setup resource — workspace-scoped CRUD over the channel-manager-backed
|
|
3
|
+
* SES setup proxy at ``/v1/{workspace_id}/channels/ses-setup``.
|
|
4
|
+
*
|
|
5
|
+
* Use SES setups to register a verified sending domain (e.g.
|
|
6
|
+
* ``mail.acme.com``) that can then back one or more email use cases. The
|
|
7
|
+
* caller publishes the returned DNS records (DKIM CNAMEs, MX, DMARC TXT)
|
|
8
|
+
* at their DNS provider; subsequent ``get`` or ``verify`` calls re-run the
|
|
9
|
+
* live DNS lookup and update each record's ``verified`` flag.
|
|
10
|
+
*/
|
|
11
|
+
import { WorkspaceScopedResource, extractData } from '../base.js';
|
|
12
|
+
const _SES_SETUP_LIST_RESPONSE_GUARD = true;
|
|
13
|
+
void _SES_SETUP_LIST_RESPONSE_GUARD;
|
|
14
|
+
export class SesSetupResource extends WorkspaceScopedResource {
|
|
15
|
+
/**
|
|
16
|
+
* Create an SES tenant + verified domain identity for this workspace.
|
|
17
|
+
*
|
|
18
|
+
* Returns the DNS records the customer must publish at their DNS provider.
|
|
19
|
+
* The setup is unusable for sending until every record's ``verified`` flag
|
|
20
|
+
* flips to ``true`` (call ``verify`` after publishing DNS to refresh).
|
|
21
|
+
*/
|
|
22
|
+
async create(body) {
|
|
23
|
+
return extractData(await this.client.POST('/v1/{workspace_id}/channels/ses-setup', {
|
|
24
|
+
params: { path: { workspace_id: this.workspaceId } },
|
|
25
|
+
body,
|
|
26
|
+
}));
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* List SES setups owned by this workspace.
|
|
30
|
+
*
|
|
31
|
+
* Each item carries the cached ``dns_verified`` aggregate; call ``get``
|
|
32
|
+
* for per-record DNS detail.
|
|
33
|
+
*/
|
|
34
|
+
async list(params) {
|
|
35
|
+
return extractData(await this.client.GET('/v1/{workspace_id}/channels/ses-setup', {
|
|
36
|
+
params: { path: { workspace_id: this.workspaceId }, query: params },
|
|
37
|
+
}));
|
|
38
|
+
}
|
|
39
|
+
/** Auto-paginating async iterable over every SES setup in the workspace. */
|
|
40
|
+
listAutoPaging(params) {
|
|
41
|
+
return this.iteratePaginatedList((pageParams) => this.list(pageParams), params);
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Get an SES setup with a live DNS verification refresh.
|
|
45
|
+
*
|
|
46
|
+
* Channel-manager re-runs ``GetEmailIdentity`` + DMARC/MX resolvers on
|
|
47
|
+
* every call, so each ``get`` is a live check rather than a cache read.
|
|
48
|
+
*/
|
|
49
|
+
async get(setupId) {
|
|
50
|
+
return extractData(await this.client.GET('/v1/{workspace_id}/channels/ses-setup/{setup_id}', {
|
|
51
|
+
params: { path: { workspace_id: this.workspaceId, setup_id: setupId } },
|
|
52
|
+
}));
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Explicit DNS refresh — equivalent to ``get`` but exposed as a POST so UI
|
|
56
|
+
* "Verify now" actions read as actions rather than reads.
|
|
57
|
+
*/
|
|
58
|
+
async verify(setupId) {
|
|
59
|
+
return extractData(await this.client.POST('/v1/{workspace_id}/channels/ses-setup/{setup_id}/verify', {
|
|
60
|
+
params: { path: { workspace_id: this.workspaceId, setup_id: setupId } },
|
|
61
|
+
}));
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Tear down the upstream SES tenant + identity and soft-delete the
|
|
65
|
+
* workspace binding. Throws ``ConflictError`` (HTTP 409) if any use case
|
|
66
|
+
* still references the setup — delete those use cases first.
|
|
67
|
+
*
|
|
68
|
+
* Routed through ``extractData`` so 4xx/5xx responses surface as typed
|
|
69
|
+
* SDK errors (matching every other resource's ``delete``); the
|
|
70
|
+
* ``ConflictError`` mapping fires here instead of relying on the
|
|
71
|
+
* underlying client's accidental throw.
|
|
72
|
+
*/
|
|
73
|
+
async delete(setupId) {
|
|
74
|
+
return extractData(await this.client.DELETE('/v1/{workspace_id}/channels/ses-setup/{setup_id}', {
|
|
75
|
+
params: { path: { workspace_id: this.workspaceId, setup_id: setupId } },
|
|
76
|
+
}));
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
//# sourceMappingURL=ses-setup.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ses-setup.js","sourceRoot":"","sources":["../../../src/resources/channels/ses-setup.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAIH,OAAO,EAAE,uBAAuB,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AAqDjE,MAAM,8BAA8B,GAOhC,IAAI,CAAA;AACR,KAAK,8BAA8B,CAAA;AAEnC,MAAM,OAAO,gBAAiB,SAAQ,uBAAuB;IAC3D;;;;;;OAMG;IACH,KAAK,CAAC,MAAM,CAAC,IAA2B;QACtC,OAAO,WAAW,CAChB,MAAM,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,uCAAuC,EAAE;YAC9D,MAAM,EAAE,EAAE,IAAI,EAAE,EAAE,YAAY,EAAE,IAAI,CAAC,WAAW,EAAE,EAAE;YACpD,IAAI;SACL,CAAC,CACH,CAAA;IACH,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,IAAI,CAAC,MAAmB;QAC5B,OAAO,WAAW,CAChB,MAAM,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,uCAAuC,EAAE;YAC7D,MAAM,EAAE,EAAE,IAAI,EAAE,EAAE,YAAY,EAAE,IAAI,CAAC,WAAW,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE;SACpE,CAAC,CACH,CAAA;IACH,CAAC;IAED,4EAA4E;IAC5E,cAAc,CAAC,MAAmB;QAChC,OAAO,IAAI,CAAC,oBAAoB,CAAC,CAAC,UAAU,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC,CAAA;IACjF,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,GAAG,CAAC,OAAe;QACvB,OAAO,WAAW,CAChB,MAAM,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,kDAAkD,EAAE;YACxE,MAAM,EAAE,EAAE,IAAI,EAAE,EAAE,YAAY,EAAE,IAAI,CAAC,WAAW,EAAE,QAAQ,EAAE,OAAO,EAAE,EAAE;SACxE,CAAC,CACH,CAAA;IACH,CAAC;IAED;;;OAGG;IACH,KAAK,CAAC,MAAM,CAAC,OAAe;QAC1B,OAAO,WAAW,CAChB,MAAM,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,yDAAyD,EAAE;YAChF,MAAM,EAAE,EAAE,IAAI,EAAE,EAAE,YAAY,EAAE,IAAI,CAAC,WAAW,EAAE,QAAQ,EAAE,OAAO,EAAE,EAAE;SACxE,CAAC,CACH,CAAA;IACH,CAAC;IAED;;;;;;;;;OASG;IACH,KAAK,CAAC,MAAM,CAAC,OAAe;QAC1B,OAAO,WAAW,CAChB,MAAM,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,kDAAkD,EAAE;YAC3E,MAAM,EAAE,EAAE,IAAI,EAAE,EAAE,YAAY,EAAE,IAAI,CAAC,WAAW,EAAE,QAAQ,EAAE,OAAO,EAAE,EAAE;SACxE,CAAC,CACH,CAAA;IACH,CAAC;CACF"}
|
|
@@ -106,6 +106,14 @@ export class FunctionsResource extends WorkspaceScopedResource {
|
|
|
106
106
|
* Test invoke — same as ``invoke`` plus persists ``last_test_*``
|
|
107
107
|
* telemetry on the version row so the DC tool list can show
|
|
108
108
|
* health without re-running.
|
|
109
|
+
*
|
|
110
|
+
* Returns :type:`TestInvokeResponse` (superset of `InvokeResponse`)
|
|
111
|
+
* so callers can read ``status`` / ``error`` / ``test_duration_ms``
|
|
112
|
+
* directly off the response. The platform-api route catches
|
|
113
|
+
* ``ServiceUnavailableError`` and converts it into ``status='fail'``
|
|
114
|
+
* with the executor's error string in ``error`` — so even on a
|
|
115
|
+
* blown-up SQL execution the response is a 200 with the failure
|
|
116
|
+
* detail surfaced to the caller.
|
|
109
117
|
*/
|
|
110
118
|
async testV2(functionName, body) {
|
|
111
119
|
return extractData(await this.client.POST('/v1/{workspace_id}/functions/{function_name}/v2/test', {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"functions.js","sourceRoot":"","sources":["../../src/resources/functions.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,uBAAuB,EAAE,WAAW,EAAE,MAAM,WAAW,CAAA;AAEhE,MAAM,OAAO,iBAAkB,SAAQ,uBAAuB;IAC5D,KAAK,CAAC,IAAI;QACR,OAAO,WAAW,CAChB,MAAM,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,8BAA8B,EAAE;YACpD,MAAM,EAAE,EAAE,IAAI,EAAE,EAAE,YAAY,EAAE,IAAI,CAAC,WAAW,EAAE,EAAE;SACrD,CAAC,CACH,CAAA;IACH,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,IAAoD;QAC/D,OAAO,WAAW,CAChB,MAAM,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,8BAA8B,EAAE;YACrD,MAAM,EAAE,EAAE,IAAI,EAAE,EAAE,YAAY,EAAE,IAAI,CAAC,WAAW,EAAE,EAAE;YACpD,IAAI;SACL,CAAC,CACH,CAAA;IACH,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,YAAoB;QAC/B,MAAM,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,8CAA8C,EAAE;YACvE,MAAM,EAAE,EAAE,IAAI,EAAE,EAAE,YAAY,EAAE,IAAI,CAAC,WAAW,EAAE,aAAa,EAAE,YAAY,EAAE,EAAE;SAClF,CAAC,CAAA;IACJ,CAAC;IAED,KAAK,CAAC,IAAI,CAAC,YAAoB,EAAE,IAAkD;QACjF,OAAO,WAAW,CAChB,MAAM,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,mDAAmD,EAAE;YAC1E,MAAM,EAAE,EAAE,IAAI,EAAE,EAAE,YAAY,EAAE,IAAI,CAAC,WAAW,EAAE,aAAa,EAAE,YAAY,EAAE,EAAE;YACjF,IAAI;SACL,CAAC,CACH,CAAA;IACH,CAAC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GG;IACH,KAAK,CAAC,QAAQ,CACZ,YAAoB,EACpB,IAA8C;QAE9C,OAAO,WAAW,CAChB,MAAM,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,uDAAuD,EAAE;YAC9E,MAAM,EAAE,EAAE,IAAI,EAAE,EAAE,YAAY,EAAE,IAAI,CAAC,WAAW,EAAE,aAAa,EAAE,YAAY,EAAE,EAAE;YACjF,IAAI;SACL,CAAC,CACH,CAAA;IACH,CAAC;CACF"}
|
|
@@ -3428,6 +3428,12 @@ export interface paths {
|
|
|
3428
3428
|
* Test invoke + persist telemetry
|
|
3429
3429
|
* @description Test invoke — same as invoke + persists last_test_* on the version row.
|
|
3430
3430
|
*
|
|
3431
|
+
* Returns :class:`TestInvokeResponse` so callers can render
|
|
3432
|
+
* ``status`` + ``error`` directly (the previous shape was
|
|
3433
|
+
* :class:`InvokeResponse`, which silently dropped those fields and
|
|
3434
|
+
* left the DC showing a generic "Invocation failed." even on the
|
|
3435
|
+
* catastrophic path).
|
|
3436
|
+
*
|
|
3431
3437
|
* Permissions: admin, owner.
|
|
3432
3438
|
*/
|
|
3433
3439
|
post: operations["test-function-v2"];
|
|
@@ -25517,6 +25523,56 @@ export interface components {
|
|
|
25517
25523
|
*/
|
|
25518
25524
|
status_code?: number | null;
|
|
25519
25525
|
};
|
|
25526
|
+
/**
|
|
25527
|
+
* TestInvokeResponse
|
|
25528
|
+
* @description Response shape for ``POST /v1/{ws}/functions/{name}/v2/test``.
|
|
25529
|
+
*
|
|
25530
|
+
* Structural superset of :class:`InvokeResponse` (inheritance makes
|
|
25531
|
+
* the relationship explicit and refactor-safe — if a field is
|
|
25532
|
+
* renamed on the base, both responses move together). Adds the
|
|
25533
|
+
* test-only telemetry the DC + SDK need to render a pass/fail
|
|
25534
|
+
* badge and an actionable error string when a deployed function
|
|
25535
|
+
* blows up at execute time. The underlying invoke uses the same
|
|
25536
|
+
* path; ``status`` / ``error`` are filled in by ``service.test``
|
|
25537
|
+
* after catching any ``ServiceUnavailableError`` from the
|
|
25538
|
+
* executor, so the route never bubbles a 5xx for a logical SQL
|
|
25539
|
+
* failure — it's still a 200 with ``status=fail`` so the caller
|
|
25540
|
+
* can show the message.
|
|
25541
|
+
*
|
|
25542
|
+
* Invariant (enforced by :func:`_check_error_when_fail`):
|
|
25543
|
+
* ``status == "fail" → error is not None and len(error) > 0``. Caps
|
|
25544
|
+
* the error string length so an upstream stack trace never blows up
|
|
25545
|
+
* a ``console.log`` line in the browser.
|
|
25546
|
+
*/
|
|
25547
|
+
TestInvokeResponse: {
|
|
25548
|
+
/**
|
|
25549
|
+
* Duration Ms
|
|
25550
|
+
* @default 0
|
|
25551
|
+
*/
|
|
25552
|
+
duration_ms?: number;
|
|
25553
|
+
/** Error */
|
|
25554
|
+
error?: string | null;
|
|
25555
|
+
/** Result */
|
|
25556
|
+
result?: unknown;
|
|
25557
|
+
/**
|
|
25558
|
+
* Row Count
|
|
25559
|
+
* @default 0
|
|
25560
|
+
*/
|
|
25561
|
+
row_count?: number;
|
|
25562
|
+
/**
|
|
25563
|
+
* Status
|
|
25564
|
+
* @default pass
|
|
25565
|
+
* @enum {string}
|
|
25566
|
+
*/
|
|
25567
|
+
status?: "pass" | "fail";
|
|
25568
|
+
/** Test Duration Ms */
|
|
25569
|
+
test_duration_ms?: number | null;
|
|
25570
|
+
/**
|
|
25571
|
+
* Version
|
|
25572
|
+
* @default 0
|
|
25573
|
+
*/
|
|
25574
|
+
version?: number;
|
|
25575
|
+
};
|
|
25520
25576
|
/** TestSkillRequest */
|
|
25521
25577
|
TestSkillRequest: {
|
|
25522
25578
|
/**
|
|
@@ -37045,7 +37101,7 @@ export interface operations {
|
|
|
37045
37101
|
[name: string]: unknown;
|
|
37046
37102
|
};
|
|
37047
37103
|
content: {
|
|
37048
|
-
"application/json": components["schemas"]["
|
|
37104
|
+
"application/json": components["schemas"]["TestInvokeResponse"];
|
|
37049
37105
|
};
|
|
37050
37106
|
};
|
|
37051
37107
|
/** @description Function not found */
|