@wix/workflows 1.0.31 → 1.0.32

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.
@@ -1,3 +1,481 @@
1
+ type HostModule<T, H extends Host> = {
2
+ __type: 'host';
3
+ create(host: H): T;
4
+ };
5
+ type HostModuleAPI<T extends HostModule<any, any>> = T extends HostModule<infer U, any> ? U : never;
6
+ type Host<Environment = unknown> = {
7
+ channel: {
8
+ observeState(callback: (props: unknown, environment: Environment) => unknown): {
9
+ disconnect: () => void;
10
+ } | Promise<{
11
+ disconnect: () => void;
12
+ }>;
13
+ };
14
+ environment?: Environment;
15
+ /**
16
+ * Optional name of the environment, use for logging
17
+ */
18
+ name?: string;
19
+ /**
20
+ * Optional bast url to use for API requests, for example `www.wixapis.com`
21
+ */
22
+ apiBaseUrl?: string;
23
+ /**
24
+ * Possible data to be provided by every host, for cross cutting concerns
25
+ * like internationalization, billing, etc.
26
+ */
27
+ essentials?: {
28
+ /**
29
+ * The language of the currently viewed session
30
+ */
31
+ language?: string;
32
+ /**
33
+ * The locale of the currently viewed session
34
+ */
35
+ locale?: string;
36
+ /**
37
+ * Any headers that should be passed through to the API requests
38
+ */
39
+ passThroughHeaders?: Record<string, string>;
40
+ };
41
+ };
42
+
43
+ type RESTFunctionDescriptor<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient) => T;
44
+ interface HttpClient {
45
+ request<TResponse, TData = any>(req: RequestOptionsFactory<TResponse, TData>): Promise<HttpResponse<TResponse>>;
46
+ fetchWithAuth: typeof fetch;
47
+ wixAPIFetch: (relativeUrl: string, options: RequestInit) => Promise<Response>;
48
+ getActiveToken?: () => string | undefined;
49
+ }
50
+ type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
51
+ type HttpResponse<T = any> = {
52
+ data: T;
53
+ status: number;
54
+ statusText: string;
55
+ headers: any;
56
+ request?: any;
57
+ };
58
+ type RequestOptions<_TResponse = any, Data = any> = {
59
+ method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
60
+ url: string;
61
+ data?: Data;
62
+ params?: URLSearchParams;
63
+ } & APIMetadata;
64
+ type APIMetadata = {
65
+ methodFqn?: string;
66
+ entityFqdn?: string;
67
+ packageName?: string;
68
+ };
69
+ type BuildRESTFunction<T extends RESTFunctionDescriptor> = T extends RESTFunctionDescriptor<infer U> ? U : never;
70
+ type EventDefinition<Payload = unknown, Type extends string = string> = {
71
+ __type: 'event-definition';
72
+ type: Type;
73
+ isDomainEvent?: boolean;
74
+ transformations?: (envelope: unknown) => Payload;
75
+ __payload: Payload;
76
+ };
77
+ declare function EventDefinition<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition<Payload, Type>;
78
+ type EventHandler<T extends EventDefinition> = (payload: T['__payload']) => void | Promise<void>;
79
+ type BuildEventDefinition<T extends EventDefinition<any, string>> = (handler: EventHandler<T>) => void;
80
+
81
+ type ServicePluginMethodInput = {
82
+ request: any;
83
+ metadata: any;
84
+ };
85
+ type ServicePluginContract = Record<string, (payload: ServicePluginMethodInput) => unknown | Promise<unknown>>;
86
+ type ServicePluginMethodMetadata = {
87
+ name: string;
88
+ primaryHttpMappingPath: string;
89
+ transformations: {
90
+ fromREST: (...args: unknown[]) => ServicePluginMethodInput;
91
+ toREST: (...args: unknown[]) => unknown;
92
+ };
93
+ };
94
+ type ServicePluginDefinition<Contract extends ServicePluginContract> = {
95
+ __type: 'service-plugin-definition';
96
+ componentType: string;
97
+ methods: ServicePluginMethodMetadata[];
98
+ __contract: Contract;
99
+ };
100
+ declare function ServicePluginDefinition<Contract extends ServicePluginContract>(componentType: string, methods: ServicePluginMethodMetadata[]): ServicePluginDefinition<Contract>;
101
+ type BuildServicePluginDefinition<T extends ServicePluginDefinition<any>> = (implementation: T['__contract']) => void;
102
+ declare const SERVICE_PLUGIN_ERROR_TYPE = "wix_spi_error";
103
+
104
+ type RequestContext = {
105
+ isSSR: boolean;
106
+ host: string;
107
+ protocol?: string;
108
+ };
109
+ type ResponseTransformer = (data: any, headers?: any) => any;
110
+ /**
111
+ * Ambassador request options types are copied mostly from AxiosRequestConfig.
112
+ * They are copied and not imported to reduce the amount of dependencies (to reduce install time).
113
+ * https://github.com/axios/axios/blob/3f53eb6960f05a1f88409c4b731a40de595cb825/index.d.ts#L307-L315
114
+ */
115
+ type Method = 'get' | 'GET' | 'delete' | 'DELETE' | 'head' | 'HEAD' | 'options' | 'OPTIONS' | 'post' | 'POST' | 'put' | 'PUT' | 'patch' | 'PATCH' | 'purge' | 'PURGE' | 'link' | 'LINK' | 'unlink' | 'UNLINK';
116
+ type AmbassadorRequestOptions<T = any> = {
117
+ _?: T;
118
+ url?: string;
119
+ method?: Method;
120
+ params?: any;
121
+ data?: any;
122
+ transformResponse?: ResponseTransformer | ResponseTransformer[];
123
+ };
124
+ type AmbassadorFactory<Request, Response> = (payload: Request) => ((context: RequestContext) => AmbassadorRequestOptions<Response>) & {
125
+ __isAmbassador: boolean;
126
+ };
127
+ type AmbassadorFunctionDescriptor<Request = any, Response = any> = AmbassadorFactory<Request, Response>;
128
+ type BuildAmbassadorFunction<T extends AmbassadorFunctionDescriptor> = T extends AmbassadorFunctionDescriptor<infer Request, infer Response> ? (req: Request) => Promise<Response> : never;
129
+
130
+ declare global {
131
+ // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
132
+ interface SymbolConstructor {
133
+ readonly observable: symbol;
134
+ }
135
+ }
136
+
137
+ declare const emptyObjectSymbol: unique symbol;
138
+
139
+ /**
140
+ Represents a strictly empty plain object, the `{}` value.
141
+
142
+ When you annotate something as the type `{}`, it can be anything except `null` and `undefined`. This means that you cannot use `{}` to represent an empty plain object ([read more](https://stackoverflow.com/questions/47339869/typescript-empty-object-and-any-difference/52193484#52193484)).
143
+
144
+ @example
145
+ ```
146
+ import type {EmptyObject} from 'type-fest';
147
+
148
+ // The following illustrates the problem with `{}`.
149
+ const foo1: {} = {}; // Pass
150
+ const foo2: {} = []; // Pass
151
+ const foo3: {} = 42; // Pass
152
+ const foo4: {} = {a: 1}; // Pass
153
+
154
+ // With `EmptyObject` only the first case is valid.
155
+ const bar1: EmptyObject = {}; // Pass
156
+ const bar2: EmptyObject = 42; // Fail
157
+ const bar3: EmptyObject = []; // Fail
158
+ const bar4: EmptyObject = {a: 1}; // Fail
159
+ ```
160
+
161
+ Unfortunately, `Record<string, never>`, `Record<keyof any, never>` and `Record<never, never>` do not work. See {@link https://github.com/sindresorhus/type-fest/issues/395 #395}.
162
+
163
+ @category Object
164
+ */
165
+ type EmptyObject = {[emptyObjectSymbol]?: never};
166
+
167
+ /**
168
+ Returns a boolean for whether the two given types are equal.
169
+
170
+ @link https://github.com/microsoft/TypeScript/issues/27024#issuecomment-421529650
171
+ @link https://stackoverflow.com/questions/68961864/how-does-the-equals-work-in-typescript/68963796#68963796
172
+
173
+ Use-cases:
174
+ - If you want to make a conditional branch based on the result of a comparison of two types.
175
+
176
+ @example
177
+ ```
178
+ import type {IsEqual} from 'type-fest';
179
+
180
+ // This type returns a boolean for whether the given array includes the given item.
181
+ // `IsEqual` is used to compare the given array at position 0 and the given item and then return true if they are equal.
182
+ type Includes<Value extends readonly any[], Item> =
183
+ Value extends readonly [Value[0], ...infer rest]
184
+ ? IsEqual<Value[0], Item> extends true
185
+ ? true
186
+ : Includes<rest, Item>
187
+ : false;
188
+ ```
189
+
190
+ @category Type Guard
191
+ @category Utilities
192
+ */
193
+ type IsEqual<A, B> =
194
+ (<G>() => G extends A ? 1 : 2) extends
195
+ (<G>() => G extends B ? 1 : 2)
196
+ ? true
197
+ : false;
198
+
199
+ /**
200
+ Filter out keys from an object.
201
+
202
+ Returns `never` if `Exclude` is strictly equal to `Key`.
203
+ Returns `never` if `Key` extends `Exclude`.
204
+ Returns `Key` otherwise.
205
+
206
+ @example
207
+ ```
208
+ type Filtered = Filter<'foo', 'foo'>;
209
+ //=> never
210
+ ```
211
+
212
+ @example
213
+ ```
214
+ type Filtered = Filter<'bar', string>;
215
+ //=> never
216
+ ```
217
+
218
+ @example
219
+ ```
220
+ type Filtered = Filter<'bar', 'foo'>;
221
+ //=> 'bar'
222
+ ```
223
+
224
+ @see {Except}
225
+ */
226
+ type Filter<KeyType, ExcludeType> = IsEqual<KeyType, ExcludeType> extends true ? never : (KeyType extends ExcludeType ? never : KeyType);
227
+
228
+ type ExceptOptions = {
229
+ /**
230
+ Disallow assigning non-specified properties.
231
+
232
+ Note that any omitted properties in the resulting type will be present in autocomplete as `undefined`.
233
+
234
+ @default false
235
+ */
236
+ requireExactProps?: boolean;
237
+ };
238
+
239
+ /**
240
+ Create a type from an object type without certain keys.
241
+
242
+ We recommend setting the `requireExactProps` option to `true`.
243
+
244
+ This type is a stricter version of [`Omit`](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-5.html#the-omit-helper-type). The `Omit` type does not restrict the omitted keys to be keys present on the given type, while `Except` does. The benefits of a stricter type are avoiding typos and allowing the compiler to pick up on rename refactors automatically.
245
+
246
+ This type was proposed to the TypeScript team, which declined it, saying they prefer that libraries implement stricter versions of the built-in types ([microsoft/TypeScript#30825](https://github.com/microsoft/TypeScript/issues/30825#issuecomment-523668235)).
247
+
248
+ @example
249
+ ```
250
+ import type {Except} from 'type-fest';
251
+
252
+ type Foo = {
253
+ a: number;
254
+ b: string;
255
+ };
256
+
257
+ type FooWithoutA = Except<Foo, 'a'>;
258
+ //=> {b: string}
259
+
260
+ const fooWithoutA: FooWithoutA = {a: 1, b: '2'};
261
+ //=> errors: 'a' does not exist in type '{ b: string; }'
262
+
263
+ type FooWithoutB = Except<Foo, 'b', {requireExactProps: true}>;
264
+ //=> {a: number} & Partial<Record<"b", never>>
265
+
266
+ const fooWithoutB: FooWithoutB = {a: 1, b: '2'};
267
+ //=> errors at 'b': Type 'string' is not assignable to type 'undefined'.
268
+ ```
269
+
270
+ @category Object
271
+ */
272
+ type Except<ObjectType, KeysType extends keyof ObjectType, Options extends ExceptOptions = {requireExactProps: false}> = {
273
+ [KeyType in keyof ObjectType as Filter<KeyType, KeysType>]: ObjectType[KeyType];
274
+ } & (Options['requireExactProps'] extends true
275
+ ? Partial<Record<KeysType, never>>
276
+ : {});
277
+
278
+ /**
279
+ Returns a boolean for whether the given type is `never`.
280
+
281
+ @link https://github.com/microsoft/TypeScript/issues/31751#issuecomment-498526919
282
+ @link https://stackoverflow.com/a/53984913/10292952
283
+ @link https://www.zhenghao.io/posts/ts-never
284
+
285
+ Useful in type utilities, such as checking if something does not occur.
286
+
287
+ @example
288
+ ```
289
+ import type {IsNever, And} from 'type-fest';
290
+
291
+ // https://github.com/andnp/SimplyTyped/blob/master/src/types/strings.ts
292
+ type AreStringsEqual<A extends string, B extends string> =
293
+ And<
294
+ IsNever<Exclude<A, B>> extends true ? true : false,
295
+ IsNever<Exclude<B, A>> extends true ? true : false
296
+ >;
297
+
298
+ type EndIfEqual<I extends string, O extends string> =
299
+ AreStringsEqual<I, O> extends true
300
+ ? never
301
+ : void;
302
+
303
+ function endIfEqual<I extends string, O extends string>(input: I, output: O): EndIfEqual<I, O> {
304
+ if (input === output) {
305
+ process.exit(0);
306
+ }
307
+ }
308
+
309
+ endIfEqual('abc', 'abc');
310
+ //=> never
311
+
312
+ endIfEqual('abc', '123');
313
+ //=> void
314
+ ```
315
+
316
+ @category Type Guard
317
+ @category Utilities
318
+ */
319
+ type IsNever<T> = [T] extends [never] ? true : false;
320
+
321
+ /**
322
+ An if-else-like type that resolves depending on whether the given type is `never`.
323
+
324
+ @see {@link IsNever}
325
+
326
+ @example
327
+ ```
328
+ import type {IfNever} from 'type-fest';
329
+
330
+ type ShouldBeTrue = IfNever<never>;
331
+ //=> true
332
+
333
+ type ShouldBeBar = IfNever<'not never', 'foo', 'bar'>;
334
+ //=> 'bar'
335
+ ```
336
+
337
+ @category Type Guard
338
+ @category Utilities
339
+ */
340
+ type IfNever<T, TypeIfNever = true, TypeIfNotNever = false> = (
341
+ IsNever<T> extends true ? TypeIfNever : TypeIfNotNever
342
+ );
343
+
344
+ /**
345
+ Extract the keys from a type where the value type of the key extends the given `Condition`.
346
+
347
+ Internally this is used for the `ConditionalPick` and `ConditionalExcept` types.
348
+
349
+ @example
350
+ ```
351
+ import type {ConditionalKeys} from 'type-fest';
352
+
353
+ interface Example {
354
+ a: string;
355
+ b: string | number;
356
+ c?: string;
357
+ d: {};
358
+ }
359
+
360
+ type StringKeysOnly = ConditionalKeys<Example, string>;
361
+ //=> 'a'
362
+ ```
363
+
364
+ To support partial types, make sure your `Condition` is a union of undefined (for example, `string | undefined`) as demonstrated below.
365
+
366
+ @example
367
+ ```
368
+ import type {ConditionalKeys} from 'type-fest';
369
+
370
+ type StringKeysAndUndefined = ConditionalKeys<Example, string | undefined>;
371
+ //=> 'a' | 'c'
372
+ ```
373
+
374
+ @category Object
375
+ */
376
+ type ConditionalKeys<Base, Condition> =
377
+ {
378
+ // Map through all the keys of the given base type.
379
+ [Key in keyof Base]-?:
380
+ // Pick only keys with types extending the given `Condition` type.
381
+ Base[Key] extends Condition
382
+ // Retain this key
383
+ // If the value for the key extends never, only include it if `Condition` also extends never
384
+ ? IfNever<Base[Key], IfNever<Condition, Key, never>, Key>
385
+ // Discard this key since the condition fails.
386
+ : never;
387
+ // Convert the produced object into a union type of the keys which passed the conditional test.
388
+ }[keyof Base];
389
+
390
+ /**
391
+ Exclude keys from a shape that matches the given `Condition`.
392
+
393
+ This is useful when you want to create a new type with a specific set of keys from a shape. For example, you might want to exclude all the primitive properties from a class and form a new shape containing everything but the primitive properties.
394
+
395
+ @example
396
+ ```
397
+ import type {Primitive, ConditionalExcept} from 'type-fest';
398
+
399
+ class Awesome {
400
+ name: string;
401
+ successes: number;
402
+ failures: bigint;
403
+
404
+ run() {}
405
+ }
406
+
407
+ type ExceptPrimitivesFromAwesome = ConditionalExcept<Awesome, Primitive>;
408
+ //=> {run: () => void}
409
+ ```
410
+
411
+ @example
412
+ ```
413
+ import type {ConditionalExcept} from 'type-fest';
414
+
415
+ interface Example {
416
+ a: string;
417
+ b: string | number;
418
+ c: () => void;
419
+ d: {};
420
+ }
421
+
422
+ type NonStringKeysOnly = ConditionalExcept<Example, string>;
423
+ //=> {b: string | number; c: () => void; d: {}}
424
+ ```
425
+
426
+ @category Object
427
+ */
428
+ type ConditionalExcept<Base, Condition> = Except<
429
+ Base,
430
+ ConditionalKeys<Base, Condition>
431
+ >;
432
+
433
+ /**
434
+ * Descriptors are objects that describe the API of a module, and the module
435
+ * can either be a REST module or a host module.
436
+ * This type is recursive, so it can describe nested modules.
437
+ */
438
+ type Descriptors = RESTFunctionDescriptor | AmbassadorFunctionDescriptor | HostModule<any, any> | EventDefinition<any> | ServicePluginDefinition<any> | {
439
+ [key: string]: Descriptors | PublicMetadata | any;
440
+ };
441
+ /**
442
+ * This type takes in a descriptors object of a certain Host (including an `unknown` host)
443
+ * and returns an object with the same structure, but with all descriptors replaced with their API.
444
+ * Any non-descriptor properties are removed from the returned object, including descriptors that
445
+ * do not match the given host (as they will not work with the given host).
446
+ */
447
+ type BuildDescriptors<T extends Descriptors, H extends Host<any> | undefined, Depth extends number = 5> = {
448
+ done: T;
449
+ recurse: T extends {
450
+ __type: typeof SERVICE_PLUGIN_ERROR_TYPE;
451
+ } ? never : T extends AmbassadorFunctionDescriptor ? BuildAmbassadorFunction<T> : T extends RESTFunctionDescriptor ? BuildRESTFunction<T> : T extends EventDefinition<any> ? BuildEventDefinition<T> : T extends ServicePluginDefinition<any> ? BuildServicePluginDefinition<T> : T extends HostModule<any, any> ? HostModuleAPI<T> : ConditionalExcept<{
452
+ [Key in keyof T]: T[Key] extends Descriptors ? BuildDescriptors<T[Key], H, [
453
+ -1,
454
+ 0,
455
+ 1,
456
+ 2,
457
+ 3,
458
+ 4,
459
+ 5
460
+ ][Depth]> : never;
461
+ }, EmptyObject>;
462
+ }[Depth extends -1 ? 'done' : 'recurse'];
463
+ type PublicMetadata = {
464
+ PACKAGE_NAME?: string;
465
+ };
466
+
467
+ declare global {
468
+ interface ContextualClient {
469
+ }
470
+ }
471
+ /**
472
+ * A type used to create concerete types from SDK descriptors in
473
+ * case a contextual client is available.
474
+ */
475
+ type MaybeContext<T extends Descriptors> = globalThis.ContextualClient extends {
476
+ host: Host;
477
+ } ? BuildDescriptors<T, globalThis.ContextualClient['host']> : T;
478
+
1
479
  interface Card$2 {
2
480
  /** Card details. */
3
481
  info?: CardInfo$2;
@@ -16,7 +494,7 @@ interface CardInfo$2 {
16
494
  /** Details about the contact attached to the card. */
17
495
  primaryAttachment?: Attachment$2;
18
496
  /** Due date. */
19
- dueDate?: Date;
497
+ dueDate?: Date | null;
20
498
  /** Name of the app or service that created the contact. */
21
499
  source?: string | null;
22
500
  /**
@@ -25,14 +503,14 @@ interface CardInfo$2 {
25
503
  * @readonly
26
504
  * @deprecated
27
505
  */
28
- createdAt?: Date;
506
+ createdAt?: Date | null;
29
507
  /**
30
508
  * @internal
31
509
  * @internal
32
510
  * @readonly
33
511
  * @deprecated
34
512
  */
35
- updatedAt?: Date;
513
+ updatedAt?: Date | null;
36
514
  /**
37
515
  * ID of the phase that currently holds the card.
38
516
  * @readonly
@@ -42,12 +520,12 @@ interface CardInfo$2 {
42
520
  * Date and time the card was created.
43
521
  * @readonly
44
522
  */
45
- _createdDate?: Date;
523
+ _createdDate?: Date | null;
46
524
  /**
47
525
  * Date and time the card was updated.
48
526
  * @readonly
49
527
  */
50
- _updatedDate?: Date;
528
+ _updatedDate?: Date | null;
51
529
  }
52
530
  interface Attachment$2 {
53
531
  /**
@@ -74,6 +552,54 @@ interface Attachment$2 {
74
552
  declare enum AttachmentType$2 {
75
553
  ContactType = "ContactType"
76
554
  }
555
+ interface QueryCardsRequest {
556
+ /** Query, sort, and paging options. */
557
+ query?: Query$2;
558
+ }
559
+ interface Query$2 {
560
+ /**
561
+ * Filter object in the following format:
562
+ * `"filter" : {
563
+ * "fieldName1": "value1",
564
+ * "fieldName2":{"$operator":"value2"}
565
+ * }`
566
+ * Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`
567
+ */
568
+ filter?: any;
569
+ /**
570
+ * Sort object in the following format:
571
+ * `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]`
572
+ */
573
+ sort?: Sorting$2[];
574
+ /** Paging options to limit and skip the number of items. */
575
+ paging?: Paging$2;
576
+ /** 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. */
577
+ fields?: string[];
578
+ /** 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. */
579
+ fieldsets?: string[];
580
+ }
581
+ interface Sorting$2 {
582
+ /** Name of the field to sort by. */
583
+ fieldName?: string;
584
+ /** Sort order. */
585
+ order?: SortOrder$2;
586
+ }
587
+ declare enum SortOrder$2 {
588
+ ASC = "ASC",
589
+ DESC = "DESC"
590
+ }
591
+ interface Paging$2 {
592
+ /** Number of items to load. */
593
+ limit?: number | null;
594
+ /** Number of items to skip in the current sort order. */
595
+ offset?: number | null;
596
+ }
597
+ interface QueryCardsResponse {
598
+ /** List of cards that matched the query criteria. */
599
+ cards?: Card$2[];
600
+ /** Metadata for the page of results. */
601
+ pagination?: PaginationResponse$2;
602
+ }
77
603
  interface PaginationResponse$2 {
78
604
  /** Number of items that were skipped in the current sort order. */
79
605
  offset?: number;
@@ -82,32 +608,257 @@ interface PaginationResponse$2 {
82
608
  /** Number of returned items. */
83
609
  count?: number;
84
610
  }
611
+ interface ListCardsRequest {
612
+ /** ID of the workflow whose cards will be listed. */
613
+ workflowId: string;
614
+ /** Filters for cards in the specified phase. */
615
+ phaseId?: string | null;
616
+ /**
617
+ * Number of items to return.
618
+ *
619
+ * Defaults to `50`.
620
+ */
621
+ limit?: number | null;
622
+ /**
623
+ * Number of items to skip in the current sort order.
624
+ *
625
+ * Defaults to `0`.
626
+ */
627
+ offset?: number | null;
628
+ /** Filters for cards with the specified contact ID. */
629
+ attachmentValue?: string | null;
630
+ /**
631
+ * Filters for archived cards.
632
+ * If set to `true`,
633
+ * only archived cards are returned.
634
+ * If set to `false`,
635
+ * only cards that are not archived are returned.
636
+ *
637
+ * Defaults to `false`.
638
+ */
639
+ fetchArchived?: boolean | null;
640
+ /**
641
+ * Supported fields:
642
+ * `id`, `name`, `createdDate`, `updatedDate`, `phaseId`
643
+ *
644
+ * List of fields to sort by.
645
+ * Formatted as `field:direction`,
646
+ * where field is the field name
647
+ * and direction is `asc` (ascending) or `desc` (descending).
648
+ *
649
+ * Sorting is applied lexicographically, so `"abc"` comes after `"XYZ"`.
650
+ */
651
+ sort?: string[];
652
+ }
85
653
  interface ListCardsResponse {
86
654
  /** List of cards. */
87
655
  cards?: Card$2[];
88
656
  /** Metadata for the page of results. */
89
657
  pagination?: PaginationResponse$2;
90
658
  }
659
+ interface GetCardRequest {
660
+ /** ID of the card to retrieve. */
661
+ _id: string;
662
+ }
663
+ interface GetCardResponse {
664
+ /** Requested card. */
665
+ card?: Card$2;
666
+ }
667
+ interface UpdateCardRequest {
668
+ /** ID of the card to update. */
669
+ _id: string;
670
+ /** Card details. */
671
+ cardInfo?: CardInfo$2;
672
+ }
673
+ interface UpdateCardResponse {
674
+ }
675
+ interface CreateCardRequest {
676
+ /** ID of the workflow to create the card in. */
677
+ workflowId: string;
678
+ /** ID of the phase to create the card in. */
679
+ phaseId: string;
680
+ /** Card details. */
681
+ card?: CardInfo$2;
682
+ /**
683
+ * Card position, where the first card is `0`.
684
+ *
685
+ * If a card already occupies the specified position,
686
+ * that card and any subsequent cards are shifted to the right by 1.
687
+ *
688
+ * Defaults to the last position.
689
+ */
690
+ position?: number | null;
691
+ }
91
692
  interface CreateCardResponse {
92
693
  /** ID of the newly created card. */
93
694
  _id?: string | null;
94
695
  }
696
+ interface DeleteCardRequest {
697
+ /** ID of the card to delete. */
698
+ _id: string;
699
+ }
700
+ interface DeleteCardResponse {
701
+ }
702
+ interface MoveCardRequest {
703
+ /** ID of the card to move. */
704
+ _id: string;
705
+ /** ID of the phase to move the card to. */
706
+ newPhaseId?: string | null;
707
+ /** Position of the card in the phase, where the first card is `0`. */
708
+ newPosition?: number | null;
709
+ }
710
+ interface MoveCardResponse {
711
+ }
712
+ interface RestoreCardRequest {
713
+ /** ID of the card to restore. */
714
+ _id: string;
715
+ /** ID of the phase to restore the card to. */
716
+ newPhaseId: string;
717
+ /**
718
+ * Position of the restored card in the phase,
719
+ * where the first card is `0`.
720
+ */
721
+ newPosition?: number | null;
722
+ }
723
+ interface RestoreCardResponse {
724
+ }
725
+ interface ArchiveCardRequest {
726
+ /** ID of the card to archive. */
727
+ _id: string;
728
+ }
729
+ interface ArchiveCardResponse {
730
+ }
731
+ interface DomainEvent extends DomainEventBodyOneOf {
732
+ createdEvent?: EntityCreatedEvent;
733
+ updatedEvent?: EntityUpdatedEvent;
734
+ deletedEvent?: EntityDeletedEvent;
735
+ actionEvent?: ActionEvent;
736
+ /**
737
+ * Unique event ID.
738
+ * Allows clients to ignore duplicate webhooks.
739
+ */
740
+ _id?: string;
741
+ /**
742
+ * Assumes actions are also always typed to an entity_type
743
+ * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
744
+ */
745
+ entityFqdn?: string;
746
+ /**
747
+ * This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
748
+ * This is although the created/updated/deleted notion is duplication of the oneof types
749
+ * Example: created/updated/deleted/started/completed/email_opened
750
+ */
751
+ slug?: string;
752
+ /** ID of the entity associated with the event. */
753
+ entityId?: string;
754
+ /** Event timestamp. */
755
+ eventTime?: Date | null;
756
+ /**
757
+ * Whether the event was triggered as a result of a privacy regulation application
758
+ * (for example, GDPR).
759
+ */
760
+ triggeredByAnonymizeRequest?: boolean | null;
761
+ /** If present, indicates the action that triggered the event. */
762
+ originatedFrom?: string | null;
763
+ /**
764
+ * A sequence number defining the order of updates to the underlying entity.
765
+ * For example, given that some entity was updated at 16:00 and than again at 16:01,
766
+ * it is guaranteed that the sequence number of the second update is strictly higher than the first.
767
+ * As the consumer, you can use this value to ensure that you handle messages in the correct order.
768
+ * To do so, you will need to persist this number on your end, and compare the sequence number from the
769
+ * message against the one you have stored. Given that the stored number is higher, you should ignore the message.
770
+ */
771
+ entityEventSequence?: string | null;
772
+ }
773
+ /** @oneof */
774
+ interface DomainEventBodyOneOf {
775
+ createdEvent?: EntityCreatedEvent;
776
+ updatedEvent?: EntityUpdatedEvent;
777
+ deletedEvent?: EntityDeletedEvent;
778
+ actionEvent?: ActionEvent;
779
+ }
780
+ interface EntityCreatedEvent {
781
+ entity?: string;
782
+ }
783
+ interface EntityUpdatedEvent {
784
+ /**
785
+ * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
786
+ * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
787
+ * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
788
+ */
789
+ currentEntity?: string;
790
+ }
791
+ interface EntityDeletedEvent {
792
+ /** Entity that was deleted */
793
+ deletedEntity?: string | null;
794
+ }
795
+ interface ActionEvent {
796
+ body?: string;
797
+ }
798
+ interface MessageEnvelope {
799
+ /** App instance ID. */
800
+ instanceId?: string | null;
801
+ /** Event type. */
802
+ eventType?: string;
803
+ /** The identification type and identity data. */
804
+ identity?: IdentificationData;
805
+ /** Stringify payload. */
806
+ data?: string;
807
+ }
808
+ interface IdentificationData extends IdentificationDataIdOneOf {
809
+ /** ID of a site visitor that has not logged in to the site. */
810
+ anonymousVisitorId?: string;
811
+ /** ID of a site visitor that has logged in to the site. */
812
+ memberId?: string;
813
+ /** ID of a Wix user (site owner, contributor, etc.). */
814
+ wixUserId?: string;
815
+ /** ID of an app. */
816
+ appId?: string;
817
+ /** @readonly */
818
+ identityType?: WebhookIdentityType;
819
+ }
820
+ /** @oneof */
821
+ interface IdentificationDataIdOneOf {
822
+ /** ID of a site visitor that has not logged in to the site. */
823
+ anonymousVisitorId?: string;
824
+ /** ID of a site visitor that has logged in to the site. */
825
+ memberId?: string;
826
+ /** ID of a Wix user (site owner, contributor, etc.). */
827
+ wixUserId?: string;
828
+ /** ID of an app. */
829
+ appId?: string;
830
+ }
831
+ declare enum WebhookIdentityType {
832
+ UNKNOWN = "UNKNOWN",
833
+ ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
834
+ MEMBER = "MEMBER",
835
+ WIX_USER = "WIX_USER",
836
+ APP = "APP"
837
+ }
838
+ interface AttachmentNonNullableFields$2 {
839
+ attachmentId: string;
840
+ value: string;
841
+ attachmentType: AttachmentType$2;
842
+ contactId: string;
843
+ }
844
+ interface CardInfoNonNullableFields$2 {
845
+ primaryAttachment?: AttachmentNonNullableFields$2;
846
+ }
847
+ interface CardNonNullableFields$2 {
848
+ info?: CardInfoNonNullableFields$2;
849
+ }
850
+ interface PaginationResponseNonNullableFields$2 {
851
+ offset: number;
852
+ limit: number;
853
+ total: number;
854
+ count: number;
855
+ }
95
856
  interface ListCardsResponseNonNullableFields {
96
- cards: {
97
- info?: {
98
- primaryAttachment?: {
99
- attachmentId: string;
100
- value: string;
101
- attachmentType: AttachmentType$2;
102
- contactId: string;
103
- };
104
- };
105
- }[];
106
- pagination?: {
107
- offset: number;
108
- total: number;
109
- count: number;
110
- };
857
+ cards: CardNonNullableFields$2[];
858
+ pagination?: PaginationResponseNonNullableFields$2;
859
+ }
860
+ interface GetCardResponseNonNullableFields {
861
+ card?: CardNonNullableFields$2;
111
862
  }
112
863
  interface ListCardsOptions {
113
864
  /** Filters for cards in the specified phase. */
@@ -180,66 +931,204 @@ interface RestoreCardOptions {
180
931
  newPosition?: number | null;
181
932
  }
182
933
 
183
- type RESTFunctionDescriptor$2<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient$2) => T;
184
- interface HttpClient$2 {
185
- request<TResponse, TData = any>(req: RequestOptionsFactory$2<TResponse, TData>): Promise<HttpResponse$2<TResponse>>;
186
- fetchWithAuth: (url: string | URL, init?: RequestInit) => Promise<Response>;
934
+ declare function listCards$1(httpClient: HttpClient): ListCardsSignature;
935
+ interface ListCardsSignature {
936
+ /**
937
+ * Retrieves a list of a workflow's cards.
938
+ *
939
+ *
940
+ * The `listCards()` function returns a Promise that resolves to a list of the specified workflow's cards.
941
+ *
942
+ *
943
+ * Use the `options` parameter to specify which cards to retrieve and in which order to retrieve them. Must use either `phaseId` or `fetchOnlyArchived`.
944
+ *
945
+ *
946
+ * Cards can be sorted based on their `"id"`, `"name"`, `"phaseId"`, `"createdDate"`, `"updatedDate"`, `"source"`, and `"position"`.
947
+ *
948
+ *
949
+ * If no `limit` parameter is passed, the first 50 cards are returned.
950
+ *
951
+ *
952
+ * Sort order defaults to by `"phaseId"` and then by `"position"` ascending.
953
+ *
954
+ *
955
+ * This function requires you to specify the ID of a workflow. To learn about retrieving IDs in the Workflows APIs, see [Retrieving IDs](wix-workflows-v2/introduction#retrieving-ids).
956
+ * @param - ID of the workflow whose cards will be listed.
957
+ * @param - Options to use when retrieving the list of cards.
958
+ */
959
+ (workflowId: string, options?: ListCardsOptions | undefined): Promise<ListCardsResponse & ListCardsResponseNonNullableFields>;
187
960
  }
188
- type RequestOptionsFactory$2<TResponse = any, TData = any> = (context: any) => RequestOptions$2<TResponse, TData>;
189
- type HttpResponse$2<T = any> = {
190
- data: T;
191
- status: number;
192
- statusText: string;
193
- headers: any;
194
- request?: any;
195
- };
196
- type RequestOptions$2<_TResponse = any, Data = any> = {
197
- method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
198
- url: string;
199
- data?: Data;
200
- params?: URLSearchParams;
201
- } & APIMetadata$2;
202
- type APIMetadata$2 = {
203
- methodFqn?: string;
204
- entityFqdn?: string;
205
- packageName?: string;
206
- };
207
- type BuildRESTFunction$2<T extends RESTFunctionDescriptor$2> = T extends RESTFunctionDescriptor$2<infer U> ? U : never;
208
-
209
- declare global {
210
- // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
211
- interface SymbolConstructor {
212
- readonly observable: symbol;
213
- }
961
+ declare function getCard$1(httpClient: HttpClient): GetCardSignature;
962
+ interface GetCardSignature {
963
+ /**
964
+ * Retrieves a workflow card by ID.
965
+ *
966
+ *
967
+ * The `getCard()` function returns a Promise that resolves to the card with the specified ID.
968
+ *
969
+ *
970
+ * This function requires you to specify the ID of a card. To learn about retrieving IDs in the Workflows APIs, see [Retrieving IDs](wix-workflows-v2/introduction#retrieving-ids).
971
+ * @param - ID of the card to retrieve.
972
+ * @returns Requested card.
973
+ */
974
+ (_id: string): Promise<Card$2 & CardNonNullableFields$2>;
975
+ }
976
+ declare function updateCard$1(httpClient: HttpClient): UpdateCardSignature;
977
+ interface UpdateCardSignature {
978
+ /**
979
+ * Updates an existing workflow card.
980
+ *
981
+ *
982
+ * The `updateCard()` function returns a Promise that resolves when the card has been updated with the specified values.
983
+ *
984
+ *
985
+ * `contactId` is not a required field, but if the parameter is not passed, the field will default to empty and the card will not be associated with any contact.
986
+ *
987
+ *
988
+ * This function requires you to specify the ID of a card. To learn about retrieving IDs in the Workflows APIs, see [Retrieving IDs](wix-workflows-v2/introduction#retrieving-ids).
989
+ * @param - ID of the card to update.
990
+ * @param - Card details.
991
+ * @param - Options to use when updating a card.
992
+ */
993
+ (_id: string, cardInfo: CardInfo$2): Promise<void>;
994
+ }
995
+ declare function createCard$1(httpClient: HttpClient): CreateCardSignature;
996
+ interface CreateCardSignature {
997
+ /**
998
+ * Creates a new workflow card.
999
+ *
1000
+ *
1001
+ * The `createCard()` function returns a Promise that resolves to the created card's ID when the card is created in the specified workflow phase.
1002
+ *
1003
+ * Pass a value for the `position` parameter to specify the newly created card's position within the specified phase. Positions are zero-based, meaning the first position is `0`.
1004
+ *
1005
+ * When omitted, the newly created card is added to the specified phase as the top card within the phase.
1006
+ *
1007
+ *
1008
+ * This function requires you to specify the ID of a workflow and phase. To learn about retrieving IDs in the Workflows APIs, see [Retrieving IDs](wix-workflows-v2/introduction#retrieving-ids).
1009
+ *
1010
+ * > **Note:**
1011
+ * > Each workflow is limited to 5,000 cards.
1012
+ * > If this limit is reached, `createCard()` throws an error.
1013
+ * > [Archive cards](#archivecard) when they're no longer needed
1014
+ * > to reduce card count and avoid hitting the limit.
1015
+ * @param - Card details.
1016
+ * @param - Options to use when creating a card.
1017
+ */
1018
+ (identifiers: CreateCardIdentifiers, card: CardInfo$2, options?: CreateCardOptions | undefined): Promise<CreateCardResponse>;
1019
+ }
1020
+ declare function deleteCard$1(httpClient: HttpClient): DeleteCardSignature;
1021
+ interface DeleteCardSignature {
1022
+ /**
1023
+ * Deletes a workflow card by ID.
1024
+ *
1025
+ *
1026
+ * The `deleteCard()` function returns a Promise when the specified card has been deleted.
1027
+ *
1028
+ * This function requires you to specify the ID of a card. To learn about retrieving IDs in the Workflows APIs, see [Retrieving IDs](wix-workflows-v2/introduction#retrieving-ids).
1029
+ * @param - ID of the card to delete.
1030
+ */
1031
+ (_id: string): Promise<void>;
1032
+ }
1033
+ declare function moveCard$1(httpClient: HttpClient): MoveCardSignature;
1034
+ interface MoveCardSignature {
1035
+ /**
1036
+ * Moves a card to a new position within a workflow.
1037
+ *
1038
+ *
1039
+ * The `moveCard()` function returns a Promise when the specified card has been moved to the new position.
1040
+ *
1041
+ * Use the `options` parameter to specify the phase and position within that phase to move the card to. Positions are zero-based, meaning the first position is `0`.
1042
+ *
1043
+ * This function requires you to specify the ID of a card. To learn about retrieving IDs in the Workflows APIs, see [Retrieving IDs](wix-workflows-v2/introduction#retrieving-ids).
1044
+ * @param - ID of the card to move.
1045
+ * @param - Information about where to move the card.
1046
+ */
1047
+ (_id: string, options?: MoveCardOptions | undefined): Promise<void>;
1048
+ }
1049
+ declare function restoreCard$1(httpClient: HttpClient): RestoreCardSignature;
1050
+ interface RestoreCardSignature {
1051
+ /**
1052
+ * Restores an archived workflow card.
1053
+ *
1054
+ *
1055
+ * The `restoreCard()` function returns a Promise that resolves when the archived card has been restored.
1056
+ *
1057
+ *
1058
+ * This function requires you to specify the ID of a card. To learn about retrieving IDs in the Workflows APIs, see [Retrieving IDs](wix-workflows-v2/introduction#retrieving-ids).
1059
+ *
1060
+ *
1061
+ * > **Note:**
1062
+ * > Each workflow is limited to 5,000 cards.
1063
+ * > If this limit is reached, `createCard()` throws an error.
1064
+ * > [Archive cards](#archivecard) when they're no longer needed
1065
+ * > to reduce card count and avoid hitting the limit.
1066
+ * @param - ID of the card to restore.
1067
+ * @param - ID of the phase to restore the card to.
1068
+ * @param - Options to use when restoring a card.
1069
+ */
1070
+ (_id: string, newPhaseId: string, options?: RestoreCardOptions | undefined): Promise<void>;
1071
+ }
1072
+ declare function archiveCard$1(httpClient: HttpClient): ArchiveCardSignature;
1073
+ interface ArchiveCardSignature {
1074
+ /**
1075
+ * Archives a workflow card.
1076
+ *
1077
+ *
1078
+ * The `archiveCard()` function returns a Promise that resolves when the card has been archived.
1079
+ *
1080
+ *
1081
+ * This function requires you to specify the ID of a card. To learn about retrieving IDs in the Workflows APIs, see [Retrieving IDs](wix-workflows-v2/introduction#retrieving-ids).
1082
+ * @param - ID of the card to archive.
1083
+ */
1084
+ (_id: string): Promise<void>;
214
1085
  }
215
1086
 
216
- declare function listCards$1(httpClient: HttpClient$2): (workflowId: string, options?: ListCardsOptions) => Promise<ListCardsResponse & ListCardsResponseNonNullableFields>;
217
- declare function getCard$1(httpClient: HttpClient$2): (_id: string) => Promise<Card$2 & {
218
- info?: {
219
- primaryAttachment?: {
220
- attachmentId: string;
221
- value: string;
222
- attachmentType: AttachmentType$2;
223
- contactId: string;
224
- } | undefined;
225
- } | undefined;
226
- }>;
227
- declare function updateCard$1(httpClient: HttpClient$2): (_id: string, cardInfo: CardInfo$2) => Promise<void>;
228
- declare function createCard$1(httpClient: HttpClient$2): (identifiers: CreateCardIdentifiers, card: CardInfo$2, options?: CreateCardOptions) => Promise<CreateCardResponse>;
229
- declare function deleteCard$1(httpClient: HttpClient$2): (_id: string) => Promise<void>;
230
- declare function moveCard$1(httpClient: HttpClient$2): (_id: string, options?: MoveCardOptions) => Promise<void>;
231
- declare function restoreCard$1(httpClient: HttpClient$2): (_id: string, newPhaseId: string, options?: RestoreCardOptions) => Promise<void>;
232
- declare function archiveCard$1(httpClient: HttpClient$2): (_id: string) => Promise<void>;
233
-
234
- declare const listCards: BuildRESTFunction$2<typeof listCards$1>;
235
- declare const getCard: BuildRESTFunction$2<typeof getCard$1>;
236
- declare const updateCard: BuildRESTFunction$2<typeof updateCard$1>;
237
- declare const createCard: BuildRESTFunction$2<typeof createCard$1>;
238
- declare const deleteCard: BuildRESTFunction$2<typeof deleteCard$1>;
239
- declare const moveCard: BuildRESTFunction$2<typeof moveCard$1>;
240
- declare const restoreCard: BuildRESTFunction$2<typeof restoreCard$1>;
241
- declare const archiveCard: BuildRESTFunction$2<typeof archiveCard$1>;
1087
+ declare const listCards: MaybeContext<BuildRESTFunction<typeof listCards$1> & typeof listCards$1>;
1088
+ declare const getCard: MaybeContext<BuildRESTFunction<typeof getCard$1> & typeof getCard$1>;
1089
+ declare const updateCard: MaybeContext<BuildRESTFunction<typeof updateCard$1> & typeof updateCard$1>;
1090
+ declare const createCard: MaybeContext<BuildRESTFunction<typeof createCard$1> & typeof createCard$1>;
1091
+ declare const deleteCard: MaybeContext<BuildRESTFunction<typeof deleteCard$1> & typeof deleteCard$1>;
1092
+ declare const moveCard: MaybeContext<BuildRESTFunction<typeof moveCard$1> & typeof moveCard$1>;
1093
+ declare const restoreCard: MaybeContext<BuildRESTFunction<typeof restoreCard$1> & typeof restoreCard$1>;
1094
+ declare const archiveCard: MaybeContext<BuildRESTFunction<typeof archiveCard$1> & typeof archiveCard$1>;
242
1095
 
1096
+ type context$2_ActionEvent = ActionEvent;
1097
+ type context$2_ArchiveCardRequest = ArchiveCardRequest;
1098
+ type context$2_ArchiveCardResponse = ArchiveCardResponse;
1099
+ type context$2_CreateCardIdentifiers = CreateCardIdentifiers;
1100
+ type context$2_CreateCardOptions = CreateCardOptions;
1101
+ type context$2_CreateCardRequest = CreateCardRequest;
1102
+ type context$2_CreateCardResponse = CreateCardResponse;
1103
+ type context$2_DeleteCardRequest = DeleteCardRequest;
1104
+ type context$2_DeleteCardResponse = DeleteCardResponse;
1105
+ type context$2_DomainEvent = DomainEvent;
1106
+ type context$2_DomainEventBodyOneOf = DomainEventBodyOneOf;
1107
+ type context$2_EntityCreatedEvent = EntityCreatedEvent;
1108
+ type context$2_EntityDeletedEvent = EntityDeletedEvent;
1109
+ type context$2_EntityUpdatedEvent = EntityUpdatedEvent;
1110
+ type context$2_GetCardRequest = GetCardRequest;
1111
+ type context$2_GetCardResponse = GetCardResponse;
1112
+ type context$2_GetCardResponseNonNullableFields = GetCardResponseNonNullableFields;
1113
+ type context$2_IdentificationData = IdentificationData;
1114
+ type context$2_IdentificationDataIdOneOf = IdentificationDataIdOneOf;
1115
+ type context$2_ListCardsOptions = ListCardsOptions;
1116
+ type context$2_ListCardsRequest = ListCardsRequest;
1117
+ type context$2_ListCardsResponse = ListCardsResponse;
1118
+ type context$2_ListCardsResponseNonNullableFields = ListCardsResponseNonNullableFields;
1119
+ type context$2_MessageEnvelope = MessageEnvelope;
1120
+ type context$2_MoveCardOptions = MoveCardOptions;
1121
+ type context$2_MoveCardRequest = MoveCardRequest;
1122
+ type context$2_MoveCardResponse = MoveCardResponse;
1123
+ type context$2_QueryCardsRequest = QueryCardsRequest;
1124
+ type context$2_QueryCardsResponse = QueryCardsResponse;
1125
+ type context$2_RestoreCardOptions = RestoreCardOptions;
1126
+ type context$2_RestoreCardRequest = RestoreCardRequest;
1127
+ type context$2_RestoreCardResponse = RestoreCardResponse;
1128
+ type context$2_UpdateCardRequest = UpdateCardRequest;
1129
+ type context$2_UpdateCardResponse = UpdateCardResponse;
1130
+ type context$2_WebhookIdentityType = WebhookIdentityType;
1131
+ declare const context$2_WebhookIdentityType: typeof WebhookIdentityType;
243
1132
  declare const context$2_archiveCard: typeof archiveCard;
244
1133
  declare const context$2_createCard: typeof createCard;
245
1134
  declare const context$2_deleteCard: typeof deleteCard;
@@ -249,7 +1138,7 @@ declare const context$2_moveCard: typeof moveCard;
249
1138
  declare const context$2_restoreCard: typeof restoreCard;
250
1139
  declare const context$2_updateCard: typeof updateCard;
251
1140
  declare namespace context$2 {
252
- export { context$2_archiveCard as archiveCard, context$2_createCard as createCard, context$2_deleteCard as deleteCard, context$2_getCard as getCard, context$2_listCards as listCards, context$2_moveCard as moveCard, context$2_restoreCard as restoreCard, context$2_updateCard as updateCard };
1141
+ export { type context$2_ActionEvent as ActionEvent, type context$2_ArchiveCardRequest as ArchiveCardRequest, type context$2_ArchiveCardResponse as ArchiveCardResponse, type Attachment$2 as Attachment, AttachmentType$2 as AttachmentType, type Card$2 as Card, type CardInfo$2 as CardInfo, type CardNonNullableFields$2 as CardNonNullableFields, type context$2_CreateCardIdentifiers as CreateCardIdentifiers, type context$2_CreateCardOptions as CreateCardOptions, type context$2_CreateCardRequest as CreateCardRequest, type context$2_CreateCardResponse as CreateCardResponse, type context$2_DeleteCardRequest as DeleteCardRequest, type context$2_DeleteCardResponse as DeleteCardResponse, type context$2_DomainEvent as DomainEvent, type context$2_DomainEventBodyOneOf as DomainEventBodyOneOf, type context$2_EntityCreatedEvent as EntityCreatedEvent, type context$2_EntityDeletedEvent as EntityDeletedEvent, type context$2_EntityUpdatedEvent as EntityUpdatedEvent, type context$2_GetCardRequest as GetCardRequest, type context$2_GetCardResponse as GetCardResponse, type context$2_GetCardResponseNonNullableFields as GetCardResponseNonNullableFields, type context$2_IdentificationData as IdentificationData, type context$2_IdentificationDataIdOneOf as IdentificationDataIdOneOf, type context$2_ListCardsOptions as ListCardsOptions, type context$2_ListCardsRequest as ListCardsRequest, type context$2_ListCardsResponse as ListCardsResponse, type context$2_ListCardsResponseNonNullableFields as ListCardsResponseNonNullableFields, type context$2_MessageEnvelope as MessageEnvelope, type context$2_MoveCardOptions as MoveCardOptions, type context$2_MoveCardRequest as MoveCardRequest, type context$2_MoveCardResponse as MoveCardResponse, type PaginationResponse$2 as PaginationResponse, type Paging$2 as Paging, type Query$2 as Query, type context$2_QueryCardsRequest as QueryCardsRequest, type context$2_QueryCardsResponse as QueryCardsResponse, type context$2_RestoreCardOptions as RestoreCardOptions, type context$2_RestoreCardRequest as RestoreCardRequest, type context$2_RestoreCardResponse as RestoreCardResponse, SortOrder$2 as SortOrder, type Sorting$2 as Sorting, type context$2_UpdateCardRequest as UpdateCardRequest, type context$2_UpdateCardResponse as UpdateCardResponse, context$2_WebhookIdentityType as WebhookIdentityType, context$2_archiveCard as archiveCard, context$2_createCard as createCard, context$2_deleteCard as deleteCard, context$2_getCard as getCard, context$2_listCards as listCards, context$2_moveCard as moveCard, context$2_restoreCard as restoreCard, context$2_updateCard as updateCard };
253
1142
  }
254
1143
 
255
1144
  interface Phase$1 {
@@ -295,7 +1184,7 @@ interface CardInfo$1 {
295
1184
  /** Details about the contact attached to the card. */
296
1185
  primaryAttachment?: Attachment$1;
297
1186
  /** Due date. */
298
- dueDate?: Date;
1187
+ dueDate?: Date | null;
299
1188
  /** Name of the app or service that created the contact. */
300
1189
  source?: string | null;
301
1190
  /**
@@ -304,14 +1193,14 @@ interface CardInfo$1 {
304
1193
  * @readonly
305
1194
  * @deprecated
306
1195
  */
307
- createdAt?: Date;
1196
+ createdAt?: Date | null;
308
1197
  /**
309
1198
  * @internal
310
1199
  * @internal
311
1200
  * @readonly
312
1201
  * @deprecated
313
1202
  */
314
- updatedAt?: Date;
1203
+ updatedAt?: Date | null;
315
1204
  /**
316
1205
  * ID of the phase that currently holds the card.
317
1206
  * @readonly
@@ -321,12 +1210,12 @@ interface CardInfo$1 {
321
1210
  * Date and time the card was created.
322
1211
  * @readonly
323
1212
  */
324
- _createdDate?: Date;
1213
+ _createdDate?: Date | null;
325
1214
  /**
326
1215
  * Date and time the card was updated.
327
1216
  * @readonly
328
1217
  */
329
- _updatedDate?: Date;
1218
+ _updatedDate?: Date | null;
330
1219
  }
331
1220
  interface Attachment$1 {
332
1221
  /**
@@ -345,21 +1234,93 @@ interface Attachment$1 {
345
1234
  * @internal
346
1235
  * @deprecated
347
1236
  */
348
- attachmentType?: AttachmentType$1;
349
- /** ID of the contact attached to the card. */
350
- contactId?: string;
351
- }
352
- /** describes the supported types of attachments (currently only supports Contact which is the default type) */
353
- declare enum AttachmentType$1 {
354
- ContactType = "ContactType"
355
- }
356
- interface PaginationResponse$1 {
357
- /** Number of items that were skipped in the current sort order. */
358
- offset?: number;
359
- /** Total number of items that matched the filter. */
360
- total?: number;
361
- /** Number of returned items. */
362
- count?: number;
1237
+ attachmentType?: AttachmentType$1;
1238
+ /** ID of the contact attached to the card. */
1239
+ contactId?: string;
1240
+ }
1241
+ /** describes the supported types of attachments (currently only supports Contact which is the default type) */
1242
+ declare enum AttachmentType$1 {
1243
+ ContactType = "ContactType"
1244
+ }
1245
+ interface QueryPhasesRequest {
1246
+ /** Query, sort, and paging options. */
1247
+ query?: Query$1;
1248
+ }
1249
+ interface Query$1 {
1250
+ /**
1251
+ * Filter object in the following format:
1252
+ * `"filter" : {
1253
+ * "fieldName1": "value1",
1254
+ * "fieldName2":{"$operator":"value2"}
1255
+ * }`
1256
+ * Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`
1257
+ */
1258
+ filter?: any;
1259
+ /**
1260
+ * Sort object in the following format:
1261
+ * `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]`
1262
+ */
1263
+ sort?: Sorting$1[];
1264
+ /** Paging options to limit and skip the number of items. */
1265
+ paging?: Paging$1;
1266
+ /** 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. */
1267
+ fields?: string[];
1268
+ /** 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. */
1269
+ fieldsets?: string[];
1270
+ }
1271
+ interface Sorting$1 {
1272
+ /** Name of the field to sort by. */
1273
+ fieldName?: string;
1274
+ /** Sort order. */
1275
+ order?: SortOrder$1;
1276
+ }
1277
+ declare enum SortOrder$1 {
1278
+ ASC = "ASC",
1279
+ DESC = "DESC"
1280
+ }
1281
+ interface Paging$1 {
1282
+ /** Number of items to load. */
1283
+ limit?: number | null;
1284
+ /** Number of items to skip in the current sort order. */
1285
+ offset?: number | null;
1286
+ }
1287
+ interface QueryPhasesResponse {
1288
+ /** List of phases that matched the query criteria. */
1289
+ phases?: Phase$1[];
1290
+ /** Metadata for the page of results. */
1291
+ pagination?: PaginationResponse$1;
1292
+ }
1293
+ interface PaginationResponse$1 {
1294
+ /** Number of items that were skipped in the current sort order. */
1295
+ offset?: number;
1296
+ /** Total number of items that matched the filter. */
1297
+ total?: number;
1298
+ /** Number of returned items. */
1299
+ count?: number;
1300
+ }
1301
+ interface ListPhasesRequest {
1302
+ /** ID of the workflow whose phases will be listed. */
1303
+ workflowId: string;
1304
+ /** Number of items to return. */
1305
+ limit?: number | null;
1306
+ /**
1307
+ * Number of items to skip in the current sort order.
1308
+ *
1309
+ * Defaults to `0`.
1310
+ */
1311
+ offset?: number | null;
1312
+ /**
1313
+ * Supported fields:
1314
+ * `id`, `name`
1315
+ *
1316
+ * List of fields to sort by.
1317
+ * Formatted as `field:direction`,
1318
+ * where field is the field name
1319
+ * and direction is `asc` (ascending) or `desc` (descending).
1320
+ *
1321
+ * Sorting is applied lexicographically, so `"abc"` comes after `"XYZ"`.
1322
+ */
1323
+ sort?: string[];
363
1324
  }
364
1325
  interface ListPhasesResponse {
365
1326
  /** List of phases. */
@@ -367,31 +1328,96 @@ interface ListPhasesResponse {
367
1328
  /** Metadata for the page of results. */
368
1329
  pagination?: PaginationResponse$1;
369
1330
  }
1331
+ interface GetPhaseRequest {
1332
+ /** ID of the phase to retrieve. */
1333
+ _id: string;
1334
+ }
1335
+ interface GetPhaseResponse {
1336
+ /** Requested phase. */
1337
+ phase?: Phase$1;
1338
+ }
1339
+ interface UpdatePhaseRequest {
1340
+ /** ID of the phase to update. */
1341
+ _id: string;
1342
+ /** Phase details to update. */
1343
+ phase?: PhaseInfo$1;
1344
+ }
1345
+ interface UpdatePhaseResponse {
1346
+ }
1347
+ interface CreatePhaseRequest {
1348
+ /** ID of the workflow to create the phase in. */
1349
+ workflowId: string;
1350
+ /** Phase details. */
1351
+ phase?: PhaseInfo$1;
1352
+ /**
1353
+ * Phase position, where the first phase is `0`.
1354
+ *
1355
+ * If a phase already occupies the specified position,
1356
+ * that phase and any subsequent phases
1357
+ * are shifted to the right by 1.
1358
+ *
1359
+ * Defaults to the last position,
1360
+ * which is displayed before the win phase.
1361
+ */
1362
+ position?: number | null;
1363
+ }
370
1364
  interface CreatePhaseResponse {
371
1365
  /** ID of the newly created phase. */
372
1366
  _id?: string | null;
373
1367
  }
1368
+ interface DeletePhaseRequest {
1369
+ /** ID of the phase to delete. */
1370
+ _id: string;
1371
+ }
1372
+ interface DeletePhaseResponse {
1373
+ }
1374
+ interface MovePhaseRequest {
1375
+ /** ID of the workflow that contains the phase to move. */
1376
+ workflowId: string;
1377
+ /** ID of the phase to move. */
1378
+ _id: string;
1379
+ /**
1380
+ * New phase position, where the first phase is `0`.
1381
+ *
1382
+ * If a phase already occupies the specified position,
1383
+ * that phase and any subsequent phases
1384
+ * are shifted to the right by 1.
1385
+ */
1386
+ newPosition: number | null;
1387
+ }
1388
+ interface MovePhaseResponse {
1389
+ }
1390
+ interface AttachmentNonNullableFields$1 {
1391
+ attachmentId: string;
1392
+ value: string;
1393
+ attachmentType: AttachmentType$1;
1394
+ contactId: string;
1395
+ }
1396
+ interface CardInfoNonNullableFields$1 {
1397
+ primaryAttachment?: AttachmentNonNullableFields$1;
1398
+ }
1399
+ interface CardNonNullableFields$1 {
1400
+ info?: CardInfoNonNullableFields$1;
1401
+ }
1402
+ interface CardsListNonNullableFields$1 {
1403
+ total: number;
1404
+ cards: CardNonNullableFields$1[];
1405
+ }
1406
+ interface PhaseNonNullableFields$1 {
1407
+ cardsList?: CardsListNonNullableFields$1;
1408
+ }
1409
+ interface PaginationResponseNonNullableFields$1 {
1410
+ offset: number;
1411
+ limit: number;
1412
+ total: number;
1413
+ count: number;
1414
+ }
374
1415
  interface ListPhasesResponseNonNullableFields {
375
- phases: {
376
- cardsList?: {
377
- total: number;
378
- cards: {
379
- info?: {
380
- primaryAttachment?: {
381
- attachmentId: string;
382
- value: string;
383
- attachmentType: AttachmentType$1;
384
- contactId: string;
385
- };
386
- };
387
- }[];
388
- };
389
- }[];
390
- pagination?: {
391
- offset: number;
392
- total: number;
393
- count: number;
394
- };
1416
+ phases: PhaseNonNullableFields$1[];
1417
+ pagination?: PaginationResponseNonNullableFields$1;
1418
+ }
1419
+ interface GetPhaseResponseNonNullableFields {
1420
+ phase?: PhaseNonNullableFields$1;
395
1421
  }
396
1422
  interface ListPhasesOptions {
397
1423
  /** Number of items to return. */
@@ -435,67 +1461,141 @@ interface MovePhaseIdentifiers {
435
1461
  _id: string;
436
1462
  }
437
1463
 
438
- type RESTFunctionDescriptor$1<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient$1) => T;
439
- interface HttpClient$1 {
440
- request<TResponse, TData = any>(req: RequestOptionsFactory$1<TResponse, TData>): Promise<HttpResponse$1<TResponse>>;
441
- fetchWithAuth: (url: string | URL, init?: RequestInit) => Promise<Response>;
1464
+ declare function listPhases$1(httpClient: HttpClient): ListPhasesSignature;
1465
+ interface ListPhasesSignature {
1466
+ /**
1467
+ * Retrieves a list of a workflow's phases.
1468
+ *
1469
+ *
1470
+ * The `listPhases()` function returns a Promise that resolves to a list containing information about the specified workflow's phases.
1471
+ *
1472
+ *
1473
+ * Use the `options` parameter to specify which phases to retrieve and in which order to retrieve them. Phases can be sorted based on their `"id"`, `"name"`, and `"position"`. If no `limit` parameter is passed, the first 50 cards are returned. Sort order defaults to by `"position"` ascending.
1474
+ *
1475
+ *
1476
+ * This function requires you to specify the ID of a workflow. To learn about retrieving IDs in the Workflows APIs, see [Retrieving IDs](wix-workflows-v2/introduction#retrieving-ids).
1477
+ * @param - ID of the workflow whose phases will be listed.
1478
+ * @param - Options to use when retrieving the list of workflow phases.
1479
+ */
1480
+ (workflowId: string, options?: ListPhasesOptions | undefined): Promise<ListPhasesResponse & ListPhasesResponseNonNullableFields>;
442
1481
  }
443
- type RequestOptionsFactory$1<TResponse = any, TData = any> = (context: any) => RequestOptions$1<TResponse, TData>;
444
- type HttpResponse$1<T = any> = {
445
- data: T;
446
- status: number;
447
- statusText: string;
448
- headers: any;
449
- request?: any;
450
- };
451
- type RequestOptions$1<_TResponse = any, Data = any> = {
452
- method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
453
- url: string;
454
- data?: Data;
455
- params?: URLSearchParams;
456
- } & APIMetadata$1;
457
- type APIMetadata$1 = {
458
- methodFqn?: string;
459
- entityFqdn?: string;
460
- packageName?: string;
461
- };
462
- type BuildRESTFunction$1<T extends RESTFunctionDescriptor$1> = T extends RESTFunctionDescriptor$1<infer U> ? U : never;
463
-
464
- declare global {
465
- // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
466
- interface SymbolConstructor {
467
- readonly observable: symbol;
468
- }
1482
+ declare function getPhase$1(httpClient: HttpClient): GetPhaseSignature;
1483
+ interface GetPhaseSignature {
1484
+ /**
1485
+ * Retrieves a phase by ID.
1486
+ *
1487
+ *
1488
+ * The `getPhase()` function returns a Promise that resolves to the phase with the specified ID.
1489
+ *
1490
+ * This function requires you to specify the ID of a phase. To learn about retrieving IDs in the Workflows APIs, see [Retrieving IDs](wix-workflows-v2/introduction#retrieving-ids).
1491
+ * @param - ID of the phase to retrieve.
1492
+ * @returns Requested phase.
1493
+ */
1494
+ (_id: string): Promise<Phase$1 & PhaseNonNullableFields$1>;
1495
+ }
1496
+ declare function updatePhase$1(httpClient: HttpClient): UpdatePhaseSignature;
1497
+ interface UpdatePhaseSignature {
1498
+ /**
1499
+ * Updates an existing workflow phase.
1500
+ *
1501
+ *
1502
+ * The `updatePhase()` function returns a Promise that resolves when the phase has been updated with the specified values.
1503
+ *
1504
+ *
1505
+ * Only the properties passed in the `phase` object will be updated. All other properties will remain the same.
1506
+ *
1507
+ *
1508
+ * This function requires you to specify the ID of a phase. To learn about retrieving IDs in the Workflows APIs, see [Retrieving IDs](wix-workflows-v2/introduction#retrieving-ids).
1509
+ * @param - ID of the phase to update.
1510
+ * @param - Phase details to update.
1511
+ * @param - Phase information to update.
1512
+ */
1513
+ (_id: string, phase: PhaseInfo$1): Promise<void>;
1514
+ }
1515
+ declare function createPhase$1(httpClient: HttpClient): CreatePhaseSignature;
1516
+ interface CreatePhaseSignature {
1517
+ /**
1518
+ * Creates a new workflow phase.
1519
+ *
1520
+ *
1521
+ * The `createPhase()` function returns a Promise that resolves to the created phase ID when the phase is created in the specified workflow.
1522
+ *
1523
+ *
1524
+ * Pass a value for the `position` parameter to specify the newly created phase's position within the specified workflow. Positions are zero-based, meaning the first position is `0`.
1525
+ *
1526
+ *
1527
+ * When omitted, the newly created phase is added as the last non-win phase.
1528
+ *
1529
+ *
1530
+ * This function requires you to specify the ID of a workflow. To learn about retrieving IDs in the Workflows APIs, see [Retrieving IDs](wix-workflows-v2/introduction#retrieving-ids).
1531
+ * @param - ID of the workflow to create the phase in.
1532
+ * @param - Phase details.
1533
+ * @param - Options to use when creating workflow phases.
1534
+ */
1535
+ (workflowId: string, phase: PhaseInfo$1, options?: CreatePhaseOptions | undefined): Promise<CreatePhaseResponse>;
1536
+ }
1537
+ declare function deletePhase$1(httpClient: HttpClient): DeletePhaseSignature;
1538
+ interface DeletePhaseSignature {
1539
+ /**
1540
+ * Deletes a workflow phase.
1541
+ *
1542
+ *
1543
+ * The `deletePhase()` function returns a Promise when the specified phase has been deleted.
1544
+ *
1545
+ *
1546
+ * This function requires you to specify the ID of a phase. To learn about retrieving IDs in the Workflows APIs, see [Retrieving IDs](wix-workflows-v2/introduction#retrieving-ids).
1547
+ * @param - ID of the phase to delete.
1548
+ */
1549
+ (_id: string): Promise<void>;
1550
+ }
1551
+ declare function movePhase$1(httpClient: HttpClient): MovePhaseSignature;
1552
+ interface MovePhaseSignature {
1553
+ /**
1554
+ * Moves a phase to a new position with a workflow.
1555
+ *
1556
+ *
1557
+ * The `movePhase()` function returns a Promise when the specified phase has been moved to the new position.
1558
+ *
1559
+ *
1560
+ * Use the `newPosition` parameter to specify the new phase position within the workflow. Any non-win phase can be moved to any non-win position. The win phase cannot be moved. Positions are zero-based, meaning the first position is `0`.
1561
+ *
1562
+ *
1563
+ * This function requires you to specify the ID of a phase. To learn about retrieving IDs in the Workflows APIs, see [Retrieving IDs](wix-workflows-v2/introduction#retrieving-ids).
1564
+ * @param - New phase position, where the first phase is `0`.
1565
+ *
1566
+ * If a phase already occupies the specified position,
1567
+ * that phase and any subsequent phases
1568
+ * are shifted to the right by 1.
1569
+ */
1570
+ (identifiers: MovePhaseIdentifiers, newPosition: number | null): Promise<void>;
469
1571
  }
470
1572
 
471
- declare function listPhases$1(httpClient: HttpClient$1): (workflowId: string, options?: ListPhasesOptions) => Promise<ListPhasesResponse & ListPhasesResponseNonNullableFields>;
472
- declare function getPhase$1(httpClient: HttpClient$1): (_id: string) => Promise<Phase$1 & {
473
- cardsList?: {
474
- total: number;
475
- cards: {
476
- info?: {
477
- primaryAttachment?: {
478
- attachmentId: string;
479
- value: string;
480
- attachmentType: AttachmentType$1;
481
- contactId: string;
482
- } | undefined;
483
- } | undefined;
484
- }[];
485
- } | undefined;
486
- }>;
487
- declare function updatePhase$1(httpClient: HttpClient$1): (_id: string, phase: PhaseInfo$1) => Promise<void>;
488
- declare function createPhase$1(httpClient: HttpClient$1): (workflowId: string, phase: PhaseInfo$1, options?: CreatePhaseOptions) => Promise<CreatePhaseResponse>;
489
- declare function deletePhase$1(httpClient: HttpClient$1): (_id: string) => Promise<void>;
490
- declare function movePhase$1(httpClient: HttpClient$1): (identifiers: MovePhaseIdentifiers, newPosition: number | null) => Promise<void>;
491
-
492
- declare const listPhases: BuildRESTFunction$1<typeof listPhases$1>;
493
- declare const getPhase: BuildRESTFunction$1<typeof getPhase$1>;
494
- declare const updatePhase: BuildRESTFunction$1<typeof updatePhase$1>;
495
- declare const createPhase: BuildRESTFunction$1<typeof createPhase$1>;
496
- declare const deletePhase: BuildRESTFunction$1<typeof deletePhase$1>;
497
- declare const movePhase: BuildRESTFunction$1<typeof movePhase$1>;
1573
+ declare const listPhases: MaybeContext<BuildRESTFunction<typeof listPhases$1> & typeof listPhases$1>;
1574
+ declare const getPhase: MaybeContext<BuildRESTFunction<typeof getPhase$1> & typeof getPhase$1>;
1575
+ declare const updatePhase: MaybeContext<BuildRESTFunction<typeof updatePhase$1> & typeof updatePhase$1>;
1576
+ declare const createPhase: MaybeContext<BuildRESTFunction<typeof createPhase$1> & typeof createPhase$1>;
1577
+ declare const deletePhase: MaybeContext<BuildRESTFunction<typeof deletePhase$1> & typeof deletePhase$1>;
1578
+ declare const movePhase: MaybeContext<BuildRESTFunction<typeof movePhase$1> & typeof movePhase$1>;
498
1579
 
1580
+ type context$1_CreatePhaseOptions = CreatePhaseOptions;
1581
+ type context$1_CreatePhaseRequest = CreatePhaseRequest;
1582
+ type context$1_CreatePhaseResponse = CreatePhaseResponse;
1583
+ type context$1_DeletePhaseRequest = DeletePhaseRequest;
1584
+ type context$1_DeletePhaseResponse = DeletePhaseResponse;
1585
+ type context$1_GetPhaseRequest = GetPhaseRequest;
1586
+ type context$1_GetPhaseResponse = GetPhaseResponse;
1587
+ type context$1_GetPhaseResponseNonNullableFields = GetPhaseResponseNonNullableFields;
1588
+ type context$1_ListPhasesOptions = ListPhasesOptions;
1589
+ type context$1_ListPhasesRequest = ListPhasesRequest;
1590
+ type context$1_ListPhasesResponse = ListPhasesResponse;
1591
+ type context$1_ListPhasesResponseNonNullableFields = ListPhasesResponseNonNullableFields;
1592
+ type context$1_MovePhaseIdentifiers = MovePhaseIdentifiers;
1593
+ type context$1_MovePhaseRequest = MovePhaseRequest;
1594
+ type context$1_MovePhaseResponse = MovePhaseResponse;
1595
+ type context$1_QueryPhasesRequest = QueryPhasesRequest;
1596
+ type context$1_QueryPhasesResponse = QueryPhasesResponse;
1597
+ type context$1_UpdatePhaseRequest = UpdatePhaseRequest;
1598
+ type context$1_UpdatePhaseResponse = UpdatePhaseResponse;
499
1599
  declare const context$1_createPhase: typeof createPhase;
500
1600
  declare const context$1_deletePhase: typeof deletePhase;
501
1601
  declare const context$1_getPhase: typeof getPhase;
@@ -503,7 +1603,7 @@ declare const context$1_listPhases: typeof listPhases;
503
1603
  declare const context$1_movePhase: typeof movePhase;
504
1604
  declare const context$1_updatePhase: typeof updatePhase;
505
1605
  declare namespace context$1 {
506
- export { context$1_createPhase as createPhase, context$1_deletePhase as deletePhase, context$1_getPhase as getPhase, context$1_listPhases as listPhases, context$1_movePhase as movePhase, context$1_updatePhase as updatePhase };
1606
+ export { type Attachment$1 as Attachment, AttachmentType$1 as AttachmentType, type Card$1 as Card, type CardInfo$1 as CardInfo, type CardsList$1 as CardsList, type context$1_CreatePhaseOptions as CreatePhaseOptions, type context$1_CreatePhaseRequest as CreatePhaseRequest, type context$1_CreatePhaseResponse as CreatePhaseResponse, type context$1_DeletePhaseRequest as DeletePhaseRequest, type context$1_DeletePhaseResponse as DeletePhaseResponse, type context$1_GetPhaseRequest as GetPhaseRequest, type context$1_GetPhaseResponse as GetPhaseResponse, type context$1_GetPhaseResponseNonNullableFields as GetPhaseResponseNonNullableFields, type context$1_ListPhasesOptions as ListPhasesOptions, type context$1_ListPhasesRequest as ListPhasesRequest, type context$1_ListPhasesResponse as ListPhasesResponse, type context$1_ListPhasesResponseNonNullableFields as ListPhasesResponseNonNullableFields, type context$1_MovePhaseIdentifiers as MovePhaseIdentifiers, type context$1_MovePhaseRequest as MovePhaseRequest, type context$1_MovePhaseResponse as MovePhaseResponse, type PaginationResponse$1 as PaginationResponse, type Paging$1 as Paging, type Phase$1 as Phase, type PhaseInfo$1 as PhaseInfo, type PhaseNonNullableFields$1 as PhaseNonNullableFields, type Query$1 as Query, type context$1_QueryPhasesRequest as QueryPhasesRequest, type context$1_QueryPhasesResponse as QueryPhasesResponse, SortOrder$1 as SortOrder, type Sorting$1 as Sorting, type context$1_UpdatePhaseRequest as UpdatePhaseRequest, type context$1_UpdatePhaseResponse as UpdatePhaseResponse, context$1_createPhase as createPhase, context$1_deletePhase as deletePhase, context$1_getPhase as getPhase, context$1_listPhases as listPhases, context$1_movePhase as movePhase, context$1_updatePhase as updatePhase };
507
1607
  }
508
1608
 
509
1609
  interface Workflow {
@@ -540,7 +1640,7 @@ interface WorkflowInfo {
540
1640
  * @readonly
541
1641
  * @deprecated
542
1642
  */
543
- createdAt?: Date;
1643
+ createdAt?: Date | null;
544
1644
  /**
545
1645
  * Indicates whether the workflow can be deleted.
546
1646
  * @readonly
@@ -551,7 +1651,7 @@ interface WorkflowInfo {
551
1651
  * Date and time the workflow was created.
552
1652
  * @readonly
553
1653
  */
554
- _createdDate?: Date;
1654
+ _createdDate?: Date | null;
555
1655
  }
556
1656
  interface Phase {
557
1657
  /** Phase information. */
@@ -596,7 +1696,7 @@ interface CardInfo {
596
1696
  /** Details about the contact attached to the card. */
597
1697
  primaryAttachment?: Attachment;
598
1698
  /** Due date. */
599
- dueDate?: Date;
1699
+ dueDate?: Date | null;
600
1700
  /** Name of the app or service that created the contact. */
601
1701
  source?: string | null;
602
1702
  /**
@@ -605,14 +1705,14 @@ interface CardInfo {
605
1705
  * @readonly
606
1706
  * @deprecated
607
1707
  */
608
- createdAt?: Date;
1708
+ createdAt?: Date | null;
609
1709
  /**
610
1710
  * @internal
611
1711
  * @internal
612
1712
  * @readonly
613
1713
  * @deprecated
614
1714
  */
615
- updatedAt?: Date;
1715
+ updatedAt?: Date | null;
616
1716
  /**
617
1717
  * ID of the phase that currently holds the card.
618
1718
  * @readonly
@@ -622,12 +1722,12 @@ interface CardInfo {
622
1722
  * Date and time the card was created.
623
1723
  * @readonly
624
1724
  */
625
- _createdDate?: Date;
1725
+ _createdDate?: Date | null;
626
1726
  /**
627
1727
  * Date and time the card was updated.
628
1728
  * @readonly
629
1729
  */
630
- _updatedDate?: Date;
1730
+ _updatedDate?: Date | null;
631
1731
  }
632
1732
  interface Attachment {
633
1733
  /**
@@ -664,6 +1764,31 @@ interface PhasesList {
664
1764
  */
665
1765
  phases?: Phase[];
666
1766
  }
1767
+ interface ListWorkflowsRequest {
1768
+ /**
1769
+ * Number of workflows to return.
1770
+ * If omitted, all results are returned.
1771
+ */
1772
+ limit?: number | null;
1773
+ /**
1774
+ * Number of items to skip in the current sort order.
1775
+ *
1776
+ * Defaults to `0`.
1777
+ */
1778
+ offset?: number | null;
1779
+ /**
1780
+ * Supported fields:
1781
+ * `id`, `name`, `description`, `createdDate`
1782
+ *
1783
+ * List of fields to sort by.
1784
+ * Formatted as `field:direction`,
1785
+ * where field is the field name
1786
+ * and direction is `asc` (ascending) or `desc` (descending).
1787
+ *
1788
+ * Sorting is applied lexicographically, so `"abc"` comes after `"XYZ"`.
1789
+ */
1790
+ sort?: string[];
1791
+ }
667
1792
  interface ListWorkflowsResponse {
668
1793
  /** Retrieved list of workflows. */
669
1794
  workflows?: WorkflowInfo[];
@@ -678,17 +1803,133 @@ interface PaginationResponse {
678
1803
  /** Number of returned items. */
679
1804
  count?: number;
680
1805
  }
1806
+ interface QueryWorkflowsRequest {
1807
+ /** Query options. */
1808
+ query?: Query;
1809
+ }
1810
+ interface Query {
1811
+ /**
1812
+ * Filter object in the following format:
1813
+ * `"filter" : {
1814
+ * "fieldName1": "value1",
1815
+ * "fieldName2":{"$operator":"value2"}
1816
+ * }`
1817
+ * Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`
1818
+ */
1819
+ filter?: any;
1820
+ /**
1821
+ * Sort object in the following format:
1822
+ * `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]`
1823
+ */
1824
+ sort?: Sorting[];
1825
+ /** Paging options to limit and skip the number of items. */
1826
+ paging?: Paging;
1827
+ /** 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. */
1828
+ fields?: string[];
1829
+ /** 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. */
1830
+ fieldsets?: string[];
1831
+ }
1832
+ interface Sorting {
1833
+ /** Name of the field to sort by. */
1834
+ fieldName?: string;
1835
+ /** Sort order. */
1836
+ order?: SortOrder;
1837
+ }
1838
+ declare enum SortOrder {
1839
+ ASC = "ASC",
1840
+ DESC = "DESC"
1841
+ }
1842
+ interface Paging {
1843
+ /** Number of items to load. */
1844
+ limit?: number | null;
1845
+ /** Number of items to skip in the current sort order. */
1846
+ offset?: number | null;
1847
+ }
1848
+ interface QueryWorkflowsResponse {
1849
+ /** List of workflows that matched the query. */
1850
+ workflows?: Workflow[];
1851
+ /** Metadata for the paginated results. */
1852
+ pagination?: PaginationResponse;
1853
+ }
1854
+ interface GetWorkflowRequest {
1855
+ /** ID of the workflow to retrieve. */
1856
+ _id: string;
1857
+ /**
1858
+ * Maximum number of cards to return per phase.
1859
+ * To retrieve additional pages of cards, use
1860
+ * [List Cards](../cards/listCards)
1861
+ * (in the Cards API).
1862
+ */
1863
+ cardsPerPhase?: number | null;
1864
+ }
1865
+ interface GetWorkflowResponse {
1866
+ /** Requested workflow. */
1867
+ workflow?: Workflow;
1868
+ }
1869
+ interface UpdateWorkflowRequest {
1870
+ /** ID of the workflow to update. */
1871
+ _id: string;
1872
+ /** Workflow info. */
1873
+ workflow?: WorkflowInfo;
1874
+ }
1875
+ interface UpdateWorkflowResponse {
1876
+ }
1877
+ interface CreateWorkflowRequest {
1878
+ /** Workflow details. */
1879
+ workflow?: WorkflowInfo;
1880
+ }
681
1881
  interface CreateWorkflowResponse {
682
1882
  /** ID of the new workflow. */
683
1883
  _id?: string | null;
684
1884
  }
1885
+ interface DeleteWorkflowRequest {
1886
+ /** ID of the workflow to delete. */
1887
+ _id: string;
1888
+ }
1889
+ interface DeleteWorkflowResponse {
1890
+ }
1891
+ interface SetupWorkflowRequest {
1892
+ }
1893
+ interface SetupWorkflowResponse {
1894
+ }
1895
+ interface PaginationResponseNonNullableFields {
1896
+ offset: number;
1897
+ limit: number;
1898
+ total: number;
1899
+ count: number;
1900
+ }
685
1901
  interface ListWorkflowsResponseNonNullableFields {
686
- workflows: WorkflowInfo[];
687
- pagination?: {
688
- offset: number;
689
- total: number;
690
- count: number;
691
- };
1902
+ pagination?: PaginationResponseNonNullableFields;
1903
+ }
1904
+ interface AttachmentNonNullableFields {
1905
+ attachmentId: string;
1906
+ value: string;
1907
+ attachmentType: AttachmentType;
1908
+ contactId: string;
1909
+ }
1910
+ interface CardInfoNonNullableFields {
1911
+ primaryAttachment?: AttachmentNonNullableFields;
1912
+ }
1913
+ interface CardNonNullableFields {
1914
+ info?: CardInfoNonNullableFields;
1915
+ }
1916
+ interface CardsListNonNullableFields {
1917
+ total: number;
1918
+ cards: CardNonNullableFields[];
1919
+ }
1920
+ interface PhaseNonNullableFields {
1921
+ cardsList?: CardsListNonNullableFields;
1922
+ }
1923
+ interface PhasesListNonNullableFields {
1924
+ total: number;
1925
+ phases: PhaseNonNullableFields[];
1926
+ }
1927
+ interface WorkflowNonNullableFields {
1928
+ winPhase?: PhaseNonNullableFields;
1929
+ phasesList?: PhasesListNonNullableFields;
1930
+ }
1931
+ interface GetWorkflowResponseNonNullableFields {
1932
+ workflow?: WorkflowNonNullableFields;
692
1933
  }
693
1934
  interface ListWorkflowsOptions {
694
1935
  /**
@@ -716,92 +1957,137 @@ interface ListWorkflowsOptions {
716
1957
  sort?: string[];
717
1958
  }
718
1959
 
719
- type RESTFunctionDescriptor<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient) => T;
720
- interface HttpClient {
721
- request<TResponse, TData = any>(req: RequestOptionsFactory<TResponse, TData>): Promise<HttpResponse<TResponse>>;
722
- fetchWithAuth: (url: string | URL, init?: RequestInit) => Promise<Response>;
1960
+ declare function listWorkflows$1(httpClient: HttpClient): ListWorkflowsSignature;
1961
+ interface ListWorkflowsSignature {
1962
+ /**
1963
+ * Retrieves a list of the site's workflows info.
1964
+ *
1965
+ *
1966
+ * The `listWorkflows()` function returns a Promise that resolves to a list containing information about the site's workflows.
1967
+ *
1968
+ *
1969
+ * Use the `options` parameter to specify which workflows to retrieve and in which order to retrieve them. Workflows can be sorted based on their `"name"`.
1970
+ *
1971
+ *
1972
+ * If no `limit` parameter is passed, the first 100 workflows are returned. Sort order defaults to by `"name"` ascending.
1973
+ * @param - Options to use when retrieving a list of workflows.
1974
+ */
1975
+ (options?: ListWorkflowsOptions | undefined): Promise<ListWorkflowsResponse & ListWorkflowsResponseNonNullableFields>;
723
1976
  }
724
- type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
725
- type HttpResponse<T = any> = {
726
- data: T;
727
- status: number;
728
- statusText: string;
729
- headers: any;
730
- request?: any;
731
- };
732
- type RequestOptions<_TResponse = any, Data = any> = {
733
- method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
734
- url: string;
735
- data?: Data;
736
- params?: URLSearchParams;
737
- } & APIMetadata;
738
- type APIMetadata = {
739
- methodFqn?: string;
740
- entityFqdn?: string;
741
- packageName?: string;
742
- };
743
- type BuildRESTFunction<T extends RESTFunctionDescriptor> = T extends RESTFunctionDescriptor<infer U> ? U : never;
744
-
745
- declare global {
746
- // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
747
- interface SymbolConstructor {
748
- readonly observable: symbol;
749
- }
1977
+ declare function getWorkflow$1(httpClient: HttpClient): GetWorkflowSignature;
1978
+ interface GetWorkflowSignature {
1979
+ /**
1980
+ * Retrieves a workflow by ID.
1981
+ *
1982
+ *
1983
+ * The `getWorkflow()` function returns a Promise that resolves to the workflow info with the specified ID.
1984
+ *
1985
+ *
1986
+ * This function requires you to specify the ID of a workflow. To learn about retrieving IDs in the Workflows APIs, see [Retrieving IDs](wix-workflows-v2/introduction#retrieving-ids).
1987
+ * @param - ID of the workflow to retrieve.
1988
+ * @param - Maximum number of cards to return per phase.
1989
+ * To retrieve additional pages of cards, use
1990
+ * [List Cards](../cards/listCards)
1991
+ * (in the Cards API).
1992
+ * @param - Options to use when retrieving a workflow.
1993
+ * @returns Requested workflow.
1994
+ */
1995
+ (_id: string, cardsPerPhase: number | null): Promise<Workflow & WorkflowNonNullableFields>;
1996
+ }
1997
+ declare function updateWorkflow$1(httpClient: HttpClient): UpdateWorkflowSignature;
1998
+ interface UpdateWorkflowSignature {
1999
+ /**
2000
+ * Updates an existing workflow.
2001
+ *
2002
+ *
2003
+ * The `updateWorkflow()` function returns a Promise that resolves when the workflow has been updated with the specified values.
2004
+ *
2005
+ *
2006
+ * Only the properties passed in the `workflow` object will be updated. All other properties will remain the same.
2007
+ *
2008
+ *
2009
+ * This function requires you to specify the ID of a workflow. To learn about retrieving IDs in the Workflow API, see [Retrieving IDs](#retrieving-ids).
2010
+ * @param - ID of the workflow to update.
2011
+ * @param - Workflow info.
2012
+ * @param - Options to use when updating a workflow.
2013
+ */
2014
+ (_id: string, workflow: WorkflowInfo): Promise<void>;
2015
+ }
2016
+ declare function createWorkflow$1(httpClient: HttpClient): CreateWorkflowSignature;
2017
+ interface CreateWorkflowSignature {
2018
+ /**
2019
+ * Creates a new workflow.
2020
+ *
2021
+ *
2022
+ * The `createWorkflow()` function returns a Promise that resolves to the created workflow ID.
2023
+ * @param - Workflow details.
2024
+ * @param - Options to use when creating a workflow.
2025
+ */
2026
+ (workflow: WorkflowInfo): Promise<CreateWorkflowResponse>;
2027
+ }
2028
+ declare function deleteWorkflow$1(httpClient: HttpClient): DeleteWorkflowSignature;
2029
+ interface DeleteWorkflowSignature {
2030
+ /**
2031
+ * Deletes a workflow.
2032
+ *
2033
+ *
2034
+ * The `deleteWorkflow()` function returns a Promise when the specified workflow has been deleted.
2035
+ *
2036
+ *
2037
+ * This function requires you to specify the ID of a workflow. To learn about retrieving IDs in the Workflows APIs, see [Retrieving IDs](wix-workflows-v2/introduction#retrieving-ids).
2038
+ * @param - ID of the workflow to delete.
2039
+ */
2040
+ (_id: string): Promise<void>;
750
2041
  }
751
2042
 
752
- declare function listWorkflows$1(httpClient: HttpClient): (options?: ListWorkflowsOptions) => Promise<ListWorkflowsResponse & ListWorkflowsResponseNonNullableFields>;
753
- declare function getWorkflow$1(httpClient: HttpClient): (_id: string, cardsPerPhase: number | null) => Promise<Workflow & {
754
- winPhase?: {
755
- cardsList?: {
756
- total: number;
757
- cards: {
758
- info?: {
759
- primaryAttachment?: {
760
- attachmentId: string;
761
- value: string;
762
- attachmentType: AttachmentType;
763
- contactId: string;
764
- } | undefined;
765
- } | undefined;
766
- }[];
767
- } | undefined;
768
- } | undefined;
769
- phasesList?: {
770
- total: number;
771
- phases: {
772
- cardsList?: {
773
- total: number;
774
- cards: {
775
- info?: {
776
- primaryAttachment?: {
777
- attachmentId: string;
778
- value: string;
779
- attachmentType: AttachmentType;
780
- contactId: string;
781
- } | undefined;
782
- } | undefined;
783
- }[];
784
- } | undefined;
785
- }[];
786
- } | undefined;
787
- }>;
788
- declare function updateWorkflow$1(httpClient: HttpClient): (_id: string, workflow: WorkflowInfo) => Promise<void>;
789
- declare function createWorkflow$1(httpClient: HttpClient): (workflow: WorkflowInfo) => Promise<CreateWorkflowResponse>;
790
- declare function deleteWorkflow$1(httpClient: HttpClient): (_id: string) => Promise<void>;
791
-
792
- declare const listWorkflows: BuildRESTFunction<typeof listWorkflows$1>;
793
- declare const getWorkflow: BuildRESTFunction<typeof getWorkflow$1>;
794
- declare const updateWorkflow: BuildRESTFunction<typeof updateWorkflow$1>;
795
- declare const createWorkflow: BuildRESTFunction<typeof createWorkflow$1>;
796
- declare const deleteWorkflow: BuildRESTFunction<typeof deleteWorkflow$1>;
2043
+ declare const listWorkflows: MaybeContext<BuildRESTFunction<typeof listWorkflows$1> & typeof listWorkflows$1>;
2044
+ declare const getWorkflow: MaybeContext<BuildRESTFunction<typeof getWorkflow$1> & typeof getWorkflow$1>;
2045
+ declare const updateWorkflow: MaybeContext<BuildRESTFunction<typeof updateWorkflow$1> & typeof updateWorkflow$1>;
2046
+ declare const createWorkflow: MaybeContext<BuildRESTFunction<typeof createWorkflow$1> & typeof createWorkflow$1>;
2047
+ declare const deleteWorkflow: MaybeContext<BuildRESTFunction<typeof deleteWorkflow$1> & typeof deleteWorkflow$1>;
797
2048
 
2049
+ type context_Attachment = Attachment;
2050
+ type context_AttachmentType = AttachmentType;
2051
+ declare const context_AttachmentType: typeof AttachmentType;
2052
+ type context_Card = Card;
2053
+ type context_CardInfo = CardInfo;
2054
+ type context_CardsList = CardsList;
2055
+ type context_CreateWorkflowRequest = CreateWorkflowRequest;
2056
+ type context_CreateWorkflowResponse = CreateWorkflowResponse;
2057
+ type context_DeleteWorkflowRequest = DeleteWorkflowRequest;
2058
+ type context_DeleteWorkflowResponse = DeleteWorkflowResponse;
2059
+ type context_GetWorkflowRequest = GetWorkflowRequest;
2060
+ type context_GetWorkflowResponse = GetWorkflowResponse;
2061
+ type context_GetWorkflowResponseNonNullableFields = GetWorkflowResponseNonNullableFields;
2062
+ type context_ListWorkflowsOptions = ListWorkflowsOptions;
2063
+ type context_ListWorkflowsRequest = ListWorkflowsRequest;
2064
+ type context_ListWorkflowsResponse = ListWorkflowsResponse;
2065
+ type context_ListWorkflowsResponseNonNullableFields = ListWorkflowsResponseNonNullableFields;
2066
+ type context_PaginationResponse = PaginationResponse;
2067
+ type context_Paging = Paging;
2068
+ type context_Phase = Phase;
2069
+ type context_PhaseInfo = PhaseInfo;
2070
+ type context_PhasesList = PhasesList;
2071
+ type context_Query = Query;
2072
+ type context_QueryWorkflowsRequest = QueryWorkflowsRequest;
2073
+ type context_QueryWorkflowsResponse = QueryWorkflowsResponse;
2074
+ type context_SetupWorkflowRequest = SetupWorkflowRequest;
2075
+ type context_SetupWorkflowResponse = SetupWorkflowResponse;
2076
+ type context_SortOrder = SortOrder;
2077
+ declare const context_SortOrder: typeof SortOrder;
2078
+ type context_Sorting = Sorting;
2079
+ type context_UpdateWorkflowRequest = UpdateWorkflowRequest;
2080
+ type context_UpdateWorkflowResponse = UpdateWorkflowResponse;
2081
+ type context_Workflow = Workflow;
2082
+ type context_WorkflowInfo = WorkflowInfo;
2083
+ type context_WorkflowNonNullableFields = WorkflowNonNullableFields;
798
2084
  declare const context_createWorkflow: typeof createWorkflow;
799
2085
  declare const context_deleteWorkflow: typeof deleteWorkflow;
800
2086
  declare const context_getWorkflow: typeof getWorkflow;
801
2087
  declare const context_listWorkflows: typeof listWorkflows;
802
2088
  declare const context_updateWorkflow: typeof updateWorkflow;
803
2089
  declare namespace context {
804
- export { context_createWorkflow as createWorkflow, context_deleteWorkflow as deleteWorkflow, context_getWorkflow as getWorkflow, context_listWorkflows as listWorkflows, context_updateWorkflow as updateWorkflow };
2090
+ export { type context_Attachment as Attachment, context_AttachmentType as AttachmentType, type context_Card as Card, type context_CardInfo as CardInfo, type context_CardsList as CardsList, type context_CreateWorkflowRequest as CreateWorkflowRequest, type context_CreateWorkflowResponse as CreateWorkflowResponse, type context_DeleteWorkflowRequest as DeleteWorkflowRequest, type context_DeleteWorkflowResponse as DeleteWorkflowResponse, type context_GetWorkflowRequest as GetWorkflowRequest, type context_GetWorkflowResponse as GetWorkflowResponse, type context_GetWorkflowResponseNonNullableFields as GetWorkflowResponseNonNullableFields, type context_ListWorkflowsOptions as ListWorkflowsOptions, type context_ListWorkflowsRequest as ListWorkflowsRequest, type context_ListWorkflowsResponse as ListWorkflowsResponse, type context_ListWorkflowsResponseNonNullableFields as ListWorkflowsResponseNonNullableFields, type context_PaginationResponse as PaginationResponse, type context_Paging as Paging, type context_Phase as Phase, type context_PhaseInfo as PhaseInfo, type context_PhasesList as PhasesList, type context_Query as Query, type context_QueryWorkflowsRequest as QueryWorkflowsRequest, type context_QueryWorkflowsResponse as QueryWorkflowsResponse, type context_SetupWorkflowRequest as SetupWorkflowRequest, type context_SetupWorkflowResponse as SetupWorkflowResponse, context_SortOrder as SortOrder, type context_Sorting as Sorting, type context_UpdateWorkflowRequest as UpdateWorkflowRequest, type context_UpdateWorkflowResponse as UpdateWorkflowResponse, type context_Workflow as Workflow, type context_WorkflowInfo as WorkflowInfo, type context_WorkflowNonNullableFields as WorkflowNonNullableFields, context_createWorkflow as createWorkflow, context_deleteWorkflow as deleteWorkflow, context_getWorkflow as getWorkflow, context_listWorkflows as listWorkflows, context_updateWorkflow as updateWorkflow };
805
2091
  }
806
2092
 
807
2093
  export { context$2 as cards, context$1 as phases, context as workflows };