@wix/crm 1.0.13 → 1.0.14

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.
Files changed (31) hide show
  1. package/build/cjs/index.d.ts +0 -1
  2. package/build/cjs/index.js +1 -2
  3. package/build/cjs/index.js.map +1 -1
  4. package/build/es/index.d.ts +0 -1
  5. package/build/es/index.js +0 -1
  6. package/build/es/index.js.map +1 -1
  7. package/package.json +2 -2
  8. package/build/cjs/src/crm-tasks-v2-task.http.d.ts +0 -28
  9. package/build/cjs/src/crm-tasks-v2-task.http.js +0 -197
  10. package/build/cjs/src/crm-tasks-v2-task.http.js.map +0 -1
  11. package/build/cjs/src/crm-tasks-v2-task.public.d.ts +0 -13
  12. package/build/cjs/src/crm-tasks-v2-task.public.js +0 -46
  13. package/build/cjs/src/crm-tasks-v2-task.public.js.map +0 -1
  14. package/build/cjs/src/crm-tasks-v2-task.types.d.ts +0 -228
  15. package/build/cjs/src/crm-tasks-v2-task.types.js +0 -23
  16. package/build/cjs/src/crm-tasks-v2-task.types.js.map +0 -1
  17. package/build/cjs/src/crm-tasks-v2-task.universal.d.ts +0 -404
  18. package/build/cjs/src/crm-tasks-v2-task.universal.js +0 -412
  19. package/build/cjs/src/crm-tasks-v2-task.universal.js.map +0 -1
  20. package/build/es/src/crm-tasks-v2-task.http.d.ts +0 -28
  21. package/build/es/src/crm-tasks-v2-task.http.js +0 -188
  22. package/build/es/src/crm-tasks-v2-task.http.js.map +0 -1
  23. package/build/es/src/crm-tasks-v2-task.public.d.ts +0 -13
  24. package/build/es/src/crm-tasks-v2-task.public.js +0 -34
  25. package/build/es/src/crm-tasks-v2-task.public.js.map +0 -1
  26. package/build/es/src/crm-tasks-v2-task.types.d.ts +0 -228
  27. package/build/es/src/crm-tasks-v2-task.types.js +0 -20
  28. package/build/es/src/crm-tasks-v2-task.types.js.map +0 -1
  29. package/build/es/src/crm-tasks-v2-task.universal.d.ts +0 -404
  30. package/build/es/src/crm-tasks-v2-task.universal.js +0 -384
  31. package/build/es/src/crm-tasks-v2-task.universal.js.map +0 -1
@@ -1,404 +0,0 @@
1
- export declare const __debug: {
2
- verboseLogging: {
3
- on: () => boolean;
4
- off: () => boolean;
5
- };
6
- };
7
- export interface Task {
8
- /**
9
- * Task ID
10
- * @readonly
11
- */
12
- _id?: string | null;
13
- /**
14
- * Represents the current state of an item. For an update operation, pass the latest revision.
15
- * @readonly
16
- */
17
- revision?: string | null;
18
- /** The task title */
19
- title?: string | null;
20
- /** Description of the task. */
21
- description?: string | null;
22
- /**
23
- * Represents the time this task was created.
24
- * @readonly
25
- */
26
- _createdDate?: Date;
27
- /**
28
- * Represents the time this task was last updated.
29
- * @readonly
30
- */
31
- _updatedDate?: Date;
32
- /** Due Date for the task. */
33
- dueDate?: Date;
34
- /** The status of the task. */
35
- status?: TaskStatus;
36
- /** Details about the task source. */
37
- source?: TaskSource;
38
- /** Id of a user assigned to this task. */
39
- assigneeId?: string | null;
40
- /** Details of a contact assigned to this task. */
41
- contact?: ContactInfo;
42
- }
43
- /** Possible statuses in which the task may be. */
44
- export declare enum TaskStatus {
45
- UNKNOWN_STATUS = "UNKNOWN_STATUS",
46
- ACTION_NEEDED = "ACTION_NEEDED",
47
- COMPLETED = "COMPLETED"
48
- }
49
- export interface TaskSource {
50
- /**
51
- * Type of task creator
52
- * @readonly
53
- */
54
- sourceType?: SourceType;
55
- /**
56
- * App ID, if the task was created by an app.
57
- * @readonly
58
- */
59
- appId?: string | null;
60
- /**
61
- * User ID, if the task was created by some user.
62
- * @readonly
63
- */
64
- userId?: string | null;
65
- }
66
- /** Possible sources how can create task. */
67
- export declare enum SourceType {
68
- UNKNOWN_SOURCE_TYPE = "UNKNOWN_SOURCE_TYPE",
69
- APP = "APP",
70
- USER = "USER"
71
- }
72
- export interface ContactInfo {
73
- /** Id of a Contact this task is assigned to. */
74
- _id?: string | null;
75
- /**
76
- * Contact first name.
77
- * @readonly
78
- */
79
- firstName?: string | null;
80
- /**
81
- * Contact last name.
82
- * @readonly
83
- */
84
- lastName?: string | null;
85
- /**
86
- * Contact image url
87
- * @readonly
88
- */
89
- imageUrl?: string | null;
90
- }
91
- export interface RepositionTask {
92
- /** The id of the last task that was re-positioned */
93
- taskId?: string | null;
94
- /** The position of the last task that was re-positioned */
95
- position?: string | null;
96
- }
97
- export interface TaskWasOverdue {
98
- /** The overdue task */
99
- task?: Task;
100
- }
101
- export interface CreateTaskRequest {
102
- /** Task to be created */
103
- task: Task;
104
- }
105
- export interface CreateTaskResponse {
106
- /** The created Task */
107
- task?: Task;
108
- }
109
- export interface GetTaskRequest {
110
- /** Id of the Task to retrieve */
111
- taskId: string;
112
- }
113
- export interface GetTaskResponse {
114
- /** The retrieved Task */
115
- task?: Task;
116
- }
117
- export interface UpdateTaskRequest {
118
- /** Task to be updated, may be partial */
119
- task: Task;
120
- }
121
- export interface UpdateTaskResponse {
122
- /** The updated Task */
123
- task?: Task;
124
- }
125
- export interface DeleteTaskRequest {
126
- /** Id of the Task to delete */
127
- taskId: string;
128
- }
129
- export interface DeleteTaskResponse {
130
- }
131
- export interface QueryTasksRequest {
132
- /** WQL expression */
133
- query: QueryV2;
134
- }
135
- export interface QueryV2 extends QueryV2PagingMethodOneOf {
136
- /** Paging options to limit and skip the number of items. */
137
- paging?: Paging;
138
- /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */
139
- cursorPaging?: CursorPaging;
140
- /**
141
- * Filter object in the following format:
142
- * `"filter" : {
143
- * "fieldName1": "value1",
144
- * "fieldName2":{"$operator":"value2"}
145
- * }`
146
- * Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`
147
- */
148
- filter?: Record<string, any> | null;
149
- /**
150
- * Sort object in the following format:
151
- * `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]`
152
- */
153
- sort?: Sorting[];
154
- /** Array of projected fields. A list of specific field names to return. If `fieldsets` are also specified, the union of `fieldsets` and `fields` is returned. */
155
- fields?: string[];
156
- /** Array of named, predefined sets of projected fields. A array of predefined named sets of fields to be returned. Specifying multiple `fieldsets` will return the union of fields from all sets. If `fields` are also specified, the union of `fieldsets` and `fields` is returned. */
157
- fieldsets?: string[];
158
- }
159
- /** @oneof */
160
- export interface QueryV2PagingMethodOneOf {
161
- /** Paging options to limit and skip the number of items. */
162
- paging?: Paging;
163
- /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */
164
- cursorPaging?: CursorPaging;
165
- }
166
- export interface Sorting {
167
- /** Name of the field to sort by. */
168
- fieldName?: string;
169
- /** Sort order. */
170
- order?: SortOrder;
171
- }
172
- export declare enum SortOrder {
173
- ASC = "ASC",
174
- DESC = "DESC"
175
- }
176
- export interface Paging {
177
- /** Number of items to load. */
178
- limit?: number | null;
179
- /** Number of items to skip in the current sort order. */
180
- offset?: number | null;
181
- }
182
- export interface CursorPaging {
183
- /** Number of items to load. */
184
- limit?: number | null;
185
- /**
186
- * Pointer to the next or previous page in the list of results.
187
- *
188
- * You can get the relevant cursor token
189
- * from the `pagingMetadata` object in the previous call's response.
190
- * Not relevant for the first request.
191
- */
192
- cursor?: string | null;
193
- }
194
- export interface QueryTasksResponse {
195
- /** The retrieved Tasks */
196
- tasks?: Task[];
197
- /** Details on the paged set of results returned. */
198
- pagingMetadata?: PagingMetadataV2;
199
- }
200
- export interface PagingMetadataV2 {
201
- /** Number of items returned in the response. */
202
- count?: number | null;
203
- /** Offset that was requested. */
204
- offset?: number | null;
205
- /** Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set. */
206
- total?: number | null;
207
- /** Flag that indicates the server failed to calculate the `total` field. */
208
- tooManyToCount?: boolean | null;
209
- /** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */
210
- cursors?: Cursors;
211
- }
212
- export interface Cursors {
213
- /** Cursor pointing to next page in the list of results. */
214
- next?: string | null;
215
- /** Cursor pointing to previous page in the list of results. */
216
- prev?: string | null;
217
- }
218
- export interface MoveTaskAfterRequest {
219
- /** The Task id to move */
220
- taskId: string;
221
- /**
222
- * The Task Id to be after
223
- * If not provided, the task will be positions first
224
- */
225
- beforeTaskId?: string | null;
226
- }
227
- export interface MoveTaskAfterResponse {
228
- }
229
- export interface TaskNotFoundError {
230
- /** The task id that was not found */
231
- taskId?: string;
232
- }
233
- export interface Empty {
234
- }
235
- /**
236
- * Creates a new Task
237
- * If dueDate parameter is provided, it must be a future date.
238
- * @param task - Task to be created
239
- * @public
240
- * @documentationMaturity preview
241
- * @requiredField task
242
- * @returns The created Task
243
- */
244
- export declare function createTask(task: Task): Promise<Task>;
245
- /**
246
- * Get a Task.
247
- * @param taskId - Id of the Task to retrieve
248
- * @public
249
- * @documentationMaturity preview
250
- * @requiredField taskId
251
- * @returns The retrieved Task
252
- */
253
- export declare function getTask(taskId: string): Promise<Task>;
254
- /**
255
- * Update a Task, supports partial update
256
- * If dueDate parameter is provided, it must be a future date.
257
- * Each time the segment is updated,
258
- * `revision` increments by 1.
259
- * The existing `revision` must be included when updating the segment.
260
- * This ensures you're working with the latest segment
261
- * and prevents unintended overwrites.
262
- * @param _id - Task ID
263
- * @public
264
- * @documentationMaturity preview
265
- * @requiredField _id
266
- * @requiredField task
267
- * @requiredField task.revision
268
- * @returns The updated Task
269
- */
270
- export declare function updateTask(_id: string | null, task: UpdateTask): Promise<Task>;
271
- export interface UpdateTask {
272
- /**
273
- * Task ID
274
- * @readonly
275
- */
276
- _id?: string | null;
277
- /**
278
- * Represents the current state of an item. For an update operation, pass the latest revision.
279
- * @readonly
280
- */
281
- revision?: string | null;
282
- /** The task title */
283
- title?: string | null;
284
- /** Description of the task. */
285
- description?: string | null;
286
- /**
287
- * Represents the time this task was created.
288
- * @readonly
289
- */
290
- _createdDate?: Date;
291
- /**
292
- * Represents the time this task was last updated.
293
- * @readonly
294
- */
295
- _updatedDate?: Date;
296
- /** Due Date for the task. */
297
- dueDate?: Date;
298
- /** The status of the task. */
299
- status?: TaskStatus;
300
- /** Details about the task source. */
301
- source?: TaskSource;
302
- /** Id of a user assigned to this task. */
303
- assigneeId?: string | null;
304
- /** Details of a contact assigned to this task. */
305
- contact?: ContactInfo;
306
- }
307
- /**
308
- * Deletes a Task
309
- * @param taskId - Id of the Task to delete
310
- * @public
311
- * @documentationMaturity preview
312
- * @requiredField taskId
313
- */
314
- export declare function deleteTask(taskId: string): Promise<void>;
315
- /**
316
- * Query Tasks using [WQL - Wix Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language)
317
- * @public
318
- * @documentationMaturity preview
319
- */
320
- export declare function queryTasks(): TasksQueryBuilder;
321
- interface QueryCursorResult {
322
- cursors: Cursors;
323
- hasNext: () => boolean;
324
- hasPrev: () => boolean;
325
- length: number;
326
- pageSize: number;
327
- }
328
- export interface TasksQueryResult extends QueryCursorResult {
329
- items: Task[];
330
- query: TasksQueryBuilder;
331
- next: () => Promise<TasksQueryResult>;
332
- prev: () => Promise<TasksQueryResult>;
333
- }
334
- export interface TasksQueryBuilder {
335
- /** @param propertyName - Property whose value is compared with `value`.
336
- * @param value - Value to compare against.
337
- * @documentationMaturity preview
338
- */
339
- eq: (propertyName: '_id' | '_createdDate' | '_updatedDate' | 'status' | 'contact.id', value: any) => TasksQueryBuilder;
340
- /** @param propertyName - Property whose value is compared with `value`.
341
- * @param value - Value to compare against.
342
- * @documentationMaturity preview
343
- */
344
- ne: (propertyName: '_id' | '_createdDate' | '_updatedDate' | 'status' | 'contact.id', value: any) => TasksQueryBuilder;
345
- /** @param propertyName - Property whose value is compared with `value`.
346
- * @param value - Value to compare against.
347
- * @documentationMaturity preview
348
- */
349
- gt: (propertyName: '_createdDate' | '_updatedDate', value: any) => TasksQueryBuilder;
350
- /** @param propertyName - Property whose value is compared with `value`.
351
- * @param value - Value to compare against.
352
- * @documentationMaturity preview
353
- */
354
- lt: (propertyName: '_createdDate' | '_updatedDate', value: any) => TasksQueryBuilder;
355
- /** @param propertyName - Property whose value is compared with `string`.
356
- * @param string - String to compare against. Case-insensitive.
357
- * @documentationMaturity preview
358
- */
359
- startsWith: (propertyName: '_id' | 'contact.id', value: string) => TasksQueryBuilder;
360
- /** @param propertyName - Property whose value is compared with `values`.
361
- * @param values - List of values to compare against.
362
- * @documentationMaturity preview
363
- */
364
- hasSome: (propertyName: '_id' | '_createdDate' | '_updatedDate' | 'status' | 'contact.id', value: any[]) => TasksQueryBuilder;
365
- /** @documentationMaturity preview */
366
- in: (propertyName: '_id' | '_createdDate' | '_updatedDate' | 'status' | 'contact.id', value: any) => TasksQueryBuilder;
367
- /** @documentationMaturity preview */
368
- exists: (propertyName: '_id' | '_createdDate' | '_updatedDate' | 'status' | 'contact.id', value: boolean) => TasksQueryBuilder;
369
- /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.
370
- * @documentationMaturity preview
371
- */
372
- ascending: (...propertyNames: Array<'_id' | '_createdDate' | '_updatedDate'>) => TasksQueryBuilder;
373
- /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.
374
- * @documentationMaturity preview
375
- */
376
- descending: (...propertyNames: Array<'_id' | '_createdDate' | '_updatedDate'>) => TasksQueryBuilder;
377
- /** @param limit - Number of items to return, which is also the `pageSize` of the results object.
378
- * @documentationMaturity preview
379
- */
380
- limit: (limit: number) => TasksQueryBuilder;
381
- /** @param cursor - A pointer to specific record
382
- * @documentationMaturity preview
383
- */
384
- skipTo: (cursor: string) => TasksQueryBuilder;
385
- /** @documentationMaturity preview */
386
- find: () => Promise<TasksQueryResult>;
387
- }
388
- /**
389
- * Move a Task to be after another Task.
390
- * If beforeTaskId is not provided, the task will be positioned first.
391
- * @param taskId - The Task id to move
392
- * @public
393
- * @documentationMaturity preview
394
- * @requiredField taskId
395
- */
396
- export declare function moveTaskAfter(taskId: string, options?: MoveTaskAfterOptions): Promise<void>;
397
- export interface MoveTaskAfterOptions {
398
- /**
399
- * The Task Id to be after
400
- * If not provided, the task will be positions first
401
- */
402
- beforeTaskId?: string | null;
403
- }
404
- export {};