@wix/auto_sdk_packages_packages 1.0.2 → 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/build/cjs/index.d.ts +273 -1
- package/build/cjs/index.js +953 -15
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/meta.d.ts +542 -1
- package/build/cjs/meta.js +574 -15
- package/build/cjs/meta.js.map +1 -1
- package/build/cjs/{src/premium-reseller-v1-packages-packages.types.d.ts → premium-reseller-v1-packages-packages.universal-CeJKqN8_.d.ts} +321 -199
- package/build/{internal/cjs/src/premium-reseller-v1-packages-packages.public.d.ts → es/index.d.mts} +36 -25
- package/build/es/index.mjs +906 -0
- package/build/es/index.mjs.map +1 -0
- package/build/es/meta.d.mts +542 -0
- package/build/es/meta.mjs +541 -0
- package/build/es/meta.mjs.map +1 -0
- package/build/{internal/cjs/src/premium-reseller-v1-packages-packages.types.d.ts → es/premium-reseller-v1-packages-packages.universal-CeJKqN8_.d.mts} +321 -199
- package/build/internal/cjs/index.d.ts +273 -1
- package/build/internal/cjs/index.js +953 -15
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +542 -1
- package/build/internal/cjs/meta.js +574 -15
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/{es/src/premium-reseller-v1-packages-packages.types.d.ts → cjs/premium-reseller-v1-packages-packages.universal-CeJKqN8_.d.ts} +321 -199
- package/build/{es/src/premium-reseller-v1-packages-packages.public.d.ts → internal/es/index.d.mts} +36 -25
- package/build/internal/es/index.mjs +906 -0
- package/build/internal/es/index.mjs.map +1 -0
- package/build/internal/es/meta.d.mts +542 -0
- package/build/internal/es/meta.mjs +541 -0
- package/build/internal/es/meta.mjs.map +1 -0
- package/build/{es/src/premium-reseller-v1-packages-packages.types.d.ts → internal/es/premium-reseller-v1-packages-packages.universal-CeJKqN8_.d.mts} +321 -199
- package/package.json +11 -10
- package/build/cjs/index.typings.d.ts +0 -1
- package/build/cjs/index.typings.js +0 -18
- package/build/cjs/index.typings.js.map +0 -1
- package/build/cjs/src/premium-reseller-v1-packages-packages.context.d.ts +0 -14
- package/build/cjs/src/premium-reseller-v1-packages-packages.context.js +0 -34
- package/build/cjs/src/premium-reseller-v1-packages-packages.context.js.map +0 -1
- package/build/cjs/src/premium-reseller-v1-packages-packages.http.d.ts +0 -219
- package/build/cjs/src/premium-reseller-v1-packages-packages.http.js +0 -563
- package/build/cjs/src/premium-reseller-v1-packages-packages.http.js.map +0 -1
- package/build/cjs/src/premium-reseller-v1-packages-packages.meta.d.ts +0 -38
- package/build/cjs/src/premium-reseller-v1-packages-packages.meta.js +0 -218
- package/build/cjs/src/premium-reseller-v1-packages-packages.meta.js.map +0 -1
- package/build/cjs/src/premium-reseller-v1-packages-packages.public.d.ts +0 -262
- package/build/cjs/src/premium-reseller-v1-packages-packages.public.js +0 -84
- package/build/cjs/src/premium-reseller-v1-packages-packages.public.js.map +0 -1
- package/build/cjs/src/premium-reseller-v1-packages-packages.types.js +0 -155
- package/build/cjs/src/premium-reseller-v1-packages-packages.types.js.map +0 -1
- package/build/cjs/src/premium-reseller-v1-packages-packages.universal.d.ts +0 -1865
- package/build/cjs/src/premium-reseller-v1-packages-packages.universal.js +0 -756
- package/build/cjs/src/premium-reseller-v1-packages-packages.universal.js.map +0 -1
- package/build/es/index.d.ts +0 -1
- package/build/es/index.js +0 -2
- package/build/es/index.js.map +0 -1
- package/build/es/index.typings.d.ts +0 -1
- package/build/es/index.typings.js +0 -2
- package/build/es/index.typings.js.map +0 -1
- package/build/es/meta.d.ts +0 -1
- package/build/es/meta.js +0 -2
- package/build/es/meta.js.map +0 -1
- package/build/es/src/premium-reseller-v1-packages-packages.context.d.ts +0 -14
- package/build/es/src/premium-reseller-v1-packages-packages.context.js +0 -14
- package/build/es/src/premium-reseller-v1-packages-packages.context.js.map +0 -1
- package/build/es/src/premium-reseller-v1-packages-packages.http.d.ts +0 -219
- package/build/es/src/premium-reseller-v1-packages-packages.http.js +0 -550
- package/build/es/src/premium-reseller-v1-packages-packages.http.js.map +0 -1
- package/build/es/src/premium-reseller-v1-packages-packages.meta.d.ts +0 -38
- package/build/es/src/premium-reseller-v1-packages-packages.meta.js +0 -182
- package/build/es/src/premium-reseller-v1-packages-packages.meta.js.map +0 -1
- package/build/es/src/premium-reseller-v1-packages-packages.public.js +0 -54
- package/build/es/src/premium-reseller-v1-packages-packages.public.js.map +0 -1
- package/build/es/src/premium-reseller-v1-packages-packages.types.js +0 -152
- package/build/es/src/premium-reseller-v1-packages-packages.types.js.map +0 -1
- package/build/es/src/premium-reseller-v1-packages-packages.universal.d.ts +0 -1865
- package/build/es/src/premium-reseller-v1-packages-packages.universal.js +0 -720
- package/build/es/src/premium-reseller-v1-packages-packages.universal.js.map +0 -1
- package/build/internal/cjs/index.typings.d.ts +0 -1
- package/build/internal/cjs/index.typings.js +0 -18
- package/build/internal/cjs/index.typings.js.map +0 -1
- package/build/internal/cjs/src/premium-reseller-v1-packages-packages.context.d.ts +0 -14
- package/build/internal/cjs/src/premium-reseller-v1-packages-packages.context.js +0 -34
- package/build/internal/cjs/src/premium-reseller-v1-packages-packages.context.js.map +0 -1
- package/build/internal/cjs/src/premium-reseller-v1-packages-packages.http.d.ts +0 -219
- package/build/internal/cjs/src/premium-reseller-v1-packages-packages.http.js +0 -563
- package/build/internal/cjs/src/premium-reseller-v1-packages-packages.http.js.map +0 -1
- package/build/internal/cjs/src/premium-reseller-v1-packages-packages.meta.d.ts +0 -38
- package/build/internal/cjs/src/premium-reseller-v1-packages-packages.meta.js +0 -218
- package/build/internal/cjs/src/premium-reseller-v1-packages-packages.meta.js.map +0 -1
- package/build/internal/cjs/src/premium-reseller-v1-packages-packages.public.js +0 -84
- package/build/internal/cjs/src/premium-reseller-v1-packages-packages.public.js.map +0 -1
- package/build/internal/cjs/src/premium-reseller-v1-packages-packages.types.js +0 -155
- package/build/internal/cjs/src/premium-reseller-v1-packages-packages.types.js.map +0 -1
- package/build/internal/cjs/src/premium-reseller-v1-packages-packages.universal.d.ts +0 -1865
- package/build/internal/cjs/src/premium-reseller-v1-packages-packages.universal.js +0 -756
- package/build/internal/cjs/src/premium-reseller-v1-packages-packages.universal.js.map +0 -1
- package/build/internal/es/index.d.ts +0 -1
- package/build/internal/es/index.js +0 -2
- package/build/internal/es/index.js.map +0 -1
- package/build/internal/es/index.typings.d.ts +0 -1
- package/build/internal/es/index.typings.js +0 -2
- package/build/internal/es/index.typings.js.map +0 -1
- package/build/internal/es/meta.d.ts +0 -1
- package/build/internal/es/meta.js +0 -2
- package/build/internal/es/meta.js.map +0 -1
- package/build/internal/es/src/premium-reseller-v1-packages-packages.context.d.ts +0 -14
- package/build/internal/es/src/premium-reseller-v1-packages-packages.context.js +0 -14
- package/build/internal/es/src/premium-reseller-v1-packages-packages.context.js.map +0 -1
- package/build/internal/es/src/premium-reseller-v1-packages-packages.http.d.ts +0 -219
- package/build/internal/es/src/premium-reseller-v1-packages-packages.http.js +0 -550
- package/build/internal/es/src/premium-reseller-v1-packages-packages.http.js.map +0 -1
- package/build/internal/es/src/premium-reseller-v1-packages-packages.meta.d.ts +0 -38
- package/build/internal/es/src/premium-reseller-v1-packages-packages.meta.js +0 -182
- package/build/internal/es/src/premium-reseller-v1-packages-packages.meta.js.map +0 -1
- package/build/internal/es/src/premium-reseller-v1-packages-packages.public.d.ts +0 -262
- package/build/internal/es/src/premium-reseller-v1-packages-packages.public.js +0 -54
- package/build/internal/es/src/premium-reseller-v1-packages-packages.public.js.map +0 -1
- package/build/internal/es/src/premium-reseller-v1-packages-packages.types.js +0 -152
- package/build/internal/es/src/premium-reseller-v1-packages-packages.types.js.map +0 -1
- package/build/internal/es/src/premium-reseller-v1-packages-packages.universal.d.ts +0 -1865
- package/build/internal/es/src/premium-reseller-v1-packages-packages.universal.js +0 -720
- package/build/internal/es/src/premium-reseller-v1-packages-packages.universal.js.map +0 -1
|
@@ -0,0 +1,542 @@
|
|
|
1
|
+
import { J as CreatePackageRequest$1, a as CreatePackageResponse$1, K as CancelPackageRequest$1, d as CancelPackageResponse$1, M as GetPackageRequest$1, N as GetPackageResponse$1, Q as QueryPackagesRequest$1, Z as QueryPackagesResponse$1, a0 as AssignProductInstanceToSiteRequest$1, g as AssignProductInstanceToSiteResponse$1, a2 as UnassignProductInstanceFromSiteRequest$1, h as UnassignProductInstanceFromSiteResponse$1, a4 as CancelProductInstanceRequest$1, j as CancelProductInstanceResponse$1, a6 as AdjustProductInstanceSpecificationsRequest$1, l as AdjustProductInstanceSpecificationsResponse$1, aI as UpdatePackageExternalIdRequest$1, n as UpdatePackageExternalIdResponse$1 } from './premium-reseller-v1-packages-packages.universal-CeJKqN8_.mjs';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* A package is group of instances of Wix services that a reseller offers to a
|
|
5
|
+
* customer as part of a single transaction.
|
|
6
|
+
*/
|
|
7
|
+
interface Package {
|
|
8
|
+
/**
|
|
9
|
+
* Package ID.
|
|
10
|
+
* @readonly
|
|
11
|
+
* @format GUID
|
|
12
|
+
*/
|
|
13
|
+
id?: string;
|
|
14
|
+
/**
|
|
15
|
+
* Wix account ID. See
|
|
16
|
+
* [Account Level APIs](https://dev.wix.com/docs/rest/account-level/about-account-level-apis)
|
|
17
|
+
* for more details.
|
|
18
|
+
* @readonly
|
|
19
|
+
* @format GUID
|
|
20
|
+
*/
|
|
21
|
+
accountId?: string;
|
|
22
|
+
/**
|
|
23
|
+
* External reference. For example, an external subscription ID.
|
|
24
|
+
* This field isn't validated by Wix.
|
|
25
|
+
*
|
|
26
|
+
* Max: 100 characters
|
|
27
|
+
* @maxLength 100
|
|
28
|
+
*/
|
|
29
|
+
externalId?: string | null;
|
|
30
|
+
/**
|
|
31
|
+
* Product instances that are included in the package.
|
|
32
|
+
*
|
|
33
|
+
* Min: 1 product instance
|
|
34
|
+
* Max: 1000 product instances
|
|
35
|
+
* @maxSize 1000
|
|
36
|
+
* @minSize 1
|
|
37
|
+
*/
|
|
38
|
+
productInstances?: ProductInstance[];
|
|
39
|
+
/**
|
|
40
|
+
* Date and time the package was created.
|
|
41
|
+
* @readonly
|
|
42
|
+
*/
|
|
43
|
+
createdDate?: Date | null;
|
|
44
|
+
/**
|
|
45
|
+
* Date and time the package was last updated.
|
|
46
|
+
* @readonly
|
|
47
|
+
*/
|
|
48
|
+
updatedDate?: Date | 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
|
+
* @format GUID
|
|
63
|
+
*/
|
|
64
|
+
instanceId?: string;
|
|
65
|
+
/**
|
|
66
|
+
* ID of the Wix site that the product instance is assigned to.
|
|
67
|
+
* See the [Query Sites API](https://dev.wix.com/api/rest/account-level-apis/sites/query-sites)
|
|
68
|
+
* for more information.
|
|
69
|
+
* @format GUID
|
|
70
|
+
*/
|
|
71
|
+
siteId?: string | null;
|
|
72
|
+
/**
|
|
73
|
+
* Product ID, as defined in the Wix Premium Product Catalog.
|
|
74
|
+
* Contact the [Wix B2B sales team](mailto:bizdev@wix.com)
|
|
75
|
+
* for more details about available Wix services.
|
|
76
|
+
* @format GUID
|
|
77
|
+
*/
|
|
78
|
+
catalogProductId?: string;
|
|
79
|
+
/**
|
|
80
|
+
* Status of the product instance.
|
|
81
|
+
* @readonly
|
|
82
|
+
*/
|
|
83
|
+
status?: StatusWithLiterals;
|
|
84
|
+
/**
|
|
85
|
+
* Failure object. Only present for status `FAILED`. Describes why the product instance `FAILED`.
|
|
86
|
+
* @readonly
|
|
87
|
+
*/
|
|
88
|
+
failure?: FailureReason;
|
|
89
|
+
/**
|
|
90
|
+
* Date and time the product instance was created.
|
|
91
|
+
* @readonly
|
|
92
|
+
*/
|
|
93
|
+
createdDate?: Date | null;
|
|
94
|
+
/**
|
|
95
|
+
* Date and time the product instance was last updated.
|
|
96
|
+
* @readonly
|
|
97
|
+
*/
|
|
98
|
+
updatedDate?: Date | null;
|
|
99
|
+
/**
|
|
100
|
+
* Two-letter country code in
|
|
101
|
+
* [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements)
|
|
102
|
+
* format. Specifies where customers can claim vouchers that may come with the
|
|
103
|
+
* product. Contact the [Wix B2B sales team](mailto:bizdev@wix.com) to get more
|
|
104
|
+
* information about vouchers and supported locations.
|
|
105
|
+
* @format COUNTRY
|
|
106
|
+
*/
|
|
107
|
+
countryCode?: string | null;
|
|
108
|
+
/**
|
|
109
|
+
* Date and time the product instance expires in `YYYY-MM-DDThh:mm:ss.sssZ` format.
|
|
110
|
+
* Used only for instances that don't auto renew at the end of the current billing cycle.
|
|
111
|
+
* @readonly
|
|
112
|
+
*/
|
|
113
|
+
expirationDate?: Date | null;
|
|
114
|
+
/**
|
|
115
|
+
* Discount code indicating that the reseller provisioned the product instance
|
|
116
|
+
* during a sale. Wix doesn't guarantee that a discount code reduces the
|
|
117
|
+
* price between Wix and the reseller, even when it's valid. Contact the
|
|
118
|
+
* [Wix B2B sales team](mailto:bizdev@wix.com) for more information.
|
|
119
|
+
*
|
|
120
|
+
* Max: 25 characters
|
|
121
|
+
* @maxLength 25
|
|
122
|
+
*/
|
|
123
|
+
discountCode?: string | null;
|
|
124
|
+
/**
|
|
125
|
+
* ID of a different product instance that you can use to offer your customers
|
|
126
|
+
* time-limited free access to an additional product or service. For example,
|
|
127
|
+
* Wix offers a 1-year free domain registration to all customers who purchase a
|
|
128
|
+
* Premium plan. The referenced product instance must have either status `"PENDING"` or
|
|
129
|
+
* `"ACTIVE"`. You can use each product instance only a single time as reference
|
|
130
|
+
* instance.
|
|
131
|
+
* @format GUID
|
|
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 product instance couldn't be created because the Resellers API timed out. */
|
|
143
|
+
DELIVERY_TIMEOUT = "DELIVERY_TIMEOUT",
|
|
144
|
+
/** The product instance couldn't be created because an external process failed. */
|
|
145
|
+
EXTERNAL_FAILURE = "EXTERNAL_FAILURE"
|
|
146
|
+
}
|
|
147
|
+
/** @enumType */
|
|
148
|
+
type FailureReasonFailureReasonWithLiterals = FailureReasonFailureReason | 'UNKNOWN' | 'DELIVERY_TIMEOUT' | 'EXTERNAL_FAILURE';
|
|
149
|
+
declare enum IntervalIntervalUnit {
|
|
150
|
+
/** unknown interval unit */
|
|
151
|
+
UNKNOWN = "UNKNOWN",
|
|
152
|
+
/** Day */
|
|
153
|
+
DAY = "DAY",
|
|
154
|
+
/** Week */
|
|
155
|
+
WEEK = "WEEK",
|
|
156
|
+
/** Month */
|
|
157
|
+
MONTH = "MONTH",
|
|
158
|
+
/** Year */
|
|
159
|
+
YEAR = "YEAR"
|
|
160
|
+
}
|
|
161
|
+
/** @enumType */
|
|
162
|
+
type IntervalIntervalUnitWithLiterals = IntervalIntervalUnit | 'UNKNOWN' | 'DAY' | 'WEEK' | 'MONTH' | 'YEAR';
|
|
163
|
+
declare enum CycleDescriptorType {
|
|
164
|
+
/** The payment type hasn't been set. */
|
|
165
|
+
UNKNOWN = "UNKNOWN",
|
|
166
|
+
/** The reseller pays Wix in a single payment. */
|
|
167
|
+
ONE_TIME = "ONE_TIME",
|
|
168
|
+
/** The reseller pays Wix on a recurring schedule. */
|
|
169
|
+
RECURRING = "RECURRING"
|
|
170
|
+
}
|
|
171
|
+
/** @enumType */
|
|
172
|
+
type CycleDescriptorTypeWithLiterals = CycleDescriptorType | 'UNKNOWN' | 'ONE_TIME' | 'RECURRING';
|
|
173
|
+
interface CycleInterval {
|
|
174
|
+
/** Unit of the billing cycle. */
|
|
175
|
+
unit?: IntervalIntervalUnitWithLiterals;
|
|
176
|
+
/**
|
|
177
|
+
* Count of units that make up the billing cycle.
|
|
178
|
+
* @min 1
|
|
179
|
+
*/
|
|
180
|
+
count?: number;
|
|
181
|
+
}
|
|
182
|
+
declare enum Status {
|
|
183
|
+
/** The product instance isn't yet available to the customer. */
|
|
184
|
+
PENDING = "PENDING",
|
|
185
|
+
/** The customer can use the product instance. */
|
|
186
|
+
ENABLED = "ENABLED",
|
|
187
|
+
/** The product instance isn't any longer available to the customer. */
|
|
188
|
+
CANCELED = "CANCELED",
|
|
189
|
+
/** The product instance couldn't be delivered successfully and has never been available to the customer. */
|
|
190
|
+
FAILED = "FAILED",
|
|
191
|
+
/** The product instance isn't yet available to the customer, because an external provider or the customer must take an action. */
|
|
192
|
+
AWAITING_ACTION = "AWAITING_ACTION"
|
|
193
|
+
}
|
|
194
|
+
/** @enumType */
|
|
195
|
+
type StatusWithLiterals = Status | 'PENDING' | 'ENABLED' | 'CANCELED' | 'FAILED' | 'AWAITING_ACTION';
|
|
196
|
+
interface FailureReason {
|
|
197
|
+
/** Failure code. */
|
|
198
|
+
code?: FailureReasonFailureReasonWithLiterals;
|
|
199
|
+
/** Failure message. */
|
|
200
|
+
message?: string;
|
|
201
|
+
}
|
|
202
|
+
interface ProductInstanceCycle {
|
|
203
|
+
/** Payment type. */
|
|
204
|
+
type?: CycleDescriptorTypeWithLiterals;
|
|
205
|
+
/** Duration of the billing cycle. Available only for `RECURRING` payments. */
|
|
206
|
+
cycleDuration?: CycleInterval;
|
|
207
|
+
}
|
|
208
|
+
interface CreatePackageRequest {
|
|
209
|
+
/**
|
|
210
|
+
* Idempotency key.
|
|
211
|
+
* @maxLength 100
|
|
212
|
+
*/
|
|
213
|
+
idempotencyKey?: string | null;
|
|
214
|
+
/**
|
|
215
|
+
* External reference. For example, an external subscription ID. **Note:** This field is not validated by Wix.
|
|
216
|
+
* @maxLength 100
|
|
217
|
+
*/
|
|
218
|
+
externalId?: string | null;
|
|
219
|
+
/**
|
|
220
|
+
* Wix services that are resold.
|
|
221
|
+
* @maxSize 1000
|
|
222
|
+
* @minSize 1
|
|
223
|
+
*/
|
|
224
|
+
products: ProductInstance[];
|
|
225
|
+
}
|
|
226
|
+
interface CreatePackageResponse {
|
|
227
|
+
/**
|
|
228
|
+
* Idempotency key.
|
|
229
|
+
* @maxLength 100
|
|
230
|
+
*/
|
|
231
|
+
idempotencyKey?: string | null;
|
|
232
|
+
/** Created package. */
|
|
233
|
+
package?: Package;
|
|
234
|
+
}
|
|
235
|
+
interface CancelPackageRequest {
|
|
236
|
+
/**
|
|
237
|
+
* Idempotency key.
|
|
238
|
+
* @maxLength 100
|
|
239
|
+
*/
|
|
240
|
+
idempotencyKey?: string | null;
|
|
241
|
+
/**
|
|
242
|
+
* ID of the package to cancel.
|
|
243
|
+
* @format GUID
|
|
244
|
+
*/
|
|
245
|
+
id: string;
|
|
246
|
+
}
|
|
247
|
+
interface CancelPackageResponse {
|
|
248
|
+
/**
|
|
249
|
+
* Idempotency key.
|
|
250
|
+
* @maxLength 100
|
|
251
|
+
*/
|
|
252
|
+
idempotencyKey?: string | null;
|
|
253
|
+
/** Canceled package. */
|
|
254
|
+
package?: Package;
|
|
255
|
+
}
|
|
256
|
+
interface GetPackageRequest {
|
|
257
|
+
/**
|
|
258
|
+
* Package ID.
|
|
259
|
+
* @format GUID
|
|
260
|
+
*/
|
|
261
|
+
id: string;
|
|
262
|
+
}
|
|
263
|
+
interface GetPackageResponse {
|
|
264
|
+
/** Retrieved package. */
|
|
265
|
+
package?: Package;
|
|
266
|
+
}
|
|
267
|
+
interface QueryPackagesRequest {
|
|
268
|
+
/** Query options. See [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language) for more details. */
|
|
269
|
+
query: QueryV2;
|
|
270
|
+
}
|
|
271
|
+
interface QueryV2 extends QueryV2PagingMethodOneOf {
|
|
272
|
+
/** Paging options to limit and offset the number of items. */
|
|
273
|
+
paging?: Paging;
|
|
274
|
+
/** 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`. */
|
|
275
|
+
cursorPaging?: CursorPaging;
|
|
276
|
+
/**
|
|
277
|
+
* Filter object.
|
|
278
|
+
*
|
|
279
|
+
* Learn more about [filtering](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#filters).
|
|
280
|
+
*/
|
|
281
|
+
filter?: Record<string, any> | null;
|
|
282
|
+
/**
|
|
283
|
+
* Sort object.
|
|
284
|
+
*
|
|
285
|
+
* Learn more about [sorting](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#sorting).
|
|
286
|
+
*/
|
|
287
|
+
sort?: Sorting[];
|
|
288
|
+
/** 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. */
|
|
289
|
+
fields?: string[];
|
|
290
|
+
/** 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. */
|
|
291
|
+
fieldsets?: string[];
|
|
292
|
+
}
|
|
293
|
+
/** @oneof */
|
|
294
|
+
interface QueryV2PagingMethodOneOf {
|
|
295
|
+
/** Paging options to limit and offset the number of items. */
|
|
296
|
+
paging?: Paging;
|
|
297
|
+
/** 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`. */
|
|
298
|
+
cursorPaging?: CursorPaging;
|
|
299
|
+
}
|
|
300
|
+
interface Sorting {
|
|
301
|
+
/**
|
|
302
|
+
* Name of the field to sort by.
|
|
303
|
+
* @maxLength 512
|
|
304
|
+
*/
|
|
305
|
+
fieldName?: string;
|
|
306
|
+
/** Sort order. */
|
|
307
|
+
order?: SortOrderWithLiterals;
|
|
308
|
+
}
|
|
309
|
+
declare enum SortOrder {
|
|
310
|
+
ASC = "ASC",
|
|
311
|
+
DESC = "DESC"
|
|
312
|
+
}
|
|
313
|
+
/** @enumType */
|
|
314
|
+
type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';
|
|
315
|
+
interface Paging {
|
|
316
|
+
/** Number of items to load. */
|
|
317
|
+
limit?: number | null;
|
|
318
|
+
/** Number of items to skip in the current sort order. */
|
|
319
|
+
offset?: number | null;
|
|
320
|
+
}
|
|
321
|
+
interface CursorPaging {
|
|
322
|
+
/**
|
|
323
|
+
* Maximum number of items to return in the results.
|
|
324
|
+
* @max 100
|
|
325
|
+
*/
|
|
326
|
+
limit?: number | null;
|
|
327
|
+
/**
|
|
328
|
+
* Pointer to the next or previous page in the list of results.
|
|
329
|
+
*
|
|
330
|
+
* Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.
|
|
331
|
+
* Not relevant for the first request.
|
|
332
|
+
* @maxLength 16000
|
|
333
|
+
*/
|
|
334
|
+
cursor?: string | null;
|
|
335
|
+
}
|
|
336
|
+
interface QueryPackagesResponse {
|
|
337
|
+
/** Paging metadata. */
|
|
338
|
+
metadata?: PagingMetadataV2;
|
|
339
|
+
/**
|
|
340
|
+
* Retrieved packages.
|
|
341
|
+
*
|
|
342
|
+
* Max: 1000 packages
|
|
343
|
+
* @maxSize 1000
|
|
344
|
+
*/
|
|
345
|
+
packages?: Package[];
|
|
346
|
+
}
|
|
347
|
+
interface PagingMetadataV2 {
|
|
348
|
+
/** Number of items returned in the response. */
|
|
349
|
+
count?: number | null;
|
|
350
|
+
/** Offset that was requested. */
|
|
351
|
+
offset?: number | null;
|
|
352
|
+
/** Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set. */
|
|
353
|
+
total?: number | null;
|
|
354
|
+
/** Flag that indicates the server failed to calculate the `total` field. */
|
|
355
|
+
tooManyToCount?: boolean | null;
|
|
356
|
+
/** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */
|
|
357
|
+
cursors?: Cursors;
|
|
358
|
+
}
|
|
359
|
+
interface Cursors {
|
|
360
|
+
/**
|
|
361
|
+
* Cursor string pointing to the next page in the list of results.
|
|
362
|
+
* @maxLength 16000
|
|
363
|
+
*/
|
|
364
|
+
next?: string | null;
|
|
365
|
+
/**
|
|
366
|
+
* Cursor pointing to the previous page in the list of results.
|
|
367
|
+
* @maxLength 16000
|
|
368
|
+
*/
|
|
369
|
+
prev?: string | null;
|
|
370
|
+
}
|
|
371
|
+
interface AssignProductInstanceToSiteRequest {
|
|
372
|
+
/**
|
|
373
|
+
* Idempotency key.
|
|
374
|
+
* @maxLength 100
|
|
375
|
+
*/
|
|
376
|
+
idempotencyKey?: string | null;
|
|
377
|
+
/**
|
|
378
|
+
* ID of the product instance to assign to a site.
|
|
379
|
+
* @format GUID
|
|
380
|
+
*/
|
|
381
|
+
instanceId: string;
|
|
382
|
+
/**
|
|
383
|
+
* ID of the site to which the product instance is assigned.
|
|
384
|
+
* @format GUID
|
|
385
|
+
*/
|
|
386
|
+
siteId: string;
|
|
387
|
+
}
|
|
388
|
+
interface AssignProductInstanceToSiteResponse {
|
|
389
|
+
/**
|
|
390
|
+
* Idempotency key.
|
|
391
|
+
* @maxLength 100
|
|
392
|
+
*/
|
|
393
|
+
idempotencyKey?: string | null;
|
|
394
|
+
/** Updated package that includes the assigned product instance. */
|
|
395
|
+
package?: Package;
|
|
396
|
+
}
|
|
397
|
+
interface UnassignProductInstanceFromSiteRequest {
|
|
398
|
+
/**
|
|
399
|
+
* Idempotency key.
|
|
400
|
+
* @maxLength 100
|
|
401
|
+
*/
|
|
402
|
+
idempotencyKey?: string | null;
|
|
403
|
+
/**
|
|
404
|
+
* ID of the product instance to unassign from a site.
|
|
405
|
+
* @format GUID
|
|
406
|
+
*/
|
|
407
|
+
instanceId: string;
|
|
408
|
+
}
|
|
409
|
+
interface UnassignProductInstanceFromSiteResponse {
|
|
410
|
+
/**
|
|
411
|
+
* Idempotency key.
|
|
412
|
+
* @maxLength 100
|
|
413
|
+
*/
|
|
414
|
+
idempotencyKey?: string | null;
|
|
415
|
+
/** Updated package that includes the unassigned product instance. */
|
|
416
|
+
package?: Package;
|
|
417
|
+
}
|
|
418
|
+
interface CancelProductInstanceRequest {
|
|
419
|
+
/**
|
|
420
|
+
* Idempotency key.
|
|
421
|
+
* @maxLength 100
|
|
422
|
+
*/
|
|
423
|
+
idempotencyKey?: string | null;
|
|
424
|
+
/**
|
|
425
|
+
* ID of the product instance to cancel.
|
|
426
|
+
* @format GUID
|
|
427
|
+
*/
|
|
428
|
+
instanceId: string;
|
|
429
|
+
}
|
|
430
|
+
interface CancelProductInstanceResponse {
|
|
431
|
+
/**
|
|
432
|
+
* Idempotency key.
|
|
433
|
+
* @maxLength 100
|
|
434
|
+
*/
|
|
435
|
+
idempotencyKey?: string | null;
|
|
436
|
+
/** Updated package that includes the previously included the canceled product instance. */
|
|
437
|
+
package?: Package;
|
|
438
|
+
}
|
|
439
|
+
interface AdjustProductInstanceSpecificationsRequest {
|
|
440
|
+
/**
|
|
441
|
+
* Idempotency key.
|
|
442
|
+
* @maxLength 100
|
|
443
|
+
*/
|
|
444
|
+
idempotencyKey?: string | null;
|
|
445
|
+
/**
|
|
446
|
+
* ID of the product instance to adjust.
|
|
447
|
+
* @format GUID
|
|
448
|
+
*/
|
|
449
|
+
instanceId: string;
|
|
450
|
+
/**
|
|
451
|
+
* ID of the product to replace the original instance. Required in case you don't
|
|
452
|
+
* provide a new `billingInfo` object.
|
|
453
|
+
* @format GUID
|
|
454
|
+
*/
|
|
455
|
+
catalogProductId?: string | null;
|
|
456
|
+
/**
|
|
457
|
+
* Information about the billing cycle. Required in case you don't provide a new
|
|
458
|
+
* `catalogProductId`. The new billing cycle must be supported for the service.
|
|
459
|
+
* Contact the [Wix B2B sales team](mailto:bizdev@wix.com) for
|
|
460
|
+
* information about a service's supported billing cycles. If
|
|
461
|
+
* you adjust the billing cycle for a product instance with `RECURRING`
|
|
462
|
+
* payments, you must also provide `billingInfo.cycleDuration.unit`.
|
|
463
|
+
*/
|
|
464
|
+
billingInfo?: ProductInstanceCycle;
|
|
465
|
+
/**
|
|
466
|
+
* Discount code indicating that the reseller provisioned the product instance
|
|
467
|
+
* during a sale. In case you pass a code that isn't valid, the call succeeds and
|
|
468
|
+
* no discount is applied to the product instance. Wix doesn't guarantee that a
|
|
469
|
+
* discount code reduces the price between Wix and the reseller, even when it's
|
|
470
|
+
* valid. You can't add a discount code after you've created the
|
|
471
|
+
* product instance. Contact the [Wix B2B sales team](mailto:bizdev@wix.com) for
|
|
472
|
+
* more information about supported codes.
|
|
473
|
+
*
|
|
474
|
+
* Max: 25 characters
|
|
475
|
+
* @maxLength 25
|
|
476
|
+
*/
|
|
477
|
+
discountCode?: string | null;
|
|
478
|
+
}
|
|
479
|
+
interface AdjustProductInstanceSpecificationsResponse {
|
|
480
|
+
/**
|
|
481
|
+
* Idempotency key.
|
|
482
|
+
* @maxLength 100
|
|
483
|
+
*/
|
|
484
|
+
idempotencyKey?: string | null;
|
|
485
|
+
/** Updated package that includes the adjusted product instance. */
|
|
486
|
+
package?: Package;
|
|
487
|
+
}
|
|
488
|
+
interface UpdatePackageExternalIdRequest {
|
|
489
|
+
/**
|
|
490
|
+
* ID of the package to update.
|
|
491
|
+
* @format GUID
|
|
492
|
+
*/
|
|
493
|
+
packageId: string;
|
|
494
|
+
/**
|
|
495
|
+
* External ID that will be assigned to the package.
|
|
496
|
+
* @maxLength 100
|
|
497
|
+
*/
|
|
498
|
+
externalId: string;
|
|
499
|
+
}
|
|
500
|
+
interface UpdatePackageExternalIdResponse {
|
|
501
|
+
/** Updated package. */
|
|
502
|
+
updatedPackage?: Package;
|
|
503
|
+
}
|
|
504
|
+
|
|
505
|
+
type __PublicMethodMetaInfo<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = {
|
|
506
|
+
getUrl: (context: any) => string;
|
|
507
|
+
httpMethod: K;
|
|
508
|
+
path: string;
|
|
509
|
+
pathParams: M;
|
|
510
|
+
__requestType: T;
|
|
511
|
+
__originalRequestType: S;
|
|
512
|
+
__responseType: Q;
|
|
513
|
+
__originalResponseType: R;
|
|
514
|
+
};
|
|
515
|
+
declare function createPackage(): __PublicMethodMetaInfo<'POST', {}, CreatePackageRequest$1, CreatePackageRequest, CreatePackageResponse$1, CreatePackageResponse>;
|
|
516
|
+
declare function createPackageV2(): __PublicMethodMetaInfo<'POST', {}, CreatePackageRequest$1, CreatePackageRequest, CreatePackageResponse$1, CreatePackageResponse>;
|
|
517
|
+
declare function cancelPackage(): __PublicMethodMetaInfo<'DELETE', {
|
|
518
|
+
id: string;
|
|
519
|
+
}, CancelPackageRequest$1, CancelPackageRequest, CancelPackageResponse$1, CancelPackageResponse>;
|
|
520
|
+
declare function getPackage(): __PublicMethodMetaInfo<'GET', {
|
|
521
|
+
id: string;
|
|
522
|
+
}, GetPackageRequest$1, GetPackageRequest, GetPackageResponse$1, GetPackageResponse>;
|
|
523
|
+
declare function queryPackages(): __PublicMethodMetaInfo<'POST', {}, QueryPackagesRequest$1, QueryPackagesRequest, QueryPackagesResponse$1, QueryPackagesResponse>;
|
|
524
|
+
declare function assignProductInstanceToSite(): __PublicMethodMetaInfo<'PATCH', {
|
|
525
|
+
instanceId: string;
|
|
526
|
+
siteId: string;
|
|
527
|
+
}, AssignProductInstanceToSiteRequest$1, AssignProductInstanceToSiteRequest, AssignProductInstanceToSiteResponse$1, AssignProductInstanceToSiteResponse>;
|
|
528
|
+
declare function unassignProductInstanceFromSite(): __PublicMethodMetaInfo<'PATCH', {
|
|
529
|
+
instanceId: string;
|
|
530
|
+
}, UnassignProductInstanceFromSiteRequest$1, UnassignProductInstanceFromSiteRequest, UnassignProductInstanceFromSiteResponse$1, UnassignProductInstanceFromSiteResponse>;
|
|
531
|
+
declare function cancelProductInstance(): __PublicMethodMetaInfo<'DELETE', {
|
|
532
|
+
instanceId: string;
|
|
533
|
+
}, CancelProductInstanceRequest$1, CancelProductInstanceRequest, CancelProductInstanceResponse$1, CancelProductInstanceResponse>;
|
|
534
|
+
declare function adjustProductInstanceSpecifications(): __PublicMethodMetaInfo<'PATCH', {
|
|
535
|
+
instanceId: string;
|
|
536
|
+
}, AdjustProductInstanceSpecificationsRequest$1, AdjustProductInstanceSpecificationsRequest, AdjustProductInstanceSpecificationsResponse$1, AdjustProductInstanceSpecificationsResponse>;
|
|
537
|
+
declare function updatePackageExternalId(): __PublicMethodMetaInfo<'PATCH', {
|
|
538
|
+
packageId: string;
|
|
539
|
+
externalId: string;
|
|
540
|
+
}, UpdatePackageExternalIdRequest$1, UpdatePackageExternalIdRequest, UpdatePackageExternalIdResponse$1, UpdatePackageExternalIdResponse>;
|
|
541
|
+
|
|
542
|
+
export { type __PublicMethodMetaInfo, adjustProductInstanceSpecifications, assignProductInstanceToSite, cancelPackage, cancelProductInstance, createPackage, createPackageV2, getPackage, queryPackages, unassignProductInstanceFromSite, updatePackageExternalId };
|