@zapier/zapier-sdk 0.42.0 → 0.42.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/CHANGELOG.md +6 -0
- package/dist/index.cjs +185 -159
- package/dist/index.d.mts +163 -408
- package/dist/index.d.ts +3 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.mjs +185 -160
- package/dist/plugins/api/index.d.ts +5 -1
- package/dist/plugins/api/index.d.ts.map +1 -1
- package/dist/plugins/api/index.js +2 -3
- package/dist/plugins/apps/index.d.ts +2 -3
- package/dist/plugins/apps/index.d.ts.map +1 -1
- package/dist/plugins/apps/index.js +1 -1
- package/dist/plugins/capabilities/index.d.ts +8 -6
- package/dist/plugins/capabilities/index.d.ts.map +1 -1
- package/dist/plugins/capabilities/index.js +3 -3
- package/dist/plugins/connections/index.d.ts +3 -1
- package/dist/plugins/connections/index.d.ts.map +1 -1
- package/dist/plugins/connections/index.js +2 -3
- package/dist/plugins/createClientCredentials/index.d.ts +6 -4
- package/dist/plugins/createClientCredentials/index.d.ts.map +1 -1
- package/dist/plugins/createClientCredentials/index.js +3 -3
- package/dist/plugins/deleteClientCredentials/index.d.ts +6 -4
- package/dist/plugins/deleteClientCredentials/index.d.ts.map +1 -1
- package/dist/plugins/deleteClientCredentials/index.js +3 -3
- package/dist/plugins/deprecated/authentications.d.ts +9 -9
- package/dist/plugins/deprecated/authentications.d.ts.map +1 -1
- package/dist/plugins/deprecated/authentications.js +4 -4
- package/dist/plugins/eventEmission/index.d.ts +4 -5
- package/dist/plugins/eventEmission/index.d.ts.map +1 -1
- package/dist/plugins/eventEmission/index.js +8 -7
- package/dist/plugins/fetch/index.d.ts +6 -6
- package/dist/plugins/fetch/index.d.ts.map +1 -1
- package/dist/plugins/fetch/index.js +5 -5
- package/dist/plugins/findFirstConnection/index.d.ts +3 -4
- package/dist/plugins/findFirstConnection/index.d.ts.map +1 -1
- package/dist/plugins/findFirstConnection/index.js +2 -2
- package/dist/plugins/findUniqueConnection/index.d.ts +3 -4
- package/dist/plugins/findUniqueConnection/index.d.ts.map +1 -1
- package/dist/plugins/findUniqueConnection/index.js +2 -2
- package/dist/plugins/getAction/index.d.ts +7 -7
- package/dist/plugins/getAction/index.d.ts.map +1 -1
- package/dist/plugins/getAction/index.js +2 -2
- package/dist/plugins/getApp/index.d.ts +2 -3
- package/dist/plugins/getApp/index.d.ts.map +1 -1
- package/dist/plugins/getApp/index.js +2 -2
- package/dist/plugins/getConnection/index.d.ts +6 -6
- package/dist/plugins/getConnection/index.d.ts.map +1 -1
- package/dist/plugins/getConnection/index.js +3 -3
- package/dist/plugins/getInputFieldsSchema/index.d.ts +8 -6
- package/dist/plugins/getInputFieldsSchema/index.d.ts.map +1 -1
- package/dist/plugins/getInputFieldsSchema/index.js +4 -4
- package/dist/plugins/getProfile/index.d.ts +6 -6
- package/dist/plugins/getProfile/index.d.ts.map +1 -1
- package/dist/plugins/getProfile/index.js +3 -3
- package/dist/plugins/listActions/index.d.ts +8 -6
- package/dist/plugins/listActions/index.d.ts.map +1 -1
- package/dist/plugins/listActions/index.js +3 -3
- package/dist/plugins/listApps/index.d.ts +3 -3
- package/dist/plugins/listApps/index.d.ts.map +1 -1
- package/dist/plugins/listApps/index.js +3 -3
- package/dist/plugins/listClientCredentials/index.d.ts +6 -4
- package/dist/plugins/listClientCredentials/index.d.ts.map +1 -1
- package/dist/plugins/listClientCredentials/index.js +3 -3
- package/dist/plugins/listConnections/index.d.ts +8 -6
- package/dist/plugins/listConnections/index.d.ts.map +1 -1
- package/dist/plugins/listConnections/index.js +5 -5
- package/dist/plugins/listInputFieldChoices/index.d.ts +9 -8
- package/dist/plugins/listInputFieldChoices/index.d.ts.map +1 -1
- package/dist/plugins/listInputFieldChoices/index.js +4 -4
- package/dist/plugins/listInputFields/index.d.ts +8 -8
- package/dist/plugins/listInputFields/index.d.ts.map +1 -1
- package/dist/plugins/listInputFields/index.js +4 -4
- package/dist/plugins/manifest/index.d.ts +8 -3
- package/dist/plugins/manifest/index.d.ts.map +1 -1
- package/dist/plugins/manifest/index.js +2 -3
- package/dist/plugins/registry/index.d.ts +1 -2
- package/dist/plugins/registry/index.d.ts.map +1 -1
- package/dist/plugins/registry/index.js +3 -3
- package/dist/plugins/request/index.d.ts +3 -4
- package/dist/plugins/request/index.d.ts.map +1 -1
- package/dist/plugins/request/index.js +2 -2
- package/dist/plugins/runAction/index.d.ts +8 -8
- package/dist/plugins/runAction/index.d.ts.map +1 -1
- package/dist/plugins/runAction/index.js +5 -5
- package/dist/plugins/tables/createTable/index.d.ts +3 -5
- package/dist/plugins/tables/createTable/index.d.ts.map +1 -1
- package/dist/plugins/tables/createTable/index.js +3 -3
- package/dist/plugins/tables/createTableFields/index.d.ts +3 -5
- package/dist/plugins/tables/createTableFields/index.d.ts.map +1 -1
- package/dist/plugins/tables/createTableFields/index.js +3 -3
- package/dist/plugins/tables/createTableRecords/index.d.ts +3 -5
- package/dist/plugins/tables/createTableRecords/index.d.ts.map +1 -1
- package/dist/plugins/tables/createTableRecords/index.js +3 -3
- package/dist/plugins/tables/deleteTable/index.d.ts +5 -5
- package/dist/plugins/tables/deleteTable/index.d.ts.map +1 -1
- package/dist/plugins/tables/deleteTable/index.js +4 -4
- package/dist/plugins/tables/deleteTableFields/index.d.ts +3 -5
- package/dist/plugins/tables/deleteTableFields/index.d.ts.map +1 -1
- package/dist/plugins/tables/deleteTableFields/index.js +3 -3
- package/dist/plugins/tables/deleteTableRecords/index.d.ts +3 -5
- package/dist/plugins/tables/deleteTableRecords/index.d.ts.map +1 -1
- package/dist/plugins/tables/deleteTableRecords/index.js +3 -3
- package/dist/plugins/tables/getTable/index.d.ts +3 -5
- package/dist/plugins/tables/getTable/index.d.ts.map +1 -1
- package/dist/plugins/tables/getTable/index.js +3 -3
- package/dist/plugins/tables/getTableRecord/index.d.ts +3 -5
- package/dist/plugins/tables/getTableRecord/index.d.ts.map +1 -1
- package/dist/plugins/tables/getTableRecord/index.js +3 -3
- package/dist/plugins/tables/listTableFields/index.d.ts +3 -5
- package/dist/plugins/tables/listTableFields/index.d.ts.map +1 -1
- package/dist/plugins/tables/listTableFields/index.js +3 -3
- package/dist/plugins/tables/listTableRecords/index.d.ts +3 -3
- package/dist/plugins/tables/listTableRecords/index.d.ts.map +1 -1
- package/dist/plugins/tables/listTableRecords/index.js +3 -3
- package/dist/plugins/tables/listTables/index.d.ts +5 -3
- package/dist/plugins/tables/listTables/index.d.ts.map +1 -1
- package/dist/plugins/tables/listTables/index.js +4 -4
- package/dist/plugins/tables/updateTableRecords/index.d.ts +3 -5
- package/dist/plugins/tables/updateTableRecords/index.d.ts.map +1 -1
- package/dist/plugins/tables/updateTableRecords/index.js +3 -3
- package/dist/resolvers/connectionId.js +1 -1
- package/dist/resolvers/tableId.js +1 -1
- package/dist/sdk.d.ts +29 -257
- package/dist/sdk.d.ts.map +1 -1
- package/dist/sdk.js +33 -43
- package/dist/types/plugin.d.ts +29 -48
- package/dist/types/plugin.d.ts.map +1 -1
- package/dist/types/plugin.js +7 -3
- package/dist/types/sdk.d.ts +2 -3
- package/dist/types/sdk.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/plugins/tables/getTable/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/plugins/tables/getTable/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAEpD,OAAO,EAEL,qBAAqB,EAGrB,KAAK,eAAe,EACpB,KAAK,SAAS,EACf,MAAM,WAAW,CAAC;AACnB,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AACnD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAMjE,MAAM,WAAW,sBAAsB;IACrC,QAAQ,EAAE,CAAC,OAAO,EAAE,eAAe,KAAK,OAAO,CAAC;QAAE,IAAI,EAAE,SAAS,CAAA;KAAE,CAAC,CAAC;IACrE,OAAO,EAAE;QACP,IAAI,EAAE;YACJ,QAAQ,EAAE;gBACR,WAAW,EAAE,OAAO,qBAAqB,CAAC;aAC3C,CAAC;SACH,CAAC;KACH,CAAC;CACH;AAED,eAAO,MAAM,cAAc,EAAE,MAAM,CACjC,iBAAiB,GAAG,qBAAqB,EACzC,sBAAsB,CA8DvB,CAAC"}
|
|
@@ -4,9 +4,9 @@ import { createTelemetryCallback } from "../../../utils/telemetry-utils";
|
|
|
4
4
|
import { ZapierAuthenticationError } from "../../../types/errors";
|
|
5
5
|
import { tableIdResolver } from "../../../resolvers";
|
|
6
6
|
import { transformTableItem } from "../utils";
|
|
7
|
-
export const getTablePlugin = (
|
|
7
|
+
export const getTablePlugin = (sdk) => {
|
|
8
8
|
async function getTable(options) {
|
|
9
|
-
const { api } = context;
|
|
9
|
+
const { api } = sdk.context;
|
|
10
10
|
const tableId = "table" in options ? options.table : options.tableId;
|
|
11
11
|
const rawResponse = await api.get(`/tables/api/v1/tables/${tableId}`, {
|
|
12
12
|
customErrorHandler: ({ status }) => {
|
|
@@ -28,7 +28,7 @@ export const getTablePlugin = ({ context }) => {
|
|
|
28
28
|
data: transformTableItem(response.data),
|
|
29
29
|
};
|
|
30
30
|
}
|
|
31
|
-
const getTableDefinition = createFunction(getTable, GetTableOptionsInputSchema, createTelemetryCallback(context.eventEmission.emitMethodCalled, getTable.name));
|
|
31
|
+
const getTableDefinition = createFunction(getTable, GetTableOptionsInputSchema, createTelemetryCallback(sdk.context.eventEmission.emitMethodCalled, getTable.name));
|
|
32
32
|
return {
|
|
33
33
|
getTable: getTableDefinition,
|
|
34
34
|
context: {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Plugin } from "../../../types/plugin";
|
|
2
|
-
import type { ApiClient } from "../../../api";
|
|
3
2
|
import { GetTableRecordOptionsSchema, type GetTableRecordOptions, type GetTableRecordResult } from "./schemas";
|
|
4
|
-
import type {
|
|
3
|
+
import type { ApiPluginProvides } from "../../api";
|
|
4
|
+
import type { EventEmissionProvides } from "../../eventEmission";
|
|
5
5
|
export interface GetTableRecordPluginProvides {
|
|
6
6
|
getTableRecord: (options: GetTableRecordOptions) => Promise<GetTableRecordResult>;
|
|
7
7
|
context: {
|
|
@@ -12,7 +12,5 @@ export interface GetTableRecordPluginProvides {
|
|
|
12
12
|
};
|
|
13
13
|
};
|
|
14
14
|
}
|
|
15
|
-
export declare const getTableRecordPlugin: Plugin<
|
|
16
|
-
api: ApiClient;
|
|
17
|
-
} & EventEmissionContext, GetTableRecordPluginProvides>;
|
|
15
|
+
export declare const getTableRecordPlugin: Plugin<ApiPluginProvides & EventEmissionProvides, GetTableRecordPluginProvides>;
|
|
18
16
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/plugins/tables/getTableRecord/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/plugins/tables/getTableRecord/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAEpD,OAAO,EACL,2BAA2B,EAI3B,KAAK,qBAAqB,EAC1B,KAAK,oBAAoB,EAC1B,MAAM,WAAW,CAAC;AACnB,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AACnD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAQjE,MAAM,WAAW,4BAA4B;IAC3C,cAAc,EAAE,CACd,OAAO,EAAE,qBAAqB,KAC3B,OAAO,CAAC,oBAAoB,CAAC,CAAC;IACnC,OAAO,EAAE;QACP,IAAI,EAAE;YACJ,cAAc,EAAE;gBACd,WAAW,EAAE,OAAO,2BAA2B,CAAC;aACjD,CAAC;SACH,CAAC;KACH,CAAC;CACH;AAED,eAAO,MAAM,oBAAoB,EAAE,MAAM,CACvC,iBAAiB,GAAG,qBAAqB,EACzC,4BAA4B,CA8E7B,CAAC"}
|
|
@@ -6,9 +6,9 @@ import { tableIdResolver, tableRecordIdResolver } from "../../../resolvers";
|
|
|
6
6
|
import { tableRecordFormatter } from "../../../formatters";
|
|
7
7
|
import { createFieldKeyTranslator } from "../utils";
|
|
8
8
|
import { transformRecordItem } from "../utils";
|
|
9
|
-
export const getTableRecordPlugin = (
|
|
9
|
+
export const getTableRecordPlugin = (sdk) => {
|
|
10
10
|
async function getTableRecord(options) {
|
|
11
|
-
const { api } = context;
|
|
11
|
+
const { api } = sdk.context;
|
|
12
12
|
const tableId = "table" in options ? options.table : options.tableId;
|
|
13
13
|
const recordId = "record" in options ? options.record : options.recordId;
|
|
14
14
|
const rawResponse = await api.get(`/tables/api/v1/tables/${tableId}/records/${recordId}`, {
|
|
@@ -39,7 +39,7 @@ export const getTableRecordPlugin = ({ context }) => {
|
|
|
39
39
|
},
|
|
40
40
|
};
|
|
41
41
|
}
|
|
42
|
-
const getTableRecordDefinition = createFunction(getTableRecord, GetTableRecordOptionsInputSchema, createTelemetryCallback(context.eventEmission.emitMethodCalled, getTableRecord.name));
|
|
42
|
+
const getTableRecordDefinition = createFunction(getTableRecord, GetTableRecordOptionsInputSchema, createTelemetryCallback(sdk.context.eventEmission.emitMethodCalled, getTableRecord.name));
|
|
43
43
|
return {
|
|
44
44
|
getTableRecord: getTableRecordDefinition,
|
|
45
45
|
context: {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Plugin } from "../../../types/plugin";
|
|
2
|
-
import type { ApiClient } from "../../../api";
|
|
3
2
|
import { ListTableFieldsOptionsSchema, type ListTableFieldsOptions, type ListTableFieldsResult } from "./schemas";
|
|
4
|
-
import type {
|
|
3
|
+
import type { ApiPluginProvides } from "../../api";
|
|
4
|
+
import type { EventEmissionProvides } from "../../eventEmission";
|
|
5
5
|
export interface ListTableFieldsPluginProvides {
|
|
6
6
|
listTableFields: (options: ListTableFieldsOptions) => Promise<ListTableFieldsResult>;
|
|
7
7
|
context: {
|
|
@@ -12,7 +12,5 @@ export interface ListTableFieldsPluginProvides {
|
|
|
12
12
|
};
|
|
13
13
|
};
|
|
14
14
|
}
|
|
15
|
-
export declare const listTableFieldsPlugin: Plugin<
|
|
16
|
-
api: ApiClient;
|
|
17
|
-
} & EventEmissionContext, ListTableFieldsPluginProvides>;
|
|
15
|
+
export declare const listTableFieldsPlugin: Plugin<ApiPluginProvides & EventEmissionProvides, ListTableFieldsPluginProvides>;
|
|
18
16
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/plugins/tables/listTableFields/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/plugins/tables/listTableFields/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAEpD,OAAO,EACL,4BAA4B,EAI5B,KAAK,sBAAsB,EAC3B,KAAK,qBAAqB,EAC3B,MAAM,WAAW,CAAC;AACnB,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AACnD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAMjE,MAAM,WAAW,6BAA6B;IAC5C,eAAe,EAAE,CACf,OAAO,EAAE,sBAAsB,KAC5B,OAAO,CAAC,qBAAqB,CAAC,CAAC;IACpC,OAAO,EAAE;QACP,IAAI,EAAE;YACJ,eAAe,EAAE;gBACf,WAAW,EAAE,OAAO,4BAA4B,CAAC;aAClD,CAAC;SACH,CAAC;KACH,CAAC;CACH;AAED,eAAO,MAAM,qBAAqB,EAAE,MAAM,CACxC,iBAAiB,GAAG,qBAAqB,EACzC,6BAA6B,CA+E9B,CAAC"}
|
|
@@ -4,9 +4,9 @@ import { createTelemetryCallback } from "../../../utils/telemetry-utils";
|
|
|
4
4
|
import { ZapierAuthenticationError } from "../../../types/errors";
|
|
5
5
|
import { tableIdResolver } from "../../../resolvers";
|
|
6
6
|
import { resolveFieldKeys, transformFieldItem } from "../utils";
|
|
7
|
-
export const listTableFieldsPlugin = (
|
|
7
|
+
export const listTableFieldsPlugin = (sdk) => {
|
|
8
8
|
async function listTableFields(options) {
|
|
9
|
-
const { api } = context;
|
|
9
|
+
const { api } = sdk.context;
|
|
10
10
|
const tableId = "table" in options ? options.table : options.tableId;
|
|
11
11
|
const fieldKeys = "fields" in options ? options.fields : options.fieldKeys;
|
|
12
12
|
const searchParams = {};
|
|
@@ -39,7 +39,7 @@ export const listTableFieldsPlugin = ({ context }) => {
|
|
|
39
39
|
data: response.data.map(transformFieldItem),
|
|
40
40
|
};
|
|
41
41
|
}
|
|
42
|
-
const listTableFieldsDefinition = createFunction(listTableFields, ListTableFieldsOptionsInputSchema, createTelemetryCallback(context.eventEmission.emitMethodCalled, listTableFields.name));
|
|
42
|
+
const listTableFieldsDefinition = createFunction(listTableFields, ListTableFieldsOptionsInputSchema, createTelemetryCallback(sdk.context.eventEmission.emitMethodCalled, listTableFields.name));
|
|
43
43
|
return {
|
|
44
44
|
listTableFields: listTableFieldsDefinition,
|
|
45
45
|
context: {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { Plugin } from "../../../types/plugin";
|
|
2
2
|
import { ListTableRecordsOptionsSchema, type ListTableRecordsOptions, type RecordItem } from "./schemas";
|
|
3
3
|
import type { ApiPluginProvides } from "../../api";
|
|
4
|
-
import type {
|
|
4
|
+
import type { EventEmissionProvides } from "../../eventEmission";
|
|
5
5
|
export interface ListTableRecordsPluginProvides {
|
|
6
6
|
listTableRecords: (options: ListTableRecordsOptions) => Promise<{
|
|
7
7
|
data: RecordItem[];
|
|
@@ -20,5 +20,5 @@ export interface ListTableRecordsPluginProvides {
|
|
|
20
20
|
};
|
|
21
21
|
};
|
|
22
22
|
}
|
|
23
|
-
export declare const listTableRecordsPlugin: Plugin<
|
|
23
|
+
export declare const listTableRecordsPlugin: Plugin<ApiPluginProvides & EventEmissionProvides, ListTableRecordsPluginProvides>;
|
|
24
24
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/plugins/tables/listTableRecords/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/plugins/tables/listTableRecords/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAEpD,OAAO,EAEL,6BAA6B,EAG7B,KAAK,uBAAuB,EAC5B,KAAK,UAAU,EAChB,MAAM,WAAW,CAAC;AACnB,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AACnD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AA6BjE,MAAM,WAAW,8BAA8B;IAC7C,gBAAgB,EAAE,CAAC,OAAO,EAAE,uBAAuB,KAAK,OAAO,CAAC;QAC9D,IAAI,EAAE,UAAU,EAAE,CAAC;QACnB,UAAU,CAAC,EAAE,MAAM,CAAC;KACrB,CAAC,GACA,aAAa,CAAC;QAAE,IAAI,EAAE,UAAU,EAAE,CAAC;QAAC,UAAU,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,GAAG;QAC3D,KAAK,IAAI,aAAa,CAAC,UAAU,CAAC,CAAC;KACpC,CAAC;IACJ,OAAO,EAAE;QACP,IAAI,EAAE;YACJ,gBAAgB,EAAE;gBAChB,WAAW,EAAE,OAAO,6BAA6B,CAAC;aACnD,CAAC;SACH,CAAC;KACH,CAAC;CACH;AAED,eAAO,MAAM,sBAAsB,EAAE,MAAM,CACzC,iBAAiB,GAAG,qBAAqB,EACzC,8BAA8B,CAmH/B,CAAC"}
|
|
@@ -13,9 +13,9 @@ function extractNextCursor(meta) {
|
|
|
13
13
|
}
|
|
14
14
|
return meta.pagination.end_cursor;
|
|
15
15
|
}
|
|
16
|
-
export const listTableRecordsPlugin = (
|
|
16
|
+
export const listTableRecordsPlugin = (sdk) => {
|
|
17
17
|
async function listTableRecordsPage(options) {
|
|
18
|
-
const { api } = context;
|
|
18
|
+
const { api } = sdk.context;
|
|
19
19
|
const tableId = "table" in options ? options.table : options.tableId;
|
|
20
20
|
const translator = await createFieldKeyTranslator({
|
|
21
21
|
api,
|
|
@@ -74,7 +74,7 @@ export const listTableRecordsPlugin = ({ context }) => {
|
|
|
74
74
|
};
|
|
75
75
|
}
|
|
76
76
|
const methodName = stripPageSuffix(listTableRecordsPage.name);
|
|
77
|
-
const listTableRecordsDefinition = createPaginatedFunction(listTableRecordsPage, ListTableRecordsOptionsInputSchema, createTelemetryCallback(context.eventEmission.emitMethodCalled, methodName), methodName, DEFAULT_PAGE_SIZE);
|
|
77
|
+
const listTableRecordsDefinition = createPaginatedFunction(listTableRecordsPage, ListTableRecordsOptionsInputSchema, createTelemetryCallback(sdk.context.eventEmission.emitMethodCalled, methodName), methodName, DEFAULT_PAGE_SIZE);
|
|
78
78
|
return {
|
|
79
79
|
listTableRecords: listTableRecordsDefinition,
|
|
80
80
|
context: {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { Plugin } from "../../../types/plugin";
|
|
2
2
|
import { ListTablesOptionsSchema, type ListTablesOptions, type TableItem } from "./schemas";
|
|
3
3
|
import type { ApiPluginProvides } from "../../api";
|
|
4
|
-
import type {
|
|
4
|
+
import type { EventEmissionProvides } from "../../eventEmission";
|
|
5
5
|
import type { CapabilitiesContext } from "../../capabilities";
|
|
6
6
|
export interface ListTablesPluginProvides {
|
|
7
7
|
listTables: (options?: ListTablesOptions) => Promise<{
|
|
@@ -21,5 +21,7 @@ export interface ListTablesPluginProvides {
|
|
|
21
21
|
};
|
|
22
22
|
};
|
|
23
23
|
}
|
|
24
|
-
export declare const listTablesPlugin: Plugin<
|
|
24
|
+
export declare const listTablesPlugin: Plugin<ApiPluginProvides & EventEmissionProvides & {
|
|
25
|
+
context: CapabilitiesContext;
|
|
26
|
+
}, ListTablesPluginProvides>;
|
|
25
27
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/plugins/tables/listTables/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/plugins/tables/listTables/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAEpD,OAAO,EAEL,uBAAuB,EAEvB,KAAK,iBAAiB,EACtB,KAAK,SAAS,EACf,MAAM,WAAW,CAAC;AACnB,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AACnD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAOjE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAmB9D,MAAM,WAAW,wBAAwB;IACvC,UAAU,EAAE,CAAC,OAAO,CAAC,EAAE,iBAAiB,KAAK,OAAO,CAAC;QACnD,IAAI,EAAE,SAAS,EAAE,CAAC;QAClB,UAAU,CAAC,EAAE,MAAM,CAAC;KACrB,CAAC,GACA,aAAa,CAAC;QAAE,IAAI,EAAE,SAAS,EAAE,CAAC;QAAC,UAAU,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,GAAG;QAC1D,KAAK,IAAI,aAAa,CAAC,SAAS,CAAC,CAAC;KACnC,CAAC;IACJ,OAAO,EAAE;QACP,IAAI,EAAE;YACJ,UAAU,EAAE;gBACV,WAAW,EAAE,OAAO,uBAAuB,CAAC;aAC7C,CAAC;SACH,CAAC;KACH,CAAC;CACH;AAED,eAAO,MAAM,gBAAgB,EAAE,MAAM,CACnC,iBAAiB,GAAG,qBAAqB,GAAG;IAAE,OAAO,EAAE,mBAAmB,CAAA;CAAE,EAC5E,wBAAwB,CAsGzB,CAAC"}
|
|
@@ -18,12 +18,12 @@ function extractNextCursor(links) {
|
|
|
18
18
|
return undefined;
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
|
-
export const listTablesPlugin = (
|
|
21
|
+
export const listTablesPlugin = (sdk) => {
|
|
22
22
|
async function listTablesPage(options) {
|
|
23
23
|
if (options.includeShared) {
|
|
24
|
-
await context.checkCapability("canIncludeSharedTables");
|
|
24
|
+
await sdk.context.checkCapability("canIncludeSharedTables");
|
|
25
25
|
}
|
|
26
|
-
const { api } = context;
|
|
26
|
+
const { api } = sdk.context;
|
|
27
27
|
const searchParams = {};
|
|
28
28
|
if (options.pageSize !== undefined) {
|
|
29
29
|
searchParams.limit = options.pageSize.toString();
|
|
@@ -76,7 +76,7 @@ export const listTablesPlugin = ({ context }) => {
|
|
|
76
76
|
};
|
|
77
77
|
}
|
|
78
78
|
const methodName = stripPageSuffix(listTablesPage.name);
|
|
79
|
-
const listTablesDefinition = createPaginatedFunction(listTablesPage, ListTablesOptionsSchema, createTelemetryCallback(context.eventEmission.emitMethodCalled, methodName), methodName, DEFAULT_PAGE_SIZE);
|
|
79
|
+
const listTablesDefinition = createPaginatedFunction(listTablesPage, ListTablesOptionsSchema, createTelemetryCallback(sdk.context.eventEmission.emitMethodCalled, methodName), methodName, DEFAULT_PAGE_SIZE);
|
|
80
80
|
return {
|
|
81
81
|
listTables: listTablesDefinition,
|
|
82
82
|
context: {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Plugin } from "../../../types/plugin";
|
|
2
|
-
import type { ApiClient } from "../../../api";
|
|
3
2
|
import { UpdateTableRecordsOptionsSchema, type UpdateTableRecordsOptions, type UpdateTableRecordsResult } from "./schemas";
|
|
4
|
-
import type {
|
|
3
|
+
import type { ApiPluginProvides } from "../../api";
|
|
4
|
+
import type { EventEmissionProvides } from "../../eventEmission";
|
|
5
5
|
export interface UpdateTableRecordsPluginProvides {
|
|
6
6
|
updateTableRecords: (options: UpdateTableRecordsOptions) => Promise<UpdateTableRecordsResult>;
|
|
7
7
|
context: {
|
|
@@ -12,7 +12,5 @@ export interface UpdateTableRecordsPluginProvides {
|
|
|
12
12
|
};
|
|
13
13
|
};
|
|
14
14
|
}
|
|
15
|
-
export declare const updateTableRecordsPlugin: Plugin<
|
|
16
|
-
api: ApiClient;
|
|
17
|
-
} & EventEmissionContext, UpdateTableRecordsPluginProvides>;
|
|
15
|
+
export declare const updateTableRecordsPlugin: Plugin<ApiPluginProvides & EventEmissionProvides, UpdateTableRecordsPluginProvides>;
|
|
18
16
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/plugins/tables/updateTableRecords/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/plugins/tables/updateTableRecords/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAEpD,OAAO,EACL,+BAA+B,EAI/B,KAAK,yBAAyB,EAC9B,KAAK,wBAAwB,EAC9B,MAAM,WAAW,CAAC;AACnB,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AACnD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAejE,MAAM,WAAW,gCAAgC;IAC/C,kBAAkB,EAAE,CAClB,OAAO,EAAE,yBAAyB,KAC/B,OAAO,CAAC,wBAAwB,CAAC,CAAC;IACvC,OAAO,EAAE;QACP,IAAI,EAAE;YACJ,kBAAkB,EAAE;gBAClB,WAAW,EAAE,OAAO,+BAA+B,CAAC;aACrD,CAAC;SACH,CAAC;KACH,CAAC;CACH;AAED,eAAO,MAAM,wBAAwB,EAAE,MAAM,CAC3C,iBAAiB,GAAG,qBAAqB,EACzC,gCAAgC,CAwFjC,CAAC"}
|
|
@@ -5,9 +5,9 @@ import { ZapierAuthenticationError } from "../../../types/errors";
|
|
|
5
5
|
import { tableIdResolver, tableUpdateRecordsResolver, } from "../../../resolvers";
|
|
6
6
|
import { tableRecordFormatter } from "../../../formatters";
|
|
7
7
|
import { createFieldKeyTranslator, transformRecordItem, throwOnRecordErrors, throwOnResponseErrors, } from "../utils";
|
|
8
|
-
export const updateTableRecordsPlugin = (
|
|
8
|
+
export const updateTableRecordsPlugin = (sdk) => {
|
|
9
9
|
async function updateTableRecords(options) {
|
|
10
|
-
const { api } = context;
|
|
10
|
+
const { api } = sdk.context;
|
|
11
11
|
const tableId = "table" in options ? options.table : options.tableId;
|
|
12
12
|
const translator = await createFieldKeyTranslator({
|
|
13
13
|
api,
|
|
@@ -46,7 +46,7 @@ export const updateTableRecordsPlugin = ({ context }) => {
|
|
|
46
46
|
})),
|
|
47
47
|
};
|
|
48
48
|
}
|
|
49
|
-
const updateTableRecordsDefinition = createFunction(updateTableRecords, UpdateTableRecordsOptionsInputSchema, createTelemetryCallback(context.eventEmission.emitMethodCalled, updateTableRecords.name));
|
|
49
|
+
const updateTableRecordsDefinition = createFunction(updateTableRecords, UpdateTableRecordsOptionsInputSchema, createTelemetryCallback(sdk.context.eventEmission.emitMethodCalled, updateTableRecords.name));
|
|
50
50
|
return {
|
|
51
51
|
updateTableRecords: updateTableRecordsDefinition,
|
|
52
52
|
context: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { toIterable } from "../utils/pagination-utils";
|
|
2
2
|
async function fetchConnections(sdk, resolvedParams) {
|
|
3
|
-
const context = sdk.
|
|
3
|
+
const context = sdk.context;
|
|
4
4
|
const includeShared = await context.hasCapability?.("canIncludeSharedConnections");
|
|
5
5
|
return toIterable(sdk.listConnections({
|
|
6
6
|
app: resolvedParams.app,
|
|
@@ -3,7 +3,7 @@ export const tableIdResolver = {
|
|
|
3
3
|
type: "dynamic",
|
|
4
4
|
requireCapabilities: ["canIncludeSharedTables"],
|
|
5
5
|
fetch: async (sdk) => {
|
|
6
|
-
const context = sdk.
|
|
6
|
+
const context = sdk.context;
|
|
7
7
|
const includeShared = await context.hasCapability?.("canIncludeSharedTables");
|
|
8
8
|
// Unlike connections, the tables API does not return personal tables
|
|
9
9
|
// first, so we use concatPaginated to hoist own tables above shared.
|
package/dist/sdk.d.ts
CHANGED
|
@@ -1,265 +1,37 @@
|
|
|
1
|
-
import type { BaseSdkOptions } from "./types/sdk";
|
|
2
|
-
import type {
|
|
3
|
-
import type { Sdk, Plugin, ExtractContextProperties, ExtractSdkProperties, PluginProvides, PluginMeta } from "./types/plugin";
|
|
1
|
+
import type { BaseSdkOptions, ZapierSdk } from "./types/sdk";
|
|
2
|
+
import type { WithAddPlugin, Plugin, PluginProvides, PluginMeta } from "./types/plugin";
|
|
4
3
|
export interface ZapierSdkOptions extends BaseSdkOptions {
|
|
5
4
|
}
|
|
6
|
-
export declare function
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
meta: Record<string, PluginMeta>;
|
|
10
|
-
}>(options?: ZapierSdkOptions, initialSdk?: TCurrentSdk, initialContext?: TCurrentContext): TCurrentSdk & {
|
|
11
|
-
getContext: () => TCurrentContext;
|
|
12
|
-
addPlugin<TRequiresContext, TProvides extends PluginProvides>(plugin: Plugin<TCurrentSdk & {
|
|
13
|
-
getContext(): TCurrentContext;
|
|
14
|
-
}, TRequiresContext, TProvides>, addPluginOptions?: Record<string, unknown>): Sdk<TCurrentSdk & ExtractSdkProperties<TProvides>, TCurrentContext & NonNullable<ExtractContextProperties<TProvides>>>;
|
|
15
|
-
};
|
|
16
|
-
export declare function createZapierSdkWithoutRegistry(options?: ZapierSdkOptions): Sdk<ExtractSdkProperties<import("./plugins/eventEmission").EventEmissionProvides> & ExtractSdkProperties<import(".").ApiPluginProvides> & ExtractSdkProperties<import(".").ManifestPluginProvides> & ExtractSdkProperties<import("./plugins/capabilities").CapabilitiesPluginProvides> & ExtractSdkProperties<import(".").ConnectionsPluginProvides> & ExtractSdkProperties<import(".").ListAppsPluginProvides> & ExtractSdkProperties<import(".").GetAppPluginProvides> & ExtractSdkProperties<import(".").ListActionsPluginProvides> & ExtractSdkProperties<import(".").GetActionPluginProvides> & ExtractSdkProperties<import(".").ListInputFieldsPluginProvides> & ExtractSdkProperties<import("./plugins/getInputFieldsSchema").GetInputFieldsSchemaPluginProvides> & ExtractSdkProperties<import("./plugins/listInputFieldChoices").ListInputFieldChoicesPluginProvides> & ExtractSdkProperties<import(".").RunActionPluginProvides> & ExtractSdkProperties<import(".").ListConnectionsPluginProvides> & ExtractSdkProperties<import(".").GetConnectionPluginProvides> & ExtractSdkProperties<import(".").FindFirstConnectionPluginProvides> & ExtractSdkProperties<import(".").FindUniqueConnectionPluginProvides> & ExtractSdkProperties<import(".").ListAuthenticationsPluginProvides> & ExtractSdkProperties<import(".").GetAuthenticationPluginProvides> & ExtractSdkProperties<import(".").FindFirstAuthenticationPluginProvides> & ExtractSdkProperties<import(".").FindUniqueAuthenticationPluginProvides> & ExtractSdkProperties<import(".").ListClientCredentialsPluginProvides> & ExtractSdkProperties<import(".").CreateClientCredentialsPluginProvides> & ExtractSdkProperties<import(".").DeleteClientCredentialsPluginProvides> & ExtractSdkProperties<import(".").FetchPluginProvides> & ExtractSdkProperties<import(".").RequestPluginProvides> & ExtractSdkProperties<import(".").ListTablesPluginProvides> & ExtractSdkProperties<import(".").GetTablePluginProvides> & ExtractSdkProperties<import(".").DeleteTablePluginProvides> & ExtractSdkProperties<import(".").CreateTablePluginProvides> & ExtractSdkProperties<import(".").ListTableFieldsPluginProvides> & ExtractSdkProperties<import(".").CreateTableFieldsPluginProvides> & ExtractSdkProperties<import(".").DeleteTableFieldsPluginProvides> & ExtractSdkProperties<import(".").GetTableRecordPluginProvides> & ExtractSdkProperties<import(".").ListTableRecordsPluginProvides> & ExtractSdkProperties<import(".").CreateTableRecordsPluginProvides> & ExtractSdkProperties<import(".").DeleteTableRecordsPluginProvides> & ExtractSdkProperties<import(".").UpdateTableRecordsPluginProvides> & ExtractSdkProperties<import(".").AppsPluginProvides> & ExtractSdkProperties<import(".").GetProfilePluginProvides>, {
|
|
17
|
-
meta: Record<string, PluginMeta>;
|
|
18
|
-
} & import(".").EventEmissionContext & {
|
|
19
|
-
api: import("./api").ApiClient;
|
|
20
|
-
resolveCredentials: () => Promise<import("./auth").ResolvedCredentials | undefined>;
|
|
21
|
-
} & {
|
|
22
|
-
getResolvedManifest: () => Promise<import(".").Manifest | null>;
|
|
23
|
-
getVersionedImplementationId: import("./plugins/manifest/schemas").GetVersionedImplementationId;
|
|
24
|
-
resolveAppKeys: import("./plugins/manifest/schemas").ResolveAppKeys;
|
|
25
|
-
getManifestConnections: () => Promise<import(".").ConnectionsMap | null>;
|
|
26
|
-
updateManifestEntry: (options: import(".").UpdateManifestEntryOptions) => Promise<import(".").UpdateManifestEntryResult>;
|
|
27
|
-
addActionEntry: (options: import(".").AddActionEntryOptions) => Promise<import(".").AddActionEntryResult>;
|
|
28
|
-
findActionEntry: (options: {
|
|
29
|
-
name: string;
|
|
30
|
-
manifest: import(".").Manifest;
|
|
31
|
-
}) => import(".").ActionEntry | null;
|
|
32
|
-
listActionEntries: (options?: {
|
|
33
|
-
configPath?: string;
|
|
34
|
-
}) => Promise<Array<[string, import(".").ActionEntry]>>;
|
|
35
|
-
deleteActionEntry: (options: {
|
|
36
|
-
name: string;
|
|
37
|
-
configPath?: string;
|
|
38
|
-
skipWrite?: boolean;
|
|
39
|
-
}) => Promise<import(".").Manifest>;
|
|
40
|
-
hasActionEntry: (options: {
|
|
41
|
-
name: string;
|
|
42
|
-
manifest: import(".").Manifest;
|
|
43
|
-
}) => boolean;
|
|
44
|
-
findManifestEntry: (options: {
|
|
45
|
-
appKey: string;
|
|
46
|
-
manifest: import(".").Manifest;
|
|
47
|
-
}) => [string, import(".").ManifestEntry] | null;
|
|
48
|
-
readManifestFromFile: (filePath: string) => Promise<import(".").Manifest | null>;
|
|
49
|
-
} & import("./plugins/capabilities").CapabilitiesContext & {
|
|
50
|
-
resolveConnection: (name: string) => Promise<import(".").ConnectionEntry | undefined>;
|
|
51
|
-
getConnectionsMap: () => Promise<import(".").ConnectionsMap | null>;
|
|
52
|
-
} & {
|
|
53
|
-
meta: {
|
|
54
|
-
listApps: {
|
|
55
|
-
inputSchema: typeof import("./plugins/listApps/schemas").ListAppsSchema;
|
|
56
|
-
};
|
|
57
|
-
};
|
|
58
|
-
} & {
|
|
59
|
-
meta: {
|
|
60
|
-
getApp: {
|
|
61
|
-
inputSchema: typeof import("./plugins/getApp/schemas").GetAppSchema;
|
|
62
|
-
};
|
|
63
|
-
};
|
|
64
|
-
} & {
|
|
65
|
-
meta: {
|
|
66
|
-
listActions: {
|
|
67
|
-
inputSchema: typeof import("./plugins/listActions/schemas").ListActionsSchema;
|
|
68
|
-
};
|
|
69
|
-
};
|
|
70
|
-
} & {
|
|
71
|
-
meta: {
|
|
72
|
-
getAction: {
|
|
73
|
-
inputSchema: typeof import("./plugins/getAction/schemas").GetActionSchema;
|
|
74
|
-
};
|
|
75
|
-
};
|
|
76
|
-
} & {
|
|
77
|
-
meta: {
|
|
78
|
-
listInputFields: {
|
|
79
|
-
inputSchema: typeof import("./plugins/listInputFields/schemas").ListInputFieldsSchema;
|
|
80
|
-
};
|
|
81
|
-
};
|
|
82
|
-
} & {
|
|
83
|
-
meta: {
|
|
84
|
-
getInputFieldsSchema: {
|
|
85
|
-
inputSchema: typeof import("./plugins/getInputFieldsSchema/schemas").GetInputFieldsSchemaSchema;
|
|
86
|
-
};
|
|
87
|
-
};
|
|
88
|
-
} & {
|
|
89
|
-
meta: {
|
|
90
|
-
listInputFieldChoices: {
|
|
91
|
-
inputSchema: typeof import("./plugins/listInputFieldChoices/schemas").ListInputFieldChoicesSchema;
|
|
92
|
-
};
|
|
93
|
-
};
|
|
94
|
-
} & {
|
|
95
|
-
meta: {
|
|
96
|
-
runAction: {
|
|
97
|
-
inputSchema: typeof import("./plugins/runAction/schemas").RunActionSchema;
|
|
98
|
-
};
|
|
99
|
-
};
|
|
100
|
-
} & {
|
|
101
|
-
meta: {
|
|
102
|
-
listConnections: {
|
|
103
|
-
inputSchema: typeof import("./plugins/listConnections/schemas").ListConnectionsQuerySchema;
|
|
104
|
-
};
|
|
105
|
-
};
|
|
106
|
-
} & {
|
|
107
|
-
meta: {
|
|
108
|
-
getConnection: {
|
|
109
|
-
inputSchema: typeof import("./plugins/getConnection/schemas").GetConnectionParamSchema;
|
|
110
|
-
};
|
|
111
|
-
};
|
|
112
|
-
} & {
|
|
113
|
-
meta: {
|
|
114
|
-
findFirstConnection: {
|
|
115
|
-
inputSchema: typeof import("./plugins/findFirstConnection/schemas").FindFirstConnectionSchema;
|
|
116
|
-
};
|
|
117
|
-
};
|
|
118
|
-
} & {
|
|
119
|
-
meta: {
|
|
120
|
-
findUniqueConnection: {
|
|
121
|
-
inputSchema: typeof import("./plugins/findUniqueConnection/schemas").FindUniqueConnectionSchema;
|
|
122
|
-
};
|
|
123
|
-
};
|
|
124
|
-
} & {
|
|
125
|
-
meta: {
|
|
126
|
-
listAuthentications: {
|
|
127
|
-
inputSchema: typeof import("./plugins/listConnections/schemas").ListConnectionsQuerySchema;
|
|
128
|
-
};
|
|
129
|
-
};
|
|
130
|
-
} & {
|
|
131
|
-
meta: {
|
|
132
|
-
getAuthentication: {
|
|
133
|
-
inputSchema: typeof import("./plugins/getConnection/schemas").GetConnectionParamSchema;
|
|
134
|
-
};
|
|
135
|
-
};
|
|
136
|
-
} & {
|
|
137
|
-
meta: {
|
|
138
|
-
findFirstAuthentication: {
|
|
139
|
-
inputSchema: typeof import("./plugins/findFirstConnection/schemas").FindFirstConnectionSchema;
|
|
140
|
-
};
|
|
141
|
-
};
|
|
142
|
-
} & {
|
|
143
|
-
meta: {
|
|
144
|
-
findUniqueAuthentication: {
|
|
145
|
-
inputSchema: typeof import("./plugins/findUniqueConnection/schemas").FindUniqueConnectionSchema;
|
|
146
|
-
};
|
|
147
|
-
};
|
|
148
|
-
} & {
|
|
149
|
-
meta: {
|
|
150
|
-
listClientCredentials: {
|
|
151
|
-
inputSchema: typeof import("./plugins/listClientCredentials/schemas").ListClientCredentialsQuerySchema;
|
|
152
|
-
};
|
|
153
|
-
};
|
|
154
|
-
} & {
|
|
155
|
-
meta: {
|
|
156
|
-
createClientCredentials: {
|
|
157
|
-
inputSchema: typeof import("./plugins/createClientCredentials/schemas").CreateClientCredentialsSchema;
|
|
158
|
-
};
|
|
159
|
-
};
|
|
160
|
-
} & {
|
|
161
|
-
meta: {
|
|
162
|
-
deleteClientCredentials: {
|
|
163
|
-
inputSchema: typeof import("./plugins/deleteClientCredentials/schemas").DeleteClientCredentialsSchema;
|
|
164
|
-
};
|
|
165
|
-
};
|
|
166
|
-
} & {
|
|
167
|
-
meta: {
|
|
168
|
-
fetch: {
|
|
169
|
-
description: string;
|
|
170
|
-
packages: string[];
|
|
171
|
-
categories: string[];
|
|
172
|
-
returnType: string;
|
|
173
|
-
inputParameters: Array<{
|
|
174
|
-
name: string;
|
|
175
|
-
schema: import("zod").ZodType;
|
|
176
|
-
}>;
|
|
177
|
-
};
|
|
178
|
-
};
|
|
179
|
-
} & {
|
|
180
|
-
meta: {
|
|
181
|
-
request: {
|
|
182
|
-
inputSchema: typeof import(".").RelayRequestSchema;
|
|
183
|
-
};
|
|
5
|
+
export declare function createOptionsPlugin(options: ZapierSdkOptions): () => {
|
|
6
|
+
context: {
|
|
7
|
+
options: ZapierSdkOptions;
|
|
184
8
|
};
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
inputSchema: typeof import("./plugins/tables/createTable/schemas").CreateTableOptionsSchema;
|
|
207
|
-
};
|
|
208
|
-
};
|
|
209
|
-
} & {
|
|
210
|
-
meta: {
|
|
211
|
-
listTableFields: {
|
|
212
|
-
inputSchema: typeof import("./plugins/tables/listTableFields/schemas").ListTableFieldsOptionsSchema;
|
|
213
|
-
};
|
|
214
|
-
};
|
|
215
|
-
} & {
|
|
216
|
-
meta: {
|
|
217
|
-
createTableFields: {
|
|
218
|
-
inputSchema: typeof import("./plugins/tables/createTableFields/schemas").CreateTableFieldsOptionsSchema;
|
|
219
|
-
};
|
|
220
|
-
};
|
|
221
|
-
} & {
|
|
222
|
-
meta: {
|
|
223
|
-
deleteTableFields: {
|
|
224
|
-
inputSchema: typeof import("./plugins/tables/deleteTableFields/schemas").DeleteTableFieldsOptionsSchema;
|
|
225
|
-
};
|
|
226
|
-
};
|
|
227
|
-
} & {
|
|
228
|
-
meta: {
|
|
229
|
-
getTableRecord: {
|
|
230
|
-
inputSchema: typeof import("./plugins/tables/getTableRecord/schemas").GetTableRecordOptionsSchema;
|
|
231
|
-
};
|
|
232
|
-
};
|
|
233
|
-
} & {
|
|
234
|
-
meta: {
|
|
235
|
-
listTableRecords: {
|
|
236
|
-
inputSchema: typeof import("./plugins/tables/listTableRecords/schemas").ListTableRecordsOptionsSchema;
|
|
237
|
-
};
|
|
238
|
-
};
|
|
239
|
-
} & {
|
|
240
|
-
meta: {
|
|
241
|
-
createTableRecords: {
|
|
242
|
-
inputSchema: typeof import("./plugins/tables/createTableRecords/schemas").CreateTableRecordsOptionsSchema;
|
|
243
|
-
};
|
|
244
|
-
};
|
|
245
|
-
} & {
|
|
246
|
-
meta: {
|
|
247
|
-
deleteTableRecords: {
|
|
248
|
-
inputSchema: typeof import("./plugins/tables/deleteTableRecords/schemas").DeleteTableRecordsOptionsSchema;
|
|
249
|
-
};
|
|
250
|
-
};
|
|
251
|
-
} & {
|
|
252
|
-
meta: {
|
|
253
|
-
updateTableRecords: {
|
|
254
|
-
inputSchema: typeof import("./plugins/tables/updateTableRecords/schemas").UpdateTableRecordsOptionsSchema;
|
|
255
|
-
};
|
|
9
|
+
};
|
|
10
|
+
export declare function createSdk(): {
|
|
11
|
+
readonly context: Readonly<{
|
|
12
|
+
meta: Record<string, PluginMeta>;
|
|
13
|
+
}>;
|
|
14
|
+
getContext: () => Readonly<{
|
|
15
|
+
meta: Record<string, PluginMeta>;
|
|
16
|
+
}>;
|
|
17
|
+
addPlugin<TProvides extends PluginProvides>(plugin: Plugin<{
|
|
18
|
+
context: {
|
|
19
|
+
meta: Record<string, PluginMeta>;
|
|
20
|
+
};
|
|
21
|
+
}, TProvides>): WithAddPlugin<{
|
|
22
|
+
context: {
|
|
23
|
+
meta: Record<string, PluginMeta>;
|
|
24
|
+
};
|
|
25
|
+
} & TProvides>;
|
|
26
|
+
};
|
|
27
|
+
export declare function createZapierSdkWithoutRegistry(options?: ZapierSdkOptions): WithAddPlugin<{
|
|
28
|
+
context: {
|
|
29
|
+
meta: Record<string, PluginMeta>;
|
|
256
30
|
};
|
|
257
31
|
} & {
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
inputSchema: typeof import("./plugins/getProfile/schemas").GetProfileSchema;
|
|
261
|
-
};
|
|
32
|
+
context: {
|
|
33
|
+
options: ZapierSdkOptions;
|
|
262
34
|
};
|
|
263
|
-
}>;
|
|
35
|
+
} & import(".").EventEmissionProvides & import(".").ApiPluginProvides & import(".").ManifestPluginProvides & import("./plugins/capabilities").CapabilitiesPluginProvides & import(".").ConnectionsPluginProvides & import(".").ListAppsPluginProvides & import(".").GetAppPluginProvides & import(".").ListActionsPluginProvides & import(".").GetActionPluginProvides & import(".").ListInputFieldsPluginProvides & import("./plugins/getInputFieldsSchema").GetInputFieldsSchemaPluginProvides & import("./plugins/listInputFieldChoices").ListInputFieldChoicesPluginProvides & import(".").RunActionPluginProvides & import(".").ListConnectionsPluginProvides & import(".").GetConnectionPluginProvides & import(".").FindFirstConnectionPluginProvides & import(".").FindUniqueConnectionPluginProvides & import(".").ListAuthenticationsPluginProvides & import(".").GetAuthenticationPluginProvides & import(".").FindFirstAuthenticationPluginProvides & import(".").FindUniqueAuthenticationPluginProvides & import(".").ListClientCredentialsPluginProvides & import(".").CreateClientCredentialsPluginProvides & import(".").DeleteClientCredentialsPluginProvides & import(".").FetchPluginProvides & import(".").RequestPluginProvides & import(".").ListTablesPluginProvides & import(".").GetTablePluginProvides & import(".").DeleteTablePluginProvides & import(".").CreateTablePluginProvides & import(".").ListTableFieldsPluginProvides & import(".").CreateTableFieldsPluginProvides & import(".").DeleteTableFieldsPluginProvides & import(".").GetTableRecordPluginProvides & import(".").ListTableRecordsPluginProvides & import(".").CreateTableRecordsPluginProvides & import(".").DeleteTableRecordsPluginProvides & import(".").UpdateTableRecordsPluginProvides & import(".").AppsPluginProvides & import(".").GetProfilePluginProvides>;
|
|
264
36
|
export declare function createZapierSdk(options?: ZapierSdkOptions): ZapierSdk;
|
|
265
37
|
//# sourceMappingURL=sdk.d.ts.map
|
package/dist/sdk.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sdk.d.ts","sourceRoot":"","sources":["../src/sdk.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,
|
|
1
|
+
{"version":3,"file":"sdk.d.ts","sourceRoot":"","sources":["../src/sdk.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAC7D,OAAO,KAAK,EACV,aAAa,EACb,MAAM,EACN,cAAc,EACd,UAAU,EACX,MAAM,gBAAgB,CAAC;AAiDxB,MAAM,WAAW,gBAAiB,SAAQ,cAAc;CAAG;AAE3D,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,gBAAgB;;;;EAE5D;AAED,wBAAgB,SAAS;;cACW,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC;;;cAA1B,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC;;cAmBhD,SAAS,SAAS,cAAc;;kBAnBV,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC;;;;kBAA1B,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC;;;EAC7D;AA0DD,wBAAgB,8BAA8B,CAAC,OAAO,GAAE,gBAAqB;;cA3DzC,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC;;;;;;uwDAmI7D;AAED,wBAAgB,eAAe,CAAC,OAAO,GAAE,gBAAqB,GAAG,SAAS,CAMzE"}
|