@wix/workflows 1.0.31 → 1.0.33

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
  /**
@@ -274,7 +752,7 @@ interface DomainEvent extends DomainEventBodyOneOf {
274
752
  /** ID of the entity associated with the event. */
275
753
  entityId?: string;
276
754
  /** Event timestamp. */
277
- eventTime?: Date;
755
+ eventTime?: Date | null;
278
756
  /**
279
757
  * Whether the event was triggered as a result of a privacy regulation application
280
758
  * (for example, GDPR).
@@ -357,34 +835,30 @@ declare enum WebhookIdentityType {
357
835
  WIX_USER = "WIX_USER",
358
836
  APP = "APP"
359
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
+ }
360
856
  interface ListCardsResponseNonNullableFields {
361
- cards: {
362
- info?: {
363
- primaryAttachment?: {
364
- attachmentId: string;
365
- value: string;
366
- attachmentType: AttachmentType$2;
367
- contactId: string;
368
- };
369
- };
370
- }[];
371
- pagination?: {
372
- offset: number;
373
- total: number;
374
- count: number;
375
- };
857
+ cards: CardNonNullableFields$2[];
858
+ pagination?: PaginationResponseNonNullableFields$2;
376
859
  }
377
860
  interface GetCardResponseNonNullableFields {
378
- card?: {
379
- info?: {
380
- primaryAttachment?: {
381
- attachmentId: string;
382
- value: string;
383
- attachmentType: AttachmentType$2;
384
- contactId: string;
385
- };
386
- };
387
- };
861
+ card?: CardNonNullableFields$2;
388
862
  }
389
863
  interface ListCardsOptions {
390
864
  /** Filters for cards in the specified phase. */
@@ -457,57 +931,167 @@ interface RestoreCardOptions {
457
931
  newPosition?: number | null;
458
932
  }
459
933
 
460
- interface HttpClient$2 {
461
- request<TResponse, TData = any>(req: RequestOptionsFactory$2<TResponse, TData>): Promise<HttpResponse$2<TResponse>>;
462
- 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>;
463
960
  }
464
- type RequestOptionsFactory$2<TResponse = any, TData = any> = (context: any) => RequestOptions$2<TResponse, TData>;
465
- type HttpResponse$2<T = any> = {
466
- data: T;
467
- status: number;
468
- statusText: string;
469
- headers: any;
470
- request?: any;
471
- };
472
- type RequestOptions$2<_TResponse = any, Data = any> = {
473
- method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
474
- url: string;
475
- data?: Data;
476
- params?: URLSearchParams;
477
- } & APIMetadata$2;
478
- type APIMetadata$2 = {
479
- methodFqn?: string;
480
- entityFqdn?: string;
481
- packageName?: string;
482
- };
483
-
484
- declare global {
485
- // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
486
- interface SymbolConstructor {
487
- readonly observable: symbol;
488
- }
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>;
489
1085
  }
490
1086
 
491
- declare const __metadata$2: {
492
- PACKAGE_NAME: string;
493
- };
494
- declare function listCards(httpClient: HttpClient$2): (workflowId: string, options?: ListCardsOptions) => Promise<ListCardsResponse & ListCardsResponseNonNullableFields>;
495
- declare function getCard(httpClient: HttpClient$2): (_id: string) => Promise<Card$2 & {
496
- info?: {
497
- primaryAttachment?: {
498
- attachmentId: string;
499
- value: string;
500
- attachmentType: AttachmentType$2;
501
- contactId: string;
502
- } | undefined;
503
- } | undefined;
504
- }>;
505
- declare function updateCard(httpClient: HttpClient$2): (_id: string, cardInfo: CardInfo$2) => Promise<void>;
506
- declare function createCard(httpClient: HttpClient$2): (identifiers: CreateCardIdentifiers, card: CardInfo$2, options?: CreateCardOptions) => Promise<CreateCardResponse>;
507
- declare function deleteCard(httpClient: HttpClient$2): (_id: string) => Promise<void>;
508
- declare function moveCard(httpClient: HttpClient$2): (_id: string, options?: MoveCardOptions) => Promise<void>;
509
- declare function restoreCard(httpClient: HttpClient$2): (_id: string, newPhaseId: string, options?: RestoreCardOptions) => Promise<void>;
510
- declare function archiveCard(httpClient: HttpClient$2): (_id: string) => Promise<void>;
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>;
511
1095
 
512
1096
  type index_d$2_ActionEvent = ActionEvent;
513
1097
  type index_d$2_ArchiveCardRequest = ArchiveCardRequest;
@@ -554,7 +1138,7 @@ declare const index_d$2_moveCard: typeof moveCard;
554
1138
  declare const index_d$2_restoreCard: typeof restoreCard;
555
1139
  declare const index_d$2_updateCard: typeof updateCard;
556
1140
  declare namespace index_d$2 {
557
- export { type index_d$2_ActionEvent as ActionEvent, type index_d$2_ArchiveCardRequest as ArchiveCardRequest, type index_d$2_ArchiveCardResponse as ArchiveCardResponse, type Attachment$2 as Attachment, AttachmentType$2 as AttachmentType, type Card$2 as Card, type CardInfo$2 as CardInfo, type index_d$2_CreateCardIdentifiers as CreateCardIdentifiers, type index_d$2_CreateCardOptions as CreateCardOptions, type index_d$2_CreateCardRequest as CreateCardRequest, type index_d$2_CreateCardResponse as CreateCardResponse, type index_d$2_DeleteCardRequest as DeleteCardRequest, type index_d$2_DeleteCardResponse as DeleteCardResponse, type index_d$2_DomainEvent as DomainEvent, type index_d$2_DomainEventBodyOneOf as DomainEventBodyOneOf, type index_d$2_EntityCreatedEvent as EntityCreatedEvent, type index_d$2_EntityDeletedEvent as EntityDeletedEvent, type index_d$2_EntityUpdatedEvent as EntityUpdatedEvent, type index_d$2_GetCardRequest as GetCardRequest, type index_d$2_GetCardResponse as GetCardResponse, type index_d$2_GetCardResponseNonNullableFields as GetCardResponseNonNullableFields, type index_d$2_IdentificationData as IdentificationData, type index_d$2_IdentificationDataIdOneOf as IdentificationDataIdOneOf, type index_d$2_ListCardsOptions as ListCardsOptions, type index_d$2_ListCardsRequest as ListCardsRequest, type index_d$2_ListCardsResponse as ListCardsResponse, type index_d$2_ListCardsResponseNonNullableFields as ListCardsResponseNonNullableFields, type index_d$2_MessageEnvelope as MessageEnvelope, type index_d$2_MoveCardOptions as MoveCardOptions, type index_d$2_MoveCardRequest as MoveCardRequest, type index_d$2_MoveCardResponse as MoveCardResponse, type PaginationResponse$2 as PaginationResponse, type Paging$2 as Paging, type Query$2 as Query, type index_d$2_QueryCardsRequest as QueryCardsRequest, type index_d$2_QueryCardsResponse as QueryCardsResponse, type index_d$2_RestoreCardOptions as RestoreCardOptions, type index_d$2_RestoreCardRequest as RestoreCardRequest, type index_d$2_RestoreCardResponse as RestoreCardResponse, SortOrder$2 as SortOrder, type Sorting$2 as Sorting, type index_d$2_UpdateCardRequest as UpdateCardRequest, type index_d$2_UpdateCardResponse as UpdateCardResponse, index_d$2_WebhookIdentityType as WebhookIdentityType, __metadata$2 as __metadata, index_d$2_archiveCard as archiveCard, index_d$2_createCard as createCard, index_d$2_deleteCard as deleteCard, index_d$2_getCard as getCard, index_d$2_listCards as listCards, index_d$2_moveCard as moveCard, index_d$2_restoreCard as restoreCard, index_d$2_updateCard as updateCard };
1141
+ export { type index_d$2_ActionEvent as ActionEvent, type index_d$2_ArchiveCardRequest as ArchiveCardRequest, type index_d$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 index_d$2_CreateCardIdentifiers as CreateCardIdentifiers, type index_d$2_CreateCardOptions as CreateCardOptions, type index_d$2_CreateCardRequest as CreateCardRequest, type index_d$2_CreateCardResponse as CreateCardResponse, type index_d$2_DeleteCardRequest as DeleteCardRequest, type index_d$2_DeleteCardResponse as DeleteCardResponse, type index_d$2_DomainEvent as DomainEvent, type index_d$2_DomainEventBodyOneOf as DomainEventBodyOneOf, type index_d$2_EntityCreatedEvent as EntityCreatedEvent, type index_d$2_EntityDeletedEvent as EntityDeletedEvent, type index_d$2_EntityUpdatedEvent as EntityUpdatedEvent, type index_d$2_GetCardRequest as GetCardRequest, type index_d$2_GetCardResponse as GetCardResponse, type index_d$2_GetCardResponseNonNullableFields as GetCardResponseNonNullableFields, type index_d$2_IdentificationData as IdentificationData, type index_d$2_IdentificationDataIdOneOf as IdentificationDataIdOneOf, type index_d$2_ListCardsOptions as ListCardsOptions, type index_d$2_ListCardsRequest as ListCardsRequest, type index_d$2_ListCardsResponse as ListCardsResponse, type index_d$2_ListCardsResponseNonNullableFields as ListCardsResponseNonNullableFields, type index_d$2_MessageEnvelope as MessageEnvelope, type index_d$2_MoveCardOptions as MoveCardOptions, type index_d$2_MoveCardRequest as MoveCardRequest, type index_d$2_MoveCardResponse as MoveCardResponse, type PaginationResponse$2 as PaginationResponse, type Paging$2 as Paging, type Query$2 as Query, type index_d$2_QueryCardsRequest as QueryCardsRequest, type index_d$2_QueryCardsResponse as QueryCardsResponse, type index_d$2_RestoreCardOptions as RestoreCardOptions, type index_d$2_RestoreCardRequest as RestoreCardRequest, type index_d$2_RestoreCardResponse as RestoreCardResponse, SortOrder$2 as SortOrder, type Sorting$2 as Sorting, type index_d$2_UpdateCardRequest as UpdateCardRequest, type index_d$2_UpdateCardResponse as UpdateCardResponse, index_d$2_WebhookIdentityType as WebhookIdentityType, index_d$2_archiveCard as archiveCard, index_d$2_createCard as createCard, index_d$2_deleteCard as deleteCard, index_d$2_getCard as getCard, index_d$2_listCards as listCards, index_d$2_moveCard as moveCard, index_d$2_restoreCard as restoreCard, index_d$2_updateCard as updateCard };
558
1142
  }
559
1143
 
560
1144
  interface Phase$1 {
@@ -600,7 +1184,7 @@ interface CardInfo$1 {
600
1184
  /** Details about the contact attached to the card. */
601
1185
  primaryAttachment?: Attachment$1;
602
1186
  /** Due date. */
603
- dueDate?: Date;
1187
+ dueDate?: Date | null;
604
1188
  /** Name of the app or service that created the contact. */
605
1189
  source?: string | null;
606
1190
  /**
@@ -609,14 +1193,14 @@ interface CardInfo$1 {
609
1193
  * @readonly
610
1194
  * @deprecated
611
1195
  */
612
- createdAt?: Date;
1196
+ createdAt?: Date | null;
613
1197
  /**
614
1198
  * @internal
615
1199
  * @internal
616
1200
  * @readonly
617
1201
  * @deprecated
618
1202
  */
619
- updatedAt?: Date;
1203
+ updatedAt?: Date | null;
620
1204
  /**
621
1205
  * ID of the phase that currently holds the card.
622
1206
  * @readonly
@@ -626,12 +1210,12 @@ interface CardInfo$1 {
626
1210
  * Date and time the card was created.
627
1211
  * @readonly
628
1212
  */
629
- _createdDate?: Date;
1213
+ _createdDate?: Date | null;
630
1214
  /**
631
1215
  * Date and time the card was updated.
632
1216
  * @readonly
633
1217
  */
634
- _updatedDate?: Date;
1218
+ _updatedDate?: Date | null;
635
1219
  }
636
1220
  interface Attachment$1 {
637
1221
  /**
@@ -803,44 +1387,37 @@ interface MovePhaseRequest {
803
1387
  }
804
1388
  interface MovePhaseResponse {
805
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
+ }
806
1415
  interface ListPhasesResponseNonNullableFields {
807
- phases: {
808
- cardsList?: {
809
- total: number;
810
- cards: {
811
- info?: {
812
- primaryAttachment?: {
813
- attachmentId: string;
814
- value: string;
815
- attachmentType: AttachmentType$1;
816
- contactId: string;
817
- };
818
- };
819
- }[];
820
- };
821
- }[];
822
- pagination?: {
823
- offset: number;
824
- total: number;
825
- count: number;
826
- };
1416
+ phases: PhaseNonNullableFields$1[];
1417
+ pagination?: PaginationResponseNonNullableFields$1;
827
1418
  }
828
1419
  interface GetPhaseResponseNonNullableFields {
829
- phase?: {
830
- cardsList?: {
831
- total: number;
832
- cards: {
833
- info?: {
834
- primaryAttachment?: {
835
- attachmentId: string;
836
- value: string;
837
- attachmentType: AttachmentType$1;
838
- contactId: string;
839
- };
840
- };
841
- }[];
842
- };
843
- };
1420
+ phase?: PhaseNonNullableFields$1;
844
1421
  }
845
1422
  interface ListPhasesOptions {
846
1423
  /** Number of items to return. */
@@ -884,60 +1461,121 @@ interface MovePhaseIdentifiers {
884
1461
  _id: string;
885
1462
  }
886
1463
 
887
- interface HttpClient$1 {
888
- request<TResponse, TData = any>(req: RequestOptionsFactory$1<TResponse, TData>): Promise<HttpResponse$1<TResponse>>;
889
- 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>;
890
1481
  }
891
- type RequestOptionsFactory$1<TResponse = any, TData = any> = (context: any) => RequestOptions$1<TResponse, TData>;
892
- type HttpResponse$1<T = any> = {
893
- data: T;
894
- status: number;
895
- statusText: string;
896
- headers: any;
897
- request?: any;
898
- };
899
- type RequestOptions$1<_TResponse = any, Data = any> = {
900
- method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
901
- url: string;
902
- data?: Data;
903
- params?: URLSearchParams;
904
- } & APIMetadata$1;
905
- type APIMetadata$1 = {
906
- methodFqn?: string;
907
- entityFqdn?: string;
908
- packageName?: string;
909
- };
910
-
911
- declare global {
912
- // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
913
- interface SymbolConstructor {
914
- readonly observable: symbol;
915
- }
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>;
916
1571
  }
917
1572
 
918
- declare const __metadata$1: {
919
- PACKAGE_NAME: string;
920
- };
921
- declare function listPhases(httpClient: HttpClient$1): (workflowId: string, options?: ListPhasesOptions) => Promise<ListPhasesResponse & ListPhasesResponseNonNullableFields>;
922
- declare function getPhase(httpClient: HttpClient$1): (_id: string) => Promise<Phase$1 & {
923
- cardsList?: {
924
- total: number;
925
- cards: {
926
- info?: {
927
- primaryAttachment?: {
928
- attachmentId: string;
929
- value: string;
930
- attachmentType: AttachmentType$1;
931
- contactId: string;
932
- } | undefined;
933
- } | undefined;
934
- }[];
935
- } | undefined;
936
- }>;
937
- declare function updatePhase(httpClient: HttpClient$1): (_id: string, phase: PhaseInfo$1) => Promise<void>;
938
- declare function createPhase(httpClient: HttpClient$1): (workflowId: string, phase: PhaseInfo$1, options?: CreatePhaseOptions) => Promise<CreatePhaseResponse>;
939
- declare function deletePhase(httpClient: HttpClient$1): (_id: string) => Promise<void>;
940
- declare function movePhase(httpClient: HttpClient$1): (identifiers: MovePhaseIdentifiers, newPosition: number | null) => Promise<void>;
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>;
941
1579
 
942
1580
  type index_d$1_CreatePhaseOptions = CreatePhaseOptions;
943
1581
  type index_d$1_CreatePhaseRequest = CreatePhaseRequest;
@@ -965,7 +1603,7 @@ declare const index_d$1_listPhases: typeof listPhases;
965
1603
  declare const index_d$1_movePhase: typeof movePhase;
966
1604
  declare const index_d$1_updatePhase: typeof updatePhase;
967
1605
  declare namespace index_d$1 {
968
- 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 index_d$1_CreatePhaseOptions as CreatePhaseOptions, type index_d$1_CreatePhaseRequest as CreatePhaseRequest, type index_d$1_CreatePhaseResponse as CreatePhaseResponse, type index_d$1_DeletePhaseRequest as DeletePhaseRequest, type index_d$1_DeletePhaseResponse as DeletePhaseResponse, type index_d$1_GetPhaseRequest as GetPhaseRequest, type index_d$1_GetPhaseResponse as GetPhaseResponse, type index_d$1_GetPhaseResponseNonNullableFields as GetPhaseResponseNonNullableFields, type index_d$1_ListPhasesOptions as ListPhasesOptions, type index_d$1_ListPhasesRequest as ListPhasesRequest, type index_d$1_ListPhasesResponse as ListPhasesResponse, type index_d$1_ListPhasesResponseNonNullableFields as ListPhasesResponseNonNullableFields, type index_d$1_MovePhaseIdentifiers as MovePhaseIdentifiers, type index_d$1_MovePhaseRequest as MovePhaseRequest, type index_d$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 Query$1 as Query, type index_d$1_QueryPhasesRequest as QueryPhasesRequest, type index_d$1_QueryPhasesResponse as QueryPhasesResponse, SortOrder$1 as SortOrder, type Sorting$1 as Sorting, type index_d$1_UpdatePhaseRequest as UpdatePhaseRequest, type index_d$1_UpdatePhaseResponse as UpdatePhaseResponse, __metadata$1 as __metadata, index_d$1_createPhase as createPhase, index_d$1_deletePhase as deletePhase, index_d$1_getPhase as getPhase, index_d$1_listPhases as listPhases, index_d$1_movePhase as movePhase, index_d$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 index_d$1_CreatePhaseOptions as CreatePhaseOptions, type index_d$1_CreatePhaseRequest as CreatePhaseRequest, type index_d$1_CreatePhaseResponse as CreatePhaseResponse, type index_d$1_DeletePhaseRequest as DeletePhaseRequest, type index_d$1_DeletePhaseResponse as DeletePhaseResponse, type index_d$1_GetPhaseRequest as GetPhaseRequest, type index_d$1_GetPhaseResponse as GetPhaseResponse, type index_d$1_GetPhaseResponseNonNullableFields as GetPhaseResponseNonNullableFields, type index_d$1_ListPhasesOptions as ListPhasesOptions, type index_d$1_ListPhasesRequest as ListPhasesRequest, type index_d$1_ListPhasesResponse as ListPhasesResponse, type index_d$1_ListPhasesResponseNonNullableFields as ListPhasesResponseNonNullableFields, type index_d$1_MovePhaseIdentifiers as MovePhaseIdentifiers, type index_d$1_MovePhaseRequest as MovePhaseRequest, type index_d$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 index_d$1_QueryPhasesRequest as QueryPhasesRequest, type index_d$1_QueryPhasesResponse as QueryPhasesResponse, SortOrder$1 as SortOrder, type Sorting$1 as Sorting, type index_d$1_UpdatePhaseRequest as UpdatePhaseRequest, type index_d$1_UpdatePhaseResponse as UpdatePhaseResponse, index_d$1_createPhase as createPhase, index_d$1_deletePhase as deletePhase, index_d$1_getPhase as getPhase, index_d$1_listPhases as listPhases, index_d$1_movePhase as movePhase, index_d$1_updatePhase as updatePhase };
969
1607
  }
970
1608
 
971
1609
  interface Workflow {
@@ -1002,7 +1640,7 @@ interface WorkflowInfo {
1002
1640
  * @readonly
1003
1641
  * @deprecated
1004
1642
  */
1005
- createdAt?: Date;
1643
+ createdAt?: Date | null;
1006
1644
  /**
1007
1645
  * Indicates whether the workflow can be deleted.
1008
1646
  * @readonly
@@ -1013,7 +1651,7 @@ interface WorkflowInfo {
1013
1651
  * Date and time the workflow was created.
1014
1652
  * @readonly
1015
1653
  */
1016
- _createdDate?: Date;
1654
+ _createdDate?: Date | null;
1017
1655
  }
1018
1656
  interface Phase {
1019
1657
  /** Phase information. */
@@ -1058,7 +1696,7 @@ interface CardInfo {
1058
1696
  /** Details about the contact attached to the card. */
1059
1697
  primaryAttachment?: Attachment;
1060
1698
  /** Due date. */
1061
- dueDate?: Date;
1699
+ dueDate?: Date | null;
1062
1700
  /** Name of the app or service that created the contact. */
1063
1701
  source?: string | null;
1064
1702
  /**
@@ -1067,14 +1705,14 @@ interface CardInfo {
1067
1705
  * @readonly
1068
1706
  * @deprecated
1069
1707
  */
1070
- createdAt?: Date;
1708
+ createdAt?: Date | null;
1071
1709
  /**
1072
1710
  * @internal
1073
1711
  * @internal
1074
1712
  * @readonly
1075
1713
  * @deprecated
1076
1714
  */
1077
- updatedAt?: Date;
1715
+ updatedAt?: Date | null;
1078
1716
  /**
1079
1717
  * ID of the phase that currently holds the card.
1080
1718
  * @readonly
@@ -1084,12 +1722,12 @@ interface CardInfo {
1084
1722
  * Date and time the card was created.
1085
1723
  * @readonly
1086
1724
  */
1087
- _createdDate?: Date;
1725
+ _createdDate?: Date | null;
1088
1726
  /**
1089
1727
  * Date and time the card was updated.
1090
1728
  * @readonly
1091
1729
  */
1092
- _updatedDate?: Date;
1730
+ _updatedDate?: Date | null;
1093
1731
  }
1094
1732
  interface Attachment {
1095
1733
  /**
@@ -1254,50 +1892,44 @@ interface SetupWorkflowRequest {
1254
1892
  }
1255
1893
  interface SetupWorkflowResponse {
1256
1894
  }
1895
+ interface PaginationResponseNonNullableFields {
1896
+ offset: number;
1897
+ limit: number;
1898
+ total: number;
1899
+ count: number;
1900
+ }
1257
1901
  interface ListWorkflowsResponseNonNullableFields {
1258
- workflows: WorkflowInfo[];
1259
- pagination?: {
1260
- offset: number;
1261
- total: number;
1262
- count: number;
1263
- };
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;
1264
1930
  }
1265
1931
  interface GetWorkflowResponseNonNullableFields {
1266
- workflow?: {
1267
- winPhase?: {
1268
- cardsList?: {
1269
- total: number;
1270
- cards: {
1271
- info?: {
1272
- primaryAttachment?: {
1273
- attachmentId: string;
1274
- value: string;
1275
- attachmentType: AttachmentType;
1276
- contactId: string;
1277
- };
1278
- };
1279
- }[];
1280
- };
1281
- };
1282
- phasesList?: {
1283
- total: number;
1284
- phases: {
1285
- cardsList?: {
1286
- total: number;
1287
- cards: {
1288
- info?: {
1289
- primaryAttachment?: {
1290
- attachmentId: string;
1291
- value: string;
1292
- attachmentType: AttachmentType;
1293
- contactId: string;
1294
- };
1295
- };
1296
- }[];
1297
- };
1298
- }[];
1299
- };
1300
- };
1932
+ workflow?: WorkflowNonNullableFields;
1301
1933
  }
1302
1934
  interface ListWorkflowsOptions {
1303
1935
  /**
@@ -1325,79 +1957,94 @@ interface ListWorkflowsOptions {
1325
1957
  sort?: string[];
1326
1958
  }
1327
1959
 
1328
- interface HttpClient {
1329
- request<TResponse, TData = any>(req: RequestOptionsFactory<TResponse, TData>): Promise<HttpResponse<TResponse>>;
1330
- 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>;
1331
1976
  }
1332
- type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
1333
- type HttpResponse<T = any> = {
1334
- data: T;
1335
- status: number;
1336
- statusText: string;
1337
- headers: any;
1338
- request?: any;
1339
- };
1340
- type RequestOptions<_TResponse = any, Data = any> = {
1341
- method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
1342
- url: string;
1343
- data?: Data;
1344
- params?: URLSearchParams;
1345
- } & APIMetadata;
1346
- type APIMetadata = {
1347
- methodFqn?: string;
1348
- entityFqdn?: string;
1349
- packageName?: string;
1350
- };
1351
-
1352
- declare global {
1353
- // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
1354
- interface SymbolConstructor {
1355
- readonly observable: symbol;
1356
- }
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>;
1357
2041
  }
1358
2042
 
1359
- declare const __metadata: {
1360
- PACKAGE_NAME: string;
1361
- };
1362
- declare function listWorkflows(httpClient: HttpClient): (options?: ListWorkflowsOptions) => Promise<ListWorkflowsResponse & ListWorkflowsResponseNonNullableFields>;
1363
- declare function getWorkflow(httpClient: HttpClient): (_id: string, cardsPerPhase: number | null) => Promise<Workflow & {
1364
- winPhase?: {
1365
- cardsList?: {
1366
- total: number;
1367
- cards: {
1368
- info?: {
1369
- primaryAttachment?: {
1370
- attachmentId: string;
1371
- value: string;
1372
- attachmentType: AttachmentType;
1373
- contactId: string;
1374
- } | undefined;
1375
- } | undefined;
1376
- }[];
1377
- } | undefined;
1378
- } | undefined;
1379
- phasesList?: {
1380
- total: number;
1381
- phases: {
1382
- cardsList?: {
1383
- total: number;
1384
- cards: {
1385
- info?: {
1386
- primaryAttachment?: {
1387
- attachmentId: string;
1388
- value: string;
1389
- attachmentType: AttachmentType;
1390
- contactId: string;
1391
- } | undefined;
1392
- } | undefined;
1393
- }[];
1394
- } | undefined;
1395
- }[];
1396
- } | undefined;
1397
- }>;
1398
- declare function updateWorkflow(httpClient: HttpClient): (_id: string, workflow: WorkflowInfo) => Promise<void>;
1399
- declare function createWorkflow(httpClient: HttpClient): (workflow: WorkflowInfo) => Promise<CreateWorkflowResponse>;
1400
- declare function deleteWorkflow(httpClient: HttpClient): (_id: string) => Promise<void>;
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>;
1401
2048
 
1402
2049
  type index_d_Attachment = Attachment;
1403
2050
  type index_d_AttachmentType = AttachmentType;
@@ -1433,14 +2080,14 @@ type index_d_UpdateWorkflowRequest = UpdateWorkflowRequest;
1433
2080
  type index_d_UpdateWorkflowResponse = UpdateWorkflowResponse;
1434
2081
  type index_d_Workflow = Workflow;
1435
2082
  type index_d_WorkflowInfo = WorkflowInfo;
1436
- declare const index_d___metadata: typeof __metadata;
2083
+ type index_d_WorkflowNonNullableFields = WorkflowNonNullableFields;
1437
2084
  declare const index_d_createWorkflow: typeof createWorkflow;
1438
2085
  declare const index_d_deleteWorkflow: typeof deleteWorkflow;
1439
2086
  declare const index_d_getWorkflow: typeof getWorkflow;
1440
2087
  declare const index_d_listWorkflows: typeof listWorkflows;
1441
2088
  declare const index_d_updateWorkflow: typeof updateWorkflow;
1442
2089
  declare namespace index_d {
1443
- export { type index_d_Attachment as Attachment, index_d_AttachmentType as AttachmentType, type index_d_Card as Card, type index_d_CardInfo as CardInfo, type index_d_CardsList as CardsList, type index_d_CreateWorkflowRequest as CreateWorkflowRequest, type index_d_CreateWorkflowResponse as CreateWorkflowResponse, type index_d_DeleteWorkflowRequest as DeleteWorkflowRequest, type index_d_DeleteWorkflowResponse as DeleteWorkflowResponse, type index_d_GetWorkflowRequest as GetWorkflowRequest, type index_d_GetWorkflowResponse as GetWorkflowResponse, type index_d_GetWorkflowResponseNonNullableFields as GetWorkflowResponseNonNullableFields, type index_d_ListWorkflowsOptions as ListWorkflowsOptions, type index_d_ListWorkflowsRequest as ListWorkflowsRequest, type index_d_ListWorkflowsResponse as ListWorkflowsResponse, type index_d_ListWorkflowsResponseNonNullableFields as ListWorkflowsResponseNonNullableFields, type index_d_PaginationResponse as PaginationResponse, type index_d_Paging as Paging, type index_d_Phase as Phase, type index_d_PhaseInfo as PhaseInfo, type index_d_PhasesList as PhasesList, type index_d_Query as Query, type index_d_QueryWorkflowsRequest as QueryWorkflowsRequest, type index_d_QueryWorkflowsResponse as QueryWorkflowsResponse, type index_d_SetupWorkflowRequest as SetupWorkflowRequest, type index_d_SetupWorkflowResponse as SetupWorkflowResponse, index_d_SortOrder as SortOrder, type index_d_Sorting as Sorting, type index_d_UpdateWorkflowRequest as UpdateWorkflowRequest, type index_d_UpdateWorkflowResponse as UpdateWorkflowResponse, type index_d_Workflow as Workflow, type index_d_WorkflowInfo as WorkflowInfo, index_d___metadata as __metadata, index_d_createWorkflow as createWorkflow, index_d_deleteWorkflow as deleteWorkflow, index_d_getWorkflow as getWorkflow, index_d_listWorkflows as listWorkflows, index_d_updateWorkflow as updateWorkflow };
2090
+ export { type index_d_Attachment as Attachment, index_d_AttachmentType as AttachmentType, type index_d_Card as Card, type index_d_CardInfo as CardInfo, type index_d_CardsList as CardsList, type index_d_CreateWorkflowRequest as CreateWorkflowRequest, type index_d_CreateWorkflowResponse as CreateWorkflowResponse, type index_d_DeleteWorkflowRequest as DeleteWorkflowRequest, type index_d_DeleteWorkflowResponse as DeleteWorkflowResponse, type index_d_GetWorkflowRequest as GetWorkflowRequest, type index_d_GetWorkflowResponse as GetWorkflowResponse, type index_d_GetWorkflowResponseNonNullableFields as GetWorkflowResponseNonNullableFields, type index_d_ListWorkflowsOptions as ListWorkflowsOptions, type index_d_ListWorkflowsRequest as ListWorkflowsRequest, type index_d_ListWorkflowsResponse as ListWorkflowsResponse, type index_d_ListWorkflowsResponseNonNullableFields as ListWorkflowsResponseNonNullableFields, type index_d_PaginationResponse as PaginationResponse, type index_d_Paging as Paging, type index_d_Phase as Phase, type index_d_PhaseInfo as PhaseInfo, type index_d_PhasesList as PhasesList, type index_d_Query as Query, type index_d_QueryWorkflowsRequest as QueryWorkflowsRequest, type index_d_QueryWorkflowsResponse as QueryWorkflowsResponse, type index_d_SetupWorkflowRequest as SetupWorkflowRequest, type index_d_SetupWorkflowResponse as SetupWorkflowResponse, index_d_SortOrder as SortOrder, type index_d_Sorting as Sorting, type index_d_UpdateWorkflowRequest as UpdateWorkflowRequest, type index_d_UpdateWorkflowResponse as UpdateWorkflowResponse, type index_d_Workflow as Workflow, type index_d_WorkflowInfo as WorkflowInfo, type index_d_WorkflowNonNullableFields as WorkflowNonNullableFields, index_d_createWorkflow as createWorkflow, index_d_deleteWorkflow as deleteWorkflow, index_d_getWorkflow as getWorkflow, index_d_listWorkflows as listWorkflows, index_d_updateWorkflow as updateWorkflow };
1444
2091
  }
1445
2092
 
1446
2093
  export { index_d$2 as cards, index_d$1 as phases, index_d as workflows };