@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.
- package/build/cjs/index.d.ts +18 -6
- package/build/cjs/index.js +378 -23
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.js +362 -7
- package/build/cjs/index.typings.js.map +1 -1
- package/build/es/index.d.mts +18 -6
- package/build/es/index.mjs +368 -23
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.mjs +352 -7
- package/build/es/index.typings.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +18 -6
- package/build/internal/cjs/index.js +378 -23
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.js +362 -7
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/es/index.d.mts +18 -6
- package/build/internal/es/index.mjs +368 -23
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.mjs +352 -7
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/package.json +2 -2
package/build/cjs/index.d.ts
CHANGED
|
@@ -2,7 +2,9 @@ import { HttpClient, NonNullablePaths, EventDefinition, MaybeContext, BuildRESTF
|
|
|
2
2
|
import { Task, CreateTaskApplicationErrors, UpdateTask, UpdateTaskApplicationErrors, CountTasksOptions, CountTasksResponse, CountTasksApplicationErrors, MoveTaskAfterOptions, MoveTaskAfterApplicationErrors, TaskCreatedEnvelope, TaskDeletedEnvelope, TaskOverdueEnvelope, TaskUpdatedEnvelope, TasksQueryBuilder, TaskQuery, typedQueryTasks } from './index.typings.js';
|
|
3
3
|
export { AccountInfo, AccountInfoMetadata, ActionEvent, BaseEventMetadata, CommonQueryWithEntityContext, ContactInfo, ContactNotFoundError, CountTasksRequest, CreateTaskRequest, CreateTaskResponse, CursorPaging, CursorPagingMetadata, CursorQuery, CursorQueryPagingMethodOneOf, Cursors, DeleteCompletedTasksRequest, DeleteCompletedTasksResponse, DeleteTaskRequest, DeleteTaskResponse, DomainEvent, DomainEventBodyOneOf, Empty, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, EventMetadata, GetTaskRequest, GetTaskResponse, IdentificationData, IdentificationDataIdOneOf, MessageEnvelope, MoveTaskAfterRequest, MoveTaskAfterResponse, Paging, PagingMetadataV2, QueryTasksInternalRequest, QueryTasksInternalResponse, QueryTasksRequest, QueryTasksResponse, QueryV2, QueryV2PagingMethodOneOf, ReminderType, ReminderTypeWithLiterals, RepositionTask, RestoreInfo, SendTasksReminderRequest, SendTasksReminderResponse, SortOrder, SortOrderWithLiterals, Sorting, SourceType, SourceTypeWithLiterals, TaskAssigned, TaskNotFoundError, TaskOverdue, TaskQuerySpec, TaskSource, TaskStatus, TaskStatusWithLiterals, TasksQueryResult, UpdateTaskRequest, UpdateTaskResponse, WebhookIdentityType, WebhookIdentityTypeWithLiterals, utils } from './index.typings.js';
|
|
4
4
|
|
|
5
|
-
declare function createTask$1(httpClient: HttpClient
|
|
5
|
+
declare function createTask$1(httpClient: HttpClient, __options?: {
|
|
6
|
+
validateRequestSchema?: boolean;
|
|
7
|
+
}): CreateTaskSignature;
|
|
6
8
|
interface CreateTaskSignature {
|
|
7
9
|
/**
|
|
8
10
|
* Creates a new task.
|
|
@@ -13,7 +15,9 @@ interface CreateTaskSignature {
|
|
|
13
15
|
__applicationErrorsType?: CreateTaskApplicationErrors;
|
|
14
16
|
}>;
|
|
15
17
|
}
|
|
16
|
-
declare function getTask$1(httpClient: HttpClient
|
|
18
|
+
declare function getTask$1(httpClient: HttpClient, __options?: {
|
|
19
|
+
validateRequestSchema?: boolean;
|
|
20
|
+
}): GetTaskSignature;
|
|
17
21
|
interface GetTaskSignature {
|
|
18
22
|
/**
|
|
19
23
|
* Retrieves a task by ID.
|
|
@@ -22,7 +26,9 @@ interface GetTaskSignature {
|
|
|
22
26
|
*/
|
|
23
27
|
(taskId: string): Promise<NonNullablePaths<Task, `status` | `source.sourceType`, 3>>;
|
|
24
28
|
}
|
|
25
|
-
declare function updateTask$1(httpClient: HttpClient
|
|
29
|
+
declare function updateTask$1(httpClient: HttpClient, __options?: {
|
|
30
|
+
validateRequestSchema?: boolean;
|
|
31
|
+
}): UpdateTaskSignature;
|
|
26
32
|
interface UpdateTaskSignature {
|
|
27
33
|
/**
|
|
28
34
|
* Updates a task.
|
|
@@ -39,7 +45,9 @@ interface UpdateTaskSignature {
|
|
|
39
45
|
__applicationErrorsType?: UpdateTaskApplicationErrors;
|
|
40
46
|
}>;
|
|
41
47
|
}
|
|
42
|
-
declare function deleteTask$1(httpClient: HttpClient
|
|
48
|
+
declare function deleteTask$1(httpClient: HttpClient, __options?: {
|
|
49
|
+
validateRequestSchema?: boolean;
|
|
50
|
+
}): DeleteTaskSignature;
|
|
43
51
|
interface DeleteTaskSignature {
|
|
44
52
|
/**
|
|
45
53
|
* Deletes a task by ID.
|
|
@@ -47,7 +55,9 @@ interface DeleteTaskSignature {
|
|
|
47
55
|
*/
|
|
48
56
|
(taskId: string): Promise<void>;
|
|
49
57
|
}
|
|
50
|
-
declare function countTasks$1(httpClient: HttpClient
|
|
58
|
+
declare function countTasks$1(httpClient: HttpClient, __options?: {
|
|
59
|
+
validateRequestSchema?: boolean;
|
|
60
|
+
}): CountTasksSignature;
|
|
51
61
|
interface CountTasksSignature {
|
|
52
62
|
/**
|
|
53
63
|
* Counts the number of tasks.
|
|
@@ -62,7 +72,9 @@ interface CountTasksSignature {
|
|
|
62
72
|
__applicationErrorsType?: CountTasksApplicationErrors;
|
|
63
73
|
}>;
|
|
64
74
|
}
|
|
65
|
-
declare function moveTaskAfter$1(httpClient: HttpClient
|
|
75
|
+
declare function moveTaskAfter$1(httpClient: HttpClient, __options?: {
|
|
76
|
+
validateRequestSchema?: boolean;
|
|
77
|
+
}): MoveTaskAfterSignature;
|
|
66
78
|
interface MoveTaskAfterSignature {
|
|
67
79
|
/**
|
|
68
80
|
* Moves a task specified by ID to be placed after another task in the task display.
|
package/build/cjs/index.js
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
2
3
|
var __defProp = Object.defineProperty;
|
|
3
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
5
7
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
8
|
var __export = (target, all) => {
|
|
7
9
|
for (var name in all)
|
|
@@ -15,6 +17,14 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
15
17
|
}
|
|
16
18
|
return to;
|
|
17
19
|
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
18
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
29
|
|
|
20
30
|
// index.ts
|
|
@@ -308,6 +318,330 @@ function moveTaskAfter(payload) {
|
|
|
308
318
|
|
|
309
319
|
// src/crm-tasks-v2-task-tasks.universal.ts
|
|
310
320
|
var import_transform_paths2 = require("@wix/sdk-runtime/transformations/transform-paths");
|
|
321
|
+
|
|
322
|
+
// src/crm-tasks-v2-task-tasks.schemas.ts
|
|
323
|
+
var z = __toESM(require("zod"));
|
|
324
|
+
var CreateTaskRequest = z.object({
|
|
325
|
+
task: z.object({
|
|
326
|
+
_id: z.string().describe("Task ID.").regex(
|
|
327
|
+
/^[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}$/,
|
|
328
|
+
"Must be a valid GUID"
|
|
329
|
+
).optional().nullable(),
|
|
330
|
+
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
331
|
+
"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."
|
|
332
|
+
).optional().nullable(),
|
|
333
|
+
title: z.string().describe("Title of the task.").min(1).max(250).optional().nullable(),
|
|
334
|
+
description: z.string().describe("Description of the task.").min(1).max(500).optional().nullable(),
|
|
335
|
+
_createdDate: z.date().describe("Date and time the task was created.").optional().nullable(),
|
|
336
|
+
_updatedDate: z.date().describe("Date and time the task was last updated.").optional().nullable(),
|
|
337
|
+
dueDate: z.date().describe("Due date for the task.").optional().nullable(),
|
|
338
|
+
status: z.enum(["ACTION_NEEDED", "COMPLETED"]).optional(),
|
|
339
|
+
source: z.object({
|
|
340
|
+
sourceType: z.enum(["APP", "USER"]).optional(),
|
|
341
|
+
appId: z.string().describe("App ID, if the task was created by an app.").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
|
+
userId: z.string().describe("User ID, if the task was created by a Wix user.").regex(
|
|
346
|
+
/^[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}$/,
|
|
347
|
+
"Must be a valid GUID"
|
|
348
|
+
).optional().nullable()
|
|
349
|
+
}).describe("Details about the task source.").optional(),
|
|
350
|
+
contact: z.object({
|
|
351
|
+
_id: z.string().describe("ID of the contact associated with the task.").regex(
|
|
352
|
+
/^[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}$/,
|
|
353
|
+
"Must be a valid GUID"
|
|
354
|
+
).optional().nullable(),
|
|
355
|
+
firstName: z.string().describe("Contact's first name.").optional().nullable(),
|
|
356
|
+
lastName: z.string().describe("Contact's last name.").optional().nullable(),
|
|
357
|
+
imageUrl: z.string().describe("Contact's image URL.").optional().nullable(),
|
|
358
|
+
email: z.string().describe("Contact's primary email.").optional().nullable(),
|
|
359
|
+
phone: z.string().describe("Contact's primary phone.").optional().nullable(),
|
|
360
|
+
imageUrlExpirationDate: z.date().describe("Image URL expiration date.").optional().nullable()
|
|
361
|
+
}).describe("Information about the contact associated with the task.").optional()
|
|
362
|
+
}).describe("Task to create.")
|
|
363
|
+
});
|
|
364
|
+
var CreateTaskResponse = z.object({
|
|
365
|
+
_id: z.string().describe("Task ID.").regex(
|
|
366
|
+
/^[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}$/,
|
|
367
|
+
"Must be a valid GUID"
|
|
368
|
+
).optional().nullable(),
|
|
369
|
+
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
370
|
+
"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."
|
|
371
|
+
).optional().nullable(),
|
|
372
|
+
title: z.string().describe("Title of the task.").min(1).max(250).optional().nullable(),
|
|
373
|
+
description: z.string().describe("Description of the task.").min(1).max(500).optional().nullable(),
|
|
374
|
+
_createdDate: z.date().describe("Date and time the task was created.").optional().nullable(),
|
|
375
|
+
_updatedDate: z.date().describe("Date and time the task was last updated.").optional().nullable(),
|
|
376
|
+
dueDate: z.date().describe("Due date for the task.").optional().nullable(),
|
|
377
|
+
status: z.enum(["ACTION_NEEDED", "COMPLETED"]).describe("Status of the task.\n\nDefault: `ACTION_NEEDED`").optional(),
|
|
378
|
+
source: z.object({
|
|
379
|
+
sourceType: z.enum(["APP", "USER"]).describe("How the task was created.").optional(),
|
|
380
|
+
appId: z.string().describe("App ID, if the task was created by an app.").regex(
|
|
381
|
+
/^[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}$/,
|
|
382
|
+
"Must be a valid GUID"
|
|
383
|
+
).optional().nullable(),
|
|
384
|
+
userId: z.string().describe("User ID, if the task was created by a Wix user.").regex(
|
|
385
|
+
/^[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}$/,
|
|
386
|
+
"Must be a valid GUID"
|
|
387
|
+
).optional().nullable()
|
|
388
|
+
}).describe("Details about the task source.").optional(),
|
|
389
|
+
contact: z.object({
|
|
390
|
+
_id: z.string().describe("ID of the contact associated with the task.").regex(
|
|
391
|
+
/^[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}$/,
|
|
392
|
+
"Must be a valid GUID"
|
|
393
|
+
).optional().nullable(),
|
|
394
|
+
firstName: z.string().describe("Contact's first name.").optional().nullable(),
|
|
395
|
+
lastName: z.string().describe("Contact's last name.").optional().nullable(),
|
|
396
|
+
imageUrl: z.string().describe("Contact's image URL.").optional().nullable(),
|
|
397
|
+
email: z.string().describe("Contact's primary email.").optional().nullable(),
|
|
398
|
+
phone: z.string().describe("Contact's primary phone.").optional().nullable(),
|
|
399
|
+
imageUrlExpirationDate: z.date().describe("Image URL expiration date.").optional().nullable()
|
|
400
|
+
}).describe("Information about the contact associated with the task.").optional()
|
|
401
|
+
});
|
|
402
|
+
var GetTaskRequest = z.object({
|
|
403
|
+
taskId: z.string().describe("ID of the task to retrieve.").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
|
+
)
|
|
407
|
+
});
|
|
408
|
+
var GetTaskResponse = z.object({
|
|
409
|
+
_id: z.string().describe("Task ID.").regex(
|
|
410
|
+
/^[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}$/,
|
|
411
|
+
"Must be a valid GUID"
|
|
412
|
+
).optional().nullable(),
|
|
413
|
+
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
414
|
+
"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."
|
|
415
|
+
).optional().nullable(),
|
|
416
|
+
title: z.string().describe("Title of the task.").min(1).max(250).optional().nullable(),
|
|
417
|
+
description: z.string().describe("Description of the task.").min(1).max(500).optional().nullable(),
|
|
418
|
+
_createdDate: z.date().describe("Date and time the task was created.").optional().nullable(),
|
|
419
|
+
_updatedDate: z.date().describe("Date and time the task was last updated.").optional().nullable(),
|
|
420
|
+
dueDate: z.date().describe("Due date for the task.").optional().nullable(),
|
|
421
|
+
status: z.enum(["ACTION_NEEDED", "COMPLETED"]).describe("Status of the task.\n\nDefault: `ACTION_NEEDED`").optional(),
|
|
422
|
+
source: z.object({
|
|
423
|
+
sourceType: z.enum(["APP", "USER"]).describe("How the task was created.").optional(),
|
|
424
|
+
appId: z.string().describe("App ID, if the task was created by an app.").regex(
|
|
425
|
+
/^[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}$/,
|
|
426
|
+
"Must be a valid GUID"
|
|
427
|
+
).optional().nullable(),
|
|
428
|
+
userId: z.string().describe("User ID, if the task was created by a Wix user.").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
|
+
}).describe("Details about the task source.").optional(),
|
|
433
|
+
contact: z.object({
|
|
434
|
+
_id: z.string().describe("ID of the contact associated with the task.").regex(
|
|
435
|
+
/^[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}$/,
|
|
436
|
+
"Must be a valid GUID"
|
|
437
|
+
).optional().nullable(),
|
|
438
|
+
firstName: z.string().describe("Contact's first name.").optional().nullable(),
|
|
439
|
+
lastName: z.string().describe("Contact's last name.").optional().nullable(),
|
|
440
|
+
imageUrl: z.string().describe("Contact's image URL.").optional().nullable(),
|
|
441
|
+
email: z.string().describe("Contact's primary email.").optional().nullable(),
|
|
442
|
+
phone: z.string().describe("Contact's primary phone.").optional().nullable(),
|
|
443
|
+
imageUrlExpirationDate: z.date().describe("Image URL expiration date.").optional().nullable()
|
|
444
|
+
}).describe("Information about the contact associated with the task.").optional()
|
|
445
|
+
});
|
|
446
|
+
var UpdateTaskRequest = z.object({
|
|
447
|
+
_id: z.string().describe("Task ID.").regex(
|
|
448
|
+
/^[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}$/,
|
|
449
|
+
"Must be a valid GUID"
|
|
450
|
+
),
|
|
451
|
+
task: z.object({
|
|
452
|
+
_id: z.string().describe("Task ID.").regex(
|
|
453
|
+
/^[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}$/,
|
|
454
|
+
"Must be a valid GUID"
|
|
455
|
+
).optional().nullable(),
|
|
456
|
+
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
457
|
+
"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."
|
|
458
|
+
),
|
|
459
|
+
title: z.string().describe("Title of the task.").min(1).max(250).optional().nullable(),
|
|
460
|
+
description: z.string().describe("Description of the task.").min(1).max(500).optional().nullable(),
|
|
461
|
+
_createdDate: z.date().describe("Date and time the task was created.").optional().nullable(),
|
|
462
|
+
_updatedDate: z.date().describe("Date and time the task was last updated.").optional().nullable(),
|
|
463
|
+
dueDate: z.date().describe("Due date for the task.").optional().nullable(),
|
|
464
|
+
status: z.enum(["ACTION_NEEDED", "COMPLETED"]).optional(),
|
|
465
|
+
source: z.object({
|
|
466
|
+
sourceType: z.enum(["APP", "USER"]).optional(),
|
|
467
|
+
appId: z.string().describe("App ID, if the task was created by an app.").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
|
+
userId: z.string().describe("User ID, if the task was created by a Wix user.").regex(
|
|
472
|
+
/^[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}$/,
|
|
473
|
+
"Must be a valid GUID"
|
|
474
|
+
).optional().nullable()
|
|
475
|
+
}).describe("Details about the task source.").optional(),
|
|
476
|
+
contact: z.object({
|
|
477
|
+
_id: z.string().describe("ID of the contact associated with the task.").regex(
|
|
478
|
+
/^[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}$/,
|
|
479
|
+
"Must be a valid GUID"
|
|
480
|
+
).optional().nullable(),
|
|
481
|
+
firstName: z.string().describe("Contact's first name.").optional().nullable(),
|
|
482
|
+
lastName: z.string().describe("Contact's last name.").optional().nullable(),
|
|
483
|
+
imageUrl: z.string().describe("Contact's image URL.").optional().nullable(),
|
|
484
|
+
email: z.string().describe("Contact's primary email.").optional().nullable(),
|
|
485
|
+
phone: z.string().describe("Contact's primary phone.").optional().nullable(),
|
|
486
|
+
imageUrlExpirationDate: z.date().describe("Image URL expiration date.").optional().nullable()
|
|
487
|
+
}).describe("Information about the contact associated with the task.").optional()
|
|
488
|
+
}).describe("Task to update.")
|
|
489
|
+
});
|
|
490
|
+
var UpdateTaskResponse = z.object({
|
|
491
|
+
_id: z.string().describe("Task ID.").regex(
|
|
492
|
+
/^[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}$/,
|
|
493
|
+
"Must be a valid GUID"
|
|
494
|
+
).optional().nullable(),
|
|
495
|
+
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
496
|
+
"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."
|
|
497
|
+
).optional().nullable(),
|
|
498
|
+
title: z.string().describe("Title of the task.").min(1).max(250).optional().nullable(),
|
|
499
|
+
description: z.string().describe("Description of the task.").min(1).max(500).optional().nullable(),
|
|
500
|
+
_createdDate: z.date().describe("Date and time the task was created.").optional().nullable(),
|
|
501
|
+
_updatedDate: z.date().describe("Date and time the task was last updated.").optional().nullable(),
|
|
502
|
+
dueDate: z.date().describe("Due date for the task.").optional().nullable(),
|
|
503
|
+
status: z.enum(["ACTION_NEEDED", "COMPLETED"]).describe("Status of the task.\n\nDefault: `ACTION_NEEDED`").optional(),
|
|
504
|
+
source: z.object({
|
|
505
|
+
sourceType: z.enum(["APP", "USER"]).describe("How the task was created.").optional(),
|
|
506
|
+
appId: z.string().describe("App ID, if the task was created by an app.").regex(
|
|
507
|
+
/^[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}$/,
|
|
508
|
+
"Must be a valid GUID"
|
|
509
|
+
).optional().nullable(),
|
|
510
|
+
userId: z.string().describe("User ID, if the task was created by a Wix user.").regex(
|
|
511
|
+
/^[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}$/,
|
|
512
|
+
"Must be a valid GUID"
|
|
513
|
+
).optional().nullable()
|
|
514
|
+
}).describe("Details about the task source.").optional(),
|
|
515
|
+
contact: z.object({
|
|
516
|
+
_id: z.string().describe("ID of the contact associated with the task.").regex(
|
|
517
|
+
/^[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}$/,
|
|
518
|
+
"Must be a valid GUID"
|
|
519
|
+
).optional().nullable(),
|
|
520
|
+
firstName: z.string().describe("Contact's first name.").optional().nullable(),
|
|
521
|
+
lastName: z.string().describe("Contact's last name.").optional().nullable(),
|
|
522
|
+
imageUrl: z.string().describe("Contact's image URL.").optional().nullable(),
|
|
523
|
+
email: z.string().describe("Contact's primary email.").optional().nullable(),
|
|
524
|
+
phone: z.string().describe("Contact's primary phone.").optional().nullable(),
|
|
525
|
+
imageUrlExpirationDate: z.date().describe("Image URL expiration date.").optional().nullable()
|
|
526
|
+
}).describe("Information about the contact associated with the task.").optional()
|
|
527
|
+
});
|
|
528
|
+
var DeleteTaskRequest = z.object({
|
|
529
|
+
taskId: z.string().describe("ID of the task to delete.").regex(
|
|
530
|
+
/^[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}$/,
|
|
531
|
+
"Must be a valid GUID"
|
|
532
|
+
)
|
|
533
|
+
});
|
|
534
|
+
var DeleteTaskResponse = z.object({});
|
|
535
|
+
var QueryTasksRequest = z.object({
|
|
536
|
+
query: z.object({
|
|
537
|
+
filter: z.object({
|
|
538
|
+
dueDate: z.object({
|
|
539
|
+
$eq: z.string(),
|
|
540
|
+
$gt: z.string(),
|
|
541
|
+
$gte: z.string(),
|
|
542
|
+
$lt: z.string(),
|
|
543
|
+
$lte: z.string(),
|
|
544
|
+
$ne: z.string()
|
|
545
|
+
}).partial().strict().optional(),
|
|
546
|
+
status: z.object({
|
|
547
|
+
$eq: z.string(),
|
|
548
|
+
$in: z.array(z.string()),
|
|
549
|
+
$ne: z.string(),
|
|
550
|
+
$nin: z.array(z.string())
|
|
551
|
+
}).partial().strict().optional(),
|
|
552
|
+
$and: z.array(z.any()).optional(),
|
|
553
|
+
$or: z.array(z.any()).optional(),
|
|
554
|
+
$not: z.any().optional()
|
|
555
|
+
}).strict().optional(),
|
|
556
|
+
sort: z.array(
|
|
557
|
+
z.object({
|
|
558
|
+
fieldName: z.enum(["dueDate"]).optional(),
|
|
559
|
+
order: z.enum(["ASC", "DESC"]).optional()
|
|
560
|
+
})
|
|
561
|
+
).optional()
|
|
562
|
+
}).catchall(z.any()).describe("Query options.")
|
|
563
|
+
});
|
|
564
|
+
var QueryTasksResponse = z.object({
|
|
565
|
+
tasks: z.array(
|
|
566
|
+
z.object({
|
|
567
|
+
_id: z.string().describe("Task ID.").regex(
|
|
568
|
+
/^[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}$/,
|
|
569
|
+
"Must be a valid GUID"
|
|
570
|
+
).optional().nullable(),
|
|
571
|
+
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
572
|
+
"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."
|
|
573
|
+
).optional().nullable(),
|
|
574
|
+
title: z.string().describe("Title of the task.").min(1).max(250).optional().nullable(),
|
|
575
|
+
description: z.string().describe("Description of the task.").min(1).max(500).optional().nullable(),
|
|
576
|
+
_createdDate: z.date().describe("Date and time the task was created.").optional().nullable(),
|
|
577
|
+
_updatedDate: z.date().describe("Date and time the task was last updated.").optional().nullable(),
|
|
578
|
+
dueDate: z.date().describe("Due date for the task.").optional().nullable(),
|
|
579
|
+
status: z.enum(["ACTION_NEEDED", "COMPLETED"]).describe("Status of the task.\n\nDefault: `ACTION_NEEDED`").optional(),
|
|
580
|
+
source: z.object({
|
|
581
|
+
sourceType: z.enum(["APP", "USER"]).describe("How the task was created.").optional(),
|
|
582
|
+
appId: z.string().describe("App ID, if the task was created by an app.").regex(
|
|
583
|
+
/^[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}$/,
|
|
584
|
+
"Must be a valid GUID"
|
|
585
|
+
).optional().nullable(),
|
|
586
|
+
userId: z.string().describe("User ID, if the task was created by a Wix user.").regex(
|
|
587
|
+
/^[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}$/,
|
|
588
|
+
"Must be a valid GUID"
|
|
589
|
+
).optional().nullable()
|
|
590
|
+
}).describe("Details about the task source.").optional(),
|
|
591
|
+
contact: z.object({
|
|
592
|
+
_id: z.string().describe("ID of the contact associated with the task.").regex(
|
|
593
|
+
/^[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}$/,
|
|
594
|
+
"Must be a valid GUID"
|
|
595
|
+
).optional().nullable(),
|
|
596
|
+
firstName: z.string().describe("Contact's first name.").optional().nullable(),
|
|
597
|
+
lastName: z.string().describe("Contact's last name.").optional().nullable(),
|
|
598
|
+
imageUrl: z.string().describe("Contact's image URL.").optional().nullable(),
|
|
599
|
+
email: z.string().describe("Contact's primary email.").optional().nullable(),
|
|
600
|
+
phone: z.string().describe("Contact's primary phone.").optional().nullable(),
|
|
601
|
+
imageUrlExpirationDate: z.date().describe("Image URL expiration date.").optional().nullable()
|
|
602
|
+
}).describe("Information about the contact associated with the task.").optional()
|
|
603
|
+
})
|
|
604
|
+
).optional(),
|
|
605
|
+
pagingMetadata: z.object({
|
|
606
|
+
count: z.number().int().describe("Number of items returned in the response.").optional().nullable(),
|
|
607
|
+
cursors: z.object({
|
|
608
|
+
next: z.string().describe("Cursor pointing to next page in the list of results.").optional().nullable(),
|
|
609
|
+
prev: z.string().describe(
|
|
610
|
+
"Cursor pointing to previous page in the list of results."
|
|
611
|
+
).optional().nullable()
|
|
612
|
+
}).describe("Offset that was requested.").optional(),
|
|
613
|
+
hasNext: z.boolean().describe(
|
|
614
|
+
"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."
|
|
615
|
+
).optional().nullable()
|
|
616
|
+
}).describe("Paging metadata.").optional()
|
|
617
|
+
});
|
|
618
|
+
var CountTasksRequest = z.object({
|
|
619
|
+
options: z.object({
|
|
620
|
+
filter: z.record(z.string(), z.any()).describe(
|
|
621
|
+
'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`.'
|
|
622
|
+
).optional().nullable()
|
|
623
|
+
}).describe("Filtering options.").optional()
|
|
624
|
+
});
|
|
625
|
+
var CountTasksResponse = z.object({
|
|
626
|
+
count: z.number().int().describe("The number of tasks that match the specified filter.").optional()
|
|
627
|
+
});
|
|
628
|
+
var MoveTaskAfterRequest = z.object({
|
|
629
|
+
taskId: z.string().describe("ID of the task to move.").regex(
|
|
630
|
+
/^[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}$/,
|
|
631
|
+
"Must be a valid GUID"
|
|
632
|
+
),
|
|
633
|
+
options: z.object({
|
|
634
|
+
beforeTaskId: z.string().describe(
|
|
635
|
+
"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."
|
|
636
|
+
).regex(
|
|
637
|
+
/^[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}$/,
|
|
638
|
+
"Must be a valid GUID"
|
|
639
|
+
).optional().nullable()
|
|
640
|
+
}).describe("Options for moving the task.").optional()
|
|
641
|
+
});
|
|
642
|
+
var MoveTaskAfterResponse = z.object({});
|
|
643
|
+
|
|
644
|
+
// src/crm-tasks-v2-task-tasks.universal.ts
|
|
311
645
|
var import_query_builder_utils = require("@wix/sdk-runtime/query-builder-utils");
|
|
312
646
|
var TaskStatus = /* @__PURE__ */ ((TaskStatus2) => {
|
|
313
647
|
TaskStatus2["ACTION_NEEDED"] = "ACTION_NEEDED";
|
|
@@ -339,7 +673,10 @@ var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
|
|
|
339
673
|
return WebhookIdentityType2;
|
|
340
674
|
})(WebhookIdentityType || {});
|
|
341
675
|
async function createTask2(task) {
|
|
342
|
-
const { httpClient, sideEffects } = arguments[1];
|
|
676
|
+
const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
|
|
677
|
+
if (validateRequestSchema) {
|
|
678
|
+
CreateTaskRequest.parse({ task });
|
|
679
|
+
}
|
|
343
680
|
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({ task });
|
|
344
681
|
const reqOpts = createTask(payload);
|
|
345
682
|
sideEffects?.onSiteCall?.();
|
|
@@ -362,7 +699,10 @@ async function createTask2(task) {
|
|
|
362
699
|
}
|
|
363
700
|
}
|
|
364
701
|
async function getTask2(taskId) {
|
|
365
|
-
const { httpClient, sideEffects } = arguments[1];
|
|
702
|
+
const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
|
|
703
|
+
if (validateRequestSchema) {
|
|
704
|
+
GetTaskRequest.parse({ taskId });
|
|
705
|
+
}
|
|
366
706
|
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({ taskId });
|
|
367
707
|
const reqOpts = getTask(payload);
|
|
368
708
|
sideEffects?.onSiteCall?.();
|
|
@@ -385,7 +725,10 @@ async function getTask2(taskId) {
|
|
|
385
725
|
}
|
|
386
726
|
}
|
|
387
727
|
async function updateTask2(_id, task) {
|
|
388
|
-
const { httpClient, sideEffects } = arguments[2];
|
|
728
|
+
const { httpClient, sideEffects, validateRequestSchema } = arguments[2];
|
|
729
|
+
if (validateRequestSchema) {
|
|
730
|
+
UpdateTaskRequest.parse({ _id, task });
|
|
731
|
+
}
|
|
389
732
|
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
390
733
|
task: { ...task, id: _id }
|
|
391
734
|
});
|
|
@@ -410,7 +753,10 @@ async function updateTask2(_id, task) {
|
|
|
410
753
|
}
|
|
411
754
|
}
|
|
412
755
|
async function deleteTask2(taskId) {
|
|
413
|
-
const { httpClient, sideEffects } = arguments[1];
|
|
756
|
+
const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
|
|
757
|
+
if (validateRequestSchema) {
|
|
758
|
+
DeleteTaskRequest.parse({ taskId });
|
|
759
|
+
}
|
|
414
760
|
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({ taskId });
|
|
415
761
|
const reqOpts = deleteTask(payload);
|
|
416
762
|
sideEffects?.onSiteCall?.();
|
|
@@ -475,7 +821,10 @@ function queryTasks2() {
|
|
|
475
821
|
});
|
|
476
822
|
}
|
|
477
823
|
async function typedQueryTasks(query) {
|
|
478
|
-
const { httpClient, sideEffects } = arguments[1];
|
|
824
|
+
const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
|
|
825
|
+
if (validateRequestSchema) {
|
|
826
|
+
QueryTasksRequest.parse({ query });
|
|
827
|
+
}
|
|
479
828
|
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({ query });
|
|
480
829
|
const reqOpts = queryTasks(payload);
|
|
481
830
|
sideEffects?.onSiteCall?.();
|
|
@@ -503,7 +852,10 @@ var utils = {
|
|
|
503
852
|
}
|
|
504
853
|
};
|
|
505
854
|
async function countTasks2(options) {
|
|
506
|
-
const { httpClient, sideEffects } = arguments[1];
|
|
855
|
+
const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
|
|
856
|
+
if (validateRequestSchema) {
|
|
857
|
+
CountTasksRequest.parse({ options });
|
|
858
|
+
}
|
|
507
859
|
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
508
860
|
filter: options?.filter
|
|
509
861
|
});
|
|
@@ -528,7 +880,10 @@ async function countTasks2(options) {
|
|
|
528
880
|
}
|
|
529
881
|
}
|
|
530
882
|
async function moveTaskAfter2(taskId, options) {
|
|
531
|
-
const { httpClient, sideEffects } = arguments[2];
|
|
883
|
+
const { httpClient, sideEffects, validateRequestSchema } = arguments[2];
|
|
884
|
+
if (validateRequestSchema) {
|
|
885
|
+
MoveTaskAfterRequest.parse({ taskId, options });
|
|
886
|
+
}
|
|
532
887
|
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
533
888
|
taskId,
|
|
534
889
|
beforeTaskId: options?.beforeTaskId
|
|
@@ -558,61 +913,61 @@ async function moveTaskAfter2(taskId, options) {
|
|
|
558
913
|
}
|
|
559
914
|
|
|
560
915
|
// src/crm-tasks-v2-task-tasks.public.ts
|
|
561
|
-
function createTask3(httpClient) {
|
|
916
|
+
function createTask3(httpClient, __options) {
|
|
562
917
|
return (task) => createTask2(
|
|
563
918
|
task,
|
|
564
919
|
// @ts-ignore
|
|
565
|
-
{ httpClient }
|
|
920
|
+
{ httpClient, validateRequestSchema: __options?.validateRequestSchema }
|
|
566
921
|
);
|
|
567
922
|
}
|
|
568
|
-
function getTask3(httpClient) {
|
|
923
|
+
function getTask3(httpClient, __options) {
|
|
569
924
|
return (taskId) => getTask2(
|
|
570
925
|
taskId,
|
|
571
926
|
// @ts-ignore
|
|
572
|
-
{ httpClient }
|
|
927
|
+
{ httpClient, validateRequestSchema: __options?.validateRequestSchema }
|
|
573
928
|
);
|
|
574
929
|
}
|
|
575
|
-
function updateTask3(httpClient) {
|
|
930
|
+
function updateTask3(httpClient, __options) {
|
|
576
931
|
return (_id, task) => updateTask2(
|
|
577
932
|
_id,
|
|
578
933
|
task,
|
|
579
934
|
// @ts-ignore
|
|
580
|
-
{ httpClient }
|
|
935
|
+
{ httpClient, validateRequestSchema: __options?.validateRequestSchema }
|
|
581
936
|
);
|
|
582
937
|
}
|
|
583
|
-
function deleteTask3(httpClient) {
|
|
938
|
+
function deleteTask3(httpClient, __options) {
|
|
584
939
|
return (taskId) => deleteTask2(
|
|
585
940
|
taskId,
|
|
586
941
|
// @ts-ignore
|
|
587
|
-
{ httpClient }
|
|
942
|
+
{ httpClient, validateRequestSchema: __options?.validateRequestSchema }
|
|
588
943
|
);
|
|
589
944
|
}
|
|
590
|
-
function queryTasks3(httpClient) {
|
|
945
|
+
function queryTasks3(httpClient, __options) {
|
|
591
946
|
return () => queryTasks2(
|
|
592
947
|
// @ts-ignore
|
|
593
|
-
{ httpClient }
|
|
948
|
+
{ httpClient, validateRequestSchema: __options?.validateRequestSchema }
|
|
594
949
|
);
|
|
595
950
|
}
|
|
596
|
-
function typedQueryTasks2(httpClient) {
|
|
951
|
+
function typedQueryTasks2(httpClient, __options) {
|
|
597
952
|
return (query) => typedQueryTasks(
|
|
598
953
|
query,
|
|
599
954
|
// @ts-ignore
|
|
600
|
-
{ httpClient }
|
|
955
|
+
{ httpClient, validateRequestSchema: __options?.validateRequestSchema }
|
|
601
956
|
);
|
|
602
957
|
}
|
|
603
|
-
function countTasks3(httpClient) {
|
|
958
|
+
function countTasks3(httpClient, __options) {
|
|
604
959
|
return (options) => countTasks2(
|
|
605
960
|
options,
|
|
606
961
|
// @ts-ignore
|
|
607
|
-
{ httpClient }
|
|
962
|
+
{ httpClient, validateRequestSchema: __options?.validateRequestSchema }
|
|
608
963
|
);
|
|
609
964
|
}
|
|
610
|
-
function moveTaskAfter3(httpClient) {
|
|
965
|
+
function moveTaskAfter3(httpClient, __options) {
|
|
611
966
|
return (taskId, options) => moveTaskAfter2(
|
|
612
967
|
taskId,
|
|
613
968
|
options,
|
|
614
969
|
// @ts-ignore
|
|
615
|
-
{ httpClient }
|
|
970
|
+
{ httpClient, validateRequestSchema: __options?.validateRequestSchema }
|
|
616
971
|
);
|
|
617
972
|
}
|
|
618
973
|
var onTaskCreated = (0, import_sdk_types.EventDefinition)(
|