@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.
- package/build/cjs/index.d.ts +18 -6
- package/build/cjs/index.js +384 -29
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +31 -31
- package/build/cjs/index.typings.js +368 -13
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +31 -31
- package/build/cjs/meta.js +6 -6
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.d.mts +18 -6
- package/build/es/index.mjs +374 -29
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +31 -31
- package/build/es/index.typings.mjs +358 -13
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +31 -31
- package/build/es/meta.mjs +6 -6
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +18 -6
- package/build/internal/cjs/index.js +384 -29
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +31 -31
- package/build/internal/cjs/index.typings.js +368 -13
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +31 -31
- package/build/internal/cjs/meta.js +6 -6
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/es/index.d.mts +18 -6
- package/build/internal/es/index.mjs +374 -29
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +31 -31
- package/build/internal/es/index.typings.mjs +358 -13
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.d.mts +31 -31
- package/build/internal/es/meta.mjs +6 -6
- package/build/internal/es/meta.mjs.map +1 -1
- package/package.json +4 -4
|
@@ -263,6 +263,330 @@ function moveTaskAfter(payload) {
|
|
|
263
263
|
|
|
264
264
|
// src/crm-tasks-v2-task-tasks.universal.ts
|
|
265
265
|
import { transformPaths as transformPaths2 } from "@wix/sdk-runtime/transformations/transform-paths";
|
|
266
|
+
|
|
267
|
+
// src/crm-tasks-v2-task-tasks.schemas.ts
|
|
268
|
+
import * as z from "zod";
|
|
269
|
+
var CreateTaskRequest = z.object({
|
|
270
|
+
task: z.object({
|
|
271
|
+
_id: z.string().describe("Task ID.").regex(
|
|
272
|
+
/^[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}$/,
|
|
273
|
+
"Must be a valid GUID"
|
|
274
|
+
).optional().nullable(),
|
|
275
|
+
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
276
|
+
"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."
|
|
277
|
+
).optional().nullable(),
|
|
278
|
+
title: z.string().describe("Title of the task.").min(1).max(250).optional().nullable(),
|
|
279
|
+
description: z.string().describe("Description of the task.").min(1).max(500).optional().nullable(),
|
|
280
|
+
_createdDate: z.date().describe("Date and time the task was created.").optional().nullable(),
|
|
281
|
+
_updatedDate: z.date().describe("Date and time the task was last updated.").optional().nullable(),
|
|
282
|
+
dueDate: z.date().describe("Due date for the task.").optional().nullable(),
|
|
283
|
+
status: z.enum(["ACTION_NEEDED", "COMPLETED"]).optional(),
|
|
284
|
+
source: z.object({
|
|
285
|
+
sourceType: z.enum(["APP", "USER"]).optional(),
|
|
286
|
+
appId: z.string().describe("App ID, if the task was created by an app.").regex(
|
|
287
|
+
/^[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}$/,
|
|
288
|
+
"Must be a valid GUID"
|
|
289
|
+
).optional().nullable(),
|
|
290
|
+
userId: z.string().describe("User ID, if the task was created by a Wix user.").regex(
|
|
291
|
+
/^[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}$/,
|
|
292
|
+
"Must be a valid GUID"
|
|
293
|
+
).optional().nullable()
|
|
294
|
+
}).describe("Details about the task source.").optional(),
|
|
295
|
+
contact: z.object({
|
|
296
|
+
_id: z.string().describe("ID of the contact associated with the task.").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
|
+
firstName: z.string().describe("Contact's first name.").optional().nullable(),
|
|
301
|
+
lastName: z.string().describe("Contact's last name.").optional().nullable(),
|
|
302
|
+
imageUrl: z.string().describe("Contact's image URL.").optional().nullable(),
|
|
303
|
+
email: z.string().describe("Contact's primary email.").optional().nullable(),
|
|
304
|
+
phone: z.string().describe("Contact's primary phone.").optional().nullable(),
|
|
305
|
+
imageUrlExpirationDate: z.date().describe("Image URL expiration date.").optional().nullable()
|
|
306
|
+
}).describe("Information about the contact associated with the task.").optional()
|
|
307
|
+
}).describe("Task to create.")
|
|
308
|
+
});
|
|
309
|
+
var CreateTaskResponse = z.object({
|
|
310
|
+
_id: z.string().describe("Task ID.").regex(
|
|
311
|
+
/^[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}$/,
|
|
312
|
+
"Must be a valid GUID"
|
|
313
|
+
).optional().nullable(),
|
|
314
|
+
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
315
|
+
"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."
|
|
316
|
+
).optional().nullable(),
|
|
317
|
+
title: z.string().describe("Title of the task.").min(1).max(250).optional().nullable(),
|
|
318
|
+
description: z.string().describe("Description of the task.").min(1).max(500).optional().nullable(),
|
|
319
|
+
_createdDate: z.date().describe("Date and time the task was created.").optional().nullable(),
|
|
320
|
+
_updatedDate: z.date().describe("Date and time the task was last updated.").optional().nullable(),
|
|
321
|
+
dueDate: z.date().describe("Due date for the task.").optional().nullable(),
|
|
322
|
+
status: z.enum(["ACTION_NEEDED", "COMPLETED"]).describe("Status of the task.\n\nDefault: `ACTION_NEEDED`").optional(),
|
|
323
|
+
source: z.object({
|
|
324
|
+
sourceType: z.enum(["APP", "USER"]).describe("How the task was created.").optional(),
|
|
325
|
+
appId: z.string().describe("App ID, if the task was created by an app.").regex(
|
|
326
|
+
/^[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}$/,
|
|
327
|
+
"Must be a valid GUID"
|
|
328
|
+
).optional().nullable(),
|
|
329
|
+
userId: z.string().describe("User ID, if the task was created by a Wix user.").regex(
|
|
330
|
+
/^[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}$/,
|
|
331
|
+
"Must be a valid GUID"
|
|
332
|
+
).optional().nullable()
|
|
333
|
+
}).describe("Details about the task source.").optional(),
|
|
334
|
+
contact: z.object({
|
|
335
|
+
_id: z.string().describe("ID of the contact associated with the task.").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
|
+
firstName: z.string().describe("Contact's first name.").optional().nullable(),
|
|
340
|
+
lastName: z.string().describe("Contact's last name.").optional().nullable(),
|
|
341
|
+
imageUrl: z.string().describe("Contact's image URL.").optional().nullable(),
|
|
342
|
+
email: z.string().describe("Contact's primary email.").optional().nullable(),
|
|
343
|
+
phone: z.string().describe("Contact's primary phone.").optional().nullable(),
|
|
344
|
+
imageUrlExpirationDate: z.date().describe("Image URL expiration date.").optional().nullable()
|
|
345
|
+
}).describe("Information about the contact associated with the task.").optional()
|
|
346
|
+
});
|
|
347
|
+
var GetTaskRequest = z.object({
|
|
348
|
+
taskId: z.string().describe("ID of the task to retrieve.").regex(
|
|
349
|
+
/^[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}$/,
|
|
350
|
+
"Must be a valid GUID"
|
|
351
|
+
)
|
|
352
|
+
});
|
|
353
|
+
var GetTaskResponse = z.object({
|
|
354
|
+
_id: z.string().describe("Task ID.").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
|
+
).optional().nullable(),
|
|
358
|
+
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
359
|
+
"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."
|
|
360
|
+
).optional().nullable(),
|
|
361
|
+
title: z.string().describe("Title of the task.").min(1).max(250).optional().nullable(),
|
|
362
|
+
description: z.string().describe("Description of the task.").min(1).max(500).optional().nullable(),
|
|
363
|
+
_createdDate: z.date().describe("Date and time the task was created.").optional().nullable(),
|
|
364
|
+
_updatedDate: z.date().describe("Date and time the task was last updated.").optional().nullable(),
|
|
365
|
+
dueDate: z.date().describe("Due date for the task.").optional().nullable(),
|
|
366
|
+
status: z.enum(["ACTION_NEEDED", "COMPLETED"]).describe("Status of the task.\n\nDefault: `ACTION_NEEDED`").optional(),
|
|
367
|
+
source: z.object({
|
|
368
|
+
sourceType: z.enum(["APP", "USER"]).describe("How the task was created.").optional(),
|
|
369
|
+
appId: z.string().describe("App ID, if the task was created by an app.").regex(
|
|
370
|
+
/^[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}$/,
|
|
371
|
+
"Must be a valid GUID"
|
|
372
|
+
).optional().nullable(),
|
|
373
|
+
userId: z.string().describe("User ID, if the task was created by a Wix user.").regex(
|
|
374
|
+
/^[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}$/,
|
|
375
|
+
"Must be a valid GUID"
|
|
376
|
+
).optional().nullable()
|
|
377
|
+
}).describe("Details about the task source.").optional(),
|
|
378
|
+
contact: z.object({
|
|
379
|
+
_id: z.string().describe("ID of the contact associated with the task.").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
|
+
firstName: z.string().describe("Contact's first name.").optional().nullable(),
|
|
384
|
+
lastName: z.string().describe("Contact's last name.").optional().nullable(),
|
|
385
|
+
imageUrl: z.string().describe("Contact's image URL.").optional().nullable(),
|
|
386
|
+
email: z.string().describe("Contact's primary email.").optional().nullable(),
|
|
387
|
+
phone: z.string().describe("Contact's primary phone.").optional().nullable(),
|
|
388
|
+
imageUrlExpirationDate: z.date().describe("Image URL expiration date.").optional().nullable()
|
|
389
|
+
}).describe("Information about the contact associated with the task.").optional()
|
|
390
|
+
});
|
|
391
|
+
var UpdateTaskRequest = z.object({
|
|
392
|
+
_id: z.string().describe("Task ID.").regex(
|
|
393
|
+
/^[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}$/,
|
|
394
|
+
"Must be a valid GUID"
|
|
395
|
+
),
|
|
396
|
+
task: z.object({
|
|
397
|
+
_id: z.string().describe("Task ID.").regex(
|
|
398
|
+
/^[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}$/,
|
|
399
|
+
"Must be a valid GUID"
|
|
400
|
+
).optional().nullable(),
|
|
401
|
+
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
402
|
+
"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."
|
|
403
|
+
),
|
|
404
|
+
title: z.string().describe("Title of the task.").min(1).max(250).optional().nullable(),
|
|
405
|
+
description: z.string().describe("Description of the task.").min(1).max(500).optional().nullable(),
|
|
406
|
+
_createdDate: z.date().describe("Date and time the task was created.").optional().nullable(),
|
|
407
|
+
_updatedDate: z.date().describe("Date and time the task was last updated.").optional().nullable(),
|
|
408
|
+
dueDate: z.date().describe("Due date for the task.").optional().nullable(),
|
|
409
|
+
status: z.enum(["ACTION_NEEDED", "COMPLETED"]).optional(),
|
|
410
|
+
source: z.object({
|
|
411
|
+
sourceType: z.enum(["APP", "USER"]).optional(),
|
|
412
|
+
appId: z.string().describe("App ID, if the task was created by an app.").regex(
|
|
413
|
+
/^[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}$/,
|
|
414
|
+
"Must be a valid GUID"
|
|
415
|
+
).optional().nullable(),
|
|
416
|
+
userId: z.string().describe("User ID, if the task was created by a Wix user.").regex(
|
|
417
|
+
/^[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}$/,
|
|
418
|
+
"Must be a valid GUID"
|
|
419
|
+
).optional().nullable()
|
|
420
|
+
}).describe("Details about the task source.").optional(),
|
|
421
|
+
contact: z.object({
|
|
422
|
+
_id: z.string().describe("ID of the contact associated with the task.").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
|
+
firstName: z.string().describe("Contact's first name.").optional().nullable(),
|
|
427
|
+
lastName: z.string().describe("Contact's last name.").optional().nullable(),
|
|
428
|
+
imageUrl: z.string().describe("Contact's image URL.").optional().nullable(),
|
|
429
|
+
email: z.string().describe("Contact's primary email.").optional().nullable(),
|
|
430
|
+
phone: z.string().describe("Contact's primary phone.").optional().nullable(),
|
|
431
|
+
imageUrlExpirationDate: z.date().describe("Image URL expiration date.").optional().nullable()
|
|
432
|
+
}).describe("Information about the contact associated with the task.").optional()
|
|
433
|
+
}).describe("Task to update.")
|
|
434
|
+
});
|
|
435
|
+
var UpdateTaskResponse = z.object({
|
|
436
|
+
_id: z.string().describe("Task ID.").regex(
|
|
437
|
+
/^[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}$/,
|
|
438
|
+
"Must be a valid GUID"
|
|
439
|
+
).optional().nullable(),
|
|
440
|
+
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
441
|
+
"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."
|
|
442
|
+
).optional().nullable(),
|
|
443
|
+
title: z.string().describe("Title of the task.").min(1).max(250).optional().nullable(),
|
|
444
|
+
description: z.string().describe("Description of the task.").min(1).max(500).optional().nullable(),
|
|
445
|
+
_createdDate: z.date().describe("Date and time the task was created.").optional().nullable(),
|
|
446
|
+
_updatedDate: z.date().describe("Date and time the task was last updated.").optional().nullable(),
|
|
447
|
+
dueDate: z.date().describe("Due date for the task.").optional().nullable(),
|
|
448
|
+
status: z.enum(["ACTION_NEEDED", "COMPLETED"]).describe("Status of the task.\n\nDefault: `ACTION_NEEDED`").optional(),
|
|
449
|
+
source: z.object({
|
|
450
|
+
sourceType: z.enum(["APP", "USER"]).describe("How the task was created.").optional(),
|
|
451
|
+
appId: z.string().describe("App ID, if the task was created by an app.").regex(
|
|
452
|
+
/^[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}$/,
|
|
453
|
+
"Must be a valid GUID"
|
|
454
|
+
).optional().nullable(),
|
|
455
|
+
userId: z.string().describe("User ID, if the task was created by a Wix user.").regex(
|
|
456
|
+
/^[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}$/,
|
|
457
|
+
"Must be a valid GUID"
|
|
458
|
+
).optional().nullable()
|
|
459
|
+
}).describe("Details about the task source.").optional(),
|
|
460
|
+
contact: z.object({
|
|
461
|
+
_id: z.string().describe("ID of the contact associated with the task.").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
|
+
firstName: z.string().describe("Contact's first name.").optional().nullable(),
|
|
466
|
+
lastName: z.string().describe("Contact's last name.").optional().nullable(),
|
|
467
|
+
imageUrl: z.string().describe("Contact's image URL.").optional().nullable(),
|
|
468
|
+
email: z.string().describe("Contact's primary email.").optional().nullable(),
|
|
469
|
+
phone: z.string().describe("Contact's primary phone.").optional().nullable(),
|
|
470
|
+
imageUrlExpirationDate: z.date().describe("Image URL expiration date.").optional().nullable()
|
|
471
|
+
}).describe("Information about the contact associated with the task.").optional()
|
|
472
|
+
});
|
|
473
|
+
var DeleteTaskRequest = z.object({
|
|
474
|
+
taskId: z.string().describe("ID of the task to delete.").regex(
|
|
475
|
+
/^[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}$/,
|
|
476
|
+
"Must be a valid GUID"
|
|
477
|
+
)
|
|
478
|
+
});
|
|
479
|
+
var DeleteTaskResponse = z.object({});
|
|
480
|
+
var QueryTasksRequest = z.object({
|
|
481
|
+
query: z.object({
|
|
482
|
+
filter: z.object({
|
|
483
|
+
dueDate: z.object({
|
|
484
|
+
$eq: z.string(),
|
|
485
|
+
$gt: z.string(),
|
|
486
|
+
$gte: z.string(),
|
|
487
|
+
$lt: z.string(),
|
|
488
|
+
$lte: z.string(),
|
|
489
|
+
$ne: z.string()
|
|
490
|
+
}).partial().strict().optional(),
|
|
491
|
+
status: z.object({
|
|
492
|
+
$eq: z.string(),
|
|
493
|
+
$in: z.array(z.string()),
|
|
494
|
+
$ne: z.string(),
|
|
495
|
+
$nin: z.array(z.string())
|
|
496
|
+
}).partial().strict().optional(),
|
|
497
|
+
$and: z.array(z.any()).optional(),
|
|
498
|
+
$or: z.array(z.any()).optional(),
|
|
499
|
+
$not: z.any().optional()
|
|
500
|
+
}).strict().optional(),
|
|
501
|
+
sort: z.array(
|
|
502
|
+
z.object({
|
|
503
|
+
fieldName: z.enum(["dueDate"]).optional(),
|
|
504
|
+
order: z.enum(["ASC", "DESC"]).optional()
|
|
505
|
+
})
|
|
506
|
+
).optional()
|
|
507
|
+
}).catchall(z.any()).describe("Query options.")
|
|
508
|
+
});
|
|
509
|
+
var QueryTasksResponse = z.object({
|
|
510
|
+
tasks: z.array(
|
|
511
|
+
z.object({
|
|
512
|
+
_id: z.string().describe("Task ID.").regex(
|
|
513
|
+
/^[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}$/,
|
|
514
|
+
"Must be a valid GUID"
|
|
515
|
+
).optional().nullable(),
|
|
516
|
+
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
517
|
+
"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."
|
|
518
|
+
).optional().nullable(),
|
|
519
|
+
title: z.string().describe("Title of the task.").min(1).max(250).optional().nullable(),
|
|
520
|
+
description: z.string().describe("Description of the task.").min(1).max(500).optional().nullable(),
|
|
521
|
+
_createdDate: z.date().describe("Date and time the task was created.").optional().nullable(),
|
|
522
|
+
_updatedDate: z.date().describe("Date and time the task was last updated.").optional().nullable(),
|
|
523
|
+
dueDate: z.date().describe("Due date for the task.").optional().nullable(),
|
|
524
|
+
status: z.enum(["ACTION_NEEDED", "COMPLETED"]).describe("Status of the task.\n\nDefault: `ACTION_NEEDED`").optional(),
|
|
525
|
+
source: z.object({
|
|
526
|
+
sourceType: z.enum(["APP", "USER"]).describe("How the task was created.").optional(),
|
|
527
|
+
appId: z.string().describe("App ID, if the task was created by an app.").regex(
|
|
528
|
+
/^[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}$/,
|
|
529
|
+
"Must be a valid GUID"
|
|
530
|
+
).optional().nullable(),
|
|
531
|
+
userId: z.string().describe("User ID, if the task was created by a Wix user.").regex(
|
|
532
|
+
/^[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}$/,
|
|
533
|
+
"Must be a valid GUID"
|
|
534
|
+
).optional().nullable()
|
|
535
|
+
}).describe("Details about the task source.").optional(),
|
|
536
|
+
contact: z.object({
|
|
537
|
+
_id: z.string().describe("ID of the contact associated with the task.").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
|
+
firstName: z.string().describe("Contact's first name.").optional().nullable(),
|
|
542
|
+
lastName: z.string().describe("Contact's last name.").optional().nullable(),
|
|
543
|
+
imageUrl: z.string().describe("Contact's image URL.").optional().nullable(),
|
|
544
|
+
email: z.string().describe("Contact's primary email.").optional().nullable(),
|
|
545
|
+
phone: z.string().describe("Contact's primary phone.").optional().nullable(),
|
|
546
|
+
imageUrlExpirationDate: z.date().describe("Image URL expiration date.").optional().nullable()
|
|
547
|
+
}).describe("Information about the contact associated with the task.").optional()
|
|
548
|
+
})
|
|
549
|
+
).optional(),
|
|
550
|
+
pagingMetadata: z.object({
|
|
551
|
+
count: z.number().int().describe("Number of items returned in the response.").optional().nullable(),
|
|
552
|
+
cursors: z.object({
|
|
553
|
+
next: z.string().describe("Cursor pointing to next page in the list of results.").optional().nullable(),
|
|
554
|
+
prev: z.string().describe(
|
|
555
|
+
"Cursor pointing to previous page in the list of results."
|
|
556
|
+
).optional().nullable()
|
|
557
|
+
}).describe("Offset that was requested.").optional(),
|
|
558
|
+
hasNext: z.boolean().describe(
|
|
559
|
+
"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."
|
|
560
|
+
).optional().nullable()
|
|
561
|
+
}).describe("Paging metadata.").optional()
|
|
562
|
+
});
|
|
563
|
+
var CountTasksRequest = z.object({
|
|
564
|
+
options: z.object({
|
|
565
|
+
filter: z.record(z.string(), z.any()).describe(
|
|
566
|
+
'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`.'
|
|
567
|
+
).optional().nullable()
|
|
568
|
+
}).describe("Filtering options.").optional()
|
|
569
|
+
});
|
|
570
|
+
var CountTasksResponse = z.object({
|
|
571
|
+
count: z.number().int().describe("The number of tasks that match the specified filter.").optional()
|
|
572
|
+
});
|
|
573
|
+
var MoveTaskAfterRequest = z.object({
|
|
574
|
+
taskId: z.string().describe("ID of the task to move.").regex(
|
|
575
|
+
/^[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}$/,
|
|
576
|
+
"Must be a valid GUID"
|
|
577
|
+
),
|
|
578
|
+
options: z.object({
|
|
579
|
+
beforeTaskId: z.string().describe(
|
|
580
|
+
"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."
|
|
581
|
+
).regex(
|
|
582
|
+
/^[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}$/,
|
|
583
|
+
"Must be a valid GUID"
|
|
584
|
+
).optional().nullable()
|
|
585
|
+
}).describe("Options for moving the task.").optional()
|
|
586
|
+
});
|
|
587
|
+
var MoveTaskAfterResponse = z.object({});
|
|
588
|
+
|
|
589
|
+
// src/crm-tasks-v2-task-tasks.universal.ts
|
|
266
590
|
import { createQueryUtils } from "@wix/sdk-runtime/query-builder-utils";
|
|
267
591
|
var TaskStatus = /* @__PURE__ */ ((TaskStatus2) => {
|
|
268
592
|
TaskStatus2["ACTION_NEEDED"] = "ACTION_NEEDED";
|
|
@@ -274,6 +598,12 @@ var SourceType = /* @__PURE__ */ ((SourceType2) => {
|
|
|
274
598
|
SourceType2["USER"] = "USER";
|
|
275
599
|
return SourceType2;
|
|
276
600
|
})(SourceType || {});
|
|
601
|
+
var ReminderType = /* @__PURE__ */ ((ReminderType2) => {
|
|
602
|
+
ReminderType2["UNKNOWN_REMINDER_TYPE"] = "UNKNOWN_REMINDER_TYPE";
|
|
603
|
+
ReminderType2["FIRST_REMINDER"] = "FIRST_REMINDER";
|
|
604
|
+
ReminderType2["LAST_REMINDER"] = "LAST_REMINDER";
|
|
605
|
+
return ReminderType2;
|
|
606
|
+
})(ReminderType || {});
|
|
277
607
|
var SortOrder = /* @__PURE__ */ ((SortOrder2) => {
|
|
278
608
|
SortOrder2["ASC"] = "ASC";
|
|
279
609
|
SortOrder2["DESC"] = "DESC";
|
|
@@ -287,14 +617,11 @@ var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
|
|
|
287
617
|
WebhookIdentityType2["APP"] = "APP";
|
|
288
618
|
return WebhookIdentityType2;
|
|
289
619
|
})(WebhookIdentityType || {});
|
|
290
|
-
var ReminderType = /* @__PURE__ */ ((ReminderType2) => {
|
|
291
|
-
ReminderType2["UNKNOWN_REMINDER_TYPE"] = "UNKNOWN_REMINDER_TYPE";
|
|
292
|
-
ReminderType2["FIRST_REMINDER"] = "FIRST_REMINDER";
|
|
293
|
-
ReminderType2["LAST_REMINDER"] = "LAST_REMINDER";
|
|
294
|
-
return ReminderType2;
|
|
295
|
-
})(ReminderType || {});
|
|
296
620
|
async function createTask2(task) {
|
|
297
|
-
const { httpClient, sideEffects } = arguments[1];
|
|
621
|
+
const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
|
|
622
|
+
if (validateRequestSchema) {
|
|
623
|
+
CreateTaskRequest.parse({ task });
|
|
624
|
+
}
|
|
298
625
|
const payload = renameKeysFromSDKRequestToRESTRequest({ task });
|
|
299
626
|
const reqOpts = createTask(payload);
|
|
300
627
|
sideEffects?.onSiteCall?.();
|
|
@@ -317,7 +644,10 @@ async function createTask2(task) {
|
|
|
317
644
|
}
|
|
318
645
|
}
|
|
319
646
|
async function getTask2(taskId) {
|
|
320
|
-
const { httpClient, sideEffects } = arguments[1];
|
|
647
|
+
const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
|
|
648
|
+
if (validateRequestSchema) {
|
|
649
|
+
GetTaskRequest.parse({ taskId });
|
|
650
|
+
}
|
|
321
651
|
const payload = renameKeysFromSDKRequestToRESTRequest({ taskId });
|
|
322
652
|
const reqOpts = getTask(payload);
|
|
323
653
|
sideEffects?.onSiteCall?.();
|
|
@@ -340,7 +670,10 @@ async function getTask2(taskId) {
|
|
|
340
670
|
}
|
|
341
671
|
}
|
|
342
672
|
async function updateTask2(_id, task) {
|
|
343
|
-
const { httpClient, sideEffects } = arguments[2];
|
|
673
|
+
const { httpClient, sideEffects, validateRequestSchema } = arguments[2];
|
|
674
|
+
if (validateRequestSchema) {
|
|
675
|
+
UpdateTaskRequest.parse({ _id, task });
|
|
676
|
+
}
|
|
344
677
|
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
345
678
|
task: { ...task, id: _id }
|
|
346
679
|
});
|
|
@@ -365,7 +698,10 @@ async function updateTask2(_id, task) {
|
|
|
365
698
|
}
|
|
366
699
|
}
|
|
367
700
|
async function deleteTask2(taskId) {
|
|
368
|
-
const { httpClient, sideEffects } = arguments[1];
|
|
701
|
+
const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
|
|
702
|
+
if (validateRequestSchema) {
|
|
703
|
+
DeleteTaskRequest.parse({ taskId });
|
|
704
|
+
}
|
|
369
705
|
const payload = renameKeysFromSDKRequestToRESTRequest({ taskId });
|
|
370
706
|
const reqOpts = deleteTask(payload);
|
|
371
707
|
sideEffects?.onSiteCall?.();
|
|
@@ -430,7 +766,10 @@ function queryTasks2() {
|
|
|
430
766
|
});
|
|
431
767
|
}
|
|
432
768
|
async function typedQueryTasks(query) {
|
|
433
|
-
const { httpClient, sideEffects } = arguments[1];
|
|
769
|
+
const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
|
|
770
|
+
if (validateRequestSchema) {
|
|
771
|
+
QueryTasksRequest.parse({ query });
|
|
772
|
+
}
|
|
434
773
|
const payload = renameKeysFromSDKRequestToRESTRequest({ query });
|
|
435
774
|
const reqOpts = queryTasks(payload);
|
|
436
775
|
sideEffects?.onSiteCall?.();
|
|
@@ -458,7 +797,10 @@ var utils = {
|
|
|
458
797
|
}
|
|
459
798
|
};
|
|
460
799
|
async function countTasks2(options) {
|
|
461
|
-
const { httpClient, sideEffects } = arguments[1];
|
|
800
|
+
const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
|
|
801
|
+
if (validateRequestSchema) {
|
|
802
|
+
CountTasksRequest.parse({ options });
|
|
803
|
+
}
|
|
462
804
|
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
463
805
|
filter: options?.filter
|
|
464
806
|
});
|
|
@@ -483,7 +825,10 @@ async function countTasks2(options) {
|
|
|
483
825
|
}
|
|
484
826
|
}
|
|
485
827
|
async function moveTaskAfter2(taskId, options) {
|
|
486
|
-
const { httpClient, sideEffects } = arguments[2];
|
|
828
|
+
const { httpClient, sideEffects, validateRequestSchema } = arguments[2];
|
|
829
|
+
if (validateRequestSchema) {
|
|
830
|
+
MoveTaskAfterRequest.parse({ taskId, options });
|
|
831
|
+
}
|
|
487
832
|
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
488
833
|
taskId,
|
|
489
834
|
beforeTaskId: options?.beforeTaskId
|