@revoengine/sdk 1.0.0 → 1.0.1
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 +86 -10
- package/dist/{errors-ieF9jeMP.d.cts → errors-Y4bv4vIM.d.cts} +27 -4
- package/dist/{errors-ieF9jeMP.d.ts → errors-Y4bv4vIM.d.ts} +27 -4
- package/dist/hosted.cjs +122 -6
- package/dist/hosted.cjs.map +1 -1
- package/dist/hosted.d.cts +2 -2
- package/dist/hosted.d.ts +2 -2
- package/dist/hosted.js +122 -6
- package/dist/hosted.js.map +1 -1
- package/dist/index.cjs +126 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +88 -6
- package/dist/index.d.ts +88 -6
- package/dist/index.js +126 -7
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -4387,12 +4387,12 @@ module.exports = __toCommonJS(src_exports);
|
|
|
4387
4387
|
|
|
4388
4388
|
// src/generated/public-sdk.contract.ts
|
|
4389
4389
|
var PUBLIC_SDK_PROTOCOL_VERSION = 1;
|
|
4390
|
-
var PUBLIC_SDK_CONTRACT_REVISION = "
|
|
4390
|
+
var PUBLIC_SDK_CONTRACT_REVISION = "b2e2a42372000367b1038ad4ea435ece2199434c9a229d525647f80647fee90b";
|
|
4391
4391
|
var publicSdkContract = {
|
|
4392
4392
|
"protocolVersion": 1,
|
|
4393
|
-
"generatorRevision":
|
|
4393
|
+
"generatorRevision": 6,
|
|
4394
4394
|
"wireFormatRevision": 2,
|
|
4395
|
-
"typeDefinitionsHash": "
|
|
4395
|
+
"typeDefinitionsHash": "f0f31ac175ccd67ac7cd299dd297df486d902be3f77182efa3b9c838309e7d3e",
|
|
4396
4396
|
"wireSchemas": {
|
|
4397
4397
|
"definitions": {
|
|
4398
4398
|
"AgentCreateInput_adfabfb0f10c": {
|
|
@@ -5732,6 +5732,39 @@ var publicSdkContract = {
|
|
|
5732
5732
|
"kind": "string"
|
|
5733
5733
|
}
|
|
5734
5734
|
},
|
|
5735
|
+
"LowCodeExecuteOptions_b90fc023cb6b": {
|
|
5736
|
+
"kind": "object",
|
|
5737
|
+
"properties": {
|
|
5738
|
+
"inputs": {
|
|
5739
|
+
"optional": true,
|
|
5740
|
+
"schema": {
|
|
5741
|
+
"kind": "any"
|
|
5742
|
+
}
|
|
5743
|
+
},
|
|
5744
|
+
"language": {
|
|
5745
|
+
"optional": true,
|
|
5746
|
+
"schema": {
|
|
5747
|
+
"kind": "ref",
|
|
5748
|
+
"ref": "Schema_d58cff33616d"
|
|
5749
|
+
}
|
|
5750
|
+
},
|
|
5751
|
+
"memory": {
|
|
5752
|
+
"optional": true,
|
|
5753
|
+
"schema": {
|
|
5754
|
+
"kind": "ref",
|
|
5755
|
+
"ref": "Schema_dc4b6520055b"
|
|
5756
|
+
}
|
|
5757
|
+
},
|
|
5758
|
+
"timeoutMs": {
|
|
5759
|
+
"optional": true,
|
|
5760
|
+
"schema": {
|
|
5761
|
+
"kind": "ref",
|
|
5762
|
+
"ref": "Schema_dc4b6520055b"
|
|
5763
|
+
}
|
|
5764
|
+
}
|
|
5765
|
+
},
|
|
5766
|
+
"additionalProperties": false
|
|
5767
|
+
},
|
|
5735
5768
|
"Omit_e0bcf002c3d5": {
|
|
5736
5769
|
"kind": "object",
|
|
5737
5770
|
"properties": {
|
|
@@ -6241,6 +6274,18 @@ var publicSdkContract = {
|
|
|
6241
6274
|
}
|
|
6242
6275
|
]
|
|
6243
6276
|
},
|
|
6277
|
+
"Schema_10228e5c840c": {
|
|
6278
|
+
"kind": "union",
|
|
6279
|
+
"anyOf": [
|
|
6280
|
+
{
|
|
6281
|
+
"kind": "ref",
|
|
6282
|
+
"ref": "LowCodeExecuteOptions_b90fc023cb6b"
|
|
6283
|
+
},
|
|
6284
|
+
{
|
|
6285
|
+
"kind": "undefined"
|
|
6286
|
+
}
|
|
6287
|
+
]
|
|
6288
|
+
},
|
|
6244
6289
|
"Schema_108101eef1da": {
|
|
6245
6290
|
"kind": "object",
|
|
6246
6291
|
"properties": {
|
|
@@ -9016,6 +9061,22 @@ var publicSdkContract = {
|
|
|
9016
9061
|
"ref": "Schema_ae3179dbff58"
|
|
9017
9062
|
}
|
|
9018
9063
|
},
|
|
9064
|
+
"Schema_d58cff33616d": {
|
|
9065
|
+
"kind": "union",
|
|
9066
|
+
"anyOf": [
|
|
9067
|
+
{
|
|
9068
|
+
"kind": "literal",
|
|
9069
|
+
"value": "javascript"
|
|
9070
|
+
},
|
|
9071
|
+
{
|
|
9072
|
+
"kind": "literal",
|
|
9073
|
+
"value": "typescript"
|
|
9074
|
+
},
|
|
9075
|
+
{
|
|
9076
|
+
"kind": "undefined"
|
|
9077
|
+
}
|
|
9078
|
+
]
|
|
9079
|
+
},
|
|
9019
9080
|
"Schema_d5998e1bdd9b": {
|
|
9020
9081
|
"kind": "union",
|
|
9021
9082
|
"anyOf": [
|
|
@@ -17218,13 +17279,47 @@ var publicSdkContract = {
|
|
|
17218
17279
|
],
|
|
17219
17280
|
"signatureHash": "c851afec157e2dd9dce9d7b6a9a736b2953ba6412b2697d2db5eb959d0d676c8"
|
|
17220
17281
|
}
|
|
17282
|
+
],
|
|
17283
|
+
"lowCode": [
|
|
17284
|
+
{
|
|
17285
|
+
"name": "execute",
|
|
17286
|
+
"mode": "remote",
|
|
17287
|
+
"overloads": [
|
|
17288
|
+
{
|
|
17289
|
+
"minArgs": 1,
|
|
17290
|
+
"maxArgs": 2,
|
|
17291
|
+
"parameters": [
|
|
17292
|
+
{
|
|
17293
|
+
"name": "code",
|
|
17294
|
+
"optional": false,
|
|
17295
|
+
"rest": false,
|
|
17296
|
+
"type": "string",
|
|
17297
|
+
"wireSchema": {
|
|
17298
|
+
"kind": "string"
|
|
17299
|
+
}
|
|
17300
|
+
},
|
|
17301
|
+
{
|
|
17302
|
+
"name": "options",
|
|
17303
|
+
"optional": true,
|
|
17304
|
+
"rest": false,
|
|
17305
|
+
"type": "LowCodeExecuteOptions",
|
|
17306
|
+
"wireSchema": {
|
|
17307
|
+
"kind": "ref",
|
|
17308
|
+
"ref": "Schema_10228e5c840c"
|
|
17309
|
+
}
|
|
17310
|
+
}
|
|
17311
|
+
]
|
|
17312
|
+
}
|
|
17313
|
+
],
|
|
17314
|
+
"signatureHash": "5ccc1664071c855d49e7a12bfb3ead64decc64151e44a9351246b28d9eb41862"
|
|
17315
|
+
}
|
|
17221
17316
|
]
|
|
17222
17317
|
},
|
|
17223
|
-
"contractRevision": "
|
|
17318
|
+
"contractRevision": "b2e2a42372000367b1038ad4ea435ece2199434c9a229d525647f80647fee90b"
|
|
17224
17319
|
};
|
|
17225
17320
|
|
|
17226
17321
|
// src/contracts.ts
|
|
17227
|
-
var SDK_VERSION = "1.0.
|
|
17322
|
+
var SDK_VERSION = "1.0.1";
|
|
17228
17323
|
var PROTOCOL_VERSION = PUBLIC_SDK_PROTOCOL_VERSION;
|
|
17229
17324
|
var CONTRACT_REVISION = PUBLIC_SDK_CONTRACT_REVISION;
|
|
17230
17325
|
function namesByMode(surface, mode) {
|
|
@@ -17234,11 +17329,13 @@ var API_REMOTE_METHODS = Object.freeze(namesByMode("api", "remote"));
|
|
|
17234
17329
|
var API_CONTEXT_METHODS = Object.freeze(namesByMode("api", "context"));
|
|
17235
17330
|
var STORAGE_REMOTE_METHODS = Object.freeze(namesByMode("storage", "remote"));
|
|
17236
17331
|
var AGENT_REMOTE_METHODS = Object.freeze(namesByMode("agents", "remote"));
|
|
17332
|
+
var LOW_CODE_REMOTE_METHODS = Object.freeze(namesByMode("lowCode", "remote"));
|
|
17237
17333
|
var UTILS_LOCAL_METHODS = Object.freeze(namesByMode("utils", "local"));
|
|
17238
17334
|
var REMOTE_METHODS = Object.freeze({
|
|
17239
17335
|
api: new Set(API_REMOTE_METHODS),
|
|
17240
17336
|
storage: new Set(STORAGE_REMOTE_METHODS),
|
|
17241
|
-
agents: new Set(AGENT_REMOTE_METHODS)
|
|
17337
|
+
agents: new Set(AGENT_REMOTE_METHODS),
|
|
17338
|
+
lowCode: new Set(LOW_CODE_REMOTE_METHODS)
|
|
17242
17339
|
});
|
|
17243
17340
|
|
|
17244
17341
|
// src/errors.ts
|
|
@@ -19172,6 +19269,21 @@ function standaloneContext(transport) {
|
|
|
19172
19269
|
throw new RevoRuntimeContextUnavailableError(method);
|
|
19173
19270
|
};
|
|
19174
19271
|
}
|
|
19272
|
+
var DEFAULT_EXECUTION_OPTIONS = Object.freeze({
|
|
19273
|
+
language: "typescript",
|
|
19274
|
+
timeoutMs: 6e4
|
|
19275
|
+
});
|
|
19276
|
+
function executeFunction(batcher, defaults = {}) {
|
|
19277
|
+
const configuredDefaults = Object.freeze({
|
|
19278
|
+
...DEFAULT_EXECUTION_OPTIONS,
|
|
19279
|
+
...defaults
|
|
19280
|
+
});
|
|
19281
|
+
return ((code, options = {}) => batcher.enqueue(
|
|
19282
|
+
"lowCode",
|
|
19283
|
+
"execute",
|
|
19284
|
+
[code, { ...configuredDefaults, ...options }]
|
|
19285
|
+
));
|
|
19286
|
+
}
|
|
19175
19287
|
function createRuntime(transport, options = {}) {
|
|
19176
19288
|
const hostedState = options.hosted ? { debug: options.hosted.debug ?? false } : void 0;
|
|
19177
19289
|
const batcher = new RuntimeBatcher(
|
|
@@ -19195,6 +19307,10 @@ function createRuntime(transport, options = {}) {
|
|
|
19195
19307
|
AGENT_REMOTE_METHODS,
|
|
19196
19308
|
batcher
|
|
19197
19309
|
)),
|
|
19310
|
+
execute: executeFunction(
|
|
19311
|
+
batcher,
|
|
19312
|
+
options.executionDefaults ?? options.hosted?.executionDefaults
|
|
19313
|
+
),
|
|
19198
19314
|
batch: batcher.controller()
|
|
19199
19315
|
};
|
|
19200
19316
|
return Object.freeze(runtime);
|
|
@@ -19557,15 +19673,18 @@ var RevoClient = class {
|
|
|
19557
19673
|
utils;
|
|
19558
19674
|
storage;
|
|
19559
19675
|
agents;
|
|
19676
|
+
execute;
|
|
19560
19677
|
batch;
|
|
19561
19678
|
constructor(options = {}) {
|
|
19562
19679
|
const runtime = createRuntime(new StandaloneRuntimeTransport(options), {
|
|
19563
|
-
batch: options.batch
|
|
19680
|
+
batch: options.batch,
|
|
19681
|
+
...options.executionDefaults ? { executionDefaults: options.executionDefaults } : {}
|
|
19564
19682
|
});
|
|
19565
19683
|
this.api = runtime.api;
|
|
19566
19684
|
this.utils = runtime.utils;
|
|
19567
19685
|
this.storage = runtime.storage;
|
|
19568
19686
|
this.agents = runtime.agents;
|
|
19687
|
+
this.execute = runtime.execute;
|
|
19569
19688
|
this.batch = runtime.batch;
|
|
19570
19689
|
Object.freeze(this);
|
|
19571
19690
|
}
|