@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 +1,2 @@
1
+ export * as onboardingAvailability from '@wix/payments_onboarding-availability/context';
1
2
  export * as refunds from '@wix/payments_refunds/context';
@@ -23,6 +23,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
23
23
  return result;
24
24
  };
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.refunds = void 0;
26
+ exports.refunds = exports.onboardingAvailability = void 0;
27
+ exports.onboardingAvailability = __importStar(require("@wix/payments_onboarding-availability/context"));
27
28
  exports.refunds = __importStar(require("@wix/payments_refunds/context"));
28
29
  //# sourceMappingURL=context.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"context.js","sourceRoot":"","sources":["../../context.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,yEAAyD"}
1
+ {"version":3,"file":"context.js","sourceRoot":"","sources":["../../context.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,wGAAwF;AACxF,yEAAyD"}
@@ -1 +1,2 @@
1
+ export * as onboardingAvailability from '@wix/payments_onboarding-availability';
1
2
  export * as refunds from '@wix/payments_refunds';
@@ -23,6 +23,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
23
23
  return result;
24
24
  };
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.refunds = void 0;
26
+ exports.refunds = exports.onboardingAvailability = void 0;
27
+ exports.onboardingAvailability = __importStar(require("@wix/payments_onboarding-availability"));
27
28
  exports.refunds = __importStar(require("@wix/payments_refunds"));
28
29
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iEAAiD"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,gGAAgF;AAChF,iEAAiD"}
@@ -1 +1,2 @@
1
+ export * as onboardingAvailability from '@wix/payments_onboarding-availability/meta';
1
2
  export * as refunds from '@wix/payments_refunds/meta';
package/build/cjs/meta.js CHANGED
@@ -23,6 +23,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
23
23
  return result;
24
24
  };
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.refunds = void 0;
26
+ exports.refunds = exports.onboardingAvailability = void 0;
27
+ exports.onboardingAvailability = __importStar(require("@wix/payments_onboarding-availability/meta"));
27
28
  exports.refunds = __importStar(require("@wix/payments_refunds/meta"));
28
29
  //# sourceMappingURL=meta.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"meta.js","sourceRoot":"","sources":["../../meta.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,sEAAsD"}
1
+ {"version":3,"file":"meta.js","sourceRoot":"","sources":["../../meta.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qGAAqF;AACrF,sEAAsD"}
@@ -1 +1,2 @@
1
+ export * as onboardingAvailability from '@wix/payments_onboarding-availability/context';
1
2
  export * as refunds from '@wix/payments_refunds/context';
@@ -1,2 +1,3 @@
1
+ export * as onboardingAvailability from '@wix/payments_onboarding-availability/context';
1
2
  export * as refunds from '@wix/payments_refunds/context';
2
3
  //# sourceMappingURL=context.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"context.js","sourceRoot":"","sources":["../../context.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,OAAO,MAAM,+BAA+B,CAAC"}
1
+ {"version":3,"file":"context.js","sourceRoot":"","sources":["../../context.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,sBAAsB,MAAM,+CAA+C,CAAC;AACxF,OAAO,KAAK,OAAO,MAAM,+BAA+B,CAAC"}
@@ -1 +1,2 @@
1
+ export * as onboardingAvailability from '@wix/payments_onboarding-availability';
1
2
  export * as refunds from '@wix/payments_refunds';
package/build/es/index.js CHANGED
@@ -1,2 +1,3 @@
1
+ export * as onboardingAvailability from '@wix/payments_onboarding-availability';
1
2
  export * as refunds from '@wix/payments_refunds';
2
3
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,OAAO,MAAM,uBAAuB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,sBAAsB,MAAM,uCAAuC,CAAC;AAChF,OAAO,KAAK,OAAO,MAAM,uBAAuB,CAAC"}
@@ -1 +1,2 @@
1
+ export * as onboardingAvailability from '@wix/payments_onboarding-availability/meta';
1
2
  export * as refunds from '@wix/payments_refunds/meta';
package/build/es/meta.js CHANGED
@@ -1,2 +1,3 @@
1
+ export * as onboardingAvailability from '@wix/payments_onboarding-availability/meta';
1
2
  export * as refunds from '@wix/payments_refunds/meta';
2
3
  //# sourceMappingURL=meta.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"meta.js","sourceRoot":"","sources":["../../meta.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,OAAO,MAAM,4BAA4B,CAAC"}
1
+ {"version":3,"file":"meta.js","sourceRoot":"","sources":["../../meta.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,sBAAsB,MAAM,4CAA4C,CAAC;AACrF,OAAO,KAAK,OAAO,MAAM,4BAA4B,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/payments",
3
- "version": "1.0.6",
3
+ "version": "1.0.8",
4
4
  "publishConfig": {
5
5
  "registry": "https://registry.npmjs.org/",
6
6
  "access": "public"
@@ -18,7 +18,8 @@
18
18
  "type-bundles"
19
19
  ],
20
20
  "dependencies": {
21
- "@wix/payments_refunds": "1.0.6"
21
+ "@wix/payments_onboarding-availability": "1.0.1",
22
+ "@wix/payments_refunds": "1.0.8"
22
23
  },
23
24
  "devDependencies": {
24
25
  "glob": "^10.4.1",
@@ -28,7 +29,7 @@
28
29
  },
29
30
  "scripts": {
30
31
  "build": "tsc -b tsconfig.json tsconfig.esm.json && npm run build:dts-bundles",
31
- "build:dts-bundles": "test -f config/rollup-config.js && rollup --config config/rollup-config.js || echo 'Warning: config/rollup-config.js not found!'",
32
+ "build:dts-bundles": "test -f config/rollup-config.js && NODE_OPTIONS=--max-old-space-size=8192 rollup --config config/rollup-config.js || echo 'Warning: config/rollup-config.js not found!'",
32
33
  "test": ":"
33
34
  },
34
35
  "wix": {
@@ -42,5 +43,5 @@
42
43
  "fqdn": ""
43
44
  }
44
45
  },
45
- "falconPackageHash": "0811131cc2ee7f932c25c6c438c61ace5fd8f16412ef7fb65bb3b9af"
46
+ "falconPackageHash": "d0357502366b4b6fa742b54f80627191bc54879c4d2d6b977048dd33"
46
47
  }
@@ -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 context$1_AttestationInfo = AttestationInfo;
382
+ type context$1_CbdFlow = CbdFlow;
383
+ type context$1_GetOnboardingAvailabilityRequest = GetOnboardingAvailabilityRequest;
384
+ type context$1_GetOnboardingAvailabilityResponse = GetOnboardingAvailabilityResponse;
385
+ type context$1_GetOnboardingAvailabilityResponseNonNullableFields = GetOnboardingAvailabilityResponseNonNullableFields;
386
+ type context$1_OnboardingAvailability = OnboardingAvailability;
387
+ type context$1_OnboardingAvailabilityCreatedEnvelope = OnboardingAvailabilityCreatedEnvelope;
388
+ type context$1_OnboardingAvailabilityUpdatedEnvelope = OnboardingAvailabilityUpdatedEnvelope;
389
+ type context$1_PartnerFlow = PartnerFlow;
390
+ type context$1_PartnerFlowStatus = PartnerFlowStatus;
391
+ declare const context$1_PartnerFlowStatus: typeof PartnerFlowStatus;
392
+ type context$1_RestoreInfo = RestoreInfo;
393
+ type context$1_RestrictedGoodsCategory = RestrictedGoodsCategory;
394
+ declare const context$1_RestrictedGoodsCategory: typeof RestrictedGoodsCategory;
395
+ type context$1_RestrictedGoodsFlow = RestrictedGoodsFlow;
396
+ type context$1_RestrictedGoodsFlowStatus = RestrictedGoodsFlowStatus;
397
+ declare const context$1_RestrictedGoodsFlowStatus: typeof RestrictedGoodsFlowStatus;
398
+ type context$1_UpdateCbdFlowOptions = UpdateCbdFlowOptions;
399
+ type context$1_UpdateCbdFlowRequest = UpdateCbdFlowRequest;
400
+ type context$1_UpdateCbdFlowResponse = UpdateCbdFlowResponse;
401
+ type context$1_UpdateCbdFlowResponseNonNullableFields = UpdateCbdFlowResponseNonNullableFields;
402
+ type context$1_UpdatePartnerFlowOptions = UpdatePartnerFlowOptions;
403
+ type context$1_UpdatePartnerFlowRequest = UpdatePartnerFlowRequest;
404
+ type context$1_UpdatePartnerFlowResponse = UpdatePartnerFlowResponse;
405
+ type context$1_UpdatePartnerFlowResponseNonNullableFields = UpdatePartnerFlowResponseNonNullableFields;
406
+ type context$1_UpdateRestrictedGoodsFlowOptions = UpdateRestrictedGoodsFlowOptions;
407
+ type context$1_UpdateRestrictedGoodsFlowRequest = UpdateRestrictedGoodsFlowRequest;
408
+ type context$1_UpdateRestrictedGoodsFlowResponse = UpdateRestrictedGoodsFlowResponse;
409
+ type context$1_UpdateRestrictedGoodsFlowResponseNonNullableFields = UpdateRestrictedGoodsFlowResponseNonNullableFields;
410
+ declare const context$1_getOnboardingAvailability: typeof getOnboardingAvailability;
411
+ declare const context$1_onOnboardingAvailabilityCreated: typeof onOnboardingAvailabilityCreated;
412
+ declare const context$1_onOnboardingAvailabilityUpdated: typeof onOnboardingAvailabilityUpdated;
413
+ declare const context$1_updateCbdFlow: typeof updateCbdFlow;
414
+ declare const context$1_updatePartnerFlow: typeof updatePartnerFlow;
415
+ declare const context$1_updateRestrictedGoodsFlow: typeof updateRestrictedGoodsFlow;
416
+ declare namespace context$1 {
417
+ export { type ActionEvent$1 as ActionEvent, type context$1_AttestationInfo as AttestationInfo, type BaseEventMetadata$1 as BaseEventMetadata, type context$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 context$1_GetOnboardingAvailabilityRequest as GetOnboardingAvailabilityRequest, type context$1_GetOnboardingAvailabilityResponse as GetOnboardingAvailabilityResponse, type context$1_GetOnboardingAvailabilityResponseNonNullableFields as GetOnboardingAvailabilityResponseNonNullableFields, type IdentificationData$1 as IdentificationData, type IdentificationDataIdOneOf$1 as IdentificationDataIdOneOf, type MessageEnvelope$1 as MessageEnvelope, type context$1_OnboardingAvailability as OnboardingAvailability, type context$1_OnboardingAvailabilityCreatedEnvelope as OnboardingAvailabilityCreatedEnvelope, type context$1_OnboardingAvailabilityUpdatedEnvelope as OnboardingAvailabilityUpdatedEnvelope, type context$1_PartnerFlow as PartnerFlow, context$1_PartnerFlowStatus as PartnerFlowStatus, type context$1_RestoreInfo as RestoreInfo, context$1_RestrictedGoodsCategory as RestrictedGoodsCategory, type context$1_RestrictedGoodsFlow as RestrictedGoodsFlow, context$1_RestrictedGoodsFlowStatus as RestrictedGoodsFlowStatus, Status$1 as Status, type context$1_UpdateCbdFlowOptions as UpdateCbdFlowOptions, type context$1_UpdateCbdFlowRequest as UpdateCbdFlowRequest, type context$1_UpdateCbdFlowResponse as UpdateCbdFlowResponse, type context$1_UpdateCbdFlowResponseNonNullableFields as UpdateCbdFlowResponseNonNullableFields, type context$1_UpdatePartnerFlowOptions as UpdatePartnerFlowOptions, type context$1_UpdatePartnerFlowRequest as UpdatePartnerFlowRequest, type context$1_UpdatePartnerFlowResponse as UpdatePartnerFlowResponse, type context$1_UpdatePartnerFlowResponseNonNullableFields as UpdatePartnerFlowResponseNonNullableFields, type context$1_UpdateRestrictedGoodsFlowOptions as UpdateRestrictedGoodsFlowOptions, type context$1_UpdateRestrictedGoodsFlowRequest as UpdateRestrictedGoodsFlowRequest, type context$1_UpdateRestrictedGoodsFlowResponse as UpdateRestrictedGoodsFlowResponse, type context$1_UpdateRestrictedGoodsFlowResponseNonNullableFields as UpdateRestrictedGoodsFlowResponseNonNullableFields, WebhookIdentityType$1 as WebhookIdentityType, context$1_getOnboardingAvailability as getOnboardingAvailability, context$1_onOnboardingAvailabilityCreated as onOnboardingAvailabilityCreated, context$1_onOnboardingAvailabilityUpdated as onOnboardingAvailabilityUpdated, context$1_updateCbdFlow as updateCbdFlow, context$1_updatePartnerFlow as updatePartnerFlow, context$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 context {
737
1112
  export { type context_ActionEvent as ActionEvent, type context_BaseEventMetadata as BaseEventMetadata, type context_CreateRefundOptions as CreateRefundOptions, type context_CreateRefundRequest as CreateRefundRequest, type context_CreateRefundResponse as CreateRefundResponse, type context_CreateRefundResponseNonNullableFields as CreateRefundResponseNonNullableFields, type context_CursorPaging as CursorPaging, type context_CursorPagingMetadata as CursorPagingMetadata, type context_CursorQuery as CursorQuery, type context_CursorQueryPagingMethodOneOf as CursorQueryPagingMethodOneOf, type context_Cursors as Cursors, type context_DomainEvent as DomainEvent, type context_DomainEventBodyOneOf as DomainEventBodyOneOf, type context_EntityCreatedEvent as EntityCreatedEvent, type context_EntityDeletedEvent as EntityDeletedEvent, type context_EntityUpdatedEvent as EntityUpdatedEvent, type context_EventMetadata as EventMetadata, type context_ExtendedFields as ExtendedFields, type context_GetRefundRequest as GetRefundRequest, type context_GetRefundResponse as GetRefundResponse, type context_GetRefundResponseNonNullableFields as GetRefundResponseNonNullableFields, type context_GetRefundabilityRequest as GetRefundabilityRequest, type context_GetRefundabilityResponse as GetRefundabilityResponse, type context_GetRefundabilityResponseNonNullableFields as GetRefundabilityResponseNonNullableFields, type context_IdentificationData as IdentificationData, type context_IdentificationDataIdOneOf as IdentificationDataIdOneOf, context_Initiator as Initiator, type context_MessageEnvelope as MessageEnvelope, type context_QueryRefundsRequest as QueryRefundsRequest, type context_QueryRefundsResponse as QueryRefundsResponse, type context_QueryRefundsResponseNonNullableFields as QueryRefundsResponseNonNullableFields, type context_Refund as Refund, type context_RefundCreatedEnvelope as RefundCreatedEnvelope, type context_RefundNonNullableFields as RefundNonNullableFields, type context_RefundOptions as RefundOptions, type context_RefundUpdatedEnvelope as RefundUpdatedEnvelope, type context_Refundability as Refundability, type context_RefundabilityDetailsOneOf as RefundabilityDetailsOneOf, type context_RefundsQueryBuilder as RefundsQueryBuilder, type context_RefundsQueryResult as RefundsQueryResult, type context_Rejection as Rejection, context_RejectionReason as RejectionReason, context_SortOrder as SortOrder, type context_Sorting as Sorting, context_Status as Status, type context_StatusInfo as StatusInfo, type context_SyncRefundRequest as SyncRefundRequest, type context_SyncRefundResponse as SyncRefundResponse, type context_UpdateExtendedFieldsOptions as UpdateExtendedFieldsOptions, type context_UpdateExtendedFieldsRequest as UpdateExtendedFieldsRequest, type context_UpdateExtendedFieldsResponse as UpdateExtendedFieldsResponse, type context_UpdateExtendedFieldsResponseNonNullableFields as UpdateExtendedFieldsResponseNonNullableFields, context_WebhookIdentityType as WebhookIdentityType, context_createRefund as createRefund, context_getRefund as getRefund, context_getRefundability as getRefundability, context_onRefundCreated as onRefundCreated, context_onRefundUpdated as onRefundUpdated, context_queryRefunds as queryRefunds, context_updateExtendedFields as updateExtendedFields };
738
1113
  }
739
1114
 
740
- export { context as refunds };
1115
+ export { context$1 as onboardingAvailability, context as refunds };