@wix/auto_sdk_crm_tasks 1.0.75 → 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.
@@ -269,6 +269,330 @@ function moveTaskAfter(payload) {
269
269
 
270
270
  // src/crm-tasks-v2-task-tasks.universal.ts
271
271
  import { transformPaths as transformPaths2 } from "@wix/sdk-runtime/transformations/transform-paths";
272
+
273
+ // src/crm-tasks-v2-task-tasks.schemas.ts
274
+ import * as z from "zod";
275
+ var CreateTaskRequest = z.object({
276
+ task: z.object({
277
+ _id: z.string().describe("Task ID.").regex(
278
+ /^[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}$/,
279
+ "Must be a valid GUID"
280
+ ).optional().nullable(),
281
+ revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
282
+ "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."
283
+ ).optional().nullable(),
284
+ title: z.string().describe("Title of the task.").min(1).max(250).optional().nullable(),
285
+ description: z.string().describe("Description of the task.").min(1).max(500).optional().nullable(),
286
+ _createdDate: z.date().describe("Date and time the task was created.").optional().nullable(),
287
+ _updatedDate: z.date().describe("Date and time the task was last updated.").optional().nullable(),
288
+ dueDate: z.date().describe("Due date for the task.").optional().nullable(),
289
+ status: z.enum(["ACTION_NEEDED", "COMPLETED"]).optional(),
290
+ source: z.object({
291
+ sourceType: z.enum(["APP", "USER"]).optional(),
292
+ appId: z.string().describe("App ID, if the task was created by an app.").regex(
293
+ /^[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}$/,
294
+ "Must be a valid GUID"
295
+ ).optional().nullable(),
296
+ userId: z.string().describe("User ID, if the task was created by a Wix user.").regex(
297
+ /^[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}$/,
298
+ "Must be a valid GUID"
299
+ ).optional().nullable()
300
+ }).describe("Details about the task source.").optional(),
301
+ contact: z.object({
302
+ _id: z.string().describe("ID of the contact associated with the task.").regex(
303
+ /^[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}$/,
304
+ "Must be a valid GUID"
305
+ ).optional().nullable(),
306
+ firstName: z.string().describe("Contact's first name.").optional().nullable(),
307
+ lastName: z.string().describe("Contact's last name.").optional().nullable(),
308
+ imageUrl: z.string().describe("Contact's image URL.").optional().nullable(),
309
+ email: z.string().describe("Contact's primary email.").optional().nullable(),
310
+ phone: z.string().describe("Contact's primary phone.").optional().nullable(),
311
+ imageUrlExpirationDate: z.date().describe("Image URL expiration date.").optional().nullable()
312
+ }).describe("Information about the contact associated with the task.").optional()
313
+ }).describe("Task to create.")
314
+ });
315
+ var CreateTaskResponse = z.object({
316
+ _id: z.string().describe("Task ID.").regex(
317
+ /^[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}$/,
318
+ "Must be a valid GUID"
319
+ ).optional().nullable(),
320
+ revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
321
+ "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."
322
+ ).optional().nullable(),
323
+ title: z.string().describe("Title of the task.").min(1).max(250).optional().nullable(),
324
+ description: z.string().describe("Description of the task.").min(1).max(500).optional().nullable(),
325
+ _createdDate: z.date().describe("Date and time the task was created.").optional().nullable(),
326
+ _updatedDate: z.date().describe("Date and time the task was last updated.").optional().nullable(),
327
+ dueDate: z.date().describe("Due date for the task.").optional().nullable(),
328
+ status: z.enum(["ACTION_NEEDED", "COMPLETED"]).describe("Status of the task.\n\nDefault: `ACTION_NEEDED`").optional(),
329
+ source: z.object({
330
+ sourceType: z.enum(["APP", "USER"]).describe("How the task was created.").optional(),
331
+ appId: z.string().describe("App ID, if the task was created by an app.").regex(
332
+ /^[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}$/,
333
+ "Must be a valid GUID"
334
+ ).optional().nullable(),
335
+ userId: z.string().describe("User ID, if the task was created by a Wix user.").regex(
336
+ /^[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}$/,
337
+ "Must be a valid GUID"
338
+ ).optional().nullable()
339
+ }).describe("Details about the task source.").optional(),
340
+ contact: z.object({
341
+ _id: z.string().describe("ID of the contact associated with the task.").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
+ firstName: z.string().describe("Contact's first name.").optional().nullable(),
346
+ lastName: z.string().describe("Contact's last name.").optional().nullable(),
347
+ imageUrl: z.string().describe("Contact's image URL.").optional().nullable(),
348
+ email: z.string().describe("Contact's primary email.").optional().nullable(),
349
+ phone: z.string().describe("Contact's primary phone.").optional().nullable(),
350
+ imageUrlExpirationDate: z.date().describe("Image URL expiration date.").optional().nullable()
351
+ }).describe("Information about the contact associated with the task.").optional()
352
+ });
353
+ var GetTaskRequest = z.object({
354
+ taskId: z.string().describe("ID of the task to retrieve.").regex(
355
+ /^[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}$/,
356
+ "Must be a valid GUID"
357
+ )
358
+ });
359
+ var GetTaskResponse = z.object({
360
+ _id: z.string().describe("Task ID.").regex(
361
+ /^[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}$/,
362
+ "Must be a valid GUID"
363
+ ).optional().nullable(),
364
+ revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
365
+ "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."
366
+ ).optional().nullable(),
367
+ title: z.string().describe("Title of the task.").min(1).max(250).optional().nullable(),
368
+ description: z.string().describe("Description of the task.").min(1).max(500).optional().nullable(),
369
+ _createdDate: z.date().describe("Date and time the task was created.").optional().nullable(),
370
+ _updatedDate: z.date().describe("Date and time the task was last updated.").optional().nullable(),
371
+ dueDate: z.date().describe("Due date for the task.").optional().nullable(),
372
+ status: z.enum(["ACTION_NEEDED", "COMPLETED"]).describe("Status of the task.\n\nDefault: `ACTION_NEEDED`").optional(),
373
+ source: z.object({
374
+ sourceType: z.enum(["APP", "USER"]).describe("How the task was created.").optional(),
375
+ appId: z.string().describe("App ID, if the task was created by an app.").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
+ userId: z.string().describe("User ID, if the task was created by a Wix user.").regex(
380
+ /^[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}$/,
381
+ "Must be a valid GUID"
382
+ ).optional().nullable()
383
+ }).describe("Details about the task source.").optional(),
384
+ contact: z.object({
385
+ _id: z.string().describe("ID of the contact associated with the task.").regex(
386
+ /^[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}$/,
387
+ "Must be a valid GUID"
388
+ ).optional().nullable(),
389
+ firstName: z.string().describe("Contact's first name.").optional().nullable(),
390
+ lastName: z.string().describe("Contact's last name.").optional().nullable(),
391
+ imageUrl: z.string().describe("Contact's image URL.").optional().nullable(),
392
+ email: z.string().describe("Contact's primary email.").optional().nullable(),
393
+ phone: z.string().describe("Contact's primary phone.").optional().nullable(),
394
+ imageUrlExpirationDate: z.date().describe("Image URL expiration date.").optional().nullable()
395
+ }).describe("Information about the contact associated with the task.").optional()
396
+ });
397
+ var UpdateTaskRequest = z.object({
398
+ _id: z.string().describe("Task ID.").regex(
399
+ /^[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}$/,
400
+ "Must be a valid GUID"
401
+ ),
402
+ task: z.object({
403
+ _id: z.string().describe("Task ID.").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
+ ).optional().nullable(),
407
+ revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
408
+ "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."
409
+ ),
410
+ title: z.string().describe("Title of the task.").min(1).max(250).optional().nullable(),
411
+ description: z.string().describe("Description of the task.").min(1).max(500).optional().nullable(),
412
+ _createdDate: z.date().describe("Date and time the task was created.").optional().nullable(),
413
+ _updatedDate: z.date().describe("Date and time the task was last updated.").optional().nullable(),
414
+ dueDate: z.date().describe("Due date for the task.").optional().nullable(),
415
+ status: z.enum(["ACTION_NEEDED", "COMPLETED"]).optional(),
416
+ source: z.object({
417
+ sourceType: z.enum(["APP", "USER"]).optional(),
418
+ appId: z.string().describe("App ID, if the task was created by an app.").regex(
419
+ /^[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}$/,
420
+ "Must be a valid GUID"
421
+ ).optional().nullable(),
422
+ userId: z.string().describe("User ID, if the task was created by a Wix user.").regex(
423
+ /^[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}$/,
424
+ "Must be a valid GUID"
425
+ ).optional().nullable()
426
+ }).describe("Details about the task source.").optional(),
427
+ contact: z.object({
428
+ _id: z.string().describe("ID of the contact associated with the task.").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
+ firstName: z.string().describe("Contact's first name.").optional().nullable(),
433
+ lastName: z.string().describe("Contact's last name.").optional().nullable(),
434
+ imageUrl: z.string().describe("Contact's image URL.").optional().nullable(),
435
+ email: z.string().describe("Contact's primary email.").optional().nullable(),
436
+ phone: z.string().describe("Contact's primary phone.").optional().nullable(),
437
+ imageUrlExpirationDate: z.date().describe("Image URL expiration date.").optional().nullable()
438
+ }).describe("Information about the contact associated with the task.").optional()
439
+ }).describe("Task to update.")
440
+ });
441
+ var UpdateTaskResponse = z.object({
442
+ _id: z.string().describe("Task ID.").regex(
443
+ /^[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}$/,
444
+ "Must be a valid GUID"
445
+ ).optional().nullable(),
446
+ revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
447
+ "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."
448
+ ).optional().nullable(),
449
+ title: z.string().describe("Title of the task.").min(1).max(250).optional().nullable(),
450
+ description: z.string().describe("Description of the task.").min(1).max(500).optional().nullable(),
451
+ _createdDate: z.date().describe("Date and time the task was created.").optional().nullable(),
452
+ _updatedDate: z.date().describe("Date and time the task was last updated.").optional().nullable(),
453
+ dueDate: z.date().describe("Due date for the task.").optional().nullable(),
454
+ status: z.enum(["ACTION_NEEDED", "COMPLETED"]).describe("Status of the task.\n\nDefault: `ACTION_NEEDED`").optional(),
455
+ source: z.object({
456
+ sourceType: z.enum(["APP", "USER"]).describe("How the task was created.").optional(),
457
+ appId: z.string().describe("App ID, if the task was created by an app.").regex(
458
+ /^[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}$/,
459
+ "Must be a valid GUID"
460
+ ).optional().nullable(),
461
+ userId: z.string().describe("User ID, if the task was created by a Wix user.").regex(
462
+ /^[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}$/,
463
+ "Must be a valid GUID"
464
+ ).optional().nullable()
465
+ }).describe("Details about the task source.").optional(),
466
+ contact: z.object({
467
+ _id: z.string().describe("ID of the contact associated with the task.").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
+ firstName: z.string().describe("Contact's first name.").optional().nullable(),
472
+ lastName: z.string().describe("Contact's last name.").optional().nullable(),
473
+ imageUrl: z.string().describe("Contact's image URL.").optional().nullable(),
474
+ email: z.string().describe("Contact's primary email.").optional().nullable(),
475
+ phone: z.string().describe("Contact's primary phone.").optional().nullable(),
476
+ imageUrlExpirationDate: z.date().describe("Image URL expiration date.").optional().nullable()
477
+ }).describe("Information about the contact associated with the task.").optional()
478
+ });
479
+ var DeleteTaskRequest = z.object({
480
+ taskId: z.string().describe("ID of the task to delete.").regex(
481
+ /^[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}$/,
482
+ "Must be a valid GUID"
483
+ )
484
+ });
485
+ var DeleteTaskResponse = z.object({});
486
+ var QueryTasksRequest = z.object({
487
+ query: z.object({
488
+ filter: z.object({
489
+ dueDate: z.object({
490
+ $eq: z.string(),
491
+ $gt: z.string(),
492
+ $gte: z.string(),
493
+ $lt: z.string(),
494
+ $lte: z.string(),
495
+ $ne: z.string()
496
+ }).partial().strict().optional(),
497
+ status: z.object({
498
+ $eq: z.string(),
499
+ $in: z.array(z.string()),
500
+ $ne: z.string(),
501
+ $nin: z.array(z.string())
502
+ }).partial().strict().optional(),
503
+ $and: z.array(z.any()).optional(),
504
+ $or: z.array(z.any()).optional(),
505
+ $not: z.any().optional()
506
+ }).strict().optional(),
507
+ sort: z.array(
508
+ z.object({
509
+ fieldName: z.enum(["dueDate"]).optional(),
510
+ order: z.enum(["ASC", "DESC"]).optional()
511
+ })
512
+ ).optional()
513
+ }).catchall(z.any()).describe("Query options.")
514
+ });
515
+ var QueryTasksResponse = z.object({
516
+ tasks: z.array(
517
+ z.object({
518
+ _id: z.string().describe("Task ID.").regex(
519
+ /^[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}$/,
520
+ "Must be a valid GUID"
521
+ ).optional().nullable(),
522
+ revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
523
+ "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."
524
+ ).optional().nullable(),
525
+ title: z.string().describe("Title of the task.").min(1).max(250).optional().nullable(),
526
+ description: z.string().describe("Description of the task.").min(1).max(500).optional().nullable(),
527
+ _createdDate: z.date().describe("Date and time the task was created.").optional().nullable(),
528
+ _updatedDate: z.date().describe("Date and time the task was last updated.").optional().nullable(),
529
+ dueDate: z.date().describe("Due date for the task.").optional().nullable(),
530
+ status: z.enum(["ACTION_NEEDED", "COMPLETED"]).describe("Status of the task.\n\nDefault: `ACTION_NEEDED`").optional(),
531
+ source: z.object({
532
+ sourceType: z.enum(["APP", "USER"]).describe("How the task was created.").optional(),
533
+ appId: z.string().describe("App ID, if the task was created by an app.").regex(
534
+ /^[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}$/,
535
+ "Must be a valid GUID"
536
+ ).optional().nullable(),
537
+ userId: z.string().describe("User ID, if the task was created by a Wix user.").regex(
538
+ /^[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}$/,
539
+ "Must be a valid GUID"
540
+ ).optional().nullable()
541
+ }).describe("Details about the task source.").optional(),
542
+ contact: z.object({
543
+ _id: z.string().describe("ID of the contact associated with the task.").regex(
544
+ /^[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}$/,
545
+ "Must be a valid GUID"
546
+ ).optional().nullable(),
547
+ firstName: z.string().describe("Contact's first name.").optional().nullable(),
548
+ lastName: z.string().describe("Contact's last name.").optional().nullable(),
549
+ imageUrl: z.string().describe("Contact's image URL.").optional().nullable(),
550
+ email: z.string().describe("Contact's primary email.").optional().nullable(),
551
+ phone: z.string().describe("Contact's primary phone.").optional().nullable(),
552
+ imageUrlExpirationDate: z.date().describe("Image URL expiration date.").optional().nullable()
553
+ }).describe("Information about the contact associated with the task.").optional()
554
+ })
555
+ ).optional(),
556
+ pagingMetadata: z.object({
557
+ count: z.number().int().describe("Number of items returned in the response.").optional().nullable(),
558
+ cursors: z.object({
559
+ next: z.string().describe("Cursor pointing to next page in the list of results.").optional().nullable(),
560
+ prev: z.string().describe(
561
+ "Cursor pointing to previous page in the list of results."
562
+ ).optional().nullable()
563
+ }).describe("Offset that was requested.").optional(),
564
+ hasNext: z.boolean().describe(
565
+ "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."
566
+ ).optional().nullable()
567
+ }).describe("Paging metadata.").optional()
568
+ });
569
+ var CountTasksRequest = z.object({
570
+ options: z.object({
571
+ filter: z.record(z.string(), z.any()).describe(
572
+ '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`.'
573
+ ).optional().nullable()
574
+ }).describe("Filtering options.").optional()
575
+ });
576
+ var CountTasksResponse = z.object({
577
+ count: z.number().int().describe("The number of tasks that match the specified filter.").optional()
578
+ });
579
+ var MoveTaskAfterRequest = z.object({
580
+ taskId: z.string().describe("ID of the task to move.").regex(
581
+ /^[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}$/,
582
+ "Must be a valid GUID"
583
+ ),
584
+ options: z.object({
585
+ beforeTaskId: z.string().describe(
586
+ "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."
587
+ ).regex(
588
+ /^[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}$/,
589
+ "Must be a valid GUID"
590
+ ).optional().nullable()
591
+ }).describe("Options for moving the task.").optional()
592
+ });
593
+ var MoveTaskAfterResponse = z.object({});
594
+
595
+ // src/crm-tasks-v2-task-tasks.universal.ts
272
596
  import { createQueryUtils } from "@wix/sdk-runtime/query-builder-utils";
273
597
  var TaskStatus = /* @__PURE__ */ ((TaskStatus2) => {
274
598
  TaskStatus2["ACTION_NEEDED"] = "ACTION_NEEDED";
@@ -300,7 +624,10 @@ var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
300
624
  return WebhookIdentityType2;
301
625
  })(WebhookIdentityType || {});
302
626
  async function createTask2(task) {
303
- const { httpClient, sideEffects } = arguments[1];
627
+ const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
628
+ if (validateRequestSchema) {
629
+ CreateTaskRequest.parse({ task });
630
+ }
304
631
  const payload = renameKeysFromSDKRequestToRESTRequest({ task });
305
632
  const reqOpts = createTask(payload);
306
633
  sideEffects?.onSiteCall?.();
@@ -323,7 +650,10 @@ async function createTask2(task) {
323
650
  }
324
651
  }
325
652
  async function getTask2(taskId) {
326
- const { httpClient, sideEffects } = arguments[1];
653
+ const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
654
+ if (validateRequestSchema) {
655
+ GetTaskRequest.parse({ taskId });
656
+ }
327
657
  const payload = renameKeysFromSDKRequestToRESTRequest({ taskId });
328
658
  const reqOpts = getTask(payload);
329
659
  sideEffects?.onSiteCall?.();
@@ -346,7 +676,10 @@ async function getTask2(taskId) {
346
676
  }
347
677
  }
348
678
  async function updateTask2(_id, task) {
349
- const { httpClient, sideEffects } = arguments[2];
679
+ const { httpClient, sideEffects, validateRequestSchema } = arguments[2];
680
+ if (validateRequestSchema) {
681
+ UpdateTaskRequest.parse({ _id, task });
682
+ }
350
683
  const payload = renameKeysFromSDKRequestToRESTRequest({
351
684
  task: { ...task, id: _id }
352
685
  });
@@ -371,7 +704,10 @@ async function updateTask2(_id, task) {
371
704
  }
372
705
  }
373
706
  async function deleteTask2(taskId) {
374
- const { httpClient, sideEffects } = arguments[1];
707
+ const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
708
+ if (validateRequestSchema) {
709
+ DeleteTaskRequest.parse({ taskId });
710
+ }
375
711
  const payload = renameKeysFromSDKRequestToRESTRequest({ taskId });
376
712
  const reqOpts = deleteTask(payload);
377
713
  sideEffects?.onSiteCall?.();
@@ -436,7 +772,10 @@ function queryTasks2() {
436
772
  });
437
773
  }
438
774
  async function typedQueryTasks(query) {
439
- const { httpClient, sideEffects } = arguments[1];
775
+ const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
776
+ if (validateRequestSchema) {
777
+ QueryTasksRequest.parse({ query });
778
+ }
440
779
  const payload = renameKeysFromSDKRequestToRESTRequest({ query });
441
780
  const reqOpts = queryTasks(payload);
442
781
  sideEffects?.onSiteCall?.();
@@ -464,7 +803,10 @@ var utils = {
464
803
  }
465
804
  };
466
805
  async function countTasks2(options) {
467
- const { httpClient, sideEffects } = arguments[1];
806
+ const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
807
+ if (validateRequestSchema) {
808
+ CountTasksRequest.parse({ options });
809
+ }
468
810
  const payload = renameKeysFromSDKRequestToRESTRequest({
469
811
  filter: options?.filter
470
812
  });
@@ -489,7 +831,10 @@ async function countTasks2(options) {
489
831
  }
490
832
  }
491
833
  async function moveTaskAfter2(taskId, options) {
492
- const { httpClient, sideEffects } = arguments[2];
834
+ const { httpClient, sideEffects, validateRequestSchema } = arguments[2];
835
+ if (validateRequestSchema) {
836
+ MoveTaskAfterRequest.parse({ taskId, options });
837
+ }
493
838
  const payload = renameKeysFromSDKRequestToRESTRequest({
494
839
  taskId,
495
840
  beforeTaskId: options?.beforeTaskId
@@ -519,61 +864,61 @@ async function moveTaskAfter2(taskId, options) {
519
864
  }
520
865
 
521
866
  // src/crm-tasks-v2-task-tasks.public.ts
522
- function createTask3(httpClient) {
867
+ function createTask3(httpClient, __options) {
523
868
  return (task) => createTask2(
524
869
  task,
525
870
  // @ts-ignore
526
- { httpClient }
871
+ { httpClient, validateRequestSchema: __options?.validateRequestSchema }
527
872
  );
528
873
  }
529
- function getTask3(httpClient) {
874
+ function getTask3(httpClient, __options) {
530
875
  return (taskId) => getTask2(
531
876
  taskId,
532
877
  // @ts-ignore
533
- { httpClient }
878
+ { httpClient, validateRequestSchema: __options?.validateRequestSchema }
534
879
  );
535
880
  }
536
- function updateTask3(httpClient) {
881
+ function updateTask3(httpClient, __options) {
537
882
  return (_id, task) => updateTask2(
538
883
  _id,
539
884
  task,
540
885
  // @ts-ignore
541
- { httpClient }
886
+ { httpClient, validateRequestSchema: __options?.validateRequestSchema }
542
887
  );
543
888
  }
544
- function deleteTask3(httpClient) {
889
+ function deleteTask3(httpClient, __options) {
545
890
  return (taskId) => deleteTask2(
546
891
  taskId,
547
892
  // @ts-ignore
548
- { httpClient }
893
+ { httpClient, validateRequestSchema: __options?.validateRequestSchema }
549
894
  );
550
895
  }
551
- function queryTasks3(httpClient) {
896
+ function queryTasks3(httpClient, __options) {
552
897
  return () => queryTasks2(
553
898
  // @ts-ignore
554
- { httpClient }
899
+ { httpClient, validateRequestSchema: __options?.validateRequestSchema }
555
900
  );
556
901
  }
557
- function typedQueryTasks2(httpClient) {
902
+ function typedQueryTasks2(httpClient, __options) {
558
903
  return (query) => typedQueryTasks(
559
904
  query,
560
905
  // @ts-ignore
561
- { httpClient }
906
+ { httpClient, validateRequestSchema: __options?.validateRequestSchema }
562
907
  );
563
908
  }
564
- function countTasks3(httpClient) {
909
+ function countTasks3(httpClient, __options) {
565
910
  return (options) => countTasks2(
566
911
  options,
567
912
  // @ts-ignore
568
- { httpClient }
913
+ { httpClient, validateRequestSchema: __options?.validateRequestSchema }
569
914
  );
570
915
  }
571
- function moveTaskAfter3(httpClient) {
916
+ function moveTaskAfter3(httpClient, __options) {
572
917
  return (taskId, options) => moveTaskAfter2(
573
918
  taskId,
574
919
  options,
575
920
  // @ts-ignore
576
- { httpClient }
921
+ { httpClient, validateRequestSchema: __options?.validateRequestSchema }
577
922
  );
578
923
  }
579
924
  var onTaskCreated = EventDefinition(