@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/dist/hosted.d.cts CHANGED
@@ -1,5 +1,5 @@
1
- import { H as HostedRuntimeBootstrap, R as RevoRuntime } from './errors-ieF9jeMP.cjs';
2
- export { a as RevoExecutionExit, b as RevoHttpResponseError, c as RevoRuntimeBridgeRequest, d as RevoRuntimeBridgeResponse, e as RevoRuntimeBridgeTransportError } from './errors-ieF9jeMP.cjs';
1
+ import { H as HostedRuntimeBootstrap, R as RevoRuntime } from './errors-Y4bv4vIM.cjs';
2
+ export { a as RevoExecutionExit, b as RevoHttpResponseError, c as RevoRuntimeBridgeRequest, d as RevoRuntimeBridgeResponse, e as RevoRuntimeBridgeTransportError } from './errors-Y4bv4vIM.cjs';
3
3
  import 'node:worker_threads';
4
4
 
5
5
  declare function createHostedRuntime(bootstrap: HostedRuntimeBootstrap): RevoRuntime;
package/dist/hosted.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { H as HostedRuntimeBootstrap, R as RevoRuntime } from './errors-ieF9jeMP.js';
2
- export { a as RevoExecutionExit, b as RevoHttpResponseError, c as RevoRuntimeBridgeRequest, d as RevoRuntimeBridgeResponse, e as RevoRuntimeBridgeTransportError } from './errors-ieF9jeMP.js';
1
+ import { H as HostedRuntimeBootstrap, R as RevoRuntime } from './errors-Y4bv4vIM.js';
2
+ export { a as RevoExecutionExit, b as RevoHttpResponseError, c as RevoRuntimeBridgeRequest, d as RevoRuntimeBridgeResponse, e as RevoRuntimeBridgeTransportError } from './errors-Y4bv4vIM.js';
3
3
  import 'node:worker_threads';
4
4
 
5
5
  declare function createHostedRuntime(bootstrap: HostedRuntimeBootstrap): RevoRuntime;
package/dist/hosted.js CHANGED
@@ -4367,12 +4367,12 @@ var require_object_hash = __commonJS({
4367
4367
 
4368
4368
  // src/generated/public-sdk.contract.ts
4369
4369
  var PUBLIC_SDK_PROTOCOL_VERSION = 1;
4370
- var PUBLIC_SDK_CONTRACT_REVISION = "a88e3ddff38d91762aa4c771955343e986039cebb04e4347fd257bd96f65bf5c";
4370
+ var PUBLIC_SDK_CONTRACT_REVISION = "b2e2a42372000367b1038ad4ea435ece2199434c9a229d525647f80647fee90b";
4371
4371
  var publicSdkContract = {
4372
4372
  "protocolVersion": 1,
4373
- "generatorRevision": 5,
4373
+ "generatorRevision": 6,
4374
4374
  "wireFormatRevision": 2,
4375
- "typeDefinitionsHash": "dfa20a5850eee53a8666c95e9034423fe2906ea68adaf19e8e53100bf62114c1",
4375
+ "typeDefinitionsHash": "f0f31ac175ccd67ac7cd299dd297df486d902be3f77182efa3b9c838309e7d3e",
4376
4376
  "wireSchemas": {
4377
4377
  "definitions": {
4378
4378
  "AgentCreateInput_adfabfb0f10c": {
@@ -5712,6 +5712,39 @@ var publicSdkContract = {
5712
5712
  "kind": "string"
5713
5713
  }
5714
5714
  },
5715
+ "LowCodeExecuteOptions_b90fc023cb6b": {
5716
+ "kind": "object",
5717
+ "properties": {
5718
+ "inputs": {
5719
+ "optional": true,
5720
+ "schema": {
5721
+ "kind": "any"
5722
+ }
5723
+ },
5724
+ "language": {
5725
+ "optional": true,
5726
+ "schema": {
5727
+ "kind": "ref",
5728
+ "ref": "Schema_d58cff33616d"
5729
+ }
5730
+ },
5731
+ "memory": {
5732
+ "optional": true,
5733
+ "schema": {
5734
+ "kind": "ref",
5735
+ "ref": "Schema_dc4b6520055b"
5736
+ }
5737
+ },
5738
+ "timeoutMs": {
5739
+ "optional": true,
5740
+ "schema": {
5741
+ "kind": "ref",
5742
+ "ref": "Schema_dc4b6520055b"
5743
+ }
5744
+ }
5745
+ },
5746
+ "additionalProperties": false
5747
+ },
5715
5748
  "Omit_e0bcf002c3d5": {
5716
5749
  "kind": "object",
5717
5750
  "properties": {
@@ -6221,6 +6254,18 @@ var publicSdkContract = {
6221
6254
  }
6222
6255
  ]
6223
6256
  },
6257
+ "Schema_10228e5c840c": {
6258
+ "kind": "union",
6259
+ "anyOf": [
6260
+ {
6261
+ "kind": "ref",
6262
+ "ref": "LowCodeExecuteOptions_b90fc023cb6b"
6263
+ },
6264
+ {
6265
+ "kind": "undefined"
6266
+ }
6267
+ ]
6268
+ },
6224
6269
  "Schema_108101eef1da": {
6225
6270
  "kind": "object",
6226
6271
  "properties": {
@@ -8996,6 +9041,22 @@ var publicSdkContract = {
8996
9041
  "ref": "Schema_ae3179dbff58"
8997
9042
  }
8998
9043
  },
9044
+ "Schema_d58cff33616d": {
9045
+ "kind": "union",
9046
+ "anyOf": [
9047
+ {
9048
+ "kind": "literal",
9049
+ "value": "javascript"
9050
+ },
9051
+ {
9052
+ "kind": "literal",
9053
+ "value": "typescript"
9054
+ },
9055
+ {
9056
+ "kind": "undefined"
9057
+ }
9058
+ ]
9059
+ },
8999
9060
  "Schema_d5998e1bdd9b": {
9000
9061
  "kind": "union",
9001
9062
  "anyOf": [
@@ -17198,13 +17259,47 @@ var publicSdkContract = {
17198
17259
  ],
17199
17260
  "signatureHash": "c851afec157e2dd9dce9d7b6a9a736b2953ba6412b2697d2db5eb959d0d676c8"
17200
17261
  }
17262
+ ],
17263
+ "lowCode": [
17264
+ {
17265
+ "name": "execute",
17266
+ "mode": "remote",
17267
+ "overloads": [
17268
+ {
17269
+ "minArgs": 1,
17270
+ "maxArgs": 2,
17271
+ "parameters": [
17272
+ {
17273
+ "name": "code",
17274
+ "optional": false,
17275
+ "rest": false,
17276
+ "type": "string",
17277
+ "wireSchema": {
17278
+ "kind": "string"
17279
+ }
17280
+ },
17281
+ {
17282
+ "name": "options",
17283
+ "optional": true,
17284
+ "rest": false,
17285
+ "type": "LowCodeExecuteOptions",
17286
+ "wireSchema": {
17287
+ "kind": "ref",
17288
+ "ref": "Schema_10228e5c840c"
17289
+ }
17290
+ }
17291
+ ]
17292
+ }
17293
+ ],
17294
+ "signatureHash": "5ccc1664071c855d49e7a12bfb3ead64decc64151e44a9351246b28d9eb41862"
17295
+ }
17201
17296
  ]
17202
17297
  },
17203
- "contractRevision": "a88e3ddff38d91762aa4c771955343e986039cebb04e4347fd257bd96f65bf5c"
17298
+ "contractRevision": "b2e2a42372000367b1038ad4ea435ece2199434c9a229d525647f80647fee90b"
17204
17299
  };
17205
17300
 
17206
17301
  // src/contracts.ts
17207
- var SDK_VERSION = "1.0.0";
17302
+ var SDK_VERSION = "1.0.1";
17208
17303
  var PROTOCOL_VERSION = PUBLIC_SDK_PROTOCOL_VERSION;
17209
17304
  var CONTRACT_REVISION = PUBLIC_SDK_CONTRACT_REVISION;
17210
17305
  function namesByMode(surface, mode) {
@@ -17214,11 +17309,13 @@ var API_REMOTE_METHODS = Object.freeze(namesByMode("api", "remote"));
17214
17309
  var API_CONTEXT_METHODS = Object.freeze(namesByMode("api", "context"));
17215
17310
  var STORAGE_REMOTE_METHODS = Object.freeze(namesByMode("storage", "remote"));
17216
17311
  var AGENT_REMOTE_METHODS = Object.freeze(namesByMode("agents", "remote"));
17312
+ var LOW_CODE_REMOTE_METHODS = Object.freeze(namesByMode("lowCode", "remote"));
17217
17313
  var UTILS_LOCAL_METHODS = Object.freeze(namesByMode("utils", "local"));
17218
17314
  var REMOTE_METHODS = Object.freeze({
17219
17315
  api: new Set(API_REMOTE_METHODS),
17220
17316
  storage: new Set(STORAGE_REMOTE_METHODS),
17221
- agents: new Set(AGENT_REMOTE_METHODS)
17317
+ agents: new Set(AGENT_REMOTE_METHODS),
17318
+ lowCode: new Set(LOW_CODE_REMOTE_METHODS)
17222
17319
  });
17223
17320
 
17224
17321
  // src/errors.ts
@@ -19167,6 +19264,21 @@ function standaloneContext(transport) {
19167
19264
  throw new RevoRuntimeContextUnavailableError(method);
19168
19265
  };
19169
19266
  }
19267
+ var DEFAULT_EXECUTION_OPTIONS = Object.freeze({
19268
+ language: "typescript",
19269
+ timeoutMs: 6e4
19270
+ });
19271
+ function executeFunction(batcher, defaults = {}) {
19272
+ const configuredDefaults = Object.freeze({
19273
+ ...DEFAULT_EXECUTION_OPTIONS,
19274
+ ...defaults
19275
+ });
19276
+ return ((code, options = {}) => batcher.enqueue(
19277
+ "lowCode",
19278
+ "execute",
19279
+ [code, { ...configuredDefaults, ...options }]
19280
+ ));
19281
+ }
19170
19282
  function createRuntime(transport, options = {}) {
19171
19283
  const hostedState = options.hosted ? { debug: options.hosted.debug ?? false } : void 0;
19172
19284
  const batcher = new RuntimeBatcher(
@@ -19190,6 +19302,10 @@ function createRuntime(transport, options = {}) {
19190
19302
  AGENT_REMOTE_METHODS,
19191
19303
  batcher
19192
19304
  )),
19305
+ execute: executeFunction(
19306
+ batcher,
19307
+ options.executionDefaults ?? options.hosted?.executionDefaults
19308
+ ),
19193
19309
  batch: batcher.controller()
19194
19310
  };
19195
19311
  return Object.freeze(runtime);