@wix/auto_sdk_crm_labels 1.0.60 → 1.0.62

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.
@@ -246,236 +246,6 @@ function queryLabels(payload) {
246
246
 
247
247
  // src/contacts-v4-label-labels.universal.ts
248
248
  import { transformPaths as transformPaths2 } from "@wix/sdk-runtime/transformations/transform-paths";
249
-
250
- // src/contacts-v4-label-labels.schemas.ts
251
- import * as z from "zod";
252
- var ListLabelsRequest = z.object({
253
- options: z.object({
254
- labelType: z.enum(["SYSTEM", "USER_DEFINED", "WIX_APP_DEFINED"]).optional(),
255
- namespace: z.string().describe("Filter for labels in the specified namespace.").min(3).max(25).optional().nullable(),
256
- startsWith: z.string().describe(
257
- "Filter for labels where `displayName` starts with the specified case-sensitive string."
258
- ).min(1).max(180).optional().nullable(),
259
- sort: z.object({
260
- fieldName: z.string().describe("Name of the field to sort by.").max(3e3).optional(),
261
- order: z.enum(["ASC", "DESC"]).optional()
262
- }).describe("Sorting options.").optional(),
263
- paging: z.object({
264
- limit: z.number().int().describe(
265
- "Number of items to return.\n\nDefaults to `1000`. <br>\nMaximum: `2000`."
266
- ).min(0).optional().nullable(),
267
- offset: z.number().int().describe("Number of items to skip in the current sort order.").min(0).optional().nullable()
268
- }).describe("Paging options.").optional(),
269
- language: z.string().optional().nullable()
270
- }).optional()
271
- });
272
- var ListLabelsResponse = z.object({
273
- labels: z.array(
274
- z.object({
275
- namespace: z.string().describe(
276
- "Label namespace.\n\nLabels created by calling the Find Or Create Label method\nare automatically assigned to the `custom` namespace."
277
- ).min(1).max(25).optional().nullable(),
278
- namespaceDisplayName: z.string().describe(
279
- "Display name for the namespace,\nused to organize the list of labels in the site dashboard."
280
- ).min(1).max(180).optional().nullable(),
281
- key: z.string().describe(
282
- "Label key.\n\n`key` is generated when the label is created.\nIt can't be modified, even if `displayName` is updated."
283
- ).min(1).max(80).optional(),
284
- displayName: z.string().describe("Label display name shown in the dashboard.").min(1).max(180).optional(),
285
- labelType: z.enum(["SYSTEM", "USER_DEFINED", "WIX_APP_DEFINED"]).describe("Label type indicating how the label was created.").optional(),
286
- _createdDate: z.date().describe("Date and time the label was created.").optional().nullable(),
287
- _updatedDate: z.date().describe("Date and time the label was last updated.").optional().nullable()
288
- })
289
- ).optional(),
290
- metadata: z.object({
291
- count: z.number().int().describe("Number of items returned.").optional().nullable(),
292
- offset: z.number().int().describe("Requested offset.").optional().nullable(),
293
- total: z.number().int().describe("Number of items that matched the query.").optional().nullable(),
294
- tooManyToCount: z.boolean().describe(
295
- "Indicates if `total` calculation timed out before the response was sent.\nTypically this happens if there is a large set of results."
296
- ).optional().nullable()
297
- }).describe("Metadata for the page of results.").optional()
298
- });
299
- var FindOrCreateLabelRequest = z.object({
300
- displayName: z.string().describe(
301
- "Display name to retrieve or create.\n\nIf an existing label is an exact match\nfor the specified display name,\nthe existing label is returned.\nIf not, a new label is created and returned."
302
- ).min(1).max(180),
303
- options: z.object({
304
- language: z.string().describe(
305
- "Language for localization.\n2-letter language code in [ISO 639-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) format."
306
- ).optional().nullable()
307
- }).describe("Language options.").optional()
308
- });
309
- var FindOrCreateLabelResponse = z.object({
310
- label: z.object({
311
- namespace: z.string().describe(
312
- "Label namespace.\n\nLabels created by calling the Find Or Create Label method\nare automatically assigned to the `custom` namespace."
313
- ).min(1).max(25).optional().nullable(),
314
- namespaceDisplayName: z.string().describe(
315
- "Display name for the namespace,\nused to organize the list of labels in the site dashboard."
316
- ).min(1).max(180).optional().nullable(),
317
- key: z.string().describe(
318
- "Label key.\n\n`key` is generated when the label is created.\nIt can't be modified, even if `displayName` is updated."
319
- ).min(1).max(80).optional(),
320
- displayName: z.string().describe("Label display name shown in the dashboard.").min(1).max(180).optional(),
321
- labelType: z.enum(["SYSTEM", "USER_DEFINED", "WIX_APP_DEFINED"]).describe("Label type indicating how the label was created.").optional(),
322
- _createdDate: z.date().describe("Date and time the label was created.").optional().nullable(),
323
- _updatedDate: z.date().describe("Date and time the label was last updated.").optional().nullable()
324
- }).describe("Label that was found or created.").optional(),
325
- newLabel: z.boolean().describe(
326
- "Indicates whether the label was just created or already existed.\n\nReturns `true` if the label was just created."
327
- ).optional()
328
- });
329
- var GetLabelRequest = z.object({
330
- key: z.string().describe(
331
- "Label key.\n\n`key` is generated when the label is created.\nIt can't be modified, even if `displayName` is updated."
332
- ).min(1).max(80),
333
- options: z.object({
334
- language: z.string().describe(
335
- "Language for localization.\n2-letter language code in [ISO 639-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) format."
336
- ).optional().nullable()
337
- }).describe("Language options.").optional()
338
- });
339
- var GetLabelResponse = z.object({
340
- namespace: z.string().describe(
341
- "Label namespace.\n\nLabels created by calling the Find Or Create Label method\nare automatically assigned to the `custom` namespace."
342
- ).min(1).max(25).optional().nullable(),
343
- namespaceDisplayName: z.string().describe(
344
- "Display name for the namespace,\nused to organize the list of labels in the site dashboard."
345
- ).min(1).max(180).optional().nullable(),
346
- key: z.string().describe(
347
- "Label key.\n\n`key` is generated when the label is created.\nIt can't be modified, even if `displayName` is updated."
348
- ).min(1).max(80).optional(),
349
- displayName: z.string().describe("Label display name shown in the dashboard.").min(1).max(180).optional(),
350
- labelType: z.enum(["SYSTEM", "USER_DEFINED", "WIX_APP_DEFINED"]).describe("Label type indicating how the label was created.").optional(),
351
- _createdDate: z.date().describe("Date and time the label was created.").optional().nullable(),
352
- _updatedDate: z.date().describe("Date and time the label was last updated.").optional().nullable()
353
- });
354
- var RenameLabelRequest = z.object({
355
- key: z.string().describe(
356
- "Label key.\n\n`key` is generated when the label is created.\nIt can't be modified, even if `displayName` is updated."
357
- ).min(1).max(80),
358
- label: z.object({
359
- namespace: z.string().describe(
360
- "Label namespace.\n\nLabels created by calling the Find Or Create Label method\nare automatically assigned to the `custom` namespace."
361
- ).min(1).max(25).optional().nullable(),
362
- namespaceDisplayName: z.string().describe(
363
- "Display name for the namespace,\nused to organize the list of labels in the site dashboard."
364
- ).min(1).max(180).optional().nullable(),
365
- key: z.string().describe(
366
- "Label key.\n\n`key` is generated when the label is created.\nIt can't be modified, even if `displayName` is updated."
367
- ).min(1).max(80).optional(),
368
- displayName: z.string().describe("Label display name shown in the dashboard.").min(1).max(180),
369
- labelType: z.enum(["SYSTEM", "USER_DEFINED", "WIX_APP_DEFINED"]).optional(),
370
- _createdDate: z.date().describe("Date and time the label was created.").optional().nullable(),
371
- _updatedDate: z.date().describe("Date and time the label was last updated.").optional().nullable()
372
- }).describe("Label to rename. "),
373
- options: z.object({
374
- language: z.string().describe(
375
- "Language for localization.\n2-letter language code in [ISO 639-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) format."
376
- ).optional().nullable()
377
- }).describe("Language options.").optional()
378
- });
379
- var RenameLabelResponse = z.object({
380
- namespace: z.string().describe(
381
- "Label namespace.\n\nLabels created by calling the Find Or Create Label method\nare automatically assigned to the `custom` namespace."
382
- ).min(1).max(25).optional().nullable(),
383
- namespaceDisplayName: z.string().describe(
384
- "Display name for the namespace,\nused to organize the list of labels in the site dashboard."
385
- ).min(1).max(180).optional().nullable(),
386
- key: z.string().describe(
387
- "Label key.\n\n`key` is generated when the label is created.\nIt can't be modified, even if `displayName` is updated."
388
- ).min(1).max(80).optional(),
389
- displayName: z.string().describe("Label display name shown in the dashboard.").min(1).max(180).optional(),
390
- labelType: z.enum(["SYSTEM", "USER_DEFINED", "WIX_APP_DEFINED"]).describe("Label type indicating how the label was created.").optional(),
391
- _createdDate: z.date().describe("Date and time the label was created.").optional().nullable(),
392
- _updatedDate: z.date().describe("Date and time the label was last updated.").optional().nullable()
393
- });
394
- var DeleteLabelRequest = z.object({
395
- key: z.string().describe("Label key to delete.").min(1).max(80)
396
- });
397
- var DeleteLabelResponse = z.object({});
398
- var QueryLabelsRequest = z.object({
399
- query: z.object({
400
- filter: z.object({
401
- key: z.object({
402
- $eq: z.string(),
403
- $in: z.array(z.string()),
404
- $ne: z.string()
405
- }).partial().strict().optional(),
406
- displayName: z.object({
407
- $eq: z.string(),
408
- $in: z.array(z.string()),
409
- $ne: z.string(),
410
- $startsWith: z.string()
411
- }).partial().strict().optional(),
412
- _createdDate: z.object({
413
- $eq: z.string(),
414
- $gt: z.string(),
415
- $gte: z.string(),
416
- $lt: z.string(),
417
- $lte: z.string(),
418
- $ne: z.string()
419
- }).partial().strict().optional(),
420
- _updatedDate: z.object({
421
- $eq: z.string(),
422
- $gt: z.string(),
423
- $gte: z.string(),
424
- $lt: z.string(),
425
- $lte: z.string(),
426
- $ne: z.string()
427
- }).partial().strict().optional(),
428
- namespace: z.object({ $eq: z.string(), $ne: z.string() }).partial().strict().optional(),
429
- labelType: z.union([
430
- z.string(),
431
- z.object({ $eq: z.string() }).partial().strict()
432
- ]).optional(),
433
- $and: z.array(z.any()).optional(),
434
- $or: z.array(z.any()).optional(),
435
- $not: z.any().optional()
436
- }).strict().optional(),
437
- sort: z.array(
438
- z.object({
439
- fieldName: z.enum(["displayName", "_createdDate", "_updatedDate"]).optional(),
440
- order: z.enum(["ASC", "DESC"]).optional()
441
- })
442
- ).optional()
443
- }).catchall(z.any()).describe("Query options."),
444
- options: z.object({
445
- language: z.string().describe(
446
- "Language for localization.\n2-letter language code in [ISO 639-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) format."
447
- ).optional().nullable()
448
- }).describe("Language options.").optional()
449
- });
450
- var QueryLabelsResponse = z.object({
451
- labels: z.array(
452
- z.object({
453
- namespace: z.string().describe(
454
- "Label namespace.\n\nLabels created by calling the Find Or Create Label method\nare automatically assigned to the `custom` namespace."
455
- ).min(1).max(25).optional().nullable(),
456
- namespaceDisplayName: z.string().describe(
457
- "Display name for the namespace,\nused to organize the list of labels in the site dashboard."
458
- ).min(1).max(180).optional().nullable(),
459
- key: z.string().describe(
460
- "Label key.\n\n`key` is generated when the label is created.\nIt can't be modified, even if `displayName` is updated."
461
- ).min(1).max(80).optional(),
462
- displayName: z.string().describe("Label display name shown in the dashboard.").min(1).max(180).optional(),
463
- labelType: z.enum(["SYSTEM", "USER_DEFINED", "WIX_APP_DEFINED"]).describe("Label type indicating how the label was created.").optional(),
464
- _createdDate: z.date().describe("Date and time the label was created.").optional().nullable(),
465
- _updatedDate: z.date().describe("Date and time the label was last updated.").optional().nullable()
466
- })
467
- ).optional(),
468
- pagingMetadata: z.object({
469
- count: z.number().int().describe("Number of items returned.").optional().nullable(),
470
- offset: z.number().int().describe("Requested offset.").optional().nullable(),
471
- total: z.number().int().describe("Number of items that matched the query.").optional().nullable(),
472
- tooManyToCount: z.boolean().describe(
473
- "Indicates if `total` calculation timed out before the response was sent.\nTypically this happens if there is a large set of results."
474
- ).optional().nullable()
475
- }).describe("Details on the paged set of results returned.").optional()
476
- });
477
-
478
- // src/contacts-v4-label-labels.universal.ts
479
249
  import { createQueryUtils } from "@wix/sdk-runtime/query-builder-utils";
480
250
  var LabelType = /* @__PURE__ */ ((LabelType2) => {
481
251
  LabelType2["SYSTEM"] = "SYSTEM";
@@ -497,10 +267,7 @@ var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
497
267
  return WebhookIdentityType2;
498
268
  })(WebhookIdentityType || {});
499
269
  async function listLabels2(options) {
500
- const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
501
- if (validateRequestSchema) {
502
- ListLabelsRequest.parse({ options });
503
- }
270
+ const { httpClient, sideEffects } = arguments[1];
504
271
  const payload = renameKeysFromSDKRequestToRESTRequest({
505
272
  labelType: options?.labelType,
506
273
  namespace: options?.namespace,
@@ -537,10 +304,7 @@ async function listLabels2(options) {
537
304
  }
538
305
  }
539
306
  async function findOrCreateLabel2(displayName, options) {
540
- const { httpClient, sideEffects, validateRequestSchema } = arguments[2];
541
- if (validateRequestSchema) {
542
- FindOrCreateLabelRequest.parse({ displayName, options });
543
- }
307
+ const { httpClient, sideEffects } = arguments[2];
544
308
  const payload = renameKeysFromSDKRequestToRESTRequest({
545
309
  displayName,
546
310
  language: options?.language
@@ -569,10 +333,7 @@ async function findOrCreateLabel2(displayName, options) {
569
333
  }
570
334
  }
571
335
  async function getLabel2(key, options) {
572
- const { httpClient, sideEffects, validateRequestSchema } = arguments[2];
573
- if (validateRequestSchema) {
574
- GetLabelRequest.parse({ key, options });
575
- }
336
+ const { httpClient, sideEffects } = arguments[2];
576
337
  const payload = renameKeysFromSDKRequestToRESTRequest({
577
338
  key,
578
339
  language: options?.language
@@ -598,10 +359,7 @@ async function getLabel2(key, options) {
598
359
  }
599
360
  }
600
361
  async function renameLabel(key, label, options) {
601
- const { httpClient, sideEffects, validateRequestSchema } = arguments[3];
602
- if (validateRequestSchema) {
603
- RenameLabelRequest.parse({ key, label, options });
604
- }
362
+ const { httpClient, sideEffects } = arguments[3];
605
363
  const payload = renameKeysFromSDKRequestToRESTRequest({
606
364
  label: { ...label, key },
607
365
  language: options?.language
@@ -630,10 +388,7 @@ async function renameLabel(key, label, options) {
630
388
  }
631
389
  }
632
390
  async function deleteLabel2(key) {
633
- const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
634
- if (validateRequestSchema) {
635
- DeleteLabelRequest.parse({ key });
636
- }
391
+ const { httpClient, sideEffects } = arguments[1];
637
392
  const payload = renameKeysFromSDKRequestToRESTRequest({ key });
638
393
  const reqOpts = deleteLabel(payload);
639
394
  sideEffects?.onSiteCall?.();
@@ -701,10 +456,7 @@ function queryLabels2(options) {
701
456
  });
702
457
  }
703
458
  async function typedQueryLabels(query, options) {
704
- const { httpClient, sideEffects, validateRequestSchema } = arguments[2];
705
- if (validateRequestSchema) {
706
- QueryLabelsRequest.parse({ query, options });
707
- }
459
+ const { httpClient, sideEffects } = arguments[2];
708
460
  const payload = renameKeysFromSDKRequestToRESTRequest({
709
461
  query,
710
462
  ...options