@zapier/zapier-sdk 0.0.1 → 0.0.2
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-sdk.d.ts +51 -0
- package/dist/actions-sdk.js +1194 -0
- package/dist/index.d.ts +3 -3
- package/dist/index.js +5 -5
- package/dist/output-schemas.d.ts +95 -0
- package/dist/output-schemas.js +138 -0
- package/dist/schemas.d.ts +338 -0
- package/dist/schemas.js +336 -0
- package/dist/sdk.d.ts +5 -5
- package/dist/sdk.js +8 -8
- package/dist/types.d.ts +184 -0
- package/dist/types.js +41 -0
- package/package.json +5 -3
- package/src/actions-sdk.ts +1685 -0
- package/src/index.ts +4 -4
- package/src/output-schemas.ts +196 -0
- package/src/schemas.ts +467 -0
- package/src/sdk.ts +13 -13
- package/src/types.ts +244 -0
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from "
|
|
2
|
-
export * from "
|
|
3
|
-
export {
|
|
1
|
+
export * from "./types";
|
|
2
|
+
export * from "./actions-sdk";
|
|
3
|
+
export { createZapierSdk, ZapierSdk, ZapierSdkOptions } from "./sdk";
|
package/dist/index.js
CHANGED
|
@@ -14,10 +14,10 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.
|
|
18
|
-
// Export everything from
|
|
19
|
-
__exportStar(require("
|
|
20
|
-
__exportStar(require("
|
|
17
|
+
exports.createZapierSdk = void 0;
|
|
18
|
+
// Export everything from types and actions-sdk
|
|
19
|
+
__exportStar(require("./types"), exports);
|
|
20
|
+
__exportStar(require("./actions-sdk"), exports);
|
|
21
21
|
// Export the main combined SDK
|
|
22
22
|
var sdk_1 = require("./sdk");
|
|
23
|
-
Object.defineProperty(exports, "
|
|
23
|
+
Object.defineProperty(exports, "createZapierSdk", { enumerable: true, get: function () { return sdk_1.createZapierSdk; } });
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export interface FormattedItem {
|
|
3
|
+
title: string;
|
|
4
|
+
subtitle?: string;
|
|
5
|
+
details: Array<{
|
|
6
|
+
text: string;
|
|
7
|
+
style: "normal" | "dim" | "accent" | "warning" | "success";
|
|
8
|
+
}>;
|
|
9
|
+
}
|
|
10
|
+
export interface FormatMetadata {
|
|
11
|
+
format: (item: any) => FormattedItem;
|
|
12
|
+
}
|
|
13
|
+
export declare function withOutputSchema<T extends z.ZodType>(inputSchema: T, outputSchema: z.ZodType): T;
|
|
14
|
+
export declare function getFormatMetadata(schema: z.ZodType): FormatMetadata | undefined;
|
|
15
|
+
export declare function getOutputSchema(inputSchema: z.ZodType): z.ZodType | undefined;
|
|
16
|
+
export declare const AppItemSchema: z.ZodObject<{
|
|
17
|
+
key: z.ZodString;
|
|
18
|
+
name: z.ZodOptional<z.ZodString>;
|
|
19
|
+
description: z.ZodOptional<z.ZodString>;
|
|
20
|
+
category: z.ZodOptional<z.ZodString>;
|
|
21
|
+
}, "strip", z.ZodTypeAny, {
|
|
22
|
+
key: string;
|
|
23
|
+
name?: string | undefined;
|
|
24
|
+
description?: string | undefined;
|
|
25
|
+
category?: string | undefined;
|
|
26
|
+
}, {
|
|
27
|
+
key: string;
|
|
28
|
+
name?: string | undefined;
|
|
29
|
+
description?: string | undefined;
|
|
30
|
+
category?: string | undefined;
|
|
31
|
+
}>;
|
|
32
|
+
export declare const ActionItemSchema: z.ZodObject<{
|
|
33
|
+
key: z.ZodString;
|
|
34
|
+
name: z.ZodOptional<z.ZodString>;
|
|
35
|
+
type: z.ZodString;
|
|
36
|
+
appKey: z.ZodOptional<z.ZodString>;
|
|
37
|
+
description: z.ZodOptional<z.ZodString>;
|
|
38
|
+
}, "strip", z.ZodTypeAny, {
|
|
39
|
+
type: string;
|
|
40
|
+
key: string;
|
|
41
|
+
name?: string | undefined;
|
|
42
|
+
description?: string | undefined;
|
|
43
|
+
appKey?: string | undefined;
|
|
44
|
+
}, {
|
|
45
|
+
type: string;
|
|
46
|
+
key: string;
|
|
47
|
+
name?: string | undefined;
|
|
48
|
+
description?: string | undefined;
|
|
49
|
+
appKey?: string | undefined;
|
|
50
|
+
}>;
|
|
51
|
+
export declare const AuthItemSchema: z.ZodObject<{
|
|
52
|
+
id: z.ZodNumber;
|
|
53
|
+
title: z.ZodOptional<z.ZodString>;
|
|
54
|
+
label: z.ZodOptional<z.ZodString>;
|
|
55
|
+
identifier: z.ZodOptional<z.ZodString>;
|
|
56
|
+
account_id: z.ZodOptional<z.ZodString>;
|
|
57
|
+
is_private: z.ZodOptional<z.ZodBoolean>;
|
|
58
|
+
shared_with_all: z.ZodOptional<z.ZodBoolean>;
|
|
59
|
+
marked_stale_at: z.ZodOptional<z.ZodString>;
|
|
60
|
+
}, "strip", z.ZodTypeAny, {
|
|
61
|
+
id: number;
|
|
62
|
+
title?: string | undefined;
|
|
63
|
+
label?: string | undefined;
|
|
64
|
+
identifier?: string | undefined;
|
|
65
|
+
account_id?: string | undefined;
|
|
66
|
+
is_private?: boolean | undefined;
|
|
67
|
+
shared_with_all?: boolean | undefined;
|
|
68
|
+
marked_stale_at?: string | undefined;
|
|
69
|
+
}, {
|
|
70
|
+
id: number;
|
|
71
|
+
title?: string | undefined;
|
|
72
|
+
label?: string | undefined;
|
|
73
|
+
identifier?: string | undefined;
|
|
74
|
+
account_id?: string | undefined;
|
|
75
|
+
is_private?: boolean | undefined;
|
|
76
|
+
shared_with_all?: boolean | undefined;
|
|
77
|
+
marked_stale_at?: string | undefined;
|
|
78
|
+
}>;
|
|
79
|
+
export declare const FieldItemSchema: z.ZodObject<{
|
|
80
|
+
key: z.ZodString;
|
|
81
|
+
name: z.ZodOptional<z.ZodString>;
|
|
82
|
+
description: z.ZodOptional<z.ZodString>;
|
|
83
|
+
}, "strip", z.ZodTypeAny, {
|
|
84
|
+
key: string;
|
|
85
|
+
name?: string | undefined;
|
|
86
|
+
description?: string | undefined;
|
|
87
|
+
}, {
|
|
88
|
+
key: string;
|
|
89
|
+
name?: string | undefined;
|
|
90
|
+
description?: string | undefined;
|
|
91
|
+
}>;
|
|
92
|
+
export type AppItem = z.infer<typeof AppItemSchema>;
|
|
93
|
+
export type ActionItem = z.infer<typeof ActionItemSchema>;
|
|
94
|
+
export type AuthItem = z.infer<typeof AuthItemSchema>;
|
|
95
|
+
export type FieldItem = z.infer<typeof FieldItemSchema>;
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FieldItemSchema = exports.AuthItemSchema = exports.ActionItemSchema = exports.AppItemSchema = void 0;
|
|
4
|
+
exports.withOutputSchema = withOutputSchema;
|
|
5
|
+
exports.getFormatMetadata = getFormatMetadata;
|
|
6
|
+
exports.getOutputSchema = getOutputSchema;
|
|
7
|
+
const zod_1 = require("zod");
|
|
8
|
+
// ============================================================================
|
|
9
|
+
// Schema Enhancement Helpers
|
|
10
|
+
// ============================================================================
|
|
11
|
+
// Helper function to add format metadata to schemas
|
|
12
|
+
function withFormatter(schema, formatMeta) {
|
|
13
|
+
// Store format metadata on the schema definition
|
|
14
|
+
schema._def.formatMeta = formatMeta;
|
|
15
|
+
return schema;
|
|
16
|
+
}
|
|
17
|
+
// Helper function to link input schemas to output schemas
|
|
18
|
+
function withOutputSchema(inputSchema, outputSchema) {
|
|
19
|
+
// Store output schema reference on the input schema
|
|
20
|
+
inputSchema._def.outputSchema = outputSchema;
|
|
21
|
+
return inputSchema;
|
|
22
|
+
}
|
|
23
|
+
// Helper function to get format metadata from a schema
|
|
24
|
+
function getFormatMetadata(schema) {
|
|
25
|
+
return schema._def.formatMeta;
|
|
26
|
+
}
|
|
27
|
+
// Helper function to get output schema from an input schema
|
|
28
|
+
function getOutputSchema(inputSchema) {
|
|
29
|
+
return inputSchema._def.outputSchema;
|
|
30
|
+
}
|
|
31
|
+
// ============================================================================
|
|
32
|
+
// Output Item Schemas
|
|
33
|
+
// ============================================================================
|
|
34
|
+
exports.AppItemSchema = withFormatter(zod_1.z.object({
|
|
35
|
+
key: zod_1.z.string(),
|
|
36
|
+
name: zod_1.z.string().optional(),
|
|
37
|
+
description: zod_1.z.string().optional(),
|
|
38
|
+
category: zod_1.z.string().optional(),
|
|
39
|
+
}), {
|
|
40
|
+
format: (item) => {
|
|
41
|
+
const details = [];
|
|
42
|
+
if (item.description) {
|
|
43
|
+
details.push({ text: item.description, style: "dim" });
|
|
44
|
+
}
|
|
45
|
+
if (item.category) {
|
|
46
|
+
details.push({
|
|
47
|
+
text: `Category: ${item.category}`,
|
|
48
|
+
style: "accent",
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
return {
|
|
52
|
+
title: item.name || item.key,
|
|
53
|
+
subtitle: `(${item.key})`,
|
|
54
|
+
details,
|
|
55
|
+
};
|
|
56
|
+
},
|
|
57
|
+
});
|
|
58
|
+
exports.ActionItemSchema = withFormatter(zod_1.z.object({
|
|
59
|
+
key: zod_1.z.string(),
|
|
60
|
+
name: zod_1.z.string().optional(),
|
|
61
|
+
type: zod_1.z.string(),
|
|
62
|
+
appKey: zod_1.z.string().optional(),
|
|
63
|
+
description: zod_1.z.string().optional(),
|
|
64
|
+
}), {
|
|
65
|
+
format: (item) => {
|
|
66
|
+
const details = [];
|
|
67
|
+
details.push({ text: `Type: ${item.type}`, style: "accent" });
|
|
68
|
+
if (item.appKey) {
|
|
69
|
+
details.push({ text: `App: ${item.appKey}`, style: "normal" });
|
|
70
|
+
}
|
|
71
|
+
if (item.description) {
|
|
72
|
+
details.push({ text: item.description, style: "dim" });
|
|
73
|
+
}
|
|
74
|
+
return {
|
|
75
|
+
title: item.name || item.key,
|
|
76
|
+
subtitle: `(${item.key})`,
|
|
77
|
+
details,
|
|
78
|
+
};
|
|
79
|
+
},
|
|
80
|
+
});
|
|
81
|
+
exports.AuthItemSchema = withFormatter(zod_1.z.object({
|
|
82
|
+
id: zod_1.z.number(),
|
|
83
|
+
title: zod_1.z.string().optional(),
|
|
84
|
+
label: zod_1.z.string().optional(),
|
|
85
|
+
identifier: zod_1.z.string().optional(),
|
|
86
|
+
account_id: zod_1.z.string().optional(),
|
|
87
|
+
is_private: zod_1.z.boolean().optional(),
|
|
88
|
+
shared_with_all: zod_1.z.boolean().optional(),
|
|
89
|
+
marked_stale_at: zod_1.z.string().optional(),
|
|
90
|
+
}), {
|
|
91
|
+
format: (item) => {
|
|
92
|
+
const details = [];
|
|
93
|
+
if (item.identifier) {
|
|
94
|
+
details.push({
|
|
95
|
+
text: `Identifier: ${item.identifier}`,
|
|
96
|
+
style: "accent",
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
if (item.label && item.title && item.label !== item.title) {
|
|
100
|
+
details.push({
|
|
101
|
+
text: `Label: ${item.label}`,
|
|
102
|
+
style: "normal",
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
details.push({
|
|
106
|
+
text: `Account: ${item.account_id || "unknown"} | Private: ${item.is_private || false} | Shared: ${item.shared_with_all || false}`,
|
|
107
|
+
style: "dim",
|
|
108
|
+
});
|
|
109
|
+
if (item.marked_stale_at) {
|
|
110
|
+
details.push({
|
|
111
|
+
text: `⚠️ Marked stale: ${new Date(item.marked_stale_at).toLocaleDateString()}`,
|
|
112
|
+
style: "warning",
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
return {
|
|
116
|
+
title: item.title || item.label || `Authentication ${item.id}`,
|
|
117
|
+
subtitle: `(ID: ${item.id})`,
|
|
118
|
+
details,
|
|
119
|
+
};
|
|
120
|
+
},
|
|
121
|
+
});
|
|
122
|
+
exports.FieldItemSchema = withFormatter(zod_1.z.object({
|
|
123
|
+
key: zod_1.z.string(),
|
|
124
|
+
name: zod_1.z.string().optional(),
|
|
125
|
+
description: zod_1.z.string().optional(),
|
|
126
|
+
}), {
|
|
127
|
+
format: (item) => {
|
|
128
|
+
const details = [];
|
|
129
|
+
if (item.description) {
|
|
130
|
+
details.push({ text: item.description, style: "dim" });
|
|
131
|
+
}
|
|
132
|
+
return {
|
|
133
|
+
title: item.name || item.key,
|
|
134
|
+
subtitle: `(${item.key})`,
|
|
135
|
+
details,
|
|
136
|
+
};
|
|
137
|
+
},
|
|
138
|
+
});
|
|
@@ -0,0 +1,338 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export interface StaticResolver {
|
|
3
|
+
type: "static";
|
|
4
|
+
inputType?: "input" | "password" | "editor";
|
|
5
|
+
placeholder?: string;
|
|
6
|
+
}
|
|
7
|
+
export interface DynamicResolver {
|
|
8
|
+
type: "dynamic";
|
|
9
|
+
fetch: (sdk: any, resolvedParams: any) => Promise<any[]>;
|
|
10
|
+
prompt: (items: any[], params: any) => any;
|
|
11
|
+
depends?: string[];
|
|
12
|
+
}
|
|
13
|
+
export interface FieldsResolver {
|
|
14
|
+
type: "fields";
|
|
15
|
+
fetch: (sdk: any, resolvedParams: any) => Promise<any[]>;
|
|
16
|
+
depends?: string[];
|
|
17
|
+
}
|
|
18
|
+
export interface ResolverMetadata {
|
|
19
|
+
resolver?: StaticResolver | DynamicResolver | FieldsResolver;
|
|
20
|
+
}
|
|
21
|
+
export declare const AppsListSchema: z.ZodObject<{
|
|
22
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
23
|
+
offset: z.ZodOptional<z.ZodNumber>;
|
|
24
|
+
category: z.ZodOptional<z.ZodString>;
|
|
25
|
+
}, "strip", z.ZodTypeAny, {
|
|
26
|
+
category?: string | undefined;
|
|
27
|
+
limit?: number | undefined;
|
|
28
|
+
offset?: number | undefined;
|
|
29
|
+
}, {
|
|
30
|
+
category?: string | undefined;
|
|
31
|
+
limit?: number | undefined;
|
|
32
|
+
offset?: number | undefined;
|
|
33
|
+
}>;
|
|
34
|
+
export declare const AppsGetSchema: z.ZodObject<{
|
|
35
|
+
key: z.ZodString;
|
|
36
|
+
}, "strip", z.ZodTypeAny, {
|
|
37
|
+
key: string;
|
|
38
|
+
}, {
|
|
39
|
+
key: string;
|
|
40
|
+
}>;
|
|
41
|
+
export declare const FieldsListSchema: z.ZodObject<{
|
|
42
|
+
app: z.ZodString;
|
|
43
|
+
type: z.ZodEnum<["read", "write", "search", "create", "update", "delete"]>;
|
|
44
|
+
action: z.ZodString;
|
|
45
|
+
authId: z.ZodOptional<z.ZodNumber>;
|
|
46
|
+
params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
47
|
+
}, "strip", z.ZodTypeAny, {
|
|
48
|
+
action: string;
|
|
49
|
+
type: "create" | "update" | "search" | "delete" | "read" | "write";
|
|
50
|
+
app: string;
|
|
51
|
+
params?: Record<string, any> | undefined;
|
|
52
|
+
authId?: number | undefined;
|
|
53
|
+
}, {
|
|
54
|
+
action: string;
|
|
55
|
+
type: "create" | "update" | "search" | "delete" | "read" | "write";
|
|
56
|
+
app: string;
|
|
57
|
+
params?: Record<string, any> | undefined;
|
|
58
|
+
authId?: number | undefined;
|
|
59
|
+
}>;
|
|
60
|
+
export declare const ActionsListSchema: z.ZodObject<{
|
|
61
|
+
appKey: z.ZodString;
|
|
62
|
+
type: z.ZodOptional<z.ZodEnum<["read", "write", "search", "create", "update", "delete"]>>;
|
|
63
|
+
}, "strip", z.ZodTypeAny, {
|
|
64
|
+
appKey: string;
|
|
65
|
+
type?: "create" | "update" | "search" | "delete" | "read" | "write" | undefined;
|
|
66
|
+
}, {
|
|
67
|
+
appKey: string;
|
|
68
|
+
type?: "create" | "update" | "search" | "delete" | "read" | "write" | undefined;
|
|
69
|
+
}>;
|
|
70
|
+
export declare const ActionsGetSchema: z.ZodObject<{
|
|
71
|
+
app: z.ZodString;
|
|
72
|
+
type: z.ZodEnum<["read", "write", "search", "create", "update", "delete"]>;
|
|
73
|
+
action: z.ZodString;
|
|
74
|
+
}, "strip", z.ZodTypeAny, {
|
|
75
|
+
action: string;
|
|
76
|
+
type: "create" | "update" | "search" | "delete" | "read" | "write";
|
|
77
|
+
app: string;
|
|
78
|
+
}, {
|
|
79
|
+
action: string;
|
|
80
|
+
type: "create" | "update" | "search" | "delete" | "read" | "write";
|
|
81
|
+
app: string;
|
|
82
|
+
}>;
|
|
83
|
+
export declare const ActionsRunSchema: z.ZodObject<{
|
|
84
|
+
app: z.ZodString;
|
|
85
|
+
type: z.ZodEnum<["read", "write", "search", "create", "update", "delete"]>;
|
|
86
|
+
action: z.ZodString;
|
|
87
|
+
inputs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
88
|
+
authId: z.ZodOptional<z.ZodNumber>;
|
|
89
|
+
}, "strip", z.ZodTypeAny, {
|
|
90
|
+
action: string;
|
|
91
|
+
type: "create" | "update" | "search" | "delete" | "read" | "write";
|
|
92
|
+
app: string;
|
|
93
|
+
authId?: number | undefined;
|
|
94
|
+
inputs?: Record<string, any> | undefined;
|
|
95
|
+
}, {
|
|
96
|
+
action: string;
|
|
97
|
+
type: "create" | "update" | "search" | "delete" | "read" | "write";
|
|
98
|
+
app: string;
|
|
99
|
+
authId?: number | undefined;
|
|
100
|
+
inputs?: Record<string, any> | undefined;
|
|
101
|
+
}>;
|
|
102
|
+
export declare const AuthsListSchema: z.ZodObject<{
|
|
103
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
104
|
+
offset: z.ZodOptional<z.ZodNumber>;
|
|
105
|
+
appKey: z.ZodString;
|
|
106
|
+
account_id: z.ZodOptional<z.ZodString>;
|
|
107
|
+
owner: z.ZodOptional<z.ZodString>;
|
|
108
|
+
}, "strip", z.ZodTypeAny, {
|
|
109
|
+
appKey: string;
|
|
110
|
+
account_id?: string | undefined;
|
|
111
|
+
limit?: number | undefined;
|
|
112
|
+
offset?: number | undefined;
|
|
113
|
+
owner?: string | undefined;
|
|
114
|
+
}, {
|
|
115
|
+
appKey: string;
|
|
116
|
+
account_id?: string | undefined;
|
|
117
|
+
limit?: number | undefined;
|
|
118
|
+
offset?: number | undefined;
|
|
119
|
+
owner?: string | undefined;
|
|
120
|
+
}>;
|
|
121
|
+
export declare const AuthsFindSchema: z.ZodObject<{
|
|
122
|
+
appKey: z.ZodString;
|
|
123
|
+
}, "strip", z.ZodTypeAny, {
|
|
124
|
+
appKey: string;
|
|
125
|
+
}, {
|
|
126
|
+
appKey: string;
|
|
127
|
+
}>;
|
|
128
|
+
export declare const GenerateSchema: z.ZodObject<{
|
|
129
|
+
appKey: z.ZodString;
|
|
130
|
+
token: z.ZodOptional<z.ZodString>;
|
|
131
|
+
authId: z.ZodOptional<z.ZodNumber>;
|
|
132
|
+
output: z.ZodOptional<z.ZodString>;
|
|
133
|
+
debug: z.ZodDefault<z.ZodBoolean>;
|
|
134
|
+
}, "strip", z.ZodTypeAny, {
|
|
135
|
+
appKey: string;
|
|
136
|
+
debug: boolean;
|
|
137
|
+
authId?: number | undefined;
|
|
138
|
+
token?: string | undefined;
|
|
139
|
+
output?: string | undefined;
|
|
140
|
+
}, {
|
|
141
|
+
appKey: string;
|
|
142
|
+
authId?: number | undefined;
|
|
143
|
+
token?: string | undefined;
|
|
144
|
+
output?: string | undefined;
|
|
145
|
+
debug?: boolean | undefined;
|
|
146
|
+
}>;
|
|
147
|
+
export declare const BundleSchema: z.ZodObject<{
|
|
148
|
+
input: z.ZodString;
|
|
149
|
+
output: z.ZodOptional<z.ZodString>;
|
|
150
|
+
string: z.ZodDefault<z.ZodBoolean>;
|
|
151
|
+
minify: z.ZodDefault<z.ZodBoolean>;
|
|
152
|
+
target: z.ZodDefault<z.ZodString>;
|
|
153
|
+
cjs: z.ZodDefault<z.ZodBoolean>;
|
|
154
|
+
}, "strip", z.ZodTypeAny, {
|
|
155
|
+
string: boolean;
|
|
156
|
+
input: string;
|
|
157
|
+
minify: boolean;
|
|
158
|
+
target: string;
|
|
159
|
+
cjs: boolean;
|
|
160
|
+
output?: string | undefined;
|
|
161
|
+
}, {
|
|
162
|
+
input: string;
|
|
163
|
+
string?: boolean | undefined;
|
|
164
|
+
output?: string | undefined;
|
|
165
|
+
minify?: boolean | undefined;
|
|
166
|
+
target?: string | undefined;
|
|
167
|
+
cjs?: boolean | undefined;
|
|
168
|
+
}>;
|
|
169
|
+
export declare const SdkSchemas: {
|
|
170
|
+
readonly apps: {
|
|
171
|
+
readonly list: z.ZodObject<{
|
|
172
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
173
|
+
offset: z.ZodOptional<z.ZodNumber>;
|
|
174
|
+
category: z.ZodOptional<z.ZodString>;
|
|
175
|
+
}, "strip", z.ZodTypeAny, {
|
|
176
|
+
category?: string | undefined;
|
|
177
|
+
limit?: number | undefined;
|
|
178
|
+
offset?: number | undefined;
|
|
179
|
+
}, {
|
|
180
|
+
category?: string | undefined;
|
|
181
|
+
limit?: number | undefined;
|
|
182
|
+
offset?: number | undefined;
|
|
183
|
+
}>;
|
|
184
|
+
readonly get: z.ZodObject<{
|
|
185
|
+
key: z.ZodString;
|
|
186
|
+
}, "strip", z.ZodTypeAny, {
|
|
187
|
+
key: string;
|
|
188
|
+
}, {
|
|
189
|
+
key: string;
|
|
190
|
+
}>;
|
|
191
|
+
};
|
|
192
|
+
readonly actions: {
|
|
193
|
+
readonly list: z.ZodObject<{
|
|
194
|
+
appKey: z.ZodString;
|
|
195
|
+
type: z.ZodOptional<z.ZodEnum<["read", "write", "search", "create", "update", "delete"]>>;
|
|
196
|
+
}, "strip", z.ZodTypeAny, {
|
|
197
|
+
appKey: string;
|
|
198
|
+
type?: "create" | "update" | "search" | "delete" | "read" | "write" | undefined;
|
|
199
|
+
}, {
|
|
200
|
+
appKey: string;
|
|
201
|
+
type?: "create" | "update" | "search" | "delete" | "read" | "write" | undefined;
|
|
202
|
+
}>;
|
|
203
|
+
readonly get: z.ZodObject<{
|
|
204
|
+
app: z.ZodString;
|
|
205
|
+
type: z.ZodEnum<["read", "write", "search", "create", "update", "delete"]>;
|
|
206
|
+
action: z.ZodString;
|
|
207
|
+
}, "strip", z.ZodTypeAny, {
|
|
208
|
+
action: string;
|
|
209
|
+
type: "create" | "update" | "search" | "delete" | "read" | "write";
|
|
210
|
+
app: string;
|
|
211
|
+
}, {
|
|
212
|
+
action: string;
|
|
213
|
+
type: "create" | "update" | "search" | "delete" | "read" | "write";
|
|
214
|
+
app: string;
|
|
215
|
+
}>;
|
|
216
|
+
readonly run: z.ZodObject<{
|
|
217
|
+
app: z.ZodString;
|
|
218
|
+
type: z.ZodEnum<["read", "write", "search", "create", "update", "delete"]>;
|
|
219
|
+
action: z.ZodString;
|
|
220
|
+
inputs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
221
|
+
authId: z.ZodOptional<z.ZodNumber>;
|
|
222
|
+
}, "strip", z.ZodTypeAny, {
|
|
223
|
+
action: string;
|
|
224
|
+
type: "create" | "update" | "search" | "delete" | "read" | "write";
|
|
225
|
+
app: string;
|
|
226
|
+
authId?: number | undefined;
|
|
227
|
+
inputs?: Record<string, any> | undefined;
|
|
228
|
+
}, {
|
|
229
|
+
action: string;
|
|
230
|
+
type: "create" | "update" | "search" | "delete" | "read" | "write";
|
|
231
|
+
app: string;
|
|
232
|
+
authId?: number | undefined;
|
|
233
|
+
inputs?: Record<string, any> | undefined;
|
|
234
|
+
}>;
|
|
235
|
+
};
|
|
236
|
+
readonly auths: {
|
|
237
|
+
readonly list: z.ZodObject<{
|
|
238
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
239
|
+
offset: z.ZodOptional<z.ZodNumber>;
|
|
240
|
+
appKey: z.ZodString;
|
|
241
|
+
account_id: z.ZodOptional<z.ZodString>;
|
|
242
|
+
owner: z.ZodOptional<z.ZodString>;
|
|
243
|
+
}, "strip", z.ZodTypeAny, {
|
|
244
|
+
appKey: string;
|
|
245
|
+
account_id?: string | undefined;
|
|
246
|
+
limit?: number | undefined;
|
|
247
|
+
offset?: number | undefined;
|
|
248
|
+
owner?: string | undefined;
|
|
249
|
+
}, {
|
|
250
|
+
appKey: string;
|
|
251
|
+
account_id?: string | undefined;
|
|
252
|
+
limit?: number | undefined;
|
|
253
|
+
offset?: number | undefined;
|
|
254
|
+
owner?: string | undefined;
|
|
255
|
+
}>;
|
|
256
|
+
readonly find: z.ZodObject<{
|
|
257
|
+
appKey: z.ZodString;
|
|
258
|
+
}, "strip", z.ZodTypeAny, {
|
|
259
|
+
appKey: string;
|
|
260
|
+
}, {
|
|
261
|
+
appKey: string;
|
|
262
|
+
}>;
|
|
263
|
+
};
|
|
264
|
+
readonly fields: {
|
|
265
|
+
readonly list: z.ZodObject<{
|
|
266
|
+
app: z.ZodString;
|
|
267
|
+
type: z.ZodEnum<["read", "write", "search", "create", "update", "delete"]>;
|
|
268
|
+
action: z.ZodString;
|
|
269
|
+
authId: z.ZodOptional<z.ZodNumber>;
|
|
270
|
+
params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
271
|
+
}, "strip", z.ZodTypeAny, {
|
|
272
|
+
action: string;
|
|
273
|
+
type: "create" | "update" | "search" | "delete" | "read" | "write";
|
|
274
|
+
app: string;
|
|
275
|
+
params?: Record<string, any> | undefined;
|
|
276
|
+
authId?: number | undefined;
|
|
277
|
+
}, {
|
|
278
|
+
action: string;
|
|
279
|
+
type: "create" | "update" | "search" | "delete" | "read" | "write";
|
|
280
|
+
app: string;
|
|
281
|
+
params?: Record<string, any> | undefined;
|
|
282
|
+
authId?: number | undefined;
|
|
283
|
+
}>;
|
|
284
|
+
};
|
|
285
|
+
readonly generate: z.ZodObject<{
|
|
286
|
+
appKey: z.ZodString;
|
|
287
|
+
token: z.ZodOptional<z.ZodString>;
|
|
288
|
+
authId: z.ZodOptional<z.ZodNumber>;
|
|
289
|
+
output: z.ZodOptional<z.ZodString>;
|
|
290
|
+
debug: z.ZodDefault<z.ZodBoolean>;
|
|
291
|
+
}, "strip", z.ZodTypeAny, {
|
|
292
|
+
appKey: string;
|
|
293
|
+
debug: boolean;
|
|
294
|
+
authId?: number | undefined;
|
|
295
|
+
token?: string | undefined;
|
|
296
|
+
output?: string | undefined;
|
|
297
|
+
}, {
|
|
298
|
+
appKey: string;
|
|
299
|
+
authId?: number | undefined;
|
|
300
|
+
token?: string | undefined;
|
|
301
|
+
output?: string | undefined;
|
|
302
|
+
debug?: boolean | undefined;
|
|
303
|
+
}>;
|
|
304
|
+
readonly bundle: z.ZodObject<{
|
|
305
|
+
input: z.ZodString;
|
|
306
|
+
output: z.ZodOptional<z.ZodString>;
|
|
307
|
+
string: z.ZodDefault<z.ZodBoolean>;
|
|
308
|
+
minify: z.ZodDefault<z.ZodBoolean>;
|
|
309
|
+
target: z.ZodDefault<z.ZodString>;
|
|
310
|
+
cjs: z.ZodDefault<z.ZodBoolean>;
|
|
311
|
+
}, "strip", z.ZodTypeAny, {
|
|
312
|
+
string: boolean;
|
|
313
|
+
input: string;
|
|
314
|
+
minify: boolean;
|
|
315
|
+
target: string;
|
|
316
|
+
cjs: boolean;
|
|
317
|
+
output?: string | undefined;
|
|
318
|
+
}, {
|
|
319
|
+
input: string;
|
|
320
|
+
string?: boolean | undefined;
|
|
321
|
+
output?: string | undefined;
|
|
322
|
+
minify?: boolean | undefined;
|
|
323
|
+
target?: string | undefined;
|
|
324
|
+
cjs?: boolean | undefined;
|
|
325
|
+
}>;
|
|
326
|
+
};
|
|
327
|
+
export type AppsListOptions = z.infer<typeof AppsListSchema>;
|
|
328
|
+
export type AppsGetOptions = z.infer<typeof AppsGetSchema>;
|
|
329
|
+
export type ActionsListOptions = z.infer<typeof ActionsListSchema>;
|
|
330
|
+
export type ActionsGetOptions = z.infer<typeof ActionsGetSchema>;
|
|
331
|
+
export type ActionsRunOptions = z.infer<typeof ActionsRunSchema>;
|
|
332
|
+
export type AuthsListOptions = z.infer<typeof AuthsListSchema>;
|
|
333
|
+
export type AuthsFindOptions = z.infer<typeof AuthsFindSchema>;
|
|
334
|
+
export type FieldsListOptions = z.infer<typeof FieldsListSchema>;
|
|
335
|
+
export type GenerateOptions = z.infer<typeof GenerateSchema>;
|
|
336
|
+
export type BundleOptions = z.infer<typeof BundleSchema>;
|
|
337
|
+
export declare function getSchemaDescription(schema: z.ZodSchema): string | undefined;
|
|
338
|
+
export declare function getFieldDescriptions(schema: z.ZodObject<any>): Record<string, string>;
|