@wix/packages 1.0.3 → 1.0.4

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/packages",
3
- "version": "1.0.3",
3
+ "version": "1.0.4",
4
4
  "publishConfig": {
5
5
  "registry": "https://registry.npmjs.org/",
6
6
  "access": "public"
@@ -18,7 +18,7 @@
18
18
  "type-bundles"
19
19
  ],
20
20
  "dependencies": {
21
- "@wix/packages_packages": "1.0.3"
21
+ "@wix/packages_packages": "1.0.4"
22
22
  },
23
23
  "devDependencies": {
24
24
  "glob": "^10.4.1",
@@ -42,5 +42,5 @@
42
42
  "fqdn": ""
43
43
  }
44
44
  },
45
- "falconPackageHash": "b7889049b3f8ec55cee8dd77f31bc4bb675ee274299e2a0227548716"
45
+ "falconPackageHash": "b293a1098164fa53e535cbb619b05a4b69bcc170806fd81528d94722"
46
46
  }
@@ -1,611 +1,8 @@
1
- /**
2
- * A package is group of instances of Wix services that a reseller offers to a
3
- * customer as part of a single transaction.
4
- */
5
- interface Package {
6
- /**
7
- * Package ID.
8
- * @readonly
9
- */
10
- _id?: string;
11
- /**
12
- * Wix account ID. See
13
- * [Account Level APIs](https://dev.wix.com/api/rest/account-level-apis/about-account-level-apis)
14
- * for more details.
15
- * @readonly
16
- */
17
- accountId?: string;
18
- /**
19
- * External reference. For example, an external subscription ID.
20
- * This field isn't validated by Wix.
21
- *
22
- * Max: 100 characters
23
- */
24
- externalId?: string | null;
25
- /**
26
- * Product instances that are included in the package.
27
- *
28
- * Min: 1 product instance
29
- * Max: 1000 product instances
30
- */
31
- productInstances?: ProductInstance[];
32
- /**
33
- * Date and time the package was created.
34
- * @readonly
35
- */
36
- _createdDate?: Date;
37
- /**
38
- * Date and time the package was last updated.
39
- * @readonly
40
- */
41
- _updatedDate?: Date;
42
- /**
43
- * Revision number of the `Package` object .
44
- * The `Package` object is only modified when the specified number
45
- * matches the latest revision.
46
- * @readonly
47
- */
48
- revision?: string | null;
49
- }
50
- /**
51
- * A product instance is a specific instance of a Wix service that a reseller
52
- * offers to one of their customers.
53
- */
54
- interface ProductInstance extends ProductInstanceContractDetailsOneOf {
55
- /** Billing information for the contract between the reseller and Wix. */
56
- billingInfo?: ProductInstanceCycle;
57
- /**
58
- * ID of the instance of the resold Wix service. **Note:** Differs from the
59
- * `catalogProductId`. Allows you to identify different instances of the same
60
- * product in a package.
61
- * @readonly
62
- */
63
- instanceId?: string;
64
- /**
65
- * ID of the Wix site that the product instance is assigned to.
66
- * See the [Query Sites API](https://dev.wix.com/api/rest/account-level-apis/sites/query-sites)
67
- * for more information.
68
- */
69
- siteId?: string | null;
70
- /**
71
- * Product ID, as defined in the Wix Premium Product Catalog.
72
- * Contact the [Wix B2B sales team](mailto:bizdev@wix.com)
73
- * for more details about available Wix services.
74
- */
75
- catalogProductId?: string;
76
- /**
77
- * Status of the product instance.
78
- *
79
- * + `PENDING`: The product instance isn't yet available to the customer.
80
- * + `ENABLED`: The customer can use the product instance.
81
- * + `CANCELED`: The product instance isn't any longer available to the customer.
82
- * + `FAILED`: The product instance couldn't be delivered successfully and has never been available to the customer.
83
- * + `AWAITING_ACTION`: The product instance isn't yet available to the customer, because an external provider or the customer must take an action.
84
- * @readonly
85
- */
86
- status?: Status;
87
- /**
88
- * Failure object. Only present for status `FAILED`. Describes why the product instance `FAILED`.
89
- * @readonly
90
- */
91
- failure?: FailureReason;
92
- /**
93
- * Date and time the product instance was created.
94
- * @readonly
95
- */
96
- _createdDate?: Date;
97
- /**
98
- * Date and time the product instance was last updated.
99
- * @readonly
100
- */
101
- _updatedDate?: Date;
102
- /**
103
- * Two-letter country code in
104
- * [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements)
105
- * format. Specifies where customers can claim vouchers that may come with the
106
- * product. Contact the [Wix B2B sales team](mailto:bizdev@wix.com) to get more
107
- * information about vouchers and supported locations.
108
- */
109
- countryCode?: string | null;
110
- /**
111
- * Date and time the product instance expires in `YYYY-MM-DDThh:mm:ss.sssZ` format.
112
- * Used only for instances that don't auto renew at the end of the current billing cycle.
113
- * @readonly
114
- */
115
- expirationDate?: Date;
116
- /**
117
- * Discount code indicating that the reseller provisioned the product instance
118
- * during a sale. Wix doesn't guarantee that a discount code reduces the
119
- * price between Wix and the reseller, even when it's valid. Contact the
120
- * [Wix B2B sales team](mailto:bizdev@wix.com) for more information.
121
- *
122
- * Max: 25 characters
123
- */
124
- discountCode?: string | null;
125
- /**
126
- * ID of a different product instance that you can use to offer your customers
127
- * time-limited free access to an additional product or service. For example,
128
- * Wix offers a 1-year free domain registration to all customers who purchase a
129
- * Premium plan. The referenced product instance must have either status `"PENDING"` or
130
- * `"ACTIVE"`. You can use each product instance only a single time as reference
131
- * instance.
132
- */
133
- referenceProductInstanceId?: string | null;
134
- }
135
- /** @oneof */
136
- interface ProductInstanceContractDetailsOneOf {
137
- /** Billing information for the contract between the reseller and Wix. */
138
- billingInfo?: ProductInstanceCycle;
139
- }
140
- declare enum FailureReasonFailureReason {
141
- UNKNOWN = "UNKNOWN",
142
- /** The delivery of the product took too long */
143
- DELIVERY_TIMEOUT = "DELIVERY_TIMEOUT",
144
- /** An external process failed */
145
- EXTERNAL_FAILURE = "EXTERNAL_FAILURE"
146
- }
147
- declare enum IntervalIntervalUnit {
148
- /** unknown interval unit */
149
- UNKNOWN = "UNKNOWN",
150
- /** day */
151
- DAY = "DAY",
152
- /** week */
153
- WEEK = "WEEK",
154
- /** month */
155
- MONTH = "MONTH",
156
- /** year */
157
- YEAR = "YEAR"
158
- }
159
- declare enum CycleDescriptorType {
160
- UNKNOWN = "UNKNOWN",
161
- ONE_TIME = "ONE_TIME",
162
- RECURRING = "RECURRING"
163
- }
164
- interface CycleInterval {
165
- /** Unit of the billing cycle. */
166
- unit?: IntervalIntervalUnit;
167
- /** Count of units that make up the billing cycle. */
168
- count?: number;
169
- }
170
- declare enum Status {
171
- PENDING = "PENDING",
172
- ENABLED = "ENABLED",
173
- CANCELED = "CANCELED",
174
- FAILED = "FAILED",
175
- AWAITING_ACTION = "AWAITING_ACTION"
176
- }
177
- interface FailureReason {
178
- /**
179
- * Failure code.
180
- *
181
- * + `DELIVERY_TIMEOUT`: The product instance couldn't be created because the Resellers API timed out.
182
- * + `EXTERNAL_FAILURE`: The product instance couldn't be created because an external process failed. Contact the [Wix B2B sales team](mailto:bizdev@wix.com) for more information.
183
- */
184
- code?: FailureReasonFailureReason;
185
- /** Failure message. */
186
- message?: string;
187
- }
188
- interface ProductInstanceCycle {
189
- /**
190
- * Payment type.
191
- * + `UNKNOWN`: The payment type hasn't been set.
192
- * + `ONE_TIME`: The reseller pays Wix in a single payment.
193
- * + `RECURRING`: The reseller pays Wix on a recurring schedule.
194
- */
195
- type?: CycleDescriptorType;
196
- /** Duration of the billing cycle. Available only for `RECURRING` payments. */
197
- cycleDuration?: CycleInterval;
198
- }
199
- interface CreatePackageResponse {
200
- /** Idempotency key. */
201
- idempotencyKey?: string | null;
202
- /** Created package. */
203
- package?: Package;
204
- }
205
- interface CancelPackageResponse {
206
- /** Idempotency key. */
207
- idempotencyKey?: string | null;
208
- /** Canceled package. */
209
- package?: Package;
210
- }
211
- interface GetPackageResponse {
212
- /** Retrieved package. */
213
- package?: Package;
214
- }
215
- interface QueryV2 extends QueryV2PagingMethodOneOf {
216
- /** Paging options to limit and skip the number of items. */
217
- paging?: Paging;
218
- /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */
219
- cursorPaging?: CursorPaging;
220
- /**
221
- * Filter object in the following format:
222
- * `"filter" : {
223
- * "fieldName1": "value1",
224
- * "fieldName2":{"$operator":"value2"}
225
- * }`
226
- * Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`
227
- */
228
- filter?: Record<string, any> | null;
229
- /**
230
- * Sort object in the following format:
231
- * `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]`
232
- */
233
- sort?: Sorting[];
234
- /** Array of projected fields. A list of specific field names to return. If `fieldsets` are also specified, the union of `fieldsets` and `fields` is returned. */
235
- fields?: string[];
236
- /** Array of named, predefined sets of projected fields. A array of predefined named sets of fields to be returned. Specifying multiple `fieldsets` will return the union of fields from all sets. If `fields` are also specified, the union of `fieldsets` and `fields` is returned. */
237
- fieldsets?: string[];
238
- }
239
- /** @oneof */
240
- interface QueryV2PagingMethodOneOf {
241
- /** Paging options to limit and skip the number of items. */
242
- paging?: Paging;
243
- /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */
244
- cursorPaging?: CursorPaging;
245
- }
246
- interface Sorting {
247
- /** Name of the field to sort by. */
248
- fieldName?: string;
249
- /** Sort order. */
250
- order?: SortOrder;
251
- }
252
- declare enum SortOrder {
253
- ASC = "ASC",
254
- DESC = "DESC"
255
- }
256
- interface Paging {
257
- /** Number of items to load. */
258
- limit?: number | null;
259
- /** Number of items to skip in the current sort order. */
260
- offset?: number | null;
261
- }
262
- interface CursorPaging {
263
- /** Maximum number of items to return in the results. */
264
- limit?: number | null;
265
- /**
266
- * Pointer to the next or previous page in the list of results.
267
- *
268
- * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.
269
- * Not relevant for the first request.
270
- */
271
- cursor?: string | null;
272
- }
273
- interface QueryPackagesResponse {
274
- /** Paging metadata. */
275
- metadata?: PagingMetadataV2;
276
- /**
277
- * Retrieved packages.
278
- *
279
- * Max: 1000 packages
280
- */
281
- packages?: Package[];
282
- }
283
- interface PagingMetadataV2 {
284
- /** Number of items returned in the response. */
285
- count?: number | null;
286
- /** Offset that was requested. */
287
- offset?: number | null;
288
- /** Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set. */
289
- total?: number | null;
290
- /** Flag that indicates the server failed to calculate the `total` field. */
291
- tooManyToCount?: boolean | null;
292
- /** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */
293
- cursors?: Cursors;
294
- }
295
- interface Cursors {
296
- /** Cursor string pointing to the next page in the list of results. */
297
- next?: string | null;
298
- /** Cursor pointing to the previous page in the list of results. */
299
- prev?: string | null;
300
- }
301
- interface AssignProductInstanceToSiteResponse {
302
- /** Idempotency key. */
303
- idempotencyKey?: string | null;
304
- /** Updated package that includes the assigned product instance. */
305
- package?: Package;
306
- }
307
- interface UnassignProductInstanceFromSiteResponse {
308
- /** Idempotency key. */
309
- idempotencyKey?: string | null;
310
- /** Updated package that includes the unassigned product instance. */
311
- package?: Package;
312
- }
313
- interface CancelProductInstanceResponse {
314
- /** Idempotency key. */
315
- idempotencyKey?: string | null;
316
- /** Updated package that includes the previously included the canceled product instance. */
317
- package?: Package;
318
- }
319
- interface AdjustProductInstanceSpecificationsResponse {
320
- /** Idempotency key. */
321
- idempotencyKey?: string | null;
322
- /** Updated package that includes the adjusted product instance. */
323
- package?: Package;
324
- }
325
- interface UpdatePackageResponse {
326
- /** Idempotency Key */
327
- idempotencyKey?: string | null;
328
- /** Updated Package */
329
- package?: Package;
330
- }
331
- interface CreatePackageResponseNonNullableFields {
332
- package?: {
333
- _id: string;
334
- accountId: string;
335
- productInstances: {
336
- billingInfo?: {
337
- type: CycleDescriptorType;
338
- cycleDuration?: {
339
- unit: IntervalIntervalUnit;
340
- count: number;
341
- };
342
- };
343
- instanceId: string;
344
- catalogProductId: string;
345
- status: Status;
346
- failure?: {
347
- code: FailureReasonFailureReason;
348
- message: string;
349
- };
350
- }[];
351
- };
352
- }
353
- interface CancelPackageResponseNonNullableFields {
354
- package?: {
355
- _id: string;
356
- accountId: string;
357
- productInstances: {
358
- billingInfo?: {
359
- type: CycleDescriptorType;
360
- cycleDuration?: {
361
- unit: IntervalIntervalUnit;
362
- count: number;
363
- };
364
- };
365
- instanceId: string;
366
- catalogProductId: string;
367
- status: Status;
368
- failure?: {
369
- code: FailureReasonFailureReason;
370
- message: string;
371
- };
372
- }[];
373
- };
374
- }
375
- interface GetPackageResponseNonNullableFields {
376
- package?: {
377
- _id: string;
378
- accountId: string;
379
- productInstances: {
380
- billingInfo?: {
381
- type: CycleDescriptorType;
382
- cycleDuration?: {
383
- unit: IntervalIntervalUnit;
384
- count: number;
385
- };
386
- };
387
- instanceId: string;
388
- catalogProductId: string;
389
- status: Status;
390
- failure?: {
391
- code: FailureReasonFailureReason;
392
- message: string;
393
- };
394
- }[];
395
- };
396
- }
397
- interface QueryPackagesResponseNonNullableFields {
398
- packages: {
399
- _id: string;
400
- accountId: string;
401
- productInstances: {
402
- billingInfo?: {
403
- type: CycleDescriptorType;
404
- cycleDuration?: {
405
- unit: IntervalIntervalUnit;
406
- count: number;
407
- };
408
- };
409
- instanceId: string;
410
- catalogProductId: string;
411
- status: Status;
412
- failure?: {
413
- code: FailureReasonFailureReason;
414
- message: string;
415
- };
416
- }[];
417
- }[];
418
- }
419
- interface AssignProductInstanceToSiteResponseNonNullableFields {
420
- package?: {
421
- _id: string;
422
- accountId: string;
423
- productInstances: {
424
- billingInfo?: {
425
- type: CycleDescriptorType;
426
- cycleDuration?: {
427
- unit: IntervalIntervalUnit;
428
- count: number;
429
- };
430
- };
431
- instanceId: string;
432
- catalogProductId: string;
433
- status: Status;
434
- failure?: {
435
- code: FailureReasonFailureReason;
436
- message: string;
437
- };
438
- }[];
439
- };
440
- }
441
- interface UnassignProductInstanceFromSiteResponseNonNullableFields {
442
- package?: {
443
- _id: string;
444
- accountId: string;
445
- productInstances: {
446
- billingInfo?: {
447
- type: CycleDescriptorType;
448
- cycleDuration?: {
449
- unit: IntervalIntervalUnit;
450
- count: number;
451
- };
452
- };
453
- instanceId: string;
454
- catalogProductId: string;
455
- status: Status;
456
- failure?: {
457
- code: FailureReasonFailureReason;
458
- message: string;
459
- };
460
- }[];
461
- };
462
- }
463
- interface CancelProductInstanceResponseNonNullableFields {
464
- package?: {
465
- _id: string;
466
- accountId: string;
467
- productInstances: {
468
- billingInfo?: {
469
- type: CycleDescriptorType;
470
- cycleDuration?: {
471
- unit: IntervalIntervalUnit;
472
- count: number;
473
- };
474
- };
475
- instanceId: string;
476
- catalogProductId: string;
477
- status: Status;
478
- failure?: {
479
- code: FailureReasonFailureReason;
480
- message: string;
481
- };
482
- }[];
483
- };
484
- }
485
- interface AdjustProductInstanceSpecificationsResponseNonNullableFields {
486
- package?: {
487
- _id: string;
488
- accountId: string;
489
- productInstances: {
490
- billingInfo?: {
491
- type: CycleDescriptorType;
492
- cycleDuration?: {
493
- unit: IntervalIntervalUnit;
494
- count: number;
495
- };
496
- };
497
- instanceId: string;
498
- catalogProductId: string;
499
- status: Status;
500
- failure?: {
501
- code: FailureReasonFailureReason;
502
- message: string;
503
- };
504
- }[];
505
- };
506
- }
507
- interface UpdatePackageResponseNonNullableFields {
508
- package?: {
509
- _id: string;
510
- accountId: string;
511
- productInstances: {
512
- billingInfo?: {
513
- type: CycleDescriptorType;
514
- cycleDuration?: {
515
- unit: IntervalIntervalUnit;
516
- count: number;
517
- };
518
- };
519
- instanceId: string;
520
- catalogProductId: string;
521
- status: Status;
522
- failure?: {
523
- code: FailureReasonFailureReason;
524
- message: string;
525
- };
526
- }[];
527
- };
528
- }
529
- interface CreatePackageOptions {
530
- /** Idempotency key. */
531
- idempotencyKey?: string | null;
532
- /** External reference. For example, an external subscription ID. **Note:** This field is not validated by Wix. */
533
- externalId?: string | null;
534
- /** Wix services that are resold. */
535
- products: ProductInstance[];
536
- }
537
- interface CreatePackageV2Options {
538
- /** Idempotency key. */
539
- idempotencyKey?: string | null;
540
- /** External reference. For example, an external subscription ID. **Note:** This field is not validated by Wix. */
541
- externalId?: string | null;
542
- /** Wix services that are resold. */
543
- products: ProductInstance[];
544
- }
545
- interface CancelPackageOptions {
546
- /** Idempotency key. */
547
- idempotencyKey?: string | null;
548
- }
549
- interface AssignProductInstanceToSiteIdentifiers {
550
- /** ID of the product instance to assign to a site. */
551
- instanceId: string;
552
- /** ID of the site to which the product instance is assigned. */
553
- siteId: string;
554
- }
555
- interface AssignProductInstanceToSiteOptions {
556
- /** Idempotency key. */
557
- idempotencyKey?: string | null;
558
- }
559
- interface UnassignProductInstanceFromSiteOptions {
560
- /** Idempotency key. */
561
- idempotencyKey?: string | null;
562
- }
563
- interface CancelProductInstanceOptions {
564
- /** Idempotency key. */
565
- idempotencyKey?: string | null;
566
- }
567
- interface AdjustProductInstanceSpecificationsOptions {
568
- /** Idempotency key. */
569
- idempotencyKey?: string | null;
570
- /**
571
- * ID of the product to replace the original instance. Required in case you don't
572
- * provide a new `billingInfo` object.
573
- */
574
- catalogProductId?: string | null;
575
- /**
576
- * Information about the billing cycle. Required in case you don't provide a new
577
- * `catalogProductId`. The new billing cycle must be supported for the service.
578
- * Contact the [Wix B2B sales team](mailto:bizdev@wix.com) for
579
- * information about a service's supported billing cycles. If
580
- * you adjust the billing cycle for a product instance with `RECURRING`
581
- * payments, you must also provide `billingInfo.cycleDuration.unit`.
582
- */
583
- billingInfo?: ProductInstanceCycle;
584
- /**
585
- * Discount code indicating that the reseller provisioned the product instance
586
- * during a sale. Ignored when you don't pass a new `catalogProductId` as well.
587
- * In case you pass a code that isn't valid, the call succeeds and
588
- * no discount is applied to the product instance. Wix doesn't guarantee that a
589
- * discount code reduces the price between Wix and the reseller, even when it's
590
- * valid. You can't add a discount code after you've created the
591
- * product instance. Contact the [Wix B2B sales team](mailto:bizdev@wix.com) for
592
- * more information about supported codes.
593
- *
594
- * Max: 25 characters
595
- */
596
- discountCode?: string | null;
597
- }
598
- interface UpdatePackageOptions {
599
- /** Idempotency Key */
600
- idempotencyKey?: string | null;
601
- /** Updated Package */
602
- package?: Package;
603
- }
604
-
605
1
  type RESTFunctionDescriptor<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient) => T;
606
2
  interface HttpClient {
607
3
  request<TResponse, TData = any>(req: RequestOptionsFactory<TResponse, TData>): Promise<HttpResponse<TResponse>>;
608
- fetchWithAuth: (url: string | URL, init?: RequestInit) => Promise<Response>;
4
+ fetchWithAuth: typeof fetch;
5
+ wixAPIFetch: (relativeUrl: string, options: RequestInit) => Promise<Response>;
609
6
  }
610
7
  type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
611
8
  type HttpResponse<T = any> = {
@@ -635,27 +32,18 @@ declare global {
635
32
  }
636
33
  }
637
34
 
638
- declare function createPackage$1(httpClient: HttpClient): (options?: CreatePackageOptions) => Promise<CreatePackageResponse & CreatePackageResponseNonNullableFields>;
639
- declare function createPackageV2$1(httpClient: HttpClient): (options?: CreatePackageV2Options) => Promise<CreatePackageResponse & CreatePackageResponseNonNullableFields>;
640
- declare function cancelPackage$1(httpClient: HttpClient): (_id: string, options?: CancelPackageOptions) => Promise<CancelPackageResponse & CancelPackageResponseNonNullableFields>;
641
- declare function getPackage$1(httpClient: HttpClient): (_id: string) => Promise<GetPackageResponse & GetPackageResponseNonNullableFields>;
642
- declare function queryPackages$1(httpClient: HttpClient): (query: QueryV2) => Promise<QueryPackagesResponse & QueryPackagesResponseNonNullableFields>;
643
- declare function assignProductInstanceToSite$1(httpClient: HttpClient): (identifiers: AssignProductInstanceToSiteIdentifiers, options?: AssignProductInstanceToSiteOptions) => Promise<AssignProductInstanceToSiteResponse & AssignProductInstanceToSiteResponseNonNullableFields>;
644
- declare function unassignProductInstanceFromSite$1(httpClient: HttpClient): (instanceId: string, options?: UnassignProductInstanceFromSiteOptions) => Promise<UnassignProductInstanceFromSiteResponse & UnassignProductInstanceFromSiteResponseNonNullableFields>;
645
- declare function cancelProductInstance$1(httpClient: HttpClient): (instanceId: string, options?: CancelProductInstanceOptions) => Promise<CancelProductInstanceResponse & CancelProductInstanceResponseNonNullableFields>;
646
- declare function adjustProductInstanceSpecifications$1(httpClient: HttpClient): (instanceId: string, options?: AdjustProductInstanceSpecificationsOptions) => Promise<AdjustProductInstanceSpecificationsResponse & AdjustProductInstanceSpecificationsResponseNonNullableFields>;
647
- declare function updatePackage$1(httpClient: HttpClient): (options?: UpdatePackageOptions) => Promise<UpdatePackageResponse & UpdatePackageResponseNonNullableFields>;
35
+ declare function createRESTModule<T extends RESTFunctionDescriptor>(descriptor: T, elevated?: boolean): BuildRESTFunction<T> & T;
648
36
 
649
- declare const createPackage: BuildRESTFunction<typeof createPackage$1>;
650
- declare const createPackageV2: BuildRESTFunction<typeof createPackageV2$1>;
651
- declare const cancelPackage: BuildRESTFunction<typeof cancelPackage$1>;
652
- declare const getPackage: BuildRESTFunction<typeof getPackage$1>;
653
- declare const queryPackages: BuildRESTFunction<typeof queryPackages$1>;
654
- declare const assignProductInstanceToSite: BuildRESTFunction<typeof assignProductInstanceToSite$1>;
655
- declare const unassignProductInstanceFromSite: BuildRESTFunction<typeof unassignProductInstanceFromSite$1>;
656
- declare const cancelProductInstance: BuildRESTFunction<typeof cancelProductInstance$1>;
657
- declare const adjustProductInstanceSpecifications: BuildRESTFunction<typeof adjustProductInstanceSpecifications$1>;
658
- declare const updatePackage: BuildRESTFunction<typeof updatePackage$1>;
37
+ declare const createPackage: ReturnType<typeof createRESTModule<typeof publicCreatePackage>>;
38
+ declare const createPackageV2: ReturnType<typeof createRESTModule<typeof publicCreatePackageV2>>;
39
+ declare const cancelPackage: ReturnType<typeof createRESTModule<typeof publicCancelPackage>>;
40
+ declare const getPackage: ReturnType<typeof createRESTModule<typeof publicGetPackage>>;
41
+ declare const queryPackages: ReturnType<typeof createRESTModule<typeof publicQueryPackages>>;
42
+ declare const assignProductInstanceToSite: ReturnType<typeof createRESTModule<typeof publicAssignProductInstanceToSite>>;
43
+ declare const unassignProductInstanceFromSite: ReturnType<typeof createRESTModule<typeof publicUnassignProductInstanceFromSite>>;
44
+ declare const cancelProductInstance: ReturnType<typeof createRESTModule<typeof publicCancelProductInstance>>;
45
+ declare const adjustProductInstanceSpecifications: ReturnType<typeof createRESTModule<typeof publicAdjustProductInstanceSpecifications>>;
46
+ declare const updatePackage: ReturnType<typeof createRESTModule<typeof publicUpdatePackage>>;
659
47
 
660
48
  declare const context_adjustProductInstanceSpecifications: typeof adjustProductInstanceSpecifications;
661
49
  declare const context_assignProductInstanceToSite: typeof assignProductInstanceToSite;
@@ -1470,7 +1470,8 @@ interface UpdatePackageOptions {
1470
1470
 
1471
1471
  interface HttpClient {
1472
1472
  request<TResponse, TData = any>(req: RequestOptionsFactory<TResponse, TData>): Promise<HttpResponse<TResponse>>;
1473
- fetchWithAuth: (url: string | URL, init?: RequestInit) => Promise<Response>;
1473
+ fetchWithAuth: typeof fetch;
1474
+ wixAPIFetch: (relativeUrl: string, options: RequestInit) => Promise<Response>;
1474
1475
  }
1475
1476
  type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
1476
1477
  type HttpResponse<T = any> = {