@wix/payments 1.0.6 → 1.0.8

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,422 @@
1
+ interface OnboardingAvailability {
2
+ /**
3
+ * ID of this entity
4
+ * @readonly
5
+ */
6
+ _id?: string;
7
+ /** Information about CBD specific flow. Will have DECLINED status if user is not in United States */
8
+ cbdFlow?: CbdFlow;
9
+ /** Information about all restricted goods user might sell. */
10
+ restrictedGoodsFlow?: RestrictedGoodsFlow;
11
+ /** Information about services Wix Partner sells. */
12
+ partnerFlow?: PartnerFlow;
13
+ /**
14
+ * True, only if Wix Payments available to user due to the way account was created. False otherwise.
15
+ * @readonly
16
+ */
17
+ wixPaymentsAvailable?: boolean;
18
+ }
19
+ interface CbdFlow {
20
+ /**
21
+ * Current status of CBD flow.
22
+ * DECLINED - User does not sell CBD (or at least we do not know about it). Any payment service provider can be connected.
23
+ * POSSIBLE - User possibly sells CBD and we should ask for confirmation. User still can connect Wix Payments.
24
+ * CONFIRMED - User confirmed to sell CBD and now we should ask to complete attestation form. Only CBD providers can be connected. User can't connect Wix Payments.
25
+ */
26
+ status?: Status$1;
27
+ /** Information about completion of attestation form. Include date of signing. */
28
+ attestationInfo?: AttestationInfo;
29
+ }
30
+ declare enum Status$1 {
31
+ UNDEFINED = "UNDEFINED",
32
+ DECLINED = "DECLINED",
33
+ POSSIBLE = "POSSIBLE",
34
+ CONFIRMED = "CONFIRMED"
35
+ }
36
+ interface AttestationInfo {
37
+ /**
38
+ * Date of signing attestation form (only if status is CONFIRMED)
39
+ * @readonly
40
+ */
41
+ attestationFormSignedDate?: Date;
42
+ /** True, if attestation form was signed. False otherwise. */
43
+ formSigned?: boolean | null;
44
+ }
45
+ interface RestrictedGoodsFlow {
46
+ /**
47
+ * Current status of Restricted Goods flow.
48
+ * DECLINED - User confirmed that they don't sell any restricted goods. User may connect Wix Payments.
49
+ * CONFIRMED - User confirmed that they do sell restricted goods. User can't connect Wix Payments.
50
+ */
51
+ status?: RestrictedGoodsFlowStatus;
52
+ /** Contains detailed list of which restricted categories user sell. */
53
+ categories?: RestrictedGoodsCategory[];
54
+ }
55
+ declare enum RestrictedGoodsFlowStatus {
56
+ UNDEFINED = "UNDEFINED",
57
+ DECLINED = "DECLINED",
58
+ CONFIRMED = "CONFIRMED"
59
+ }
60
+ declare enum RestrictedGoodsCategory {
61
+ UNDEFINED = "UNDEFINED",
62
+ TOBACCO_ALCOHOL = "TOBACCO_ALCOHOL",
63
+ FIREARMS_WEAPONS = "FIREARMS_WEAPONS",
64
+ ADULT = "ADULT",
65
+ MEDICAL = "MEDICAL",
66
+ FINANCIAL = "FINANCIAL",
67
+ TRAVEL_AGENCIES = "TRAVEL_AGENCIES",
68
+ GAMBLING_LOTTERIES_SKILL_GAMES = "GAMBLING_LOTTERIES_SKILL_GAMES",
69
+ BINARY_OPTIONS_CRYPTOCURRENCIES = "BINARY_OPTIONS_CRYPTOCURRENCIES",
70
+ MARKETPLACES = "MARKETPLACES",
71
+ OTHER = "OTHER",
72
+ CBD = "CBD",
73
+ TOBACCO_E_CIGARETTES = "TOBACCO_E_CIGARETTES",
74
+ ALCOHOL = "ALCOHOL",
75
+ NUTRACEUTICALS = "NUTRACEUTICALS"
76
+ }
77
+ interface PartnerFlow {
78
+ /**
79
+ * Current status of Partner flow.
80
+ * DECLINED - User sells only approved services and may connect Wix Payments.
81
+ * CONFIRMED - User sells not approved services and can't connect Wix Payments.
82
+ */
83
+ status?: PartnerFlowStatus;
84
+ }
85
+ declare enum PartnerFlowStatus {
86
+ UNDEFINED = "UNDEFINED",
87
+ DECLINED = "DECLINED",
88
+ CONFIRMED = "CONFIRMED"
89
+ }
90
+ interface GetOnboardingAvailabilityRequest {
91
+ }
92
+ interface GetOnboardingAvailabilityResponse {
93
+ /** Current state of onboarding availability for the merchant. */
94
+ onboardingAvailability?: OnboardingAvailability;
95
+ }
96
+ interface UpdateCbdFlowRequest {
97
+ /** New state of CBD flow for merchant. */
98
+ cbdFlow?: CbdFlow;
99
+ }
100
+ interface UpdateCbdFlowResponse {
101
+ /** Current state of onboarding availability for the merchant. */
102
+ onboardingAvailability?: OnboardingAvailability;
103
+ }
104
+ interface UpdateRestrictedGoodsFlowRequest {
105
+ /** New state of restricted goods flow for merchant. */
106
+ restrictedGoods?: RestrictedGoodsFlow;
107
+ }
108
+ interface UpdateRestrictedGoodsFlowResponse {
109
+ /** Current state of onboarding availability for the merchant. */
110
+ onboardingAvailability?: OnboardingAvailability;
111
+ }
112
+ interface UpdatePartnerFlowRequest {
113
+ /** New state of partner flow for merchant. */
114
+ partnerFlow?: PartnerFlow;
115
+ }
116
+ interface UpdatePartnerFlowResponse {
117
+ /** Current state of onboarding availability for the merchant. */
118
+ onboardingAvailability?: OnboardingAvailability;
119
+ }
120
+ interface DomainEvent$1 extends DomainEventBodyOneOf$1 {
121
+ createdEvent?: EntityCreatedEvent$1;
122
+ updatedEvent?: EntityUpdatedEvent$1;
123
+ deletedEvent?: EntityDeletedEvent$1;
124
+ actionEvent?: ActionEvent$1;
125
+ /**
126
+ * Unique event ID.
127
+ * Allows clients to ignore duplicate webhooks.
128
+ */
129
+ _id?: string;
130
+ /**
131
+ * Assumes actions are also always typed to an entity_type
132
+ * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
133
+ */
134
+ entityFqdn?: string;
135
+ /**
136
+ * This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
137
+ * This is although the created/updated/deleted notion is duplication of the oneof types
138
+ * Example: created/updated/deleted/started/completed/email_opened
139
+ */
140
+ slug?: string;
141
+ /** ID of the entity associated with the event. */
142
+ entityId?: string;
143
+ /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */
144
+ eventTime?: Date;
145
+ /**
146
+ * Whether the event was triggered as a result of a privacy regulation application
147
+ * (for example, GDPR).
148
+ */
149
+ triggeredByAnonymizeRequest?: boolean | null;
150
+ /** If present, indicates the action that triggered the event. */
151
+ originatedFrom?: string | null;
152
+ /**
153
+ * A sequence number defining the order of updates to the underlying entity.
154
+ * For example, given that some entity was updated at 16:00 and than again at 16:01,
155
+ * it is guaranteed that the sequence number of the second update is strictly higher than the first.
156
+ * As the consumer, you can use this value to ensure that you handle messages in the correct order.
157
+ * To do so, you will need to persist this number on your end, and compare the sequence number from the
158
+ * message against the one you have stored. Given that the stored number is higher, you should ignore the message.
159
+ */
160
+ entityEventSequence?: string | null;
161
+ }
162
+ /** @oneof */
163
+ interface DomainEventBodyOneOf$1 {
164
+ createdEvent?: EntityCreatedEvent$1;
165
+ updatedEvent?: EntityUpdatedEvent$1;
166
+ deletedEvent?: EntityDeletedEvent$1;
167
+ actionEvent?: ActionEvent$1;
168
+ }
169
+ interface EntityCreatedEvent$1 {
170
+ entity?: string;
171
+ }
172
+ interface RestoreInfo {
173
+ deletedDate?: Date;
174
+ }
175
+ interface EntityUpdatedEvent$1 {
176
+ /**
177
+ * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
178
+ * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
179
+ * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
180
+ */
181
+ currentEntity?: string;
182
+ }
183
+ interface EntityDeletedEvent$1 {
184
+ /** Entity that was deleted */
185
+ deletedEntity?: string | null;
186
+ }
187
+ interface ActionEvent$1 {
188
+ body?: string;
189
+ }
190
+ interface MessageEnvelope$1 {
191
+ /** App instance ID. */
192
+ instanceId?: string | null;
193
+ /** Event type. */
194
+ eventType?: string;
195
+ /** The identification type and identity data. */
196
+ identity?: IdentificationData$1;
197
+ /** Stringify payload. */
198
+ data?: string;
199
+ }
200
+ interface IdentificationData$1 extends IdentificationDataIdOneOf$1 {
201
+ /** ID of a site visitor that has not logged in to the site. */
202
+ anonymousVisitorId?: string;
203
+ /** ID of a site visitor that has logged in to the site. */
204
+ memberId?: string;
205
+ /** ID of a Wix user (site owner, contributor, etc.). */
206
+ wixUserId?: string;
207
+ /** ID of an app. */
208
+ appId?: string;
209
+ /** @readonly */
210
+ identityType?: WebhookIdentityType$1;
211
+ }
212
+ /** @oneof */
213
+ interface IdentificationDataIdOneOf$1 {
214
+ /** ID of a site visitor that has not logged in to the site. */
215
+ anonymousVisitorId?: string;
216
+ /** ID of a site visitor that has logged in to the site. */
217
+ memberId?: string;
218
+ /** ID of a Wix user (site owner, contributor, etc.). */
219
+ wixUserId?: string;
220
+ /** ID of an app. */
221
+ appId?: string;
222
+ }
223
+ declare enum WebhookIdentityType$1 {
224
+ UNKNOWN = "UNKNOWN",
225
+ ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
226
+ MEMBER = "MEMBER",
227
+ WIX_USER = "WIX_USER",
228
+ APP = "APP"
229
+ }
230
+ interface CbdFlowNonNullableFields {
231
+ status: Status$1;
232
+ }
233
+ interface RestrictedGoodsFlowNonNullableFields {
234
+ status: RestrictedGoodsFlowStatus;
235
+ categories: RestrictedGoodsCategory[];
236
+ }
237
+ interface PartnerFlowNonNullableFields {
238
+ status: PartnerFlowStatus;
239
+ }
240
+ interface OnboardingAvailabilityNonNullableFields {
241
+ _id: string;
242
+ cbdFlow?: CbdFlowNonNullableFields;
243
+ restrictedGoodsFlow?: RestrictedGoodsFlowNonNullableFields;
244
+ partnerFlow?: PartnerFlowNonNullableFields;
245
+ wixPaymentsAvailable: boolean;
246
+ }
247
+ interface GetOnboardingAvailabilityResponseNonNullableFields {
248
+ onboardingAvailability?: OnboardingAvailabilityNonNullableFields;
249
+ }
250
+ interface UpdateCbdFlowResponseNonNullableFields {
251
+ onboardingAvailability?: OnboardingAvailabilityNonNullableFields;
252
+ }
253
+ interface UpdateRestrictedGoodsFlowResponseNonNullableFields {
254
+ onboardingAvailability?: OnboardingAvailabilityNonNullableFields;
255
+ }
256
+ interface UpdatePartnerFlowResponseNonNullableFields {
257
+ onboardingAvailability?: OnboardingAvailabilityNonNullableFields;
258
+ }
259
+ interface BaseEventMetadata$1 {
260
+ /** App instance ID. */
261
+ instanceId?: string | null;
262
+ /** Event type. */
263
+ eventType?: string;
264
+ /** The identification type and identity data. */
265
+ identity?: IdentificationData$1;
266
+ }
267
+ interface EventMetadata$1 extends BaseEventMetadata$1 {
268
+ /**
269
+ * Unique event ID.
270
+ * Allows clients to ignore duplicate webhooks.
271
+ */
272
+ _id?: string;
273
+ /**
274
+ * Assumes actions are also always typed to an entity_type
275
+ * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
276
+ */
277
+ entityFqdn?: string;
278
+ /**
279
+ * This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
280
+ * This is although the created/updated/deleted notion is duplication of the oneof types
281
+ * Example: created/updated/deleted/started/completed/email_opened
282
+ */
283
+ slug?: string;
284
+ /** ID of the entity associated with the event. */
285
+ entityId?: string;
286
+ /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */
287
+ eventTime?: Date;
288
+ /**
289
+ * Whether the event was triggered as a result of a privacy regulation application
290
+ * (for example, GDPR).
291
+ */
292
+ triggeredByAnonymizeRequest?: boolean | null;
293
+ /** If present, indicates the action that triggered the event. */
294
+ originatedFrom?: string | null;
295
+ /**
296
+ * A sequence number defining the order of updates to the underlying entity.
297
+ * For example, given that some entity was updated at 16:00 and than again at 16:01,
298
+ * it is guaranteed that the sequence number of the second update is strictly higher than the first.
299
+ * As the consumer, you can use this value to ensure that you handle messages in the correct order.
300
+ * To do so, you will need to persist this number on your end, and compare the sequence number from the
301
+ * message against the one you have stored. Given that the stored number is higher, you should ignore the message.
302
+ */
303
+ entityEventSequence?: string | null;
304
+ }
305
+ interface OnboardingAvailabilityCreatedEnvelope {
306
+ entity: OnboardingAvailability;
307
+ metadata: EventMetadata$1;
308
+ }
309
+ interface OnboardingAvailabilityUpdatedEnvelope {
310
+ entity: OnboardingAvailability;
311
+ metadata: EventMetadata$1;
312
+ }
313
+ interface UpdateCbdFlowOptions {
314
+ /** New state of CBD flow for merchant. */
315
+ cbdFlow?: CbdFlow;
316
+ }
317
+ interface UpdateRestrictedGoodsFlowOptions {
318
+ /** New state of restricted goods flow for merchant. */
319
+ restrictedGoods?: RestrictedGoodsFlow;
320
+ }
321
+ interface UpdatePartnerFlowOptions {
322
+ /** New state of partner flow for merchant. */
323
+ partnerFlow?: PartnerFlow;
324
+ }
325
+
326
+ type RESTFunctionDescriptor<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient) => T;
327
+ interface HttpClient {
328
+ request<TResponse, TData = any>(req: RequestOptionsFactory<TResponse, TData>): Promise<HttpResponse<TResponse>>;
329
+ fetchWithAuth: typeof fetch;
330
+ wixAPIFetch: (relativeUrl: string, options: RequestInit) => Promise<Response>;
331
+ }
332
+ type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
333
+ type HttpResponse<T = any> = {
334
+ data: T;
335
+ status: number;
336
+ statusText: string;
337
+ headers: any;
338
+ request?: any;
339
+ };
340
+ type RequestOptions<_TResponse = any, Data = any> = {
341
+ method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
342
+ url: string;
343
+ data?: Data;
344
+ params?: URLSearchParams;
345
+ } & APIMetadata;
346
+ type APIMetadata = {
347
+ methodFqn?: string;
348
+ entityFqdn?: string;
349
+ packageName?: string;
350
+ };
351
+ type BuildRESTFunction<T extends RESTFunctionDescriptor> = T extends RESTFunctionDescriptor<infer U> ? U : never;
352
+ type EventDefinition<Payload = unknown, Type extends string = string> = {
353
+ __type: 'event-definition';
354
+ type: Type;
355
+ isDomainEvent?: boolean;
356
+ transformations?: (envelope: unknown) => Payload;
357
+ __payload: Payload;
358
+ };
359
+ declare function EventDefinition<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition<Payload, Type>;
360
+ type EventHandler<T extends EventDefinition> = (payload: T['__payload']) => void | Promise<void>;
361
+ type BuildEventDefinition<T extends EventDefinition<any, string>> = (handler: EventHandler<T>) => void;
362
+
363
+ declare global {
364
+ // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
365
+ interface SymbolConstructor {
366
+ readonly observable: symbol;
367
+ }
368
+ }
369
+
370
+ declare function createRESTModule$1<T extends RESTFunctionDescriptor>(descriptor: T, elevated?: boolean): BuildRESTFunction<T> & T;
371
+
372
+ declare function createEventModule$1<T extends EventDefinition<any, string>>(eventDefinition: T): BuildEventDefinition<T> & T;
373
+
374
+ declare const getOnboardingAvailability: ReturnType<typeof createRESTModule$1<typeof publicGetOnboardingAvailability>>;
375
+ declare const updateCbdFlow: ReturnType<typeof createRESTModule$1<typeof publicUpdateCbdFlow>>;
376
+ declare const updateRestrictedGoodsFlow: ReturnType<typeof createRESTModule$1<typeof publicUpdateRestrictedGoodsFlow>>;
377
+ declare const updatePartnerFlow: ReturnType<typeof createRESTModule$1<typeof publicUpdatePartnerFlow>>;
378
+ declare const onOnboardingAvailabilityCreated: ReturnType<typeof createEventModule$1<typeof publicOnOnboardingAvailabilityCreated>>;
379
+ declare const onOnboardingAvailabilityUpdated: ReturnType<typeof createEventModule$1<typeof publicOnOnboardingAvailabilityUpdated>>;
380
+
381
+ type index_d$1_AttestationInfo = AttestationInfo;
382
+ type index_d$1_CbdFlow = CbdFlow;
383
+ type index_d$1_GetOnboardingAvailabilityRequest = GetOnboardingAvailabilityRequest;
384
+ type index_d$1_GetOnboardingAvailabilityResponse = GetOnboardingAvailabilityResponse;
385
+ type index_d$1_GetOnboardingAvailabilityResponseNonNullableFields = GetOnboardingAvailabilityResponseNonNullableFields;
386
+ type index_d$1_OnboardingAvailability = OnboardingAvailability;
387
+ type index_d$1_OnboardingAvailabilityCreatedEnvelope = OnboardingAvailabilityCreatedEnvelope;
388
+ type index_d$1_OnboardingAvailabilityUpdatedEnvelope = OnboardingAvailabilityUpdatedEnvelope;
389
+ type index_d$1_PartnerFlow = PartnerFlow;
390
+ type index_d$1_PartnerFlowStatus = PartnerFlowStatus;
391
+ declare const index_d$1_PartnerFlowStatus: typeof PartnerFlowStatus;
392
+ type index_d$1_RestoreInfo = RestoreInfo;
393
+ type index_d$1_RestrictedGoodsCategory = RestrictedGoodsCategory;
394
+ declare const index_d$1_RestrictedGoodsCategory: typeof RestrictedGoodsCategory;
395
+ type index_d$1_RestrictedGoodsFlow = RestrictedGoodsFlow;
396
+ type index_d$1_RestrictedGoodsFlowStatus = RestrictedGoodsFlowStatus;
397
+ declare const index_d$1_RestrictedGoodsFlowStatus: typeof RestrictedGoodsFlowStatus;
398
+ type index_d$1_UpdateCbdFlowOptions = UpdateCbdFlowOptions;
399
+ type index_d$1_UpdateCbdFlowRequest = UpdateCbdFlowRequest;
400
+ type index_d$1_UpdateCbdFlowResponse = UpdateCbdFlowResponse;
401
+ type index_d$1_UpdateCbdFlowResponseNonNullableFields = UpdateCbdFlowResponseNonNullableFields;
402
+ type index_d$1_UpdatePartnerFlowOptions = UpdatePartnerFlowOptions;
403
+ type index_d$1_UpdatePartnerFlowRequest = UpdatePartnerFlowRequest;
404
+ type index_d$1_UpdatePartnerFlowResponse = UpdatePartnerFlowResponse;
405
+ type index_d$1_UpdatePartnerFlowResponseNonNullableFields = UpdatePartnerFlowResponseNonNullableFields;
406
+ type index_d$1_UpdateRestrictedGoodsFlowOptions = UpdateRestrictedGoodsFlowOptions;
407
+ type index_d$1_UpdateRestrictedGoodsFlowRequest = UpdateRestrictedGoodsFlowRequest;
408
+ type index_d$1_UpdateRestrictedGoodsFlowResponse = UpdateRestrictedGoodsFlowResponse;
409
+ type index_d$1_UpdateRestrictedGoodsFlowResponseNonNullableFields = UpdateRestrictedGoodsFlowResponseNonNullableFields;
410
+ declare const index_d$1_getOnboardingAvailability: typeof getOnboardingAvailability;
411
+ declare const index_d$1_onOnboardingAvailabilityCreated: typeof onOnboardingAvailabilityCreated;
412
+ declare const index_d$1_onOnboardingAvailabilityUpdated: typeof onOnboardingAvailabilityUpdated;
413
+ declare const index_d$1_updateCbdFlow: typeof updateCbdFlow;
414
+ declare const index_d$1_updatePartnerFlow: typeof updatePartnerFlow;
415
+ declare const index_d$1_updateRestrictedGoodsFlow: typeof updateRestrictedGoodsFlow;
416
+ declare namespace index_d$1 {
417
+ export { type ActionEvent$1 as ActionEvent, type index_d$1_AttestationInfo as AttestationInfo, type BaseEventMetadata$1 as BaseEventMetadata, type index_d$1_CbdFlow as CbdFlow, type DomainEvent$1 as DomainEvent, type DomainEventBodyOneOf$1 as DomainEventBodyOneOf, type EntityCreatedEvent$1 as EntityCreatedEvent, type EntityDeletedEvent$1 as EntityDeletedEvent, type EntityUpdatedEvent$1 as EntityUpdatedEvent, type EventMetadata$1 as EventMetadata, type index_d$1_GetOnboardingAvailabilityRequest as GetOnboardingAvailabilityRequest, type index_d$1_GetOnboardingAvailabilityResponse as GetOnboardingAvailabilityResponse, type index_d$1_GetOnboardingAvailabilityResponseNonNullableFields as GetOnboardingAvailabilityResponseNonNullableFields, type IdentificationData$1 as IdentificationData, type IdentificationDataIdOneOf$1 as IdentificationDataIdOneOf, type MessageEnvelope$1 as MessageEnvelope, type index_d$1_OnboardingAvailability as OnboardingAvailability, type index_d$1_OnboardingAvailabilityCreatedEnvelope as OnboardingAvailabilityCreatedEnvelope, type index_d$1_OnboardingAvailabilityUpdatedEnvelope as OnboardingAvailabilityUpdatedEnvelope, type index_d$1_PartnerFlow as PartnerFlow, index_d$1_PartnerFlowStatus as PartnerFlowStatus, type index_d$1_RestoreInfo as RestoreInfo, index_d$1_RestrictedGoodsCategory as RestrictedGoodsCategory, type index_d$1_RestrictedGoodsFlow as RestrictedGoodsFlow, index_d$1_RestrictedGoodsFlowStatus as RestrictedGoodsFlowStatus, Status$1 as Status, type index_d$1_UpdateCbdFlowOptions as UpdateCbdFlowOptions, type index_d$1_UpdateCbdFlowRequest as UpdateCbdFlowRequest, type index_d$1_UpdateCbdFlowResponse as UpdateCbdFlowResponse, type index_d$1_UpdateCbdFlowResponseNonNullableFields as UpdateCbdFlowResponseNonNullableFields, type index_d$1_UpdatePartnerFlowOptions as UpdatePartnerFlowOptions, type index_d$1_UpdatePartnerFlowRequest as UpdatePartnerFlowRequest, type index_d$1_UpdatePartnerFlowResponse as UpdatePartnerFlowResponse, type index_d$1_UpdatePartnerFlowResponseNonNullableFields as UpdatePartnerFlowResponseNonNullableFields, type index_d$1_UpdateRestrictedGoodsFlowOptions as UpdateRestrictedGoodsFlowOptions, type index_d$1_UpdateRestrictedGoodsFlowRequest as UpdateRestrictedGoodsFlowRequest, type index_d$1_UpdateRestrictedGoodsFlowResponse as UpdateRestrictedGoodsFlowResponse, type index_d$1_UpdateRestrictedGoodsFlowResponseNonNullableFields as UpdateRestrictedGoodsFlowResponseNonNullableFields, WebhookIdentityType$1 as WebhookIdentityType, index_d$1_getOnboardingAvailability as getOnboardingAvailability, index_d$1_onOnboardingAvailabilityCreated as onOnboardingAvailabilityCreated, index_d$1_onOnboardingAvailabilityUpdated as onOnboardingAvailabilityUpdated, index_d$1_updateCbdFlow as updateCbdFlow, index_d$1_updatePartnerFlow as updatePartnerFlow, index_d$1_updateRestrictedGoodsFlow as updateRestrictedGoodsFlow };
418
+ }
419
+
1
420
  /**
2
421
  * A refund a record of an attempt of
3
422
  * returning funds for a charge from a merchant to a customer to who has made a purchase.
@@ -612,50 +1031,6 @@ interface UpdateExtendedFieldsOptions {
612
1031
  namespaceData: Record<string, any> | null;
613
1032
  }
614
1033
 
615
- type RESTFunctionDescriptor<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient) => T;
616
- interface HttpClient {
617
- request<TResponse, TData = any>(req: RequestOptionsFactory<TResponse, TData>): Promise<HttpResponse<TResponse>>;
618
- fetchWithAuth: typeof fetch;
619
- wixAPIFetch: (relativeUrl: string, options: RequestInit) => Promise<Response>;
620
- }
621
- type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
622
- type HttpResponse<T = any> = {
623
- data: T;
624
- status: number;
625
- statusText: string;
626
- headers: any;
627
- request?: any;
628
- };
629
- type RequestOptions<_TResponse = any, Data = any> = {
630
- method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
631
- url: string;
632
- data?: Data;
633
- params?: URLSearchParams;
634
- } & APIMetadata;
635
- type APIMetadata = {
636
- methodFqn?: string;
637
- entityFqdn?: string;
638
- packageName?: string;
639
- };
640
- type BuildRESTFunction<T extends RESTFunctionDescriptor> = T extends RESTFunctionDescriptor<infer U> ? U : never;
641
- type EventDefinition<Payload = unknown, Type extends string = string> = {
642
- __type: 'event-definition';
643
- type: Type;
644
- isDomainEvent?: boolean;
645
- transformations?: (envelope: unknown) => Payload;
646
- __payload: Payload;
647
- };
648
- declare function EventDefinition<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition<Payload, Type>;
649
- type EventHandler<T extends EventDefinition> = (payload: T['__payload']) => void | Promise<void>;
650
- type BuildEventDefinition<T extends EventDefinition<any, string>> = (handler: EventHandler<T>) => void;
651
-
652
- declare global {
653
- // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
654
- interface SymbolConstructor {
655
- readonly observable: symbol;
656
- }
657
- }
658
-
659
1034
  declare function createRESTModule<T extends RESTFunctionDescriptor>(descriptor: T, elevated?: boolean): BuildRESTFunction<T> & T;
660
1035
 
661
1036
  declare function createEventModule<T extends EventDefinition<any, string>>(eventDefinition: T): BuildEventDefinition<T> & T;
@@ -737,4 +1112,4 @@ declare namespace index_d {
737
1112
  export { type index_d_ActionEvent as ActionEvent, type index_d_BaseEventMetadata as BaseEventMetadata, type index_d_CreateRefundOptions as CreateRefundOptions, type index_d_CreateRefundRequest as CreateRefundRequest, type index_d_CreateRefundResponse as CreateRefundResponse, type index_d_CreateRefundResponseNonNullableFields as CreateRefundResponseNonNullableFields, type index_d_CursorPaging as CursorPaging, type index_d_CursorPagingMetadata as CursorPagingMetadata, type index_d_CursorQuery as CursorQuery, type index_d_CursorQueryPagingMethodOneOf as CursorQueryPagingMethodOneOf, type index_d_Cursors as Cursors, type index_d_DomainEvent as DomainEvent, type index_d_DomainEventBodyOneOf as DomainEventBodyOneOf, type index_d_EntityCreatedEvent as EntityCreatedEvent, type index_d_EntityDeletedEvent as EntityDeletedEvent, type index_d_EntityUpdatedEvent as EntityUpdatedEvent, type index_d_EventMetadata as EventMetadata, type index_d_ExtendedFields as ExtendedFields, type index_d_GetRefundRequest as GetRefundRequest, type index_d_GetRefundResponse as GetRefundResponse, type index_d_GetRefundResponseNonNullableFields as GetRefundResponseNonNullableFields, type index_d_GetRefundabilityRequest as GetRefundabilityRequest, type index_d_GetRefundabilityResponse as GetRefundabilityResponse, type index_d_GetRefundabilityResponseNonNullableFields as GetRefundabilityResponseNonNullableFields, type index_d_IdentificationData as IdentificationData, type index_d_IdentificationDataIdOneOf as IdentificationDataIdOneOf, index_d_Initiator as Initiator, type index_d_MessageEnvelope as MessageEnvelope, type index_d_QueryRefundsRequest as QueryRefundsRequest, type index_d_QueryRefundsResponse as QueryRefundsResponse, type index_d_QueryRefundsResponseNonNullableFields as QueryRefundsResponseNonNullableFields, type index_d_Refund as Refund, type index_d_RefundCreatedEnvelope as RefundCreatedEnvelope, type index_d_RefundNonNullableFields as RefundNonNullableFields, type index_d_RefundOptions as RefundOptions, type index_d_RefundUpdatedEnvelope as RefundUpdatedEnvelope, type index_d_Refundability as Refundability, type index_d_RefundabilityDetailsOneOf as RefundabilityDetailsOneOf, type index_d_RefundsQueryBuilder as RefundsQueryBuilder, type index_d_RefundsQueryResult as RefundsQueryResult, type index_d_Rejection as Rejection, index_d_RejectionReason as RejectionReason, index_d_SortOrder as SortOrder, type index_d_Sorting as Sorting, index_d_Status as Status, type index_d_StatusInfo as StatusInfo, type index_d_SyncRefundRequest as SyncRefundRequest, type index_d_SyncRefundResponse as SyncRefundResponse, type index_d_UpdateExtendedFieldsOptions as UpdateExtendedFieldsOptions, type index_d_UpdateExtendedFieldsRequest as UpdateExtendedFieldsRequest, type index_d_UpdateExtendedFieldsResponse as UpdateExtendedFieldsResponse, type index_d_UpdateExtendedFieldsResponseNonNullableFields as UpdateExtendedFieldsResponseNonNullableFields, index_d_WebhookIdentityType as WebhookIdentityType, index_d_createRefund as createRefund, index_d_getRefund as getRefund, index_d_getRefundability as getRefundability, index_d_onRefundCreated as onRefundCreated, index_d_onRefundUpdated as onRefundUpdated, index_d_queryRefunds as queryRefunds, index_d_updateExtendedFields as updateExtendedFields };
738
1113
  }
739
1114
 
740
- export { index_d as refunds };
1115
+ export { index_d$1 as onboardingAvailability, index_d as refunds };