@zapier/zapier-sdk 0.3.1 → 0.4.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/dist/index.cjs +1962 -0
- package/dist/index.d.mts +892 -0
- package/dist/index.d.ts +892 -20
- package/dist/index.mjs +1914 -0
- package/package.json +19 -7
- package/src/api/client.ts +106 -25
- package/src/api/polling.ts +4 -8
- package/src/api/types.ts +8 -1
- package/src/auth.ts +19 -287
- package/src/functions/findFirstAuthentication/schemas.ts +3 -13
- package/src/functions/findUniqueAuthentication/schemas.ts +3 -13
- package/src/functions/generateTypes/index.ts +15 -0
- package/src/functions/generateTypes/schemas.ts +3 -10
- package/src/functions/getAction/schemas.ts +3 -13
- package/src/functions/getApp/schemas.ts +2 -13
- package/src/functions/getAuthentication/index.ts +0 -1
- package/src/functions/getAuthentication/schemas.ts +3 -17
- package/src/functions/listActions/schemas.ts +3 -13
- package/src/functions/listApps/schemas.ts +2 -13
- package/src/functions/listAuthentications/index.ts +0 -1
- package/src/functions/listAuthentications/schemas.ts +3 -15
- package/src/functions/listFields/schemas.ts +3 -13
- package/src/functions/request/index.ts +150 -0
- package/src/functions/request/info.ts +11 -0
- package/src/functions/request/schemas.ts +53 -0
- package/src/functions/runAction/index.ts +0 -1
- package/src/functions/runAction/schemas.ts +6 -15
- package/src/index.ts +8 -2
- package/src/plugins/apps/index.ts +34 -9
- package/src/plugins/apps/types.ts +17 -1
- package/src/plugins/fetch/index.ts +50 -0
- package/src/plugins/fetch/types.ts +2 -0
- package/src/sdk.ts +19 -23
- package/src/types/domain.ts +16 -0
- package/src/types/sdk.ts +17 -2
- package/tsconfig.json +2 -2
- package/tsup.config.ts +21 -0
- package/dist/api/auth.d.ts +0 -8
- package/dist/api/auth.js +0 -29
- package/dist/api/client.d.ts +0 -8
- package/dist/api/client.js +0 -119
- package/dist/api/debug.d.ts +0 -12
- package/dist/api/debug.js +0 -50
- package/dist/api/index.d.ts +0 -28
- package/dist/api/index.js +0 -52
- package/dist/api/polling.d.ts +0 -17
- package/dist/api/polling.js +0 -34
- package/dist/api/types.d.ts +0 -147
- package/dist/api/types.js +0 -9
- package/dist/auth.d.ts +0 -59
- package/dist/auth.js +0 -261
- package/dist/functions/bundleCode/index.d.ts +0 -11
- package/dist/functions/bundleCode/index.js +0 -91
- package/dist/functions/bundleCode/info.d.ts +0 -27
- package/dist/functions/bundleCode/info.js +0 -11
- package/dist/functions/bundleCode/schemas.d.ts +0 -27
- package/dist/functions/bundleCode/schemas.js +0 -22
- package/dist/functions/findFirstAuthentication/index.d.ts +0 -12
- package/dist/functions/findFirstAuthentication/index.js +0 -21
- package/dist/functions/findFirstAuthentication/info.d.ts +0 -30
- package/dist/functions/findFirstAuthentication/info.js +0 -11
- package/dist/functions/findFirstAuthentication/schemas.d.ts +0 -42
- package/dist/functions/findFirstAuthentication/schemas.js +0 -25
- package/dist/functions/findUniqueAuthentication/index.d.ts +0 -13
- package/dist/functions/findUniqueAuthentication/index.js +0 -28
- package/dist/functions/findUniqueAuthentication/info.d.ts +0 -30
- package/dist/functions/findUniqueAuthentication/info.js +0 -11
- package/dist/functions/findUniqueAuthentication/schemas.d.ts +0 -42
- package/dist/functions/findUniqueAuthentication/schemas.js +0 -25
- package/dist/functions/generateTypes/index.d.ts +0 -11
- package/dist/functions/generateTypes/index.js +0 -305
- package/dist/functions/generateTypes/info.d.ts +0 -21
- package/dist/functions/generateTypes/info.js +0 -11
- package/dist/functions/generateTypes/schemas.d.ts +0 -30
- package/dist/functions/generateTypes/schemas.js +0 -14
- package/dist/functions/getAction/index.d.ts +0 -12
- package/dist/functions/getAction/index.js +0 -26
- package/dist/functions/getAction/info.d.ts +0 -18
- package/dist/functions/getAction/info.js +0 -11
- package/dist/functions/getAction/schemas.d.ts +0 -30
- package/dist/functions/getAction/schemas.js +0 -13
- package/dist/functions/getApp/index.d.ts +0 -12
- package/dist/functions/getApp/index.js +0 -37
- package/dist/functions/getApp/info.d.ts +0 -12
- package/dist/functions/getApp/info.js +0 -11
- package/dist/functions/getApp/schemas.d.ts +0 -24
- package/dist/functions/getApp/schemas.js +0 -11
- package/dist/functions/getAuthentication/index.d.ts +0 -13
- package/dist/functions/getAuthentication/index.js +0 -38
- package/dist/functions/getAuthentication/info.d.ts +0 -12
- package/dist/functions/getAuthentication/info.js +0 -11
- package/dist/functions/getAuthentication/schemas.d.ts +0 -26
- package/dist/functions/getAuthentication/schemas.js +0 -16
- package/dist/functions/listActions/index.d.ts +0 -12
- package/dist/functions/listActions/index.js +0 -128
- package/dist/functions/listActions/info.d.ts +0 -15
- package/dist/functions/listActions/info.js +0 -11
- package/dist/functions/listActions/schemas.d.ts +0 -27
- package/dist/functions/listActions/schemas.js +0 -14
- package/dist/functions/listApps/index.d.ts +0 -12
- package/dist/functions/listApps/index.js +0 -50
- package/dist/functions/listApps/info.d.ts +0 -18
- package/dist/functions/listApps/info.js +0 -11
- package/dist/functions/listApps/schemas.d.ts +0 -30
- package/dist/functions/listApps/schemas.js +0 -15
- package/dist/functions/listAuthentications/index.d.ts +0 -12
- package/dist/functions/listAuthentications/index.js +0 -131
- package/dist/functions/listAuthentications/info.d.ts +0 -30
- package/dist/functions/listAuthentications/info.js +0 -11
- package/dist/functions/listAuthentications/schemas.d.ts +0 -44
- package/dist/functions/listAuthentications/schemas.js +0 -25
- package/dist/functions/listFields/index.d.ts +0 -12
- package/dist/functions/listFields/index.js +0 -65
- package/dist/functions/listFields/info.d.ts +0 -24
- package/dist/functions/listFields/info.js +0 -11
- package/dist/functions/listFields/schemas.d.ts +0 -36
- package/dist/functions/listFields/schemas.js +0 -17
- package/dist/functions/runAction/index.d.ts +0 -12
- package/dist/functions/runAction/index.js +0 -86
- package/dist/functions/runAction/info.d.ts +0 -24
- package/dist/functions/runAction/info.js +0 -11
- package/dist/functions/runAction/schemas.d.ts +0 -38
- package/dist/functions/runAction/schemas.js +0 -15
- package/dist/index.js +0 -57
- package/dist/plugins/apps/index.d.ts +0 -8
- package/dist/plugins/apps/index.js +0 -77
- package/dist/plugins/apps/info.d.ts +0 -6
- package/dist/plugins/apps/info.js +0 -13
- package/dist/plugins/apps/types.d.ts +0 -21
- package/dist/plugins/apps/types.js +0 -2
- package/dist/resolvers/actionKey.d.ts +0 -8
- package/dist/resolvers/actionKey.js +0 -20
- package/dist/resolvers/actionType.d.ts +0 -8
- package/dist/resolvers/actionType.js +0 -21
- package/dist/resolvers/appKey.d.ts +0 -6
- package/dist/resolvers/appKey.js +0 -8
- package/dist/resolvers/authenticationId.d.ts +0 -8
- package/dist/resolvers/authenticationId.js +0 -29
- package/dist/resolvers/index.d.ts +0 -39
- package/dist/resolvers/index.js +0 -105
- package/dist/resolvers/inputs.d.ts +0 -7
- package/dist/resolvers/inputs.js +0 -15
- package/dist/schema-utils.d.ts +0 -44
- package/dist/schema-utils.js +0 -76
- package/dist/schemas/Action.d.ts +0 -21
- package/dist/schemas/Action.js +0 -31
- package/dist/schemas/App.d.ts +0 -19
- package/dist/schemas/App.js +0 -32
- package/dist/schemas/Auth.d.ts +0 -27
- package/dist/schemas/Auth.js +0 -42
- package/dist/schemas/Field.d.ts +0 -15
- package/dist/schemas/Field.js +0 -25
- package/dist/sdk.d.ts +0 -6
- package/dist/sdk.js +0 -90
- package/dist/types/domain.d.ts +0 -25
- package/dist/types/domain.js +0 -21
- package/dist/types/events.d.ts +0 -37
- package/dist/types/events.js +0 -8
- package/dist/types/properties.d.ts +0 -21
- package/dist/types/properties.js +0 -52
- package/dist/types/sdk.d.ts +0 -24
- package/dist/types/sdk.js +0 -2
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
export declare const BundleCodeSchema: z.ZodObject<{
|
|
3
|
-
input: z.ZodString;
|
|
4
|
-
output: z.ZodOptional<z.ZodString>;
|
|
5
|
-
string: z.ZodDefault<z.ZodBoolean>;
|
|
6
|
-
minify: z.ZodDefault<z.ZodBoolean>;
|
|
7
|
-
target: z.ZodDefault<z.ZodString>;
|
|
8
|
-
cjs: z.ZodDefault<z.ZodBoolean>;
|
|
9
|
-
}, "strip", z.ZodTypeAny, {
|
|
10
|
-
string: boolean;
|
|
11
|
-
input: string;
|
|
12
|
-
minify: boolean;
|
|
13
|
-
target: string;
|
|
14
|
-
cjs: boolean;
|
|
15
|
-
output?: string | undefined;
|
|
16
|
-
}, {
|
|
17
|
-
input: string;
|
|
18
|
-
string?: boolean | undefined;
|
|
19
|
-
output?: string | undefined;
|
|
20
|
-
minify?: boolean | undefined;
|
|
21
|
-
target?: string | undefined;
|
|
22
|
-
cjs?: boolean | undefined;
|
|
23
|
-
}>;
|
|
24
|
-
export type BundleCodeOptions = z.infer<typeof BundleCodeSchema>;
|
|
25
|
-
export interface BundleCodeSdkFunction {
|
|
26
|
-
bundleCode: (options: BundleCodeOptions) => Promise<string>;
|
|
27
|
-
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.BundleCodeSchema = void 0;
|
|
4
|
-
const zod_1 = require("zod");
|
|
5
|
-
const properties_1 = require("../../types/properties");
|
|
6
|
-
// Pure Zod schema - no resolver metadata!
|
|
7
|
-
exports.BundleCodeSchema = zod_1.z
|
|
8
|
-
.object({
|
|
9
|
-
input: zod_1.z.string().min(1).describe("Input TypeScript file path to bundle"),
|
|
10
|
-
output: properties_1.OutputPropertySchema.optional().describe("Output file path (defaults to input with .js extension)"),
|
|
11
|
-
string: zod_1.z
|
|
12
|
-
.boolean()
|
|
13
|
-
.default(false)
|
|
14
|
-
.describe("Return bundled code as string instead of writing to file"),
|
|
15
|
-
minify: zod_1.z.boolean().default(false).describe("Minify the bundled output"),
|
|
16
|
-
target: zod_1.z.string().default("es2017").describe("ECMAScript target version"),
|
|
17
|
-
cjs: zod_1.z
|
|
18
|
-
.boolean()
|
|
19
|
-
.default(false)
|
|
20
|
-
.describe("Output CommonJS format instead of ESM"),
|
|
21
|
-
})
|
|
22
|
-
.describe("Bundle TypeScript code into executable JavaScript");
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { Authentication } from "../../types/domain";
|
|
2
|
-
import type { FindFirstAuthenticationOptions } from "./schemas";
|
|
3
|
-
/**
|
|
4
|
-
* Find the first authentication matching the given criteria
|
|
5
|
-
*
|
|
6
|
-
* This function can be used standalone without instantiating a full SDK,
|
|
7
|
-
* which enables better tree-shaking in applications that only need this functionality.
|
|
8
|
-
*
|
|
9
|
-
* @param options - Filtering and API configuration options
|
|
10
|
-
* @returns Promise<Authentication | null> - First matching authentication or null if not found
|
|
11
|
-
*/
|
|
12
|
-
export declare function findFirstAuthentication(options?: Partial<FindFirstAuthenticationOptions>): Promise<Authentication | null>;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.findFirstAuthentication = findFirstAuthentication;
|
|
4
|
-
const listAuthentications_1 = require("../listAuthentications");
|
|
5
|
-
/**
|
|
6
|
-
* Find the first authentication matching the given criteria
|
|
7
|
-
*
|
|
8
|
-
* This function can be used standalone without instantiating a full SDK,
|
|
9
|
-
* which enables better tree-shaking in applications that only need this functionality.
|
|
10
|
-
*
|
|
11
|
-
* @param options - Filtering and API configuration options
|
|
12
|
-
* @returns Promise<Authentication | null> - First matching authentication or null if not found
|
|
13
|
-
*/
|
|
14
|
-
async function findFirstAuthentication(options = {}) {
|
|
15
|
-
// Use listAuthentications with limit 1 to get the first result
|
|
16
|
-
const auths = await (0, listAuthentications_1.listAuthentications)({
|
|
17
|
-
...options,
|
|
18
|
-
limit: 1,
|
|
19
|
-
});
|
|
20
|
-
return auths.length > 0 ? auths[0] : null;
|
|
21
|
-
}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { findFirstAuthentication } from "./index";
|
|
2
|
-
export declare const findFirstAuthenticationInfo: {
|
|
3
|
-
name: string;
|
|
4
|
-
inputSchema: import("zod").ZodObject<{
|
|
5
|
-
appKey: import("zod").ZodOptional<import("zod").ZodString>;
|
|
6
|
-
search: import("zod").ZodOptional<import("zod").ZodString>;
|
|
7
|
-
title: import("zod").ZodOptional<import("zod").ZodString>;
|
|
8
|
-
account_id: import("zod").ZodOptional<import("zod").ZodString>;
|
|
9
|
-
owner: import("zod").ZodOptional<import("zod").ZodString>;
|
|
10
|
-
limit: import("zod").ZodOptional<import("zod").ZodDefault<import("zod").ZodNumber>>;
|
|
11
|
-
offset: import("zod").ZodOptional<import("zod").ZodDefault<import("zod").ZodNumber>>;
|
|
12
|
-
}, "strip", import("zod").ZodTypeAny, {
|
|
13
|
-
search?: string | undefined;
|
|
14
|
-
appKey?: string | undefined;
|
|
15
|
-
title?: string | undefined;
|
|
16
|
-
account_id?: string | undefined;
|
|
17
|
-
owner?: string | undefined;
|
|
18
|
-
limit?: number | undefined;
|
|
19
|
-
offset?: number | undefined;
|
|
20
|
-
}, {
|
|
21
|
-
search?: string | undefined;
|
|
22
|
-
appKey?: string | undefined;
|
|
23
|
-
title?: string | undefined;
|
|
24
|
-
account_id?: string | undefined;
|
|
25
|
-
owner?: string | undefined;
|
|
26
|
-
limit?: number | undefined;
|
|
27
|
-
offset?: number | undefined;
|
|
28
|
-
}>;
|
|
29
|
-
implementation: typeof findFirstAuthentication;
|
|
30
|
-
};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.findFirstAuthenticationInfo = void 0;
|
|
4
|
-
const index_1 = require("./index");
|
|
5
|
-
const schemas_1 = require("./schemas");
|
|
6
|
-
// Function registry info - imports both function and schema
|
|
7
|
-
exports.findFirstAuthenticationInfo = {
|
|
8
|
-
name: index_1.findFirstAuthentication.name,
|
|
9
|
-
inputSchema: schemas_1.FindFirstAuthenticationSchema,
|
|
10
|
-
implementation: index_1.findFirstAuthentication,
|
|
11
|
-
};
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
import type { Authentication } from "../../types/domain";
|
|
3
|
-
export declare const FindFirstAuthenticationSchema: z.ZodObject<{
|
|
4
|
-
appKey: z.ZodOptional<z.ZodString>;
|
|
5
|
-
search: z.ZodOptional<z.ZodString>;
|
|
6
|
-
title: z.ZodOptional<z.ZodString>;
|
|
7
|
-
account_id: z.ZodOptional<z.ZodString>;
|
|
8
|
-
owner: z.ZodOptional<z.ZodString>;
|
|
9
|
-
limit: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
|
|
10
|
-
offset: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
|
|
11
|
-
}, "strip", z.ZodTypeAny, {
|
|
12
|
-
search?: string | undefined;
|
|
13
|
-
appKey?: string | undefined;
|
|
14
|
-
title?: string | undefined;
|
|
15
|
-
account_id?: string | undefined;
|
|
16
|
-
owner?: string | undefined;
|
|
17
|
-
limit?: number | undefined;
|
|
18
|
-
offset?: number | undefined;
|
|
19
|
-
}, {
|
|
20
|
-
search?: string | undefined;
|
|
21
|
-
appKey?: string | undefined;
|
|
22
|
-
title?: string | undefined;
|
|
23
|
-
account_id?: string | undefined;
|
|
24
|
-
owner?: string | undefined;
|
|
25
|
-
limit?: number | undefined;
|
|
26
|
-
offset?: number | undefined;
|
|
27
|
-
}>;
|
|
28
|
-
export type FindFirstAuthenticationOptions = z.infer<typeof FindFirstAuthenticationSchema> & {
|
|
29
|
-
/** Base URL for Zapier API */
|
|
30
|
-
baseUrl?: string;
|
|
31
|
-
/** Authentication token */
|
|
32
|
-
token?: string;
|
|
33
|
-
/** Optional pre-instantiated API client */
|
|
34
|
-
api?: any;
|
|
35
|
-
/** Enable debug logging */
|
|
36
|
-
debug?: boolean;
|
|
37
|
-
/** Custom fetch implementation */
|
|
38
|
-
fetch?: typeof globalThis.fetch;
|
|
39
|
-
};
|
|
40
|
-
export interface FindFirstAuthenticationSdkFunction {
|
|
41
|
-
findFirstAuthentication: (options?: Partial<FindFirstAuthenticationOptions>) => Promise<Authentication | null>;
|
|
42
|
-
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.FindFirstAuthenticationSchema = void 0;
|
|
4
|
-
const zod_1 = require("zod");
|
|
5
|
-
const properties_1 = require("../../types/properties");
|
|
6
|
-
const schema_utils_1 = require("../../schema-utils");
|
|
7
|
-
const Auth_1 = require("../../schemas/Auth");
|
|
8
|
-
// Pure Zod schema - no resolver metadata!
|
|
9
|
-
exports.FindFirstAuthenticationSchema = (0, schema_utils_1.withOutputSchema)(zod_1.z
|
|
10
|
-
.object({
|
|
11
|
-
appKey: properties_1.AppKeyPropertySchema.optional().describe("App slug to get authentications for (e.g., 'slack', 'github')"),
|
|
12
|
-
search: zod_1.z
|
|
13
|
-
.string()
|
|
14
|
-
.optional()
|
|
15
|
-
.describe("Search term to filter authentications by title"),
|
|
16
|
-
title: zod_1.z
|
|
17
|
-
.string()
|
|
18
|
-
.optional()
|
|
19
|
-
.describe("Filter authentications by exact title match"),
|
|
20
|
-
account_id: zod_1.z.string().optional().describe("Filter by account ID"),
|
|
21
|
-
owner: zod_1.z.string().optional().describe("Filter by owner"),
|
|
22
|
-
limit: properties_1.LimitPropertySchema.optional().describe("Maximum number of items to return (1-200)"),
|
|
23
|
-
offset: properties_1.OffsetPropertySchema.optional().describe("Number of items to skip for pagination"),
|
|
24
|
-
})
|
|
25
|
-
.describe("Find the first authentication matching the criteria"), Auth_1.AuthItemSchema);
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import type { Authentication } from "../../types/domain";
|
|
2
|
-
import type { FindUniqueAuthenticationOptions } from "./schemas";
|
|
3
|
-
/**
|
|
4
|
-
* Find a unique authentication matching the given criteria
|
|
5
|
-
*
|
|
6
|
-
* This function can be used standalone without instantiating a full SDK,
|
|
7
|
-
* which enables better tree-shaking in applications that only need this functionality.
|
|
8
|
-
*
|
|
9
|
-
* @param options - Filtering and API configuration options
|
|
10
|
-
* @returns Promise<Authentication> - The unique matching authentication
|
|
11
|
-
* @throws Error if no authentication found or multiple authentications found
|
|
12
|
-
*/
|
|
13
|
-
export declare function findUniqueAuthentication(options?: Partial<FindUniqueAuthenticationOptions>): Promise<Authentication>;
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.findUniqueAuthentication = findUniqueAuthentication;
|
|
4
|
-
const listAuthentications_1 = require("../listAuthentications");
|
|
5
|
-
/**
|
|
6
|
-
* Find a unique authentication matching the given criteria
|
|
7
|
-
*
|
|
8
|
-
* This function can be used standalone without instantiating a full SDK,
|
|
9
|
-
* which enables better tree-shaking in applications that only need this functionality.
|
|
10
|
-
*
|
|
11
|
-
* @param options - Filtering and API configuration options
|
|
12
|
-
* @returns Promise<Authentication> - The unique matching authentication
|
|
13
|
-
* @throws Error if no authentication found or multiple authentications found
|
|
14
|
-
*/
|
|
15
|
-
async function findUniqueAuthentication(options = {}) {
|
|
16
|
-
// Use listAuthentications with a reasonable limit to check for uniqueness
|
|
17
|
-
const auths = await (0, listAuthentications_1.listAuthentications)({
|
|
18
|
-
...options,
|
|
19
|
-
limit: 2, // Get up to 2 to check for uniqueness
|
|
20
|
-
});
|
|
21
|
-
if (auths.length === 0) {
|
|
22
|
-
throw new Error("No authentication found matching the specified criteria");
|
|
23
|
-
}
|
|
24
|
-
if (auths.length > 1) {
|
|
25
|
-
throw new Error("Multiple authentications found matching the specified criteria. Expected exactly one.");
|
|
26
|
-
}
|
|
27
|
-
return auths[0];
|
|
28
|
-
}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { findUniqueAuthentication } from "./index";
|
|
2
|
-
export declare const findUniqueAuthenticationInfo: {
|
|
3
|
-
name: string;
|
|
4
|
-
inputSchema: import("zod").ZodObject<{
|
|
5
|
-
appKey: import("zod").ZodOptional<import("zod").ZodString>;
|
|
6
|
-
search: import("zod").ZodOptional<import("zod").ZodString>;
|
|
7
|
-
title: import("zod").ZodOptional<import("zod").ZodString>;
|
|
8
|
-
account_id: import("zod").ZodOptional<import("zod").ZodString>;
|
|
9
|
-
owner: import("zod").ZodOptional<import("zod").ZodString>;
|
|
10
|
-
limit: import("zod").ZodOptional<import("zod").ZodDefault<import("zod").ZodNumber>>;
|
|
11
|
-
offset: import("zod").ZodOptional<import("zod").ZodDefault<import("zod").ZodNumber>>;
|
|
12
|
-
}, "strip", import("zod").ZodTypeAny, {
|
|
13
|
-
search?: string | undefined;
|
|
14
|
-
appKey?: string | undefined;
|
|
15
|
-
title?: string | undefined;
|
|
16
|
-
account_id?: string | undefined;
|
|
17
|
-
owner?: string | undefined;
|
|
18
|
-
limit?: number | undefined;
|
|
19
|
-
offset?: number | undefined;
|
|
20
|
-
}, {
|
|
21
|
-
search?: string | undefined;
|
|
22
|
-
appKey?: string | undefined;
|
|
23
|
-
title?: string | undefined;
|
|
24
|
-
account_id?: string | undefined;
|
|
25
|
-
owner?: string | undefined;
|
|
26
|
-
limit?: number | undefined;
|
|
27
|
-
offset?: number | undefined;
|
|
28
|
-
}>;
|
|
29
|
-
implementation: typeof findUniqueAuthentication;
|
|
30
|
-
};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.findUniqueAuthenticationInfo = void 0;
|
|
4
|
-
const index_1 = require("./index");
|
|
5
|
-
const schemas_1 = require("./schemas");
|
|
6
|
-
// Function registry info - imports both function and schema
|
|
7
|
-
exports.findUniqueAuthenticationInfo = {
|
|
8
|
-
name: index_1.findUniqueAuthentication.name,
|
|
9
|
-
inputSchema: schemas_1.FindUniqueAuthenticationSchema,
|
|
10
|
-
implementation: index_1.findUniqueAuthentication,
|
|
11
|
-
};
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
import type { Authentication } from "../../types/domain";
|
|
3
|
-
export declare const FindUniqueAuthenticationSchema: z.ZodObject<{
|
|
4
|
-
appKey: z.ZodOptional<z.ZodString>;
|
|
5
|
-
search: z.ZodOptional<z.ZodString>;
|
|
6
|
-
title: z.ZodOptional<z.ZodString>;
|
|
7
|
-
account_id: z.ZodOptional<z.ZodString>;
|
|
8
|
-
owner: z.ZodOptional<z.ZodString>;
|
|
9
|
-
limit: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
|
|
10
|
-
offset: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
|
|
11
|
-
}, "strip", z.ZodTypeAny, {
|
|
12
|
-
search?: string | undefined;
|
|
13
|
-
appKey?: string | undefined;
|
|
14
|
-
title?: string | undefined;
|
|
15
|
-
account_id?: string | undefined;
|
|
16
|
-
owner?: string | undefined;
|
|
17
|
-
limit?: number | undefined;
|
|
18
|
-
offset?: number | undefined;
|
|
19
|
-
}, {
|
|
20
|
-
search?: string | undefined;
|
|
21
|
-
appKey?: string | undefined;
|
|
22
|
-
title?: string | undefined;
|
|
23
|
-
account_id?: string | undefined;
|
|
24
|
-
owner?: string | undefined;
|
|
25
|
-
limit?: number | undefined;
|
|
26
|
-
offset?: number | undefined;
|
|
27
|
-
}>;
|
|
28
|
-
export type FindUniqueAuthenticationOptions = z.infer<typeof FindUniqueAuthenticationSchema> & {
|
|
29
|
-
/** Base URL for Zapier API */
|
|
30
|
-
baseUrl?: string;
|
|
31
|
-
/** Authentication token */
|
|
32
|
-
token?: string;
|
|
33
|
-
/** Optional pre-instantiated API client */
|
|
34
|
-
api?: any;
|
|
35
|
-
/** Enable debug logging */
|
|
36
|
-
debug?: boolean;
|
|
37
|
-
/** Custom fetch implementation */
|
|
38
|
-
fetch?: typeof globalThis.fetch;
|
|
39
|
-
};
|
|
40
|
-
export interface FindUniqueAuthenticationSdkFunction {
|
|
41
|
-
findUniqueAuthentication: (options?: Partial<FindUniqueAuthenticationOptions>) => Promise<Authentication>;
|
|
42
|
-
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.FindUniqueAuthenticationSchema = void 0;
|
|
4
|
-
const zod_1 = require("zod");
|
|
5
|
-
const properties_1 = require("../../types/properties");
|
|
6
|
-
const schema_utils_1 = require("../../schema-utils");
|
|
7
|
-
const Auth_1 = require("../../schemas/Auth");
|
|
8
|
-
// Pure Zod schema - no resolver metadata!
|
|
9
|
-
exports.FindUniqueAuthenticationSchema = (0, schema_utils_1.withOutputSchema)(zod_1.z
|
|
10
|
-
.object({
|
|
11
|
-
appKey: properties_1.AppKeyPropertySchema.optional().describe("App slug to get authentications for (e.g., 'slack', 'github')"),
|
|
12
|
-
search: zod_1.z
|
|
13
|
-
.string()
|
|
14
|
-
.optional()
|
|
15
|
-
.describe("Search term to filter authentications by title"),
|
|
16
|
-
title: zod_1.z
|
|
17
|
-
.string()
|
|
18
|
-
.optional()
|
|
19
|
-
.describe("Filter authentications by exact title match"),
|
|
20
|
-
account_id: zod_1.z.string().optional().describe("Filter by account ID"),
|
|
21
|
-
owner: zod_1.z.string().optional().describe("Filter by owner"),
|
|
22
|
-
limit: properties_1.LimitPropertySchema.optional().describe("Maximum number of items to return (1-200)"),
|
|
23
|
-
offset: properties_1.OffsetPropertySchema.optional().describe("Number of items to skip for pagination"),
|
|
24
|
-
})
|
|
25
|
-
.describe("Find a unique authentication matching the criteria"), Auth_1.AuthItemSchema);
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { GenerateTypesOptions } from "./schemas";
|
|
2
|
-
/**
|
|
3
|
-
* Generate TypeScript types for a specific app
|
|
4
|
-
*
|
|
5
|
-
* This function can be used standalone without instantiating a full SDK,
|
|
6
|
-
* which enables better tree-shaking in applications that only need this functionality.
|
|
7
|
-
*
|
|
8
|
-
* @param options - App key, authentication ID, output path, and API configuration options
|
|
9
|
-
* @returns Promise<string> - Generated TypeScript code
|
|
10
|
-
*/
|
|
11
|
-
export declare function generateTypes(options: GenerateTypesOptions): Promise<string>;
|