@revoengine/sdk 3.0.0 → 4.0.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/README.md +10 -1
- package/dist/{errors-D_8Jrrt5.d.cts → errors-CoeJQeU7.d.cts} +38 -12
- package/dist/{errors-D_8Jrrt5.d.ts → errors-CoeJQeU7.d.ts} +38 -12
- package/dist/hosted.cjs +491 -216
- 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 +491 -216
- package/dist/hosted.js.map +1 -1
- package/dist/index.cjs +491 -216
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +444 -185
- package/dist/index.d.ts +444 -185
- package/dist/index.js +491 -216
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -8,7 +8,16 @@ Requirements: Node.js 22 or newer.
|
|
|
8
8
|
|
|
9
9
|
Development and GitLab CI use Node.js 24.21.0. Run `nvm use` to select the checked-in `.nvmrc`.
|
|
10
10
|
|
|
11
|
-
## SDK
|
|
11
|
+
## SDK 4.0.0 compatibility
|
|
12
|
+
|
|
13
|
+
SDK 4.0.0 targets RevoEngine 1.8.0. Remove `skipLibs`, `includeLibs` and
|
|
14
|
+
`excludeLibs` from execution configuration; libraries are resolved automatically.
|
|
15
|
+
These names remain valid as ordinary business data outside those configuration
|
|
16
|
+
locations. Upgrade the SDK and target platform together; use SDK 3.0.0 for an
|
|
17
|
+
instance that still runs 1.7.1. Follow the
|
|
18
|
+
[1.8 upgrade guide](https://docs.revoengine.com/developers/upgrading-to-1-8).
|
|
19
|
+
|
|
20
|
+
## Earlier SDK 3.0.0 migration
|
|
12
21
|
|
|
13
22
|
This major release synchronizes the complete public SDK contract with RevoEngine
|
|
14
23
|
1.7.1 and removes deprecated compatibility methods and legacy Files types. Remote calls require a platform runtime that admits
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as node_worker_threads from 'node:worker_threads';
|
|
2
2
|
import { Buffer as Buffer$1 } from 'node:buffer';
|
|
3
3
|
|
|
4
|
-
declare const SDK_VERSION: "
|
|
4
|
+
declare const SDK_VERSION: "4.0.0";
|
|
5
5
|
declare const PROTOCOL_VERSION: 1;
|
|
6
|
-
declare const CONTRACT_REVISION: "
|
|
6
|
+
declare const CONTRACT_REVISION: "55a2d6607e14cc2a6f7aef0d21d64a95e6d625d916d6e624bbecb4410716e79a";
|
|
7
7
|
type RuntimeSurfaceName = 'api' | 'storage' | 'transport' | 'vault' | 'serviceAccount' | 'agents' | 'lowCode';
|
|
8
8
|
|
|
9
9
|
// AUTO-GENERATED FILE. DO NOT EDIT DIRECTLY.
|
|
@@ -776,7 +776,7 @@ interface AssistantThreadQuery {
|
|
|
776
776
|
"cast"?: string;
|
|
777
777
|
/** Optional CTE definitions as a JSON string or bracket-style query object. Only honored by endpoints that explicitly enable dynamic CTEs. */
|
|
778
778
|
"with"?: string;
|
|
779
|
-
/**
|
|
779
|
+
/** Return only the complete estimated read plan without fetching records. count:true adds the count plan. Unsupported data sources reject diagnostic requests without executing the read. */
|
|
780
780
|
"debug"?: boolean;
|
|
781
781
|
/** Include technical response threads alongside conversations. Independent of deleted visibility. */
|
|
782
782
|
"includeResponses"?: boolean;
|
|
@@ -1192,7 +1192,7 @@ interface ServiceAccountQuery {
|
|
|
1192
1192
|
"cast"?: string;
|
|
1193
1193
|
/** Optional CTE definitions as a JSON string or bracket-style query object. Only honored by endpoints that explicitly enable dynamic CTEs. */
|
|
1194
1194
|
"with"?: string;
|
|
1195
|
-
/**
|
|
1195
|
+
/** Return only the complete estimated read plan without fetching records. count:true adds the count plan. Unsupported data sources reject diagnostic requests without executing the read. */
|
|
1196
1196
|
"debug"?: boolean;
|
|
1197
1197
|
}
|
|
1198
1198
|
interface AssistantActionResolutionInput {
|
|
@@ -1689,6 +1689,8 @@ interface SelectJoin {
|
|
|
1689
1689
|
* and injects their physical relation and schema metadata automatically.
|
|
1690
1690
|
*/
|
|
1691
1691
|
interface SelectInput {
|
|
1692
|
+
/** Preview the complete estimated read/count plans without fetching records. */
|
|
1693
|
+
debug?: boolean;
|
|
1692
1694
|
/**
|
|
1693
1695
|
* Selected output columns and computed fields.
|
|
1694
1696
|
* If omitted, the ORM selects all root-table columns by default.
|
|
@@ -1746,6 +1748,13 @@ interface DatabaseMutationRequest {
|
|
|
1746
1748
|
/**
|
|
1747
1749
|
* Normal data response returned by the ORM query execution layer.
|
|
1748
1750
|
*/
|
|
1751
|
+
/** Full estimated plans only; no data query, COUNT, SQL or bound params in the result. */
|
|
1752
|
+
interface DatabaseExplainResult {
|
|
1753
|
+
debug: {
|
|
1754
|
+
explain: string[];
|
|
1755
|
+
countExplain?: string[];
|
|
1756
|
+
};
|
|
1757
|
+
}
|
|
1749
1758
|
interface GetDatabaseDataResponse<T = any> {
|
|
1750
1759
|
data: T[];
|
|
1751
1760
|
results: number;
|
|
@@ -2399,9 +2408,6 @@ interface Input {
|
|
|
2399
2408
|
// Events
|
|
2400
2409
|
type?: string;
|
|
2401
2410
|
message?: any;
|
|
2402
|
-
// Execution context.
|
|
2403
|
-
excludeLibs?: string[];
|
|
2404
|
-
includeLibs?: string[];
|
|
2405
2411
|
}
|
|
2406
2412
|
type JsonValue = string | number | boolean | null | JsonValue[] | {
|
|
2407
2413
|
[key: string]: JsonValue;
|
|
@@ -2440,12 +2446,14 @@ interface ResourceItem extends BaseProperties {
|
|
|
2440
2446
|
interface DatabaseDataActionResponse {
|
|
2441
2447
|
requested: number;
|
|
2442
2448
|
success: number;
|
|
2449
|
+
/** Present with conditional upsert options: actual INSERT/UPDATE count. success includes intentionally skipped rows in this mode. */
|
|
2450
|
+
affected?: number;
|
|
2443
2451
|
elapsed: number;
|
|
2444
2452
|
/** Omitted when the write is called with `return: false`. */
|
|
2445
2453
|
data?: any[];
|
|
2446
2454
|
}
|
|
2447
2455
|
interface DatabaseDataWriteOptions {
|
|
2448
|
-
/** Defaults to true
|
|
2456
|
+
/** Defaults to true. false omits row payloads to reduce response overhead. */
|
|
2449
2457
|
return?: boolean;
|
|
2450
2458
|
/** With return enabled, return only primary keys. */
|
|
2451
2459
|
onlyKeys?: boolean;
|
|
@@ -2453,6 +2461,18 @@ interface DatabaseDataWriteOptions {
|
|
|
2453
2461
|
interface DatabaseUpsertOptions extends DatabaseDataWriteOptions {
|
|
2454
2462
|
/** Defaults to true. Set false for the legacy full-replacement conflict behavior. */
|
|
2455
2463
|
patch?: boolean;
|
|
2464
|
+
/**
|
|
2465
|
+
* Defaults to false. true compares supplied non-primary-key fields.
|
|
2466
|
+
* include or exclude selects the compared fields; the lists are mutually exclusive.
|
|
2467
|
+
* A difference writes every supplied PATCH field. Changes only to excluded fields are skipped.
|
|
2468
|
+
* Omitted fields remain unchanged; JSON uses stored text equality, JSONB uses structural equality.
|
|
2469
|
+
*/
|
|
2470
|
+
skipUnchanged?: boolean | {
|
|
2471
|
+
include?: string[];
|
|
2472
|
+
exclude?: string[];
|
|
2473
|
+
};
|
|
2474
|
+
/** Structured predicate on current target values. Controls updates only; missing rows are inserted independently. */
|
|
2475
|
+
filter?: SelectFilterNode;
|
|
2456
2476
|
}
|
|
2457
2477
|
interface TruncateDatabaseOptions {
|
|
2458
2478
|
/**
|
|
@@ -2487,7 +2507,7 @@ interface CloneDatabaseCompletedResponse {
|
|
|
2487
2507
|
message: string;
|
|
2488
2508
|
}
|
|
2489
2509
|
type CloneDatabaseResponse = CloneDatabaseAcceptedResponse | CloneDatabaseCompletedResponse;
|
|
2490
|
-
type ExportDatabaseOptions = Omit<SelectInput, 'from'> & {
|
|
2510
|
+
type ExportDatabaseOptions = Omit<SelectInput, 'from' | 'debug'> & {
|
|
2491
2511
|
/**
|
|
2492
2512
|
* false waits for final storage persistence and returns the completed response.
|
|
2493
2513
|
* true starts a background export and returns the accepted response.
|
|
@@ -2561,13 +2581,13 @@ interface ExportDatabaseCompletedResponse {
|
|
|
2561
2581
|
message: string;
|
|
2562
2582
|
}
|
|
2563
2583
|
type ExportDatabaseResponse = ExportDatabaseAcceptedResponse | ExportDatabaseCompletedResponse;
|
|
2564
|
-
interface DatabaseCountQuery extends Omit<SelectInput, 'take' | 'skip' | 'count' | 'sort'> {
|
|
2584
|
+
interface DatabaseCountQuery extends Omit<SelectInput, 'take' | 'skip' | 'count' | 'sort' | 'debug'> {
|
|
2565
2585
|
}
|
|
2566
2586
|
/** Omitted take or explicit null selects 2,000 rows; omission warns once per execution. */
|
|
2567
2587
|
interface DatabaseBoundedReadQuery extends Omit<SelectInput, 'take'> {
|
|
2568
2588
|
take?: number | null;
|
|
2569
2589
|
}
|
|
2570
|
-
interface DatabaseRowQuery extends Omit<SelectInput, 'take' | 'skip' | 'count'> {
|
|
2590
|
+
interface DatabaseRowQuery extends Omit<SelectInput, 'take' | 'skip' | 'count' | 'debug'> {
|
|
2571
2591
|
}
|
|
2572
2592
|
interface Context {
|
|
2573
2593
|
requestId: string;
|
|
@@ -3457,7 +3477,13 @@ interface RevoApi {
|
|
|
3457
3477
|
deleteDatabase(name: string): Promise<void>;
|
|
3458
3478
|
restoreDatabase(name: string): Promise<void>;
|
|
3459
3479
|
truncateDatabase(name: string, options?: TruncateDatabaseOptions): Promise<void>;
|
|
3460
|
-
getDatabaseData<T = any>(name: string, request
|
|
3480
|
+
getDatabaseData<T = any>(name: string, request: DatabaseBoundedReadQuery & {
|
|
3481
|
+
debug: true;
|
|
3482
|
+
}): Promise<DatabaseExplainResult>;
|
|
3483
|
+
getDatabaseData<T = any>(name: string, request?: DatabaseBoundedReadQuery & {
|
|
3484
|
+
debug?: false;
|
|
3485
|
+
}): Promise<GetDatabaseDataResponse<T>>;
|
|
3486
|
+
getDatabaseData<T = any>(name: string, request: DatabaseBoundedReadQuery): Promise<GetDatabaseDataResponse<T> | DatabaseExplainResult>;
|
|
3461
3487
|
getDatabaseDataRow<T = any>(name: string, query: DatabaseRowQuery): Promise<T | null>;
|
|
3462
3488
|
countDatabase(name: string, query?: DatabaseCountQuery): Promise<number>;
|
|
3463
3489
|
getDatabaseAudit(name: string, query?: DatabaseAuditQuery): Promise<DatabaseAuditResponse>;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as node_worker_threads from 'node:worker_threads';
|
|
2
2
|
import { Buffer as Buffer$1 } from 'node:buffer';
|
|
3
3
|
|
|
4
|
-
declare const SDK_VERSION: "
|
|
4
|
+
declare const SDK_VERSION: "4.0.0";
|
|
5
5
|
declare const PROTOCOL_VERSION: 1;
|
|
6
|
-
declare const CONTRACT_REVISION: "
|
|
6
|
+
declare const CONTRACT_REVISION: "55a2d6607e14cc2a6f7aef0d21d64a95e6d625d916d6e624bbecb4410716e79a";
|
|
7
7
|
type RuntimeSurfaceName = 'api' | 'storage' | 'transport' | 'vault' | 'serviceAccount' | 'agents' | 'lowCode';
|
|
8
8
|
|
|
9
9
|
// AUTO-GENERATED FILE. DO NOT EDIT DIRECTLY.
|
|
@@ -776,7 +776,7 @@ interface AssistantThreadQuery {
|
|
|
776
776
|
"cast"?: string;
|
|
777
777
|
/** Optional CTE definitions as a JSON string or bracket-style query object. Only honored by endpoints that explicitly enable dynamic CTEs. */
|
|
778
778
|
"with"?: string;
|
|
779
|
-
/**
|
|
779
|
+
/** Return only the complete estimated read plan without fetching records. count:true adds the count plan. Unsupported data sources reject diagnostic requests without executing the read. */
|
|
780
780
|
"debug"?: boolean;
|
|
781
781
|
/** Include technical response threads alongside conversations. Independent of deleted visibility. */
|
|
782
782
|
"includeResponses"?: boolean;
|
|
@@ -1192,7 +1192,7 @@ interface ServiceAccountQuery {
|
|
|
1192
1192
|
"cast"?: string;
|
|
1193
1193
|
/** Optional CTE definitions as a JSON string or bracket-style query object. Only honored by endpoints that explicitly enable dynamic CTEs. */
|
|
1194
1194
|
"with"?: string;
|
|
1195
|
-
/**
|
|
1195
|
+
/** Return only the complete estimated read plan without fetching records. count:true adds the count plan. Unsupported data sources reject diagnostic requests without executing the read. */
|
|
1196
1196
|
"debug"?: boolean;
|
|
1197
1197
|
}
|
|
1198
1198
|
interface AssistantActionResolutionInput {
|
|
@@ -1689,6 +1689,8 @@ interface SelectJoin {
|
|
|
1689
1689
|
* and injects their physical relation and schema metadata automatically.
|
|
1690
1690
|
*/
|
|
1691
1691
|
interface SelectInput {
|
|
1692
|
+
/** Preview the complete estimated read/count plans without fetching records. */
|
|
1693
|
+
debug?: boolean;
|
|
1692
1694
|
/**
|
|
1693
1695
|
* Selected output columns and computed fields.
|
|
1694
1696
|
* If omitted, the ORM selects all root-table columns by default.
|
|
@@ -1746,6 +1748,13 @@ interface DatabaseMutationRequest {
|
|
|
1746
1748
|
/**
|
|
1747
1749
|
* Normal data response returned by the ORM query execution layer.
|
|
1748
1750
|
*/
|
|
1751
|
+
/** Full estimated plans only; no data query, COUNT, SQL or bound params in the result. */
|
|
1752
|
+
interface DatabaseExplainResult {
|
|
1753
|
+
debug: {
|
|
1754
|
+
explain: string[];
|
|
1755
|
+
countExplain?: string[];
|
|
1756
|
+
};
|
|
1757
|
+
}
|
|
1749
1758
|
interface GetDatabaseDataResponse<T = any> {
|
|
1750
1759
|
data: T[];
|
|
1751
1760
|
results: number;
|
|
@@ -2399,9 +2408,6 @@ interface Input {
|
|
|
2399
2408
|
// Events
|
|
2400
2409
|
type?: string;
|
|
2401
2410
|
message?: any;
|
|
2402
|
-
// Execution context.
|
|
2403
|
-
excludeLibs?: string[];
|
|
2404
|
-
includeLibs?: string[];
|
|
2405
2411
|
}
|
|
2406
2412
|
type JsonValue = string | number | boolean | null | JsonValue[] | {
|
|
2407
2413
|
[key: string]: JsonValue;
|
|
@@ -2440,12 +2446,14 @@ interface ResourceItem extends BaseProperties {
|
|
|
2440
2446
|
interface DatabaseDataActionResponse {
|
|
2441
2447
|
requested: number;
|
|
2442
2448
|
success: number;
|
|
2449
|
+
/** Present with conditional upsert options: actual INSERT/UPDATE count. success includes intentionally skipped rows in this mode. */
|
|
2450
|
+
affected?: number;
|
|
2443
2451
|
elapsed: number;
|
|
2444
2452
|
/** Omitted when the write is called with `return: false`. */
|
|
2445
2453
|
data?: any[];
|
|
2446
2454
|
}
|
|
2447
2455
|
interface DatabaseDataWriteOptions {
|
|
2448
|
-
/** Defaults to true
|
|
2456
|
+
/** Defaults to true. false omits row payloads to reduce response overhead. */
|
|
2449
2457
|
return?: boolean;
|
|
2450
2458
|
/** With return enabled, return only primary keys. */
|
|
2451
2459
|
onlyKeys?: boolean;
|
|
@@ -2453,6 +2461,18 @@ interface DatabaseDataWriteOptions {
|
|
|
2453
2461
|
interface DatabaseUpsertOptions extends DatabaseDataWriteOptions {
|
|
2454
2462
|
/** Defaults to true. Set false for the legacy full-replacement conflict behavior. */
|
|
2455
2463
|
patch?: boolean;
|
|
2464
|
+
/**
|
|
2465
|
+
* Defaults to false. true compares supplied non-primary-key fields.
|
|
2466
|
+
* include or exclude selects the compared fields; the lists are mutually exclusive.
|
|
2467
|
+
* A difference writes every supplied PATCH field. Changes only to excluded fields are skipped.
|
|
2468
|
+
* Omitted fields remain unchanged; JSON uses stored text equality, JSONB uses structural equality.
|
|
2469
|
+
*/
|
|
2470
|
+
skipUnchanged?: boolean | {
|
|
2471
|
+
include?: string[];
|
|
2472
|
+
exclude?: string[];
|
|
2473
|
+
};
|
|
2474
|
+
/** Structured predicate on current target values. Controls updates only; missing rows are inserted independently. */
|
|
2475
|
+
filter?: SelectFilterNode;
|
|
2456
2476
|
}
|
|
2457
2477
|
interface TruncateDatabaseOptions {
|
|
2458
2478
|
/**
|
|
@@ -2487,7 +2507,7 @@ interface CloneDatabaseCompletedResponse {
|
|
|
2487
2507
|
message: string;
|
|
2488
2508
|
}
|
|
2489
2509
|
type CloneDatabaseResponse = CloneDatabaseAcceptedResponse | CloneDatabaseCompletedResponse;
|
|
2490
|
-
type ExportDatabaseOptions = Omit<SelectInput, 'from'> & {
|
|
2510
|
+
type ExportDatabaseOptions = Omit<SelectInput, 'from' | 'debug'> & {
|
|
2491
2511
|
/**
|
|
2492
2512
|
* false waits for final storage persistence and returns the completed response.
|
|
2493
2513
|
* true starts a background export and returns the accepted response.
|
|
@@ -2561,13 +2581,13 @@ interface ExportDatabaseCompletedResponse {
|
|
|
2561
2581
|
message: string;
|
|
2562
2582
|
}
|
|
2563
2583
|
type ExportDatabaseResponse = ExportDatabaseAcceptedResponse | ExportDatabaseCompletedResponse;
|
|
2564
|
-
interface DatabaseCountQuery extends Omit<SelectInput, 'take' | 'skip' | 'count' | 'sort'> {
|
|
2584
|
+
interface DatabaseCountQuery extends Omit<SelectInput, 'take' | 'skip' | 'count' | 'sort' | 'debug'> {
|
|
2565
2585
|
}
|
|
2566
2586
|
/** Omitted take or explicit null selects 2,000 rows; omission warns once per execution. */
|
|
2567
2587
|
interface DatabaseBoundedReadQuery extends Omit<SelectInput, 'take'> {
|
|
2568
2588
|
take?: number | null;
|
|
2569
2589
|
}
|
|
2570
|
-
interface DatabaseRowQuery extends Omit<SelectInput, 'take' | 'skip' | 'count'> {
|
|
2590
|
+
interface DatabaseRowQuery extends Omit<SelectInput, 'take' | 'skip' | 'count' | 'debug'> {
|
|
2571
2591
|
}
|
|
2572
2592
|
interface Context {
|
|
2573
2593
|
requestId: string;
|
|
@@ -3457,7 +3477,13 @@ interface RevoApi {
|
|
|
3457
3477
|
deleteDatabase(name: string): Promise<void>;
|
|
3458
3478
|
restoreDatabase(name: string): Promise<void>;
|
|
3459
3479
|
truncateDatabase(name: string, options?: TruncateDatabaseOptions): Promise<void>;
|
|
3460
|
-
getDatabaseData<T = any>(name: string, request
|
|
3480
|
+
getDatabaseData<T = any>(name: string, request: DatabaseBoundedReadQuery & {
|
|
3481
|
+
debug: true;
|
|
3482
|
+
}): Promise<DatabaseExplainResult>;
|
|
3483
|
+
getDatabaseData<T = any>(name: string, request?: DatabaseBoundedReadQuery & {
|
|
3484
|
+
debug?: false;
|
|
3485
|
+
}): Promise<GetDatabaseDataResponse<T>>;
|
|
3486
|
+
getDatabaseData<T = any>(name: string, request: DatabaseBoundedReadQuery): Promise<GetDatabaseDataResponse<T> | DatabaseExplainResult>;
|
|
3461
3487
|
getDatabaseDataRow<T = any>(name: string, query: DatabaseRowQuery): Promise<T | null>;
|
|
3462
3488
|
countDatabase(name: string, query?: DatabaseCountQuery): Promise<number>;
|
|
3463
3489
|
getDatabaseAudit(name: string, query?: DatabaseAuditQuery): Promise<DatabaseAuditResponse>;
|