@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.
- package/build/cjs/index.d.ts +6 -18
- package/build/cjs/index.js +23 -378
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.js +7 -362
- package/build/cjs/index.typings.js.map +1 -1
- package/build/es/index.d.mts +6 -18
- package/build/es/index.mjs +23 -368
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.mjs +7 -352
- package/build/es/index.typings.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +6 -18
- package/build/internal/cjs/index.js +23 -378
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.js +7 -362
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/es/index.d.mts +6 -18
- package/build/internal/es/index.mjs +23 -368
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.mjs +7 -352
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/package.json +2 -2
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __create = Object.create;
|
|
3
2
|
var __defProp = Object.defineProperty;
|
|
4
3
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
5
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
6
|
var __export = (target, all) => {
|
|
9
7
|
for (var name in all)
|
|
@@ -17,14 +15,6 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
17
15
|
}
|
|
18
16
|
return to;
|
|
19
17
|
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
-
mod
|
|
27
|
-
));
|
|
28
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
19
|
|
|
30
20
|
// index.typings.ts
|
|
@@ -309,330 +299,6 @@ function moveTaskAfter(payload) {
|
|
|
309
299
|
|
|
310
300
|
// src/crm-tasks-v2-task-tasks.universal.ts
|
|
311
301
|
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
|
|
636
302
|
var import_query_builder_utils = require("@wix/sdk-runtime/query-builder-utils");
|
|
637
303
|
var TaskStatus = /* @__PURE__ */ ((TaskStatus2) => {
|
|
638
304
|
TaskStatus2["ACTION_NEEDED"] = "ACTION_NEEDED";
|
|
@@ -664,10 +330,7 @@ var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
|
|
|
664
330
|
return WebhookIdentityType2;
|
|
665
331
|
})(WebhookIdentityType || {});
|
|
666
332
|
async function createTask2(task) {
|
|
667
|
-
const { httpClient, sideEffects
|
|
668
|
-
if (validateRequestSchema) {
|
|
669
|
-
CreateTaskRequest.parse({ task });
|
|
670
|
-
}
|
|
333
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
671
334
|
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({ task });
|
|
672
335
|
const reqOpts = createTask(payload);
|
|
673
336
|
sideEffects?.onSiteCall?.();
|
|
@@ -690,10 +353,7 @@ async function createTask2(task) {
|
|
|
690
353
|
}
|
|
691
354
|
}
|
|
692
355
|
async function getTask2(taskId) {
|
|
693
|
-
const { httpClient, sideEffects
|
|
694
|
-
if (validateRequestSchema) {
|
|
695
|
-
GetTaskRequest.parse({ taskId });
|
|
696
|
-
}
|
|
356
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
697
357
|
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({ taskId });
|
|
698
358
|
const reqOpts = getTask(payload);
|
|
699
359
|
sideEffects?.onSiteCall?.();
|
|
@@ -716,10 +376,7 @@ async function getTask2(taskId) {
|
|
|
716
376
|
}
|
|
717
377
|
}
|
|
718
378
|
async function updateTask2(_id, task) {
|
|
719
|
-
const { httpClient, sideEffects
|
|
720
|
-
if (validateRequestSchema) {
|
|
721
|
-
UpdateTaskRequest.parse({ _id, task });
|
|
722
|
-
}
|
|
379
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
723
380
|
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
724
381
|
task: { ...task, id: _id }
|
|
725
382
|
});
|
|
@@ -744,10 +401,7 @@ async function updateTask2(_id, task) {
|
|
|
744
401
|
}
|
|
745
402
|
}
|
|
746
403
|
async function deleteTask2(taskId) {
|
|
747
|
-
const { httpClient, sideEffects
|
|
748
|
-
if (validateRequestSchema) {
|
|
749
|
-
DeleteTaskRequest.parse({ taskId });
|
|
750
|
-
}
|
|
404
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
751
405
|
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({ taskId });
|
|
752
406
|
const reqOpts = deleteTask(payload);
|
|
753
407
|
sideEffects?.onSiteCall?.();
|
|
@@ -812,10 +466,7 @@ function queryTasks2() {
|
|
|
812
466
|
});
|
|
813
467
|
}
|
|
814
468
|
async function typedQueryTasks(query) {
|
|
815
|
-
const { httpClient, sideEffects
|
|
816
|
-
if (validateRequestSchema) {
|
|
817
|
-
QueryTasksRequest.parse({ query });
|
|
818
|
-
}
|
|
469
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
819
470
|
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({ query });
|
|
820
471
|
const reqOpts = queryTasks(payload);
|
|
821
472
|
sideEffects?.onSiteCall?.();
|
|
@@ -843,10 +494,7 @@ var utils = {
|
|
|
843
494
|
}
|
|
844
495
|
};
|
|
845
496
|
async function countTasks2(options) {
|
|
846
|
-
const { httpClient, sideEffects
|
|
847
|
-
if (validateRequestSchema) {
|
|
848
|
-
CountTasksRequest.parse({ options });
|
|
849
|
-
}
|
|
497
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
850
498
|
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
851
499
|
filter: options?.filter
|
|
852
500
|
});
|
|
@@ -871,10 +519,7 @@ async function countTasks2(options) {
|
|
|
871
519
|
}
|
|
872
520
|
}
|
|
873
521
|
async function moveTaskAfter2(taskId, options) {
|
|
874
|
-
const { httpClient, sideEffects
|
|
875
|
-
if (validateRequestSchema) {
|
|
876
|
-
MoveTaskAfterRequest.parse({ taskId, options });
|
|
877
|
-
}
|
|
522
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
878
523
|
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
879
524
|
taskId,
|
|
880
525
|
beforeTaskId: options?.beforeTaskId
|