@lokalise/connector-api-contracts 3.1.0 → 4.0.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.
@@ -1,38 +1,247 @@
1
1
  import { z } from 'zod/v4';
2
- export declare const FORM_FIELD_SCHEMA: z.ZodObject<{
2
+ export declare const MANIFEST_FILTER_OPTION_SCHEMA: z.ZodObject<{
3
3
  id: z.ZodString;
4
- type: z.ZodString;
4
+ name: z.ZodString;
5
5
  }, z.core.$strip>;
6
- export type FormField = z.infer<typeof FORM_FIELD_SCHEMA>;
6
+ export type ManifestFilterOption = z.infer<typeof MANIFEST_FILTER_OPTION_SCHEMA>;
7
+ export declare const SEARCH_FILTER_SCHEMA: z.ZodObject<{
8
+ id: z.ZodString;
9
+ query: z.ZodString;
10
+ type: z.ZodLiteral<"search">;
11
+ }, z.core.$strip>;
12
+ export declare const MULTISELECT_FILTER_SCHEMA: z.ZodObject<{
13
+ id: z.ZodString;
14
+ query: z.ZodString;
15
+ type: z.ZodLiteral<"multiselect">;
16
+ options: z.ZodArray<z.ZodObject<{
17
+ id: z.ZodString;
18
+ name: z.ZodString;
19
+ }, z.core.$strip>>;
20
+ defaultValue: z.ZodOptional<z.ZodArray<z.ZodString>>;
21
+ }, z.core.$strip>;
22
+ export declare const SELECT_FILTER_SCHEMA: z.ZodObject<{
23
+ id: z.ZodString;
24
+ query: z.ZodString;
25
+ type: z.ZodLiteral<"select">;
26
+ options: z.ZodArray<z.ZodObject<{
27
+ id: z.ZodString;
28
+ name: z.ZodString;
29
+ }, z.core.$strip>>;
30
+ defaultValue: z.ZodOptional<z.ZodString>;
31
+ }, z.core.$strip>;
32
+ export declare const ASYNC_SELECT_FILTER_SCHEMA: z.ZodObject<{
33
+ id: z.ZodString;
34
+ query: z.ZodString;
35
+ type: z.ZodLiteral<"async-select">;
36
+ constraintQuery: z.ZodOptional<z.ZodString>;
37
+ dependsOn: z.ZodOptional<z.ZodString>;
38
+ }, z.core.$strip>;
39
+ export declare const ASYNC_MULTISELECT_FILTER_SCHEMA: z.ZodObject<{
40
+ id: z.ZodString;
41
+ query: z.ZodString;
42
+ type: z.ZodLiteral<"async-multiselect">;
43
+ constraintQuery: z.ZodOptional<z.ZodString>;
44
+ defaultValue: z.ZodOptional<z.ZodArray<z.ZodString>>;
45
+ dependsOn: z.ZodOptional<z.ZodString>;
46
+ }, z.core.$strip>;
47
+ export declare const DATERANGE_FILTER_SCHEMA: z.ZodObject<{
48
+ id: z.ZodString;
49
+ query: z.ZodString;
50
+ type: z.ZodLiteral<"daterange">;
51
+ defaultValue: z.ZodOptional<z.ZodObject<{
52
+ from: z.ZodString;
53
+ to: z.ZodString;
54
+ }, z.core.$strip>>;
55
+ }, z.core.$strip>;
56
+ export declare const MANIFEST_FILTER_SCHEMA: z.ZodDiscriminatedUnion<[z.ZodObject<{
57
+ id: z.ZodString;
58
+ query: z.ZodString;
59
+ type: z.ZodLiteral<"search">;
60
+ }, z.core.$strip>, z.ZodObject<{
61
+ id: z.ZodString;
62
+ query: z.ZodString;
63
+ type: z.ZodLiteral<"multiselect">;
64
+ options: z.ZodArray<z.ZodObject<{
65
+ id: z.ZodString;
66
+ name: z.ZodString;
67
+ }, z.core.$strip>>;
68
+ defaultValue: z.ZodOptional<z.ZodArray<z.ZodString>>;
69
+ }, z.core.$strip>, z.ZodObject<{
70
+ id: z.ZodString;
71
+ query: z.ZodString;
72
+ type: z.ZodLiteral<"async-multiselect">;
73
+ constraintQuery: z.ZodOptional<z.ZodString>;
74
+ defaultValue: z.ZodOptional<z.ZodArray<z.ZodString>>;
75
+ dependsOn: z.ZodOptional<z.ZodString>;
76
+ }, z.core.$strip>, z.ZodObject<{
77
+ id: z.ZodString;
78
+ query: z.ZodString;
79
+ type: z.ZodLiteral<"select">;
80
+ options: z.ZodArray<z.ZodObject<{
81
+ id: z.ZodString;
82
+ name: z.ZodString;
83
+ }, z.core.$strip>>;
84
+ defaultValue: z.ZodOptional<z.ZodString>;
85
+ }, z.core.$strip>, z.ZodObject<{
86
+ id: z.ZodString;
87
+ query: z.ZodString;
88
+ type: z.ZodLiteral<"async-select">;
89
+ constraintQuery: z.ZodOptional<z.ZodString>;
90
+ dependsOn: z.ZodOptional<z.ZodString>;
91
+ }, z.core.$strip>, z.ZodObject<{
92
+ id: z.ZodString;
93
+ query: z.ZodString;
94
+ type: z.ZodLiteral<"daterange">;
95
+ defaultValue: z.ZodOptional<z.ZodObject<{
96
+ from: z.ZodString;
97
+ to: z.ZodString;
98
+ }, z.core.$strip>>;
99
+ }, z.core.$strip>], "type">;
100
+ export type SearchFilter = z.infer<typeof SEARCH_FILTER_SCHEMA>;
101
+ export type MultiselectFilter = z.infer<typeof MULTISELECT_FILTER_SCHEMA>;
102
+ export type SelectFilter = z.infer<typeof SELECT_FILTER_SCHEMA>;
103
+ export type AsyncMultiselectFilter = z.infer<typeof ASYNC_MULTISELECT_FILTER_SCHEMA>;
104
+ export type DaterangeFilter = z.infer<typeof DATERANGE_FILTER_SCHEMA>;
105
+ export declare const FILTER_SCHEMA: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
106
+ id: z.ZodString;
107
+ query: z.ZodString;
108
+ type: z.ZodLiteral<"search">;
109
+ }, z.core.$strip>, z.ZodObject<{
110
+ id: z.ZodString;
111
+ query: z.ZodString;
112
+ type: z.ZodLiteral<"multiselect">;
113
+ options: z.ZodArray<z.ZodObject<{
114
+ id: z.ZodString;
115
+ name: z.ZodString;
116
+ }, z.core.$strip>>;
117
+ defaultValue: z.ZodOptional<z.ZodArray<z.ZodString>>;
118
+ }, z.core.$strip>, z.ZodObject<{
119
+ id: z.ZodString;
120
+ query: z.ZodString;
121
+ type: z.ZodLiteral<"async-multiselect">;
122
+ constraintQuery: z.ZodOptional<z.ZodString>;
123
+ defaultValue: z.ZodOptional<z.ZodArray<z.ZodString>>;
124
+ dependsOn: z.ZodOptional<z.ZodString>;
125
+ }, z.core.$strip>, z.ZodObject<{
126
+ id: z.ZodString;
127
+ query: z.ZodString;
128
+ type: z.ZodLiteral<"select">;
129
+ options: z.ZodArray<z.ZodObject<{
130
+ id: z.ZodString;
131
+ name: z.ZodString;
132
+ }, z.core.$strip>>;
133
+ defaultValue: z.ZodOptional<z.ZodString>;
134
+ }, z.core.$strip>, z.ZodObject<{
135
+ id: z.ZodString;
136
+ query: z.ZodString;
137
+ type: z.ZodLiteral<"async-select">;
138
+ constraintQuery: z.ZodOptional<z.ZodString>;
139
+ dependsOn: z.ZodOptional<z.ZodString>;
140
+ }, z.core.$strip>, z.ZodObject<{
141
+ id: z.ZodString;
142
+ query: z.ZodString;
143
+ type: z.ZodLiteral<"daterange">;
144
+ defaultValue: z.ZodOptional<z.ZodObject<{
145
+ from: z.ZodString;
146
+ to: z.ZodString;
147
+ }, z.core.$strip>>;
148
+ }, z.core.$strip>], "type">>;
149
+ export type Filter = z.infer<typeof MANIFEST_FILTER_SCHEMA>;
150
+ export declare const SELECT_ENTRY: z.ZodObject<{
151
+ value: z.ZodString;
152
+ label: z.ZodString;
153
+ }, z.core.$strip>;
154
+ export type SelectEntry = z.infer<typeof SELECT_ENTRY>;
155
+ export declare const BASE_AUTH_FIELD: z.ZodObject<{
156
+ id: z.ZodString;
157
+ name: z.ZodString;
158
+ }, z.core.$strip>;
159
+ export declare const URL_AUTH_FIELD: z.ZodObject<{
160
+ id: z.ZodString;
161
+ name: z.ZodString;
162
+ type: z.ZodLiteral<"url">;
163
+ }, z.core.$strip>;
164
+ export type UrlAuthField = z.infer<typeof URL_AUTH_FIELD>;
165
+ export declare const PASSWORD_AUTH_FIELD: z.ZodObject<{
166
+ id: z.ZodString;
167
+ name: z.ZodString;
168
+ type: z.ZodLiteral<"password">;
169
+ }, z.core.$strip>;
170
+ export type PasswordAuthField = z.infer<typeof PASSWORD_AUTH_FIELD>;
171
+ export declare const SELECT_AUTH_FIELD: z.ZodObject<{
172
+ id: z.ZodString;
173
+ name: z.ZodString;
174
+ type: z.ZodLiteral<"select">;
175
+ options: z.ZodArray<z.ZodObject<{
176
+ value: z.ZodString;
177
+ label: z.ZodString;
178
+ }, z.core.$strip>>;
179
+ }, z.core.$strip>;
180
+ export type SelectAuthField = z.infer<typeof SELECT_AUTH_FIELD>;
181
+ export declare const AUTH_FIELD: z.ZodDiscriminatedUnion<[z.ZodObject<{
182
+ id: z.ZodString;
183
+ name: z.ZodString;
184
+ type: z.ZodLiteral<"password">;
185
+ }, z.core.$strip>, z.ZodObject<{
186
+ id: z.ZodString;
187
+ name: z.ZodString;
188
+ type: z.ZodLiteral<"select">;
189
+ options: z.ZodArray<z.ZodObject<{
190
+ value: z.ZodString;
191
+ label: z.ZodString;
192
+ }, z.core.$strip>>;
193
+ }, z.core.$strip>, z.ZodObject<{
194
+ id: z.ZodString;
195
+ name: z.ZodString;
196
+ type: z.ZodLiteral<"url">;
197
+ }, z.core.$strip>], "type">;
198
+ export type AuthField = z.infer<typeof AUTH_FIELD>;
7
199
  export declare const OAUTH_AUTHENTICATION_SCHEMA: z.ZodObject<{
8
200
  type: z.ZodLiteral<"oauth">;
9
201
  }, z.core.$strip>;
10
202
  export declare const CREDENTIALS_AUTHENTICATION_SCHEMA: z.ZodObject<{
11
203
  type: z.ZodLiteral<"credentials">;
12
- fields: z.ZodArray<z.ZodObject<{
204
+ fields: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
13
205
  id: z.ZodString;
14
- type: z.ZodString;
15
- }, z.core.$strip>>;
206
+ name: z.ZodString;
207
+ type: z.ZodLiteral<"password">;
208
+ }, z.core.$strip>, z.ZodObject<{
209
+ id: z.ZodString;
210
+ name: z.ZodString;
211
+ type: z.ZodLiteral<"select">;
212
+ options: z.ZodArray<z.ZodObject<{
213
+ value: z.ZodString;
214
+ label: z.ZodString;
215
+ }, z.core.$strip>>;
216
+ }, z.core.$strip>, z.ZodObject<{
217
+ id: z.ZodString;
218
+ name: z.ZodString;
219
+ type: z.ZodLiteral<"url">;
220
+ }, z.core.$strip>], "type">>;
16
221
  }, z.core.$strip>;
17
222
  export declare const AUTHENTICATION_SCHEMA: z.ZodDiscriminatedUnion<[z.ZodObject<{
18
223
  type: z.ZodLiteral<"oauth">;
19
224
  }, z.core.$strip>, z.ZodObject<{
20
225
  type: z.ZodLiteral<"credentials">;
21
- fields: z.ZodArray<z.ZodObject<{
226
+ fields: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
22
227
  id: z.ZodString;
23
- type: z.ZodString;
24
- }, z.core.$strip>>;
228
+ name: z.ZodString;
229
+ type: z.ZodLiteral<"password">;
230
+ }, z.core.$strip>, z.ZodObject<{
231
+ id: z.ZodString;
232
+ name: z.ZodString;
233
+ type: z.ZodLiteral<"select">;
234
+ options: z.ZodArray<z.ZodObject<{
235
+ value: z.ZodString;
236
+ label: z.ZodString;
237
+ }, z.core.$strip>>;
238
+ }, z.core.$strip>, z.ZodObject<{
239
+ id: z.ZodString;
240
+ name: z.ZodString;
241
+ type: z.ZodLiteral<"url">;
242
+ }, z.core.$strip>], "type">>;
25
243
  }, z.core.$strip>], "type">;
26
244
  export type Authentication = z.infer<typeof AUTHENTICATION_SCHEMA>;
27
- export declare const FILTER_SCHEMA: z.ZodObject<{
28
- id: z.ZodString;
29
- type: z.ZodString;
30
- query: z.ZodString;
31
- defaultValue: z.ZodOptional<z.ZodAny>;
32
- constraintQuery: z.ZodOptional<z.ZodString>;
33
- dependsOn: z.ZodOptional<z.ZodString>;
34
- }, z.core.$strip>;
35
- export type Filter = z.infer<typeof FILTER_SCHEMA>;
36
245
  export declare const CAPABILITY_SCHEMA: z.ZodObject<{
37
246
  version: z.ZodNumber;
38
247
  data: z.ZodOptional<z.ZodObject<{}, z.core.$loose>>;
@@ -43,19 +252,68 @@ export declare const MANIFEST_SCHEMA: z.ZodObject<{
43
252
  type: z.ZodLiteral<"oauth">;
44
253
  }, z.core.$strip>, z.ZodObject<{
45
254
  type: z.ZodLiteral<"credentials">;
46
- fields: z.ZodArray<z.ZodObject<{
255
+ fields: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
47
256
  id: z.ZodString;
48
- type: z.ZodString;
49
- }, z.core.$strip>>;
257
+ name: z.ZodString;
258
+ type: z.ZodLiteral<"password">;
259
+ }, z.core.$strip>, z.ZodObject<{
260
+ id: z.ZodString;
261
+ name: z.ZodString;
262
+ type: z.ZodLiteral<"select">;
263
+ options: z.ZodArray<z.ZodObject<{
264
+ value: z.ZodString;
265
+ label: z.ZodString;
266
+ }, z.core.$strip>>;
267
+ }, z.core.$strip>, z.ZodObject<{
268
+ id: z.ZodString;
269
+ name: z.ZodString;
270
+ type: z.ZodLiteral<"url">;
271
+ }, z.core.$strip>], "type">>;
50
272
  }, z.core.$strip>], "type">;
51
- filters: z.ZodArray<z.ZodObject<{
273
+ filters: z.ZodArray<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
52
274
  id: z.ZodString;
53
- type: z.ZodString;
54
275
  query: z.ZodString;
55
- defaultValue: z.ZodOptional<z.ZodAny>;
276
+ type: z.ZodLiteral<"search">;
277
+ }, z.core.$strip>, z.ZodObject<{
278
+ id: z.ZodString;
279
+ query: z.ZodString;
280
+ type: z.ZodLiteral<"multiselect">;
281
+ options: z.ZodArray<z.ZodObject<{
282
+ id: z.ZodString;
283
+ name: z.ZodString;
284
+ }, z.core.$strip>>;
285
+ defaultValue: z.ZodOptional<z.ZodArray<z.ZodString>>;
286
+ }, z.core.$strip>, z.ZodObject<{
287
+ id: z.ZodString;
288
+ query: z.ZodString;
289
+ type: z.ZodLiteral<"async-multiselect">;
56
290
  constraintQuery: z.ZodOptional<z.ZodString>;
291
+ defaultValue: z.ZodOptional<z.ZodArray<z.ZodString>>;
57
292
  dependsOn: z.ZodOptional<z.ZodString>;
58
- }, z.core.$strip>>;
293
+ }, z.core.$strip>, z.ZodObject<{
294
+ id: z.ZodString;
295
+ query: z.ZodString;
296
+ type: z.ZodLiteral<"select">;
297
+ options: z.ZodArray<z.ZodObject<{
298
+ id: z.ZodString;
299
+ name: z.ZodString;
300
+ }, z.core.$strip>>;
301
+ defaultValue: z.ZodOptional<z.ZodString>;
302
+ }, z.core.$strip>, z.ZodObject<{
303
+ id: z.ZodString;
304
+ query: z.ZodString;
305
+ type: z.ZodLiteral<"async-select">;
306
+ constraintQuery: z.ZodOptional<z.ZodString>;
307
+ dependsOn: z.ZodOptional<z.ZodString>;
308
+ }, z.core.$strip>, z.ZodObject<{
309
+ id: z.ZodString;
310
+ query: z.ZodString;
311
+ type: z.ZodLiteral<"daterange">;
312
+ defaultValue: z.ZodOptional<z.ZodObject<{
313
+ from: z.ZodString;
314
+ to: z.ZodString;
315
+ }, z.core.$strip>>;
316
+ }, z.core.$strip>], "type">>>;
59
317
  capabilities: z.ZodRecord<z.ZodString, z.ZodObject<{
60
318
  version: z.ZodNumber;
61
319
  data: z.ZodOptional<z.ZodObject<{}, z.core.$loose>>;
@@ -67,19 +325,68 @@ export declare const MANIFESTS_BY_MODE_SCHEMA: z.ZodRecord<z.ZodString, z.ZodObj
67
325
  type: z.ZodLiteral<"oauth">;
68
326
  }, z.core.$strip>, z.ZodObject<{
69
327
  type: z.ZodLiteral<"credentials">;
70
- fields: z.ZodArray<z.ZodObject<{
328
+ fields: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
71
329
  id: z.ZodString;
72
- type: z.ZodString;
73
- }, z.core.$strip>>;
330
+ name: z.ZodString;
331
+ type: z.ZodLiteral<"password">;
332
+ }, z.core.$strip>, z.ZodObject<{
333
+ id: z.ZodString;
334
+ name: z.ZodString;
335
+ type: z.ZodLiteral<"select">;
336
+ options: z.ZodArray<z.ZodObject<{
337
+ value: z.ZodString;
338
+ label: z.ZodString;
339
+ }, z.core.$strip>>;
340
+ }, z.core.$strip>, z.ZodObject<{
341
+ id: z.ZodString;
342
+ name: z.ZodString;
343
+ type: z.ZodLiteral<"url">;
344
+ }, z.core.$strip>], "type">>;
74
345
  }, z.core.$strip>], "type">;
75
- filters: z.ZodArray<z.ZodObject<{
346
+ filters: z.ZodArray<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
347
+ id: z.ZodString;
348
+ query: z.ZodString;
349
+ type: z.ZodLiteral<"search">;
350
+ }, z.core.$strip>, z.ZodObject<{
351
+ id: z.ZodString;
352
+ query: z.ZodString;
353
+ type: z.ZodLiteral<"multiselect">;
354
+ options: z.ZodArray<z.ZodObject<{
355
+ id: z.ZodString;
356
+ name: z.ZodString;
357
+ }, z.core.$strip>>;
358
+ defaultValue: z.ZodOptional<z.ZodArray<z.ZodString>>;
359
+ }, z.core.$strip>, z.ZodObject<{
76
360
  id: z.ZodString;
77
- type: z.ZodString;
78
361
  query: z.ZodString;
79
- defaultValue: z.ZodOptional<z.ZodAny>;
362
+ type: z.ZodLiteral<"async-multiselect">;
80
363
  constraintQuery: z.ZodOptional<z.ZodString>;
364
+ defaultValue: z.ZodOptional<z.ZodArray<z.ZodString>>;
81
365
  dependsOn: z.ZodOptional<z.ZodString>;
82
- }, z.core.$strip>>;
366
+ }, z.core.$strip>, z.ZodObject<{
367
+ id: z.ZodString;
368
+ query: z.ZodString;
369
+ type: z.ZodLiteral<"select">;
370
+ options: z.ZodArray<z.ZodObject<{
371
+ id: z.ZodString;
372
+ name: z.ZodString;
373
+ }, z.core.$strip>>;
374
+ defaultValue: z.ZodOptional<z.ZodString>;
375
+ }, z.core.$strip>, z.ZodObject<{
376
+ id: z.ZodString;
377
+ query: z.ZodString;
378
+ type: z.ZodLiteral<"async-select">;
379
+ constraintQuery: z.ZodOptional<z.ZodString>;
380
+ dependsOn: z.ZodOptional<z.ZodString>;
381
+ }, z.core.$strip>, z.ZodObject<{
382
+ id: z.ZodString;
383
+ query: z.ZodString;
384
+ type: z.ZodLiteral<"daterange">;
385
+ defaultValue: z.ZodOptional<z.ZodObject<{
386
+ from: z.ZodString;
387
+ to: z.ZodString;
388
+ }, z.core.$strip>>;
389
+ }, z.core.$strip>], "type">>>;
83
390
  capabilities: z.ZodRecord<z.ZodString, z.ZodObject<{
84
391
  version: z.ZodNumber;
85
392
  data: z.ZodOptional<z.ZodObject<{}, z.core.$loose>>;
@@ -91,19 +398,68 @@ export declare const getManifestContract: import("@lokalise/api-contracts").GetR
91
398
  type: z.ZodLiteral<"oauth">;
92
399
  }, z.core.$strip>, z.ZodObject<{
93
400
  type: z.ZodLiteral<"credentials">;
94
- fields: z.ZodArray<z.ZodObject<{
401
+ fields: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
95
402
  id: z.ZodString;
96
- type: z.ZodString;
97
- }, z.core.$strip>>;
403
+ name: z.ZodString;
404
+ type: z.ZodLiteral<"password">;
405
+ }, z.core.$strip>, z.ZodObject<{
406
+ id: z.ZodString;
407
+ name: z.ZodString;
408
+ type: z.ZodLiteral<"select">;
409
+ options: z.ZodArray<z.ZodObject<{
410
+ value: z.ZodString;
411
+ label: z.ZodString;
412
+ }, z.core.$strip>>;
413
+ }, z.core.$strip>, z.ZodObject<{
414
+ id: z.ZodString;
415
+ name: z.ZodString;
416
+ type: z.ZodLiteral<"url">;
417
+ }, z.core.$strip>], "type">>;
98
418
  }, z.core.$strip>], "type">;
99
- filters: z.ZodArray<z.ZodObject<{
419
+ filters: z.ZodArray<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
420
+ id: z.ZodString;
421
+ query: z.ZodString;
422
+ type: z.ZodLiteral<"search">;
423
+ }, z.core.$strip>, z.ZodObject<{
424
+ id: z.ZodString;
425
+ query: z.ZodString;
426
+ type: z.ZodLiteral<"multiselect">;
427
+ options: z.ZodArray<z.ZodObject<{
428
+ id: z.ZodString;
429
+ name: z.ZodString;
430
+ }, z.core.$strip>>;
431
+ defaultValue: z.ZodOptional<z.ZodArray<z.ZodString>>;
432
+ }, z.core.$strip>, z.ZodObject<{
100
433
  id: z.ZodString;
101
- type: z.ZodString;
102
434
  query: z.ZodString;
103
- defaultValue: z.ZodOptional<z.ZodAny>;
435
+ type: z.ZodLiteral<"async-multiselect">;
104
436
  constraintQuery: z.ZodOptional<z.ZodString>;
437
+ defaultValue: z.ZodOptional<z.ZodArray<z.ZodString>>;
105
438
  dependsOn: z.ZodOptional<z.ZodString>;
106
- }, z.core.$strip>>;
439
+ }, z.core.$strip>, z.ZodObject<{
440
+ id: z.ZodString;
441
+ query: z.ZodString;
442
+ type: z.ZodLiteral<"select">;
443
+ options: z.ZodArray<z.ZodObject<{
444
+ id: z.ZodString;
445
+ name: z.ZodString;
446
+ }, z.core.$strip>>;
447
+ defaultValue: z.ZodOptional<z.ZodString>;
448
+ }, z.core.$strip>, z.ZodObject<{
449
+ id: z.ZodString;
450
+ query: z.ZodString;
451
+ type: z.ZodLiteral<"async-select">;
452
+ constraintQuery: z.ZodOptional<z.ZodString>;
453
+ dependsOn: z.ZodOptional<z.ZodString>;
454
+ }, z.core.$strip>, z.ZodObject<{
455
+ id: z.ZodString;
456
+ query: z.ZodString;
457
+ type: z.ZodLiteral<"daterange">;
458
+ defaultValue: z.ZodOptional<z.ZodObject<{
459
+ from: z.ZodString;
460
+ to: z.ZodString;
461
+ }, z.core.$strip>>;
462
+ }, z.core.$strip>], "type">>>;
107
463
  capabilities: z.ZodRecord<z.ZodString, z.ZodObject<{
108
464
  version: z.ZodNumber;
109
465
  data: z.ZodOptional<z.ZodObject<{}, z.core.$loose>>;
@@ -117,19 +473,68 @@ export declare const getManifestContract: import("@lokalise/api-contracts").GetR
117
473
  type: z.ZodLiteral<"oauth">;
118
474
  }, z.core.$strip>, z.ZodObject<{
119
475
  type: z.ZodLiteral<"credentials">;
120
- fields: z.ZodArray<z.ZodObject<{
476
+ fields: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
121
477
  id: z.ZodString;
122
- type: z.ZodString;
123
- }, z.core.$strip>>;
478
+ name: z.ZodString;
479
+ type: z.ZodLiteral<"password">;
480
+ }, z.core.$strip>, z.ZodObject<{
481
+ id: z.ZodString;
482
+ name: z.ZodString;
483
+ type: z.ZodLiteral<"select">;
484
+ options: z.ZodArray<z.ZodObject<{
485
+ value: z.ZodString;
486
+ label: z.ZodString;
487
+ }, z.core.$strip>>;
488
+ }, z.core.$strip>, z.ZodObject<{
489
+ id: z.ZodString;
490
+ name: z.ZodString;
491
+ type: z.ZodLiteral<"url">;
492
+ }, z.core.$strip>], "type">>;
124
493
  }, z.core.$strip>], "type">;
125
- filters: z.ZodArray<z.ZodObject<{
494
+ filters: z.ZodArray<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
495
+ id: z.ZodString;
496
+ query: z.ZodString;
497
+ type: z.ZodLiteral<"search">;
498
+ }, z.core.$strip>, z.ZodObject<{
126
499
  id: z.ZodString;
127
- type: z.ZodString;
128
500
  query: z.ZodString;
129
- defaultValue: z.ZodOptional<z.ZodAny>;
501
+ type: z.ZodLiteral<"multiselect">;
502
+ options: z.ZodArray<z.ZodObject<{
503
+ id: z.ZodString;
504
+ name: z.ZodString;
505
+ }, z.core.$strip>>;
506
+ defaultValue: z.ZodOptional<z.ZodArray<z.ZodString>>;
507
+ }, z.core.$strip>, z.ZodObject<{
508
+ id: z.ZodString;
509
+ query: z.ZodString;
510
+ type: z.ZodLiteral<"async-multiselect">;
130
511
  constraintQuery: z.ZodOptional<z.ZodString>;
512
+ defaultValue: z.ZodOptional<z.ZodArray<z.ZodString>>;
131
513
  dependsOn: z.ZodOptional<z.ZodString>;
132
- }, z.core.$strip>>;
514
+ }, z.core.$strip>, z.ZodObject<{
515
+ id: z.ZodString;
516
+ query: z.ZodString;
517
+ type: z.ZodLiteral<"select">;
518
+ options: z.ZodArray<z.ZodObject<{
519
+ id: z.ZodString;
520
+ name: z.ZodString;
521
+ }, z.core.$strip>>;
522
+ defaultValue: z.ZodOptional<z.ZodString>;
523
+ }, z.core.$strip>, z.ZodObject<{
524
+ id: z.ZodString;
525
+ query: z.ZodString;
526
+ type: z.ZodLiteral<"async-select">;
527
+ constraintQuery: z.ZodOptional<z.ZodString>;
528
+ dependsOn: z.ZodOptional<z.ZodString>;
529
+ }, z.core.$strip>, z.ZodObject<{
530
+ id: z.ZodString;
531
+ query: z.ZodString;
532
+ type: z.ZodLiteral<"daterange">;
533
+ defaultValue: z.ZodOptional<z.ZodObject<{
534
+ from: z.ZodString;
535
+ to: z.ZodString;
536
+ }, z.core.$strip>>;
537
+ }, z.core.$strip>], "type">>>;
133
538
  capabilities: z.ZodRecord<z.ZodString, z.ZodObject<{
134
539
  version: z.ZodNumber;
135
540
  data: z.ZodOptional<z.ZodObject<{}, z.core.$loose>>;
@@ -1,29 +1,90 @@
1
1
  import { buildGetRoute } from '@lokalise/api-contracts';
2
2
  import { z } from 'zod/v4';
3
3
  import { COMMON_ERROR_RESPONSE_SCHEMA_UNION, CONNECTOR_REQUEST_HEADERS_SCHEMA_PRE_SETUP, } from "./commonSchemas.js";
4
- export const FORM_FIELD_SCHEMA = z.object({
4
+ export const MANIFEST_FILTER_OPTION_SCHEMA = z.object({
5
5
  id: z.string(),
6
- type: z.string(),
6
+ name: z.string(),
7
7
  });
8
+ const BASE_FILTER_SCHEMA = z.object({
9
+ id: z.string(),
10
+ query: z.string(),
11
+ });
12
+ export const SEARCH_FILTER_SCHEMA = BASE_FILTER_SCHEMA.extend({
13
+ type: z.literal('search'),
14
+ });
15
+ export const MULTISELECT_FILTER_SCHEMA = BASE_FILTER_SCHEMA.extend({
16
+ type: z.literal('multiselect'),
17
+ options: z.array(MANIFEST_FILTER_OPTION_SCHEMA).min(1),
18
+ defaultValue: z.array(z.string()).optional(),
19
+ });
20
+ export const SELECT_FILTER_SCHEMA = BASE_FILTER_SCHEMA.extend({
21
+ type: z.literal('select'),
22
+ options: z.array(MANIFEST_FILTER_OPTION_SCHEMA).min(1),
23
+ defaultValue: z.string().optional(),
24
+ });
25
+ export const ASYNC_SELECT_FILTER_SCHEMA = BASE_FILTER_SCHEMA.extend({
26
+ type: z.literal('async-select'),
27
+ constraintQuery: z.string().optional(),
28
+ dependsOn: z.string().optional(),
29
+ });
30
+ export const ASYNC_MULTISELECT_FILTER_SCHEMA = BASE_FILTER_SCHEMA.extend({
31
+ type: z.literal('async-multiselect'),
32
+ constraintQuery: z.string().optional(),
33
+ defaultValue: z.array(z.string()).optional(),
34
+ dependsOn: z.string().optional(),
35
+ });
36
+ export const DATERANGE_FILTER_SCHEMA = BASE_FILTER_SCHEMA.extend({
37
+ type: z.literal('daterange'),
38
+ defaultValue: z
39
+ .object({
40
+ from: z.string(),
41
+ to: z.string(),
42
+ })
43
+ .optional(),
44
+ });
45
+ export const MANIFEST_FILTER_SCHEMA = z.discriminatedUnion('type', [
46
+ SEARCH_FILTER_SCHEMA,
47
+ MULTISELECT_FILTER_SCHEMA,
48
+ ASYNC_MULTISELECT_FILTER_SCHEMA,
49
+ SELECT_FILTER_SCHEMA,
50
+ ASYNC_SELECT_FILTER_SCHEMA,
51
+ DATERANGE_FILTER_SCHEMA,
52
+ ]);
53
+ export const FILTER_SCHEMA = z.array(MANIFEST_FILTER_SCHEMA);
54
+ export const SELECT_ENTRY = z.object({
55
+ value: z.string(),
56
+ label: z.string(),
57
+ });
58
+ export const BASE_AUTH_FIELD = z.object({
59
+ id: z.string(),
60
+ name: z.string(),
61
+ });
62
+ export const URL_AUTH_FIELD = BASE_AUTH_FIELD.extend({
63
+ type: z.literal('url'),
64
+ });
65
+ export const PASSWORD_AUTH_FIELD = BASE_AUTH_FIELD.extend({
66
+ type: z.literal('password'),
67
+ });
68
+ export const SELECT_AUTH_FIELD = BASE_AUTH_FIELD.extend({
69
+ type: z.literal('select'),
70
+ options: z.array(SELECT_ENTRY),
71
+ });
72
+ export const AUTH_FIELD = z.discriminatedUnion('type', [
73
+ PASSWORD_AUTH_FIELD,
74
+ SELECT_AUTH_FIELD,
75
+ URL_AUTH_FIELD,
76
+ ]);
8
77
  export const OAUTH_AUTHENTICATION_SCHEMA = z.object({
9
78
  type: z.literal('oauth'),
10
79
  });
11
80
  export const CREDENTIALS_AUTHENTICATION_SCHEMA = z.object({
12
81
  type: z.literal('credentials'),
13
- fields: z.array(FORM_FIELD_SCHEMA),
82
+ fields: z.array(AUTH_FIELD),
14
83
  });
15
84
  export const AUTHENTICATION_SCHEMA = z.discriminatedUnion('type', [
16
85
  OAUTH_AUTHENTICATION_SCHEMA,
17
86
  CREDENTIALS_AUTHENTICATION_SCHEMA,
18
87
  ]);
19
- export const FILTER_SCHEMA = z.object({
20
- id: z.string(),
21
- type: z.string(),
22
- query: z.string(),
23
- defaultValue: z.any().optional(),
24
- constraintQuery: z.string().optional(),
25
- dependsOn: z.string().optional(),
26
- });
27
88
  export const CAPABILITY_SCHEMA = z.object({
28
89
  version: z.number().int().positive(),
29
90
  data: z.looseObject({}).optional(),
@@ -1 +1 @@
1
- {"version":3,"file":"manifestContracts.js","sourceRoot":"","sources":["../../src/contracts/manifestContracts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAA;AACvD,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAA;AAC1B,OAAO,EACL,kCAAkC,EAClC,0CAA0C,GAC3C,MAAM,oBAAoB,CAAA;AAE3B,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,CAAC,MAAM,CAAC;IACxC,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE;IACd,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;CACjB,CAAC,CAAA;AAIF,MAAM,CAAC,MAAM,2BAA2B,GAAG,CAAC,CAAC,MAAM,CAAC;IAClD,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC;CACzB,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,iCAAiC,GAAG,CAAC,CAAC,MAAM,CAAC;IACxD,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,aAAa,CAAC;IAC9B,MAAM,EAAE,CAAC,CAAC,KAAK,CAAC,iBAAiB,CAAC;CACnC,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,CAAC,kBAAkB,CAAC,MAAM,EAAE;IAChE,2BAA2B;IAC3B,iCAAiC;CACl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MAAM,EAAE,CAAC,CAAC,KAAK,CAAC,UAAU,CAAC;CAC5B,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,CAAC,kBAAkB,CAAC,MAAM,EAAE;IAChE,2BAA2B;IAC3B,iCAAiC;CAClC,CAAC,CAAA;AAIF,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,CAAC,MAAM,CAAC;IACxC,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE;IACpC,IAAI,EAAE,CAAC,CAAC,WAAW,CAAC,EAAE,CAAC,CAAC,QAAQ,EAAE;CACnC,CAAC,CAAA;AAIF,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,CAAC,MAAM,CAAC;IACtC,cAAc,EAAE,qBAAqB;IACrC,OAAO,EAAE,CAAC,CAAC,KAAK,CAAC,aAAa,CAAC;IAC/B,YAAY,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,iBAAiB,CAAC;CACtD,CAAC,CAAA;AAIF,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,eAAe,CAAC,CAAA;AAI7E,MAAM,CAAC,MAAM,mBAAmB,GAAG,aAAa,CAAC;IAC/C,YAAY,EAAE,GAAG,EAAE,CAAC,WAAW;IAC/B,WAAW,EAAE,wCAAwC;IACrD,yBAAyB,EAAE,wBAAwB;IACnD,2BAA2B,EAAE;QAC3B,GAAG,EAAE,wBAAwB;QAC7B,GAAG,EAAE,kCAAkC;KACxC;IACD,mBAAmB,EAAE,0CAA0C;CAChE,CAAC,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lokalise/connector-api-contracts",
3
- "version": "3.1.0",
3
+ "version": "4.0.0",
4
4
  "description": "Lokalise Connector API schemas and contracts",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",