@wix/packages 1.0.9 → 1.0.11
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/build/cjs/index.d.ts +2 -1
- package/build/cjs/index.js +2 -1
- package/build/cjs/index.js.map +1 -1
- package/build/es/index.d.ts +2 -1
- package/build/es/index.js +2 -1
- package/build/es/index.js.map +1 -1
- package/package.json +5 -4
- package/type-bundles/context.bundle.d.ts +305 -52
- package/type-bundles/index.bundle.d.ts +305 -52
- package/type-bundles/meta.bundle.d.ts +14 -18
package/build/cjs/index.d.ts
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import * as packages from '@wix/packages_packages';
|
|
2
|
+
export { packages };
|
package/build/cjs/index.js
CHANGED
|
@@ -24,5 +24,6 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
26
|
exports.packages = void 0;
|
|
27
|
-
|
|
27
|
+
const packages = __importStar(require("@wix/packages_packages"));
|
|
28
|
+
exports.packages = packages;
|
|
28
29
|
//# sourceMappingURL=index.js.map
|
package/build/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iEAAmD;AAE1C,4BAAQ"}
|
package/build/es/index.d.ts
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import * as packages from '@wix/packages_packages';
|
|
2
|
+
export { packages };
|
package/build/es/index.js
CHANGED
package/build/es/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,QAAQ,MAAM,wBAAwB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,QAAQ,MAAM,wBAAwB,CAAC;AAEnD,OAAO,EAAE,QAAQ,EAAE,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/packages",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.11",
|
|
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.
|
|
21
|
+
"@wix/packages_packages": "1.0.11"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
24
|
"glob": "^10.4.1",
|
|
@@ -27,8 +27,9 @@
|
|
|
27
27
|
"typescript": "^5.3.2"
|
|
28
28
|
},
|
|
29
29
|
"scripts": {
|
|
30
|
-
"build": "tsc -b tsconfig.json tsconfig.esm.json && npm run build:dts-bundles",
|
|
30
|
+
"build": "tsc -b tsconfig.json tsconfig.esm.json && npm run build:dts-bundles && npm run build:validate-dts",
|
|
31
31
|
"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
|
+
"build:validate-dts": "tsc type-bundles/*.d.ts --noEmit",
|
|
32
33
|
"test": ":"
|
|
33
34
|
},
|
|
34
35
|
"wix": {
|
|
@@ -42,5 +43,5 @@
|
|
|
42
43
|
"fqdn": ""
|
|
43
44
|
}
|
|
44
45
|
},
|
|
45
|
-
"falconPackageHash": "
|
|
46
|
+
"falconPackageHash": "8a3165c1dc4a72564b49210b90c58373171f6805b68dab07b5844e4e"
|
|
46
47
|
}
|
|
@@ -1,3 +1,37 @@
|
|
|
1
|
+
type RESTFunctionDescriptor<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient) => T;
|
|
2
|
+
interface HttpClient {
|
|
3
|
+
request<TResponse, TData = any>(req: RequestOptionsFactory<TResponse, TData>): Promise<HttpResponse<TResponse>>;
|
|
4
|
+
fetchWithAuth: typeof fetch;
|
|
5
|
+
wixAPIFetch: (relativeUrl: string, options: RequestInit) => Promise<Response>;
|
|
6
|
+
}
|
|
7
|
+
type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
|
|
8
|
+
type HttpResponse<T = any> = {
|
|
9
|
+
data: T;
|
|
10
|
+
status: number;
|
|
11
|
+
statusText: string;
|
|
12
|
+
headers: any;
|
|
13
|
+
request?: any;
|
|
14
|
+
};
|
|
15
|
+
type RequestOptions<_TResponse = any, Data = any> = {
|
|
16
|
+
method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
|
|
17
|
+
url: string;
|
|
18
|
+
data?: Data;
|
|
19
|
+
params?: URLSearchParams;
|
|
20
|
+
} & APIMetadata;
|
|
21
|
+
type APIMetadata = {
|
|
22
|
+
methodFqn?: string;
|
|
23
|
+
entityFqdn?: string;
|
|
24
|
+
packageName?: string;
|
|
25
|
+
};
|
|
26
|
+
type BuildRESTFunction<T extends RESTFunctionDescriptor> = T extends RESTFunctionDescriptor<infer U> ? U : never;
|
|
27
|
+
|
|
28
|
+
declare global {
|
|
29
|
+
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
30
|
+
interface SymbolConstructor {
|
|
31
|
+
readonly observable: symbol;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
1
35
|
/**
|
|
2
36
|
* A package is group of instances of Wix services that a reseller offers to a
|
|
3
37
|
* customer as part of a single transaction.
|
|
@@ -10,7 +44,7 @@ interface Package {
|
|
|
10
44
|
_id?: string;
|
|
11
45
|
/**
|
|
12
46
|
* Wix account ID. See
|
|
13
|
-
* [Account Level APIs](https://dev.wix.com/
|
|
47
|
+
* [Account Level APIs](https://dev.wix.com/docs/rest/account-level/about-account-level-apis)
|
|
14
48
|
* for more details.
|
|
15
49
|
* @readonly
|
|
16
50
|
*/
|
|
@@ -248,17 +282,15 @@ interface QueryV2 extends QueryV2PagingMethodOneOf {
|
|
|
248
282
|
/** 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`. */
|
|
249
283
|
cursorPaging?: CursorPaging;
|
|
250
284
|
/**
|
|
251
|
-
* Filter object
|
|
252
|
-
*
|
|
253
|
-
*
|
|
254
|
-
* "fieldName2":{"$operator":"value2"}
|
|
255
|
-
* }`
|
|
256
|
-
* Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`
|
|
285
|
+
* Filter object.
|
|
286
|
+
*
|
|
287
|
+
* Learn more about the [filter section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-filter-section).
|
|
257
288
|
*/
|
|
258
289
|
filter?: Record<string, any> | null;
|
|
259
290
|
/**
|
|
260
|
-
* Sort object
|
|
261
|
-
*
|
|
291
|
+
* Sort object.
|
|
292
|
+
*
|
|
293
|
+
* Learn more about the [sort section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-sort-section).
|
|
262
294
|
*/
|
|
263
295
|
sort?: Sorting[];
|
|
264
296
|
/** 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. */
|
|
@@ -1312,52 +1344,273 @@ interface UpdatePackageExternalIdIdentifiers {
|
|
|
1312
1344
|
externalId: string;
|
|
1313
1345
|
}
|
|
1314
1346
|
|
|
1315
|
-
|
|
1316
|
-
interface
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1347
|
+
declare function createPackage$1(httpClient: HttpClient): CreatePackageSignature;
|
|
1348
|
+
interface CreatePackageSignature {
|
|
1349
|
+
/**
|
|
1350
|
+
* Creates a new package.
|
|
1351
|
+
*
|
|
1352
|
+
* Deprecated: This method is deprecated and will be removed by 2024-12-31.
|
|
1353
|
+
* Use com.wixpress.premium.reseller.packages.v1.Packages.CreatePackageV2 instead.
|
|
1354
|
+
*
|
|
1355
|
+
* HTTP Request:
|
|
1356
|
+
* POST /v1/packages
|
|
1357
|
+
*
|
|
1358
|
+
* Permissions:
|
|
1359
|
+
* Requires the "premium.reseller-package.manage" permission with MANUAL type.
|
|
1360
|
+
*
|
|
1361
|
+
* Event:
|
|
1362
|
+
* A PRIVATE callback will be triggered when the package is successfully created.
|
|
1363
|
+
*
|
|
1364
|
+
* Required Fields:
|
|
1365
|
+
* - CreatePackageRequest.products
|
|
1366
|
+
*
|
|
1367
|
+
* Maturity: BETA
|
|
1368
|
+
* Exposure: PUBLIC
|
|
1369
|
+
* @deprecated
|
|
1370
|
+
*/
|
|
1371
|
+
(options?: CreatePackageOptions | undefined): Promise<CreatePackageResponse & CreatePackageResponseNonNullableFields>;
|
|
1320
1372
|
}
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1373
|
+
declare function createPackageV2$1(httpClient: HttpClient): CreatePackageV2Signature;
|
|
1374
|
+
interface CreatePackageV2Signature {
|
|
1375
|
+
/**
|
|
1376
|
+
* Creates a package of product instances.
|
|
1377
|
+
*
|
|
1378
|
+
*
|
|
1379
|
+
* You must pass the relevant Wix account ID in the header of the call. In
|
|
1380
|
+
* the DIY flow, we recommend to pass the customer's sub-account ID instead
|
|
1381
|
+
* of your main reseller account ID.
|
|
1382
|
+
*
|
|
1383
|
+
* You may also pass a Wix site ID for each product in the body of the call.
|
|
1384
|
+
* If you omit the site ID, a floating product instance is created.
|
|
1385
|
+
*
|
|
1386
|
+
* When Wix customers purchase a specific paid service or product, Wix may offer
|
|
1387
|
+
* them time-limited free access to a different product. For example, customers
|
|
1388
|
+
* get a voucher for a free 1-year domain registration when purchasing any Wix
|
|
1389
|
+
* Premium plan. If you want to offer your customers the same benefit, create a
|
|
1390
|
+
* package containing the original product first. Then, create a second package
|
|
1391
|
+
* with the additional product. In the second Create Package call, pass the
|
|
1392
|
+
* instance ID of the original product as `referenceProductInstanceId`. This way,
|
|
1393
|
+
* Wix doesn't charge you for the additional product. Make sure that the status
|
|
1394
|
+
* of the referenced product is either `"PENDING"` or `"ACTIVE"`. Note that you
|
|
1395
|
+
* can use each product instance only a single time as reference instance.
|
|
1396
|
+
*
|
|
1397
|
+
* You need to pass a `countryCode` to specify where customers can claim
|
|
1398
|
+
* vouchers that may come with a product. Contact the
|
|
1399
|
+
* [Wix B2B sales team](mailto:bizdev@wix.com) to get information about
|
|
1400
|
+
* vouchers and supported locations.
|
|
1401
|
+
*
|
|
1402
|
+
* > **Important**: This call requires an account level API key and cannot be
|
|
1403
|
+
* > authenticated with the standard authorization header.
|
|
1404
|
+
*/
|
|
1405
|
+
(options?: CreatePackageV2Options | undefined): Promise<CreatePackageResponse & CreatePackageResponseNonNullableFields>;
|
|
1406
|
+
}
|
|
1407
|
+
declare function cancelPackage$1(httpClient: HttpClient): CancelPackageSignature;
|
|
1408
|
+
interface CancelPackageSignature {
|
|
1409
|
+
/**
|
|
1410
|
+
* Cancels all product instances included in the package and the customer
|
|
1411
|
+
* immediately looses access to the canceled functionality.
|
|
1412
|
+
*
|
|
1413
|
+
*
|
|
1414
|
+
* You must pass the ID of the Wix account that the package belongs to in the
|
|
1415
|
+
* header of the call. The call fails, if the package and Wix account don't
|
|
1416
|
+
* match.
|
|
1417
|
+
*
|
|
1418
|
+
* If a canceled product instance is a requirement for another Wix service, that
|
|
1419
|
+
* functionality is also no longer available to the customer. For example, if
|
|
1420
|
+
* you cancel a Premium plan, a previously connected domain is automatically
|
|
1421
|
+
* disconnected from the site.
|
|
1422
|
+
*
|
|
1423
|
+
* > **Important**: This call requires an account level API key and cannot be
|
|
1424
|
+
* > authenticated with the standard authorization header.
|
|
1425
|
+
* @param - ID of the package to cancel.
|
|
1426
|
+
*/
|
|
1427
|
+
(_id: string, options?: CancelPackageOptions | undefined): Promise<CancelPackageResponse & CancelPackageResponseNonNullableFields>;
|
|
1428
|
+
}
|
|
1429
|
+
declare function getPackage$1(httpClient: HttpClient): GetPackageSignature;
|
|
1430
|
+
interface GetPackageSignature {
|
|
1431
|
+
/**
|
|
1432
|
+
* Retrieves a package.
|
|
1433
|
+
*
|
|
1434
|
+
*
|
|
1435
|
+
* You must pass the ID of the Wix account that the package belongs to in the
|
|
1436
|
+
* header of the call. The call fails, if the package and Wix account don't
|
|
1437
|
+
* match.
|
|
1438
|
+
*
|
|
1439
|
+
* > **Important**: This call requires an account level API key and cannot be
|
|
1440
|
+
* > authenticated with the standard authorization header.
|
|
1441
|
+
* @param - Package ID.
|
|
1442
|
+
*/
|
|
1443
|
+
(_id: string): Promise<GetPackageResponse & GetPackageResponseNonNullableFields>;
|
|
1444
|
+
}
|
|
1445
|
+
declare function queryPackages$1(httpClient: HttpClient): QueryPackagesSignature;
|
|
1446
|
+
interface QueryPackagesSignature {
|
|
1447
|
+
/**
|
|
1448
|
+
* Retrieves a list of packages, given the provided paging, filtering, and sorting.
|
|
1449
|
+
*
|
|
1450
|
+
*
|
|
1451
|
+
* You must pass the ID of the Wix account that the packages belong to in the
|
|
1452
|
+
* header of the call. The call returns packages that belong to the parent
|
|
1453
|
+
* account, regardless if you pass the ID of a parent or sub-account. In case
|
|
1454
|
+
* you want to retrieve only packages that belong to a sub-account, you must
|
|
1455
|
+
* pass the sub-account ID as `filter` in the `query` object like this:
|
|
1456
|
+
*
|
|
1457
|
+
* ```json
|
|
1458
|
+
* {
|
|
1459
|
+
* "query": {
|
|
1460
|
+
* "filter": {
|
|
1461
|
+
* "accountId": {
|
|
1462
|
+
* "$eq": "<SUB_ACCOUNT_ID>"
|
|
1463
|
+
* }
|
|
1464
|
+
* }
|
|
1465
|
+
* }
|
|
1466
|
+
* }
|
|
1467
|
+
* ```
|
|
1468
|
+
*
|
|
1469
|
+
* Query Packages runs with these defaults, which you can override:
|
|
1470
|
+
*
|
|
1471
|
+
* - `createdDate` is sorted in `DESC` order
|
|
1472
|
+
* - `cursorPaging.limit` is `100`
|
|
1473
|
+
*
|
|
1474
|
+
* By default `pagingMetadata.cursors` are returned, unless you specifically pass
|
|
1475
|
+
* `query.paging`.
|
|
1476
|
+
*
|
|
1477
|
+
* The maximum for `cursorPaging.limit` is `100`.
|
|
1478
|
+
*
|
|
1479
|
+
* If you pass a cursor token that you have received in a previous Query Package response,
|
|
1480
|
+
* passing additional sort or filter information results in an invalid cursor
|
|
1481
|
+
* error. Since the received cursor token already holds all the needed information
|
|
1482
|
+
* for sort and filter. Changing the sort and filter properties during the span of
|
|
1483
|
+
* a cursor query isn't supported. But you can provide a different limit.
|
|
1484
|
+
*
|
|
1485
|
+
* For field support for filters and sorting,
|
|
1486
|
+
* see [Query Packages: Supported Filters and Sorting](https://dev.wix.com/api/rest/account-level-apis/resellers/supported-filters).
|
|
1487
|
+
*
|
|
1488
|
+
* To learn about working with _Query_ endpoints, see
|
|
1489
|
+
* [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language),
|
|
1490
|
+
* [Sorting and Paging](https://dev.wix.com/api/rest/getting-started/pagination),
|
|
1491
|
+
* and [Field Projection](https://dev.wix.com/api/rest/getting-started/field-projection).
|
|
1492
|
+
*
|
|
1493
|
+
* > **Important**: This call requires an account level API key and cannot be
|
|
1494
|
+
* > authenticated with the standard authorization header.
|
|
1495
|
+
* @param - Query options. See [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language) for more details.
|
|
1496
|
+
*/
|
|
1497
|
+
(query: QueryV2): Promise<QueryPackagesResponse & QueryPackagesResponseNonNullableFields>;
|
|
1498
|
+
}
|
|
1499
|
+
declare function assignProductInstanceToSite$1(httpClient: HttpClient): AssignProductInstanceToSiteSignature;
|
|
1500
|
+
interface AssignProductInstanceToSiteSignature {
|
|
1501
|
+
/**
|
|
1502
|
+
* Assigns a product instance to a site.
|
|
1503
|
+
*
|
|
1504
|
+
* You must pass the ID of the Wix account that the product instance belongs to in the header of the call.
|
|
1505
|
+
*
|
|
1506
|
+
* The customer immediately gains access to features included in the assigned service. It's up to the reseller to decide whether assigning a product instance affects the customer’s payment.
|
|
1507
|
+
*
|
|
1508
|
+
* It's possible to assign a product instance that's already assigned to a site, to a different site without [unassigning](/packages/unassign-product-instance-from-site) it first. But if the call fails in such a situation, the product instance may either remain assigned to the original site or become unassigned. You can confirm the instance's status by [retrieving the relevant package](/packages/get-package).
|
|
1509
|
+
*
|
|
1510
|
+
* > **Important:** This call requires an account level API key and cannot be authenticated with the standard authorization header.
|
|
1511
|
+
*/
|
|
1512
|
+
(identifiers: AssignProductInstanceToSiteIdentifiers, options?: AssignProductInstanceToSiteOptions | undefined): Promise<AssignProductInstanceToSiteResponse & AssignProductInstanceToSiteResponseNonNullableFields>;
|
|
1513
|
+
}
|
|
1514
|
+
declare function unassignProductInstanceFromSite$1(httpClient: HttpClient): UnassignProductInstanceFromSiteSignature;
|
|
1515
|
+
interface UnassignProductInstanceFromSiteSignature {
|
|
1516
|
+
/**
|
|
1517
|
+
* Unassigns a product instance from a site.
|
|
1518
|
+
*
|
|
1519
|
+
* You must pass the ID of the Wix account that the product instance belongs to in the header of the call.
|
|
1520
|
+
*
|
|
1521
|
+
* The product instance becomes floating and the customer immediately looses access to features included in the unassigned service. It's up to the reseller to decide whether unassigning a product instance affects the customer’s payment.
|
|
1522
|
+
*
|
|
1523
|
+
* If an unassigned product instance is a requirement for another service, that service may not be available to the customer any longer. For example, if you unassign a `Combo Plan` plan from a site, a previously connected domain is disconnected.
|
|
1524
|
+
*
|
|
1525
|
+
* You can assign floating product instances to sites using the [Assign Product Instance to Site](/packages/assign-product-instance-to-site) method.
|
|
1526
|
+
*
|
|
1527
|
+
* > **Important:** This call requires an account level API key and cannot be authenticated with the standard authorization header.
|
|
1528
|
+
* @param - ID of the product instance to unassign from a site.
|
|
1529
|
+
*/
|
|
1530
|
+
(instanceId: string, options?: UnassignProductInstanceFromSiteOptions | undefined): Promise<UnassignProductInstanceFromSiteResponse & UnassignProductInstanceFromSiteResponseNonNullableFields>;
|
|
1531
|
+
}
|
|
1532
|
+
declare function cancelProductInstance$1(httpClient: HttpClient): CancelProductInstanceSignature;
|
|
1533
|
+
interface CancelProductInstanceSignature {
|
|
1534
|
+
/**
|
|
1535
|
+
* Cancels a product instance.
|
|
1536
|
+
*
|
|
1537
|
+
*
|
|
1538
|
+
* You must pass the ID of the Wix account that the product instance belongs
|
|
1539
|
+
* to in the header of the call. The call fails, if the product instance and
|
|
1540
|
+
* Wix account don't match.
|
|
1541
|
+
*
|
|
1542
|
+
* The customer immediately looses access to features included in the
|
|
1543
|
+
* canceled service. It's up to the reseller to decide whether the adjustment
|
|
1544
|
+
* affects the customer’s payment.
|
|
1545
|
+
*
|
|
1546
|
+
* If a canceled service is a requirement for another service, that service
|
|
1547
|
+
* may not be available to the customer any longer. For example, if you cancel
|
|
1548
|
+
* a `Combo Plan` plan, a previously connected domain is disconnected
|
|
1549
|
+
* from the site.
|
|
1550
|
+
*
|
|
1551
|
+
*
|
|
1552
|
+
* > **Important**: This call requires an account level API key and cannot be
|
|
1553
|
+
* > authenticated with the standard authorization header.
|
|
1554
|
+
* @param - ID of the product instance to cancel.
|
|
1555
|
+
*/
|
|
1556
|
+
(instanceId: string, options?: CancelProductInstanceOptions | undefined): Promise<CancelProductInstanceResponse & CancelProductInstanceResponseNonNullableFields>;
|
|
1557
|
+
}
|
|
1558
|
+
declare function adjustProductInstanceSpecifications$1(httpClient: HttpClient): AdjustProductInstanceSpecificationsSignature;
|
|
1559
|
+
interface AdjustProductInstanceSpecificationsSignature {
|
|
1560
|
+
/**
|
|
1561
|
+
* Upgrades or downgrades a product instance. For example, you can upgrade a
|
|
1562
|
+
* customer's `Business Unlimited Premium` plan to `Business VIP` using this
|
|
1563
|
+
* endpoint.
|
|
1564
|
+
*
|
|
1565
|
+
*
|
|
1566
|
+
* You must pass the ID of the Wix account that the product instance belongs
|
|
1567
|
+
* to in the header of the call. The call fails, if the product instance and
|
|
1568
|
+
* Wix account don't match.
|
|
1569
|
+
*
|
|
1570
|
+
* The customer has immediate access to new features, while loosing access to
|
|
1571
|
+
* features not included in the new service. It's up to the reseller to
|
|
1572
|
+
* decide whether the adjustment affects the customer’s payment.
|
|
1573
|
+
*
|
|
1574
|
+
* You can only exchange a product instance with a service of the same type.
|
|
1575
|
+
* Contact the [Wix B2B sales team](mailto:bizdev@wix.com) for details about
|
|
1576
|
+
* which services belong to the same type.
|
|
1577
|
+
*
|
|
1578
|
+
* You must provide either a new `catalogProductId` or a new `billingInfo`
|
|
1579
|
+
* object. The new billing cycle must be supported for the product. Contact the
|
|
1580
|
+
* [Wix B2B sales team](mailto:bizdev@wix.com) for information
|
|
1581
|
+
* about which billing cycles are supported for each product. If you adjust the
|
|
1582
|
+
* billing cycle for a product instance with `RECURRING` payments, you must
|
|
1583
|
+
* also provide `billingInfo.cycleDuration.unit`.
|
|
1584
|
+
*
|
|
1585
|
+
* If a removed feature is a requirement for another service, that service
|
|
1586
|
+
* may not be available to the customer any longer. For example, if you downgrade a
|
|
1587
|
+
* `Business Unlimited` plan to `Business Basic`, the site owners won’t be
|
|
1588
|
+
* able to use `Pro eCommerce Features` any longer.
|
|
1589
|
+
*
|
|
1590
|
+
* > **Important**: This call requires an account level API key and cannot be
|
|
1591
|
+
* > authenticated with the standard authorization header.
|
|
1592
|
+
* @param - ID of the product instance to adjust.
|
|
1593
|
+
*/
|
|
1594
|
+
(instanceId: string, options?: AdjustProductInstanceSpecificationsOptions | undefined): Promise<AdjustProductInstanceSpecificationsResponse & AdjustProductInstanceSpecificationsResponseNonNullableFields>;
|
|
1595
|
+
}
|
|
1596
|
+
declare function updatePackageExternalId$1(httpClient: HttpClient): UpdatePackageExternalIdSignature;
|
|
1597
|
+
interface UpdatePackageExternalIdSignature {
|
|
1598
|
+
/**
|
|
1599
|
+
* Updates a package's external ID field.
|
|
1600
|
+
*/
|
|
1601
|
+
(identifiers: UpdatePackageExternalIdIdentifiers): Promise<UpdatePackageExternalIdResponse & UpdatePackageExternalIdResponseNonNullableFields>;
|
|
1347
1602
|
}
|
|
1348
1603
|
|
|
1349
|
-
declare
|
|
1350
|
-
|
|
1351
|
-
declare const
|
|
1352
|
-
declare const
|
|
1353
|
-
declare const
|
|
1354
|
-
declare const
|
|
1355
|
-
declare const
|
|
1356
|
-
declare const
|
|
1357
|
-
declare const
|
|
1358
|
-
declare const
|
|
1359
|
-
declare const adjustProductInstanceSpecifications: ReturnType<typeof createRESTModule<typeof publicAdjustProductInstanceSpecifications>>;
|
|
1360
|
-
declare const updatePackageExternalId: ReturnType<typeof createRESTModule<typeof publicUpdatePackageExternalId>>;
|
|
1604
|
+
declare const createPackage: BuildRESTFunction<typeof createPackage$1> & typeof createPackage$1;
|
|
1605
|
+
declare const createPackageV2: BuildRESTFunction<typeof createPackageV2$1> & typeof createPackageV2$1;
|
|
1606
|
+
declare const cancelPackage: BuildRESTFunction<typeof cancelPackage$1> & typeof cancelPackage$1;
|
|
1607
|
+
declare const getPackage: BuildRESTFunction<typeof getPackage$1> & typeof getPackage$1;
|
|
1608
|
+
declare const queryPackages: BuildRESTFunction<typeof queryPackages$1> & typeof queryPackages$1;
|
|
1609
|
+
declare const assignProductInstanceToSite: BuildRESTFunction<typeof assignProductInstanceToSite$1> & typeof assignProductInstanceToSite$1;
|
|
1610
|
+
declare const unassignProductInstanceFromSite: BuildRESTFunction<typeof unassignProductInstanceFromSite$1> & typeof unassignProductInstanceFromSite$1;
|
|
1611
|
+
declare const cancelProductInstance: BuildRESTFunction<typeof cancelProductInstance$1> & typeof cancelProductInstance$1;
|
|
1612
|
+
declare const adjustProductInstanceSpecifications: BuildRESTFunction<typeof adjustProductInstanceSpecifications$1> & typeof adjustProductInstanceSpecifications$1;
|
|
1613
|
+
declare const updatePackageExternalId: BuildRESTFunction<typeof updatePackageExternalId$1> & typeof updatePackageExternalId$1;
|
|
1361
1614
|
|
|
1362
1615
|
type context_ActionEvent = ActionEvent;
|
|
1363
1616
|
type context_AdjustProductInstanceSpecificationsOptions = AdjustProductInstanceSpecificationsOptions;
|
|
@@ -1,3 +1,37 @@
|
|
|
1
|
+
type RESTFunctionDescriptor<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient) => T;
|
|
2
|
+
interface HttpClient {
|
|
3
|
+
request<TResponse, TData = any>(req: RequestOptionsFactory<TResponse, TData>): Promise<HttpResponse<TResponse>>;
|
|
4
|
+
fetchWithAuth: typeof fetch;
|
|
5
|
+
wixAPIFetch: (relativeUrl: string, options: RequestInit) => Promise<Response>;
|
|
6
|
+
}
|
|
7
|
+
type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
|
|
8
|
+
type HttpResponse<T = any> = {
|
|
9
|
+
data: T;
|
|
10
|
+
status: number;
|
|
11
|
+
statusText: string;
|
|
12
|
+
headers: any;
|
|
13
|
+
request?: any;
|
|
14
|
+
};
|
|
15
|
+
type RequestOptions<_TResponse = any, Data = any> = {
|
|
16
|
+
method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
|
|
17
|
+
url: string;
|
|
18
|
+
data?: Data;
|
|
19
|
+
params?: URLSearchParams;
|
|
20
|
+
} & APIMetadata;
|
|
21
|
+
type APIMetadata = {
|
|
22
|
+
methodFqn?: string;
|
|
23
|
+
entityFqdn?: string;
|
|
24
|
+
packageName?: string;
|
|
25
|
+
};
|
|
26
|
+
type BuildRESTFunction<T extends RESTFunctionDescriptor> = T extends RESTFunctionDescriptor<infer U> ? U : never;
|
|
27
|
+
|
|
28
|
+
declare global {
|
|
29
|
+
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
30
|
+
interface SymbolConstructor {
|
|
31
|
+
readonly observable: symbol;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
1
35
|
/**
|
|
2
36
|
* A package is group of instances of Wix services that a reseller offers to a
|
|
3
37
|
* customer as part of a single transaction.
|
|
@@ -10,7 +44,7 @@ interface Package {
|
|
|
10
44
|
_id?: string;
|
|
11
45
|
/**
|
|
12
46
|
* Wix account ID. See
|
|
13
|
-
* [Account Level APIs](https://dev.wix.com/
|
|
47
|
+
* [Account Level APIs](https://dev.wix.com/docs/rest/account-level/about-account-level-apis)
|
|
14
48
|
* for more details.
|
|
15
49
|
* @readonly
|
|
16
50
|
*/
|
|
@@ -248,17 +282,15 @@ interface QueryV2 extends QueryV2PagingMethodOneOf {
|
|
|
248
282
|
/** 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`. */
|
|
249
283
|
cursorPaging?: CursorPaging;
|
|
250
284
|
/**
|
|
251
|
-
* Filter object
|
|
252
|
-
*
|
|
253
|
-
*
|
|
254
|
-
* "fieldName2":{"$operator":"value2"}
|
|
255
|
-
* }`
|
|
256
|
-
* Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`
|
|
285
|
+
* Filter object.
|
|
286
|
+
*
|
|
287
|
+
* Learn more about the [filter section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-filter-section).
|
|
257
288
|
*/
|
|
258
289
|
filter?: Record<string, any> | null;
|
|
259
290
|
/**
|
|
260
|
-
* Sort object
|
|
261
|
-
*
|
|
291
|
+
* Sort object.
|
|
292
|
+
*
|
|
293
|
+
* Learn more about the [sort section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-sort-section).
|
|
262
294
|
*/
|
|
263
295
|
sort?: Sorting[];
|
|
264
296
|
/** 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. */
|
|
@@ -1312,52 +1344,273 @@ interface UpdatePackageExternalIdIdentifiers {
|
|
|
1312
1344
|
externalId: string;
|
|
1313
1345
|
}
|
|
1314
1346
|
|
|
1315
|
-
|
|
1316
|
-
interface
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1347
|
+
declare function createPackage$1(httpClient: HttpClient): CreatePackageSignature;
|
|
1348
|
+
interface CreatePackageSignature {
|
|
1349
|
+
/**
|
|
1350
|
+
* Creates a new package.
|
|
1351
|
+
*
|
|
1352
|
+
* Deprecated: This method is deprecated and will be removed by 2024-12-31.
|
|
1353
|
+
* Use com.wixpress.premium.reseller.packages.v1.Packages.CreatePackageV2 instead.
|
|
1354
|
+
*
|
|
1355
|
+
* HTTP Request:
|
|
1356
|
+
* POST /v1/packages
|
|
1357
|
+
*
|
|
1358
|
+
* Permissions:
|
|
1359
|
+
* Requires the "premium.reseller-package.manage" permission with MANUAL type.
|
|
1360
|
+
*
|
|
1361
|
+
* Event:
|
|
1362
|
+
* A PRIVATE callback will be triggered when the package is successfully created.
|
|
1363
|
+
*
|
|
1364
|
+
* Required Fields:
|
|
1365
|
+
* - CreatePackageRequest.products
|
|
1366
|
+
*
|
|
1367
|
+
* Maturity: BETA
|
|
1368
|
+
* Exposure: PUBLIC
|
|
1369
|
+
* @deprecated
|
|
1370
|
+
*/
|
|
1371
|
+
(options?: CreatePackageOptions | undefined): Promise<CreatePackageResponse & CreatePackageResponseNonNullableFields>;
|
|
1320
1372
|
}
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1373
|
+
declare function createPackageV2$1(httpClient: HttpClient): CreatePackageV2Signature;
|
|
1374
|
+
interface CreatePackageV2Signature {
|
|
1375
|
+
/**
|
|
1376
|
+
* Creates a package of product instances.
|
|
1377
|
+
*
|
|
1378
|
+
*
|
|
1379
|
+
* You must pass the relevant Wix account ID in the header of the call. In
|
|
1380
|
+
* the DIY flow, we recommend to pass the customer's sub-account ID instead
|
|
1381
|
+
* of your main reseller account ID.
|
|
1382
|
+
*
|
|
1383
|
+
* You may also pass a Wix site ID for each product in the body of the call.
|
|
1384
|
+
* If you omit the site ID, a floating product instance is created.
|
|
1385
|
+
*
|
|
1386
|
+
* When Wix customers purchase a specific paid service or product, Wix may offer
|
|
1387
|
+
* them time-limited free access to a different product. For example, customers
|
|
1388
|
+
* get a voucher for a free 1-year domain registration when purchasing any Wix
|
|
1389
|
+
* Premium plan. If you want to offer your customers the same benefit, create a
|
|
1390
|
+
* package containing the original product first. Then, create a second package
|
|
1391
|
+
* with the additional product. In the second Create Package call, pass the
|
|
1392
|
+
* instance ID of the original product as `referenceProductInstanceId`. This way,
|
|
1393
|
+
* Wix doesn't charge you for the additional product. Make sure that the status
|
|
1394
|
+
* of the referenced product is either `"PENDING"` or `"ACTIVE"`. Note that you
|
|
1395
|
+
* can use each product instance only a single time as reference instance.
|
|
1396
|
+
*
|
|
1397
|
+
* You need to pass a `countryCode` to specify where customers can claim
|
|
1398
|
+
* vouchers that may come with a product. Contact the
|
|
1399
|
+
* [Wix B2B sales team](mailto:bizdev@wix.com) to get information about
|
|
1400
|
+
* vouchers and supported locations.
|
|
1401
|
+
*
|
|
1402
|
+
* > **Important**: This call requires an account level API key and cannot be
|
|
1403
|
+
* > authenticated with the standard authorization header.
|
|
1404
|
+
*/
|
|
1405
|
+
(options?: CreatePackageV2Options | undefined): Promise<CreatePackageResponse & CreatePackageResponseNonNullableFields>;
|
|
1406
|
+
}
|
|
1407
|
+
declare function cancelPackage$1(httpClient: HttpClient): CancelPackageSignature;
|
|
1408
|
+
interface CancelPackageSignature {
|
|
1409
|
+
/**
|
|
1410
|
+
* Cancels all product instances included in the package and the customer
|
|
1411
|
+
* immediately looses access to the canceled functionality.
|
|
1412
|
+
*
|
|
1413
|
+
*
|
|
1414
|
+
* You must pass the ID of the Wix account that the package belongs to in the
|
|
1415
|
+
* header of the call. The call fails, if the package and Wix account don't
|
|
1416
|
+
* match.
|
|
1417
|
+
*
|
|
1418
|
+
* If a canceled product instance is a requirement for another Wix service, that
|
|
1419
|
+
* functionality is also no longer available to the customer. For example, if
|
|
1420
|
+
* you cancel a Premium plan, a previously connected domain is automatically
|
|
1421
|
+
* disconnected from the site.
|
|
1422
|
+
*
|
|
1423
|
+
* > **Important**: This call requires an account level API key and cannot be
|
|
1424
|
+
* > authenticated with the standard authorization header.
|
|
1425
|
+
* @param - ID of the package to cancel.
|
|
1426
|
+
*/
|
|
1427
|
+
(_id: string, options?: CancelPackageOptions | undefined): Promise<CancelPackageResponse & CancelPackageResponseNonNullableFields>;
|
|
1428
|
+
}
|
|
1429
|
+
declare function getPackage$1(httpClient: HttpClient): GetPackageSignature;
|
|
1430
|
+
interface GetPackageSignature {
|
|
1431
|
+
/**
|
|
1432
|
+
* Retrieves a package.
|
|
1433
|
+
*
|
|
1434
|
+
*
|
|
1435
|
+
* You must pass the ID of the Wix account that the package belongs to in the
|
|
1436
|
+
* header of the call. The call fails, if the package and Wix account don't
|
|
1437
|
+
* match.
|
|
1438
|
+
*
|
|
1439
|
+
* > **Important**: This call requires an account level API key and cannot be
|
|
1440
|
+
* > authenticated with the standard authorization header.
|
|
1441
|
+
* @param - Package ID.
|
|
1442
|
+
*/
|
|
1443
|
+
(_id: string): Promise<GetPackageResponse & GetPackageResponseNonNullableFields>;
|
|
1444
|
+
}
|
|
1445
|
+
declare function queryPackages$1(httpClient: HttpClient): QueryPackagesSignature;
|
|
1446
|
+
interface QueryPackagesSignature {
|
|
1447
|
+
/**
|
|
1448
|
+
* Retrieves a list of packages, given the provided paging, filtering, and sorting.
|
|
1449
|
+
*
|
|
1450
|
+
*
|
|
1451
|
+
* You must pass the ID of the Wix account that the packages belong to in the
|
|
1452
|
+
* header of the call. The call returns packages that belong to the parent
|
|
1453
|
+
* account, regardless if you pass the ID of a parent or sub-account. In case
|
|
1454
|
+
* you want to retrieve only packages that belong to a sub-account, you must
|
|
1455
|
+
* pass the sub-account ID as `filter` in the `query` object like this:
|
|
1456
|
+
*
|
|
1457
|
+
* ```json
|
|
1458
|
+
* {
|
|
1459
|
+
* "query": {
|
|
1460
|
+
* "filter": {
|
|
1461
|
+
* "accountId": {
|
|
1462
|
+
* "$eq": "<SUB_ACCOUNT_ID>"
|
|
1463
|
+
* }
|
|
1464
|
+
* }
|
|
1465
|
+
* }
|
|
1466
|
+
* }
|
|
1467
|
+
* ```
|
|
1468
|
+
*
|
|
1469
|
+
* Query Packages runs with these defaults, which you can override:
|
|
1470
|
+
*
|
|
1471
|
+
* - `createdDate` is sorted in `DESC` order
|
|
1472
|
+
* - `cursorPaging.limit` is `100`
|
|
1473
|
+
*
|
|
1474
|
+
* By default `pagingMetadata.cursors` are returned, unless you specifically pass
|
|
1475
|
+
* `query.paging`.
|
|
1476
|
+
*
|
|
1477
|
+
* The maximum for `cursorPaging.limit` is `100`.
|
|
1478
|
+
*
|
|
1479
|
+
* If you pass a cursor token that you have received in a previous Query Package response,
|
|
1480
|
+
* passing additional sort or filter information results in an invalid cursor
|
|
1481
|
+
* error. Since the received cursor token already holds all the needed information
|
|
1482
|
+
* for sort and filter. Changing the sort and filter properties during the span of
|
|
1483
|
+
* a cursor query isn't supported. But you can provide a different limit.
|
|
1484
|
+
*
|
|
1485
|
+
* For field support for filters and sorting,
|
|
1486
|
+
* see [Query Packages: Supported Filters and Sorting](https://dev.wix.com/api/rest/account-level-apis/resellers/supported-filters).
|
|
1487
|
+
*
|
|
1488
|
+
* To learn about working with _Query_ endpoints, see
|
|
1489
|
+
* [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language),
|
|
1490
|
+
* [Sorting and Paging](https://dev.wix.com/api/rest/getting-started/pagination),
|
|
1491
|
+
* and [Field Projection](https://dev.wix.com/api/rest/getting-started/field-projection).
|
|
1492
|
+
*
|
|
1493
|
+
* > **Important**: This call requires an account level API key and cannot be
|
|
1494
|
+
* > authenticated with the standard authorization header.
|
|
1495
|
+
* @param - Query options. See [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language) for more details.
|
|
1496
|
+
*/
|
|
1497
|
+
(query: QueryV2): Promise<QueryPackagesResponse & QueryPackagesResponseNonNullableFields>;
|
|
1498
|
+
}
|
|
1499
|
+
declare function assignProductInstanceToSite$1(httpClient: HttpClient): AssignProductInstanceToSiteSignature;
|
|
1500
|
+
interface AssignProductInstanceToSiteSignature {
|
|
1501
|
+
/**
|
|
1502
|
+
* Assigns a product instance to a site.
|
|
1503
|
+
*
|
|
1504
|
+
* You must pass the ID of the Wix account that the product instance belongs to in the header of the call.
|
|
1505
|
+
*
|
|
1506
|
+
* The customer immediately gains access to features included in the assigned service. It's up to the reseller to decide whether assigning a product instance affects the customer’s payment.
|
|
1507
|
+
*
|
|
1508
|
+
* It's possible to assign a product instance that's already assigned to a site, to a different site without [unassigning](/packages/unassign-product-instance-from-site) it first. But if the call fails in such a situation, the product instance may either remain assigned to the original site or become unassigned. You can confirm the instance's status by [retrieving the relevant package](/packages/get-package).
|
|
1509
|
+
*
|
|
1510
|
+
* > **Important:** This call requires an account level API key and cannot be authenticated with the standard authorization header.
|
|
1511
|
+
*/
|
|
1512
|
+
(identifiers: AssignProductInstanceToSiteIdentifiers, options?: AssignProductInstanceToSiteOptions | undefined): Promise<AssignProductInstanceToSiteResponse & AssignProductInstanceToSiteResponseNonNullableFields>;
|
|
1513
|
+
}
|
|
1514
|
+
declare function unassignProductInstanceFromSite$1(httpClient: HttpClient): UnassignProductInstanceFromSiteSignature;
|
|
1515
|
+
interface UnassignProductInstanceFromSiteSignature {
|
|
1516
|
+
/**
|
|
1517
|
+
* Unassigns a product instance from a site.
|
|
1518
|
+
*
|
|
1519
|
+
* You must pass the ID of the Wix account that the product instance belongs to in the header of the call.
|
|
1520
|
+
*
|
|
1521
|
+
* The product instance becomes floating and the customer immediately looses access to features included in the unassigned service. It's up to the reseller to decide whether unassigning a product instance affects the customer’s payment.
|
|
1522
|
+
*
|
|
1523
|
+
* If an unassigned product instance is a requirement for another service, that service may not be available to the customer any longer. For example, if you unassign a `Combo Plan` plan from a site, a previously connected domain is disconnected.
|
|
1524
|
+
*
|
|
1525
|
+
* You can assign floating product instances to sites using the [Assign Product Instance to Site](/packages/assign-product-instance-to-site) method.
|
|
1526
|
+
*
|
|
1527
|
+
* > **Important:** This call requires an account level API key and cannot be authenticated with the standard authorization header.
|
|
1528
|
+
* @param - ID of the product instance to unassign from a site.
|
|
1529
|
+
*/
|
|
1530
|
+
(instanceId: string, options?: UnassignProductInstanceFromSiteOptions | undefined): Promise<UnassignProductInstanceFromSiteResponse & UnassignProductInstanceFromSiteResponseNonNullableFields>;
|
|
1531
|
+
}
|
|
1532
|
+
declare function cancelProductInstance$1(httpClient: HttpClient): CancelProductInstanceSignature;
|
|
1533
|
+
interface CancelProductInstanceSignature {
|
|
1534
|
+
/**
|
|
1535
|
+
* Cancels a product instance.
|
|
1536
|
+
*
|
|
1537
|
+
*
|
|
1538
|
+
* You must pass the ID of the Wix account that the product instance belongs
|
|
1539
|
+
* to in the header of the call. The call fails, if the product instance and
|
|
1540
|
+
* Wix account don't match.
|
|
1541
|
+
*
|
|
1542
|
+
* The customer immediately looses access to features included in the
|
|
1543
|
+
* canceled service. It's up to the reseller to decide whether the adjustment
|
|
1544
|
+
* affects the customer’s payment.
|
|
1545
|
+
*
|
|
1546
|
+
* If a canceled service is a requirement for another service, that service
|
|
1547
|
+
* may not be available to the customer any longer. For example, if you cancel
|
|
1548
|
+
* a `Combo Plan` plan, a previously connected domain is disconnected
|
|
1549
|
+
* from the site.
|
|
1550
|
+
*
|
|
1551
|
+
*
|
|
1552
|
+
* > **Important**: This call requires an account level API key and cannot be
|
|
1553
|
+
* > authenticated with the standard authorization header.
|
|
1554
|
+
* @param - ID of the product instance to cancel.
|
|
1555
|
+
*/
|
|
1556
|
+
(instanceId: string, options?: CancelProductInstanceOptions | undefined): Promise<CancelProductInstanceResponse & CancelProductInstanceResponseNonNullableFields>;
|
|
1557
|
+
}
|
|
1558
|
+
declare function adjustProductInstanceSpecifications$1(httpClient: HttpClient): AdjustProductInstanceSpecificationsSignature;
|
|
1559
|
+
interface AdjustProductInstanceSpecificationsSignature {
|
|
1560
|
+
/**
|
|
1561
|
+
* Upgrades or downgrades a product instance. For example, you can upgrade a
|
|
1562
|
+
* customer's `Business Unlimited Premium` plan to `Business VIP` using this
|
|
1563
|
+
* endpoint.
|
|
1564
|
+
*
|
|
1565
|
+
*
|
|
1566
|
+
* You must pass the ID of the Wix account that the product instance belongs
|
|
1567
|
+
* to in the header of the call. The call fails, if the product instance and
|
|
1568
|
+
* Wix account don't match.
|
|
1569
|
+
*
|
|
1570
|
+
* The customer has immediate access to new features, while loosing access to
|
|
1571
|
+
* features not included in the new service. It's up to the reseller to
|
|
1572
|
+
* decide whether the adjustment affects the customer’s payment.
|
|
1573
|
+
*
|
|
1574
|
+
* You can only exchange a product instance with a service of the same type.
|
|
1575
|
+
* Contact the [Wix B2B sales team](mailto:bizdev@wix.com) for details about
|
|
1576
|
+
* which services belong to the same type.
|
|
1577
|
+
*
|
|
1578
|
+
* You must provide either a new `catalogProductId` or a new `billingInfo`
|
|
1579
|
+
* object. The new billing cycle must be supported for the product. Contact the
|
|
1580
|
+
* [Wix B2B sales team](mailto:bizdev@wix.com) for information
|
|
1581
|
+
* about which billing cycles are supported for each product. If you adjust the
|
|
1582
|
+
* billing cycle for a product instance with `RECURRING` payments, you must
|
|
1583
|
+
* also provide `billingInfo.cycleDuration.unit`.
|
|
1584
|
+
*
|
|
1585
|
+
* If a removed feature is a requirement for another service, that service
|
|
1586
|
+
* may not be available to the customer any longer. For example, if you downgrade a
|
|
1587
|
+
* `Business Unlimited` plan to `Business Basic`, the site owners won’t be
|
|
1588
|
+
* able to use `Pro eCommerce Features` any longer.
|
|
1589
|
+
*
|
|
1590
|
+
* > **Important**: This call requires an account level API key and cannot be
|
|
1591
|
+
* > authenticated with the standard authorization header.
|
|
1592
|
+
* @param - ID of the product instance to adjust.
|
|
1593
|
+
*/
|
|
1594
|
+
(instanceId: string, options?: AdjustProductInstanceSpecificationsOptions | undefined): Promise<AdjustProductInstanceSpecificationsResponse & AdjustProductInstanceSpecificationsResponseNonNullableFields>;
|
|
1595
|
+
}
|
|
1596
|
+
declare function updatePackageExternalId$1(httpClient: HttpClient): UpdatePackageExternalIdSignature;
|
|
1597
|
+
interface UpdatePackageExternalIdSignature {
|
|
1598
|
+
/**
|
|
1599
|
+
* Updates a package's external ID field.
|
|
1600
|
+
*/
|
|
1601
|
+
(identifiers: UpdatePackageExternalIdIdentifiers): Promise<UpdatePackageExternalIdResponse & UpdatePackageExternalIdResponseNonNullableFields>;
|
|
1347
1602
|
}
|
|
1348
1603
|
|
|
1349
|
-
declare
|
|
1350
|
-
|
|
1351
|
-
declare const
|
|
1352
|
-
declare const
|
|
1353
|
-
declare const
|
|
1354
|
-
declare const
|
|
1355
|
-
declare const
|
|
1356
|
-
declare const
|
|
1357
|
-
declare const
|
|
1358
|
-
declare const
|
|
1359
|
-
declare const adjustProductInstanceSpecifications: ReturnType<typeof createRESTModule<typeof publicAdjustProductInstanceSpecifications>>;
|
|
1360
|
-
declare const updatePackageExternalId: ReturnType<typeof createRESTModule<typeof publicUpdatePackageExternalId>>;
|
|
1604
|
+
declare const createPackage: BuildRESTFunction<typeof createPackage$1> & typeof createPackage$1;
|
|
1605
|
+
declare const createPackageV2: BuildRESTFunction<typeof createPackageV2$1> & typeof createPackageV2$1;
|
|
1606
|
+
declare const cancelPackage: BuildRESTFunction<typeof cancelPackage$1> & typeof cancelPackage$1;
|
|
1607
|
+
declare const getPackage: BuildRESTFunction<typeof getPackage$1> & typeof getPackage$1;
|
|
1608
|
+
declare const queryPackages: BuildRESTFunction<typeof queryPackages$1> & typeof queryPackages$1;
|
|
1609
|
+
declare const assignProductInstanceToSite: BuildRESTFunction<typeof assignProductInstanceToSite$1> & typeof assignProductInstanceToSite$1;
|
|
1610
|
+
declare const unassignProductInstanceFromSite: BuildRESTFunction<typeof unassignProductInstanceFromSite$1> & typeof unassignProductInstanceFromSite$1;
|
|
1611
|
+
declare const cancelProductInstance: BuildRESTFunction<typeof cancelProductInstance$1> & typeof cancelProductInstance$1;
|
|
1612
|
+
declare const adjustProductInstanceSpecifications: BuildRESTFunction<typeof adjustProductInstanceSpecifications$1> & typeof adjustProductInstanceSpecifications$1;
|
|
1613
|
+
declare const updatePackageExternalId: BuildRESTFunction<typeof updatePackageExternalId$1> & typeof updatePackageExternalId$1;
|
|
1361
1614
|
|
|
1362
1615
|
type index_d_ActionEvent = ActionEvent;
|
|
1363
1616
|
type index_d_AdjustProductInstanceSpecificationsOptions = AdjustProductInstanceSpecificationsOptions;
|
|
@@ -10,7 +10,7 @@ interface Package$1 {
|
|
|
10
10
|
id?: string;
|
|
11
11
|
/**
|
|
12
12
|
* Wix account ID. See
|
|
13
|
-
* [Account Level APIs](https://dev.wix.com/
|
|
13
|
+
* [Account Level APIs](https://dev.wix.com/docs/rest/account-level/about-account-level-apis)
|
|
14
14
|
* for more details.
|
|
15
15
|
* @readonly
|
|
16
16
|
*/
|
|
@@ -233,17 +233,15 @@ interface QueryV2$1 extends QueryV2PagingMethodOneOf$1 {
|
|
|
233
233
|
/** 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`. */
|
|
234
234
|
cursorPaging?: CursorPaging$1;
|
|
235
235
|
/**
|
|
236
|
-
* Filter object
|
|
237
|
-
*
|
|
238
|
-
*
|
|
239
|
-
* "fieldName2":{"$operator":"value2"}
|
|
240
|
-
* }`
|
|
241
|
-
* Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`
|
|
236
|
+
* Filter object.
|
|
237
|
+
*
|
|
238
|
+
* Learn more about the [filter section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-filter-section).
|
|
242
239
|
*/
|
|
243
240
|
filter?: Record<string, any> | null;
|
|
244
241
|
/**
|
|
245
|
-
* Sort object
|
|
246
|
-
*
|
|
242
|
+
* Sort object.
|
|
243
|
+
*
|
|
244
|
+
* Learn more about the [sort section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-sort-section).
|
|
247
245
|
*/
|
|
248
246
|
sort?: Sorting$1[];
|
|
249
247
|
/** 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. */
|
|
@@ -464,7 +462,7 @@ interface Package {
|
|
|
464
462
|
_id?: string;
|
|
465
463
|
/**
|
|
466
464
|
* Wix account ID. See
|
|
467
|
-
* [Account Level APIs](https://dev.wix.com/
|
|
465
|
+
* [Account Level APIs](https://dev.wix.com/docs/rest/account-level/about-account-level-apis)
|
|
468
466
|
* for more details.
|
|
469
467
|
* @readonly
|
|
470
468
|
*/
|
|
@@ -687,17 +685,15 @@ interface QueryV2 extends QueryV2PagingMethodOneOf {
|
|
|
687
685
|
/** 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`. */
|
|
688
686
|
cursorPaging?: CursorPaging;
|
|
689
687
|
/**
|
|
690
|
-
* Filter object
|
|
691
|
-
*
|
|
692
|
-
*
|
|
693
|
-
* "fieldName2":{"$operator":"value2"}
|
|
694
|
-
* }`
|
|
695
|
-
* Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`
|
|
688
|
+
* Filter object.
|
|
689
|
+
*
|
|
690
|
+
* Learn more about the [filter section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-filter-section).
|
|
696
691
|
*/
|
|
697
692
|
filter?: Record<string, any> | null;
|
|
698
693
|
/**
|
|
699
|
-
* Sort object
|
|
700
|
-
*
|
|
694
|
+
* Sort object.
|
|
695
|
+
*
|
|
696
|
+
* Learn more about the [sort section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-sort-section).
|
|
701
697
|
*/
|
|
702
698
|
sort?: Sorting[];
|
|
703
699
|
/** 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. */
|