@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.
@@ -1,9 +1,7 @@
1
1
  "use strict";
2
- var __create = Object.create;
3
2
  var __defProp = Object.defineProperty;
4
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __getProtoOf = Object.getPrototypeOf;
7
5
  var __hasOwnProp = Object.prototype.hasOwnProperty;
8
6
  var __export = (target, all) => {
9
7
  for (var name in all)
@@ -17,14 +15,6 @@ var __copyProps = (to, from, except, desc) => {
17
15
  }
18
16
  return to;
19
17
  };
20
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
- // If the importer is in node compatibility mode or this is not an ESM
22
- // file that has been converted to a CommonJS file using a Babel-
23
- // compatible transform (i.e. "__esModule" has not been set), then set
24
- // "default" to the CommonJS "module.exports" for node compatibility.
25
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
- mod
27
- ));
28
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
19
 
30
20
  // index.typings.ts
@@ -289,236 +279,6 @@ function queryLabels(payload) {
289
279
 
290
280
  // src/contacts-v4-label-labels.universal.ts
291
281
  var import_transform_paths2 = require("@wix/sdk-runtime/transformations/transform-paths");
292
-
293
- // src/contacts-v4-label-labels.schemas.ts
294
- var z = __toESM(require("zod"));
295
- var ListLabelsRequest = z.object({
296
- options: z.object({
297
- labelType: z.enum(["SYSTEM", "USER_DEFINED", "WIX_APP_DEFINED"]).optional(),
298
- namespace: z.string().describe("Filter for labels in the specified namespace.").min(3).max(25).optional().nullable(),
299
- startsWith: z.string().describe(
300
- "Filter for labels where `displayName` starts with the specified case-sensitive string."
301
- ).min(1).max(180).optional().nullable(),
302
- sort: z.object({
303
- fieldName: z.string().describe("Name of the field to sort by.").max(3e3).optional(),
304
- order: z.enum(["ASC", "DESC"]).optional()
305
- }).describe("Sorting options.").optional(),
306
- paging: z.object({
307
- limit: z.number().int().describe(
308
- "Number of items to return.\n\nDefaults to `1000`. <br>\nMaximum: `2000`."
309
- ).min(0).optional().nullable(),
310
- offset: z.number().int().describe("Number of items to skip in the current sort order.").min(0).optional().nullable()
311
- }).describe("Paging options.").optional(),
312
- language: z.string().optional().nullable()
313
- }).optional()
314
- });
315
- var ListLabelsResponse = z.object({
316
- labels: z.array(
317
- z.object({
318
- namespace: z.string().describe(
319
- "Label namespace.\n\nLabels created by calling the Find Or Create Label method\nare automatically assigned to the `custom` namespace."
320
- ).min(1).max(25).optional().nullable(),
321
- namespaceDisplayName: z.string().describe(
322
- "Display name for the namespace,\nused to organize the list of labels in the site dashboard."
323
- ).min(1).max(180).optional().nullable(),
324
- key: z.string().describe(
325
- "Label key.\n\n`key` is generated when the label is created.\nIt can't be modified, even if `displayName` is updated."
326
- ).min(1).max(80).optional(),
327
- displayName: z.string().describe("Label display name shown in the dashboard.").min(1).max(180).optional(),
328
- labelType: z.enum(["SYSTEM", "USER_DEFINED", "WIX_APP_DEFINED"]).describe("Label type indicating how the label was created.").optional(),
329
- _createdDate: z.date().describe("Date and time the label was created.").optional().nullable(),
330
- _updatedDate: z.date().describe("Date and time the label was last updated.").optional().nullable()
331
- })
332
- ).optional(),
333
- metadata: z.object({
334
- count: z.number().int().describe("Number of items returned.").optional().nullable(),
335
- offset: z.number().int().describe("Requested offset.").optional().nullable(),
336
- total: z.number().int().describe("Number of items that matched the query.").optional().nullable(),
337
- tooManyToCount: z.boolean().describe(
338
- "Indicates if `total` calculation timed out before the response was sent.\nTypically this happens if there is a large set of results."
339
- ).optional().nullable()
340
- }).describe("Metadata for the page of results.").optional()
341
- });
342
- var FindOrCreateLabelRequest = z.object({
343
- displayName: z.string().describe(
344
- "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."
345
- ).min(1).max(180),
346
- options: z.object({
347
- language: z.string().describe(
348
- "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."
349
- ).optional().nullable()
350
- }).describe("Language options.").optional()
351
- });
352
- var FindOrCreateLabelResponse = z.object({
353
- label: z.object({
354
- namespace: z.string().describe(
355
- "Label namespace.\n\nLabels created by calling the Find Or Create Label method\nare automatically assigned to the `custom` namespace."
356
- ).min(1).max(25).optional().nullable(),
357
- namespaceDisplayName: z.string().describe(
358
- "Display name for the namespace,\nused to organize the list of labels in the site dashboard."
359
- ).min(1).max(180).optional().nullable(),
360
- key: z.string().describe(
361
- "Label key.\n\n`key` is generated when the label is created.\nIt can't be modified, even if `displayName` is updated."
362
- ).min(1).max(80).optional(),
363
- displayName: z.string().describe("Label display name shown in the dashboard.").min(1).max(180).optional(),
364
- labelType: z.enum(["SYSTEM", "USER_DEFINED", "WIX_APP_DEFINED"]).describe("Label type indicating how the label was created.").optional(),
365
- _createdDate: z.date().describe("Date and time the label was created.").optional().nullable(),
366
- _updatedDate: z.date().describe("Date and time the label was last updated.").optional().nullable()
367
- }).describe("Label that was found or created.").optional(),
368
- newLabel: z.boolean().describe(
369
- "Indicates whether the label was just created or already existed.\n\nReturns `true` if the label was just created."
370
- ).optional()
371
- });
372
- var GetLabelRequest = z.object({
373
- key: z.string().describe(
374
- "Label key.\n\n`key` is generated when the label is created.\nIt can't be modified, even if `displayName` is updated."
375
- ).min(1).max(80),
376
- options: z.object({
377
- language: z.string().describe(
378
- "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."
379
- ).optional().nullable()
380
- }).describe("Language options.").optional()
381
- });
382
- var GetLabelResponse = z.object({
383
- namespace: z.string().describe(
384
- "Label namespace.\n\nLabels created by calling the Find Or Create Label method\nare automatically assigned to the `custom` namespace."
385
- ).min(1).max(25).optional().nullable(),
386
- namespaceDisplayName: z.string().describe(
387
- "Display name for the namespace,\nused to organize the list of labels in the site dashboard."
388
- ).min(1).max(180).optional().nullable(),
389
- key: z.string().describe(
390
- "Label key.\n\n`key` is generated when the label is created.\nIt can't be modified, even if `displayName` is updated."
391
- ).min(1).max(80).optional(),
392
- displayName: z.string().describe("Label display name shown in the dashboard.").min(1).max(180).optional(),
393
- labelType: z.enum(["SYSTEM", "USER_DEFINED", "WIX_APP_DEFINED"]).describe("Label type indicating how the label was created.").optional(),
394
- _createdDate: z.date().describe("Date and time the label was created.").optional().nullable(),
395
- _updatedDate: z.date().describe("Date and time the label was last updated.").optional().nullable()
396
- });
397
- var RenameLabelRequest = z.object({
398
- key: z.string().describe(
399
- "Label key.\n\n`key` is generated when the label is created.\nIt can't be modified, even if `displayName` is updated."
400
- ).min(1).max(80),
401
- label: z.object({
402
- namespace: z.string().describe(
403
- "Label namespace.\n\nLabels created by calling the Find Or Create Label method\nare automatically assigned to the `custom` namespace."
404
- ).min(1).max(25).optional().nullable(),
405
- namespaceDisplayName: z.string().describe(
406
- "Display name for the namespace,\nused to organize the list of labels in the site dashboard."
407
- ).min(1).max(180).optional().nullable(),
408
- key: z.string().describe(
409
- "Label key.\n\n`key` is generated when the label is created.\nIt can't be modified, even if `displayName` is updated."
410
- ).min(1).max(80).optional(),
411
- displayName: z.string().describe("Label display name shown in the dashboard.").min(1).max(180),
412
- labelType: z.enum(["SYSTEM", "USER_DEFINED", "WIX_APP_DEFINED"]).optional(),
413
- _createdDate: z.date().describe("Date and time the label was created.").optional().nullable(),
414
- _updatedDate: z.date().describe("Date and time the label was last updated.").optional().nullable()
415
- }).describe("Label to rename. "),
416
- options: z.object({
417
- language: z.string().describe(
418
- "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."
419
- ).optional().nullable()
420
- }).describe("Language options.").optional()
421
- });
422
- var RenameLabelResponse = z.object({
423
- namespace: z.string().describe(
424
- "Label namespace.\n\nLabels created by calling the Find Or Create Label method\nare automatically assigned to the `custom` namespace."
425
- ).min(1).max(25).optional().nullable(),
426
- namespaceDisplayName: z.string().describe(
427
- "Display name for the namespace,\nused to organize the list of labels in the site dashboard."
428
- ).min(1).max(180).optional().nullable(),
429
- key: z.string().describe(
430
- "Label key.\n\n`key` is generated when the label is created.\nIt can't be modified, even if `displayName` is updated."
431
- ).min(1).max(80).optional(),
432
- displayName: z.string().describe("Label display name shown in the dashboard.").min(1).max(180).optional(),
433
- labelType: z.enum(["SYSTEM", "USER_DEFINED", "WIX_APP_DEFINED"]).describe("Label type indicating how the label was created.").optional(),
434
- _createdDate: z.date().describe("Date and time the label was created.").optional().nullable(),
435
- _updatedDate: z.date().describe("Date and time the label was last updated.").optional().nullable()
436
- });
437
- var DeleteLabelRequest = z.object({
438
- key: z.string().describe("Label key to delete.").min(1).max(80)
439
- });
440
- var DeleteLabelResponse = z.object({});
441
- var QueryLabelsRequest = z.object({
442
- query: z.object({
443
- filter: z.object({
444
- key: z.object({
445
- $eq: z.string(),
446
- $in: z.array(z.string()),
447
- $ne: z.string()
448
- }).partial().strict().optional(),
449
- displayName: z.object({
450
- $eq: z.string(),
451
- $in: z.array(z.string()),
452
- $ne: z.string(),
453
- $startsWith: z.string()
454
- }).partial().strict().optional(),
455
- _createdDate: z.object({
456
- $eq: z.string(),
457
- $gt: z.string(),
458
- $gte: z.string(),
459
- $lt: z.string(),
460
- $lte: z.string(),
461
- $ne: z.string()
462
- }).partial().strict().optional(),
463
- _updatedDate: z.object({
464
- $eq: z.string(),
465
- $gt: z.string(),
466
- $gte: z.string(),
467
- $lt: z.string(),
468
- $lte: z.string(),
469
- $ne: z.string()
470
- }).partial().strict().optional(),
471
- namespace: z.object({ $eq: z.string(), $ne: z.string() }).partial().strict().optional(),
472
- labelType: z.union([
473
- z.string(),
474
- z.object({ $eq: z.string() }).partial().strict()
475
- ]).optional(),
476
- $and: z.array(z.any()).optional(),
477
- $or: z.array(z.any()).optional(),
478
- $not: z.any().optional()
479
- }).strict().optional(),
480
- sort: z.array(
481
- z.object({
482
- fieldName: z.enum(["displayName", "_createdDate", "_updatedDate"]).optional(),
483
- order: z.enum(["ASC", "DESC"]).optional()
484
- })
485
- ).optional()
486
- }).catchall(z.any()).describe("Query options."),
487
- options: z.object({
488
- language: z.string().describe(
489
- "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."
490
- ).optional().nullable()
491
- }).describe("Language options.").optional()
492
- });
493
- var QueryLabelsResponse = z.object({
494
- labels: z.array(
495
- z.object({
496
- namespace: z.string().describe(
497
- "Label namespace.\n\nLabels created by calling the Find Or Create Label method\nare automatically assigned to the `custom` namespace."
498
- ).min(1).max(25).optional().nullable(),
499
- namespaceDisplayName: z.string().describe(
500
- "Display name for the namespace,\nused to organize the list of labels in the site dashboard."
501
- ).min(1).max(180).optional().nullable(),
502
- key: z.string().describe(
503
- "Label key.\n\n`key` is generated when the label is created.\nIt can't be modified, even if `displayName` is updated."
504
- ).min(1).max(80).optional(),
505
- displayName: z.string().describe("Label display name shown in the dashboard.").min(1).max(180).optional(),
506
- labelType: z.enum(["SYSTEM", "USER_DEFINED", "WIX_APP_DEFINED"]).describe("Label type indicating how the label was created.").optional(),
507
- _createdDate: z.date().describe("Date and time the label was created.").optional().nullable(),
508
- _updatedDate: z.date().describe("Date and time the label was last updated.").optional().nullable()
509
- })
510
- ).optional(),
511
- pagingMetadata: z.object({
512
- count: z.number().int().describe("Number of items returned.").optional().nullable(),
513
- offset: z.number().int().describe("Requested offset.").optional().nullable(),
514
- total: z.number().int().describe("Number of items that matched the query.").optional().nullable(),
515
- tooManyToCount: z.boolean().describe(
516
- "Indicates if `total` calculation timed out before the response was sent.\nTypically this happens if there is a large set of results."
517
- ).optional().nullable()
518
- }).describe("Details on the paged set of results returned.").optional()
519
- });
520
-
521
- // src/contacts-v4-label-labels.universal.ts
522
282
  var import_query_builder_utils = require("@wix/sdk-runtime/query-builder-utils");
523
283
  var LabelType = /* @__PURE__ */ ((LabelType2) => {
524
284
  LabelType2["SYSTEM"] = "SYSTEM";
@@ -540,10 +300,7 @@ var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
540
300
  return WebhookIdentityType2;
541
301
  })(WebhookIdentityType || {});
542
302
  async function listLabels2(options) {
543
- const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
544
- if (validateRequestSchema) {
545
- ListLabelsRequest.parse({ options });
546
- }
303
+ const { httpClient, sideEffects } = arguments[1];
547
304
  const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
548
305
  labelType: options?.labelType,
549
306
  namespace: options?.namespace,
@@ -580,10 +337,7 @@ async function listLabels2(options) {
580
337
  }
581
338
  }
582
339
  async function findOrCreateLabel2(displayName, options) {
583
- const { httpClient, sideEffects, validateRequestSchema } = arguments[2];
584
- if (validateRequestSchema) {
585
- FindOrCreateLabelRequest.parse({ displayName, options });
586
- }
340
+ const { httpClient, sideEffects } = arguments[2];
587
341
  const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
588
342
  displayName,
589
343
  language: options?.language
@@ -612,10 +366,7 @@ async function findOrCreateLabel2(displayName, options) {
612
366
  }
613
367
  }
614
368
  async function getLabel2(key, options) {
615
- const { httpClient, sideEffects, validateRequestSchema } = arguments[2];
616
- if (validateRequestSchema) {
617
- GetLabelRequest.parse({ key, options });
618
- }
369
+ const { httpClient, sideEffects } = arguments[2];
619
370
  const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
620
371
  key,
621
372
  language: options?.language
@@ -641,10 +392,7 @@ async function getLabel2(key, options) {
641
392
  }
642
393
  }
643
394
  async function renameLabel(key, label, options) {
644
- const { httpClient, sideEffects, validateRequestSchema } = arguments[3];
645
- if (validateRequestSchema) {
646
- RenameLabelRequest.parse({ key, label, options });
647
- }
395
+ const { httpClient, sideEffects } = arguments[3];
648
396
  const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
649
397
  label: { ...label, key },
650
398
  language: options?.language
@@ -673,10 +421,7 @@ async function renameLabel(key, label, options) {
673
421
  }
674
422
  }
675
423
  async function deleteLabel2(key) {
676
- const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
677
- if (validateRequestSchema) {
678
- DeleteLabelRequest.parse({ key });
679
- }
424
+ const { httpClient, sideEffects } = arguments[1];
680
425
  const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({ key });
681
426
  const reqOpts = deleteLabel(payload);
682
427
  sideEffects?.onSiteCall?.();
@@ -744,10 +489,7 @@ function queryLabels2(options) {
744
489
  });
745
490
  }
746
491
  async function typedQueryLabels(query, options) {
747
- const { httpClient, sideEffects, validateRequestSchema } = arguments[2];
748
- if (validateRequestSchema) {
749
- QueryLabelsRequest.parse({ query, options });
750
- }
492
+ const { httpClient, sideEffects } = arguments[2];
751
493
  const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
752
494
  query,
753
495
  ...options