@relyio/sdk 0.17.0 → 0.19.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/CHANGELOG.md +35 -0
- package/dist/automations/index.cjs +71 -0
- package/dist/automations/index.d.cts +1590 -0
- package/dist/automations/index.d.ts +1590 -0
- package/dist/automations/index.js +6 -0
- package/dist/{chunk-RSHMA4KT.cjs → chunk-2SPPU2WG.cjs} +68 -68
- package/dist/{chunk-VS2DEUTN.js → chunk-356SF5Y2.js} +463 -26
- package/dist/chunk-5F3YYPLZ.cjs +19237 -0
- package/dist/chunk-7I3SC7SV.cjs +40 -0
- package/dist/chunk-DBYMG6MQ.cjs +535 -0
- package/dist/chunk-DI6KFDBO.js +43 -0
- package/dist/chunk-HDHBYYEY.js +36 -0
- package/dist/chunk-L6DXCKVQ.cjs +50 -0
- package/dist/{chunk-TZL374LS.cjs → chunk-M7MWNV3Q.cjs} +21 -21
- package/dist/{chunk-H6IBQSMM.js → chunk-NJQK5STK.js} +3 -3
- package/dist/chunk-NN45CSPZ.cjs +872 -0
- package/dist/{chunk-6E22GYPB.cjs → chunk-P23G5NXD.cjs} +781 -337
- package/dist/chunk-PZCDJFMA.js +19195 -0
- package/dist/chunk-T7LGREB3.js +848 -0
- package/dist/{chunk-BBUB7C2Z.js → chunk-W2A4OTCI.js} +3 -3
- package/dist/chunk-W2GRVXDG.js +520 -0
- package/dist/{chunk-5UMY6CS4.js → chunk-ZAKEY6DY.js} +3 -3
- package/dist/{chunk-LSRPMNPT.cjs → chunk-ZO6QDYJG.cjs} +7 -7
- package/dist/client/index.cjs +8 -7
- package/dist/client/index.d.cts +4 -3
- package/dist/client/index.d.ts +4 -3
- package/dist/client/index.js +6 -5
- package/dist/{define-content-type-AuL9-oz6.d.cts → define-content-type-BZ6X8GvL.d.cts} +4547 -842
- package/dist/{define-content-type-BGoQxqLf.d.ts → define-content-type-C12jh8cY.d.ts} +4547 -842
- package/dist/{define-schema-DgCX9YB7.d.ts → define-schema-BPlZl4a2.d.cts} +258 -10
- package/dist/{define-schema-DkXwpp0I.d.cts → define-schema-CK7TtYot.d.ts} +258 -10
- package/dist/dev-handshake/index.cjs +9 -9
- package/dist/dev-handshake/index.js +2 -2
- package/dist/extensions/index.cjs +100 -0
- package/dist/extensions/index.d.cts +6 -0
- package/dist/extensions/index.d.ts +6 -0
- package/dist/extensions/index.js +96 -0
- package/dist/functions/index.cjs +71 -0
- package/dist/functions/index.d.cts +6 -0
- package/dist/functions/index.d.ts +6 -0
- package/dist/functions/index.js +62 -0
- package/dist/{index-BBp8_tn9.d.ts → index-BxNnlc5D.d.ts} +167 -494
- package/dist/{index-DaMZ4FQ_.d.ts → index-C-MymZTe.d.ts} +1 -1
- package/dist/{index-DxRmKPrR.d.cts → index-D5jyIeQ5.d.cts} +167 -494
- package/dist/{index-Bp4AiNT3.d.cts → index-DN0l8RHw.d.cts} +1 -1
- package/dist/index.cjs +208 -185
- package/dist/index.d.cts +147 -17
- package/dist/index.d.ts +147 -17
- package/dist/index.js +11 -16
- package/dist/markdown/index.cjs +382 -382
- package/dist/markdown/index.js +1 -1
- package/dist/preview/index.cjs +11 -10
- package/dist/preview/index.js +3 -2
- package/dist/register-BiMQKVp-.d.ts +693 -0
- package/dist/register-DeMsaurp.d.cts +693 -0
- package/dist/rich-text/index.cjs +12 -12
- package/dist/rich-text/index.d.cts +2 -2
- package/dist/rich-text/index.d.ts +2 -2
- package/dist/rich-text/index.js +2 -2
- package/dist/schema/index.cjs +63 -34
- package/dist/schema/index.d.cts +14 -5
- package/dist/schema/index.d.ts +14 -5
- package/dist/schema/index.js +3 -2
- package/dist/types/index.d.cts +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/utils/index.cjs +20 -20
- package/dist/utils/index.js +2 -2
- package/package.json +23 -5
- package/dist/chunk-6PTRZP5U.cjs +0 -433
- package/dist/chunk-DIZY6CKM.js +0 -950
- package/dist/chunk-GHYB6IZK.cjs +0 -983
- package/dist/chunk-MWMSFIWN.cjs +0 -17
- package/dist/chunk-OVMIHAYK.js +0 -411
- package/dist/chunk-XQ4QHWZE.js +0 -13
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunk5F3YYPLZ_cjs = require('../chunk-5F3YYPLZ.cjs');
|
|
4
|
+
require('../chunk-NN45CSPZ.cjs');
|
|
5
|
+
var chunkL6DXCKVQ_cjs = require('../chunk-L6DXCKVQ.cjs');
|
|
6
|
+
|
|
7
|
+
/* RelyIO SDK - Built with ❤️ by the RelyIO Team */
|
|
8
|
+
|
|
9
|
+
// src/functions/index.ts
|
|
10
|
+
function isBatchRefused(error) {
|
|
11
|
+
return error instanceof Error && error.name === "BatchRefused" && "operation" in error;
|
|
12
|
+
}
|
|
13
|
+
chunkL6DXCKVQ_cjs.__name(isBatchRefused, "isBatchRefused");
|
|
14
|
+
function isActionRefused(error) {
|
|
15
|
+
return error instanceof Error && error.name === "ActionRefused" && "code" in error;
|
|
16
|
+
}
|
|
17
|
+
chunkL6DXCKVQ_cjs.__name(isActionRefused, "isActionRefused");
|
|
18
|
+
function respond(response) {
|
|
19
|
+
return {
|
|
20
|
+
_tag: "function-response",
|
|
21
|
+
status: response.status,
|
|
22
|
+
headers: { ...response.headers },
|
|
23
|
+
body: response.body ?? null
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
chunkL6DXCKVQ_cjs.__name(respond, "respond");
|
|
27
|
+
function defineFunction(config) {
|
|
28
|
+
const actions = (config.actions ?? []).map(({ extension, action }) => ({ extension, action }));
|
|
29
|
+
const declaration = {
|
|
30
|
+
...config.description === void 0 ? {} : { description: config.description },
|
|
31
|
+
runtime: config.runtime ?? "isolate",
|
|
32
|
+
...config.container === void 0 ? {} : { container: { size: config.container.size } },
|
|
33
|
+
...config.limits === void 0 ? {} : { limits: { ...config.limits } },
|
|
34
|
+
input: chunk5F3YYPLZ_cjs.compileKeyedMembers(config.input ?? {}),
|
|
35
|
+
...config.output === void 0 ? {} : { output: chunk5F3YYPLZ_cjs.compileKeyedMembers(config.output) },
|
|
36
|
+
records: { read: [...config.records?.read ?? []], write: [...config.records?.write ?? []] },
|
|
37
|
+
content: config.content ?? "none",
|
|
38
|
+
network: (config.network ?? []).map((host) => ({ ...host })),
|
|
39
|
+
secrets: Object.fromEntries(
|
|
40
|
+
Object.entries(config.secrets ?? {}).map(([name, secret]) => [
|
|
41
|
+
name,
|
|
42
|
+
{ hosts: [...secret.hosts] }
|
|
43
|
+
])
|
|
44
|
+
),
|
|
45
|
+
// Absent when it declares none, so a Function declaring none hashes as it did before
|
|
46
|
+
...actions.length === 0 ? {} : { actions },
|
|
47
|
+
// Absent when undeclared, so a Function declaring none hashes as it did before
|
|
48
|
+
...config.endUsers === void 0 ? {} : { endUsers: config.endUsers },
|
|
49
|
+
...config.route === void 0 ? {} : { route: config.route },
|
|
50
|
+
...config.tool === void 0 ? {} : { tool: { description: config.tool.description } },
|
|
51
|
+
...config.schedule === void 0 ? {} : { schedule: { ...config.schedule } }
|
|
52
|
+
};
|
|
53
|
+
return { _tag: "function", declaration, run: config.run };
|
|
54
|
+
}
|
|
55
|
+
chunkL6DXCKVQ_cjs.__name(defineFunction, "defineFunction");
|
|
56
|
+
function isFunctionDefinition(value) {
|
|
57
|
+
return typeof value === "object" && value !== null && value._tag === "function" && typeof value.run === "function" && typeof value.declaration === "object";
|
|
58
|
+
}
|
|
59
|
+
chunkL6DXCKVQ_cjs.__name(isFunctionDefinition, "isFunctionDefinition");
|
|
60
|
+
|
|
61
|
+
Object.defineProperty(exports, "fields", {
|
|
62
|
+
enumerable: true,
|
|
63
|
+
get: function () { return chunk5F3YYPLZ_cjs.fields; }
|
|
64
|
+
});
|
|
65
|
+
exports.defineFunction = defineFunction;
|
|
66
|
+
exports.isActionRefused = isActionRefused;
|
|
67
|
+
exports.isBatchRefused = isBatchRefused;
|
|
68
|
+
exports.isFunctionDefinition = isFunctionDefinition;
|
|
69
|
+
exports.respond = respond;
|
|
70
|
+
//# sourceMappingURL=index.cjs.map
|
|
71
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { r as FunctionActionHandle, q as FunctionActionReach, T as FunctionActionRefused, S as FunctionActions, J as FunctionBatchRefused, I as FunctionBatchResult, V as FunctionCapabilities, Y as FunctionConfig, m as FunctionContainerSize, R as FunctionContent, A as FunctionCounterMove, x as FunctionDeclaration, Z as FunctionDefinition, n as FunctionDuration, P as FunctionEndUser, O as FunctionEndUserClaims, N as FunctionEndUsers, w as FunctionFieldDeclaration, z as FunctionFile, _ as FunctionInputOf, p as FunctionNetworkHost, $ as FunctionOutputOf, G as FunctionRecordBatch, B as FunctionRecordReader, y as FunctionRecordTypeName, D as FunctionRecordWriter, L as FunctionRecords, W as FunctionResponse, t as FunctionRoute, o as FunctionRouteMethod, Q as FunctionRunInfo, F as FunctionRuntime, v as FunctionSchedule, s as FunctionSecretDeclaration, u as FunctionTool, M as FunctionWayIn, a0 as defineFunction, U as isActionRefused, K as isBatchRefused, a1 as isFunctionDefinition, X as respond } from '../automations/index.cjs';
|
|
2
|
+
import '../register-DeMsaurp.cjs';
|
|
3
|
+
import '../define-schema-BPlZl4a2.cjs';
|
|
4
|
+
import '../define-content-type-BZ6X8GvL.cjs';
|
|
5
|
+
export { fields } from '../schema/index.cjs';
|
|
6
|
+
import '../rich-text.d-BWc-5gX1.cjs';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { r as FunctionActionHandle, q as FunctionActionReach, T as FunctionActionRefused, S as FunctionActions, J as FunctionBatchRefused, I as FunctionBatchResult, V as FunctionCapabilities, Y as FunctionConfig, m as FunctionContainerSize, R as FunctionContent, A as FunctionCounterMove, x as FunctionDeclaration, Z as FunctionDefinition, n as FunctionDuration, P as FunctionEndUser, O as FunctionEndUserClaims, N as FunctionEndUsers, w as FunctionFieldDeclaration, z as FunctionFile, _ as FunctionInputOf, p as FunctionNetworkHost, $ as FunctionOutputOf, G as FunctionRecordBatch, B as FunctionRecordReader, y as FunctionRecordTypeName, D as FunctionRecordWriter, L as FunctionRecords, W as FunctionResponse, t as FunctionRoute, o as FunctionRouteMethod, Q as FunctionRunInfo, F as FunctionRuntime, v as FunctionSchedule, s as FunctionSecretDeclaration, u as FunctionTool, M as FunctionWayIn, a0 as defineFunction, U as isActionRefused, K as isBatchRefused, a1 as isFunctionDefinition, X as respond } from '../automations/index.js';
|
|
2
|
+
import '../register-BiMQKVp-.js';
|
|
3
|
+
import '../define-schema-CK7TtYot.js';
|
|
4
|
+
import '../define-content-type-C12jh8cY.js';
|
|
5
|
+
export { fields } from '../schema/index.js';
|
|
6
|
+
import '../rich-text.d-BWc-5gX1.js';
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { compileKeyedMembers } from '../chunk-PZCDJFMA.js';
|
|
2
|
+
export { fields } from '../chunk-PZCDJFMA.js';
|
|
3
|
+
import '../chunk-T7LGREB3.js';
|
|
4
|
+
import { __name } from '../chunk-DI6KFDBO.js';
|
|
5
|
+
|
|
6
|
+
/* RelyIO SDK - Built with ❤️ by the RelyIO Team */
|
|
7
|
+
|
|
8
|
+
// src/functions/index.ts
|
|
9
|
+
function isBatchRefused(error) {
|
|
10
|
+
return error instanceof Error && error.name === "BatchRefused" && "operation" in error;
|
|
11
|
+
}
|
|
12
|
+
__name(isBatchRefused, "isBatchRefused");
|
|
13
|
+
function isActionRefused(error) {
|
|
14
|
+
return error instanceof Error && error.name === "ActionRefused" && "code" in error;
|
|
15
|
+
}
|
|
16
|
+
__name(isActionRefused, "isActionRefused");
|
|
17
|
+
function respond(response) {
|
|
18
|
+
return {
|
|
19
|
+
_tag: "function-response",
|
|
20
|
+
status: response.status,
|
|
21
|
+
headers: { ...response.headers },
|
|
22
|
+
body: response.body ?? null
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
__name(respond, "respond");
|
|
26
|
+
function defineFunction(config) {
|
|
27
|
+
const actions = (config.actions ?? []).map(({ extension, action }) => ({ extension, action }));
|
|
28
|
+
const declaration = {
|
|
29
|
+
...config.description === void 0 ? {} : { description: config.description },
|
|
30
|
+
runtime: config.runtime ?? "isolate",
|
|
31
|
+
...config.container === void 0 ? {} : { container: { size: config.container.size } },
|
|
32
|
+
...config.limits === void 0 ? {} : { limits: { ...config.limits } },
|
|
33
|
+
input: compileKeyedMembers(config.input ?? {}),
|
|
34
|
+
...config.output === void 0 ? {} : { output: compileKeyedMembers(config.output) },
|
|
35
|
+
records: { read: [...config.records?.read ?? []], write: [...config.records?.write ?? []] },
|
|
36
|
+
content: config.content ?? "none",
|
|
37
|
+
network: (config.network ?? []).map((host) => ({ ...host })),
|
|
38
|
+
secrets: Object.fromEntries(
|
|
39
|
+
Object.entries(config.secrets ?? {}).map(([name, secret]) => [
|
|
40
|
+
name,
|
|
41
|
+
{ hosts: [...secret.hosts] }
|
|
42
|
+
])
|
|
43
|
+
),
|
|
44
|
+
// Absent when it declares none, so a Function declaring none hashes as it did before
|
|
45
|
+
...actions.length === 0 ? {} : { actions },
|
|
46
|
+
// Absent when undeclared, so a Function declaring none hashes as it did before
|
|
47
|
+
...config.endUsers === void 0 ? {} : { endUsers: config.endUsers },
|
|
48
|
+
...config.route === void 0 ? {} : { route: config.route },
|
|
49
|
+
...config.tool === void 0 ? {} : { tool: { description: config.tool.description } },
|
|
50
|
+
...config.schedule === void 0 ? {} : { schedule: { ...config.schedule } }
|
|
51
|
+
};
|
|
52
|
+
return { _tag: "function", declaration, run: config.run };
|
|
53
|
+
}
|
|
54
|
+
__name(defineFunction, "defineFunction");
|
|
55
|
+
function isFunctionDefinition(value) {
|
|
56
|
+
return typeof value === "object" && value !== null && value._tag === "function" && typeof value.run === "function" && typeof value.declaration === "object";
|
|
57
|
+
}
|
|
58
|
+
__name(isFunctionDefinition, "isFunctionDefinition");
|
|
59
|
+
|
|
60
|
+
export { defineFunction, isActionRefused, isBatchRefused, isFunctionDefinition, respond };
|
|
61
|
+
//# sourceMappingURL=index.js.map
|
|
62
|
+
//# sourceMappingURL=index.js.map
|