@wix/auto_sdk_crm_tasks 1.0.76 → 1.0.77

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.
@@ -2,9 +2,7 @@ import { HttpClient, NonNullablePaths, EventDefinition, MaybeContext, BuildRESTF
2
2
  import { Task, CreateTaskApplicationErrors, UpdateTask, UpdateTaskApplicationErrors, CountTasksOptions, CountTasksResponse, CountTasksApplicationErrors, MoveTaskAfterOptions, MoveTaskAfterApplicationErrors, TaskCreatedEnvelope, TaskDeletedEnvelope, TaskOverdueEnvelope, TaskUpdatedEnvelope, TasksQueryBuilder, TaskQuery, typedQueryTasks } from './index.typings.js';
3
3
  export { AccountInfo, AccountInfoMetadata, ActionEvent, BaseEventMetadata, CommonQueryWithEntityContext, ContactInfo, ContactNotFoundError, CountTasksRequest, CreateTaskRequest, CreateTaskResponse, CursorPaging, CursorPagingMetadata, CursorQuery, CursorQueryPagingMethodOneOf, Cursors, DeleteCompletedTasksRequest, DeleteCompletedTasksResponse, DeleteTaskRequest, DeleteTaskResponse, DomainEvent, DomainEventBodyOneOf, Empty, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, EventMetadata, GetTaskRequest, GetTaskResponse, IdentificationData, IdentificationDataIdOneOf, MessageEnvelope, MoveTaskAfterRequest, MoveTaskAfterResponse, Paging, PagingMetadataV2, QueryTasksInternalRequest, QueryTasksInternalResponse, QueryTasksRequest, QueryTasksResponse, QueryV2, QueryV2PagingMethodOneOf, ReminderType, ReminderTypeWithLiterals, RepositionTask, RestoreInfo, SendTasksReminderRequest, SendTasksReminderResponse, SortOrder, SortOrderWithLiterals, Sorting, SourceType, SourceTypeWithLiterals, TaskAssigned, TaskNotFoundError, TaskOverdue, TaskQuerySpec, TaskSource, TaskStatus, TaskStatusWithLiterals, TasksQueryResult, UpdateTaskRequest, UpdateTaskResponse, WebhookIdentityType, WebhookIdentityTypeWithLiterals, utils } from './index.typings.js';
4
4
 
5
- declare function createTask$1(httpClient: HttpClient, __options?: {
6
- validateRequestSchema?: boolean;
7
- }): CreateTaskSignature;
5
+ declare function createTask$1(httpClient: HttpClient): CreateTaskSignature;
8
6
  interface CreateTaskSignature {
9
7
  /**
10
8
  * Creates a new task.
@@ -15,9 +13,7 @@ interface CreateTaskSignature {
15
13
  __applicationErrorsType?: CreateTaskApplicationErrors;
16
14
  }>;
17
15
  }
18
- declare function getTask$1(httpClient: HttpClient, __options?: {
19
- validateRequestSchema?: boolean;
20
- }): GetTaskSignature;
16
+ declare function getTask$1(httpClient: HttpClient): GetTaskSignature;
21
17
  interface GetTaskSignature {
22
18
  /**
23
19
  * Retrieves a task by ID.
@@ -26,9 +22,7 @@ interface GetTaskSignature {
26
22
  */
27
23
  (taskId: string): Promise<NonNullablePaths<Task, `status` | `source.sourceType`, 3>>;
28
24
  }
29
- declare function updateTask$1(httpClient: HttpClient, __options?: {
30
- validateRequestSchema?: boolean;
31
- }): UpdateTaskSignature;
25
+ declare function updateTask$1(httpClient: HttpClient): UpdateTaskSignature;
32
26
  interface UpdateTaskSignature {
33
27
  /**
34
28
  * Updates a task.
@@ -45,9 +39,7 @@ interface UpdateTaskSignature {
45
39
  __applicationErrorsType?: UpdateTaskApplicationErrors;
46
40
  }>;
47
41
  }
48
- declare function deleteTask$1(httpClient: HttpClient, __options?: {
49
- validateRequestSchema?: boolean;
50
- }): DeleteTaskSignature;
42
+ declare function deleteTask$1(httpClient: HttpClient): DeleteTaskSignature;
51
43
  interface DeleteTaskSignature {
52
44
  /**
53
45
  * Deletes a task by ID.
@@ -55,9 +47,7 @@ interface DeleteTaskSignature {
55
47
  */
56
48
  (taskId: string): Promise<void>;
57
49
  }
58
- declare function countTasks$1(httpClient: HttpClient, __options?: {
59
- validateRequestSchema?: boolean;
60
- }): CountTasksSignature;
50
+ declare function countTasks$1(httpClient: HttpClient): CountTasksSignature;
61
51
  interface CountTasksSignature {
62
52
  /**
63
53
  * Counts the number of tasks.
@@ -72,9 +62,7 @@ interface CountTasksSignature {
72
62
  __applicationErrorsType?: CountTasksApplicationErrors;
73
63
  }>;
74
64
  }
75
- declare function moveTaskAfter$1(httpClient: HttpClient, __options?: {
76
- validateRequestSchema?: boolean;
77
- }): MoveTaskAfterSignature;
65
+ declare function moveTaskAfter$1(httpClient: HttpClient): MoveTaskAfterSignature;
78
66
  interface MoveTaskAfterSignature {
79
67
  /**
80
68
  * Moves a task specified by ID to be placed after another task in the task display.
@@ -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
@@ -318,330 +308,6 @@ function moveTaskAfter(payload) {
318
308
 
319
309
  // src/crm-tasks-v2-task-tasks.universal.ts
320
310
  var import_transform_paths2 = require("@wix/sdk-runtime/transformations/transform-paths");
321
-
322
- // src/crm-tasks-v2-task-tasks.schemas.ts
323
- var z = __toESM(require("zod"));
324
- var CreateTaskRequest = z.object({
325
- task: z.object({
326
- _id: z.string().describe("Task ID.").regex(
327
- /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
328
- "Must be a valid GUID"
329
- ).optional().nullable(),
330
- revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
331
- "Revision number, which increments by 1 each time the task is updated. To prevent conflicting changes, the existing `revision` must be used when updating a task."
332
- ).optional().nullable(),
333
- title: z.string().describe("Title of the task.").min(1).max(250).optional().nullable(),
334
- description: z.string().describe("Description of the task.").min(1).max(500).optional().nullable(),
335
- _createdDate: z.date().describe("Date and time the task was created.").optional().nullable(),
336
- _updatedDate: z.date().describe("Date and time the task was last updated.").optional().nullable(),
337
- dueDate: z.date().describe("Due date for the task.").optional().nullable(),
338
- status: z.enum(["ACTION_NEEDED", "COMPLETED"]).optional(),
339
- source: z.object({
340
- sourceType: z.enum(["APP", "USER"]).optional(),
341
- appId: z.string().describe("App ID, if the task was created by an app.").regex(
342
- /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
343
- "Must be a valid GUID"
344
- ).optional().nullable(),
345
- userId: z.string().describe("User ID, if the task was created by a Wix user.").regex(
346
- /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
347
- "Must be a valid GUID"
348
- ).optional().nullable()
349
- }).describe("Details about the task source.").optional(),
350
- contact: z.object({
351
- _id: z.string().describe("ID of the contact associated with the task.").regex(
352
- /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
353
- "Must be a valid GUID"
354
- ).optional().nullable(),
355
- firstName: z.string().describe("Contact's first name.").optional().nullable(),
356
- lastName: z.string().describe("Contact's last name.").optional().nullable(),
357
- imageUrl: z.string().describe("Contact's image URL.").optional().nullable(),
358
- email: z.string().describe("Contact's primary email.").optional().nullable(),
359
- phone: z.string().describe("Contact's primary phone.").optional().nullable(),
360
- imageUrlExpirationDate: z.date().describe("Image URL expiration date.").optional().nullable()
361
- }).describe("Information about the contact associated with the task.").optional()
362
- }).describe("Task to create.")
363
- });
364
- var CreateTaskResponse = z.object({
365
- _id: z.string().describe("Task ID.").regex(
366
- /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
367
- "Must be a valid GUID"
368
- ).optional().nullable(),
369
- revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
370
- "Revision number, which increments by 1 each time the task is updated. To prevent conflicting changes, the existing `revision` must be used when updating a task."
371
- ).optional().nullable(),
372
- title: z.string().describe("Title of the task.").min(1).max(250).optional().nullable(),
373
- description: z.string().describe("Description of the task.").min(1).max(500).optional().nullable(),
374
- _createdDate: z.date().describe("Date and time the task was created.").optional().nullable(),
375
- _updatedDate: z.date().describe("Date and time the task was last updated.").optional().nullable(),
376
- dueDate: z.date().describe("Due date for the task.").optional().nullable(),
377
- status: z.enum(["ACTION_NEEDED", "COMPLETED"]).describe("Status of the task.\n\nDefault: `ACTION_NEEDED`").optional(),
378
- source: z.object({
379
- sourceType: z.enum(["APP", "USER"]).describe("How the task was created.").optional(),
380
- appId: z.string().describe("App ID, if the task was created by an app.").regex(
381
- /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
382
- "Must be a valid GUID"
383
- ).optional().nullable(),
384
- userId: z.string().describe("User ID, if the task was created by a Wix user.").regex(
385
- /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
386
- "Must be a valid GUID"
387
- ).optional().nullable()
388
- }).describe("Details about the task source.").optional(),
389
- contact: z.object({
390
- _id: z.string().describe("ID of the contact associated with the task.").regex(
391
- /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
392
- "Must be a valid GUID"
393
- ).optional().nullable(),
394
- firstName: z.string().describe("Contact's first name.").optional().nullable(),
395
- lastName: z.string().describe("Contact's last name.").optional().nullable(),
396
- imageUrl: z.string().describe("Contact's image URL.").optional().nullable(),
397
- email: z.string().describe("Contact's primary email.").optional().nullable(),
398
- phone: z.string().describe("Contact's primary phone.").optional().nullable(),
399
- imageUrlExpirationDate: z.date().describe("Image URL expiration date.").optional().nullable()
400
- }).describe("Information about the contact associated with the task.").optional()
401
- });
402
- var GetTaskRequest = z.object({
403
- taskId: z.string().describe("ID of the task to retrieve.").regex(
404
- /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
405
- "Must be a valid GUID"
406
- )
407
- });
408
- var GetTaskResponse = z.object({
409
- _id: z.string().describe("Task ID.").regex(
410
- /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
411
- "Must be a valid GUID"
412
- ).optional().nullable(),
413
- revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
414
- "Revision number, which increments by 1 each time the task is updated. To prevent conflicting changes, the existing `revision` must be used when updating a task."
415
- ).optional().nullable(),
416
- title: z.string().describe("Title of the task.").min(1).max(250).optional().nullable(),
417
- description: z.string().describe("Description of the task.").min(1).max(500).optional().nullable(),
418
- _createdDate: z.date().describe("Date and time the task was created.").optional().nullable(),
419
- _updatedDate: z.date().describe("Date and time the task was last updated.").optional().nullable(),
420
- dueDate: z.date().describe("Due date for the task.").optional().nullable(),
421
- status: z.enum(["ACTION_NEEDED", "COMPLETED"]).describe("Status of the task.\n\nDefault: `ACTION_NEEDED`").optional(),
422
- source: z.object({
423
- sourceType: z.enum(["APP", "USER"]).describe("How the task was created.").optional(),
424
- appId: z.string().describe("App ID, if the task was created by an app.").regex(
425
- /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
426
- "Must be a valid GUID"
427
- ).optional().nullable(),
428
- userId: z.string().describe("User ID, if the task was created by a Wix user.").regex(
429
- /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
430
- "Must be a valid GUID"
431
- ).optional().nullable()
432
- }).describe("Details about the task source.").optional(),
433
- contact: z.object({
434
- _id: z.string().describe("ID of the contact associated with the task.").regex(
435
- /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
436
- "Must be a valid GUID"
437
- ).optional().nullable(),
438
- firstName: z.string().describe("Contact's first name.").optional().nullable(),
439
- lastName: z.string().describe("Contact's last name.").optional().nullable(),
440
- imageUrl: z.string().describe("Contact's image URL.").optional().nullable(),
441
- email: z.string().describe("Contact's primary email.").optional().nullable(),
442
- phone: z.string().describe("Contact's primary phone.").optional().nullable(),
443
- imageUrlExpirationDate: z.date().describe("Image URL expiration date.").optional().nullable()
444
- }).describe("Information about the contact associated with the task.").optional()
445
- });
446
- var UpdateTaskRequest = z.object({
447
- _id: z.string().describe("Task ID.").regex(
448
- /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
449
- "Must be a valid GUID"
450
- ),
451
- task: z.object({
452
- _id: z.string().describe("Task ID.").regex(
453
- /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
454
- "Must be a valid GUID"
455
- ).optional().nullable(),
456
- revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
457
- "Revision number, which increments by 1 each time the task is updated. To prevent conflicting changes, the existing `revision` must be used when updating a task."
458
- ),
459
- title: z.string().describe("Title of the task.").min(1).max(250).optional().nullable(),
460
- description: z.string().describe("Description of the task.").min(1).max(500).optional().nullable(),
461
- _createdDate: z.date().describe("Date and time the task was created.").optional().nullable(),
462
- _updatedDate: z.date().describe("Date and time the task was last updated.").optional().nullable(),
463
- dueDate: z.date().describe("Due date for the task.").optional().nullable(),
464
- status: z.enum(["ACTION_NEEDED", "COMPLETED"]).optional(),
465
- source: z.object({
466
- sourceType: z.enum(["APP", "USER"]).optional(),
467
- appId: z.string().describe("App ID, if the task was created by an app.").regex(
468
- /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
469
- "Must be a valid GUID"
470
- ).optional().nullable(),
471
- userId: z.string().describe("User ID, if the task was created by a Wix user.").regex(
472
- /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
473
- "Must be a valid GUID"
474
- ).optional().nullable()
475
- }).describe("Details about the task source.").optional(),
476
- contact: z.object({
477
- _id: z.string().describe("ID of the contact associated with the task.").regex(
478
- /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
479
- "Must be a valid GUID"
480
- ).optional().nullable(),
481
- firstName: z.string().describe("Contact's first name.").optional().nullable(),
482
- lastName: z.string().describe("Contact's last name.").optional().nullable(),
483
- imageUrl: z.string().describe("Contact's image URL.").optional().nullable(),
484
- email: z.string().describe("Contact's primary email.").optional().nullable(),
485
- phone: z.string().describe("Contact's primary phone.").optional().nullable(),
486
- imageUrlExpirationDate: z.date().describe("Image URL expiration date.").optional().nullable()
487
- }).describe("Information about the contact associated with the task.").optional()
488
- }).describe("Task to update.")
489
- });
490
- var UpdateTaskResponse = z.object({
491
- _id: z.string().describe("Task ID.").regex(
492
- /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
493
- "Must be a valid GUID"
494
- ).optional().nullable(),
495
- revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
496
- "Revision number, which increments by 1 each time the task is updated. To prevent conflicting changes, the existing `revision` must be used when updating a task."
497
- ).optional().nullable(),
498
- title: z.string().describe("Title of the task.").min(1).max(250).optional().nullable(),
499
- description: z.string().describe("Description of the task.").min(1).max(500).optional().nullable(),
500
- _createdDate: z.date().describe("Date and time the task was created.").optional().nullable(),
501
- _updatedDate: z.date().describe("Date and time the task was last updated.").optional().nullable(),
502
- dueDate: z.date().describe("Due date for the task.").optional().nullable(),
503
- status: z.enum(["ACTION_NEEDED", "COMPLETED"]).describe("Status of the task.\n\nDefault: `ACTION_NEEDED`").optional(),
504
- source: z.object({
505
- sourceType: z.enum(["APP", "USER"]).describe("How the task was created.").optional(),
506
- appId: z.string().describe("App ID, if the task was created by an app.").regex(
507
- /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
508
- "Must be a valid GUID"
509
- ).optional().nullable(),
510
- userId: z.string().describe("User ID, if the task was created by a Wix user.").regex(
511
- /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
512
- "Must be a valid GUID"
513
- ).optional().nullable()
514
- }).describe("Details about the task source.").optional(),
515
- contact: z.object({
516
- _id: z.string().describe("ID of the contact associated with the task.").regex(
517
- /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
518
- "Must be a valid GUID"
519
- ).optional().nullable(),
520
- firstName: z.string().describe("Contact's first name.").optional().nullable(),
521
- lastName: z.string().describe("Contact's last name.").optional().nullable(),
522
- imageUrl: z.string().describe("Contact's image URL.").optional().nullable(),
523
- email: z.string().describe("Contact's primary email.").optional().nullable(),
524
- phone: z.string().describe("Contact's primary phone.").optional().nullable(),
525
- imageUrlExpirationDate: z.date().describe("Image URL expiration date.").optional().nullable()
526
- }).describe("Information about the contact associated with the task.").optional()
527
- });
528
- var DeleteTaskRequest = z.object({
529
- taskId: z.string().describe("ID of the task to delete.").regex(
530
- /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
531
- "Must be a valid GUID"
532
- )
533
- });
534
- var DeleteTaskResponse = z.object({});
535
- var QueryTasksRequest = z.object({
536
- query: z.object({
537
- filter: z.object({
538
- dueDate: z.object({
539
- $eq: z.string(),
540
- $gt: z.string(),
541
- $gte: z.string(),
542
- $lt: z.string(),
543
- $lte: z.string(),
544
- $ne: z.string()
545
- }).partial().strict().optional(),
546
- status: z.object({
547
- $eq: z.string(),
548
- $in: z.array(z.string()),
549
- $ne: z.string(),
550
- $nin: z.array(z.string())
551
- }).partial().strict().optional(),
552
- $and: z.array(z.any()).optional(),
553
- $or: z.array(z.any()).optional(),
554
- $not: z.any().optional()
555
- }).strict().optional(),
556
- sort: z.array(
557
- z.object({
558
- fieldName: z.enum(["dueDate"]).optional(),
559
- order: z.enum(["ASC", "DESC"]).optional()
560
- })
561
- ).optional()
562
- }).catchall(z.any()).describe("Query options.")
563
- });
564
- var QueryTasksResponse = z.object({
565
- tasks: z.array(
566
- z.object({
567
- _id: z.string().describe("Task ID.").regex(
568
- /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
569
- "Must be a valid GUID"
570
- ).optional().nullable(),
571
- revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
572
- "Revision number, which increments by 1 each time the task is updated. To prevent conflicting changes, the existing `revision` must be used when updating a task."
573
- ).optional().nullable(),
574
- title: z.string().describe("Title of the task.").min(1).max(250).optional().nullable(),
575
- description: z.string().describe("Description of the task.").min(1).max(500).optional().nullable(),
576
- _createdDate: z.date().describe("Date and time the task was created.").optional().nullable(),
577
- _updatedDate: z.date().describe("Date and time the task was last updated.").optional().nullable(),
578
- dueDate: z.date().describe("Due date for the task.").optional().nullable(),
579
- status: z.enum(["ACTION_NEEDED", "COMPLETED"]).describe("Status of the task.\n\nDefault: `ACTION_NEEDED`").optional(),
580
- source: z.object({
581
- sourceType: z.enum(["APP", "USER"]).describe("How the task was created.").optional(),
582
- appId: z.string().describe("App ID, if the task was created by an app.").regex(
583
- /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
584
- "Must be a valid GUID"
585
- ).optional().nullable(),
586
- userId: z.string().describe("User ID, if the task was created by a Wix user.").regex(
587
- /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
588
- "Must be a valid GUID"
589
- ).optional().nullable()
590
- }).describe("Details about the task source.").optional(),
591
- contact: z.object({
592
- _id: z.string().describe("ID of the contact associated with the task.").regex(
593
- /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
594
- "Must be a valid GUID"
595
- ).optional().nullable(),
596
- firstName: z.string().describe("Contact's first name.").optional().nullable(),
597
- lastName: z.string().describe("Contact's last name.").optional().nullable(),
598
- imageUrl: z.string().describe("Contact's image URL.").optional().nullable(),
599
- email: z.string().describe("Contact's primary email.").optional().nullable(),
600
- phone: z.string().describe("Contact's primary phone.").optional().nullable(),
601
- imageUrlExpirationDate: z.date().describe("Image URL expiration date.").optional().nullable()
602
- }).describe("Information about the contact associated with the task.").optional()
603
- })
604
- ).optional(),
605
- pagingMetadata: z.object({
606
- count: z.number().int().describe("Number of items returned in the response.").optional().nullable(),
607
- cursors: z.object({
608
- next: z.string().describe("Cursor pointing to next page in the list of results.").optional().nullable(),
609
- prev: z.string().describe(
610
- "Cursor pointing to previous page in the list of results."
611
- ).optional().nullable()
612
- }).describe("Offset that was requested.").optional(),
613
- hasNext: z.boolean().describe(
614
- "Indicates if there are more results after the current page.\nIf `true`, another page of results can be retrieved.\nIf `false`, this is the last page."
615
- ).optional().nullable()
616
- }).describe("Paging metadata.").optional()
617
- });
618
- var CountTasksRequest = z.object({
619
- options: z.object({
620
- filter: z.record(z.string(), z.any()).describe(
621
- 'Filter which tasks to count. See [supported filters](https://dev.wix.com/docs/rest/api-reference/crm/tasks/task-v2/filter-and-sort).\n\nFilter tasks in the following format:\n\n`"filter" : {\n"fieldName1": "value1",\n"fieldName2":{"$operator":"value2"}\n}`\n\nExample of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`.'
622
- ).optional().nullable()
623
- }).describe("Filtering options.").optional()
624
- });
625
- var CountTasksResponse = z.object({
626
- count: z.number().int().describe("The number of tasks that match the specified filter.").optional()
627
- });
628
- var MoveTaskAfterRequest = z.object({
629
- taskId: z.string().describe("ID of the task to move.").regex(
630
- /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
631
- "Must be a valid GUID"
632
- ),
633
- options: z.object({
634
- beforeTaskId: z.string().describe(
635
- "The ID of the task after which the moved task is positioned in the task display.\nIf `beforeTaskId` is not specified, the moved task is positioned first in the task display."
636
- ).regex(
637
- /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
638
- "Must be a valid GUID"
639
- ).optional().nullable()
640
- }).describe("Options for moving the task.").optional()
641
- });
642
- var MoveTaskAfterResponse = z.object({});
643
-
644
- // src/crm-tasks-v2-task-tasks.universal.ts
645
311
  var import_query_builder_utils = require("@wix/sdk-runtime/query-builder-utils");
646
312
  var TaskStatus = /* @__PURE__ */ ((TaskStatus2) => {
647
313
  TaskStatus2["ACTION_NEEDED"] = "ACTION_NEEDED";
@@ -673,10 +339,7 @@ var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
673
339
  return WebhookIdentityType2;
674
340
  })(WebhookIdentityType || {});
675
341
  async function createTask2(task) {
676
- const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
677
- if (validateRequestSchema) {
678
- CreateTaskRequest.parse({ task });
679
- }
342
+ const { httpClient, sideEffects } = arguments[1];
680
343
  const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({ task });
681
344
  const reqOpts = createTask(payload);
682
345
  sideEffects?.onSiteCall?.();
@@ -699,10 +362,7 @@ async function createTask2(task) {
699
362
  }
700
363
  }
701
364
  async function getTask2(taskId) {
702
- const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
703
- if (validateRequestSchema) {
704
- GetTaskRequest.parse({ taskId });
705
- }
365
+ const { httpClient, sideEffects } = arguments[1];
706
366
  const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({ taskId });
707
367
  const reqOpts = getTask(payload);
708
368
  sideEffects?.onSiteCall?.();
@@ -725,10 +385,7 @@ async function getTask2(taskId) {
725
385
  }
726
386
  }
727
387
  async function updateTask2(_id, task) {
728
- const { httpClient, sideEffects, validateRequestSchema } = arguments[2];
729
- if (validateRequestSchema) {
730
- UpdateTaskRequest.parse({ _id, task });
731
- }
388
+ const { httpClient, sideEffects } = arguments[2];
732
389
  const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
733
390
  task: { ...task, id: _id }
734
391
  });
@@ -753,10 +410,7 @@ async function updateTask2(_id, task) {
753
410
  }
754
411
  }
755
412
  async function deleteTask2(taskId) {
756
- const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
757
- if (validateRequestSchema) {
758
- DeleteTaskRequest.parse({ taskId });
759
- }
413
+ const { httpClient, sideEffects } = arguments[1];
760
414
  const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({ taskId });
761
415
  const reqOpts = deleteTask(payload);
762
416
  sideEffects?.onSiteCall?.();
@@ -821,10 +475,7 @@ function queryTasks2() {
821
475
  });
822
476
  }
823
477
  async function typedQueryTasks(query) {
824
- const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
825
- if (validateRequestSchema) {
826
- QueryTasksRequest.parse({ query });
827
- }
478
+ const { httpClient, sideEffects } = arguments[1];
828
479
  const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({ query });
829
480
  const reqOpts = queryTasks(payload);
830
481
  sideEffects?.onSiteCall?.();
@@ -852,10 +503,7 @@ var utils = {
852
503
  }
853
504
  };
854
505
  async function countTasks2(options) {
855
- const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
856
- if (validateRequestSchema) {
857
- CountTasksRequest.parse({ options });
858
- }
506
+ const { httpClient, sideEffects } = arguments[1];
859
507
  const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
860
508
  filter: options?.filter
861
509
  });
@@ -880,10 +528,7 @@ async function countTasks2(options) {
880
528
  }
881
529
  }
882
530
  async function moveTaskAfter2(taskId, options) {
883
- const { httpClient, sideEffects, validateRequestSchema } = arguments[2];
884
- if (validateRequestSchema) {
885
- MoveTaskAfterRequest.parse({ taskId, options });
886
- }
531
+ const { httpClient, sideEffects } = arguments[2];
887
532
  const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
888
533
  taskId,
889
534
  beforeTaskId: options?.beforeTaskId
@@ -913,61 +558,61 @@ async function moveTaskAfter2(taskId, options) {
913
558
  }
914
559
 
915
560
  // src/crm-tasks-v2-task-tasks.public.ts
916
- function createTask3(httpClient, __options) {
561
+ function createTask3(httpClient) {
917
562
  return (task) => createTask2(
918
563
  task,
919
564
  // @ts-ignore
920
- { httpClient, validateRequestSchema: __options?.validateRequestSchema }
565
+ { httpClient }
921
566
  );
922
567
  }
923
- function getTask3(httpClient, __options) {
568
+ function getTask3(httpClient) {
924
569
  return (taskId) => getTask2(
925
570
  taskId,
926
571
  // @ts-ignore
927
- { httpClient, validateRequestSchema: __options?.validateRequestSchema }
572
+ { httpClient }
928
573
  );
929
574
  }
930
- function updateTask3(httpClient, __options) {
575
+ function updateTask3(httpClient) {
931
576
  return (_id, task) => updateTask2(
932
577
  _id,
933
578
  task,
934
579
  // @ts-ignore
935
- { httpClient, validateRequestSchema: __options?.validateRequestSchema }
580
+ { httpClient }
936
581
  );
937
582
  }
938
- function deleteTask3(httpClient, __options) {
583
+ function deleteTask3(httpClient) {
939
584
  return (taskId) => deleteTask2(
940
585
  taskId,
941
586
  // @ts-ignore
942
- { httpClient, validateRequestSchema: __options?.validateRequestSchema }
587
+ { httpClient }
943
588
  );
944
589
  }
945
- function queryTasks3(httpClient, __options) {
590
+ function queryTasks3(httpClient) {
946
591
  return () => queryTasks2(
947
592
  // @ts-ignore
948
- { httpClient, validateRequestSchema: __options?.validateRequestSchema }
593
+ { httpClient }
949
594
  );
950
595
  }
951
- function typedQueryTasks2(httpClient, __options) {
596
+ function typedQueryTasks2(httpClient) {
952
597
  return (query) => typedQueryTasks(
953
598
  query,
954
599
  // @ts-ignore
955
- { httpClient, validateRequestSchema: __options?.validateRequestSchema }
600
+ { httpClient }
956
601
  );
957
602
  }
958
- function countTasks3(httpClient, __options) {
603
+ function countTasks3(httpClient) {
959
604
  return (options) => countTasks2(
960
605
  options,
961
606
  // @ts-ignore
962
- { httpClient, validateRequestSchema: __options?.validateRequestSchema }
607
+ { httpClient }
963
608
  );
964
609
  }
965
- function moveTaskAfter3(httpClient, __options) {
610
+ function moveTaskAfter3(httpClient) {
966
611
  return (taskId, options) => moveTaskAfter2(
967
612
  taskId,
968
613
  options,
969
614
  // @ts-ignore
970
- { httpClient, validateRequestSchema: __options?.validateRequestSchema }
615
+ { httpClient }
971
616
  );
972
617
  }
973
618
  var onTaskCreated = (0, import_sdk_types.EventDefinition)(