@wix/auto_sdk_crm_labels 1.0.60 → 1.0.61
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/build/cjs/index.d.ts +5 -15
- package/build/cjs/index.js +20 -278
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.js +6 -264
- package/build/cjs/index.typings.js.map +1 -1
- package/build/es/index.d.mts +5 -15
- package/build/es/index.mjs +20 -268
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.mjs +6 -254
- package/build/es/index.typings.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +5 -15
- package/build/internal/cjs/index.js +20 -278
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.js +6 -264
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/es/index.d.mts +5 -15
- package/build/internal/es/index.mjs +20 -268
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.mjs +6 -254
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/package.json +2 -2
package/build/cjs/index.d.ts
CHANGED
|
@@ -2,9 +2,7 @@ import { HttpClient, NonNullablePaths, EventDefinition, MaybeContext, BuildRESTF
|
|
|
2
2
|
import { ListLabelsOptions, ListLabelsResponse, FindOrCreateLabelOptions, FindOrCreateLabelResponse, FindOrCreateLabelApplicationErrors, GetLabelOptions, ContactLabel, RenameLabel, RenameLabelOptions, LabelCreatedEnvelope, LabelDeletedEnvelope, LabelUpdatedEnvelope, ContactLabelQuery, QueryLabelsOptions, typedQueryLabels, LabelsQueryBuilder } from './index.typings.js';
|
|
3
3
|
export { AccountInfo, AccountInfoMetadata, ActionEvent, BaseEventMetadata, CommonQueryWithEntityContext, ContactLabelNamespace, ContactLabelQuerySpec, DeleteLabelRequest, DeleteLabelResponse, DomainEvent, DomainEventBodyOneOf, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, EventMetadata, FindOrCreateLabelRequest, GdprListRequest, GdprListResponse, GetLabelByLegacyIdRequest, GetLabelByLegacyIdResponse, GetLabelRequest, GetLabelResponse, IdentificationData, IdentificationDataIdOneOf, LabelType, LabelTypeWithLiterals, LabelsQueryResult, LabelsQuotaReached, ListLabelNamespacesRequest, ListLabelNamespacesResponse, ListLabelsRequest, MessageEnvelope, Paging, PagingMetadata, PurgeRequest, PurgeResponse, Query, QueryLabelsApplicationErrors, QueryLabelsRequest, QueryLabelsResponse, RestoreInfo, SortOrder, SortOrderWithLiterals, Sorting, UpdateLabelRequest, UpdateLabelResponse, WebhookIdentityType, WebhookIdentityTypeWithLiterals, utils } from './index.typings.js';
|
|
4
4
|
|
|
5
|
-
declare function listLabels$1(httpClient: HttpClient
|
|
6
|
-
validateRequestSchema?: boolean;
|
|
7
|
-
}): ListLabelsSignature;
|
|
5
|
+
declare function listLabels$1(httpClient: HttpClient): ListLabelsSignature;
|
|
8
6
|
interface ListLabelsSignature {
|
|
9
7
|
/**
|
|
10
8
|
* Lists all contact labels for a site.
|
|
@@ -12,9 +10,7 @@ interface ListLabelsSignature {
|
|
|
12
10
|
*/
|
|
13
11
|
(options?: ListLabelsOptions): Promise<NonNullablePaths<ListLabelsResponse, `labels` | `labels.${number}.key` | `labels.${number}.displayName` | `labels.${number}.labelType`, 4>>;
|
|
14
12
|
}
|
|
15
|
-
declare function findOrCreateLabel$1(httpClient: HttpClient
|
|
16
|
-
validateRequestSchema?: boolean;
|
|
17
|
-
}): FindOrCreateLabelSignature;
|
|
13
|
+
declare function findOrCreateLabel$1(httpClient: HttpClient): FindOrCreateLabelSignature;
|
|
18
14
|
interface FindOrCreateLabelSignature {
|
|
19
15
|
/**
|
|
20
16
|
* Retrieves a label with a specified name, or creates one if it doesn't exist.
|
|
@@ -42,9 +38,7 @@ interface FindOrCreateLabelSignature {
|
|
|
42
38
|
__applicationErrorsType?: FindOrCreateLabelApplicationErrors;
|
|
43
39
|
}>;
|
|
44
40
|
}
|
|
45
|
-
declare function getLabel$1(httpClient: HttpClient
|
|
46
|
-
validateRequestSchema?: boolean;
|
|
47
|
-
}): GetLabelSignature;
|
|
41
|
+
declare function getLabel$1(httpClient: HttpClient): GetLabelSignature;
|
|
48
42
|
interface GetLabelSignature {
|
|
49
43
|
/**
|
|
50
44
|
* Retrieves a label by the specified label key.
|
|
@@ -57,9 +51,7 @@ interface GetLabelSignature {
|
|
|
57
51
|
*/
|
|
58
52
|
(key: string, options?: GetLabelOptions): Promise<NonNullablePaths<ContactLabel, `key` | `displayName` | `labelType`, 2>>;
|
|
59
53
|
}
|
|
60
|
-
declare function renameLabel$1(httpClient: HttpClient
|
|
61
|
-
validateRequestSchema?: boolean;
|
|
62
|
-
}): RenameLabelSignature;
|
|
54
|
+
declare function renameLabel$1(httpClient: HttpClient): RenameLabelSignature;
|
|
63
55
|
interface RenameLabelSignature {
|
|
64
56
|
/**
|
|
65
57
|
* Renames a label.
|
|
@@ -73,9 +65,7 @@ interface RenameLabelSignature {
|
|
|
73
65
|
*/
|
|
74
66
|
(key: string, label: NonNullablePaths<RenameLabel, `displayName`, 2>, options?: RenameLabelOptions): Promise<NonNullablePaths<ContactLabel, `key` | `displayName` | `labelType`, 2>>;
|
|
75
67
|
}
|
|
76
|
-
declare function deleteLabel$1(httpClient: HttpClient
|
|
77
|
-
validateRequestSchema?: boolean;
|
|
78
|
-
}): DeleteLabelSignature;
|
|
68
|
+
declare function deleteLabel$1(httpClient: HttpClient): DeleteLabelSignature;
|
|
79
69
|
interface DeleteLabelSignature {
|
|
80
70
|
/**
|
|
81
71
|
* Deletes the specified label from a site and removes it from the contacts it applies to.
|
package/build/cjs/index.js
CHANGED
|
@@ -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.ts
|
|
@@ -297,236 +287,6 @@ function queryLabels(payload) {
|
|
|
297
287
|
|
|
298
288
|
// src/contacts-v4-label-labels.universal.ts
|
|
299
289
|
var import_transform_paths2 = require("@wix/sdk-runtime/transformations/transform-paths");
|
|
300
|
-
|
|
301
|
-
// src/contacts-v4-label-labels.schemas.ts
|
|
302
|
-
var z = __toESM(require("zod"));
|
|
303
|
-
var ListLabelsRequest = z.object({
|
|
304
|
-
options: z.object({
|
|
305
|
-
labelType: z.enum(["SYSTEM", "USER_DEFINED", "WIX_APP_DEFINED"]).optional(),
|
|
306
|
-
namespace: z.string().describe("Filter for labels in the specified namespace.").min(3).max(25).optional().nullable(),
|
|
307
|
-
startsWith: z.string().describe(
|
|
308
|
-
"Filter for labels where `displayName` starts with the specified case-sensitive string."
|
|
309
|
-
).min(1).max(180).optional().nullable(),
|
|
310
|
-
sort: z.object({
|
|
311
|
-
fieldName: z.string().describe("Name of the field to sort by.").max(3e3).optional(),
|
|
312
|
-
order: z.enum(["ASC", "DESC"]).optional()
|
|
313
|
-
}).describe("Sorting options.").optional(),
|
|
314
|
-
paging: z.object({
|
|
315
|
-
limit: z.number().int().describe(
|
|
316
|
-
"Number of items to return.\n\nDefaults to `1000`. <br>\nMaximum: `2000`."
|
|
317
|
-
).min(0).optional().nullable(),
|
|
318
|
-
offset: z.number().int().describe("Number of items to skip in the current sort order.").min(0).optional().nullable()
|
|
319
|
-
}).describe("Paging options.").optional(),
|
|
320
|
-
language: z.string().optional().nullable()
|
|
321
|
-
}).optional()
|
|
322
|
-
});
|
|
323
|
-
var ListLabelsResponse = z.object({
|
|
324
|
-
labels: z.array(
|
|
325
|
-
z.object({
|
|
326
|
-
namespace: z.string().describe(
|
|
327
|
-
"Label namespace.\n\nLabels created by calling the Find Or Create Label method\nare automatically assigned to the `custom` namespace."
|
|
328
|
-
).min(1).max(25).optional().nullable(),
|
|
329
|
-
namespaceDisplayName: z.string().describe(
|
|
330
|
-
"Display name for the namespace,\nused to organize the list of labels in the site dashboard."
|
|
331
|
-
).min(1).max(180).optional().nullable(),
|
|
332
|
-
key: z.string().describe(
|
|
333
|
-
"Label key.\n\n`key` is generated when the label is created.\nIt can't be modified, even if `displayName` is updated."
|
|
334
|
-
).min(1).max(80).optional(),
|
|
335
|
-
displayName: z.string().describe("Label display name shown in the dashboard.").min(1).max(180).optional(),
|
|
336
|
-
labelType: z.enum(["SYSTEM", "USER_DEFINED", "WIX_APP_DEFINED"]).describe("Label type indicating how the label was created.").optional(),
|
|
337
|
-
_createdDate: z.date().describe("Date and time the label was created.").optional().nullable(),
|
|
338
|
-
_updatedDate: z.date().describe("Date and time the label was last updated.").optional().nullable()
|
|
339
|
-
})
|
|
340
|
-
).optional(),
|
|
341
|
-
metadata: z.object({
|
|
342
|
-
count: z.number().int().describe("Number of items returned.").optional().nullable(),
|
|
343
|
-
offset: z.number().int().describe("Requested offset.").optional().nullable(),
|
|
344
|
-
total: z.number().int().describe("Number of items that matched the query.").optional().nullable(),
|
|
345
|
-
tooManyToCount: z.boolean().describe(
|
|
346
|
-
"Indicates if `total` calculation timed out before the response was sent.\nTypically this happens if there is a large set of results."
|
|
347
|
-
).optional().nullable()
|
|
348
|
-
}).describe("Metadata for the page of results.").optional()
|
|
349
|
-
});
|
|
350
|
-
var FindOrCreateLabelRequest = z.object({
|
|
351
|
-
displayName: z.string().describe(
|
|
352
|
-
"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."
|
|
353
|
-
).min(1).max(180),
|
|
354
|
-
options: z.object({
|
|
355
|
-
language: z.string().describe(
|
|
356
|
-
"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."
|
|
357
|
-
).optional().nullable()
|
|
358
|
-
}).describe("Language options.").optional()
|
|
359
|
-
});
|
|
360
|
-
var FindOrCreateLabelResponse = z.object({
|
|
361
|
-
label: z.object({
|
|
362
|
-
namespace: z.string().describe(
|
|
363
|
-
"Label namespace.\n\nLabels created by calling the Find Or Create Label method\nare automatically assigned to the `custom` namespace."
|
|
364
|
-
).min(1).max(25).optional().nullable(),
|
|
365
|
-
namespaceDisplayName: z.string().describe(
|
|
366
|
-
"Display name for the namespace,\nused to organize the list of labels in the site dashboard."
|
|
367
|
-
).min(1).max(180).optional().nullable(),
|
|
368
|
-
key: z.string().describe(
|
|
369
|
-
"Label key.\n\n`key` is generated when the label is created.\nIt can't be modified, even if `displayName` is updated."
|
|
370
|
-
).min(1).max(80).optional(),
|
|
371
|
-
displayName: z.string().describe("Label display name shown in the dashboard.").min(1).max(180).optional(),
|
|
372
|
-
labelType: z.enum(["SYSTEM", "USER_DEFINED", "WIX_APP_DEFINED"]).describe("Label type indicating how the label was created.").optional(),
|
|
373
|
-
_createdDate: z.date().describe("Date and time the label was created.").optional().nullable(),
|
|
374
|
-
_updatedDate: z.date().describe("Date and time the label was last updated.").optional().nullable()
|
|
375
|
-
}).describe("Label that was found or created.").optional(),
|
|
376
|
-
newLabel: z.boolean().describe(
|
|
377
|
-
"Indicates whether the label was just created or already existed.\n\nReturns `true` if the label was just created."
|
|
378
|
-
).optional()
|
|
379
|
-
});
|
|
380
|
-
var GetLabelRequest = z.object({
|
|
381
|
-
key: z.string().describe(
|
|
382
|
-
"Label key.\n\n`key` is generated when the label is created.\nIt can't be modified, even if `displayName` is updated."
|
|
383
|
-
).min(1).max(80),
|
|
384
|
-
options: z.object({
|
|
385
|
-
language: z.string().describe(
|
|
386
|
-
"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."
|
|
387
|
-
).optional().nullable()
|
|
388
|
-
}).describe("Language options.").optional()
|
|
389
|
-
});
|
|
390
|
-
var GetLabelResponse = z.object({
|
|
391
|
-
namespace: z.string().describe(
|
|
392
|
-
"Label namespace.\n\nLabels created by calling the Find Or Create Label method\nare automatically assigned to the `custom` namespace."
|
|
393
|
-
).min(1).max(25).optional().nullable(),
|
|
394
|
-
namespaceDisplayName: z.string().describe(
|
|
395
|
-
"Display name for the namespace,\nused to organize the list of labels in the site dashboard."
|
|
396
|
-
).min(1).max(180).optional().nullable(),
|
|
397
|
-
key: z.string().describe(
|
|
398
|
-
"Label key.\n\n`key` is generated when the label is created.\nIt can't be modified, even if `displayName` is updated."
|
|
399
|
-
).min(1).max(80).optional(),
|
|
400
|
-
displayName: z.string().describe("Label display name shown in the dashboard.").min(1).max(180).optional(),
|
|
401
|
-
labelType: z.enum(["SYSTEM", "USER_DEFINED", "WIX_APP_DEFINED"]).describe("Label type indicating how the label was created.").optional(),
|
|
402
|
-
_createdDate: z.date().describe("Date and time the label was created.").optional().nullable(),
|
|
403
|
-
_updatedDate: z.date().describe("Date and time the label was last updated.").optional().nullable()
|
|
404
|
-
});
|
|
405
|
-
var RenameLabelRequest = z.object({
|
|
406
|
-
key: z.string().describe(
|
|
407
|
-
"Label key.\n\n`key` is generated when the label is created.\nIt can't be modified, even if `displayName` is updated."
|
|
408
|
-
).min(1).max(80),
|
|
409
|
-
label: z.object({
|
|
410
|
-
namespace: z.string().describe(
|
|
411
|
-
"Label namespace.\n\nLabels created by calling the Find Or Create Label method\nare automatically assigned to the `custom` namespace."
|
|
412
|
-
).min(1).max(25).optional().nullable(),
|
|
413
|
-
namespaceDisplayName: z.string().describe(
|
|
414
|
-
"Display name for the namespace,\nused to organize the list of labels in the site dashboard."
|
|
415
|
-
).min(1).max(180).optional().nullable(),
|
|
416
|
-
key: z.string().describe(
|
|
417
|
-
"Label key.\n\n`key` is generated when the label is created.\nIt can't be modified, even if `displayName` is updated."
|
|
418
|
-
).min(1).max(80).optional(),
|
|
419
|
-
displayName: z.string().describe("Label display name shown in the dashboard.").min(1).max(180),
|
|
420
|
-
labelType: z.enum(["SYSTEM", "USER_DEFINED", "WIX_APP_DEFINED"]).optional(),
|
|
421
|
-
_createdDate: z.date().describe("Date and time the label was created.").optional().nullable(),
|
|
422
|
-
_updatedDate: z.date().describe("Date and time the label was last updated.").optional().nullable()
|
|
423
|
-
}).describe("Label to rename. "),
|
|
424
|
-
options: z.object({
|
|
425
|
-
language: z.string().describe(
|
|
426
|
-
"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."
|
|
427
|
-
).optional().nullable()
|
|
428
|
-
}).describe("Language options.").optional()
|
|
429
|
-
});
|
|
430
|
-
var RenameLabelResponse = z.object({
|
|
431
|
-
namespace: z.string().describe(
|
|
432
|
-
"Label namespace.\n\nLabels created by calling the Find Or Create Label method\nare automatically assigned to the `custom` namespace."
|
|
433
|
-
).min(1).max(25).optional().nullable(),
|
|
434
|
-
namespaceDisplayName: z.string().describe(
|
|
435
|
-
"Display name for the namespace,\nused to organize the list of labels in the site dashboard."
|
|
436
|
-
).min(1).max(180).optional().nullable(),
|
|
437
|
-
key: z.string().describe(
|
|
438
|
-
"Label key.\n\n`key` is generated when the label is created.\nIt can't be modified, even if `displayName` is updated."
|
|
439
|
-
).min(1).max(80).optional(),
|
|
440
|
-
displayName: z.string().describe("Label display name shown in the dashboard.").min(1).max(180).optional(),
|
|
441
|
-
labelType: z.enum(["SYSTEM", "USER_DEFINED", "WIX_APP_DEFINED"]).describe("Label type indicating how the label was created.").optional(),
|
|
442
|
-
_createdDate: z.date().describe("Date and time the label was created.").optional().nullable(),
|
|
443
|
-
_updatedDate: z.date().describe("Date and time the label was last updated.").optional().nullable()
|
|
444
|
-
});
|
|
445
|
-
var DeleteLabelRequest = z.object({
|
|
446
|
-
key: z.string().describe("Label key to delete.").min(1).max(80)
|
|
447
|
-
});
|
|
448
|
-
var DeleteLabelResponse = z.object({});
|
|
449
|
-
var QueryLabelsRequest = z.object({
|
|
450
|
-
query: z.object({
|
|
451
|
-
filter: z.object({
|
|
452
|
-
key: z.object({
|
|
453
|
-
$eq: z.string(),
|
|
454
|
-
$in: z.array(z.string()),
|
|
455
|
-
$ne: z.string()
|
|
456
|
-
}).partial().strict().optional(),
|
|
457
|
-
displayName: z.object({
|
|
458
|
-
$eq: z.string(),
|
|
459
|
-
$in: z.array(z.string()),
|
|
460
|
-
$ne: z.string(),
|
|
461
|
-
$startsWith: z.string()
|
|
462
|
-
}).partial().strict().optional(),
|
|
463
|
-
_createdDate: 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
|
-
_updatedDate: z.object({
|
|
472
|
-
$eq: z.string(),
|
|
473
|
-
$gt: z.string(),
|
|
474
|
-
$gte: z.string(),
|
|
475
|
-
$lt: z.string(),
|
|
476
|
-
$lte: z.string(),
|
|
477
|
-
$ne: z.string()
|
|
478
|
-
}).partial().strict().optional(),
|
|
479
|
-
namespace: z.object({ $eq: z.string(), $ne: z.string() }).partial().strict().optional(),
|
|
480
|
-
labelType: z.union([
|
|
481
|
-
z.string(),
|
|
482
|
-
z.object({ $eq: z.string() }).partial().strict()
|
|
483
|
-
]).optional(),
|
|
484
|
-
$and: z.array(z.any()).optional(),
|
|
485
|
-
$or: z.array(z.any()).optional(),
|
|
486
|
-
$not: z.any().optional()
|
|
487
|
-
}).strict().optional(),
|
|
488
|
-
sort: z.array(
|
|
489
|
-
z.object({
|
|
490
|
-
fieldName: z.enum(["displayName", "_createdDate", "_updatedDate"]).optional(),
|
|
491
|
-
order: z.enum(["ASC", "DESC"]).optional()
|
|
492
|
-
})
|
|
493
|
-
).optional()
|
|
494
|
-
}).catchall(z.any()).describe("Query options."),
|
|
495
|
-
options: z.object({
|
|
496
|
-
language: z.string().describe(
|
|
497
|
-
"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."
|
|
498
|
-
).optional().nullable()
|
|
499
|
-
}).describe("Language options.").optional()
|
|
500
|
-
});
|
|
501
|
-
var QueryLabelsResponse = z.object({
|
|
502
|
-
labels: z.array(
|
|
503
|
-
z.object({
|
|
504
|
-
namespace: z.string().describe(
|
|
505
|
-
"Label namespace.\n\nLabels created by calling the Find Or Create Label method\nare automatically assigned to the `custom` namespace."
|
|
506
|
-
).min(1).max(25).optional().nullable(),
|
|
507
|
-
namespaceDisplayName: z.string().describe(
|
|
508
|
-
"Display name for the namespace,\nused to organize the list of labels in the site dashboard."
|
|
509
|
-
).min(1).max(180).optional().nullable(),
|
|
510
|
-
key: z.string().describe(
|
|
511
|
-
"Label key.\n\n`key` is generated when the label is created.\nIt can't be modified, even if `displayName` is updated."
|
|
512
|
-
).min(1).max(80).optional(),
|
|
513
|
-
displayName: z.string().describe("Label display name shown in the dashboard.").min(1).max(180).optional(),
|
|
514
|
-
labelType: z.enum(["SYSTEM", "USER_DEFINED", "WIX_APP_DEFINED"]).describe("Label type indicating how the label was created.").optional(),
|
|
515
|
-
_createdDate: z.date().describe("Date and time the label was created.").optional().nullable(),
|
|
516
|
-
_updatedDate: z.date().describe("Date and time the label was last updated.").optional().nullable()
|
|
517
|
-
})
|
|
518
|
-
).optional(),
|
|
519
|
-
pagingMetadata: z.object({
|
|
520
|
-
count: z.number().int().describe("Number of items returned.").optional().nullable(),
|
|
521
|
-
offset: z.number().int().describe("Requested offset.").optional().nullable(),
|
|
522
|
-
total: z.number().int().describe("Number of items that matched the query.").optional().nullable(),
|
|
523
|
-
tooManyToCount: z.boolean().describe(
|
|
524
|
-
"Indicates if `total` calculation timed out before the response was sent.\nTypically this happens if there is a large set of results."
|
|
525
|
-
).optional().nullable()
|
|
526
|
-
}).describe("Details on the paged set of results returned.").optional()
|
|
527
|
-
});
|
|
528
|
-
|
|
529
|
-
// src/contacts-v4-label-labels.universal.ts
|
|
530
290
|
var import_query_builder_utils = require("@wix/sdk-runtime/query-builder-utils");
|
|
531
291
|
var LabelType = /* @__PURE__ */ ((LabelType2) => {
|
|
532
292
|
LabelType2["SYSTEM"] = "SYSTEM";
|
|
@@ -548,10 +308,7 @@ var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
|
|
|
548
308
|
return WebhookIdentityType2;
|
|
549
309
|
})(WebhookIdentityType || {});
|
|
550
310
|
async function listLabels2(options) {
|
|
551
|
-
const { httpClient, sideEffects
|
|
552
|
-
if (validateRequestSchema) {
|
|
553
|
-
ListLabelsRequest.parse({ options });
|
|
554
|
-
}
|
|
311
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
555
312
|
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
556
313
|
labelType: options?.labelType,
|
|
557
314
|
namespace: options?.namespace,
|
|
@@ -588,10 +345,7 @@ async function listLabels2(options) {
|
|
|
588
345
|
}
|
|
589
346
|
}
|
|
590
347
|
async function findOrCreateLabel2(displayName, options) {
|
|
591
|
-
const { httpClient, sideEffects
|
|
592
|
-
if (validateRequestSchema) {
|
|
593
|
-
FindOrCreateLabelRequest.parse({ displayName, options });
|
|
594
|
-
}
|
|
348
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
595
349
|
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
596
350
|
displayName,
|
|
597
351
|
language: options?.language
|
|
@@ -620,10 +374,7 @@ async function findOrCreateLabel2(displayName, options) {
|
|
|
620
374
|
}
|
|
621
375
|
}
|
|
622
376
|
async function getLabel2(key, options) {
|
|
623
|
-
const { httpClient, sideEffects
|
|
624
|
-
if (validateRequestSchema) {
|
|
625
|
-
GetLabelRequest.parse({ key, options });
|
|
626
|
-
}
|
|
377
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
627
378
|
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
628
379
|
key,
|
|
629
380
|
language: options?.language
|
|
@@ -649,10 +400,7 @@ async function getLabel2(key, options) {
|
|
|
649
400
|
}
|
|
650
401
|
}
|
|
651
402
|
async function renameLabel(key, label, options) {
|
|
652
|
-
const { httpClient, sideEffects
|
|
653
|
-
if (validateRequestSchema) {
|
|
654
|
-
RenameLabelRequest.parse({ key, label, options });
|
|
655
|
-
}
|
|
403
|
+
const { httpClient, sideEffects } = arguments[3];
|
|
656
404
|
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
657
405
|
label: { ...label, key },
|
|
658
406
|
language: options?.language
|
|
@@ -681,10 +429,7 @@ async function renameLabel(key, label, options) {
|
|
|
681
429
|
}
|
|
682
430
|
}
|
|
683
431
|
async function deleteLabel2(key) {
|
|
684
|
-
const { httpClient, sideEffects
|
|
685
|
-
if (validateRequestSchema) {
|
|
686
|
-
DeleteLabelRequest.parse({ key });
|
|
687
|
-
}
|
|
432
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
688
433
|
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({ key });
|
|
689
434
|
const reqOpts = deleteLabel(payload);
|
|
690
435
|
sideEffects?.onSiteCall?.();
|
|
@@ -752,10 +497,7 @@ function queryLabels2(options) {
|
|
|
752
497
|
});
|
|
753
498
|
}
|
|
754
499
|
async function typedQueryLabels(query, options) {
|
|
755
|
-
const { httpClient, sideEffects
|
|
756
|
-
if (validateRequestSchema) {
|
|
757
|
-
QueryLabelsRequest.parse({ query, options });
|
|
758
|
-
}
|
|
500
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
759
501
|
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
760
502
|
query,
|
|
761
503
|
...options
|
|
@@ -787,58 +529,58 @@ var utils = {
|
|
|
787
529
|
};
|
|
788
530
|
|
|
789
531
|
// src/contacts-v4-label-labels.public.ts
|
|
790
|
-
function listLabels3(httpClient
|
|
532
|
+
function listLabels3(httpClient) {
|
|
791
533
|
return (options) => listLabels2(
|
|
792
534
|
options,
|
|
793
535
|
// @ts-ignore
|
|
794
|
-
{ httpClient
|
|
536
|
+
{ httpClient }
|
|
795
537
|
);
|
|
796
538
|
}
|
|
797
|
-
function findOrCreateLabel3(httpClient
|
|
539
|
+
function findOrCreateLabel3(httpClient) {
|
|
798
540
|
return (displayName, options) => findOrCreateLabel2(
|
|
799
541
|
displayName,
|
|
800
542
|
options,
|
|
801
543
|
// @ts-ignore
|
|
802
|
-
{ httpClient
|
|
544
|
+
{ httpClient }
|
|
803
545
|
);
|
|
804
546
|
}
|
|
805
|
-
function getLabel3(httpClient
|
|
547
|
+
function getLabel3(httpClient) {
|
|
806
548
|
return (key, options) => getLabel2(
|
|
807
549
|
key,
|
|
808
550
|
options,
|
|
809
551
|
// @ts-ignore
|
|
810
|
-
{ httpClient
|
|
552
|
+
{ httpClient }
|
|
811
553
|
);
|
|
812
554
|
}
|
|
813
|
-
function renameLabel2(httpClient
|
|
555
|
+
function renameLabel2(httpClient) {
|
|
814
556
|
return (key, label, options) => renameLabel(
|
|
815
557
|
key,
|
|
816
558
|
label,
|
|
817
559
|
options,
|
|
818
560
|
// @ts-ignore
|
|
819
|
-
{ httpClient
|
|
561
|
+
{ httpClient }
|
|
820
562
|
);
|
|
821
563
|
}
|
|
822
|
-
function deleteLabel3(httpClient
|
|
564
|
+
function deleteLabel3(httpClient) {
|
|
823
565
|
return (key) => deleteLabel2(
|
|
824
566
|
key,
|
|
825
567
|
// @ts-ignore
|
|
826
|
-
{ httpClient
|
|
568
|
+
{ httpClient }
|
|
827
569
|
);
|
|
828
570
|
}
|
|
829
|
-
function queryLabels3(httpClient
|
|
571
|
+
function queryLabels3(httpClient) {
|
|
830
572
|
return (options) => queryLabels2(
|
|
831
573
|
options,
|
|
832
574
|
// @ts-ignore
|
|
833
|
-
{ httpClient
|
|
575
|
+
{ httpClient }
|
|
834
576
|
);
|
|
835
577
|
}
|
|
836
|
-
function typedQueryLabels2(httpClient
|
|
578
|
+
function typedQueryLabels2(httpClient) {
|
|
837
579
|
return (query, options) => typedQueryLabels(
|
|
838
580
|
query,
|
|
839
581
|
options,
|
|
840
582
|
// @ts-ignore
|
|
841
|
-
{ httpClient
|
|
583
|
+
{ httpClient }
|
|
842
584
|
);
|
|
843
585
|
}
|
|
844
586
|
var onLabelCreated = (0, import_sdk_types.EventDefinition)(
|