@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
package/build/es/index.mjs
CHANGED
|
@@ -269,330 +269,6 @@ 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
|
|
596
272
|
import { createQueryUtils } from "@wix/sdk-runtime/query-builder-utils";
|
|
597
273
|
var TaskStatus = /* @__PURE__ */ ((TaskStatus2) => {
|
|
598
274
|
TaskStatus2["ACTION_NEEDED"] = "ACTION_NEEDED";
|
|
@@ -624,10 +300,7 @@ var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
|
|
|
624
300
|
return WebhookIdentityType2;
|
|
625
301
|
})(WebhookIdentityType || {});
|
|
626
302
|
async function createTask2(task) {
|
|
627
|
-
const { httpClient, sideEffects
|
|
628
|
-
if (validateRequestSchema) {
|
|
629
|
-
CreateTaskRequest.parse({ task });
|
|
630
|
-
}
|
|
303
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
631
304
|
const payload = renameKeysFromSDKRequestToRESTRequest({ task });
|
|
632
305
|
const reqOpts = createTask(payload);
|
|
633
306
|
sideEffects?.onSiteCall?.();
|
|
@@ -650,10 +323,7 @@ async function createTask2(task) {
|
|
|
650
323
|
}
|
|
651
324
|
}
|
|
652
325
|
async function getTask2(taskId) {
|
|
653
|
-
const { httpClient, sideEffects
|
|
654
|
-
if (validateRequestSchema) {
|
|
655
|
-
GetTaskRequest.parse({ taskId });
|
|
656
|
-
}
|
|
326
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
657
327
|
const payload = renameKeysFromSDKRequestToRESTRequest({ taskId });
|
|
658
328
|
const reqOpts = getTask(payload);
|
|
659
329
|
sideEffects?.onSiteCall?.();
|
|
@@ -676,10 +346,7 @@ async function getTask2(taskId) {
|
|
|
676
346
|
}
|
|
677
347
|
}
|
|
678
348
|
async function updateTask2(_id, task) {
|
|
679
|
-
const { httpClient, sideEffects
|
|
680
|
-
if (validateRequestSchema) {
|
|
681
|
-
UpdateTaskRequest.parse({ _id, task });
|
|
682
|
-
}
|
|
349
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
683
350
|
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
684
351
|
task: { ...task, id: _id }
|
|
685
352
|
});
|
|
@@ -704,10 +371,7 @@ async function updateTask2(_id, task) {
|
|
|
704
371
|
}
|
|
705
372
|
}
|
|
706
373
|
async function deleteTask2(taskId) {
|
|
707
|
-
const { httpClient, sideEffects
|
|
708
|
-
if (validateRequestSchema) {
|
|
709
|
-
DeleteTaskRequest.parse({ taskId });
|
|
710
|
-
}
|
|
374
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
711
375
|
const payload = renameKeysFromSDKRequestToRESTRequest({ taskId });
|
|
712
376
|
const reqOpts = deleteTask(payload);
|
|
713
377
|
sideEffects?.onSiteCall?.();
|
|
@@ -772,10 +436,7 @@ function queryTasks2() {
|
|
|
772
436
|
});
|
|
773
437
|
}
|
|
774
438
|
async function typedQueryTasks(query) {
|
|
775
|
-
const { httpClient, sideEffects
|
|
776
|
-
if (validateRequestSchema) {
|
|
777
|
-
QueryTasksRequest.parse({ query });
|
|
778
|
-
}
|
|
439
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
779
440
|
const payload = renameKeysFromSDKRequestToRESTRequest({ query });
|
|
780
441
|
const reqOpts = queryTasks(payload);
|
|
781
442
|
sideEffects?.onSiteCall?.();
|
|
@@ -803,10 +464,7 @@ var utils = {
|
|
|
803
464
|
}
|
|
804
465
|
};
|
|
805
466
|
async function countTasks2(options) {
|
|
806
|
-
const { httpClient, sideEffects
|
|
807
|
-
if (validateRequestSchema) {
|
|
808
|
-
CountTasksRequest.parse({ options });
|
|
809
|
-
}
|
|
467
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
810
468
|
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
811
469
|
filter: options?.filter
|
|
812
470
|
});
|
|
@@ -831,10 +489,7 @@ async function countTasks2(options) {
|
|
|
831
489
|
}
|
|
832
490
|
}
|
|
833
491
|
async function moveTaskAfter2(taskId, options) {
|
|
834
|
-
const { httpClient, sideEffects
|
|
835
|
-
if (validateRequestSchema) {
|
|
836
|
-
MoveTaskAfterRequest.parse({ taskId, options });
|
|
837
|
-
}
|
|
492
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
838
493
|
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
839
494
|
taskId,
|
|
840
495
|
beforeTaskId: options?.beforeTaskId
|
|
@@ -864,61 +519,61 @@ async function moveTaskAfter2(taskId, options) {
|
|
|
864
519
|
}
|
|
865
520
|
|
|
866
521
|
// src/crm-tasks-v2-task-tasks.public.ts
|
|
867
|
-
function createTask3(httpClient
|
|
522
|
+
function createTask3(httpClient) {
|
|
868
523
|
return (task) => createTask2(
|
|
869
524
|
task,
|
|
870
525
|
// @ts-ignore
|
|
871
|
-
{ httpClient
|
|
526
|
+
{ httpClient }
|
|
872
527
|
);
|
|
873
528
|
}
|
|
874
|
-
function getTask3(httpClient
|
|
529
|
+
function getTask3(httpClient) {
|
|
875
530
|
return (taskId) => getTask2(
|
|
876
531
|
taskId,
|
|
877
532
|
// @ts-ignore
|
|
878
|
-
{ httpClient
|
|
533
|
+
{ httpClient }
|
|
879
534
|
);
|
|
880
535
|
}
|
|
881
|
-
function updateTask3(httpClient
|
|
536
|
+
function updateTask3(httpClient) {
|
|
882
537
|
return (_id, task) => updateTask2(
|
|
883
538
|
_id,
|
|
884
539
|
task,
|
|
885
540
|
// @ts-ignore
|
|
886
|
-
{ httpClient
|
|
541
|
+
{ httpClient }
|
|
887
542
|
);
|
|
888
543
|
}
|
|
889
|
-
function deleteTask3(httpClient
|
|
544
|
+
function deleteTask3(httpClient) {
|
|
890
545
|
return (taskId) => deleteTask2(
|
|
891
546
|
taskId,
|
|
892
547
|
// @ts-ignore
|
|
893
|
-
{ httpClient
|
|
548
|
+
{ httpClient }
|
|
894
549
|
);
|
|
895
550
|
}
|
|
896
|
-
function queryTasks3(httpClient
|
|
551
|
+
function queryTasks3(httpClient) {
|
|
897
552
|
return () => queryTasks2(
|
|
898
553
|
// @ts-ignore
|
|
899
|
-
{ httpClient
|
|
554
|
+
{ httpClient }
|
|
900
555
|
);
|
|
901
556
|
}
|
|
902
|
-
function typedQueryTasks2(httpClient
|
|
557
|
+
function typedQueryTasks2(httpClient) {
|
|
903
558
|
return (query) => typedQueryTasks(
|
|
904
559
|
query,
|
|
905
560
|
// @ts-ignore
|
|
906
|
-
{ httpClient
|
|
561
|
+
{ httpClient }
|
|
907
562
|
);
|
|
908
563
|
}
|
|
909
|
-
function countTasks3(httpClient
|
|
564
|
+
function countTasks3(httpClient) {
|
|
910
565
|
return (options) => countTasks2(
|
|
911
566
|
options,
|
|
912
567
|
// @ts-ignore
|
|
913
|
-
{ httpClient
|
|
568
|
+
{ httpClient }
|
|
914
569
|
);
|
|
915
570
|
}
|
|
916
|
-
function moveTaskAfter3(httpClient
|
|
571
|
+
function moveTaskAfter3(httpClient) {
|
|
917
572
|
return (taskId, options) => moveTaskAfter2(
|
|
918
573
|
taskId,
|
|
919
574
|
options,
|
|
920
575
|
// @ts-ignore
|
|
921
|
-
{ httpClient
|
|
576
|
+
{ httpClient }
|
|
922
577
|
);
|
|
923
578
|
}
|
|
924
579
|
var onTaskCreated = EventDefinition(
|