@wix/workflows 1.0.0

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 (79) hide show
  1. package/build/cjs/index.d.ts +3 -0
  2. package/build/cjs/index.js +26 -0
  3. package/build/cjs/index.js.map +1 -0
  4. package/build/cjs/src/workflows-v1-card.http.d.ts +92 -0
  5. package/build/cjs/src/workflows-v1-card.http.js +339 -0
  6. package/build/cjs/src/workflows-v1-card.http.js.map +1 -0
  7. package/build/cjs/src/workflows-v1-card.public.d.ts +15 -0
  8. package/build/cjs/src/workflows-v1-card.public.js +57 -0
  9. package/build/cjs/src/workflows-v1-card.public.js.map +1 -0
  10. package/build/cjs/src/workflows-v1-card.types.d.ts +240 -0
  11. package/build/cjs/src/workflows-v1-card.types.js +14 -0
  12. package/build/cjs/src/workflows-v1-card.types.js.map +1 -0
  13. package/build/cjs/src/workflows-v1-card.universal.d.ts +449 -0
  14. package/build/cjs/src/workflows-v1-card.universal.js +569 -0
  15. package/build/cjs/src/workflows-v1-card.universal.js.map +1 -0
  16. package/build/cjs/src/workflows-v1-phase.http.d.ts +61 -0
  17. package/build/cjs/src/workflows-v1-phase.http.js +288 -0
  18. package/build/cjs/src/workflows-v1-phase.http.js.map +1 -0
  19. package/build/cjs/src/workflows-v1-phase.public.d.ts +14 -0
  20. package/build/cjs/src/workflows-v1-phase.public.js +51 -0
  21. package/build/cjs/src/workflows-v1-phase.public.js.map +1 -0
  22. package/build/cjs/src/workflows-v1-phase.types.d.ts +234 -0
  23. package/build/cjs/src/workflows-v1-phase.types.js +14 -0
  24. package/build/cjs/src/workflows-v1-phase.types.js.map +1 -0
  25. package/build/cjs/src/workflows-v1-phase.universal.d.ts +388 -0
  26. package/build/cjs/src/workflows-v1-phase.universal.js +488 -0
  27. package/build/cjs/src/workflows-v1-phase.universal.js.map +1 -0
  28. package/build/cjs/src/workflows-v1-workflow.http.d.ts +74 -0
  29. package/build/cjs/src/workflows-v1-workflow.http.js +315 -0
  30. package/build/cjs/src/workflows-v1-workflow.http.js.map +1 -0
  31. package/build/cjs/src/workflows-v1-workflow.public.d.ts +14 -0
  32. package/build/cjs/src/workflows-v1-workflow.public.js +51 -0
  33. package/build/cjs/src/workflows-v1-workflow.public.js.map +1 -0
  34. package/build/cjs/src/workflows-v1-workflow.types.d.ts +273 -0
  35. package/build/cjs/src/workflows-v1-workflow.types.js +14 -0
  36. package/build/cjs/src/workflows-v1-workflow.types.js.map +1 -0
  37. package/build/cjs/src/workflows-v1-workflow.universal.d.ts +424 -0
  38. package/build/cjs/src/workflows-v1-workflow.universal.js +478 -0
  39. package/build/cjs/src/workflows-v1-workflow.universal.js.map +1 -0
  40. package/build/es/index.d.ts +3 -0
  41. package/build/es/index.js +4 -0
  42. package/build/es/index.js.map +1 -0
  43. package/build/es/src/workflows-v1-card.http.d.ts +92 -0
  44. package/build/es/src/workflows-v1-card.http.js +328 -0
  45. package/build/es/src/workflows-v1-card.http.js.map +1 -0
  46. package/build/es/src/workflows-v1-card.public.d.ts +15 -0
  47. package/build/es/src/workflows-v1-card.public.js +44 -0
  48. package/build/es/src/workflows-v1-card.public.js.map +1 -0
  49. package/build/es/src/workflows-v1-card.types.d.ts +240 -0
  50. package/build/es/src/workflows-v1-card.types.js +11 -0
  51. package/build/es/src/workflows-v1-card.types.js.map +1 -0
  52. package/build/es/src/workflows-v1-card.universal.d.ts +449 -0
  53. package/build/es/src/workflows-v1-card.universal.js +539 -0
  54. package/build/es/src/workflows-v1-card.universal.js.map +1 -0
  55. package/build/es/src/workflows-v1-phase.http.d.ts +61 -0
  56. package/build/es/src/workflows-v1-phase.http.js +278 -0
  57. package/build/es/src/workflows-v1-phase.http.js.map +1 -0
  58. package/build/es/src/workflows-v1-phase.public.d.ts +14 -0
  59. package/build/es/src/workflows-v1-phase.public.js +39 -0
  60. package/build/es/src/workflows-v1-phase.public.js.map +1 -0
  61. package/build/es/src/workflows-v1-phase.types.d.ts +234 -0
  62. package/build/es/src/workflows-v1-phase.types.js +11 -0
  63. package/build/es/src/workflows-v1-phase.types.js.map +1 -0
  64. package/build/es/src/workflows-v1-phase.universal.d.ts +388 -0
  65. package/build/es/src/workflows-v1-phase.universal.js +459 -0
  66. package/build/es/src/workflows-v1-phase.universal.js.map +1 -0
  67. package/build/es/src/workflows-v1-workflow.http.d.ts +74 -0
  68. package/build/es/src/workflows-v1-workflow.http.js +305 -0
  69. package/build/es/src/workflows-v1-workflow.http.js.map +1 -0
  70. package/build/es/src/workflows-v1-workflow.public.d.ts +14 -0
  71. package/build/es/src/workflows-v1-workflow.public.js +39 -0
  72. package/build/es/src/workflows-v1-workflow.public.js.map +1 -0
  73. package/build/es/src/workflows-v1-workflow.types.d.ts +273 -0
  74. package/build/es/src/workflows-v1-workflow.types.js +11 -0
  75. package/build/es/src/workflows-v1-workflow.types.js.map +1 -0
  76. package/build/es/src/workflows-v1-workflow.universal.d.ts +424 -0
  77. package/build/es/src/workflows-v1-workflow.universal.js +449 -0
  78. package/build/es/src/workflows-v1-workflow.universal.js.map +1 -0
  79. package/package.json +37 -0
@@ -0,0 +1,328 @@
1
+ import { toURLSearchParams } from '@wix/metro-runtime';
2
+ import { serializer } from '@wix/metro-runtime/ambassador';
3
+ import { resolveUrl } from '@wix/metro-runtime';
4
+ const _card = { info: '_cardInfo' };
5
+ const _cardInfo = {
6
+ dueDate: 'google.protobuf.Timestamp',
7
+ createdAt: 'google.protobuf.Timestamp',
8
+ updatedAt: 'google.protobuf.Timestamp',
9
+ createdDate: 'google.protobuf.Timestamp',
10
+ updatedDate: 'google.protobuf.Timestamp',
11
+ };
12
+ const _createCardRequest = { card: '_cardInfo' };
13
+ const _createCardResponse = {};
14
+ const _deleteCardRequest = {};
15
+ const _deleteCardResponse = {};
16
+ const _getCardRequest = {};
17
+ const _getCardResponse = { card: '_card' };
18
+ const _listCardsRequest = {};
19
+ const _listCardsResponse = { cards: '_card' };
20
+ const _moveCardRequest = {};
21
+ const _moveCardResponse = {};
22
+ const _queryCardsRequest = {};
23
+ const _queryCardsResponse = { cards: '_card' };
24
+ const _restoreCardRequest = {};
25
+ const _restoreCardResponse = {};
26
+ const _updateCardRequest = { cardInfo: '_cardInfo' };
27
+ const _updateCardResponse = {};
28
+ function resolveComWixpressWorkflowApiV1CardsServiceUrl(opts) {
29
+ const domainToMappings = {
30
+ 'www._base_domain_': [
31
+ {
32
+ srcPath: '/_api/workflow-server-web',
33
+ destPath: '',
34
+ },
35
+ ],
36
+ 'api._api_base_domain_': [
37
+ {
38
+ srcPath: '/workflow-server-web',
39
+ destPath: '',
40
+ },
41
+ ],
42
+ 'manage._base_domain_': [
43
+ {
44
+ srcPath: '/_api/workflow-server-web',
45
+ destPath: '',
46
+ },
47
+ ],
48
+ 'www.wixapis.com': [
49
+ {
50
+ srcPath: '/workflows',
51
+ destPath: '',
52
+ },
53
+ ],
54
+ };
55
+ return resolveUrl(Object.assign(opts, { domainToMappings }));
56
+ }
57
+ /**
58
+ * Returns a list of cards according to:
59
+ * * paging: offset, limit
60
+ * * order: by some of the following fields: id, name, createdAt, updatedAt, position, phaseId
61
+ * * filter: by the following fields of CardInfo
62
+ * ** cardInfo.id - Guid
63
+ * ** cardInfo.name - Text
64
+ * ** cardInfo.source - Text
65
+ * ** cardInfo.position - Number
66
+ * ** cardInfo.createdAt - Date
67
+ * ** cardInfo.updatedAt - Date
68
+ * ** cardInfo.primaryAttachment.contactId - Guid
69
+ * ** cardInfo.visibility - Text (Visible / Archived)
70
+ */
71
+ export function queryCards(payload) {
72
+ const { toJSON: toReq, fromJSON: fromReq } = serializer(_queryCardsRequest, {});
73
+ const { fromJSON: fromRes } = serializer(_queryCardsResponse, {
74
+ _card,
75
+ _cardInfo,
76
+ });
77
+ function __queryCards({ host }) {
78
+ const serializedData = toReq(payload);
79
+ const metadata = {
80
+ entityFqdn: 'wix.workflows.v1.card',
81
+ method: 'POST',
82
+ methodFqn: 'com.wixpress.workflow.api.v1.CardsService.QueryCards',
83
+ url: resolveComWixpressWorkflowApiV1CardsServiceUrl({
84
+ protoPath: '/v1/cards/query',
85
+ data: serializedData,
86
+ host,
87
+ }),
88
+ data: serializedData,
89
+ transformResponse: fromRes,
90
+ };
91
+ return metadata;
92
+ }
93
+ __queryCards.fromReq = fromReq;
94
+ return __queryCards;
95
+ }
96
+ /**
97
+ * Retrieves a list of cards in the specified workflow.
98
+ *
99
+ * By default, the returned cards are sorted by their display order.
100
+ */
101
+ export function listCards(payload) {
102
+ const { toJSON: toReq, fromJSON: fromReq } = serializer(_listCardsRequest, {});
103
+ const { fromJSON: fromRes } = serializer(_listCardsResponse, {
104
+ _card,
105
+ _cardInfo,
106
+ });
107
+ function __listCards({ host }) {
108
+ const serializedData = toReq(payload);
109
+ const metadata = {
110
+ entityFqdn: 'wix.workflows.v1.card',
111
+ method: 'GET',
112
+ methodFqn: 'com.wixpress.workflow.api.v1.CardsService.ListCards',
113
+ url: resolveComWixpressWorkflowApiV1CardsServiceUrl({
114
+ protoPath: '/v1/workflows/{workflowId}/cards',
115
+ data: serializedData,
116
+ host,
117
+ }),
118
+ params: toURLSearchParams(serializedData),
119
+ transformResponse: fromRes,
120
+ };
121
+ return metadata;
122
+ }
123
+ __listCards.fromReq = fromReq;
124
+ return __listCards;
125
+ }
126
+ /**
127
+ * Retrieves a card.
128
+ *
129
+ * If the specified card is archived, an empty object is returned.
130
+ * You can restore the card with
131
+ * [Restore Card](https://dev.wix.com/api/rest/workflows/workflows/cards/restore-card).
132
+ */
133
+ export function getCard(payload) {
134
+ const { toJSON: toReq, fromJSON: fromReq } = serializer(_getCardRequest, {});
135
+ const { fromJSON: fromRes } = serializer(_getCardResponse, {
136
+ _card,
137
+ _cardInfo,
138
+ });
139
+ function __getCard({ host }) {
140
+ const serializedData = toReq(payload);
141
+ const metadata = {
142
+ entityFqdn: 'wix.workflows.v1.card',
143
+ method: 'GET',
144
+ methodFqn: 'com.wixpress.workflow.api.v1.CardsService.GetCard',
145
+ url: resolveComWixpressWorkflowApiV1CardsServiceUrl({
146
+ protoPath: '/v1/cards/{id}',
147
+ data: serializedData,
148
+ host,
149
+ }),
150
+ params: toURLSearchParams(serializedData),
151
+ transformResponse: fromRes,
152
+ };
153
+ return metadata;
154
+ }
155
+ __getCard.fromReq = fromReq;
156
+ return __getCard;
157
+ }
158
+ /**
159
+ * Updates a card's properties.
160
+ *
161
+ * To reorder cards, use
162
+ * [Move Card](https://dev.wix.com/api/rest/workflows/workflows/cards/move-card).
163
+ * To archive or restore a card, use
164
+ * [Archive Card](https://dev.wix.com/api/rest/workflows/workflows/cards/archive-card)
165
+ * or [Restore Card](https://dev.wix.com/api/rest/workflows/workflows/cards/restore-card),
166
+ * respectively.
167
+ */
168
+ export function updateCard(payload) {
169
+ const { toJSON: toReq, fromJSON: fromReq } = serializer(_updateCardRequest, {
170
+ _cardInfo,
171
+ });
172
+ const { fromJSON: fromRes } = serializer(_updateCardResponse, {});
173
+ function __updateCard({ host }) {
174
+ const serializedData = toReq(payload);
175
+ const metadata = {
176
+ entityFqdn: 'wix.workflows.v1.card',
177
+ method: 'PATCH',
178
+ methodFqn: 'com.wixpress.workflow.api.v1.CardsService.UpdateCard',
179
+ url: resolveComWixpressWorkflowApiV1CardsServiceUrl({
180
+ protoPath: '/v1/cards/{id}',
181
+ data: serializedData,
182
+ host,
183
+ }),
184
+ data: serializedData,
185
+ transformResponse: fromRes,
186
+ };
187
+ return metadata;
188
+ }
189
+ __updateCard.fromReq = fromReq;
190
+ return __updateCard;
191
+ }
192
+ /**
193
+ * Creates a new card in the specified phase and workflow.
194
+ *
195
+ * When creating a card, you provide a `name` and an optional `position`.
196
+ *
197
+ * Cards are displayed according to their position from top to bottom,
198
+ * starting from `0` and incrementing by 1.
199
+ * If you create or move a card to an existing position,
200
+ * the card in that position and any subsequent cards
201
+ * are shifted down by 1.
202
+ *
203
+ * If `position` is not specified,
204
+ * the new card is given the bottom position.
205
+ */
206
+ export function createCard(payload) {
207
+ const { toJSON: toReq, fromJSON: fromReq } = serializer(_createCardRequest, {
208
+ _cardInfo,
209
+ });
210
+ const { fromJSON: fromRes } = serializer(_createCardResponse, {});
211
+ function __createCard({ host }) {
212
+ const serializedData = toReq(payload);
213
+ const metadata = {
214
+ entityFqdn: 'wix.workflows.v1.card',
215
+ method: 'POST',
216
+ methodFqn: 'com.wixpress.workflow.api.v1.CardsService.CreateCard',
217
+ url: resolveComWixpressWorkflowApiV1CardsServiceUrl({
218
+ protoPath: '/v1/workflows/{workflowId}/phases/{phaseId}/cards',
219
+ data: serializedData,
220
+ host,
221
+ }),
222
+ data: serializedData,
223
+ transformResponse: fromRes,
224
+ };
225
+ return metadata;
226
+ }
227
+ __createCard.fromReq = fromReq;
228
+ return __createCard;
229
+ }
230
+ /**
231
+ * Deletes a card from a workflow.
232
+ *
233
+ * Deleted cards are removed from the workflow completely and can't be restored.
234
+ * To keep the card available for site contributors, use
235
+ * [Archive Card](https://dev.wix.com/api/rest/workflows/workflows/cards/archive-card)
236
+ * instead.
237
+ *
238
+ * After a card is deleted,
239
+ * its attached contact can be attached to another card in an active phase.
240
+ */
241
+ export function deleteCard(payload) {
242
+ const { toJSON: toReq, fromJSON: fromReq } = serializer(_deleteCardRequest, {});
243
+ const { fromJSON: fromRes } = serializer(_deleteCardResponse, {});
244
+ function __deleteCard({ host }) {
245
+ const serializedData = toReq(payload);
246
+ const metadata = {
247
+ entityFqdn: 'wix.workflows.v1.card',
248
+ method: 'DELETE',
249
+ methodFqn: 'com.wixpress.workflow.api.v1.CardsService.DeleteCard',
250
+ url: resolveComWixpressWorkflowApiV1CardsServiceUrl({
251
+ protoPath: '/v1/cards/{id}',
252
+ data: serializedData,
253
+ host,
254
+ }),
255
+ params: toURLSearchParams(serializedData),
256
+ transformResponse: fromRes,
257
+ };
258
+ return metadata;
259
+ }
260
+ __deleteCard.fromReq = fromReq;
261
+ return __deleteCard;
262
+ }
263
+ /**
264
+ * Moves a card to another phase or a new position within the current phase.
265
+ *
266
+ * To move a card, the new phase ID must be provided.
267
+ * You can use
268
+ * [Get Workflow](https://dev.wix.com/api/rest/workflows/workflows/workflows/get-workflow)
269
+ * to get IDs for all the phases in the workflow,
270
+ * including the win phase.
271
+ *
272
+ * If a card is moved to the win phase,
273
+ * its attached contact can be attached to another card in an active phase.
274
+ */
275
+ export function moveCard(payload) {
276
+ const { toJSON: toReq, fromJSON: fromReq } = serializer(_moveCardRequest, {});
277
+ const { fromJSON: fromRes } = serializer(_moveCardResponse, {});
278
+ function __moveCard({ host }) {
279
+ const serializedData = toReq(payload);
280
+ const metadata = {
281
+ entityFqdn: 'wix.workflows.v1.card',
282
+ method: 'POST',
283
+ methodFqn: 'com.wixpress.workflow.api.v1.CardsService.MoveCard',
284
+ url: resolveComWixpressWorkflowApiV1CardsServiceUrl({
285
+ protoPath: '/v1/cards/{id}/move',
286
+ data: serializedData,
287
+ host,
288
+ }),
289
+ data: serializedData,
290
+ transformResponse: fromRes,
291
+ };
292
+ return metadata;
293
+ }
294
+ __moveCard.fromReq = fromReq;
295
+ return __moveCard;
296
+ }
297
+ /**
298
+ * Restores an archived card to the specified phase.
299
+ *
300
+ * To restore a card, the new phase ID must be provided.
301
+ * You can use
302
+ * [Get Workflow](https://dev.wix.com/api/rest/workflows/workflows/workflows/get-workflow)
303
+ * to get IDs for all the phases in the workflow,
304
+ * including the win phase.
305
+ */
306
+ export function restoreCard(payload) {
307
+ const { toJSON: toReq, fromJSON: fromReq } = serializer(_restoreCardRequest, {});
308
+ const { fromJSON: fromRes } = serializer(_restoreCardResponse, {});
309
+ function __restoreCard({ host }) {
310
+ const serializedData = toReq(payload);
311
+ const metadata = {
312
+ entityFqdn: 'wix.workflows.v1.card',
313
+ method: 'POST',
314
+ methodFqn: 'com.wixpress.workflow.api.v1.CardsService.RestoreCard',
315
+ url: resolveComWixpressWorkflowApiV1CardsServiceUrl({
316
+ protoPath: '/v1/cards/{id}/restore',
317
+ data: serializedData,
318
+ host,
319
+ }),
320
+ data: serializedData,
321
+ transformResponse: fromRes,
322
+ };
323
+ return metadata;
324
+ }
325
+ __restoreCard.fromReq = fromReq;
326
+ return __restoreCard;
327
+ }
328
+ //# sourceMappingURL=workflows-v1-card.http.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"workflows-v1-card.http.js","sourceRoot":"","sources":["../../../src/workflows-v1-card.http.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAC3D,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAsBhD,MAAM,KAAK,GAAG,EAAE,IAAI,EAAE,WAAW,EAAE,CAAC;AACpC,MAAM,SAAS,GAAG;IAChB,OAAO,EAAE,2BAA2B;IACpC,SAAS,EAAE,2BAA2B;IACtC,SAAS,EAAE,2BAA2B;IACtC,WAAW,EAAE,2BAA2B;IACxC,WAAW,EAAE,2BAA2B;CACzC,CAAC;AACF,MAAM,kBAAkB,GAAG,EAAE,IAAI,EAAE,WAAW,EAAE,CAAC;AACjD,MAAM,mBAAmB,GAAG,EAAE,CAAC;AAC/B,MAAM,kBAAkB,GAAG,EAAE,CAAC;AAC9B,MAAM,mBAAmB,GAAG,EAAE,CAAC;AAC/B,MAAM,eAAe,GAAG,EAAE,CAAC;AAC3B,MAAM,gBAAgB,GAAG,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;AAC3C,MAAM,iBAAiB,GAAG,EAAE,CAAC;AAC7B,MAAM,kBAAkB,GAAG,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC;AAC9C,MAAM,gBAAgB,GAAG,EAAE,CAAC;AAC5B,MAAM,iBAAiB,GAAG,EAAE,CAAC;AAC7B,MAAM,kBAAkB,GAAG,EAAE,CAAC;AAC9B,MAAM,mBAAmB,GAAG,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC;AAC/C,MAAM,mBAAmB,GAAG,EAAE,CAAC;AAC/B,MAAM,oBAAoB,GAAG,EAAE,CAAC;AAChC,MAAM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EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,UAAU,CACrD,mBAAmB,EACnB,EAAE,CACH,CAAC;IACF,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,UAAU,CAAC,oBAAoB,EAAE,EAAE,CAAC,CAAC;IAEnE,SAAS,aAAa,CAAC,EAAE,IAAI,EAAO;QAClC,MAAM,cAAc,GAAG,KAAK,CAAC,OAAO,CAAC,CAAC;QACtC,MAAM,QAAQ,GAAG;YACf,UAAU,EAAE,uBAAuB;YACnC,MAAM,EAAE,MAAa;YACrB,SAAS,EAAE,uDAAuD;YAClE,GAAG,EAAE,8CAA8C,CAAC;gBAClD,SAAS,EAAE,wBAAwB;gBACnC,IAAI,EAAE,cAAc;gBACpB,IAAI;aACL,CAAC;YACF,IAAI,EAAE,cAAc;YACpB,iBAAiB,EAAE,OAAO;SAC3B,CAAC;QAEF,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED,aAAa,CAAC,OAAO,GAAG,OAAO,CAAC;IAEhC,OAAO,aAAa,CAAC;AACvB,CAAC"}
@@ -0,0 +1,15 @@
1
+ import { HttpClient } from '@wix/sdk-types';
2
+ import { CreateCardIdentifiers, CreateCardOptions, ListCardsOptions, MoveCardOptions, QueryCardsOptions, RestoreCardOptions, UpdateCardOptions } from './workflows-v1-card.universal';
3
+ export declare const __metadata: {
4
+ PACKAGE_NAME: string;
5
+ };
6
+ export declare function queryCards(httpClient: HttpClient): (options?: QueryCardsOptions | undefined) => Promise<import("./workflows-v1-card.universal").QueryCardsResponse>;
7
+ export declare function listCards(httpClient: HttpClient): (workflowId: string, options?: ListCardsOptions | undefined) => Promise<import("./workflows-v1-card.universal").ListCardsResponse>;
8
+ export declare function getCard(httpClient: HttpClient): (_id: string) => Promise<import("./workflows-v1-card.universal").GetCardResponse>;
9
+ export declare function updateCard(httpClient: HttpClient): (_id: string, options?: UpdateCardOptions | undefined) => Promise<void>;
10
+ export declare function createCard(httpClient: HttpClient): (identifiers: CreateCardIdentifiers, options?: CreateCardOptions | undefined) => Promise<import("./workflows-v1-card.universal").CreateCardResponse>;
11
+ export declare function deleteCard(httpClient: HttpClient): (_id: string) => Promise<void>;
12
+ export declare function moveCard(httpClient: HttpClient): (_id: string, options?: MoveCardOptions | undefined) => Promise<void>;
13
+ export declare function restoreCard(httpClient: HttpClient): (_id: string, newPhaseId: string, options?: RestoreCardOptions | undefined) => Promise<void>;
14
+ export { AttachmentType, SortOrder } from './workflows-v1-card.universal';
15
+ export { Card, CardInfo, Attachment, QueryCardsRequest, Query, Sorting, Paging, QueryCardsResponse, PaginationResponse, ListCardsRequest, ListCardsResponse, GetCardRequest, GetCardResponse, UpdateCardRequest, UpdateCardResponse, CreateCardRequest, CreateCardResponse, DeleteCardRequest, DeleteCardResponse, MoveCardRequest, MoveCardResponse, RestoreCardRequest, RestoreCardResponse, ArchiveCardRequest, ArchiveCardResponse, QueryCardsOptions, ListCardsOptions, UpdateCardOptions, CreateCardIdentifiers, CreateCardOptions, MoveCardOptions, RestoreCardOptions, } from './workflows-v1-card.universal';
@@ -0,0 +1,44 @@
1
+ import { queryCards as universalQueryCards, listCards as universalListCards, getCard as universalGetCard, updateCard as universalUpdateCard, createCard as universalCreateCard, deleteCard as universalDeleteCard, moveCard as universalMoveCard, restoreCard as universalRestoreCard, } from './workflows-v1-card.universal';
2
+ export const __metadata = { PACKAGE_NAME: '@wix/workflows' };
3
+ export function queryCards(httpClient) {
4
+ return (options) => universalQueryCards(options,
5
+ // @ts-ignore
6
+ { httpClient });
7
+ }
8
+ export function listCards(httpClient) {
9
+ return (workflowId, options) => universalListCards(workflowId, options,
10
+ // @ts-ignore
11
+ { httpClient });
12
+ }
13
+ export function getCard(httpClient) {
14
+ return (_id) => universalGetCard(_id,
15
+ // @ts-ignore
16
+ { httpClient });
17
+ }
18
+ export function updateCard(httpClient) {
19
+ return (_id, options) => universalUpdateCard(_id, options,
20
+ // @ts-ignore
21
+ { httpClient });
22
+ }
23
+ export function createCard(httpClient) {
24
+ return (identifiers, options) => universalCreateCard(identifiers, options,
25
+ // @ts-ignore
26
+ { httpClient });
27
+ }
28
+ export function deleteCard(httpClient) {
29
+ return (_id) => universalDeleteCard(_id,
30
+ // @ts-ignore
31
+ { httpClient });
32
+ }
33
+ export function moveCard(httpClient) {
34
+ return (_id, options) => universalMoveCard(_id, options,
35
+ // @ts-ignore
36
+ { httpClient });
37
+ }
38
+ export function restoreCard(httpClient) {
39
+ return (_id, newPhaseId, options) => universalRestoreCard(_id, newPhaseId, options,
40
+ // @ts-ignore
41
+ { httpClient });
42
+ }
43
+ export { AttachmentType, SortOrder } from './workflows-v1-card.universal';
44
+ //# sourceMappingURL=workflows-v1-card.public.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"workflows-v1-card.public.js","sourceRoot":"","sources":["../../../src/workflows-v1-card.public.ts"],"names":[],"mappings":"AACA,OAAO,EACL,UAAU,IAAI,mBAAmB,EACjC,SAAS,IAAI,kBAAkB,EAC/B,OAAO,IAAI,gBAAgB,EAC3B,UAAU,IAAI,mBAAmB,EACjC,UAAU,IAAI,mBAAmB,EACjC,UAAU,IAAI,mBAAmB,EACjC,QAAQ,IAAI,iBAAiB,EAC7B,WAAW,IAAI,oBAAoB,GAQpC,MAAM,+BAA+B,CAAC;AAEvC,MAAM,CAAC,MAAM,UAAU,GAAG,EAAE,YAAY,EAAE,gBAAgB,EAAE,CAAC;AAE7D,MAAM,UAAU,UAAU,CAAC,UAAsB;IAC/C,OAAO,CAAC,OAA2B,EAAE,EAAE,CACrC,mBAAmB,CACjB,OAAO;IACP,aAAa;IACb,EAAE,UAAU,EAAE,CACf,CAAC;AACN,CAAC;AAED,MAAM,UAAU,SAAS,CAAC,UAAsB;IAC9C,OAAO,CAAC,UAAkB,EAAE,OAA0B,EAAE,EAAE,CACxD,kBAAkB,CAChB,UAAU,EACV,OAAO;IACP,aAAa;IACb,EAAE,UAAU,EAAE,CACf,CAAC;AACN,CAAC;AAED,MAAM,UAAU,OAAO,CAAC,UAAsB;IAC5C,OAAO,CAAC,GAAW,EAAE,EAAE,CACrB,gBAAgB,CACd,GAAG;IACH,aAAa;IACb,EAAE,UAAU,EAAE,CACf,CAAC;AACN,CAAC;AAED,MAAM,UAAU,UAAU,CAAC,UAAsB;IAC/C,OAAO,CAAC,GAAW,EAAE,OAA2B,EAAE,EAAE,CAClD,mBAAmB,CACjB,GAAG,EACH,OAAO;IACP,aAAa;IACb,EAAE,UAAU,EAAE,CACf,CAAC;AACN,CAAC;AAED,MAAM,UAAU,UAAU,CAAC,UAAsB;IAC/C,OAAO,CAAC,WAAkC,EAAE,OAA2B,EAAE,EAAE,CACzE,mBAAmB,CACjB,WAAW,EACX,OAAO;IACP,aAAa;IACb,EAAE,UAAU,EAAE,CACf,CAAC;AACN,CAAC;AAED,MAAM,UAAU,UAAU,CAAC,UAAsB;IAC/C,OAAO,CAAC,GAAW,EAAE,EAAE,CACrB,mBAAmB,CACjB,GAAG;IACH,aAAa;IACb,EAAE,UAAU,EAAE,CACf,CAAC;AACN,CAAC;AAED,MAAM,UAAU,QAAQ,CAAC,UAAsB;IAC7C,OAAO,CAAC,GAAW,EAAE,OAAyB,EAAE,EAAE,CAChD,iBAAiB,CACf,GAAG,EACH,OAAO;IACP,aAAa;IACb,EAAE,UAAU,EAAE,CACf,CAAC;AACN,CAAC;AAED,MAAM,UAAU,WAAW,CAAC,UAAsB;IAChD,OAAO,CAAC,GAAW,EAAE,UAAkB,EAAE,OAA4B,EAAE,EAAE,CACvE,oBAAoB,CAClB,GAAG,EACH,UAAU,EACV,OAAO;IACP,aAAa;IACb,EAAE,UAAU,EAAE,CACf,CAAC;AACN,CAAC;AAED,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAC"}
@@ -0,0 +1,240 @@
1
+ export interface Card {
2
+ /** Card details. */
3
+ info?: CardInfo;
4
+ }
5
+ /** entity representing a card-info */
6
+ export interface CardInfo {
7
+ /**
8
+ * Card ID.
9
+ * @readonly
10
+ */
11
+ id?: string | null;
12
+ /** Display name shown at the top of the card. */
13
+ name?: string | null;
14
+ /** Card description. */
15
+ description?: string | null;
16
+ /** Details about the contact attached to the card. */
17
+ primaryAttachment?: Attachment;
18
+ /** Due date. */
19
+ dueDate?: Date;
20
+ /** Name of the app or service that created the contact. */
21
+ source?: string | null;
22
+ /**
23
+ * Deprecated. Use `createdDate` instead.
24
+ * @readonly
25
+ */
26
+ createdAt?: Date;
27
+ /**
28
+ * Deprecated. Use `updatedDate` instead.
29
+ * @readonly
30
+ */
31
+ updatedAt?: Date;
32
+ /**
33
+ * ID of the phase that currently holds the card.
34
+ * @readonly
35
+ */
36
+ phaseId?: string | null;
37
+ /**
38
+ * Date and time the card was created.
39
+ * @readonly
40
+ */
41
+ createdDate?: Date;
42
+ /**
43
+ * Date and time the card was updated.
44
+ * @readonly
45
+ */
46
+ updatedDate?: Date;
47
+ }
48
+ export interface Attachment {
49
+ /**
50
+ * Attachment ID. For internal use.
51
+ * @readonly
52
+ */
53
+ attachmentId?: string;
54
+ /** Deprecated. Use `contactId` instead. */
55
+ value?: string;
56
+ /** Deprecated. For internal use. */
57
+ attachmentType?: AttachmentType;
58
+ /** ID of the contact attached to the card. */
59
+ contactId?: string;
60
+ }
61
+ /** describes the supported types of attachments (currently only supports Contact which is the default type) */
62
+ export declare enum AttachmentType {
63
+ ContactType = "ContactType"
64
+ }
65
+ export interface QueryCardsRequest {
66
+ /** Query, sort, and paging options. */
67
+ query?: Query;
68
+ }
69
+ export interface Query {
70
+ /**
71
+ * Filter object in the following format:
72
+ * `"filter" : {
73
+ * "fieldName1": "value1",
74
+ * "fieldName2":{"$operator":"value2"}
75
+ * }`
76
+ * Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`
77
+ */
78
+ filter?: any;
79
+ /**
80
+ * Sort object in the following format:
81
+ * `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]`
82
+ */
83
+ sort?: Sorting[];
84
+ /** Paging options to limit and skip the number of items. */
85
+ paging?: Paging;
86
+ /** 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. */
87
+ fields?: string[];
88
+ /** 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. */
89
+ fieldsets?: string[];
90
+ }
91
+ export interface Sorting {
92
+ /** Name of the field to sort by. */
93
+ fieldName?: string;
94
+ /** Sort order. */
95
+ order?: SortOrder;
96
+ }
97
+ export declare enum SortOrder {
98
+ ASC = "ASC",
99
+ DESC = "DESC"
100
+ }
101
+ export interface Paging {
102
+ /** Number of items to load. */
103
+ limit?: number | null;
104
+ /** Number of items to skip in the current sort order. */
105
+ offset?: number | null;
106
+ }
107
+ export interface QueryCardsResponse {
108
+ /** List of cards that matched the query criteria. */
109
+ cards?: Card[];
110
+ /** Metadata for the page of results. */
111
+ pagination?: PaginationResponse;
112
+ }
113
+ export interface PaginationResponse {
114
+ /** Number of items that were skipped in the current sort order. */
115
+ offset?: number;
116
+ /** Total number of items that matched the filter. */
117
+ total?: number;
118
+ /** Number of returned items. */
119
+ count?: number;
120
+ }
121
+ export interface ListCardsRequest {
122
+ /** ID of the workflow whose cards will be listed. */
123
+ workflowId: string;
124
+ /** Filters for cards in the specified phase. */
125
+ phaseId?: string | null;
126
+ /**
127
+ * Number of items to return.
128
+ *
129
+ * Defaults to `50`.
130
+ */
131
+ limit?: number | null;
132
+ /**
133
+ * Number of items to skip in the current sort order.
134
+ *
135
+ * Defaults to `0`.
136
+ */
137
+ offset?: number | null;
138
+ /** Filters for cards with the specified contact ID. */
139
+ attachmentValue?: string | null;
140
+ /**
141
+ * Filters for archived cards.
142
+ * If set to `true`,
143
+ * only archived cards are returned.
144
+ * If set to `false`,
145
+ * only cards that are not archived are returned.
146
+ *
147
+ * Defaults to `false`.
148
+ */
149
+ fetchArchived?: boolean | null;
150
+ /**
151
+ * Supported fields:
152
+ * `id`, `name`, `createdDate`, `updatedDate`, `phaseId`
153
+ *
154
+ * List of fields to sort by.
155
+ * Formatted as `field:direction`,
156
+ * where field is the field name
157
+ * and direction is `asc` (ascending) or `desc` (descending).
158
+ *
159
+ * Sorting is applied lexicographically, so `"abc"` comes after `"XYZ"`.
160
+ */
161
+ sort?: string[];
162
+ }
163
+ export interface ListCardsResponse {
164
+ /** List of cards. */
165
+ cards?: Card[];
166
+ /** Metadata for the page of results. */
167
+ pagination?: PaginationResponse;
168
+ }
169
+ export interface GetCardRequest {
170
+ /** ID of the card to retrieve. */
171
+ id: string;
172
+ }
173
+ export interface GetCardResponse {
174
+ /** Requested card. */
175
+ card?: Card;
176
+ }
177
+ export interface UpdateCardRequest {
178
+ /** ID of the card to update. */
179
+ id: string;
180
+ /** Card details. */
181
+ cardInfo?: CardInfo;
182
+ }
183
+ export interface UpdateCardResponse {
184
+ }
185
+ export interface CreateCardRequest {
186
+ /** ID of the workflow to create the card in. */
187
+ workflowId: string;
188
+ /** ID of the phase to create the card in. */
189
+ phaseId: string;
190
+ /** Card details. */
191
+ card?: CardInfo;
192
+ /**
193
+ * Card position, where the first card is `0`.
194
+ *
195
+ * If a card already occupies the specified position,
196
+ * that card and any subsequent cards are shifted to the right by 1.
197
+ *
198
+ * Defaults to the last position.
199
+ */
200
+ position?: number | null;
201
+ }
202
+ export interface CreateCardResponse {
203
+ /** ID of the newly created card. */
204
+ id?: string | null;
205
+ }
206
+ export interface DeleteCardRequest {
207
+ /** ID of the card to delete. */
208
+ id: string;
209
+ }
210
+ export interface DeleteCardResponse {
211
+ }
212
+ export interface MoveCardRequest {
213
+ /** ID of the card to move. */
214
+ id: string;
215
+ /** ID of the phase to move the card to. */
216
+ newPhaseId?: string | null;
217
+ /** Position of the card in the phase, where the first card is `0`. */
218
+ newPosition?: number | null;
219
+ }
220
+ export interface MoveCardResponse {
221
+ }
222
+ export interface RestoreCardRequest {
223
+ /** ID of the card to restore. */
224
+ id: string;
225
+ /** ID of the phase to restore the card to. */
226
+ newPhaseId: string;
227
+ /**
228
+ * Position of the restored card in the phase,
229
+ * where the first card is `0`.
230
+ */
231
+ newPosition?: number | null;
232
+ }
233
+ export interface RestoreCardResponse {
234
+ }
235
+ export interface ArchiveCardRequest {
236
+ /** ID of the card to archive. */
237
+ id?: string;
238
+ }
239
+ export interface ArchiveCardResponse {
240
+ }
@@ -0,0 +1,11 @@
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-card.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"workflows-v1-card.types.js","sourceRoot":"","sources":["../../../src/workflows-v1-card.types.ts"],"names":[],"mappings":"AA+DA,+GAA+G;AAC/G,MAAM,CAAN,IAAY,cAEX;AAFD,WAAY,cAAc;IACxB,6CAA2B,CAAA;AAC7B,CAAC,EAFW,cAAc,KAAd,cAAc,QAEzB;AAqCD,MAAM,CAAN,IAAY,SAGX;AAHD,WAAY,SAAS;IACnB,wBAAW,CAAA;IACX,0BAAa,CAAA;AACf,CAAC,EAHW,SAAS,KAAT,SAAS,QAGpB"}