@wix/auto_sdk_crm_tasks 1.0.74 → 1.0.76

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.
Files changed (37) hide show
  1. package/build/cjs/index.d.ts +18 -6
  2. package/build/cjs/index.js +384 -29
  3. package/build/cjs/index.js.map +1 -1
  4. package/build/cjs/index.typings.d.ts +31 -31
  5. package/build/cjs/index.typings.js +368 -13
  6. package/build/cjs/index.typings.js.map +1 -1
  7. package/build/cjs/meta.d.ts +31 -31
  8. package/build/cjs/meta.js +6 -6
  9. package/build/cjs/meta.js.map +1 -1
  10. package/build/es/index.d.mts +18 -6
  11. package/build/es/index.mjs +374 -29
  12. package/build/es/index.mjs.map +1 -1
  13. package/build/es/index.typings.d.mts +31 -31
  14. package/build/es/index.typings.mjs +358 -13
  15. package/build/es/index.typings.mjs.map +1 -1
  16. package/build/es/meta.d.mts +31 -31
  17. package/build/es/meta.mjs +6 -6
  18. package/build/es/meta.mjs.map +1 -1
  19. package/build/internal/cjs/index.d.ts +18 -6
  20. package/build/internal/cjs/index.js +384 -29
  21. package/build/internal/cjs/index.js.map +1 -1
  22. package/build/internal/cjs/index.typings.d.ts +31 -31
  23. package/build/internal/cjs/index.typings.js +368 -13
  24. package/build/internal/cjs/index.typings.js.map +1 -1
  25. package/build/internal/cjs/meta.d.ts +31 -31
  26. package/build/internal/cjs/meta.js +6 -6
  27. package/build/internal/cjs/meta.js.map +1 -1
  28. package/build/internal/es/index.d.mts +18 -6
  29. package/build/internal/es/index.mjs +374 -29
  30. package/build/internal/es/index.mjs.map +1 -1
  31. package/build/internal/es/index.typings.d.mts +31 -31
  32. package/build/internal/es/index.typings.mjs +358 -13
  33. package/build/internal/es/index.typings.mjs.map +1 -1
  34. package/build/internal/es/meta.d.mts +31 -31
  35. package/build/internal/es/meta.mjs +6 -6
  36. package/build/internal/es/meta.mjs.map +1 -1
  37. package/package.json +4 -4
@@ -1,7 +1,9 @@
1
1
  "use strict";
2
+ var __create = Object.create;
2
3
  var __defProp = Object.defineProperty;
3
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
5
7
  var __hasOwnProp = Object.prototype.hasOwnProperty;
6
8
  var __export = (target, all) => {
7
9
  for (var name in all)
@@ -15,6 +17,14 @@ var __copyProps = (to, from, except, desc) => {
15
17
  }
16
18
  return to;
17
19
  };
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
+ ));
18
28
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
29
 
20
30
  // index.typings.ts
@@ -299,6 +309,330 @@ function moveTaskAfter(payload) {
299
309
 
300
310
  // src/crm-tasks-v2-task-tasks.universal.ts
301
311
  var import_transform_paths2 = require("@wix/sdk-runtime/transformations/transform-paths");
312
+
313
+ // src/crm-tasks-v2-task-tasks.schemas.ts
314
+ var z = __toESM(require("zod"));
315
+ var CreateTaskRequest = z.object({
316
+ task: z.object({
317
+ _id: z.string().describe("Task ID.").regex(
318
+ /^[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}$/,
319
+ "Must be a valid GUID"
320
+ ).optional().nullable(),
321
+ revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
322
+ "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."
323
+ ).optional().nullable(),
324
+ title: z.string().describe("Title of the task.").min(1).max(250).optional().nullable(),
325
+ description: z.string().describe("Description of the task.").min(1).max(500).optional().nullable(),
326
+ _createdDate: z.date().describe("Date and time the task was created.").optional().nullable(),
327
+ _updatedDate: z.date().describe("Date and time the task was last updated.").optional().nullable(),
328
+ dueDate: z.date().describe("Due date for the task.").optional().nullable(),
329
+ status: z.enum(["ACTION_NEEDED", "COMPLETED"]).optional(),
330
+ source: z.object({
331
+ sourceType: z.enum(["APP", "USER"]).optional(),
332
+ appId: z.string().describe("App ID, if the task was created by an app.").regex(
333
+ /^[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}$/,
334
+ "Must be a valid GUID"
335
+ ).optional().nullable(),
336
+ userId: z.string().describe("User ID, if the task was created by a Wix user.").regex(
337
+ /^[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}$/,
338
+ "Must be a valid GUID"
339
+ ).optional().nullable()
340
+ }).describe("Details about the task source.").optional(),
341
+ contact: z.object({
342
+ _id: z.string().describe("ID of the contact associated with the task.").regex(
343
+ /^[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}$/,
344
+ "Must be a valid GUID"
345
+ ).optional().nullable(),
346
+ firstName: z.string().describe("Contact's first name.").optional().nullable(),
347
+ lastName: z.string().describe("Contact's last name.").optional().nullable(),
348
+ imageUrl: z.string().describe("Contact's image URL.").optional().nullable(),
349
+ email: z.string().describe("Contact's primary email.").optional().nullable(),
350
+ phone: z.string().describe("Contact's primary phone.").optional().nullable(),
351
+ imageUrlExpirationDate: z.date().describe("Image URL expiration date.").optional().nullable()
352
+ }).describe("Information about the contact associated with the task.").optional()
353
+ }).describe("Task to create.")
354
+ });
355
+ var CreateTaskResponse = z.object({
356
+ _id: z.string().describe("Task ID.").regex(
357
+ /^[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}$/,
358
+ "Must be a valid GUID"
359
+ ).optional().nullable(),
360
+ revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
361
+ "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."
362
+ ).optional().nullable(),
363
+ title: z.string().describe("Title of the task.").min(1).max(250).optional().nullable(),
364
+ description: z.string().describe("Description of the task.").min(1).max(500).optional().nullable(),
365
+ _createdDate: z.date().describe("Date and time the task was created.").optional().nullable(),
366
+ _updatedDate: z.date().describe("Date and time the task was last updated.").optional().nullable(),
367
+ dueDate: z.date().describe("Due date for the task.").optional().nullable(),
368
+ status: z.enum(["ACTION_NEEDED", "COMPLETED"]).describe("Status of the task.\n\nDefault: `ACTION_NEEDED`").optional(),
369
+ source: z.object({
370
+ sourceType: z.enum(["APP", "USER"]).describe("How the task was created.").optional(),
371
+ appId: z.string().describe("App ID, if the task was created by an app.").regex(
372
+ /^[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}$/,
373
+ "Must be a valid GUID"
374
+ ).optional().nullable(),
375
+ userId: z.string().describe("User ID, if the task was created by a Wix user.").regex(
376
+ /^[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}$/,
377
+ "Must be a valid GUID"
378
+ ).optional().nullable()
379
+ }).describe("Details about the task source.").optional(),
380
+ contact: z.object({
381
+ _id: z.string().describe("ID of the contact associated with the task.").regex(
382
+ /^[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}$/,
383
+ "Must be a valid GUID"
384
+ ).optional().nullable(),
385
+ firstName: z.string().describe("Contact's first name.").optional().nullable(),
386
+ lastName: z.string().describe("Contact's last name.").optional().nullable(),
387
+ imageUrl: z.string().describe("Contact's image URL.").optional().nullable(),
388
+ email: z.string().describe("Contact's primary email.").optional().nullable(),
389
+ phone: z.string().describe("Contact's primary phone.").optional().nullable(),
390
+ imageUrlExpirationDate: z.date().describe("Image URL expiration date.").optional().nullable()
391
+ }).describe("Information about the contact associated with the task.").optional()
392
+ });
393
+ var GetTaskRequest = z.object({
394
+ taskId: z.string().describe("ID of the task to retrieve.").regex(
395
+ /^[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}$/,
396
+ "Must be a valid GUID"
397
+ )
398
+ });
399
+ var GetTaskResponse = z.object({
400
+ _id: z.string().describe("Task ID.").regex(
401
+ /^[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}$/,
402
+ "Must be a valid GUID"
403
+ ).optional().nullable(),
404
+ revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
405
+ "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."
406
+ ).optional().nullable(),
407
+ title: z.string().describe("Title of the task.").min(1).max(250).optional().nullable(),
408
+ description: z.string().describe("Description of the task.").min(1).max(500).optional().nullable(),
409
+ _createdDate: z.date().describe("Date and time the task was created.").optional().nullable(),
410
+ _updatedDate: z.date().describe("Date and time the task was last updated.").optional().nullable(),
411
+ dueDate: z.date().describe("Due date for the task.").optional().nullable(),
412
+ status: z.enum(["ACTION_NEEDED", "COMPLETED"]).describe("Status of the task.\n\nDefault: `ACTION_NEEDED`").optional(),
413
+ source: z.object({
414
+ sourceType: z.enum(["APP", "USER"]).describe("How the task was created.").optional(),
415
+ appId: z.string().describe("App ID, if the task was created by an app.").regex(
416
+ /^[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}$/,
417
+ "Must be a valid GUID"
418
+ ).optional().nullable(),
419
+ userId: z.string().describe("User ID, if the task was created by a Wix user.").regex(
420
+ /^[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}$/,
421
+ "Must be a valid GUID"
422
+ ).optional().nullable()
423
+ }).describe("Details about the task source.").optional(),
424
+ contact: z.object({
425
+ _id: z.string().describe("ID of the contact associated with the task.").regex(
426
+ /^[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}$/,
427
+ "Must be a valid GUID"
428
+ ).optional().nullable(),
429
+ firstName: z.string().describe("Contact's first name.").optional().nullable(),
430
+ lastName: z.string().describe("Contact's last name.").optional().nullable(),
431
+ imageUrl: z.string().describe("Contact's image URL.").optional().nullable(),
432
+ email: z.string().describe("Contact's primary email.").optional().nullable(),
433
+ phone: z.string().describe("Contact's primary phone.").optional().nullable(),
434
+ imageUrlExpirationDate: z.date().describe("Image URL expiration date.").optional().nullable()
435
+ }).describe("Information about the contact associated with the task.").optional()
436
+ });
437
+ var UpdateTaskRequest = z.object({
438
+ _id: z.string().describe("Task ID.").regex(
439
+ /^[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}$/,
440
+ "Must be a valid GUID"
441
+ ),
442
+ task: z.object({
443
+ _id: z.string().describe("Task ID.").regex(
444
+ /^[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}$/,
445
+ "Must be a valid GUID"
446
+ ).optional().nullable(),
447
+ revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
448
+ "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."
449
+ ),
450
+ title: z.string().describe("Title of the task.").min(1).max(250).optional().nullable(),
451
+ description: z.string().describe("Description of the task.").min(1).max(500).optional().nullable(),
452
+ _createdDate: z.date().describe("Date and time the task was created.").optional().nullable(),
453
+ _updatedDate: z.date().describe("Date and time the task was last updated.").optional().nullable(),
454
+ dueDate: z.date().describe("Due date for the task.").optional().nullable(),
455
+ status: z.enum(["ACTION_NEEDED", "COMPLETED"]).optional(),
456
+ source: z.object({
457
+ sourceType: z.enum(["APP", "USER"]).optional(),
458
+ appId: z.string().describe("App ID, if the task was created by an app.").regex(
459
+ /^[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}$/,
460
+ "Must be a valid GUID"
461
+ ).optional().nullable(),
462
+ userId: z.string().describe("User ID, if the task was created by a Wix user.").regex(
463
+ /^[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}$/,
464
+ "Must be a valid GUID"
465
+ ).optional().nullable()
466
+ }).describe("Details about the task source.").optional(),
467
+ contact: z.object({
468
+ _id: z.string().describe("ID of the contact associated with the task.").regex(
469
+ /^[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}$/,
470
+ "Must be a valid GUID"
471
+ ).optional().nullable(),
472
+ firstName: z.string().describe("Contact's first name.").optional().nullable(),
473
+ lastName: z.string().describe("Contact's last name.").optional().nullable(),
474
+ imageUrl: z.string().describe("Contact's image URL.").optional().nullable(),
475
+ email: z.string().describe("Contact's primary email.").optional().nullable(),
476
+ phone: z.string().describe("Contact's primary phone.").optional().nullable(),
477
+ imageUrlExpirationDate: z.date().describe("Image URL expiration date.").optional().nullable()
478
+ }).describe("Information about the contact associated with the task.").optional()
479
+ }).describe("Task to update.")
480
+ });
481
+ var UpdateTaskResponse = z.object({
482
+ _id: z.string().describe("Task ID.").regex(
483
+ /^[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}$/,
484
+ "Must be a valid GUID"
485
+ ).optional().nullable(),
486
+ revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
487
+ "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."
488
+ ).optional().nullable(),
489
+ title: z.string().describe("Title of the task.").min(1).max(250).optional().nullable(),
490
+ description: z.string().describe("Description of the task.").min(1).max(500).optional().nullable(),
491
+ _createdDate: z.date().describe("Date and time the task was created.").optional().nullable(),
492
+ _updatedDate: z.date().describe("Date and time the task was last updated.").optional().nullable(),
493
+ dueDate: z.date().describe("Due date for the task.").optional().nullable(),
494
+ status: z.enum(["ACTION_NEEDED", "COMPLETED"]).describe("Status of the task.\n\nDefault: `ACTION_NEEDED`").optional(),
495
+ source: z.object({
496
+ sourceType: z.enum(["APP", "USER"]).describe("How the task was created.").optional(),
497
+ appId: z.string().describe("App ID, if the task was created by an app.").regex(
498
+ /^[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}$/,
499
+ "Must be a valid GUID"
500
+ ).optional().nullable(),
501
+ userId: z.string().describe("User ID, if the task was created by a Wix user.").regex(
502
+ /^[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}$/,
503
+ "Must be a valid GUID"
504
+ ).optional().nullable()
505
+ }).describe("Details about the task source.").optional(),
506
+ contact: z.object({
507
+ _id: z.string().describe("ID of the contact associated with the task.").regex(
508
+ /^[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}$/,
509
+ "Must be a valid GUID"
510
+ ).optional().nullable(),
511
+ firstName: z.string().describe("Contact's first name.").optional().nullable(),
512
+ lastName: z.string().describe("Contact's last name.").optional().nullable(),
513
+ imageUrl: z.string().describe("Contact's image URL.").optional().nullable(),
514
+ email: z.string().describe("Contact's primary email.").optional().nullable(),
515
+ phone: z.string().describe("Contact's primary phone.").optional().nullable(),
516
+ imageUrlExpirationDate: z.date().describe("Image URL expiration date.").optional().nullable()
517
+ }).describe("Information about the contact associated with the task.").optional()
518
+ });
519
+ var DeleteTaskRequest = z.object({
520
+ taskId: z.string().describe("ID of the task to delete.").regex(
521
+ /^[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}$/,
522
+ "Must be a valid GUID"
523
+ )
524
+ });
525
+ var DeleteTaskResponse = z.object({});
526
+ var QueryTasksRequest = z.object({
527
+ query: z.object({
528
+ filter: z.object({
529
+ dueDate: z.object({
530
+ $eq: z.string(),
531
+ $gt: z.string(),
532
+ $gte: z.string(),
533
+ $lt: z.string(),
534
+ $lte: z.string(),
535
+ $ne: z.string()
536
+ }).partial().strict().optional(),
537
+ status: z.object({
538
+ $eq: z.string(),
539
+ $in: z.array(z.string()),
540
+ $ne: z.string(),
541
+ $nin: z.array(z.string())
542
+ }).partial().strict().optional(),
543
+ $and: z.array(z.any()).optional(),
544
+ $or: z.array(z.any()).optional(),
545
+ $not: z.any().optional()
546
+ }).strict().optional(),
547
+ sort: z.array(
548
+ z.object({
549
+ fieldName: z.enum(["dueDate"]).optional(),
550
+ order: z.enum(["ASC", "DESC"]).optional()
551
+ })
552
+ ).optional()
553
+ }).catchall(z.any()).describe("Query options.")
554
+ });
555
+ var QueryTasksResponse = z.object({
556
+ tasks: z.array(
557
+ z.object({
558
+ _id: z.string().describe("Task ID.").regex(
559
+ /^[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}$/,
560
+ "Must be a valid GUID"
561
+ ).optional().nullable(),
562
+ revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
563
+ "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."
564
+ ).optional().nullable(),
565
+ title: z.string().describe("Title of the task.").min(1).max(250).optional().nullable(),
566
+ description: z.string().describe("Description of the task.").min(1).max(500).optional().nullable(),
567
+ _createdDate: z.date().describe("Date and time the task was created.").optional().nullable(),
568
+ _updatedDate: z.date().describe("Date and time the task was last updated.").optional().nullable(),
569
+ dueDate: z.date().describe("Due date for the task.").optional().nullable(),
570
+ status: z.enum(["ACTION_NEEDED", "COMPLETED"]).describe("Status of the task.\n\nDefault: `ACTION_NEEDED`").optional(),
571
+ source: z.object({
572
+ sourceType: z.enum(["APP", "USER"]).describe("How the task was created.").optional(),
573
+ appId: z.string().describe("App ID, if the task was created by an app.").regex(
574
+ /^[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}$/,
575
+ "Must be a valid GUID"
576
+ ).optional().nullable(),
577
+ userId: z.string().describe("User ID, if the task was created by a Wix user.").regex(
578
+ /^[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}$/,
579
+ "Must be a valid GUID"
580
+ ).optional().nullable()
581
+ }).describe("Details about the task source.").optional(),
582
+ contact: z.object({
583
+ _id: z.string().describe("ID of the contact associated with the task.").regex(
584
+ /^[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}$/,
585
+ "Must be a valid GUID"
586
+ ).optional().nullable(),
587
+ firstName: z.string().describe("Contact's first name.").optional().nullable(),
588
+ lastName: z.string().describe("Contact's last name.").optional().nullable(),
589
+ imageUrl: z.string().describe("Contact's image URL.").optional().nullable(),
590
+ email: z.string().describe("Contact's primary email.").optional().nullable(),
591
+ phone: z.string().describe("Contact's primary phone.").optional().nullable(),
592
+ imageUrlExpirationDate: z.date().describe("Image URL expiration date.").optional().nullable()
593
+ }).describe("Information about the contact associated with the task.").optional()
594
+ })
595
+ ).optional(),
596
+ pagingMetadata: z.object({
597
+ count: z.number().int().describe("Number of items returned in the response.").optional().nullable(),
598
+ cursors: z.object({
599
+ next: z.string().describe("Cursor pointing to next page in the list of results.").optional().nullable(),
600
+ prev: z.string().describe(
601
+ "Cursor pointing to previous page in the list of results."
602
+ ).optional().nullable()
603
+ }).describe("Offset that was requested.").optional(),
604
+ hasNext: z.boolean().describe(
605
+ "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."
606
+ ).optional().nullable()
607
+ }).describe("Paging metadata.").optional()
608
+ });
609
+ var CountTasksRequest = z.object({
610
+ options: z.object({
611
+ filter: z.record(z.string(), z.any()).describe(
612
+ '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`.'
613
+ ).optional().nullable()
614
+ }).describe("Filtering options.").optional()
615
+ });
616
+ var CountTasksResponse = z.object({
617
+ count: z.number().int().describe("The number of tasks that match the specified filter.").optional()
618
+ });
619
+ var MoveTaskAfterRequest = z.object({
620
+ taskId: z.string().describe("ID of the task to move.").regex(
621
+ /^[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}$/,
622
+ "Must be a valid GUID"
623
+ ),
624
+ options: z.object({
625
+ beforeTaskId: z.string().describe(
626
+ "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."
627
+ ).regex(
628
+ /^[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}$/,
629
+ "Must be a valid GUID"
630
+ ).optional().nullable()
631
+ }).describe("Options for moving the task.").optional()
632
+ });
633
+ var MoveTaskAfterResponse = z.object({});
634
+
635
+ // src/crm-tasks-v2-task-tasks.universal.ts
302
636
  var import_query_builder_utils = require("@wix/sdk-runtime/query-builder-utils");
303
637
  var TaskStatus = /* @__PURE__ */ ((TaskStatus2) => {
304
638
  TaskStatus2["ACTION_NEEDED"] = "ACTION_NEEDED";
@@ -310,6 +644,12 @@ var SourceType = /* @__PURE__ */ ((SourceType2) => {
310
644
  SourceType2["USER"] = "USER";
311
645
  return SourceType2;
312
646
  })(SourceType || {});
647
+ var ReminderType = /* @__PURE__ */ ((ReminderType2) => {
648
+ ReminderType2["UNKNOWN_REMINDER_TYPE"] = "UNKNOWN_REMINDER_TYPE";
649
+ ReminderType2["FIRST_REMINDER"] = "FIRST_REMINDER";
650
+ ReminderType2["LAST_REMINDER"] = "LAST_REMINDER";
651
+ return ReminderType2;
652
+ })(ReminderType || {});
313
653
  var SortOrder = /* @__PURE__ */ ((SortOrder2) => {
314
654
  SortOrder2["ASC"] = "ASC";
315
655
  SortOrder2["DESC"] = "DESC";
@@ -323,14 +663,11 @@ var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
323
663
  WebhookIdentityType2["APP"] = "APP";
324
664
  return WebhookIdentityType2;
325
665
  })(WebhookIdentityType || {});
326
- var ReminderType = /* @__PURE__ */ ((ReminderType2) => {
327
- ReminderType2["UNKNOWN_REMINDER_TYPE"] = "UNKNOWN_REMINDER_TYPE";
328
- ReminderType2["FIRST_REMINDER"] = "FIRST_REMINDER";
329
- ReminderType2["LAST_REMINDER"] = "LAST_REMINDER";
330
- return ReminderType2;
331
- })(ReminderType || {});
332
666
  async function createTask2(task) {
333
- const { httpClient, sideEffects } = arguments[1];
667
+ const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
668
+ if (validateRequestSchema) {
669
+ CreateTaskRequest.parse({ task });
670
+ }
334
671
  const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({ task });
335
672
  const reqOpts = createTask(payload);
336
673
  sideEffects?.onSiteCall?.();
@@ -353,7 +690,10 @@ async function createTask2(task) {
353
690
  }
354
691
  }
355
692
  async function getTask2(taskId) {
356
- const { httpClient, sideEffects } = arguments[1];
693
+ const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
694
+ if (validateRequestSchema) {
695
+ GetTaskRequest.parse({ taskId });
696
+ }
357
697
  const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({ taskId });
358
698
  const reqOpts = getTask(payload);
359
699
  sideEffects?.onSiteCall?.();
@@ -376,7 +716,10 @@ async function getTask2(taskId) {
376
716
  }
377
717
  }
378
718
  async function updateTask2(_id, task) {
379
- const { httpClient, sideEffects } = arguments[2];
719
+ const { httpClient, sideEffects, validateRequestSchema } = arguments[2];
720
+ if (validateRequestSchema) {
721
+ UpdateTaskRequest.parse({ _id, task });
722
+ }
380
723
  const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
381
724
  task: { ...task, id: _id }
382
725
  });
@@ -401,7 +744,10 @@ async function updateTask2(_id, task) {
401
744
  }
402
745
  }
403
746
  async function deleteTask2(taskId) {
404
- const { httpClient, sideEffects } = arguments[1];
747
+ const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
748
+ if (validateRequestSchema) {
749
+ DeleteTaskRequest.parse({ taskId });
750
+ }
405
751
  const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({ taskId });
406
752
  const reqOpts = deleteTask(payload);
407
753
  sideEffects?.onSiteCall?.();
@@ -466,7 +812,10 @@ function queryTasks2() {
466
812
  });
467
813
  }
468
814
  async function typedQueryTasks(query) {
469
- const { httpClient, sideEffects } = arguments[1];
815
+ const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
816
+ if (validateRequestSchema) {
817
+ QueryTasksRequest.parse({ query });
818
+ }
470
819
  const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({ query });
471
820
  const reqOpts = queryTasks(payload);
472
821
  sideEffects?.onSiteCall?.();
@@ -494,7 +843,10 @@ var utils = {
494
843
  }
495
844
  };
496
845
  async function countTasks2(options) {
497
- const { httpClient, sideEffects } = arguments[1];
846
+ const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
847
+ if (validateRequestSchema) {
848
+ CountTasksRequest.parse({ options });
849
+ }
498
850
  const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
499
851
  filter: options?.filter
500
852
  });
@@ -519,7 +871,10 @@ async function countTasks2(options) {
519
871
  }
520
872
  }
521
873
  async function moveTaskAfter2(taskId, options) {
522
- const { httpClient, sideEffects } = arguments[2];
874
+ const { httpClient, sideEffects, validateRequestSchema } = arguments[2];
875
+ if (validateRequestSchema) {
876
+ MoveTaskAfterRequest.parse({ taskId, options });
877
+ }
523
878
  const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
524
879
  taskId,
525
880
  beforeTaskId: options?.beforeTaskId