@zapier/zapier-sdk 0.56.1 → 0.57.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 +12 -0
- package/README.md +28 -20
- package/dist/experimental.cjs +31 -11
- package/dist/experimental.d.mts +12 -2
- package/dist/experimental.d.ts +10 -0
- package/dist/experimental.d.ts.map +1 -1
- package/dist/experimental.mjs +31 -11
- package/dist/{index-CjP7lGzL.d.mts → index-4QyPPLfu.d.mts} +32 -0
- package/dist/{index-CjP7lGzL.d.ts → index-4QyPPLfu.d.ts} +32 -0
- package/dist/index.cjs +30 -10
- package/dist/index.d.mts +1 -1
- package/dist/index.mjs +30 -10
- package/dist/plugins/tables/createTableFields/index.d.ts +1 -0
- package/dist/plugins/tables/createTableFields/index.d.ts.map +1 -1
- package/dist/plugins/tables/createTableFields/schemas.d.ts +2 -0
- package/dist/plugins/tables/createTableFields/schemas.d.ts.map +1 -1
- package/dist/plugins/tables/createTableRecords/index.d.ts +1 -0
- package/dist/plugins/tables/createTableRecords/index.d.ts.map +1 -1
- package/dist/plugins/tables/createTableRecords/schemas.d.ts +2 -0
- package/dist/plugins/tables/createTableRecords/schemas.d.ts.map +1 -1
- package/dist/plugins/tables/getTableRecord/index.d.ts +1 -0
- package/dist/plugins/tables/getTableRecord/index.d.ts.map +1 -1
- package/dist/plugins/tables/getTableRecord/schemas.d.ts +3 -0
- package/dist/plugins/tables/getTableRecord/schemas.d.ts.map +1 -1
- package/dist/plugins/tables/getTableRecord/schemas.js +2 -0
- package/dist/plugins/tables/listTableFields/index.d.ts +3 -0
- package/dist/plugins/tables/listTableFields/index.d.ts.map +1 -1
- package/dist/plugins/tables/listTableFields/index.js +3 -0
- package/dist/plugins/tables/listTableFields/schemas.d.ts +23 -0
- package/dist/plugins/tables/listTableFields/schemas.d.ts.map +1 -1
- package/dist/plugins/tables/listTableFields/schemas.js +4 -0
- package/dist/plugins/tables/listTableRecords/index.d.ts +3 -0
- package/dist/plugins/tables/listTableRecords/index.d.ts.map +1 -1
- package/dist/plugins/tables/listTableRecords/index.js +7 -1
- package/dist/plugins/tables/listTableRecords/schemas.d.ts +21 -0
- package/dist/plugins/tables/listTableRecords/schemas.d.ts.map +1 -1
- package/dist/plugins/tables/listTableRecords/schemas.js +2 -1
- package/dist/plugins/tables/updateTableRecords/index.d.ts +1 -0
- package/dist/plugins/tables/updateTableRecords/index.d.ts.map +1 -1
- package/dist/plugins/tables/updateTableRecords/schemas.d.ts +2 -0
- package/dist/plugins/tables/updateTableRecords/schemas.d.ts.map +1 -1
- package/dist/plugins/tables/utils.d.ts +6 -0
- package/dist/plugins/tables/utils.d.ts.map +1 -1
- package/dist/plugins/tables/utils.js +6 -0
- package/dist/plugins/triggers/ensureTriggerInbox/index.js +1 -1
- package/dist/sdk.d.ts +20 -0
- package/dist/sdk.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -2645,7 +2645,8 @@ function transformFieldItem(apiItem) {
|
|
|
2645
2645
|
created_at: apiItem.created_at,
|
|
2646
2646
|
edited_at: apiItem.edited_at,
|
|
2647
2647
|
options: apiItem.options,
|
|
2648
|
-
config: apiItem.config
|
|
2648
|
+
config: apiItem.config,
|
|
2649
|
+
deleted_at: apiItem.deleted_at
|
|
2649
2650
|
};
|
|
2650
2651
|
}
|
|
2651
2652
|
function transformRecordItem(apiItem) {
|
|
@@ -2653,7 +2654,8 @@ function transformRecordItem(apiItem) {
|
|
|
2653
2654
|
id: apiItem.id,
|
|
2654
2655
|
data: apiItem.data,
|
|
2655
2656
|
created_at: apiItem.created_at,
|
|
2656
|
-
edited_at: apiItem.edited_at
|
|
2657
|
+
edited_at: apiItem.edited_at,
|
|
2658
|
+
deleted_at: apiItem.deleted_at
|
|
2657
2659
|
};
|
|
2658
2660
|
}
|
|
2659
2661
|
function formatRecordError(fieldId, err) {
|
|
@@ -2697,6 +2699,9 @@ function throwOnResponseErrors(response) {
|
|
|
2697
2699
|
var KeyModeSchema = z.enum(["names", "ids"]).optional().default("names").describe(
|
|
2698
2700
|
'How to interpret field keys in record data. "names" (default) uses human-readable field names, "ids" uses raw field IDs (f1, f2).'
|
|
2699
2701
|
);
|
|
2702
|
+
var TrashSchema = z.enum(["exclude", "include", "only"]).optional().describe(
|
|
2703
|
+
'Control soft-deleted item visibility. "exclude" (default) returns active items only, "include" returns both active and soft-deleted, "only" returns soft-deleted items only.'
|
|
2704
|
+
);
|
|
2700
2705
|
var FIELD_ID_PATTERN = /^f\d+$/;
|
|
2701
2706
|
function isFieldId(key) {
|
|
2702
2707
|
return FIELD_ID_PATTERN.test(key);
|
|
@@ -2947,7 +2952,8 @@ var FieldApiItemSchema = z.object({
|
|
|
2947
2952
|
config: z.record(z.string(), z.unknown()).optional(),
|
|
2948
2953
|
is_order_field: z.boolean().optional(),
|
|
2949
2954
|
is_filter_field: z.boolean().optional(),
|
|
2950
|
-
is_selected_field: z.boolean().optional()
|
|
2955
|
+
is_selected_field: z.boolean().optional(),
|
|
2956
|
+
deleted_at: z.string().nullable().optional()
|
|
2951
2957
|
});
|
|
2952
2958
|
var ListTableFieldsApiResponseSchema = z.object({
|
|
2953
2959
|
data: z.array(FieldApiItemSchema)
|
|
@@ -2959,7 +2965,8 @@ var FieldItemSchemaBase = z.object({
|
|
|
2959
2965
|
created_at: z.string().optional(),
|
|
2960
2966
|
edited_at: z.string().optional(),
|
|
2961
2967
|
options: z.record(z.string(), z.unknown()).optional(),
|
|
2962
|
-
config: z.record(z.string(), z.unknown()).optional()
|
|
2968
|
+
config: z.record(z.string(), z.unknown()).optional(),
|
|
2969
|
+
deleted_at: z.string().nullable().optional()
|
|
2963
2970
|
});
|
|
2964
2971
|
var FieldItemSchema = withFormatter(FieldItemSchemaBase, {
|
|
2965
2972
|
format: (item) => ({
|
|
@@ -2973,7 +2980,8 @@ var ListTableFieldsOptionsBaseSchema = z.object({
|
|
|
2973
2980
|
fields: FieldsPropertySchema.optional(),
|
|
2974
2981
|
fieldKeys: z.array(z.union([z.string(), z.number()])).optional().describe(
|
|
2975
2982
|
'Filter by specific fields. Accepts field names (e.g., "Email") or IDs (e.g., "f6", "6", or 6).'
|
|
2976
|
-
).meta({ deprecated: true })
|
|
2983
|
+
).meta({ deprecated: true }),
|
|
2984
|
+
trash: TrashSchema
|
|
2977
2985
|
});
|
|
2978
2986
|
var ListTableFieldsOptionsSchema = z.object({
|
|
2979
2987
|
table: TablePropertySchema
|
|
@@ -6320,7 +6328,7 @@ async function invalidateCredentialsToken(options) {
|
|
|
6320
6328
|
}
|
|
6321
6329
|
|
|
6322
6330
|
// src/sdk-version.ts
|
|
6323
|
-
var SDK_VERSION = (typeof process !== "undefined" && process.env ? "0.
|
|
6331
|
+
var SDK_VERSION = (typeof process !== "undefined" && process.env ? "0.57.0" : void 0) || "unknown";
|
|
6324
6332
|
|
|
6325
6333
|
// src/utils/open-url.ts
|
|
6326
6334
|
var nodePrefix = "node:";
|
|
@@ -7650,6 +7658,9 @@ var listTableFieldsPlugin = definePlugin(
|
|
|
7650
7658
|
});
|
|
7651
7659
|
searchParams.field_ids = numericIds.join(",");
|
|
7652
7660
|
}
|
|
7661
|
+
if (options.trash) {
|
|
7662
|
+
searchParams.trash = options.trash;
|
|
7663
|
+
}
|
|
7653
7664
|
const rawResponse = await api.get(
|
|
7654
7665
|
`/tables/api/v1/tables/${tableId}/fields`,
|
|
7655
7666
|
{
|
|
@@ -7780,13 +7791,15 @@ var RecordApiItemSchema = z.object({
|
|
|
7780
7791
|
schema_revision_id: z.number(),
|
|
7781
7792
|
errors: z.record(z.string(), z.unknown()).nullable().optional(),
|
|
7782
7793
|
orig_data: z.record(z.string(), z.unknown()).nullable().optional(),
|
|
7783
|
-
is_source_record: z.boolean().nullable().optional()
|
|
7794
|
+
is_source_record: z.boolean().nullable().optional(),
|
|
7795
|
+
deleted_at: z.string().nullable().optional()
|
|
7784
7796
|
});
|
|
7785
7797
|
var RecordItemSchemaBase = z.object({
|
|
7786
7798
|
id: z.string(),
|
|
7787
7799
|
data: z.record(z.string(), z.unknown()),
|
|
7788
7800
|
created_at: z.string(),
|
|
7789
|
-
edited_at: z.string()
|
|
7801
|
+
edited_at: z.string(),
|
|
7802
|
+
deleted_at: z.string().nullable().optional()
|
|
7790
7803
|
});
|
|
7791
7804
|
var RecordItemSchema = withFormatter(RecordItemSchemaBase, {
|
|
7792
7805
|
format: (item) => ({
|
|
@@ -7916,7 +7929,8 @@ var ListTableRecordsBase = z.object({
|
|
|
7916
7929
|
pageSize: z.number().min(1).max(1e3).optional().describe("Number of records per page (max 1000)"),
|
|
7917
7930
|
maxItems: z.number().min(1).optional().describe("Maximum total items to return across all pages"),
|
|
7918
7931
|
cursor: z.string().optional().describe("Cursor to start from"),
|
|
7919
|
-
keyMode: KeyModeSchema
|
|
7932
|
+
keyMode: KeyModeSchema,
|
|
7933
|
+
trash: TrashSchema
|
|
7920
7934
|
});
|
|
7921
7935
|
var ListTableRecordsOptionsSchema = z.object({
|
|
7922
7936
|
table: TablePropertySchema
|
|
@@ -7981,11 +7995,17 @@ var listTableRecordsPlugin = definePlugin(
|
|
|
7981
7995
|
start_cursor: options.cursor
|
|
7982
7996
|
};
|
|
7983
7997
|
}
|
|
7998
|
+
const searchParams = {
|
|
7999
|
+
allow_nested_queries: "true"
|
|
8000
|
+
};
|
|
8001
|
+
if (options.trash) {
|
|
8002
|
+
searchParams.trash = options.trash;
|
|
8003
|
+
}
|
|
7984
8004
|
const rawResponse = await api.post(
|
|
7985
8005
|
`/tables/api/v1/tables/${tableId}/records/query`,
|
|
7986
8006
|
body,
|
|
7987
8007
|
{
|
|
7988
|
-
searchParams
|
|
8008
|
+
searchParams,
|
|
7989
8009
|
authRequired: true,
|
|
7990
8010
|
resource: { type: "table", id: tableId }
|
|
7991
8011
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/plugins/tables/createTableFields/index.ts"],"names":[],"mappings":"AAaA,eAAO,MAAM,uBAAuB
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/plugins/tables/createTableFields/index.ts"],"names":[],"mappings":"AAaA,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6BnC,CAAC;AAEF,MAAM,MAAM,+BAA+B,GAAG,UAAU,CACtD,OAAO,uBAAuB,CAC/B,CAAC"}
|
|
@@ -47,6 +47,7 @@ export declare const CreateTableFieldsApiResponseSchema: z.ZodObject<{
|
|
|
47
47
|
is_order_field: z.ZodOptional<z.ZodBoolean>;
|
|
48
48
|
is_filter_field: z.ZodOptional<z.ZodBoolean>;
|
|
49
49
|
is_selected_field: z.ZodOptional<z.ZodBoolean>;
|
|
50
|
+
deleted_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
50
51
|
}, z.core.$strip>;
|
|
51
52
|
old: z.ZodNullable<z.ZodObject<{
|
|
52
53
|
id: z.ZodNumber;
|
|
@@ -90,6 +91,7 @@ export declare const CreateTableFieldsApiResponseSchema: z.ZodObject<{
|
|
|
90
91
|
is_order_field: z.ZodOptional<z.ZodBoolean>;
|
|
91
92
|
is_filter_field: z.ZodOptional<z.ZodBoolean>;
|
|
92
93
|
is_selected_field: z.ZodOptional<z.ZodBoolean>;
|
|
94
|
+
deleted_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
93
95
|
}, z.core.$strip>>;
|
|
94
96
|
kind: z.ZodEnum<{
|
|
95
97
|
created: "created";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../../../src/plugins/tables/createTableFields/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAEhE,OAAO,EACL,eAAe,EAEf,eAAe,EACf,KAA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G1C,MAAM,MAAM,wBAAwB,GAChC,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,8BAA8B,CAAC,GAAG,eAAe,CAAC,GAClE,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,wCAAwC,CAAC,EAAE,SAAS,CAAC,GACxE,eAAe,GAAG;IAChB,uCAAuC;IACvC,OAAO,EAAE,CAAC,CAAC,KAAK,CACd,OAAO,wCAAwC,CAChD,CAAC,SAAS,CAAC,CAAC;CACd,CAAC,CAAC;AAGT,MAAM,WAAW,uBAAuB;IACtC,IAAI,EAAE,SAAS,EAAE,CAAC;CACnB;AAGD,MAAM,WAAW,4BAA4B;IAC3C,iBAAiB,EAAE,CACjB,OAAO,EAAE,wBAAwB,KAC9B,OAAO,CAAC,uBAAuB,CAAC,CAAC;CACvC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/plugins/tables/createTableRecords/index.ts"],"names":[],"mappings":"AAmBA,eAAO,MAAM,wBAAwB
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/plugins/tables/createTableRecords/index.ts"],"names":[],"mappings":"AAmBA,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8CpC,CAAC;AAEF,MAAM,MAAM,gCAAgC,GAAG,UAAU,CACvD,OAAO,wBAAwB,CAChC,CAAC"}
|
|
@@ -15,6 +15,7 @@ export declare const CreateTableRecordsApiResponseSchema: z.ZodObject<{
|
|
|
15
15
|
errors: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
16
16
|
orig_data: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
17
17
|
is_source_record: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
18
|
+
deleted_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
18
19
|
}, z.core.$strip>>;
|
|
19
20
|
new: z.ZodObject<{
|
|
20
21
|
id: z.ZodString;
|
|
@@ -25,6 +26,7 @@ export declare const CreateTableRecordsApiResponseSchema: z.ZodObject<{
|
|
|
25
26
|
errors: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
26
27
|
orig_data: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
27
28
|
is_source_record: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
29
|
+
deleted_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
28
30
|
}, z.core.$strip>;
|
|
29
31
|
changed_field_ids: z.ZodNullable<z.ZodArray<z.ZodNumber>>;
|
|
30
32
|
record_id: z.ZodString;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../../../src/plugins/tables/createTableRecords/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAEhE,OAAO,EAEL,gBAAgB,EAChB,KAAK,UAAU,EAChB,MAAM,2BAA2B,CAAC;AAInC,OAAO,EAAE,gBAAgB,EAAE,CAAC;AAC5B,YAAY,EAAE,UAAU,EAAE,CAAC;AAW3B,eAAO,MAAM,mCAAmC
|
|
1
|
+
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../../../src/plugins/tables/createTableRecords/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAEhE,OAAO,EAEL,gBAAgB,EAChB,KAAK,UAAU,EAChB,MAAM,2BAA2B,CAAC;AAInC,OAAO,EAAE,gBAAgB,EAAE,CAAC;AAC5B,YAAY,EAAE,UAAU,EAAE,CAAC;AAW3B,eAAO,MAAM,mCAAmC;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAE9C,CAAC;AAEH,MAAM,MAAM,6BAA6B,GAAG,CAAC,CAAC,KAAK,CACjD,OAAO,mCAAmC,CAC3C,CAAC;AAEF,eAAO,MAAM,eAAe;;iBAI1B,CAAC;AAEH,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AAcxD,eAAO,MAAM,+BAA+B;;;;;;;;;;;iBAMF,CAAC;AAG3C,QAAA,MAAM,yCAAyC;;;;;;;;;iBAOf,CAAC;AAGjC,eAAO,MAAM,oCAAoC;;;;;;;;;;;;;;;;;;;;mBAKP,CAAC;AAG3C,MAAM,MAAM,yBAAyB,GACjC,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,+BAA+B,CAAC,GAAG,eAAe,CAAC,GACnE,CAAC,IAAI,CACH,CAAC,CAAC,KAAK,CAAC,OAAO,yCAAyC,CAAC,EACzD,SAAS,CACV,GACC,eAAe,GAAG;IAChB,uCAAuC;IACvC,OAAO,EAAE,CAAC,CAAC,KAAK,CACd,OAAO,yCAAyC,CACjD,CAAC,SAAS,CAAC,CAAC;CACd,CAAC,CAAC;AAET,MAAM,WAAW,wBAAwB;IACvC,IAAI,EAAE,UAAU,EAAE,CAAC;CACpB;AAED,MAAM,WAAW,6BAA6B;IAC5C,kBAAkB,EAAE,CAClB,OAAO,EAAE,yBAAyB,KAC/B,OAAO,CAAC,wBAAwB,CAAC,CAAC;CACxC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/plugins/tables/getTableRecord/index.ts"],"names":[],"mappings":"AAcA,eAAO,MAAM,oBAAoB
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/plugins/tables/getTableRecord/index.ts"],"names":[],"mappings":"AAcA,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwChC,CAAC;AAEF,MAAM,MAAM,4BAA4B,GAAG,UAAU,CACnD,OAAO,oBAAoB,CAC5B,CAAC"}
|
|
@@ -9,6 +9,7 @@ export declare const RecordApiItemSchema: z.ZodObject<{
|
|
|
9
9
|
errors: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
10
10
|
orig_data: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
11
11
|
is_source_record: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
12
|
+
deleted_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
12
13
|
}, z.core.$strip>;
|
|
13
14
|
export type RecordApiItem = z.infer<typeof RecordApiItemSchema>;
|
|
14
15
|
export declare const RecordItemSchema: z.ZodObject<{
|
|
@@ -16,6 +17,7 @@ export declare const RecordItemSchema: z.ZodObject<{
|
|
|
16
17
|
data: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
17
18
|
created_at: z.ZodString;
|
|
18
19
|
edited_at: z.ZodString;
|
|
20
|
+
deleted_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
19
21
|
}, z.core.$strip>;
|
|
20
22
|
export type RecordItem = z.infer<typeof RecordItemSchema>;
|
|
21
23
|
export declare const GetTableRecordApiResponseSchema: z.ZodObject<{
|
|
@@ -28,6 +30,7 @@ export declare const GetTableRecordApiResponseSchema: z.ZodObject<{
|
|
|
28
30
|
errors: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
29
31
|
orig_data: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
30
32
|
is_source_record: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
33
|
+
deleted_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
31
34
|
}, z.core.$strip>;
|
|
32
35
|
}, z.core.$strip>;
|
|
33
36
|
export type GetTableRecordApiResponse = z.infer<typeof GetTableRecordApiResponseSchema>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../../../src/plugins/tables/getTableRecord/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAQhE,eAAO,MAAM,mBAAmB
|
|
1
|
+
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../../../src/plugins/tables/getTableRecord/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAQhE,eAAO,MAAM,mBAAmB;;;;;;;;;;iBAU9B,CAAC;AAEH,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAWhE,eAAO,MAAM,gBAAgB;;;;;;iBAO3B,CAAC;AAEH,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAE1D,eAAO,MAAM,+BAA+B;;;;;;;;;;;;iBAE1C,CAAC;AAEH,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAC7C,OAAO,+BAA+B,CACvC,CAAC;AAUF,eAAO,MAAM,2BAA2B;;;;;;;;;;;iBAOsB,CAAC;AAG/D,QAAA,MAAM,qCAAqC;;;;;;;iBAWF,CAAC;AAG1C,eAAO,MAAM,gCAAgC;;;;;;;;;;;;;;;;;;mBAEP,CAAC;AAGvC,MAAM,MAAM,qBAAqB,GAC7B,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,GAAG,eAAe,CAAC,GAC/D,CAAC,IAAI,CACH,CAAC,CAAC,KAAK,CAAC,OAAO,qCAAqC,CAAC,EACrD,SAAS,GAAG,UAAU,CACvB,GAAG;IACF,uCAAuC;IACvC,OAAO,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,qCAAqC,CAAC,CAAC,SAAS,CAAC,CAAC;IAC1E,wCAAwC;IACxC,QAAQ,EAAE,CAAC,CAAC,KAAK,CACf,OAAO,qCAAqC,CAC7C,CAAC,UAAU,CAAC,CAAC;CACf,GAAG,eAAe,CAAC,CAAC;AAEzB,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,UAAU,CAAC;CAClB;AAED,MAAM,WAAW,yBAAyB;IACxC,cAAc,EAAE,CACd,OAAO,EAAE,qBAAqB,KAC3B,OAAO,CAAC,oBAAoB,CAAC,CAAC;CACpC"}
|
|
@@ -11,6 +11,7 @@ export const RecordApiItemSchema = z.object({
|
|
|
11
11
|
errors: z.record(z.string(), z.unknown()).nullable().optional(),
|
|
12
12
|
orig_data: z.record(z.string(), z.unknown()).nullable().optional(),
|
|
13
13
|
is_source_record: z.boolean().nullable().optional(),
|
|
14
|
+
deleted_at: z.string().nullable().optional(),
|
|
14
15
|
});
|
|
15
16
|
// SDK output schema (simplified)
|
|
16
17
|
const RecordItemSchemaBase = z.object({
|
|
@@ -18,6 +19,7 @@ const RecordItemSchemaBase = z.object({
|
|
|
18
19
|
data: z.record(z.string(), z.unknown()),
|
|
19
20
|
created_at: z.string(),
|
|
20
21
|
edited_at: z.string(),
|
|
22
|
+
deleted_at: z.string().nullable().optional(),
|
|
21
23
|
});
|
|
22
24
|
export const RecordItemSchema = withFormatter(RecordItemSchemaBase, {
|
|
23
25
|
format: (item) => ({
|
|
@@ -25,10 +25,12 @@ export declare const listTableFieldsPlugin: (sdk: {
|
|
|
25
25
|
table: string;
|
|
26
26
|
fields?: (string | number)[] | undefined;
|
|
27
27
|
fieldKeys?: (string | number)[] | undefined;
|
|
28
|
+
trash?: "only" | "include" | "exclude" | undefined;
|
|
28
29
|
} | {
|
|
29
30
|
tableId: string;
|
|
30
31
|
fields?: (string | number)[] | undefined;
|
|
31
32
|
fieldKeys?: (string | number)[] | undefined;
|
|
33
|
+
trash?: "only" | "include" | "exclude" | undefined;
|
|
32
34
|
} | undefined) => Promise<{
|
|
33
35
|
data: {
|
|
34
36
|
id: string;
|
|
@@ -38,6 +40,7 @@ export declare const listTableFieldsPlugin: (sdk: {
|
|
|
38
40
|
edited_at?: string | undefined;
|
|
39
41
|
options?: Record<string, unknown> | undefined;
|
|
40
42
|
config?: Record<string, unknown> | undefined;
|
|
43
|
+
deleted_at?: string | null | undefined;
|
|
41
44
|
}[];
|
|
42
45
|
}>;
|
|
43
46
|
} & {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/plugins/tables/listTableFields/index.ts"],"names":[],"mappings":"AAaA,eAAO,MAAM,qBAAqB
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/plugins/tables/listTableFields/index.ts"],"names":[],"mappings":"AAaA,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0CjC,CAAC;AAEF,MAAM,MAAM,6BAA6B,GAAG,UAAU,CACpD,OAAO,qBAAqB,CAC7B,CAAC"}
|
|
@@ -25,6 +25,9 @@ export const listTableFieldsPlugin = definePlugin((sdk) => createPluginMethod(sd
|
|
|
25
25
|
});
|
|
26
26
|
searchParams.field_ids = numericIds.join(",");
|
|
27
27
|
}
|
|
28
|
+
if (options.trash) {
|
|
29
|
+
searchParams.trash = options.trash;
|
|
30
|
+
}
|
|
28
31
|
const rawResponse = await api.get(`/tables/api/v1/tables/${tableId}/fields`, {
|
|
29
32
|
searchParams: Object.keys(searchParams).length > 0 ? searchParams : undefined,
|
|
30
33
|
authRequired: true,
|
|
@@ -75,6 +75,7 @@ export declare const FieldApiItemSchema: z.ZodObject<{
|
|
|
75
75
|
is_order_field: z.ZodOptional<z.ZodBoolean>;
|
|
76
76
|
is_filter_field: z.ZodOptional<z.ZodBoolean>;
|
|
77
77
|
is_selected_field: z.ZodOptional<z.ZodBoolean>;
|
|
78
|
+
deleted_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
78
79
|
}, z.core.$strip>;
|
|
79
80
|
export type FieldApiItem = z.infer<typeof FieldApiItemSchema>;
|
|
80
81
|
export declare const ListTableFieldsApiResponseSchema: z.ZodObject<{
|
|
@@ -120,6 +121,7 @@ export declare const ListTableFieldsApiResponseSchema: z.ZodObject<{
|
|
|
120
121
|
is_order_field: z.ZodOptional<z.ZodBoolean>;
|
|
121
122
|
is_filter_field: z.ZodOptional<z.ZodBoolean>;
|
|
122
123
|
is_selected_field: z.ZodOptional<z.ZodBoolean>;
|
|
124
|
+
deleted_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
123
125
|
}, z.core.$strip>>;
|
|
124
126
|
}, z.core.$strip>;
|
|
125
127
|
export type ListTableFieldsApiResponse = z.infer<typeof ListTableFieldsApiResponseSchema>;
|
|
@@ -162,6 +164,7 @@ export declare const FieldItemSchema: z.ZodObject<{
|
|
|
162
164
|
edited_at: z.ZodOptional<z.ZodString>;
|
|
163
165
|
options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
164
166
|
config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
167
|
+
deleted_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
165
168
|
}, z.core.$strip>;
|
|
166
169
|
export type FieldItem = z.infer<typeof FieldItemSchema>;
|
|
167
170
|
export declare const ListTableFieldsOptionsSchema: z.ZodObject<{
|
|
@@ -170,11 +173,21 @@ export declare const ListTableFieldsOptionsSchema: z.ZodObject<{
|
|
|
170
173
|
};
|
|
171
174
|
fields: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
|
|
172
175
|
fieldKeys: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
|
|
176
|
+
trash: z.ZodOptional<z.ZodEnum<{
|
|
177
|
+
only: "only";
|
|
178
|
+
include: "include";
|
|
179
|
+
exclude: "exclude";
|
|
180
|
+
}>>;
|
|
173
181
|
}, z.core.$strip>;
|
|
174
182
|
declare const ListTableFieldsOptionsSchemaDeprecated: z.ZodObject<{
|
|
175
183
|
tableId: z.ZodString;
|
|
176
184
|
fields: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
|
|
177
185
|
fieldKeys: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
|
|
186
|
+
trash: z.ZodOptional<z.ZodEnum<{
|
|
187
|
+
only: "only";
|
|
188
|
+
include: "include";
|
|
189
|
+
exclude: "exclude";
|
|
190
|
+
}>>;
|
|
178
191
|
}, z.core.$strip>;
|
|
179
192
|
export declare const ListTableFieldsOptionsInputSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
180
193
|
table: z.ZodString & {
|
|
@@ -182,10 +195,20 @@ export declare const ListTableFieldsOptionsInputSchema: z.ZodUnion<readonly [z.Z
|
|
|
182
195
|
};
|
|
183
196
|
fields: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
|
|
184
197
|
fieldKeys: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
|
|
198
|
+
trash: z.ZodOptional<z.ZodEnum<{
|
|
199
|
+
only: "only";
|
|
200
|
+
include: "include";
|
|
201
|
+
exclude: "exclude";
|
|
202
|
+
}>>;
|
|
185
203
|
}, z.core.$strip>, z.ZodObject<{
|
|
186
204
|
tableId: z.ZodString;
|
|
187
205
|
fields: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
|
|
188
206
|
fieldKeys: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
|
|
207
|
+
trash: z.ZodOptional<z.ZodEnum<{
|
|
208
|
+
only: "only";
|
|
209
|
+
include: "include";
|
|
210
|
+
exclude: "exclude";
|
|
211
|
+
}>>;
|
|
189
212
|
}, z.core.$strip>]>;
|
|
190
213
|
export type ListTableFieldsOptions = (z.infer<typeof ListTableFieldsOptionsSchema> & FunctionOptions) | (Omit<z.infer<typeof ListTableFieldsOptionsSchemaDeprecated>, "tableId" | "fieldKeys"> & {
|
|
191
214
|
/** @deprecated Use `table` instead. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../../../src/plugins/tables/listTableFields/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../../../src/plugins/tables/listTableFields/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAQhE,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA+B1B,CAAC;AAEH,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AAExD,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAY7B,CAAC;AAEH,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAE9D,eAAO,MAAM,gCAAgC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAE3C,CAAC;AAEH,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAC9C,OAAO,gCAAgC,CACxC,CAAC;AAaF,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAM1B,CAAC;AAEH,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AAkBxD,eAAO,MAAM,4BAA4B;;;;;;;;;;;iBAMsB,CAAC;AAGhE,QAAA,MAAM,sCAAsC;;;;;;;;;iBAOF,CAAC;AAG3C,eAAO,MAAM,iCAAiC;;;;;;;;;;;;;;;;;;;;mBAEP,CAAC;AAGxC,MAAM,MAAM,sBAAsB,GAC9B,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,GAAG,eAAe,CAAC,GAChE,CAAC,IAAI,CACH,CAAC,CAAC,KAAK,CAAC,OAAO,sCAAsC,CAAC,EACtD,SAAS,GAAG,WAAW,CACxB,GAAG;IACF,uCAAuC;IACvC,OAAO,EAAE,CAAC,CAAC,KAAK,CACd,OAAO,sCAAsC,CAC9C,CAAC,SAAS,CAAC,CAAC;IACb,wCAAwC;IACxC,SAAS,CAAC,EAAE,CAAC,CAAC,KAAK,CACjB,OAAO,sCAAsC,CAC9C,CAAC,WAAW,CAAC,CAAC;CAChB,GAAG,eAAe,CAAC,CAAC;AAGzB,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,SAAS,EAAE,CAAC;CACnB;AAGD,MAAM,WAAW,0BAA0B;IACzC,eAAe,EAAE,CACf,OAAO,EAAE,sBAAsB,KAC5B,OAAO,CAAC,qBAAqB,CAAC,CAAC;CACrC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import { withFormatter } from "../../../utils/schema-utils";
|
|
3
3
|
import { TablePropertySchema, FieldsPropertySchema, } from "../../../types/properties";
|
|
4
|
+
import { TrashSchema } from "../utils";
|
|
4
5
|
export const FieldTypeSchema = z.enum([
|
|
5
6
|
"string",
|
|
6
7
|
"multiple_string",
|
|
@@ -44,6 +45,7 @@ export const FieldApiItemSchema = z.object({
|
|
|
44
45
|
is_order_field: z.boolean().optional(),
|
|
45
46
|
is_filter_field: z.boolean().optional(),
|
|
46
47
|
is_selected_field: z.boolean().optional(),
|
|
48
|
+
deleted_at: z.string().nullable().optional(),
|
|
47
49
|
});
|
|
48
50
|
export const ListTableFieldsApiResponseSchema = z.object({
|
|
49
51
|
data: z.array(FieldApiItemSchema),
|
|
@@ -56,6 +58,7 @@ const FieldItemSchemaBase = z.object({
|
|
|
56
58
|
edited_at: z.string().optional(),
|
|
57
59
|
options: z.record(z.string(), z.unknown()).optional(),
|
|
58
60
|
config: z.record(z.string(), z.unknown()).optional(),
|
|
61
|
+
deleted_at: z.string().nullable().optional(),
|
|
59
62
|
});
|
|
60
63
|
export const FieldItemSchema = withFormatter(FieldItemSchemaBase, {
|
|
61
64
|
format: (item) => ({
|
|
@@ -73,6 +76,7 @@ const ListTableFieldsOptionsBaseSchema = z.object({
|
|
|
73
76
|
.optional()
|
|
74
77
|
.describe('Filter by specific fields. Accepts field names (e.g., "Email") or IDs (e.g., "f6", "6", or 6).')
|
|
75
78
|
.meta({ deprecated: true }),
|
|
79
|
+
trash: TrashSchema,
|
|
76
80
|
});
|
|
77
81
|
// Schema for docs/registry (new param names only)
|
|
78
82
|
export const ListTableFieldsOptionsSchema = z
|
|
@@ -36,6 +36,7 @@ export declare const listTableRecordsPlugin: (sdk: {
|
|
|
36
36
|
pageSize?: number | undefined;
|
|
37
37
|
maxItems?: number | undefined;
|
|
38
38
|
cursor?: string | undefined;
|
|
39
|
+
trash?: "only" | "include" | "exclude" | undefined;
|
|
39
40
|
} | {
|
|
40
41
|
tableId: string;
|
|
41
42
|
keyMode: "names" | "ids";
|
|
@@ -51,6 +52,7 @@ export declare const listTableRecordsPlugin: (sdk: {
|
|
|
51
52
|
pageSize?: number | undefined;
|
|
52
53
|
maxItems?: number | undefined;
|
|
53
54
|
cursor?: string | undefined;
|
|
55
|
+
trash?: "only" | "include" | "exclude" | undefined;
|
|
54
56
|
}) & {
|
|
55
57
|
cursor?: string;
|
|
56
58
|
pageSize?: number;
|
|
@@ -60,6 +62,7 @@ export declare const listTableRecordsPlugin: (sdk: {
|
|
|
60
62
|
data: Record<string, unknown>;
|
|
61
63
|
created_at: string;
|
|
62
64
|
edited_at: string;
|
|
65
|
+
deleted_at?: string | null | undefined;
|
|
63
66
|
}>;
|
|
64
67
|
} & {
|
|
65
68
|
context: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/plugins/tables/listTableRecords/index.ts"],"names":[],"mappings":"AAwBA,eAAO,MAAM,sBAAsB
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/plugins/tables/listTableRecords/index.ts"],"names":[],"mappings":"AAwBA,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0FlC,CAAC;AAEF,MAAM,MAAM,8BAA8B,GAAG,UAAU,CACrD,OAAO,sBAAsB,CAC9B,CAAC"}
|
|
@@ -53,8 +53,14 @@ export const listTableRecordsPlugin = definePlugin((sdk) => createPaginatedPlugi
|
|
|
53
53
|
start_cursor: options.cursor,
|
|
54
54
|
};
|
|
55
55
|
}
|
|
56
|
+
const searchParams = {
|
|
57
|
+
allow_nested_queries: "true",
|
|
58
|
+
};
|
|
59
|
+
if (options.trash) {
|
|
60
|
+
searchParams.trash = options.trash;
|
|
61
|
+
}
|
|
56
62
|
const rawResponse = await api.post(`/tables/api/v1/tables/${tableId}/records/query`, body, {
|
|
57
|
-
searchParams
|
|
63
|
+
searchParams,
|
|
58
64
|
authRequired: true,
|
|
59
65
|
resource: { type: "table", id: tableId },
|
|
60
66
|
});
|
|
@@ -13,6 +13,7 @@ export declare const ListTableRecordsApiResponseSchema: z.ZodObject<{
|
|
|
13
13
|
errors: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
14
14
|
orig_data: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
15
15
|
is_source_record: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
16
|
+
deleted_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
16
17
|
}, z.core.$strip>>;
|
|
17
18
|
meta: z.ZodOptional<z.ZodObject<{
|
|
18
19
|
pagination: z.ZodOptional<z.ZodObject<{
|
|
@@ -108,6 +109,11 @@ export declare const ListTableRecordsOptionsSchema: z.ZodObject<{
|
|
|
108
109
|
names: "names";
|
|
109
110
|
ids: "ids";
|
|
110
111
|
}>>>;
|
|
112
|
+
trash: z.ZodOptional<z.ZodEnum<{
|
|
113
|
+
only: "only";
|
|
114
|
+
include: "include";
|
|
115
|
+
exclude: "exclude";
|
|
116
|
+
}>>;
|
|
111
117
|
}, z.core.$strip>;
|
|
112
118
|
declare const ListTableRecordsOptionsSchemaDeprecated: z.ZodObject<{
|
|
113
119
|
tableId: z.ZodString;
|
|
@@ -145,6 +151,11 @@ declare const ListTableRecordsOptionsSchemaDeprecated: z.ZodObject<{
|
|
|
145
151
|
names: "names";
|
|
146
152
|
ids: "ids";
|
|
147
153
|
}>>>;
|
|
154
|
+
trash: z.ZodOptional<z.ZodEnum<{
|
|
155
|
+
only: "only";
|
|
156
|
+
include: "include";
|
|
157
|
+
exclude: "exclude";
|
|
158
|
+
}>>;
|
|
148
159
|
}, z.core.$strip>;
|
|
149
160
|
export declare const ListTableRecordsOptionsInputSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
150
161
|
table: z.ZodString & {
|
|
@@ -184,6 +195,11 @@ export declare const ListTableRecordsOptionsInputSchema: z.ZodUnion<readonly [z.
|
|
|
184
195
|
names: "names";
|
|
185
196
|
ids: "ids";
|
|
186
197
|
}>>>;
|
|
198
|
+
trash: z.ZodOptional<z.ZodEnum<{
|
|
199
|
+
only: "only";
|
|
200
|
+
include: "include";
|
|
201
|
+
exclude: "exclude";
|
|
202
|
+
}>>;
|
|
187
203
|
}, z.core.$strip>, z.ZodObject<{
|
|
188
204
|
tableId: z.ZodString;
|
|
189
205
|
filters: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
@@ -220,6 +236,11 @@ export declare const ListTableRecordsOptionsInputSchema: z.ZodUnion<readonly [z.
|
|
|
220
236
|
names: "names";
|
|
221
237
|
ids: "ids";
|
|
222
238
|
}>>>;
|
|
239
|
+
trash: z.ZodOptional<z.ZodEnum<{
|
|
240
|
+
only: "only";
|
|
241
|
+
include: "include";
|
|
242
|
+
exclude: "exclude";
|
|
243
|
+
}>>;
|
|
223
244
|
}, z.core.$strip>]>;
|
|
224
245
|
export type ListTableRecordsOptions = z.infer<typeof ListTableRecordsOptionsSchema> | (Omit<z.infer<typeof ListTableRecordsOptionsSchemaDeprecated>, "tableId"> & {
|
|
225
246
|
/** @deprecated Use `table` instead. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../../../src/plugins/tables/listTableRecords/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAErE,OAAO,EAEL,gBAAgB,EAChB,KAAK,UAAU,EAChB,MAAM,2BAA2B,CAAC;AAInC,OAAO,EAAE,gBAAgB,EAAE,CAAC;AAC5B,YAAY,EAAE,UAAU,EAAE,CAAC;AAE3B,eAAO,MAAM,iCAAiC
|
|
1
|
+
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../../../src/plugins/tables/listTableRecords/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MA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O,uCAAuC,CAAC,EACvD,SAAS,CACV,GAAG;IACF,uCAAuC;IACvC,OAAO,EAAE,CAAC,CAAC,KAAK,CACd,OAAO,uCAAuC,CAC/C,CAAC,SAAS,CAAC,CAAC;CACd,CAAC,CAAC;AAEP,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,UAAU,EAAE,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,2BAA2B;IAC1C,gBAAgB,EAAE,oBAAoB,CAAC,uBAAuB,EAAE,UAAU,CAAC,CAAC;CAC7E"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import { TablePropertySchema } from "../../../types/properties";
|
|
3
3
|
import { RecordApiItemSchema, RecordItemSchema, } from "../getTableRecord/schemas";
|
|
4
|
-
import { KeyModeSchema } from "../utils";
|
|
4
|
+
import { KeyModeSchema, TrashSchema } from "../utils";
|
|
5
5
|
// Re-export for consumers
|
|
6
6
|
export { RecordItemSchema };
|
|
7
7
|
export const ListTableRecordsApiResponseSchema = z.object({
|
|
@@ -67,6 +67,7 @@ const ListTableRecordsBase = z.object({
|
|
|
67
67
|
.describe("Maximum total items to return across all pages"),
|
|
68
68
|
cursor: z.string().optional().describe("Cursor to start from"),
|
|
69
69
|
keyMode: KeyModeSchema,
|
|
70
|
+
trash: TrashSchema,
|
|
70
71
|
});
|
|
71
72
|
// Schema for docs/registry (new param names only)
|
|
72
73
|
export const ListTableRecordsOptionsSchema = z
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/plugins/tables/updateTableRecords/index.ts"],"names":[],"mappings":"AAsBA,eAAO,MAAM,wBAAwB
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/plugins/tables/updateTableRecords/index.ts"],"names":[],"mappings":"AAsBA,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkDpC,CAAC;AAEF,MAAM,MAAM,gCAAgC,GAAG,UAAU,CACvD,OAAO,wBAAwB,CAChC,CAAC"}
|
|
@@ -15,6 +15,7 @@ export declare const UpdateTableRecordsApiResponseSchema: z.ZodObject<{
|
|
|
15
15
|
errors: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
16
16
|
orig_data: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
17
17
|
is_source_record: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
18
|
+
deleted_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
18
19
|
}, z.core.$strip>>;
|
|
19
20
|
new: z.ZodObject<{
|
|
20
21
|
id: z.ZodString;
|
|
@@ -25,6 +26,7 @@ export declare const UpdateTableRecordsApiResponseSchema: z.ZodObject<{
|
|
|
25
26
|
errors: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
26
27
|
orig_data: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
27
28
|
is_source_record: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
29
|
+
deleted_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
28
30
|
}, z.core.$strip>;
|
|
29
31
|
changed_field_ids: z.ZodNullable<z.ZodArray<z.ZodNumber>>;
|
|
30
32
|
record_id: z.ZodString;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../../../src/plugins/tables/updateTableRecords/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAEhE,OAAO,EAEL,gBAAgB,EAChB,KAAK,UAAU,EA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AAC;CACd,CAAC,CAAC;AAET,MAAM,WAAW,wBAAwB;IACvC,IAAI,EAAE,UAAU,EAAE,CAAC;CACpB;AAED,MAAM,WAAW,6BAA6B;IAC5C,kBAAkB,EAAE,CAClB,OAAO,EAAE,yBAAyB,KAC/B,OAAO,CAAC,wBAAwB,CAAC,CAAC;CACxC"}
|
|
@@ -33,6 +33,12 @@ export declare const KeyModeSchema: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
|
|
|
33
33
|
ids: "ids";
|
|
34
34
|
}>>>;
|
|
35
35
|
export type KeyMode = z.infer<typeof KeyModeSchema>;
|
|
36
|
+
export declare const TrashSchema: z.ZodOptional<z.ZodEnum<{
|
|
37
|
+
only: "only";
|
|
38
|
+
include: "include";
|
|
39
|
+
exclude: "exclude";
|
|
40
|
+
}>>;
|
|
41
|
+
export type Trash = z.infer<typeof TrashSchema>;
|
|
36
42
|
export declare function isFieldId(key: string): boolean;
|
|
37
43
|
export declare const NESTED_COMPONENTS: Record<string, Set<string>>;
|
|
38
44
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/plugins/tables/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAE3C,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACpE,OAAO,KAAK,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAC1E,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAEzE,wBAAgB,gBAAgB,CAAC,CAAC,EAAE,OAAO,GAAG,MAAM,CAUnD;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAS5D;AAED,wBAAgB,kB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