@isomorph.ai/app-sdk 1.19.0 → 1.20.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/dist/index.d.ts
CHANGED
|
@@ -176,14 +176,14 @@ export interface WarehouseViewReadRequest {
|
|
|
176
176
|
export type WarehouseAppendRow = Record<string, string | number | boolean | null>;
|
|
177
177
|
/**
|
|
178
178
|
* Land rows in the warehouse. The resource is an alias IT approved with access `append` (an alias reads or
|
|
179
|
-
* appends, never both). Up to
|
|
179
|
+
* appends, never both). Up to 5000 rows per call; a larger report is several calls, each with its own fresh key.
|
|
180
180
|
* On a lane without a warehouse binding the rows are validated and answered as a dry run; nothing is written.
|
|
181
181
|
*/
|
|
182
182
|
export interface WarehouseTableAppendRequest {
|
|
183
183
|
operation: 'warehouse.table.append';
|
|
184
184
|
resource: string;
|
|
185
185
|
input: {
|
|
186
|
-
/** 1 to
|
|
186
|
+
/** 1 to 5000 rows. */
|
|
187
187
|
rows: WarehouseAppendRow[];
|
|
188
188
|
};
|
|
189
189
|
/** A fresh UUID per append, reused only to retry that same append. */
|
package/dist/index.js
CHANGED
|
@@ -31,15 +31,15 @@ function warehouseReadProblem({ columns, aggregates }) {
|
|
|
31
31
|
return undefined;
|
|
32
32
|
}
|
|
33
33
|
const UUID_PATTERN = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
|
|
34
|
-
// The append rules governance states in prose: 1 to
|
|
34
|
+
// The append rules governance states in prose: 1 to 5000 rows per call (a
|
|
35
35
|
// larger report is several calls) and a UUID idempotency key per call.
|
|
36
36
|
// Governance checks the columns and the value types against the catalog.
|
|
37
37
|
function warehouseAppendProblem({ input, idempotencyKey }) {
|
|
38
38
|
const rows = input?.rows;
|
|
39
39
|
if (!Array.isArray(rows) || rows.length === 0)
|
|
40
|
-
return { field: 'rows', message: 'a warehouse append needs 1 to
|
|
41
|
-
if (rows.length >
|
|
42
|
-
return { field: 'rows', message: 'a warehouse append takes at most
|
|
40
|
+
return { field: 'rows', message: 'a warehouse append needs 1 to 5000 rows' };
|
|
41
|
+
if (rows.length > 5000)
|
|
42
|
+
return { field: 'rows', message: 'a warehouse append takes at most 5000 rows per call; send a larger report as several calls, each with its own idempotencyKey' };
|
|
43
43
|
if (typeof idempotencyKey !== 'string' || !UUID_PATTERN.test(idempotencyKey))
|
|
44
44
|
return { field: 'idempotencyKey', message: 'a warehouse append needs a fresh UUID idempotencyKey per call' };
|
|
45
45
|
return undefined;
|
|
@@ -917,7 +917,7 @@ export declare const IntegrationExecuteInputRules: {
|
|
|
917
917
|
readonly kind: "record[]";
|
|
918
918
|
readonly required: true;
|
|
919
919
|
readonly minItems: 1;
|
|
920
|
-
readonly maxItems:
|
|
920
|
+
readonly maxItems: 5000;
|
|
921
921
|
readonly minProperties: 1;
|
|
922
922
|
readonly maxProperties: 64;
|
|
923
923
|
readonly types: readonly ["string", "number", "boolean", "null"];
|
|
@@ -277,7 +277,7 @@ export const IntegrationExecuteInputRules = {
|
|
|
277
277
|
"warehouse.table.append": {
|
|
278
278
|
idempotencyKey: true,
|
|
279
279
|
fields: {
|
|
280
|
-
rows: { kind: "record[]", required: true, minItems: 1, maxItems:
|
|
280
|
+
rows: { kind: "record[]", required: true, minItems: 1, maxItems: 5000, minProperties: 1, maxProperties: 64, types: ["string", "number", "boolean", "null"], maxLength: 4000 },
|
|
281
281
|
},
|
|
282
282
|
},
|
|
283
283
|
"service.request": {
|