@lokalise/content-type-app-engine-contracts 5.36.0 → 5.38.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.
@@ -126,3 +126,161 @@ export declare const deleteContentFilterContract: import("@lokalise/api-contract
126
126
  details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
127
127
  }, z.core.$strip>;
128
128
  }>;
129
+ export declare const getIntegrationContentFiltersContract: import("@lokalise/api-contracts").GetRouteDefinition<z.ZodObject<{
130
+ filters: z.ZodArray<z.ZodObject<{
131
+ id: z.ZodGUID;
132
+ name: z.ZodString;
133
+ definition: z.ZodUnion<readonly [z.ZodArray<z.ZodObject<{
134
+ relation: z.ZodEnum<{
135
+ AND: "AND";
136
+ OR: "OR";
137
+ }>;
138
+ object: z.ZodString;
139
+ option: z.ZodEnum<{
140
+ contains: "contains";
141
+ containsAll: "containsAll";
142
+ endsWith: "endsWith";
143
+ equals: "equals";
144
+ notContains: "notContains";
145
+ notContainsAll: "notContainsAll";
146
+ notEquals: "notEquals";
147
+ startsWith: "startsWith";
148
+ within: "within";
149
+ }>;
150
+ values: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodObject<{
151
+ kind: z.ZodLiteral<"relative">;
152
+ amount: z.ZodNumber;
153
+ unit: z.ZodEnum<{
154
+ days: "days";
155
+ hours: "hours";
156
+ }>;
157
+ }, z.core.$strip>]>>;
158
+ }, z.core.$strip>>, z.ZodObject<{
159
+ filter: z.ZodString;
160
+ }, z.core.$strip>]>;
161
+ createdAt: z.ZodString;
162
+ updatedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
163
+ }, z.core.$strip>>;
164
+ }, z.core.$strip>, z.ZodObject<{
165
+ integrationId: z.ZodGUID;
166
+ }, z.core.$strip>, undefined, z.ZodObject<{
167
+ authorization: z.ZodOptional<z.ZodString>;
168
+ }, z.core.$strip>, undefined, false, false, {
169
+ 401: z.ZodObject<{
170
+ message: z.ZodString;
171
+ errorCode: z.ZodString;
172
+ details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
173
+ }, z.core.$strip>;
174
+ 404: z.ZodObject<{
175
+ message: z.ZodString;
176
+ errorCode: z.ZodString;
177
+ details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
178
+ }, z.core.$strip>;
179
+ }>;
180
+ export declare const putIntegrationContentFilterContract: import("@lokalise/api-contracts").PayloadRouteDefinition<z.ZodObject<{
181
+ id: z.ZodOptional<z.ZodGUID>;
182
+ name: z.ZodString;
183
+ definition: z.ZodUnion<readonly [z.ZodArray<z.ZodObject<{
184
+ relation: z.ZodEnum<{
185
+ AND: "AND";
186
+ OR: "OR";
187
+ }>;
188
+ object: z.ZodString;
189
+ option: z.ZodEnum<{
190
+ contains: "contains";
191
+ containsAll: "containsAll";
192
+ endsWith: "endsWith";
193
+ equals: "equals";
194
+ notContains: "notContains";
195
+ notContainsAll: "notContainsAll";
196
+ notEquals: "notEquals";
197
+ startsWith: "startsWith";
198
+ within: "within";
199
+ }>;
200
+ values: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodObject<{
201
+ kind: z.ZodLiteral<"relative">;
202
+ amount: z.ZodNumber;
203
+ unit: z.ZodEnum<{
204
+ days: "days";
205
+ hours: "hours";
206
+ }>;
207
+ }, z.core.$strip>]>>;
208
+ }, z.core.$strip>>, z.ZodObject<{
209
+ filter: z.ZodString;
210
+ }, z.core.$strip>]>;
211
+ }, z.core.$strip>, z.ZodObject<{
212
+ id: z.ZodGUID;
213
+ name: z.ZodString;
214
+ definition: z.ZodUnion<readonly [z.ZodArray<z.ZodObject<{
215
+ relation: z.ZodEnum<{
216
+ AND: "AND";
217
+ OR: "OR";
218
+ }>;
219
+ object: z.ZodString;
220
+ option: z.ZodEnum<{
221
+ contains: "contains";
222
+ containsAll: "containsAll";
223
+ endsWith: "endsWith";
224
+ equals: "equals";
225
+ notContains: "notContains";
226
+ notContainsAll: "notContainsAll";
227
+ notEquals: "notEquals";
228
+ startsWith: "startsWith";
229
+ within: "within";
230
+ }>;
231
+ values: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodObject<{
232
+ kind: z.ZodLiteral<"relative">;
233
+ amount: z.ZodNumber;
234
+ unit: z.ZodEnum<{
235
+ days: "days";
236
+ hours: "hours";
237
+ }>;
238
+ }, z.core.$strip>]>>;
239
+ }, z.core.$strip>>, z.ZodObject<{
240
+ filter: z.ZodString;
241
+ }, z.core.$strip>]>;
242
+ createdAt: z.ZodString;
243
+ updatedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
244
+ }, z.core.$strip>, z.ZodObject<{
245
+ integrationId: z.ZodGUID;
246
+ }, z.core.$strip>, undefined, z.ZodObject<{
247
+ authorization: z.ZodOptional<z.ZodString>;
248
+ }, z.core.$strip>, undefined, false, false, {
249
+ 400: z.ZodObject<{
250
+ message: z.ZodString;
251
+ errorCode: z.ZodString;
252
+ details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
253
+ }, z.core.$strip>;
254
+ 401: z.ZodObject<{
255
+ message: z.ZodString;
256
+ errorCode: z.ZodString;
257
+ details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
258
+ }, z.core.$strip>;
259
+ 404: z.ZodObject<{
260
+ message: z.ZodString;
261
+ errorCode: z.ZodString;
262
+ details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
263
+ }, z.core.$strip>;
264
+ 409: z.ZodObject<{
265
+ message: z.ZodString;
266
+ errorCode: z.ZodString;
267
+ details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
268
+ }, z.core.$strip>;
269
+ }>;
270
+ export declare const deleteIntegrationContentFilterContract: import("@lokalise/api-contracts").DeleteRouteDefinition<z.ZodUndefined, z.ZodObject<{
271
+ integrationId: z.ZodGUID;
272
+ filterId: z.ZodGUID;
273
+ }, z.core.$strip>, undefined, z.ZodObject<{
274
+ authorization: z.ZodOptional<z.ZodString>;
275
+ }, z.core.$strip>, undefined, false, true, {
276
+ 401: z.ZodObject<{
277
+ message: z.ZodString;
278
+ errorCode: z.ZodString;
279
+ details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
280
+ }, z.core.$strip>;
281
+ 404: z.ZodObject<{
282
+ message: z.ZodString;
283
+ errorCode: z.ZodString;
284
+ details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
285
+ }, z.core.$strip>;
286
+ }>;
@@ -39,4 +39,56 @@ export const deleteContentFilterContract = buildRestContract({
39
39
  requestHeaderSchema: AUTHORIZATION_HEADER_SCHEMA,
40
40
  pathResolver: ({ filterId }) => `/v1/filters/${filterId}`,
41
41
  });
42
+ const INTEGRATION_FILTER_PATH_PARAMS = z.object({
43
+ integrationId: z.guid(),
44
+ });
45
+ const INTEGRATION_FILTER_ITEM_PATH_PARAMS = INTEGRATION_FILTER_PATH_PARAMS.extend({
46
+ filterId: z.guid(),
47
+ });
48
+ export const getIntegrationContentFiltersContract = buildRestContract({
49
+ visibility: 'internal',
50
+ method: 'get',
51
+ summary: 'List saved integration filters',
52
+ description: 'Get all saved filters for an integration',
53
+ successResponseBodySchema: GET_CONTENT_FILTERS_RESPONSE,
54
+ responseSchemasByStatusCode: {
55
+ 401: COMMON_ERROR_RESPONSE_SCHEMA_V2,
56
+ 404: COMMON_ERROR_RESPONSE_SCHEMA_V2,
57
+ },
58
+ requestPathParamsSchema: INTEGRATION_FILTER_PATH_PARAMS,
59
+ requestHeaderSchema: AUTHORIZATION_HEADER_SCHEMA,
60
+ pathResolver: ({ integrationId }) => `/v1/integrations/${integrationId}/filters`,
61
+ });
62
+ export const putIntegrationContentFilterContract = buildRestContract({
63
+ visibility: 'internal',
64
+ method: 'put',
65
+ summary: 'Create or update a saved integration filter',
66
+ description: 'Upsert an integration filter',
67
+ requestBodySchema: PUT_CONTENT_FILTER_REQUEST_BODY,
68
+ successResponseBodySchema: CONTENT_FILTER_SCHEMA,
69
+ responseSchemasByStatusCode: {
70
+ 400: COMMON_ERROR_RESPONSE_SCHEMA_V2,
71
+ 401: COMMON_ERROR_RESPONSE_SCHEMA_V2,
72
+ 404: COMMON_ERROR_RESPONSE_SCHEMA_V2,
73
+ 409: COMMON_ERROR_RESPONSE_SCHEMA_V2,
74
+ },
75
+ requestPathParamsSchema: INTEGRATION_FILTER_PATH_PARAMS,
76
+ requestHeaderSchema: AUTHORIZATION_HEADER_SCHEMA,
77
+ pathResolver: ({ integrationId }) => `/v1/integrations/${integrationId}/filters`,
78
+ });
79
+ export const deleteIntegrationContentFilterContract = buildRestContract({
80
+ visibility: 'internal',
81
+ method: 'delete',
82
+ summary: 'Delete an existing integration filter',
83
+ description: 'Delete an integration filter by ID',
84
+ successResponseBodySchema: z.undefined(),
85
+ isEmptyResponseExpected: true,
86
+ responseSchemasByStatusCode: {
87
+ 401: COMMON_ERROR_RESPONSE_SCHEMA_V2,
88
+ 404: COMMON_ERROR_RESPONSE_SCHEMA_V2,
89
+ },
90
+ requestPathParamsSchema: INTEGRATION_FILTER_ITEM_PATH_PARAMS,
91
+ requestHeaderSchema: AUTHORIZATION_HEADER_SCHEMA,
92
+ pathResolver: ({ integrationId, filterId }) => `/v1/integrations/${integrationId}/filters/${filterId}`,
93
+ });
42
94
  //# sourceMappingURL=filterApiSchemas.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"filterApiSchemas.js","sourceRoot":"","sources":["../../../src/schemas/filter/filterApiSchemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAA;AAC3D,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAA;AAC1B,OAAO,EACL,2BAA2B,EAC3B,+BAA+B,GAChC,MAAM,4BAA4B,CAAA;AACnC,OAAO,EACL,0BAA0B,EAC1B,qBAAqB,EACrB,4BAA4B,EAC5B,+BAA+B,GAChC,MAAM,oBAAoB,CAAA;AAE3B,M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