@zapier/zapier-sdk 0.12.1 → 0.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/README.md +137 -76
- package/dist/api/schemas.d.ts +10 -865
- package/dist/api/schemas.d.ts.map +1 -1
- package/dist/api/schemas.js +0 -6
- package/dist/index.cjs +42 -31
- package/dist/index.d.mts +69 -427
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.mjs +42 -31
- package/dist/plugins/apps/schemas.d.ts +9 -1
- package/dist/plugins/apps/schemas.d.ts.map +1 -1
- package/dist/plugins/findFirstAuthentication/schemas.js +1 -1
- package/dist/plugins/findUniqueAuthentication/schemas.js +1 -1
- package/dist/plugins/getApp/schemas.js +1 -1
- package/dist/plugins/getAuthentication/index.test.js +1 -1
- package/dist/plugins/listActions/index.d.ts +1 -0
- package/dist/plugins/listActions/index.d.ts.map +1 -1
- package/dist/plugins/listActions/schemas.d.ts +3 -0
- package/dist/plugins/listActions/schemas.d.ts.map +1 -1
- package/dist/plugins/listActions/schemas.js +2 -1
- package/dist/plugins/listApps/index.d.ts +1 -0
- package/dist/plugins/listApps/index.d.ts.map +1 -1
- package/dist/plugins/listApps/schemas.d.ts +3 -0
- package/dist/plugins/listApps/schemas.d.ts.map +1 -1
- package/dist/plugins/listApps/schemas.js +1 -0
- package/dist/plugins/listAuthentications/index.d.ts +1 -0
- package/dist/plugins/listAuthentications/index.d.ts.map +1 -1
- package/dist/plugins/listAuthentications/schemas.d.ts +3 -0
- package/dist/plugins/listAuthentications/schemas.d.ts.map +1 -1
- package/dist/plugins/listAuthentications/schemas.js +2 -1
- package/dist/plugins/listInputFieldChoices/index.d.ts +1 -0
- package/dist/plugins/listInputFieldChoices/index.d.ts.map +1 -1
- package/dist/plugins/listInputFieldChoices/schemas.d.ts +3 -0
- package/dist/plugins/listInputFieldChoices/schemas.d.ts.map +1 -1
- package/dist/plugins/listInputFieldChoices/schemas.js +1 -0
- package/dist/plugins/listInputFields/index.d.ts +1 -0
- package/dist/plugins/listInputFields/index.d.ts.map +1 -1
- package/dist/plugins/listInputFields/schemas.d.ts +3 -0
- package/dist/plugins/listInputFields/schemas.d.ts.map +1 -1
- package/dist/plugins/listInputFields/schemas.js +1 -0
- package/dist/plugins/runAction/index.d.ts +1 -0
- package/dist/plugins/runAction/index.d.ts.map +1 -1
- package/dist/plugins/runAction/schemas.d.ts +3 -0
- package/dist/plugins/runAction/schemas.d.ts.map +1 -1
- package/dist/plugins/runAction/schemas.js +1 -0
- package/dist/schemas/Action.d.ts +4 -206
- package/dist/schemas/Action.d.ts.map +1 -1
- package/dist/schemas/Action.js +3 -2
- package/dist/schemas/App.d.ts.map +1 -1
- package/dist/schemas/App.js +1 -0
- package/dist/schemas/Auth.d.ts +10 -10
- package/dist/schemas/Auth.js +1 -1
- package/dist/types/properties.d.ts.map +1 -1
- package/dist/types/properties.js +4 -1
- package/dist/utils/domain-utils.d.ts +2 -2
- package/dist/utils/domain-utils.d.ts.map +1 -1
- package/dist/utils/domain-utils.js +19 -8
- package/dist/utils/schema-utils.d.ts +1 -0
- package/dist/utils/schema-utils.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/api/schemas.ts +0 -6
- package/src/index.ts +1 -0
- package/src/plugins/apps/schemas.ts +7 -1
- package/src/plugins/findFirstAuthentication/schemas.ts +1 -1
- package/src/plugins/findUniqueAuthentication/schemas.ts +1 -1
- package/src/plugins/getApp/schemas.ts +1 -1
- package/src/plugins/getAuthentication/index.test.ts +1 -1
- package/src/plugins/listActions/index.ts +1 -0
- package/src/plugins/listActions/schemas.ts +2 -1
- package/src/plugins/listApps/index.ts +4 -1
- package/src/plugins/listApps/schemas.ts +1 -0
- package/src/plugins/listAuthentications/index.ts +1 -0
- package/src/plugins/listAuthentications/schemas.ts +2 -1
- package/src/plugins/listInputFieldChoices/index.ts +1 -0
- package/src/plugins/listInputFieldChoices/schemas.ts +1 -0
- package/src/plugins/listInputFields/index.ts +1 -0
- package/src/plugins/listInputFields/schemas.ts +1 -0
- package/src/plugins/runAction/index.ts +4 -1
- package/src/plugins/runAction/schemas.ts +1 -0
- package/src/schemas/Action.ts +3 -2
- package/src/schemas/App.ts +1 -0
- package/src/schemas/Auth.ts +1 -1
- package/src/types/properties.ts +4 -1
- package/src/utils/domain-utils.ts +22 -9
- package/src/utils/schema-utils.ts +1 -0
- package/tsconfig.tsbuildinfo +1 -1
|
@@ -11,6 +11,7 @@ export declare const RunActionSchema: z.ZodObject<{
|
|
|
11
11
|
inputs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
12
12
|
pageSize: z.ZodOptional<z.ZodNumber>;
|
|
13
13
|
maxItems: z.ZodOptional<z.ZodNumber>;
|
|
14
|
+
cursor: z.ZodOptional<z.ZodString>;
|
|
14
15
|
}, "strip", z.ZodTypeAny, {
|
|
15
16
|
appKey: string;
|
|
16
17
|
actionType: "filter" | "read" | "read_bulk" | "write" | "run" | "search" | "search_or_write" | "search_and_write";
|
|
@@ -19,6 +20,7 @@ export declare const RunActionSchema: z.ZodObject<{
|
|
|
19
20
|
inputs?: Record<string, unknown> | undefined;
|
|
20
21
|
pageSize?: number | undefined;
|
|
21
22
|
maxItems?: number | undefined;
|
|
23
|
+
cursor?: string | undefined;
|
|
22
24
|
}, {
|
|
23
25
|
appKey: string;
|
|
24
26
|
actionType: "filter" | "read" | "read_bulk" | "write" | "run" | "search" | "search_or_write" | "search_and_write";
|
|
@@ -27,6 +29,7 @@ export declare const RunActionSchema: z.ZodObject<{
|
|
|
27
29
|
inputs?: Record<string, unknown> | undefined;
|
|
28
30
|
pageSize?: number | undefined;
|
|
29
31
|
maxItems?: number | undefined;
|
|
32
|
+
cursor?: string | undefined;
|
|
30
33
|
}>;
|
|
31
34
|
export type RunActionOptions = z.infer<typeof RunActionSchema>;
|
|
32
35
|
export interface RunActionPage {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../../src/plugins/runAction/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAQxB,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAClE,OAAO,KAAK,EACV,iBAAiB,EACjB,qBAAqB,EACrB,wBAAwB,EACxB,kBAAkB,EACnB,MAAM,oBAAoB,CAAC;AAG5B,eAAO,MAAM,eAAe
|
|
1
|
+
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../../src/plugins/runAction/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAQxB,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAClE,OAAO,KAAK,EACV,iBAAiB,EACjB,qBAAqB,EACrB,wBAAwB,EACxB,kBAAkB,EACnB,MAAM,oBAAoB,CAAC;AAG5B,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAqB0B,CAAC;AAGvD,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AAG/D,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,OAAO,EAAE,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAGD,MAAM,MAAM,cAAc,GACtB,iBAAiB,GACjB,qBAAqB,GACrB,wBAAwB,GACxB,kBAAkB,CAAC;AAGvB,MAAM,WAAW,oBAAoB;IACnC,SAAS,EAAE,oBAAoB,CAAC,gBAAgB,EAAE,OAAO,CAAC,CAAC;CAC5D"}
|
package/dist/schemas/Action.d.ts
CHANGED
|
@@ -4,133 +4,13 @@ export declare const ActionItemSchema: z.ZodObject<Omit<{
|
|
|
4
4
|
type: z.ZodEnum<["filter", "read", "read_bulk", "run", "search", "search_and_write", "search_or_write", "write"]>;
|
|
5
5
|
key: z.ZodString;
|
|
6
6
|
name: z.ZodString;
|
|
7
|
-
noun: z.ZodOptional<z.ZodString>;
|
|
8
7
|
description: z.ZodString;
|
|
9
|
-
description_html: z.ZodOptional<z.ZodString>;
|
|
10
8
|
is_important: z.ZodOptional<z.ZodBoolean>;
|
|
11
9
|
is_hidden: z.ZodOptional<z.ZodBoolean>;
|
|
12
|
-
needs: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
13
|
-
key: z.ZodString;
|
|
14
|
-
alters_custom_fields: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
15
|
-
capabilities: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
16
|
-
choices: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
17
|
-
key: z.ZodOptional<z.ZodString>;
|
|
18
|
-
label: z.ZodOptional<z.ZodString>;
|
|
19
|
-
sample: z.ZodOptional<z.ZodString>;
|
|
20
|
-
value: z.ZodOptional<z.ZodString>;
|
|
21
|
-
}, "strip", z.ZodTypeAny, {
|
|
22
|
-
value?: string | undefined;
|
|
23
|
-
key?: string | undefined;
|
|
24
|
-
label?: string | undefined;
|
|
25
|
-
sample?: string | undefined;
|
|
26
|
-
}, {
|
|
27
|
-
value?: string | undefined;
|
|
28
|
-
key?: string | undefined;
|
|
29
|
-
label?: string | undefined;
|
|
30
|
-
sample?: string | undefined;
|
|
31
|
-
}>, "many">>;
|
|
32
|
-
computed: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
33
|
-
custom_field: z.ZodOptional<z.ZodBoolean>;
|
|
34
|
-
default: z.ZodOptional<z.ZodString>;
|
|
35
|
-
depends_on: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
36
|
-
format: z.ZodOptional<z.ZodLiteral<"SELECT">>;
|
|
37
|
-
from_search: z.ZodOptional<z.ZodBoolean>;
|
|
38
|
-
from_write: z.ZodOptional<z.ZodBoolean>;
|
|
39
|
-
help_text: z.ZodOptional<z.ZodString>;
|
|
40
|
-
help_text_html: z.ZodOptional<z.ZodString>;
|
|
41
|
-
input_format: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
42
|
-
label: z.ZodOptional<z.ZodString>;
|
|
43
|
-
language: z.ZodOptional<z.ZodString>;
|
|
44
|
-
parent_key: z.ZodOptional<z.ZodString>;
|
|
45
|
-
placeholder: z.ZodOptional<z.ZodString>;
|
|
46
|
-
prefill: z.ZodOptional<z.ZodString>;
|
|
47
|
-
required: z.ZodOptional<z.ZodBoolean>;
|
|
48
|
-
searchfill: z.ZodOptional<z.ZodString>;
|
|
49
|
-
send_in_json: z.ZodOptional<z.ZodBoolean>;
|
|
50
|
-
regex: z.ZodOptional<z.ZodString>;
|
|
51
|
-
type: z.ZodOptional<z.ZodEnum<["integer", "string", "text", "datetime", "boolean", "file", "decimal", "copy", "password", "dict", "code", "filter", "json"]>>;
|
|
52
|
-
list: z.ZodOptional<z.ZodBoolean>;
|
|
53
|
-
}, "strip", z.ZodTypeAny, {
|
|
54
|
-
key: string;
|
|
55
|
-
default?: string | undefined;
|
|
56
|
-
type?: "string" | "boolean" | "filter" | "code" | "integer" | "text" | "datetime" | "file" | "decimal" | "copy" | "password" | "dict" | "json" | undefined;
|
|
57
|
-
label?: string | undefined;
|
|
58
|
-
alters_custom_fields?: boolean | null | undefined;
|
|
59
|
-
capabilities?: string[] | undefined;
|
|
60
|
-
choices?: {
|
|
61
|
-
value?: string | undefined;
|
|
62
|
-
key?: string | undefined;
|
|
63
|
-
label?: string | undefined;
|
|
64
|
-
sample?: string | undefined;
|
|
65
|
-
}[] | undefined;
|
|
66
|
-
computed?: boolean | null | undefined;
|
|
67
|
-
custom_field?: boolean | undefined;
|
|
68
|
-
depends_on?: string[] | undefined;
|
|
69
|
-
format?: "SELECT" | undefined;
|
|
70
|
-
from_search?: boolean | undefined;
|
|
71
|
-
from_write?: boolean | undefined;
|
|
72
|
-
help_text?: string | undefined;
|
|
73
|
-
help_text_html?: string | undefined;
|
|
74
|
-
input_format?: string[] | undefined;
|
|
75
|
-
language?: string | undefined;
|
|
76
|
-
parent_key?: string | undefined;
|
|
77
|
-
placeholder?: string | undefined;
|
|
78
|
-
prefill?: string | undefined;
|
|
79
|
-
required?: boolean | undefined;
|
|
80
|
-
searchfill?: string | undefined;
|
|
81
|
-
send_in_json?: boolean | undefined;
|
|
82
|
-
regex?: string | undefined;
|
|
83
|
-
list?: boolean | undefined;
|
|
84
|
-
}, {
|
|
85
|
-
key: string;
|
|
86
|
-
default?: string | undefined;
|
|
87
|
-
type?: "string" | "boolean" | "filter" | "code" | "integer" | "text" | "datetime" | "file" | "decimal" | "copy" | "password" | "dict" | "json" | undefined;
|
|
88
|
-
label?: string | undefined;
|
|
89
|
-
alters_custom_fields?: boolean | null | undefined;
|
|
90
|
-
capabilities?: string[] | undefined;
|
|
91
|
-
choices?: {
|
|
92
|
-
value?: string | undefined;
|
|
93
|
-
key?: string | undefined;
|
|
94
|
-
label?: string | undefined;
|
|
95
|
-
sample?: string | undefined;
|
|
96
|
-
}[] | undefined;
|
|
97
|
-
computed?: boolean | null | undefined;
|
|
98
|
-
custom_field?: boolean | undefined;
|
|
99
|
-
depends_on?: string[] | undefined;
|
|
100
|
-
format?: "SELECT" | undefined;
|
|
101
|
-
from_search?: boolean | undefined;
|
|
102
|
-
from_write?: boolean | undefined;
|
|
103
|
-
help_text?: string | undefined;
|
|
104
|
-
help_text_html?: string | undefined;
|
|
105
|
-
input_format?: string[] | undefined;
|
|
106
|
-
language?: string | undefined;
|
|
107
|
-
parent_key?: string | undefined;
|
|
108
|
-
placeholder?: string | undefined;
|
|
109
|
-
prefill?: string | undefined;
|
|
110
|
-
required?: boolean | undefined;
|
|
111
|
-
searchfill?: string | undefined;
|
|
112
|
-
send_in_json?: boolean | undefined;
|
|
113
|
-
regex?: string | undefined;
|
|
114
|
-
list?: boolean | undefined;
|
|
115
|
-
}>, "many">>;
|
|
116
|
-
meta: z.ZodOptional<z.ZodString>;
|
|
117
10
|
selected_api: z.ZodOptional<z.ZodString>;
|
|
118
|
-
|
|
119
|
-
action_url: z.ZodOptional<z.ZodString>;
|
|
120
|
-
}, "strip", z.ZodTypeAny, {
|
|
121
|
-
action_url?: string | undefined;
|
|
122
|
-
}, {
|
|
123
|
-
action_url?: string | undefined;
|
|
124
|
-
}>>;
|
|
125
|
-
permissions: z.ZodOptional<z.ZodObject<{
|
|
126
|
-
can_use: z.ZodOptional<z.ZodBoolean>;
|
|
127
|
-
}, "strip", z.ZodTypeAny, {
|
|
128
|
-
can_use?: boolean | undefined;
|
|
129
|
-
}, {
|
|
130
|
-
can_use?: boolean | undefined;
|
|
131
|
-
}>>;
|
|
132
|
-
}, "type" | "name"> & {
|
|
11
|
+
}, "type" | "name" | "selected_api"> & {
|
|
133
12
|
app_key: z.ZodString;
|
|
13
|
+
app_version: z.ZodOptional<z.ZodString>;
|
|
134
14
|
action_type: z.ZodEnum<["filter", "read", "read_bulk", "run", "search", "search_and_write", "search_or_write", "write"]>;
|
|
135
15
|
title: z.ZodString;
|
|
136
16
|
type: z.ZodLiteral<"action">;
|
|
@@ -142,50 +22,9 @@ export declare const ActionItemSchema: z.ZodObject<Omit<{
|
|
|
142
22
|
app_key: string;
|
|
143
23
|
action_type: "filter" | "read" | "read_bulk" | "write" | "run" | "search" | "search_or_write" | "search_and_write";
|
|
144
24
|
id?: string | undefined;
|
|
145
|
-
noun?: string | undefined;
|
|
146
|
-
description_html?: string | undefined;
|
|
147
25
|
is_important?: boolean | undefined;
|
|
148
26
|
is_hidden?: boolean | undefined;
|
|
149
|
-
|
|
150
|
-
key: string;
|
|
151
|
-
default?: string | undefined;
|
|
152
|
-
type?: "string" | "boolean" | "filter" | "code" | "integer" | "text" | "datetime" | "file" | "decimal" | "copy" | "password" | "dict" | "json" | undefined;
|
|
153
|
-
label?: string | undefined;
|
|
154
|
-
alters_custom_fields?: boolean | null | undefined;
|
|
155
|
-
capabilities?: string[] | undefined;
|
|
156
|
-
choices?: {
|
|
157
|
-
value?: string | undefined;
|
|
158
|
-
key?: string | undefined;
|
|
159
|
-
label?: string | undefined;
|
|
160
|
-
sample?: string | undefined;
|
|
161
|
-
}[] | undefined;
|
|
162
|
-
computed?: boolean | null | undefined;
|
|
163
|
-
custom_field?: boolean | undefined;
|
|
164
|
-
depends_on?: string[] | undefined;
|
|
165
|
-
format?: "SELECT" | undefined;
|
|
166
|
-
from_search?: boolean | undefined;
|
|
167
|
-
from_write?: boolean | undefined;
|
|
168
|
-
help_text?: string | undefined;
|
|
169
|
-
help_text_html?: string | undefined;
|
|
170
|
-
input_format?: string[] | undefined;
|
|
171
|
-
language?: string | undefined;
|
|
172
|
-
parent_key?: string | undefined;
|
|
173
|
-
placeholder?: string | undefined;
|
|
174
|
-
prefill?: string | undefined;
|
|
175
|
-
required?: boolean | undefined;
|
|
176
|
-
searchfill?: string | undefined;
|
|
177
|
-
send_in_json?: boolean | undefined;
|
|
178
|
-
regex?: string | undefined;
|
|
179
|
-
list?: boolean | undefined;
|
|
180
|
-
}[] | undefined;
|
|
181
|
-
meta?: string | undefined;
|
|
182
|
-
selected_api?: string | undefined;
|
|
183
|
-
links?: {
|
|
184
|
-
action_url?: string | undefined;
|
|
185
|
-
} | undefined;
|
|
186
|
-
permissions?: {
|
|
187
|
-
can_use?: boolean | undefined;
|
|
188
|
-
} | undefined;
|
|
27
|
+
app_version?: string | undefined;
|
|
189
28
|
}, {
|
|
190
29
|
type: "action";
|
|
191
30
|
key: string;
|
|
@@ -194,50 +33,9 @@ export declare const ActionItemSchema: z.ZodObject<Omit<{
|
|
|
194
33
|
app_key: string;
|
|
195
34
|
action_type: "filter" | "read" | "read_bulk" | "write" | "run" | "search" | "search_or_write" | "search_and_write";
|
|
196
35
|
id?: string | undefined;
|
|
197
|
-
noun?: string | undefined;
|
|
198
|
-
description_html?: string | undefined;
|
|
199
36
|
is_important?: boolean | undefined;
|
|
200
37
|
is_hidden?: boolean | undefined;
|
|
201
|
-
|
|
202
|
-
key: string;
|
|
203
|
-
default?: string | undefined;
|
|
204
|
-
type?: "string" | "boolean" | "filter" | "code" | "integer" | "text" | "datetime" | "file" | "decimal" | "copy" | "password" | "dict" | "json" | undefined;
|
|
205
|
-
label?: string | undefined;
|
|
206
|
-
alters_custom_fields?: boolean | null | undefined;
|
|
207
|
-
capabilities?: string[] | undefined;
|
|
208
|
-
choices?: {
|
|
209
|
-
value?: string | undefined;
|
|
210
|
-
key?: string | undefined;
|
|
211
|
-
label?: string | undefined;
|
|
212
|
-
sample?: string | undefined;
|
|
213
|
-
}[] | undefined;
|
|
214
|
-
computed?: boolean | null | undefined;
|
|
215
|
-
custom_field?: boolean | undefined;
|
|
216
|
-
depends_on?: string[] | undefined;
|
|
217
|
-
format?: "SELECT" | undefined;
|
|
218
|
-
from_search?: boolean | undefined;
|
|
219
|
-
from_write?: boolean | undefined;
|
|
220
|
-
help_text?: string | undefined;
|
|
221
|
-
help_text_html?: string | undefined;
|
|
222
|
-
input_format?: string[] | undefined;
|
|
223
|
-
language?: string | undefined;
|
|
224
|
-
parent_key?: string | undefined;
|
|
225
|
-
placeholder?: string | undefined;
|
|
226
|
-
prefill?: string | undefined;
|
|
227
|
-
required?: boolean | undefined;
|
|
228
|
-
searchfill?: string | undefined;
|
|
229
|
-
send_in_json?: boolean | undefined;
|
|
230
|
-
regex?: string | undefined;
|
|
231
|
-
list?: boolean | undefined;
|
|
232
|
-
}[] | undefined;
|
|
233
|
-
meta?: string | undefined;
|
|
234
|
-
selected_api?: string | undefined;
|
|
235
|
-
links?: {
|
|
236
|
-
action_url?: string | undefined;
|
|
237
|
-
} | undefined;
|
|
238
|
-
permissions?: {
|
|
239
|
-
can_use?: boolean | undefined;
|
|
240
|
-
} | undefined;
|
|
38
|
+
app_version?: string | undefined;
|
|
241
39
|
}>;
|
|
242
40
|
export type ActionItem = z.infer<typeof ActionItemSchema>;
|
|
243
41
|
//# sourceMappingURL=Action.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Action.d.ts","sourceRoot":"","sources":["../../src/schemas/Action.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAQxB,eAAO,MAAM,gBAAgB
|
|
1
|
+
{"version":3,"file":"Action.d.ts","sourceRoot":"","sources":["../../src/schemas/Action.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAQxB,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAqC5B,CAAC;AAMF,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC"}
|
package/dist/schemas/Action.js
CHANGED
|
@@ -4,8 +4,9 @@ import { ActionSchema } from "../api/schemas";
|
|
|
4
4
|
// ============================================================================
|
|
5
5
|
// Action Item Schema (extends API schema with computed fields and formatting)
|
|
6
6
|
// ============================================================================
|
|
7
|
-
export const ActionItemSchema = withFormatter(ActionSchema.omit({ type: true, name: true }).extend({
|
|
8
|
-
app_key: z.string(), //
|
|
7
|
+
export const ActionItemSchema = withFormatter(ActionSchema.omit({ type: true, name: true, selected_api: true }).extend({
|
|
8
|
+
app_key: z.string(), // App key without version (extracted from selected_api)
|
|
9
|
+
app_version: z.string().optional(), // Version extracted from selected_api
|
|
9
10
|
action_type: ActionSchema.shape.type, // Mapped from original 'type' field
|
|
10
11
|
title: z.string(), // Mapped from original 'name' field
|
|
11
12
|
type: z.literal("action"), // Fixed type identifier
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"App.d.ts","sourceRoot":"","sources":["../../src/schemas/App.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAMtE,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"App.d.ts","sourceRoot":"","sources":["../../src/schemas/App.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAMtE,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAiBzB,CAAC;AAMF,MAAM,MAAM,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC"}
|
package/dist/schemas/App.js
CHANGED
package/dist/schemas/Auth.d.ts
CHANGED
|
@@ -25,7 +25,7 @@ export declare const AuthenticationItemSchema: z.ZodObject<Omit<{
|
|
|
25
25
|
is_expired: z.ZodOptional<z.ZodString>;
|
|
26
26
|
expired_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
27
27
|
app_key: z.ZodOptional<z.ZodString>;
|
|
28
|
-
|
|
28
|
+
app_version: z.ZodOptional<z.ZodString>;
|
|
29
29
|
user_id: z.ZodOptional<z.ZodNumber>;
|
|
30
30
|
}, "strip", z.ZodTypeAny, {
|
|
31
31
|
id: number;
|
|
@@ -36,7 +36,6 @@ export declare const AuthenticationItemSchema: z.ZodObject<Omit<{
|
|
|
36
36
|
shared_with_all: boolean;
|
|
37
37
|
url?: string | undefined;
|
|
38
38
|
label?: string | null | undefined;
|
|
39
|
-
permissions?: Record<string, boolean> | undefined;
|
|
40
39
|
lastchanged?: string | undefined;
|
|
41
40
|
destination_selected_api?: string | null | undefined;
|
|
42
41
|
is_stale?: string | undefined;
|
|
@@ -46,12 +45,13 @@ export declare const AuthenticationItemSchema: z.ZodObject<Omit<{
|
|
|
46
45
|
title?: string | null | undefined;
|
|
47
46
|
groups?: string | undefined;
|
|
48
47
|
members?: string | undefined;
|
|
48
|
+
permissions?: Record<string, boolean> | undefined;
|
|
49
49
|
user_id?: number | undefined;
|
|
50
|
-
version?: string | undefined;
|
|
51
50
|
implementation_id?: string | undefined;
|
|
52
51
|
is_expired?: string | undefined;
|
|
53
52
|
expired_at?: string | null | undefined;
|
|
54
53
|
app_key?: string | undefined;
|
|
54
|
+
app_version?: string | undefined;
|
|
55
55
|
}, {
|
|
56
56
|
id: number;
|
|
57
57
|
date: string;
|
|
@@ -61,7 +61,6 @@ export declare const AuthenticationItemSchema: z.ZodObject<Omit<{
|
|
|
61
61
|
shared_with_all: boolean;
|
|
62
62
|
url?: string | undefined;
|
|
63
63
|
label?: string | null | undefined;
|
|
64
|
-
permissions?: Record<string, boolean> | undefined;
|
|
65
64
|
lastchanged?: string | undefined;
|
|
66
65
|
destination_selected_api?: string | null | undefined;
|
|
67
66
|
is_stale?: string | undefined;
|
|
@@ -71,12 +70,13 @@ export declare const AuthenticationItemSchema: z.ZodObject<Omit<{
|
|
|
71
70
|
title?: string | null | undefined;
|
|
72
71
|
groups?: string | undefined;
|
|
73
72
|
members?: string | undefined;
|
|
73
|
+
permissions?: Record<string, boolean> | undefined;
|
|
74
74
|
user_id?: number | undefined;
|
|
75
|
-
version?: string | undefined;
|
|
76
75
|
implementation_id?: string | undefined;
|
|
77
76
|
is_expired?: string | undefined;
|
|
78
77
|
expired_at?: string | null | undefined;
|
|
79
78
|
app_key?: string | undefined;
|
|
79
|
+
app_version?: string | undefined;
|
|
80
80
|
}>;
|
|
81
81
|
export declare const AuthItemSchema: z.ZodObject<Omit<{
|
|
82
82
|
id: z.ZodNumber;
|
|
@@ -104,7 +104,7 @@ export declare const AuthItemSchema: z.ZodObject<Omit<{
|
|
|
104
104
|
is_expired: z.ZodOptional<z.ZodString>;
|
|
105
105
|
expired_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
106
106
|
app_key: z.ZodOptional<z.ZodString>;
|
|
107
|
-
|
|
107
|
+
app_version: z.ZodOptional<z.ZodString>;
|
|
108
108
|
user_id: z.ZodOptional<z.ZodNumber>;
|
|
109
109
|
}, "strip", z.ZodTypeAny, {
|
|
110
110
|
id: number;
|
|
@@ -115,7 +115,6 @@ export declare const AuthItemSchema: z.ZodObject<Omit<{
|
|
|
115
115
|
shared_with_all: boolean;
|
|
116
116
|
url?: string | undefined;
|
|
117
117
|
label?: string | null | undefined;
|
|
118
|
-
permissions?: Record<string, boolean> | undefined;
|
|
119
118
|
lastchanged?: string | undefined;
|
|
120
119
|
destination_selected_api?: string | null | undefined;
|
|
121
120
|
is_stale?: string | undefined;
|
|
@@ -125,12 +124,13 @@ export declare const AuthItemSchema: z.ZodObject<Omit<{
|
|
|
125
124
|
title?: string | null | undefined;
|
|
126
125
|
groups?: string | undefined;
|
|
127
126
|
members?: string | undefined;
|
|
127
|
+
permissions?: Record<string, boolean> | undefined;
|
|
128
128
|
user_id?: number | undefined;
|
|
129
|
-
version?: string | undefined;
|
|
130
129
|
implementation_id?: string | undefined;
|
|
131
130
|
is_expired?: string | undefined;
|
|
132
131
|
expired_at?: string | null | undefined;
|
|
133
132
|
app_key?: string | undefined;
|
|
133
|
+
app_version?: string | undefined;
|
|
134
134
|
}, {
|
|
135
135
|
id: number;
|
|
136
136
|
date: string;
|
|
@@ -140,7 +140,6 @@ export declare const AuthItemSchema: z.ZodObject<Omit<{
|
|
|
140
140
|
shared_with_all: boolean;
|
|
141
141
|
url?: string | undefined;
|
|
142
142
|
label?: string | null | undefined;
|
|
143
|
-
permissions?: Record<string, boolean> | undefined;
|
|
144
143
|
lastchanged?: string | undefined;
|
|
145
144
|
destination_selected_api?: string | null | undefined;
|
|
146
145
|
is_stale?: string | undefined;
|
|
@@ -150,12 +149,13 @@ export declare const AuthItemSchema: z.ZodObject<Omit<{
|
|
|
150
149
|
title?: string | null | undefined;
|
|
151
150
|
groups?: string | undefined;
|
|
152
151
|
members?: string | undefined;
|
|
152
|
+
permissions?: Record<string, boolean> | undefined;
|
|
153
153
|
user_id?: number | undefined;
|
|
154
|
-
version?: string | undefined;
|
|
155
154
|
implementation_id?: string | undefined;
|
|
156
155
|
is_expired?: string | undefined;
|
|
157
156
|
expired_at?: string | null | undefined;
|
|
158
157
|
app_key?: string | undefined;
|
|
158
|
+
app_version?: string | undefined;
|
|
159
159
|
}>;
|
|
160
160
|
export type AuthItem = z.infer<typeof AuthItemSchema>;
|
|
161
161
|
//# sourceMappingURL=Auth.d.ts.map
|
package/dist/schemas/Auth.js
CHANGED
|
@@ -9,7 +9,7 @@ export const AuthenticationItemSchema = withFormatter(AuthenticationSchema.omit(
|
|
|
9
9
|
is_expired: z.string().optional(), // Mapped from is_stale
|
|
10
10
|
expired_at: z.string().nullable().optional(), // Mapped from marked_stale_at
|
|
11
11
|
app_key: z.string().optional(), // App key from implementations endpoint
|
|
12
|
-
|
|
12
|
+
app_version: z.string().optional(), // Version extracted from implementation_id
|
|
13
13
|
user_id: z.number().optional(),
|
|
14
14
|
}), {
|
|
15
15
|
format: (item) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"properties.d.ts","sourceRoot":"","sources":["../../src/types/properties.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAOxB,eAAO,MAAM,oBAAoB;;
|
|
1
|
+
{"version":3,"file":"properties.d.ts","sourceRoot":"","sources":["../../src/types/properties.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAOxB,eAAO,MAAM,oBAAoB;;CAKhC,CAAC;AA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ional } from "../utils/schema-utils";
|
|
|
3
3
|
import { MAX_PAGE_LIMIT } from "../constants";
|
|
4
4
|
// Shared property definitions for common parameters across functions
|
|
5
5
|
// These can be reused in function schemas without duplication
|
|
6
|
-
export const AppKeyPropertySchema = withPositional(z
|
|
6
|
+
export const AppKeyPropertySchema = withPositional(z
|
|
7
|
+
.string()
|
|
8
|
+
.min(1)
|
|
9
|
+
.describe("App key (e.g., 'SlackCLIAPI' or slug like 'github')"));
|
|
7
10
|
export const ActionTypePropertySchema = z
|
|
8
11
|
.enum([
|
|
9
12
|
"read",
|
|
@@ -27,12 +27,12 @@ export declare function normalizeImplementationMetaToAppItem(implementationMeta:
|
|
|
27
27
|
* @param auth - Raw Authentication from API
|
|
28
28
|
* @param options - Additional fields to include
|
|
29
29
|
* @param options.app_key - selected_api from implementations endpoint
|
|
30
|
-
* @param options.
|
|
30
|
+
* @param options.app_version - Version extracted from selected_api
|
|
31
31
|
* @returns Normalized AuthenticationItem
|
|
32
32
|
*/
|
|
33
33
|
export declare function normalizeAuthenticationItem(auth: Authentication, options?: {
|
|
34
34
|
app_key?: string;
|
|
35
|
-
|
|
35
|
+
app_version?: string;
|
|
36
36
|
}): AuthenticationItem;
|
|
37
37
|
export declare function normalizeActionItem(action: Action): ActionItem;
|
|
38
38
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"domain-utils.d.ts","sourceRoot":"","sources":["../../src/utils/domain-utils.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAC/E,OAAO,KAAK,EAAE,UAAU,EAAE,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAE/E;;;;;;;;;GASG;AACH,wBAAgB,iBAAiB,CAC/B,YAAY,EAAE,MAAM,GACnB,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAQ9B;AAED;;;;;GAKG;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CAUA;AAED,wBAAgB,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAE5C;AAED,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAOtD;AAED,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAY1D;AAED,MAAM,WAAW,UAAU;IACzB,YAAY,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AACD,MAAM,WAAW,kBAAmB,SAAQ,UAAU;IACpD,kBAAkB,EAAE,MAAM,CAAC;CAC5B;AAED,wBAAgB,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAI9C;AAED,wBAAgB,YAAY,CAAC,MAAM,EAAE,MAAM,GAAG,UAAU,CAkBvD;AAED,wBAAgB,oBAAoB,CAClC,UAAU,EAAE,UAAU,GACrB,UAAU,IAAI,kBAAkB,CAElC;AAED,wBAAgB,kBAAkB,CAAC,UAAU,EAAE,kBAAkB,GAAG,MAAM,CAEzE"}
|
|
@@ -47,13 +47,13 @@ export function normalizeImplementationMetaToAppItem(implementationMeta) {
|
|
|
47
47
|
* @param auth - Raw Authentication from API
|
|
48
48
|
* @param options - Additional fields to include
|
|
49
49
|
* @param options.app_key - selected_api from implementations endpoint
|
|
50
|
-
* @param options.
|
|
50
|
+
* @param options.app_version - Version extracted from selected_api
|
|
51
51
|
* @returns Normalized AuthenticationItem
|
|
52
52
|
*/
|
|
53
53
|
export function normalizeAuthenticationItem(auth, options = {}) {
|
|
54
54
|
// Extract app key and version from selected_api if not provided
|
|
55
55
|
let appKey = options.app_key;
|
|
56
|
-
let
|
|
56
|
+
let appVersion = options.app_version;
|
|
57
57
|
if (auth.selected_api) {
|
|
58
58
|
const [extractedAppKey, extractedVersion] = splitVersionedKey(auth.selected_api);
|
|
59
59
|
// Use extracted app key if not provided in options
|
|
@@ -61,8 +61,8 @@ export function normalizeAuthenticationItem(auth, options = {}) {
|
|
|
61
61
|
appKey = extractedAppKey;
|
|
62
62
|
}
|
|
63
63
|
// Use extracted version if not provided in options
|
|
64
|
-
if (!
|
|
65
|
-
|
|
64
|
+
if (!appVersion) {
|
|
65
|
+
appVersion = extractedVersion;
|
|
66
66
|
}
|
|
67
67
|
}
|
|
68
68
|
const { selected_api: selectedApi, customuser_id: userId, ...restOfAuth } = auth;
|
|
@@ -73,15 +73,26 @@ export function normalizeAuthenticationItem(auth, options = {}) {
|
|
|
73
73
|
is_expired: auth.is_stale, // Map is_stale to is_expired
|
|
74
74
|
expired_at: auth.marked_stale_at, // Map marked_stale_at to expired_at
|
|
75
75
|
app_key: appKey, // App key from implementations endpoint or parsed from selected_api
|
|
76
|
-
|
|
76
|
+
app_version: appVersion, // Version from selected_api or provided
|
|
77
77
|
user_id: userId, // Map customuser_id to user_id
|
|
78
78
|
};
|
|
79
79
|
}
|
|
80
80
|
export function normalizeActionItem(action) {
|
|
81
|
-
const { name, type, selected_api:
|
|
81
|
+
const { name, type, selected_api: selectedApi } = action;
|
|
82
|
+
// Split version from selected_api
|
|
83
|
+
const [appKey, appVersion] = selectedApi
|
|
84
|
+
? splitVersionedKey(selectedApi)
|
|
85
|
+
: ["", undefined];
|
|
82
86
|
return {
|
|
83
|
-
|
|
84
|
-
|
|
87
|
+
// Only include the fields we want - explicitly list them
|
|
88
|
+
id: action.id,
|
|
89
|
+
key: action.key,
|
|
90
|
+
description: action.description,
|
|
91
|
+
is_important: action.is_important,
|
|
92
|
+
is_hidden: action.is_hidden,
|
|
93
|
+
// Transformed fields
|
|
94
|
+
app_key: appKey,
|
|
95
|
+
app_version: appVersion,
|
|
85
96
|
action_type: type,
|
|
86
97
|
title: name, // Map name to title
|
|
87
98
|
type: "action",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema-utils.d.ts","sourceRoot":"","sources":["../../src/utils/schema-utils.ts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,OAAO,CAAC;IAEjC,QAAQ,EAAE,gBAAgB,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;CAI5C;AAGD,wBAAgB,YAAY,CAC1B,CAAC,SAAS,CAAC,CAAC,OAAO,EACnB,KAAK,GAAG,OAAO,EACf,OAAO,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACjC,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,cAAc,CAAC,KAAK,EAAE,OAAO,CAAC,GAAG,CAAC,CAMtD;AAMD,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,CAAC,CAAC,SAAS,GAAG,MAAM,GAAG,SAAS,CAE5E;AAED,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,WAAW,CAAC,GACjC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAWxB;AAMD,MAAM,WAAW,kBAAkB;IACjC,cAAc,EAAE;QACd,UAAU,EAAE,IAAI,CAAC;KAClB,CAAC;CACH;AAGD,wBAAgB,cAAc,CAAC,CAAC,SAAS,CAAC,CAAC,OAAO,EAChD,MAAM,EAAE,CAAC,GACR,CAAC,GAAG;IACL,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,GAAG,kBAAkB,CAAC;CACtC,CAQA;AAWD,wBAAgB,YAAY,CAAC,MAAM,EAAE,CAAC,CAAC,OAAO,GAAG,OAAO,CAoBvD"}
|
package/package.json
CHANGED
package/src/api/schemas.ts
CHANGED
|
@@ -83,16 +83,10 @@ export const ActionSchema = z.object({
|
|
|
83
83
|
]),
|
|
84
84
|
key: z.string(),
|
|
85
85
|
name: z.string(),
|
|
86
|
-
noun: z.string().optional(),
|
|
87
86
|
description: z.string(),
|
|
88
|
-
description_html: z.string().optional(),
|
|
89
87
|
is_important: z.boolean().optional(),
|
|
90
88
|
is_hidden: z.boolean().optional(),
|
|
91
|
-
needs: z.array(NeedSchema).optional(),
|
|
92
|
-
meta: z.string().optional(),
|
|
93
89
|
selected_api: z.string().optional(),
|
|
94
|
-
links: ActionLinksSchema.optional(),
|
|
95
|
-
permissions: ActionPermissionsSchema.optional(),
|
|
96
90
|
});
|
|
97
91
|
|
|
98
92
|
export const ChoiceSchema = z.object({
|
package/src/index.ts
CHANGED
|
@@ -40,6 +40,7 @@ export type {
|
|
|
40
40
|
// Export schema utilities for CLI
|
|
41
41
|
export { isPositional, PositionalMetadata } from "./utils/schema-utils";
|
|
42
42
|
export { createFunction } from "./utils/function-utils";
|
|
43
|
+
export type { FormattedItem, FormatMetadata } from "./utils/schema-utils";
|
|
43
44
|
|
|
44
45
|
// Export resolver utilities for CLI
|
|
45
46
|
export * from "./resolvers";
|
|
@@ -22,7 +22,13 @@ export type AppFactoryInput = z.infer<typeof AppFactoryInputSchema>;
|
|
|
22
22
|
|
|
23
23
|
// Base action type proxy for regular actions
|
|
24
24
|
interface BaseActionTypeProxy {
|
|
25
|
-
[action: string]: (options?: ActionExecutionOptions) =>
|
|
25
|
+
[action: string]: (options?: ActionExecutionOptions) => Promise<{
|
|
26
|
+
data: any[];
|
|
27
|
+
nextCursor?: string;
|
|
28
|
+
}> &
|
|
29
|
+
AsyncIterable<{ data: any[]; nextCursor?: string }> & {
|
|
30
|
+
items(): AsyncIterable<any>;
|
|
31
|
+
};
|
|
26
32
|
}
|
|
27
33
|
|
|
28
34
|
// Special fetch function type
|
|
@@ -12,7 +12,7 @@ import type {
|
|
|
12
12
|
export const FindFirstAuthenticationSchema = z
|
|
13
13
|
.object({
|
|
14
14
|
appKey: AppKeyPropertySchema.optional().describe(
|
|
15
|
-
"App key of authentication to find (e.g., 'SlackCLIAPI')",
|
|
15
|
+
"App key of authentication to find (e.g., 'SlackCLIAPI' or slug like 'github')",
|
|
16
16
|
),
|
|
17
17
|
search: z
|
|
18
18
|
.string()
|
|
@@ -13,7 +13,7 @@ import type {
|
|
|
13
13
|
export const FindUniqueAuthenticationSchema = z
|
|
14
14
|
.object({
|
|
15
15
|
appKey: AppKeyPropertySchema.optional().describe(
|
|
16
|
-
"App key of authentication to find (e.g., 'SlackCLIAPI')",
|
|
16
|
+
"App key of authentication to find (e.g., 'SlackCLIAPI' or slug like 'github')",
|
|
17
17
|
),
|
|
18
18
|
search: z
|
|
19
19
|
.string()
|
|
@@ -19,7 +19,7 @@ export type GetAppError =
|
|
|
19
19
|
export const GetAppSchema = z
|
|
20
20
|
.object({
|
|
21
21
|
appKey: AppKeyPropertySchema.describe(
|
|
22
|
-
"App key of app to fetch (e.g., 'SlackCLIAPI')",
|
|
22
|
+
"App key of app to fetch (e.g., 'SlackCLIAPI' or slug like 'github')",
|
|
23
23
|
),
|
|
24
24
|
})
|
|
25
25
|
.describe("Get detailed information about a specific app");
|