@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,278 @@
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 _cardsList = { cards: '_card' };
13
+ const _createPhaseRequest = {};
14
+ const _createPhaseResponse = {};
15
+ const _deletePhaseRequest = {};
16
+ const _deletePhaseResponse = {};
17
+ const _getPhaseRequest = {};
18
+ const _getPhaseResponse = { phase: '_phase' };
19
+ const _listPhasesRequest = {};
20
+ const _listPhasesResponse = { phases: '_phase' };
21
+ const _movePhaseRequest = {};
22
+ const _movePhaseResponse = {};
23
+ const _phase = { cardsList: '_cardsList' };
24
+ const _queryPhasesRequest = {};
25
+ const _queryPhasesResponse = { phases: '_phase' };
26
+ const _updatePhaseRequest = {};
27
+ const _updatePhaseResponse = {};
28
+ function resolveComWixpressWorkflowApiV1PhasesServiceUrl(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 phases according to:
59
+ * * paging: offset, limit
60
+ * * order: by some of the following fields: id, name, position
61
+ * * filter: by the following fields of PhaseInfo
62
+ * ** phaseInfo.id - Guid
63
+ * ** phaseInfo.name - Text
64
+ * ** phaseInfo.visibility - Text (Visible / Archived)
65
+ */
66
+ export function queryPhases(payload) {
67
+ const { toJSON: toReq, fromJSON: fromReq } = serializer(_queryPhasesRequest, {});
68
+ const { fromJSON: fromRes } = serializer(_queryPhasesResponse, {
69
+ _card,
70
+ _cardInfo,
71
+ _cardsList,
72
+ _phase,
73
+ });
74
+ function __queryPhases({ host }) {
75
+ const serializedData = toReq(payload);
76
+ const metadata = {
77
+ entityFqdn: 'wix.workflows.v1.phase',
78
+ method: 'POST',
79
+ methodFqn: 'com.wixpress.workflow.api.v1.PhasesService.QueryPhases',
80
+ url: resolveComWixpressWorkflowApiV1PhasesServiceUrl({
81
+ protoPath: '/v1/phases/query',
82
+ data: serializedData,
83
+ host,
84
+ }),
85
+ data: serializedData,
86
+ transformResponse: fromRes,
87
+ };
88
+ return metadata;
89
+ }
90
+ __queryPhases.fromReq = fromReq;
91
+ return __queryPhases;
92
+ }
93
+ /**
94
+ * Retrieves a list of active phases in the specified workflow.
95
+ *
96
+ * By default, the returned phases are sorted by their display order.
97
+ *
98
+ * The win phase is not an active phase
99
+ * and is therefore not returned with this endpoint.
100
+ * To get the win phase ID, use
101
+ * [Get Workflow](https://dev.wix.com/api/rest/workflows/workflows/workflows/get-workflow?branch=workflows).
102
+ */
103
+ export function listPhases(payload) {
104
+ const { toJSON: toReq, fromJSON: fromReq } = serializer(_listPhasesRequest, {});
105
+ const { fromJSON: fromRes } = serializer(_listPhasesResponse, {
106
+ _card,
107
+ _cardInfo,
108
+ _cardsList,
109
+ _phase,
110
+ });
111
+ function __listPhases({ host }) {
112
+ const serializedData = toReq(payload);
113
+ const metadata = {
114
+ entityFqdn: 'wix.workflows.v1.phase',
115
+ method: 'GET',
116
+ methodFqn: 'com.wixpress.workflow.api.v1.PhasesService.ListPhases',
117
+ url: resolveComWixpressWorkflowApiV1PhasesServiceUrl({
118
+ protoPath: '/v1/workflows/{workflowId}/phases',
119
+ data: serializedData,
120
+ host,
121
+ }),
122
+ params: toURLSearchParams(serializedData),
123
+ transformResponse: fromRes,
124
+ };
125
+ return metadata;
126
+ }
127
+ __listPhases.fromReq = fromReq;
128
+ return __listPhases;
129
+ }
130
+ /** Retrieves a phase and its cards. */
131
+ export function getPhase(payload) {
132
+ const { toJSON: toReq, fromJSON: fromReq } = serializer(_getPhaseRequest, {});
133
+ const { fromJSON: fromRes } = serializer(_getPhaseResponse, {
134
+ _card,
135
+ _cardInfo,
136
+ _cardsList,
137
+ _phase,
138
+ });
139
+ function __getPhase({ host }) {
140
+ const serializedData = toReq(payload);
141
+ const metadata = {
142
+ entityFqdn: 'wix.workflows.v1.phase',
143
+ method: 'GET',
144
+ methodFqn: 'com.wixpress.workflow.api.v1.PhasesService.GetPhase',
145
+ url: resolveComWixpressWorkflowApiV1PhasesServiceUrl({
146
+ protoPath: '/v1/phases/{id}',
147
+ data: serializedData,
148
+ host,
149
+ }),
150
+ params: toURLSearchParams(serializedData),
151
+ transformResponse: fromRes,
152
+ };
153
+ return metadata;
154
+ }
155
+ __getPhase.fromReq = fromReq;
156
+ return __getPhase;
157
+ }
158
+ /**
159
+ * Updates a phase's name.
160
+ *
161
+ * To reorder phases, use
162
+ * [Move Phase](https://dev.wix.com/api/rest/workflows/workflows/phases/move-phase).
163
+ * To reorder or rename cards, use the
164
+ * [Cards API](https://dev.wix.com/api/rest/workflows/workflows/cards).
165
+ */
166
+ export function updatePhase(payload) {
167
+ const { toJSON: toReq, fromJSON: fromReq } = serializer(_updatePhaseRequest, {});
168
+ const { fromJSON: fromRes } = serializer(_updatePhaseResponse, {});
169
+ function __updatePhase({ host }) {
170
+ const serializedData = toReq(payload);
171
+ const metadata = {
172
+ entityFqdn: 'wix.workflows.v1.phase',
173
+ method: 'PATCH',
174
+ methodFqn: 'com.wixpress.workflow.api.v1.PhasesService.UpdatePhase',
175
+ url: resolveComWixpressWorkflowApiV1PhasesServiceUrl({
176
+ protoPath: '/v1/phases/{id}',
177
+ data: serializedData,
178
+ host,
179
+ }),
180
+ data: serializedData,
181
+ transformResponse: fromRes,
182
+ };
183
+ return metadata;
184
+ }
185
+ __updatePhase.fromReq = fromReq;
186
+ return __updatePhase;
187
+ }
188
+ /**
189
+ * Creates a new phase in the specified workflow.
190
+ *
191
+ * When creating a phase, you provide a `name` and an optional `position`.
192
+ *
193
+ * Phases are displayed according to their position from left to right,
194
+ * starting from `0` and incrementing by 1.
195
+ * If you create or move a phase to an existing position,
196
+ * the phase in that position and any subsequent phases
197
+ * are shifted to the right by 1.
198
+ *
199
+ * If `position` is not specified,
200
+ * the new phase is given the rightmost position.
201
+ */
202
+ export function createPhase(payload) {
203
+ const { toJSON: toReq, fromJSON: fromReq } = serializer(_createPhaseRequest, {});
204
+ const { fromJSON: fromRes } = serializer(_createPhaseResponse, {});
205
+ function __createPhase({ host }) {
206
+ const serializedData = toReq(payload);
207
+ const metadata = {
208
+ entityFqdn: 'wix.workflows.v1.phase',
209
+ method: 'POST',
210
+ methodFqn: 'com.wixpress.workflow.api.v1.PhasesService.CreatePhase',
211
+ url: resolveComWixpressWorkflowApiV1PhasesServiceUrl({
212
+ protoPath: '/v1/workflows/{workflowId}/phases',
213
+ data: serializedData,
214
+ host,
215
+ }),
216
+ data: serializedData,
217
+ transformResponse: fromRes,
218
+ };
219
+ return metadata;
220
+ }
221
+ __createPhase.fromReq = fromReq;
222
+ return __createPhase;
223
+ }
224
+ /** Deletes a phase and its cards. */
225
+ export function deletePhase(payload) {
226
+ const { toJSON: toReq, fromJSON: fromReq } = serializer(_deletePhaseRequest, {});
227
+ const { fromJSON: fromRes } = serializer(_deletePhaseResponse, {});
228
+ function __deletePhase({ host }) {
229
+ const serializedData = toReq(payload);
230
+ const metadata = {
231
+ entityFqdn: 'wix.workflows.v1.phase',
232
+ method: 'DELETE',
233
+ methodFqn: 'com.wixpress.workflow.api.v1.PhasesService.DeletePhase',
234
+ url: resolveComWixpressWorkflowApiV1PhasesServiceUrl({
235
+ protoPath: '/v1/phases/{id}',
236
+ data: serializedData,
237
+ host,
238
+ }),
239
+ params: toURLSearchParams(serializedData),
240
+ transformResponse: fromRes,
241
+ };
242
+ return metadata;
243
+ }
244
+ __deletePhase.fromReq = fromReq;
245
+ return __deletePhase;
246
+ }
247
+ /**
248
+ * Moves a phase to a new position in its workflow.
249
+ *
250
+ * Phases are displayed according to their position from left to right,
251
+ * starting from `0` and incrementing by 1.
252
+ * If you create or move a phase to an existing position,
253
+ * the phase in that position and any subsequent phases
254
+ * are shifted to the right by 1.
255
+ */
256
+ export function movePhase(payload) {
257
+ const { toJSON: toReq, fromJSON: fromReq } = serializer(_movePhaseRequest, {});
258
+ const { fromJSON: fromRes } = serializer(_movePhaseResponse, {});
259
+ function __movePhase({ host }) {
260
+ const serializedData = toReq(payload);
261
+ const metadata = {
262
+ entityFqdn: 'wix.workflows.v1.phase',
263
+ method: 'POST',
264
+ methodFqn: 'com.wixpress.workflow.api.v1.PhasesService.MovePhase',
265
+ url: resolveComWixpressWorkflowApiV1PhasesServiceUrl({
266
+ protoPath: '/v1/workflows/{workflowId}/phases/{id}/move',
267
+ data: serializedData,
268
+ host,
269
+ }),
270
+ data: serializedData,
271
+ transformResponse: fromRes,
272
+ };
273
+ return metadata;
274
+ }
275
+ __movePhase.fromReq = fromReq;
276
+ return __movePhase;
277
+ }
278
+ //# sourceMappingURL=workflows-v1-phase.http.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"workflows-v1-phase.http.js","sourceRoot":"","sources":["../../../src/workflows-v1-phase.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;AAoBhD,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,UAAU,GAAG,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC;AACtC,MAAM,mBAAmB,GAAG,EAAE,CAAC;AAC/B,MAAM,oBAAoB,GAAG,EAAE,CAAC;AAChC,MAAM,mBAAmB,GAAG,EAAE,CAAC;AAC/B,MAAM,oBAAoB,GAAG,EAAE,CAAC;AAChC,MAAM,gBAAgB,GAAG,EAAE,CAAC;AAC5B,MAAM,iBAAiB,GAAG,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC;AAC9C,MAAM,kBAAkB,GAAG,EAAE,CAAC;AAC9B,MAAM,mBAAmB,GAAG,EAAE,MAAM,EAAE,QAAQ,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IAAI,EAAE,cAAc;YACpB,iBAAiB,EAAE,OAAO;SAC3B,CAAC;QAEF,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED,WAAW,CAAC,OAAO,GAAG,OAAO,CAAC;IAE9B,OAAO,WAAW,CAAC;AACrB,CAAC"}
@@ -0,0 +1,14 @@
1
+ import { HttpClient } from '@wix/sdk-types';
2
+ import { MovePhaseIdentifiers, CreatePhaseOptions, ListPhasesOptions, QueryPhasesOptions, UpdatePhaseOptions } from './workflows-v1-phase.universal';
3
+ export declare const __metadata: {
4
+ PACKAGE_NAME: string;
5
+ };
6
+ export declare function queryPhases(httpClient: HttpClient): (options?: QueryPhasesOptions | undefined) => Promise<import("./workflows-v1-phase.universal").QueryPhasesResponse>;
7
+ export declare function listPhases(httpClient: HttpClient): (workflowId: string, options?: ListPhasesOptions | undefined) => Promise<import("./workflows-v1-phase.universal").ListPhasesResponse>;
8
+ export declare function getPhase(httpClient: HttpClient): (_id: string) => Promise<import("./workflows-v1-phase.universal").GetPhaseResponse>;
9
+ export declare function updatePhase(httpClient: HttpClient): (_id: string, options?: UpdatePhaseOptions | undefined) => Promise<void>;
10
+ export declare function createPhase(httpClient: HttpClient): (workflowId: string, options?: CreatePhaseOptions | undefined) => Promise<import("./workflows-v1-phase.universal").CreatePhaseResponse>;
11
+ export declare function deletePhase(httpClient: HttpClient): (_id: string) => Promise<void>;
12
+ export declare function movePhase(httpClient: HttpClient): (identifiers: MovePhaseIdentifiers, newPosition: number | null) => Promise<void>;
13
+ export { AttachmentType, SortOrder } from './workflows-v1-phase.universal';
14
+ export { Phase, PhaseInfo, CardsList, Card, CardInfo, Attachment, QueryPhasesRequest, Query, Sorting, Paging, QueryPhasesResponse, PaginationResponse, ListPhasesRequest, ListPhasesResponse, GetPhaseRequest, GetPhaseResponse, UpdatePhaseRequest, UpdatePhaseResponse, CreatePhaseRequest, CreatePhaseResponse, DeletePhaseRequest, DeletePhaseResponse, MovePhaseRequest, MovePhaseResponse, QueryPhasesOptions, ListPhasesOptions, UpdatePhaseOptions, CreatePhaseOptions, MovePhaseIdentifiers, } from './workflows-v1-phase.universal';
@@ -0,0 +1,39 @@
1
+ import { queryPhases as universalQueryPhases, listPhases as universalListPhases, getPhase as universalGetPhase, updatePhase as universalUpdatePhase, createPhase as universalCreatePhase, deletePhase as universalDeletePhase, movePhase as universalMovePhase, } from './workflows-v1-phase.universal';
2
+ export const __metadata = { PACKAGE_NAME: '@wix/workflows' };
3
+ export function queryPhases(httpClient) {
4
+ return (options) => universalQueryPhases(options,
5
+ // @ts-ignore
6
+ { httpClient });
7
+ }
8
+ export function listPhases(httpClient) {
9
+ return (workflowId, options) => universalListPhases(workflowId, options,
10
+ // @ts-ignore
11
+ { httpClient });
12
+ }
13
+ export function getPhase(httpClient) {
14
+ return (_id) => universalGetPhase(_id,
15
+ // @ts-ignore
16
+ { httpClient });
17
+ }
18
+ export function updatePhase(httpClient) {
19
+ return (_id, options) => universalUpdatePhase(_id, options,
20
+ // @ts-ignore
21
+ { httpClient });
22
+ }
23
+ export function createPhase(httpClient) {
24
+ return (workflowId, options) => universalCreatePhase(workflowId, options,
25
+ // @ts-ignore
26
+ { httpClient });
27
+ }
28
+ export function deletePhase(httpClient) {
29
+ return (_id) => universalDeletePhase(_id,
30
+ // @ts-ignore
31
+ { httpClient });
32
+ }
33
+ export function movePhase(httpClient) {
34
+ return (identifiers, newPosition) => universalMovePhase(identifiers, newPosition,
35
+ // @ts-ignore
36
+ { httpClient });
37
+ }
38
+ export { AttachmentType, SortOrder } from './workflows-v1-phase.universal';
39
+ //# sourceMappingURL=workflows-v1-phase.public.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"workflows-v1-phase.public.js","sourceRoot":"","sources":["../../../src/workflows-v1-phase.public.ts"],"names":[],"mappings":"AACA,OAAO,EACL,WAAW,IAAI,oBAAoB,EACnC,UAAU,IAAI,mBAAmB,EACjC,QAAQ,IAAI,iBAAiB,EAC7B,WAAW,IAAI,oBAAoB,EACnC,WAAW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WAAiC,EAAE,WAA0B,EAAE,EAAE,CACvE,kBAAkB,CAChB,WAAW,EACX,WAAW;IACX,aAAa;IACb,EAAE,UAAU,EAAE,CACf,CAAC;AACN,CAAC;AAED,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC"}
@@ -0,0 +1,234 @@
1
+ export interface Phase {
2
+ /** Phase information. */
3
+ info?: PhaseInfo;
4
+ /** Cards contained in the phase. */
5
+ cardsList?: CardsList;
6
+ }
7
+ export interface PhaseInfo {
8
+ /**
9
+ * Phase ID.
10
+ * @readonly
11
+ */
12
+ id?: string | null;
13
+ /** Display name shown at the top of the phase. */
14
+ name?: string | null;
15
+ }
16
+ /** a list of cards (a page) along with the total number */
17
+ export interface CardsList {
18
+ /** Total number of cards in the phase. */
19
+ total?: number;
20
+ /**
21
+ * List of cards in the phase.
22
+ * Sorted according to the card display order, from top to bottom.
23
+ */
24
+ cards?: Card[];
25
+ }
26
+ export interface Card {
27
+ /** Card details. */
28
+ info?: CardInfo;
29
+ }
30
+ /** entity representing a card-info */
31
+ export interface CardInfo {
32
+ /**
33
+ * Card ID.
34
+ * @readonly
35
+ */
36
+ id?: string | null;
37
+ /** Display name shown at the top of the card. */
38
+ name?: string | null;
39
+ /** Card description. */
40
+ description?: string | null;
41
+ /** Details about the contact attached to the card. */
42
+ primaryAttachment?: Attachment;
43
+ /** Due date. */
44
+ dueDate?: Date;
45
+ /** Name of the app or service that created the contact. */
46
+ source?: string | null;
47
+ /**
48
+ * Deprecated. Use `createdDate` instead.
49
+ * @readonly
50
+ */
51
+ createdAt?: Date;
52
+ /**
53
+ * Deprecated. Use `updatedDate` instead.
54
+ * @readonly
55
+ */
56
+ updatedAt?: Date;
57
+ /**
58
+ * ID of the phase that currently holds the card.
59
+ * @readonly
60
+ */
61
+ phaseId?: string | null;
62
+ /**
63
+ * Date and time the card was created.
64
+ * @readonly
65
+ */
66
+ createdDate?: Date;
67
+ /**
68
+ * Date and time the card was updated.
69
+ * @readonly
70
+ */
71
+ updatedDate?: Date;
72
+ }
73
+ export interface Attachment {
74
+ /**
75
+ * Attachment ID. For internal use.
76
+ * @readonly
77
+ */
78
+ attachmentId?: string;
79
+ /** Deprecated. Use `contactId` instead. */
80
+ value?: string;
81
+ /** Deprecated. For internal use. */
82
+ attachmentType?: AttachmentType;
83
+ /** ID of the contact attached to the card. */
84
+ contactId?: string;
85
+ }
86
+ /** describes the supported types of attachments (currently only supports Contact which is the default type) */
87
+ export declare enum AttachmentType {
88
+ ContactType = "ContactType"
89
+ }
90
+ export interface QueryPhasesRequest {
91
+ /** Query, sort, and paging options. */
92
+ query?: Query;
93
+ }
94
+ export interface Query {
95
+ /**
96
+ * Filter object in the following format:
97
+ * `"filter" : {
98
+ * "fieldName1": "value1",
99
+ * "fieldName2":{"$operator":"value2"}
100
+ * }`
101
+ * Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`
102
+ */
103
+ filter?: any;
104
+ /**
105
+ * Sort object in the following format:
106
+ * `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]`
107
+ */
108
+ sort?: Sorting[];
109
+ /** Paging options to limit and skip the number of items. */
110
+ paging?: Paging;
111
+ /** 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. */
112
+ fields?: string[];
113
+ /** 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. */
114
+ fieldsets?: string[];
115
+ }
116
+ export interface Sorting {
117
+ /** Name of the field to sort by. */
118
+ fieldName?: string;
119
+ /** Sort order. */
120
+ order?: SortOrder;
121
+ }
122
+ export declare enum SortOrder {
123
+ ASC = "ASC",
124
+ DESC = "DESC"
125
+ }
126
+ export interface Paging {
127
+ /** Number of items to load. */
128
+ limit?: number | null;
129
+ /** Number of items to skip in the current sort order. */
130
+ offset?: number | null;
131
+ }
132
+ export interface QueryPhasesResponse {
133
+ /** List of phases that matched the query criteria. */
134
+ phases?: Phase[];
135
+ /** Metadata for the page of results. */
136
+ pagination?: PaginationResponse;
137
+ }
138
+ export interface PaginationResponse {
139
+ /** Number of items that were skipped in the current sort order. */
140
+ offset?: number;
141
+ /** Total number of items that matched the filter. */
142
+ total?: number;
143
+ /** Number of returned items. */
144
+ count?: number;
145
+ }
146
+ export interface ListPhasesRequest {
147
+ /** ID of the workflow whose phases will be listed. */
148
+ workflowId: string;
149
+ /** Number of items to return. */
150
+ limit?: number | null;
151
+ /**
152
+ * Number of items to skip in the current sort order.
153
+ *
154
+ * Defaults to `0`.
155
+ */
156
+ offset?: number | null;
157
+ /**
158
+ * Supported fields:
159
+ * `id`, `name`
160
+ *
161
+ * List of fields to sort by.
162
+ * Formatted as `field:direction`,
163
+ * where field is the field name
164
+ * and direction is `asc` (ascending) or `desc` (descending).
165
+ *
166
+ * Sorting is applied lexicographically, so `"abc"` comes after `"XYZ"`.
167
+ */
168
+ sort?: string[];
169
+ }
170
+ export interface ListPhasesResponse {
171
+ /** List of phases. */
172
+ phases?: Phase[];
173
+ /** Metadata for the page of results. */
174
+ pagination?: PaginationResponse;
175
+ }
176
+ export interface GetPhaseRequest {
177
+ /** ID of the phase to retrieve. */
178
+ id: string;
179
+ }
180
+ export interface GetPhaseResponse {
181
+ /** Requested phase. */
182
+ phase?: Phase;
183
+ }
184
+ export interface UpdatePhaseRequest {
185
+ /** ID of the phase to update. */
186
+ id: string;
187
+ /** Phase details to update. */
188
+ phase?: PhaseInfo;
189
+ }
190
+ export interface UpdatePhaseResponse {
191
+ }
192
+ export interface CreatePhaseRequest {
193
+ /** ID of the workflow to create the phase in. */
194
+ workflowId: string;
195
+ /** Phase details. */
196
+ phase?: PhaseInfo;
197
+ /**
198
+ * Phase position, where the first phase is `0`.
199
+ *
200
+ * If a phase already occupies the specified position,
201
+ * that phase and any subsequent phases
202
+ * are shifted to the right by 1.
203
+ *
204
+ * Defaults to the last position,
205
+ * which is displayed before the win phase.
206
+ */
207
+ position?: number | null;
208
+ }
209
+ export interface CreatePhaseResponse {
210
+ /** ID of the newly created phase. */
211
+ id?: string | null;
212
+ }
213
+ export interface DeletePhaseRequest {
214
+ /** ID of the phase to delete. */
215
+ id: string;
216
+ }
217
+ export interface DeletePhaseResponse {
218
+ }
219
+ export interface MovePhaseRequest {
220
+ /** ID of the workflow that contains the phase to move. */
221
+ workflowId: string;
222
+ /** ID of the phase to move. */
223
+ id: string;
224
+ /**
225
+ * New phase position, where the first phase is `0`.
226
+ *
227
+ * If a phase already occupies the specified position,
228
+ * that phase and any subsequent phases
229
+ * are shifted to the right by 1.
230
+ */
231
+ newPosition: number | null;
232
+ }
233
+ export interface MovePhaseResponse {
234
+ }
@@ -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-phase.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"workflows-v1-phase.types.js","sourceRoot":"","sources":["../../../src/workflows-v1-phase.types.ts"],"names":[],"mappings":"AA2FA,+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"}