@frogbotai/piece-airtable 0.26.0 → 0.28.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/actions/customApiCall.d.ts +2 -2
- package/dist/actions/customApiCall.d.ts.map +1 -1
- package/dist/actions/customApiCall.js +3 -3
- package/dist/actions/customApiCall.js.map +1 -1
- package/dist/actions/records.d.ts +50 -9
- package/dist/actions/records.d.ts.map +1 -1
- package/dist/actions/records.js +15 -15
- package/dist/actions/records.js.map +1 -1
- package/dist/actions/schema.d.ts +119 -9
- package/dist/actions/schema.d.ts.map +1 -1
- package/dist/actions/schema.js +13 -13
- package/dist/actions/schema.js.map +1 -1
- package/dist/define.d.ts +102 -0
- package/dist/define.d.ts.map +1 -0
- package/dist/define.js +3 -0
- package/dist/define.js.map +1 -0
- package/dist/index.d.ts +281 -81
- package/dist/index.d.ts.map +1 -1
- package/dist/triggers/records.d.ts +111 -61
- package/dist/triggers/records.d.ts.map +1 -1
- package/dist/triggers/records.js +8 -7
- package/dist/triggers/records.js.map +1 -1
- package/package.json +4 -4
- package/dist/definitions.d.ts +0 -46
- package/dist/definitions.d.ts.map +0 -1
- package/dist/definitions.js +0 -7
- package/dist/definitions.js.map +0 -1
package/dist/actions/schema.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import {
|
|
2
|
+
import { defineAction } from '../define.js';
|
|
3
3
|
import { baseOptions, tableOptions } from '../options.js';
|
|
4
4
|
import { baseSchema, fieldSchema, tableSchema } from '../schemas.js';
|
|
5
5
|
const fieldConfig = fieldSchema.omit({ id: true });
|
|
@@ -13,12 +13,12 @@ const createBaseInput = z.object({
|
|
|
13
13
|
name: z.string().min(1).meta({ label: 'Base name' }),
|
|
14
14
|
tables: z.tuple([tableConfig], tableConfig).meta({ label: 'Tables' }),
|
|
15
15
|
});
|
|
16
|
-
export const createBase =
|
|
16
|
+
export const createBase = defineAction({
|
|
17
17
|
slug: 'createBase',
|
|
18
18
|
description: 'Create a base with its initial table structure.',
|
|
19
19
|
input: createBaseInput,
|
|
20
20
|
output: z.object({ id: z.string(), tables: z.array(tableSchema) }).passthrough(),
|
|
21
|
-
async run({ client, input, req
|
|
21
|
+
async run({ client, input, req }) {
|
|
22
22
|
return client.request({
|
|
23
23
|
method: 'POST',
|
|
24
24
|
path: '/meta/bases',
|
|
@@ -33,13 +33,13 @@ const createTableInput = z.object({
|
|
|
33
33
|
description: z.string().optional().meta({ label: 'Description' }),
|
|
34
34
|
fields: z.tuple([fieldConfig], fieldConfig).meta({ label: 'Fields' }),
|
|
35
35
|
});
|
|
36
|
-
export const createTable =
|
|
36
|
+
export const createTable = defineAction({
|
|
37
37
|
slug: 'createTable',
|
|
38
38
|
description: 'Create a table in an existing base.',
|
|
39
39
|
input: createTableInput,
|
|
40
40
|
output: tableSchema,
|
|
41
41
|
options: { baseId: baseOptions },
|
|
42
|
-
async run({ client, input, req
|
|
42
|
+
async run({ client, input, req }) {
|
|
43
43
|
const { baseId, ...body } = input;
|
|
44
44
|
return client.request({
|
|
45
45
|
method: 'POST',
|
|
@@ -52,12 +52,12 @@ export const createTable = defineAirtableAction({
|
|
|
52
52
|
const findBasesInput = z.object({
|
|
53
53
|
name: z.string().min(1).meta({ label: 'Base name or keyword' }),
|
|
54
54
|
});
|
|
55
|
-
export const findBases =
|
|
55
|
+
export const findBases = defineAction({
|
|
56
56
|
slug: 'findBases',
|
|
57
57
|
description: 'Find bases whose names contain a keyword.',
|
|
58
58
|
input: findBasesInput,
|
|
59
59
|
output: z.array(baseSchema),
|
|
60
|
-
async run({ client, input, req
|
|
60
|
+
async run({ client, input, req }) {
|
|
61
61
|
const bases = await client.listAll({
|
|
62
62
|
path: '/meta/bases',
|
|
63
63
|
key: 'bases',
|
|
@@ -68,13 +68,13 @@ export const findBases = defineAirtableAction({
|
|
|
68
68
|
},
|
|
69
69
|
});
|
|
70
70
|
const baseInput = z.object({ baseId: z.string().min(1).meta({ label: 'Base' }) });
|
|
71
|
-
export const getBaseSchema =
|
|
71
|
+
export const getBaseSchema = defineAction({
|
|
72
72
|
slug: 'getBaseSchema',
|
|
73
73
|
description: 'Get all tables and fields in a base.',
|
|
74
74
|
input: baseInput,
|
|
75
75
|
output: z.array(tableSchema),
|
|
76
76
|
options: { baseId: baseOptions },
|
|
77
|
-
async run({ client, input, req
|
|
77
|
+
async run({ client, input, req }) {
|
|
78
78
|
return client.listAll({
|
|
79
79
|
path: `/meta/bases/${input.baseId}/tables`,
|
|
80
80
|
key: 'tables',
|
|
@@ -83,13 +83,13 @@ export const getBaseSchema = defineAirtableAction({
|
|
|
83
83
|
},
|
|
84
84
|
});
|
|
85
85
|
const getTableInput = baseInput.extend({ tableId: z.string().min(1).meta({ label: 'Table' }) });
|
|
86
|
-
export const getTable =
|
|
86
|
+
export const getTable = defineAction({
|
|
87
87
|
slug: 'getTable',
|
|
88
88
|
description: 'Get one table and its schema by ID.',
|
|
89
89
|
input: getTableInput,
|
|
90
90
|
output: tableSchema,
|
|
91
91
|
options: { baseId: baseOptions, tableId: tableOptions },
|
|
92
|
-
async run({ client, input, req
|
|
92
|
+
async run({ client, input, req }) {
|
|
93
93
|
const tables = await client.listAll({
|
|
94
94
|
path: `/meta/bases/${input.baseId}/tables`,
|
|
95
95
|
key: 'tables',
|
|
@@ -104,13 +104,13 @@ export const getTable = defineAirtableAction({
|
|
|
104
104
|
const findTableInput = baseInput.extend({
|
|
105
105
|
name: z.string().min(1).meta({ label: 'Table name' }),
|
|
106
106
|
});
|
|
107
|
-
export const findTable =
|
|
107
|
+
export const findTable = defineAction({
|
|
108
108
|
slug: 'findTable',
|
|
109
109
|
description: 'Find a table by its exact name.',
|
|
110
110
|
input: findTableInput,
|
|
111
111
|
output: tableSchema.nullable(),
|
|
112
112
|
options: { baseId: baseOptions },
|
|
113
|
-
async run({ client, input, req
|
|
113
|
+
async run({ client, input, req }) {
|
|
114
114
|
const tables = await client.listAll({
|
|
115
115
|
path: `/meta/bases/${input.baseId}/tables`,
|
|
116
116
|
key: 'tables',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../../src/actions/schema.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../../src/actions/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC1D,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAErE,MAAM,WAAW,GAAG,WAAW,CAAC,IAAI,CAAC,EAAE,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC;AACnD,MAAM,WAAW,GAAG,CAAC,CAAC,MAAM,CAAC;IAC3B,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACvB,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAClC,MAAM,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,WAAW,CAAC,EAAE,WAAW,CAAC;CAC5C,CAAC,CAAC;AAEH,MAAM,eAAe,GAAG,CAAC,CAAC,MAAM,CAAC;IAC/B,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,cAAc,EAAE,CAAC;IAC9D,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,WAAW,EAAE,CAAC;IACpD,MAAM,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,WAAW,CAAC,EAAE,WAAW,CAAC,CAAC,IAAI,CAAC,EAAE,K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AEH,OAAO,MAAM,CAAC,IAAI,CAAC,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,IAAI,CAAC,WAAW,EAAE,KAAK,KAAK,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,IAAI,IAAI,CAAC;IAC5F,CAAC;CACF,CAAC,CAAC"}
|
package/dist/define.d.ts
ADDED
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
export declare const defineAction: <const TSlug extends string, TInput extends import("zod").ZodType, TOutput extends import("zod").ZodType | undefined = undefined, TResult = unknown>(action: TOutput extends unknown ? import("frogbot").PieceActionDefinition<TInput, TOutput, Record<string, never>, {
|
|
2
|
+
request: <T>({ method, path, query, body, signal, baseUrl, }: {
|
|
3
|
+
method?: string;
|
|
4
|
+
path: string;
|
|
5
|
+
query?: Record<string, string | number | boolean | undefined>;
|
|
6
|
+
body?: unknown;
|
|
7
|
+
signal?: AbortSignal;
|
|
8
|
+
baseUrl?: string;
|
|
9
|
+
}) => Promise<T>;
|
|
10
|
+
listAll: <T>({ path, key, query, signal, }: {
|
|
11
|
+
path: string;
|
|
12
|
+
key: string;
|
|
13
|
+
query?: Record<string, string | number | boolean | undefined>;
|
|
14
|
+
signal?: AbortSignal;
|
|
15
|
+
}) => Promise<T[]>;
|
|
16
|
+
}, TOutput extends import("zod").ZodType<unknown, unknown, import("zod/v4/core").$ZodTypeInternals<unknown, unknown>> ? import("zod").infer<TOutput> : TResult> & {
|
|
17
|
+
slug: TSlug;
|
|
18
|
+
} : never) => import("frogbot").PieceActionDefinition<TInput, TOutput, Record<string, never>, {
|
|
19
|
+
request: <T>({ method, path, query, body, signal, baseUrl, }: {
|
|
20
|
+
method?: string;
|
|
21
|
+
path: string;
|
|
22
|
+
query?: Record<string, string | number | boolean | undefined>;
|
|
23
|
+
body?: unknown;
|
|
24
|
+
signal?: AbortSignal;
|
|
25
|
+
baseUrl?: string;
|
|
26
|
+
}) => Promise<T>;
|
|
27
|
+
listAll: <T>({ path, key, query, signal, }: {
|
|
28
|
+
path: string;
|
|
29
|
+
key: string;
|
|
30
|
+
query?: Record<string, string | number | boolean | undefined>;
|
|
31
|
+
signal?: AbortSignal;
|
|
32
|
+
}) => Promise<T[]>;
|
|
33
|
+
}, TOutput extends import("zod").ZodType<unknown, unknown, import("zod/v4/core").$ZodTypeInternals<unknown, unknown>> ? import("zod").infer<TOutput> : TResult> & {
|
|
34
|
+
slug: TSlug;
|
|
35
|
+
}, definePollingTrigger: <const TSlug extends string, TInput extends import("zod").ZodType, TOutput extends import("zod").ZodType | undefined = undefined>(trigger: TOutput extends unknown ? {
|
|
36
|
+
slug: string;
|
|
37
|
+
label?: string;
|
|
38
|
+
description: string;
|
|
39
|
+
input: TInput;
|
|
40
|
+
output?: TOutput | undefined;
|
|
41
|
+
sample?: (TOutput extends import("zod").ZodType<unknown, unknown, import("zod/v4/core").$ZodTypeInternals<unknown, unknown>> ? import("zod").infer<TOutput> : import("frogbot").PieceJSON) | undefined;
|
|
42
|
+
} & {
|
|
43
|
+
type: "polling";
|
|
44
|
+
schedule?: string;
|
|
45
|
+
run(args: import("frogbot").PieceRunArgs<import("zod").infer<TInput>, Record<string, never>, {
|
|
46
|
+
request: <T>({ method, path, query, body, signal, baseUrl, }: {
|
|
47
|
+
method?: string;
|
|
48
|
+
path: string;
|
|
49
|
+
query?: Record<string, string | number | boolean | undefined>;
|
|
50
|
+
body?: unknown;
|
|
51
|
+
signal?: AbortSignal;
|
|
52
|
+
baseUrl?: string;
|
|
53
|
+
}) => Promise<T>;
|
|
54
|
+
listAll: <T>({ path, key, query, signal, }: {
|
|
55
|
+
path: string;
|
|
56
|
+
key: string;
|
|
57
|
+
query?: Record<string, string | number | boolean | undefined>;
|
|
58
|
+
signal?: AbortSignal;
|
|
59
|
+
}) => Promise<T[]>;
|
|
60
|
+
}> & {
|
|
61
|
+
cursor?: import("frogbot").PieceJSON | undefined;
|
|
62
|
+
}): Promise<{
|
|
63
|
+
events: (TOutput extends import("zod").ZodType<unknown, unknown, import("zod/v4/core").$ZodTypeInternals<unknown, unknown>> ? import("zod").infer<TOutput> : import("frogbot").PieceJSON)[];
|
|
64
|
+
cursor?: import("frogbot").PieceJSON | undefined;
|
|
65
|
+
}>;
|
|
66
|
+
} & {
|
|
67
|
+
slug: TSlug;
|
|
68
|
+
} : never) => {
|
|
69
|
+
slug: string;
|
|
70
|
+
label?: string;
|
|
71
|
+
description: string;
|
|
72
|
+
input: TInput;
|
|
73
|
+
output?: TOutput | undefined;
|
|
74
|
+
sample?: (TOutput extends import("zod").ZodType<unknown, unknown, import("zod/v4/core").$ZodTypeInternals<unknown, unknown>> ? import("zod").infer<TOutput> : import("frogbot").PieceJSON) | undefined;
|
|
75
|
+
} & {
|
|
76
|
+
type: "polling";
|
|
77
|
+
schedule?: string;
|
|
78
|
+
run(args: import("frogbot").PieceRunArgs<import("zod").infer<TInput>, Record<string, never>, {
|
|
79
|
+
request: <T>({ method, path, query, body, signal, baseUrl, }: {
|
|
80
|
+
method?: string;
|
|
81
|
+
path: string;
|
|
82
|
+
query?: Record<string, string | number | boolean | undefined>;
|
|
83
|
+
body?: unknown;
|
|
84
|
+
signal?: AbortSignal;
|
|
85
|
+
baseUrl?: string;
|
|
86
|
+
}) => Promise<T>;
|
|
87
|
+
listAll: <T>({ path, key, query, signal, }: {
|
|
88
|
+
path: string;
|
|
89
|
+
key: string;
|
|
90
|
+
query?: Record<string, string | number | boolean | undefined>;
|
|
91
|
+
signal?: AbortSignal;
|
|
92
|
+
}) => Promise<T[]>;
|
|
93
|
+
}> & {
|
|
94
|
+
cursor?: import("frogbot").PieceJSON | undefined;
|
|
95
|
+
}): Promise<{
|
|
96
|
+
events: (TOutput extends import("zod").ZodType<unknown, unknown, import("zod/v4/core").$ZodTypeInternals<unknown, unknown>> ? import("zod").infer<TOutput> : import("frogbot").PieceJSON)[];
|
|
97
|
+
cursor?: import("frogbot").PieceJSON | undefined;
|
|
98
|
+
}>;
|
|
99
|
+
} & {
|
|
100
|
+
slug: TSlug;
|
|
101
|
+
};
|
|
102
|
+
//# sourceMappingURL=define.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"define.d.ts","sourceRoot":"","sources":["../src/define.ts"],"names":[],"mappings":"AAIA,eAAO,MAAQ,YAAY;;cACyO,CAAC;;aAAqC,CAAC;YAAsC,CAAC;cAAqB,CAAC;eAA0B,CAAC;;;;;aAAskC,CAAC;cAAwC,CAAC;;;;;;cAA/uC,CAAC;;aAAqC,CAAC;YAAsC,CAAC;cAAqB,CAAC;eAA0B,CAAC;;;;;aAAskC,CAAC;cAAwC,CAAC;;;;GADt9C,oBAAoB;;;;;;;;;;;;kBACmN,CAAC;;iBAAqC,CAAC;gBAAsC,CAAC;kBAAqB,CAAC;mBAA0B,CAAC;;;;;iBAAskC,CAAC;kBAAwC,CAAC;;;;;;;;;;;;;;;;;;;;;;kBAA/uC,CAAC;;iBAAqC,CAAC;gBAAsC,CAAC;kBAAqB,CAAC;mBAA0B,CAAC;;;;;iBAAskC,CAAC;kBAAwC,CAAC;;;;;;;;;;CADz5C,CAAC"}
|
package/dist/define.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"define.js","sourceRoot":"","sources":["../src/define.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAIpD,MAAM,CAAC,MAAM,EAAE,YAAY,EAAE,oBAAoB,EAAE,GAAG,kBAAkB,EAAkB,CAAC"}
|