@wix/workflows 1.0.18 → 1.0.20

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 (115) hide show
  1. package/build/cjs/context.d.ts +3 -0
  2. package/build/cjs/{index.typings.js → context.js} +9 -5
  3. package/build/cjs/context.js.map +1 -0
  4. package/build/cjs/index.d.ts +3 -3
  5. package/build/cjs/index.js +8 -4
  6. package/build/cjs/index.js.map +1 -1
  7. package/build/cjs/meta.d.ts +3 -3
  8. package/build/cjs/meta.js +8 -4
  9. package/build/cjs/meta.js.map +1 -1
  10. package/build/es/context.d.ts +3 -0
  11. package/build/es/context.js +4 -0
  12. package/build/es/context.js.map +1 -0
  13. package/build/es/index.d.ts +3 -3
  14. package/build/es/index.js +3 -3
  15. package/build/es/index.js.map +1 -1
  16. package/build/es/meta.d.ts +3 -3
  17. package/build/es/meta.js +3 -3
  18. package/build/es/meta.js.map +1 -1
  19. package/context/package.json +6 -0
  20. package/package.json +17 -7
  21. package/build/cjs/index.typings.d.ts +0 -3
  22. package/build/cjs/index.typings.js.map +0 -1
  23. package/build/cjs/src/workflows-v1-card.http.d.ts +0 -114
  24. package/build/cjs/src/workflows-v1-card.http.js +0 -380
  25. package/build/cjs/src/workflows-v1-card.http.js.map +0 -1
  26. package/build/cjs/src/workflows-v1-card.meta.d.ts +0 -37
  27. package/build/cjs/src/workflows-v1-card.meta.js +0 -176
  28. package/build/cjs/src/workflows-v1-card.meta.js.map +0 -1
  29. package/build/cjs/src/workflows-v1-card.public.d.ts +0 -24
  30. package/build/cjs/src/workflows-v1-card.public.js +0 -57
  31. package/build/cjs/src/workflows-v1-card.public.js.map +0 -1
  32. package/build/cjs/src/workflows-v1-card.types.d.ts +0 -270
  33. package/build/cjs/src/workflows-v1-card.types.js +0 -14
  34. package/build/cjs/src/workflows-v1-card.types.js.map +0 -1
  35. package/build/cjs/src/workflows-v1-card.universal.d.ts +0 -500
  36. package/build/cjs/src/workflows-v1-card.universal.js +0 -596
  37. package/build/cjs/src/workflows-v1-card.universal.js.map +0 -1
  38. package/build/cjs/src/workflows-v1-phase.http.d.ts +0 -76
  39. package/build/cjs/src/workflows-v1-phase.http.js +0 -296
  40. package/build/cjs/src/workflows-v1-phase.http.js.map +0 -1
  41. package/build/cjs/src/workflows-v1-phase.meta.d.ts +0 -31
  42. package/build/cjs/src/workflows-v1-phase.meta.js +0 -138
  43. package/build/cjs/src/workflows-v1-phase.meta.js.map +0 -1
  44. package/build/cjs/src/workflows-v1-phase.public.d.ts +0 -27
  45. package/build/cjs/src/workflows-v1-phase.public.js +0 -45
  46. package/build/cjs/src/workflows-v1-phase.public.js.map +0 -1
  47. package/build/cjs/src/workflows-v1-phase.types.d.ts +0 -274
  48. package/build/cjs/src/workflows-v1-phase.types.js +0 -14
  49. package/build/cjs/src/workflows-v1-phase.types.js.map +0 -1
  50. package/build/cjs/src/workflows-v1-phase.universal.d.ts +0 -435
  51. package/build/cjs/src/workflows-v1-phase.universal.js +0 -456
  52. package/build/cjs/src/workflows-v1-phase.universal.js.map +0 -1
  53. package/build/cjs/src/workflows-v1-workflow.http.d.ts +0 -55
  54. package/build/cjs/src/workflows-v1-workflow.http.js +0 -262
  55. package/build/cjs/src/workflows-v1-workflow.http.js.map +0 -1
  56. package/build/cjs/src/workflows-v1-workflow.meta.d.ts +0 -23
  57. package/build/cjs/src/workflows-v1-workflow.meta.js +0 -119
  58. package/build/cjs/src/workflows-v1-workflow.meta.js.map +0 -1
  59. package/build/cjs/src/workflows-v1-workflow.public.d.ts +0 -46
  60. package/build/cjs/src/workflows-v1-workflow.public.js +0 -39
  61. package/build/cjs/src/workflows-v1-workflow.public.js.map +0 -1
  62. package/build/cjs/src/workflows-v1-workflow.types.d.ts +0 -319
  63. package/build/cjs/src/workflows-v1-workflow.types.js +0 -14
  64. package/build/cjs/src/workflows-v1-workflow.types.js.map +0 -1
  65. package/build/cjs/src/workflows-v1-workflow.universal.d.ts +0 -433
  66. package/build/cjs/src/workflows-v1-workflow.universal.js +0 -369
  67. package/build/cjs/src/workflows-v1-workflow.universal.js.map +0 -1
  68. package/build/es/index.typings.d.ts +0 -3
  69. package/build/es/index.typings.js +0 -4
  70. package/build/es/index.typings.js.map +0 -1
  71. package/build/es/src/workflows-v1-card.http.d.ts +0 -114
  72. package/build/es/src/workflows-v1-card.http.js +0 -369
  73. package/build/es/src/workflows-v1-card.http.js.map +0 -1
  74. package/build/es/src/workflows-v1-card.meta.d.ts +0 -37
  75. package/build/es/src/workflows-v1-card.meta.js +0 -146
  76. package/build/es/src/workflows-v1-card.meta.js.map +0 -1
  77. package/build/es/src/workflows-v1-card.public.d.ts +0 -24
  78. package/build/es/src/workflows-v1-card.public.js +0 -44
  79. package/build/es/src/workflows-v1-card.public.js.map +0 -1
  80. package/build/es/src/workflows-v1-card.types.d.ts +0 -270
  81. package/build/es/src/workflows-v1-card.types.js +0 -11
  82. package/build/es/src/workflows-v1-card.types.js.map +0 -1
  83. package/build/es/src/workflows-v1-card.universal.d.ts +0 -500
  84. package/build/es/src/workflows-v1-card.universal.js +0 -566
  85. package/build/es/src/workflows-v1-card.universal.js.map +0 -1
  86. package/build/es/src/workflows-v1-phase.http.d.ts +0 -76
  87. package/build/es/src/workflows-v1-phase.http.js +0 -287
  88. package/build/es/src/workflows-v1-phase.http.js.map +0 -1
  89. package/build/es/src/workflows-v1-phase.meta.d.ts +0 -31
  90. package/build/es/src/workflows-v1-phase.meta.js +0 -110
  91. package/build/es/src/workflows-v1-phase.meta.js.map +0 -1
  92. package/build/es/src/workflows-v1-phase.public.d.ts +0 -27
  93. package/build/es/src/workflows-v1-phase.public.js +0 -34
  94. package/build/es/src/workflows-v1-phase.public.js.map +0 -1
  95. package/build/es/src/workflows-v1-phase.types.d.ts +0 -274
  96. package/build/es/src/workflows-v1-phase.types.js +0 -11
  97. package/build/es/src/workflows-v1-phase.types.js.map +0 -1
  98. package/build/es/src/workflows-v1-phase.universal.d.ts +0 -435
  99. package/build/es/src/workflows-v1-phase.universal.js +0 -428
  100. package/build/es/src/workflows-v1-phase.universal.js.map +0 -1
  101. package/build/es/src/workflows-v1-workflow.http.d.ts +0 -55
  102. package/build/es/src/workflows-v1-workflow.http.js +0 -254
  103. package/build/es/src/workflows-v1-workflow.http.js.map +0 -1
  104. package/build/es/src/workflows-v1-workflow.meta.d.ts +0 -23
  105. package/build/es/src/workflows-v1-workflow.meta.js +0 -92
  106. package/build/es/src/workflows-v1-workflow.meta.js.map +0 -1
  107. package/build/es/src/workflows-v1-workflow.public.d.ts +0 -46
  108. package/build/es/src/workflows-v1-workflow.public.js +0 -29
  109. package/build/es/src/workflows-v1-workflow.public.js.map +0 -1
  110. package/build/es/src/workflows-v1-workflow.types.d.ts +0 -319
  111. package/build/es/src/workflows-v1-workflow.types.js +0 -11
  112. package/build/es/src/workflows-v1-workflow.types.js.map +0 -1
  113. package/build/es/src/workflows-v1-workflow.universal.d.ts +0 -433
  114. package/build/es/src/workflows-v1-workflow.universal.js +0 -342
  115. package/build/es/src/workflows-v1-workflow.universal.js.map +0 -1
@@ -1,319 +0,0 @@
1
- export interface Workflow {
2
- /** Workflow information and metadata. */
3
- info?: WorkflowInfo;
4
- /**
5
- * Final phase of the workflow.
6
- * Cards in `winPhase` are treated as if they are not part of the workflow.
7
- *
8
- * Normally, a contact can be attached to only 1 card in the workflow.
9
- * Moving a contact's card to `winPhase`
10
- * frees up the contact to be attached to another card in the workflow.
11
- */
12
- winPhase?: Phase;
13
- /** Phases that make up the workflow. */
14
- phasesList?: PhasesList;
15
- }
16
- export interface WorkflowInfo {
17
- /**
18
- * Workflow ID.
19
- * @readonly
20
- */
21
- id?: string | null;
22
- /** Display name for the workflow. */
23
- name?: string | null;
24
- /**
25
- * Workflow description,
26
- * shown below the workflow's display name in the dashboard.
27
- */
28
- description?: string | null;
29
- /**
30
- * Deprecated. Use `createdDate` instead.
31
- * @readonly
32
- */
33
- createdAt?: Date;
34
- /**
35
- * Indicates whether the workflow can be deleted.
36
- * @readonly
37
- */
38
- isDeletable?: boolean | null;
39
- /**
40
- * Date and time the workflow was created.
41
- * @readonly
42
- */
43
- createdDate?: Date;
44
- }
45
- export interface Phase {
46
- /** Phase information. */
47
- info?: PhaseInfo;
48
- /** Cards contained in the phase. */
49
- cardsList?: CardsList;
50
- }
51
- export interface PhaseInfo {
52
- /**
53
- * Phase ID.
54
- * @readonly
55
- */
56
- id?: string | null;
57
- /** Display name shown at the top of the phase. */
58
- name?: string | null;
59
- }
60
- /** a list of cards (a page) along with the total number */
61
- export interface CardsList {
62
- /** Total number of cards in the phase. */
63
- total?: number;
64
- /**
65
- * List of cards in the phase.
66
- * Sorted according to the card display order, from top to bottom.
67
- */
68
- cards?: Card[];
69
- }
70
- export interface Card {
71
- /** Card details. */
72
- info?: CardInfo;
73
- }
74
- /** entity representing a card-info */
75
- export interface CardInfo {
76
- /**
77
- * Card ID.
78
- * @readonly
79
- */
80
- id?: string | null;
81
- /** Display name shown at the top of the card. */
82
- name?: string | null;
83
- /** Card description. */
84
- description?: string | null;
85
- /** Details about the contact attached to the card. */
86
- primaryAttachment?: Attachment;
87
- /** Due date. */
88
- dueDate?: Date;
89
- /** Name of the app or service that created the contact. */
90
- source?: string | null;
91
- /**
92
- * Deprecated. Use `createdDate` instead.
93
- * @readonly
94
- */
95
- createdAt?: Date;
96
- /**
97
- * Deprecated. Use `updatedDate` instead.
98
- * @readonly
99
- */
100
- updatedAt?: Date;
101
- /**
102
- * ID of the phase that currently holds the card.
103
- * @readonly
104
- */
105
- phaseId?: string | null;
106
- /**
107
- * Date and time the card was created.
108
- * @readonly
109
- */
110
- createdDate?: Date;
111
- /**
112
- * Date and time the card was updated.
113
- * @readonly
114
- */
115
- updatedDate?: Date;
116
- }
117
- export interface Attachment {
118
- /**
119
- * Attachment ID. For internal use.
120
- * @readonly
121
- */
122
- attachmentId?: string;
123
- /** Deprecated. Use `contactId` instead. */
124
- value?: string;
125
- /** Deprecated. For internal use. */
126
- attachmentType?: AttachmentType;
127
- /** ID of the contact attached to the card. */
128
- contactId?: string;
129
- }
130
- /** describes the supported types of attachments (currently only supports Contact which is the default type) */
131
- export declare enum AttachmentType {
132
- ContactType = "ContactType"
133
- }
134
- /** a list of phases (a page) along with the total number */
135
- export interface PhasesList {
136
- /** Total number of phases in the workflow, excluding `winPhase`. */
137
- total?: number;
138
- /**
139
- * List of phases in the workflow.
140
- * Sorted according to the phase display order, from left to right.
141
- */
142
- phases?: Phase[];
143
- }
144
- export interface ListWorkflowsRequest {
145
- /**
146
- * Number of workflows to return.
147
- * If omitted, all results are returned.
148
- */
149
- limit?: number | null;
150
- /**
151
- * Number of items to skip in the current sort order.
152
- *
153
- * Defaults to `0`.
154
- */
155
- offset?: number | null;
156
- /**
157
- * Supported fields:
158
- * `id`, `name`, `description`, `createdDate`
159
- *
160
- * List of fields to sort by.
161
- * Formatted as `field:direction`,
162
- * where field is the field name
163
- * and direction is `asc` (ascending) or `desc` (descending).
164
- *
165
- * Sorting is applied lexicographically, so `"abc"` comes after `"XYZ"`.
166
- */
167
- sort?: string[];
168
- }
169
- export interface ListWorkflowsResponse {
170
- /** Retrieved list of workflows. */
171
- workflows?: WorkflowInfo[];
172
- /** Metadata for the page of results. */
173
- pagination?: PaginationResponse;
174
- }
175
- export interface PaginationResponse {
176
- /** Number of items that were skipped in the current sort order. */
177
- offset?: number;
178
- /** Total number of items that matched the filter. */
179
- total?: number;
180
- /** Number of returned items. */
181
- count?: number;
182
- }
183
- export interface QueryWorkflowsRequest {
184
- /** Query options. */
185
- query?: Query;
186
- }
187
- export interface Query {
188
- /**
189
- * Filter object in the following format:
190
- * `"filter" : {
191
- * "fieldName1": "value1",
192
- * "fieldName2":{"$operator":"value2"}
193
- * }`
194
- * Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`
195
- */
196
- filter?: any;
197
- /**
198
- * Sort object in the following format:
199
- * `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]`
200
- */
201
- sort?: Sorting[];
202
- /** Paging options to limit and skip the number of items. */
203
- paging?: Paging;
204
- /** 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. */
205
- fields?: string[];
206
- /** 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. */
207
- fieldsets?: string[];
208
- }
209
- export interface Sorting {
210
- /** Name of the field to sort by. */
211
- fieldName?: string;
212
- /** Sort order. */
213
- order?: SortOrder;
214
- }
215
- export declare enum SortOrder {
216
- ASC = "ASC",
217
- DESC = "DESC"
218
- }
219
- export interface Paging {
220
- /** Number of items to load. */
221
- limit?: number | null;
222
- /** Number of items to skip in the current sort order. */
223
- offset?: number | null;
224
- }
225
- export interface QueryWorkflowsResponse {
226
- /** List of workflows that matched the query. */
227
- workflows?: Workflow[];
228
- /** Metadata for the paginated results. */
229
- pagination?: PaginationResponse;
230
- }
231
- export interface GetWorkflowRequest {
232
- /** ID of the workflow to retrieve. */
233
- id: string;
234
- /**
235
- * Maximum number of cards to return per phase.
236
- * To retrieve additional pages of cards, use
237
- * [List Cards](https://dev.wix.com/api/rest/workflows/workflows/cards/list-cards)
238
- * (in the Cards API).
239
- *
240
- * Defaults to `10`.
241
- */
242
- cardsPerPhase?: number | null;
243
- }
244
- export interface GetWorkflowResponse {
245
- /** Requested workflow. */
246
- workflow?: Workflow;
247
- }
248
- export interface UpdateWorkflowRequest {
249
- /** ID of the workflow to update. */
250
- id: string;
251
- /** Workflow info. */
252
- workflow?: WorkflowInfo;
253
- }
254
- export interface UpdateWorkflowResponse {
255
- }
256
- export interface CreateWorkflowRequest {
257
- /** Workflow details. */
258
- workflow?: WorkflowInfo;
259
- }
260
- export interface CreateWorkflowResponse {
261
- /** ID of the new workflow. */
262
- id?: string | null;
263
- }
264
- export interface DeleteWorkflowRequest {
265
- /** ID of the workflow to delete. */
266
- id: string;
267
- }
268
- export interface DeleteWorkflowResponse {
269
- }
270
- export interface SetupWorkflowRequest {
271
- }
272
- export interface SetupWorkflowResponse {
273
- }
274
- export interface ListWorkflowsResponseNonNullableFields {
275
- workflows: WorkflowInfo[];
276
- pagination?: {
277
- offset: number;
278
- limit: number;
279
- total: number;
280
- count: number;
281
- };
282
- }
283
- export interface GetWorkflowResponseNonNullableFields {
284
- workflow?: {
285
- winPhase?: {
286
- cardsList?: {
287
- total: number;
288
- cards: {
289
- info?: {
290
- primaryAttachment?: {
291
- attachmentId: string;
292
- value: string;
293
- attachmentType: AttachmentType;
294
- contactId: string;
295
- };
296
- };
297
- }[];
298
- };
299
- };
300
- phasesList?: {
301
- total: number;
302
- phases: {
303
- cardsList?: {
304
- total: number;
305
- cards: {
306
- info?: {
307
- primaryAttachment?: {
308
- attachmentId: string;
309
- value: string;
310
- attachmentType: AttachmentType;
311
- contactId: string;
312
- };
313
- };
314
- }[];
315
- };
316
- }[];
317
- };
318
- };
319
- }
@@ -1,11 +0,0 @@
1
- /** describes the supported types of attachments (currently only supports Contact which is the default type) */
2
- export var AttachmentType;
3
- (function (AttachmentType) {
4
- AttachmentType["ContactType"] = "ContactType";
5
- })(AttachmentType || (AttachmentType = {}));
6
- export var SortOrder;
7
- (function (SortOrder) {
8
- SortOrder["ASC"] = "ASC";
9
- SortOrder["DESC"] = "DESC";
10
- })(SortOrder || (SortOrder = {}));
11
- //# sourceMappingURL=workflows-v1-workflow.types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"workflows-v1-workflow.types.js","sourceRoot":"","sources":["../../../src/workflows-v1-workflow.types.ts"],"names":[],"mappings":"AAyIA,+GAA+G;AAC/G,MAAM,CAAN,IAAY,cAEX;AAFD,WAAY,cAAc;IACxB,6CAA2B,CAAA;AAC7B,CAAC,EAFW,cAAc,KAAd,cAAc,QAEzB;AA0FD,MAAM,CAAN,IAAY,SAGX;AAHD,WAAY,SAAS;IACnB,wBAAW,CAAA;IACX,0BAAa,CAAA;AACf,CAAC,EAHW,SAAS,KAAT,SAAS,QAGpB"}