@wix/auto_sdk_ecom_subscription-contracts 1.0.112 → 1.0.114
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 -2
- package/build/cjs/index.js +32 -3
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +371 -5
- package/build/cjs/index.typings.js +27 -2
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +370 -4
- package/build/cjs/meta.js +26 -2
- package/build/cjs/meta.js.map +1 -1
- package/build/cjs/schemas.d.ts +394 -0
- package/build/cjs/schemas.js +682 -8
- package/build/cjs/schemas.js.map +1 -1
- package/build/es/index.d.mts +2 -2
- package/build/es/index.mjs +29 -3
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +371 -5
- package/build/es/index.typings.mjs +24 -2
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +370 -4
- package/build/es/meta.mjs +23 -2
- package/build/es/meta.mjs.map +1 -1
- package/build/es/schemas.d.mts +394 -0
- package/build/es/schemas.mjs +682 -8
- package/build/es/schemas.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +2 -2
- package/build/internal/cjs/index.js +32 -3
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +378 -6
- package/build/internal/cjs/index.typings.js +27 -2
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +370 -4
- package/build/internal/cjs/meta.js +26 -2
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/cjs/schemas.d.ts +394 -0
- package/build/internal/cjs/schemas.js +682 -8
- package/build/internal/cjs/schemas.js.map +1 -1
- package/build/internal/es/index.d.mts +2 -2
- package/build/internal/es/index.mjs +29 -3
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +378 -6
- package/build/internal/es/index.typings.mjs +24 -2
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.d.mts +370 -4
- package/build/internal/es/meta.mjs +23 -2
- package/build/internal/es/meta.mjs.map +1 -1
- package/build/internal/es/schemas.d.mts +394 -0
- package/build/internal/es/schemas.mjs +682 -8
- package/build/internal/es/schemas.mjs.map +1 -1
- package/package.json +2 -2
package/build/cjs/schemas.js
CHANGED
|
@@ -494,7 +494,7 @@ var GetSubscriptionContractResponse = z.object({
|
|
|
494
494
|
).describe("Buyer information.").optional(),
|
|
495
495
|
buyerLanguage: z.string().describe(
|
|
496
496
|
"Language for communication with the buyer. Defaults to the site language.\nFor a site that supports multiple languages, this is the language the buyer selected."
|
|
497
|
-
).optional().nullable(),
|
|
497
|
+
).max(10).optional().nullable(),
|
|
498
498
|
weightUnit: z.enum(["UNSPECIFIED_WEIGHT_UNIT", "KG", "LB"]).describe("Weight measurement unit - defaults to site's weight unit.").optional(),
|
|
499
499
|
currency: z.string().describe(
|
|
500
500
|
"Currency used for the pricing of this order in [ISO-4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes) format."
|
|
@@ -887,7 +887,7 @@ var GetSubscriptionContractResponse = z.object({
|
|
|
887
887
|
})
|
|
888
888
|
])
|
|
889
889
|
)
|
|
890
|
-
).optional(),
|
|
890
|
+
).max(100).optional(),
|
|
891
891
|
channelInfo: z.object({
|
|
892
892
|
type: z.enum([
|
|
893
893
|
"UNSPECIFIED",
|
|
@@ -924,7 +924,7 @@ var GetSubscriptionContractResponse = z.object({
|
|
|
924
924
|
title: z.string().describe("Custom field title.").min(1).max(500).optional(),
|
|
925
925
|
translatedTitle: z.string().describe("Translated custom field title.").min(1).max(500).optional().nullable()
|
|
926
926
|
})
|
|
927
|
-
).optional(),
|
|
927
|
+
).max(100).optional(),
|
|
928
928
|
recipientInfo: z.object({
|
|
929
929
|
address: z.object({
|
|
930
930
|
streetAddress: z.object({
|
|
@@ -1064,7 +1064,340 @@ var GetSubscriptionContractResponse = z.object({
|
|
|
1064
1064
|
lineItemIds: z.array(z.string()).optional(),
|
|
1065
1065
|
source: z.enum(["SERVICE_PLUGIN", "ITEM", "MANUAL", "SHIPPING", "PLATFORM"]).describe("Specifies the entity that added the additional fee.").optional()
|
|
1066
1066
|
})
|
|
1067
|
-
).max(100).optional()
|
|
1067
|
+
).max(100).optional(),
|
|
1068
|
+
activities: z.array(
|
|
1069
|
+
z.intersection(
|
|
1070
|
+
z.object({
|
|
1071
|
+
_id: z.string().describe("Activity ID.").regex(
|
|
1072
|
+
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
1073
|
+
"Must be a valid GUID"
|
|
1074
|
+
).optional(),
|
|
1075
|
+
_createdDate: z.date().describe("When the activity occurred.").optional().nullable(),
|
|
1076
|
+
author: z.intersection(
|
|
1077
|
+
z.object({}),
|
|
1078
|
+
z.xor([
|
|
1079
|
+
z.object({
|
|
1080
|
+
userId: z.never().optional(),
|
|
1081
|
+
appId: z.never().optional()
|
|
1082
|
+
}),
|
|
1083
|
+
z.object({
|
|
1084
|
+
appId: z.never().optional(),
|
|
1085
|
+
userId: z.string().describe(
|
|
1086
|
+
"User ID. When the draft order was created by a Wix user."
|
|
1087
|
+
).regex(
|
|
1088
|
+
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
1089
|
+
"Must be a valid GUID"
|
|
1090
|
+
)
|
|
1091
|
+
}),
|
|
1092
|
+
z.object({
|
|
1093
|
+
userId: z.never().optional(),
|
|
1094
|
+
appId: z.string().describe(
|
|
1095
|
+
"App ID. When the draft order was created by an app."
|
|
1096
|
+
).regex(
|
|
1097
|
+
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
1098
|
+
"Must be a valid GUID"
|
|
1099
|
+
)
|
|
1100
|
+
})
|
|
1101
|
+
])
|
|
1102
|
+
).describe("Identity of the draft order's initiator.").optional(),
|
|
1103
|
+
activityType: z.enum(["UNKNOWN_ACTIVITY_TYPE", "CHANGES_APPLIED"]).describe("Activity type.").optional()
|
|
1104
|
+
}),
|
|
1105
|
+
z.intersection(
|
|
1106
|
+
z.xor([
|
|
1107
|
+
z.object({ contractTarget: z.never().optional() }),
|
|
1108
|
+
z.object({
|
|
1109
|
+
contractTarget: z.object({
|
|
1110
|
+
nextCycleNumber: z.number().int().describe(
|
|
1111
|
+
"Cycle number of the next billing cycle (1-based). Set by the caller; returned by the server on read."
|
|
1112
|
+
).optional().nullable()
|
|
1113
|
+
}).describe(
|
|
1114
|
+
"Scopes the draft to the contract level, applying to all future cycles."
|
|
1115
|
+
)
|
|
1116
|
+
})
|
|
1117
|
+
]),
|
|
1118
|
+
z.xor([
|
|
1119
|
+
z.object({ changesApplied: z.never().optional() }),
|
|
1120
|
+
z.object({
|
|
1121
|
+
changesApplied: z.intersection(
|
|
1122
|
+
z.object({
|
|
1123
|
+
draftSubscriptionContractId: z.string().describe(
|
|
1124
|
+
"ID of the DraftSubscriptionContract that was committed."
|
|
1125
|
+
).regex(
|
|
1126
|
+
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
1127
|
+
"Must be a valid GUID"
|
|
1128
|
+
).optional(),
|
|
1129
|
+
changes: z.array(
|
|
1130
|
+
z.intersection(
|
|
1131
|
+
z.object({}),
|
|
1132
|
+
z.xor([
|
|
1133
|
+
z.object({
|
|
1134
|
+
lineItemChanged: z.never().optional(),
|
|
1135
|
+
lineItemAdded: z.never().optional(),
|
|
1136
|
+
lineItemRemoved: z.never().optional(),
|
|
1137
|
+
discountAdded: z.never().optional(),
|
|
1138
|
+
discountRemoved: z.never().optional(),
|
|
1139
|
+
additionalFeeAdded: z.never().optional(),
|
|
1140
|
+
additionalFeeRemoved: z.never().optional(),
|
|
1141
|
+
totalPriceChanged: z.never().optional()
|
|
1142
|
+
}),
|
|
1143
|
+
z.object({
|
|
1144
|
+
lineItemAdded: z.never().optional(),
|
|
1145
|
+
lineItemRemoved: z.never().optional(),
|
|
1146
|
+
discountAdded: z.never().optional(),
|
|
1147
|
+
discountRemoved: z.never().optional(),
|
|
1148
|
+
additionalFeeAdded: z.never().optional(),
|
|
1149
|
+
additionalFeeRemoved: z.never().optional(),
|
|
1150
|
+
totalPriceChanged: z.never().optional(),
|
|
1151
|
+
lineItemChanged: z.object({
|
|
1152
|
+
_id: z.string().describe("Line item ID.").regex(
|
|
1153
|
+
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
1154
|
+
"Must be a valid GUID"
|
|
1155
|
+
).optional(),
|
|
1156
|
+
name: z.object({
|
|
1157
|
+
original: z.string().describe(
|
|
1158
|
+
"__Required.__ Item name in the site's default language as defined in the [request envelope](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/self-hosting/supported-extensions/backend-extensions/add-self-hosted-service-plugin-extensions#request-envelope).\n\nMin: 1 character.\nMax: 200 characters."
|
|
1159
|
+
).min(1).max(200).optional(),
|
|
1160
|
+
translated: z.string().describe(
|
|
1161
|
+
"Item name translated into the buyer's language.\n\nMin: 1 character.\nMax: 400 characters.\nDefault: Same as `original`."
|
|
1162
|
+
).min(1).max(400).optional().nullable()
|
|
1163
|
+
}).describe("Item name after change.").optional(),
|
|
1164
|
+
quantity: z.object({
|
|
1165
|
+
originalQuantity: z.number().int().describe(
|
|
1166
|
+
"Original item quantity before the change."
|
|
1167
|
+
).min(0).max(1e6).optional(),
|
|
1168
|
+
newQuantity: z.number().int().describe(
|
|
1169
|
+
"New item quantity after the change."
|
|
1170
|
+
).min(0).max(1e6).optional(),
|
|
1171
|
+
diff: z.number().int().describe(
|
|
1172
|
+
"Difference between new and original quantities."
|
|
1173
|
+
).min(1).max(1e6).optional(),
|
|
1174
|
+
deltaType: z.enum([
|
|
1175
|
+
"QUANTITY_INCREASED",
|
|
1176
|
+
"QUANTITY_DECREASED"
|
|
1177
|
+
]).describe(
|
|
1178
|
+
"Direction of the quantity change."
|
|
1179
|
+
).optional()
|
|
1180
|
+
}).describe("Item quantity change.").optional()
|
|
1181
|
+
}).describe("Line item was modified.")
|
|
1182
|
+
}),
|
|
1183
|
+
z.object({
|
|
1184
|
+
lineItemChanged: z.never().optional(),
|
|
1185
|
+
lineItemRemoved: z.never().optional(),
|
|
1186
|
+
discountAdded: z.never().optional(),
|
|
1187
|
+
discountRemoved: z.never().optional(),
|
|
1188
|
+
additionalFeeAdded: z.never().optional(),
|
|
1189
|
+
additionalFeeRemoved: z.never().optional(),
|
|
1190
|
+
totalPriceChanged: z.never().optional(),
|
|
1191
|
+
lineItemAdded: z.object({
|
|
1192
|
+
_id: z.string().describe("Line item ID.").regex(
|
|
1193
|
+
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
1194
|
+
"Must be a valid GUID"
|
|
1195
|
+
).optional(),
|
|
1196
|
+
name: z.object({
|
|
1197
|
+
original: z.string().describe(
|
|
1198
|
+
"__Required.__ Item name in the site's default language as defined in the [request envelope](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/self-hosting/supported-extensions/backend-extensions/add-self-hosted-service-plugin-extensions#request-envelope).\n\nMin: 1 character.\nMax: 200 characters."
|
|
1199
|
+
).min(1).max(200).optional(),
|
|
1200
|
+
translated: z.string().describe(
|
|
1201
|
+
"Item name translated into the buyer's language.\n\nMin: 1 character.\nMax: 400 characters.\nDefault: Same as `original`."
|
|
1202
|
+
).min(1).max(400).optional().nullable()
|
|
1203
|
+
}).describe("Item name.").optional(),
|
|
1204
|
+
quantity: z.number().int().describe("Added or removed item quantity.").min(1).max(1e6).optional()
|
|
1205
|
+
}).describe(
|
|
1206
|
+
"Line item was added to the contract."
|
|
1207
|
+
)
|
|
1208
|
+
}),
|
|
1209
|
+
z.object({
|
|
1210
|
+
lineItemChanged: z.never().optional(),
|
|
1211
|
+
lineItemAdded: z.never().optional(),
|
|
1212
|
+
discountAdded: z.never().optional(),
|
|
1213
|
+
discountRemoved: z.never().optional(),
|
|
1214
|
+
additionalFeeAdded: z.never().optional(),
|
|
1215
|
+
additionalFeeRemoved: z.never().optional(),
|
|
1216
|
+
totalPriceChanged: z.never().optional(),
|
|
1217
|
+
lineItemRemoved: z.object({
|
|
1218
|
+
_id: z.string().describe("Line item ID.").regex(
|
|
1219
|
+
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
1220
|
+
"Must be a valid GUID"
|
|
1221
|
+
).optional(),
|
|
1222
|
+
name: z.object({
|
|
1223
|
+
original: z.string().describe(
|
|
1224
|
+
"__Required.__ Item name in the site's default language as defined in the [request envelope](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/self-hosting/supported-extensions/backend-extensions/add-self-hosted-service-plugin-extensions#request-envelope).\n\nMin: 1 character.\nMax: 200 characters."
|
|
1225
|
+
).min(1).max(200).optional(),
|
|
1226
|
+
translated: z.string().describe(
|
|
1227
|
+
"Item name translated into the buyer's language.\n\nMin: 1 character.\nMax: 400 characters.\nDefault: Same as `original`."
|
|
1228
|
+
).min(1).max(400).optional().nullable()
|
|
1229
|
+
}).describe("Item name.").optional(),
|
|
1230
|
+
quantity: z.number().int().describe("Added or removed item quantity.").min(1).max(1e6).optional()
|
|
1231
|
+
}).describe(
|
|
1232
|
+
"Line item was removed from the contract."
|
|
1233
|
+
)
|
|
1234
|
+
}),
|
|
1235
|
+
z.object({
|
|
1236
|
+
lineItemChanged: z.never().optional(),
|
|
1237
|
+
lineItemAdded: z.never().optional(),
|
|
1238
|
+
lineItemRemoved: z.never().optional(),
|
|
1239
|
+
discountRemoved: z.never().optional(),
|
|
1240
|
+
additionalFeeAdded: z.never().optional(),
|
|
1241
|
+
additionalFeeRemoved: z.never().optional(),
|
|
1242
|
+
totalPriceChanged: z.never().optional(),
|
|
1243
|
+
discountAdded: z.object({
|
|
1244
|
+
_id: z.string().describe("Discount ID.").regex(
|
|
1245
|
+
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
1246
|
+
"Must be a valid GUID"
|
|
1247
|
+
).optional(),
|
|
1248
|
+
name: z.object({
|
|
1249
|
+
original: z.string().describe(
|
|
1250
|
+
"Value in site default language."
|
|
1251
|
+
).min(1).optional(),
|
|
1252
|
+
translated: z.string().describe("Translated value.").min(1).optional().nullable()
|
|
1253
|
+
}).describe("Discount name.").optional(),
|
|
1254
|
+
totalAmount: z.object({
|
|
1255
|
+
amount: z.string().describe("Amount.").optional(),
|
|
1256
|
+
formattedAmount: z.string().describe(
|
|
1257
|
+
"Amount formatted with currency symbol."
|
|
1258
|
+
).optional()
|
|
1259
|
+
}).describe("Discount amount.").optional()
|
|
1260
|
+
}).describe(
|
|
1261
|
+
"Discount was added to the contract."
|
|
1262
|
+
)
|
|
1263
|
+
}),
|
|
1264
|
+
z.object({
|
|
1265
|
+
lineItemChanged: z.never().optional(),
|
|
1266
|
+
lineItemAdded: z.never().optional(),
|
|
1267
|
+
lineItemRemoved: z.never().optional(),
|
|
1268
|
+
discountAdded: z.never().optional(),
|
|
1269
|
+
additionalFeeAdded: z.never().optional(),
|
|
1270
|
+
additionalFeeRemoved: z.never().optional(),
|
|
1271
|
+
totalPriceChanged: z.never().optional(),
|
|
1272
|
+
discountRemoved: z.object({
|
|
1273
|
+
_id: z.string().describe("Discount ID.").regex(
|
|
1274
|
+
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
1275
|
+
"Must be a valid GUID"
|
|
1276
|
+
).optional(),
|
|
1277
|
+
name: z.object({
|
|
1278
|
+
original: z.string().describe(
|
|
1279
|
+
"Value in site default language."
|
|
1280
|
+
).min(1).optional(),
|
|
1281
|
+
translated: z.string().describe("Translated value.").min(1).optional().nullable()
|
|
1282
|
+
}).describe("Discount name.").optional(),
|
|
1283
|
+
totalAmount: z.object({
|
|
1284
|
+
amount: z.string().describe("Amount.").optional(),
|
|
1285
|
+
formattedAmount: z.string().describe(
|
|
1286
|
+
"Amount formatted with currency symbol."
|
|
1287
|
+
).optional()
|
|
1288
|
+
}).describe("Discount amount.").optional()
|
|
1289
|
+
}).describe(
|
|
1290
|
+
"Discount was removed from the contract."
|
|
1291
|
+
)
|
|
1292
|
+
}),
|
|
1293
|
+
z.object({
|
|
1294
|
+
lineItemChanged: z.never().optional(),
|
|
1295
|
+
lineItemAdded: z.never().optional(),
|
|
1296
|
+
lineItemRemoved: z.never().optional(),
|
|
1297
|
+
discountAdded: z.never().optional(),
|
|
1298
|
+
discountRemoved: z.never().optional(),
|
|
1299
|
+
additionalFeeRemoved: z.never().optional(),
|
|
1300
|
+
totalPriceChanged: z.never().optional(),
|
|
1301
|
+
additionalFeeAdded: z.object({
|
|
1302
|
+
_id: z.string().describe("Additional fee ID.").regex(
|
|
1303
|
+
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
1304
|
+
"Must be a valid GUID"
|
|
1305
|
+
).optional(),
|
|
1306
|
+
name: z.object({
|
|
1307
|
+
original: z.string().describe(
|
|
1308
|
+
"Value in site default language."
|
|
1309
|
+
).min(1).optional(),
|
|
1310
|
+
translated: z.string().describe("Translated value.").min(1).optional().nullable()
|
|
1311
|
+
}).describe("Additional fee name.").optional(),
|
|
1312
|
+
totalAmount: z.object({
|
|
1313
|
+
amount: z.string().describe("Amount.").optional(),
|
|
1314
|
+
formattedAmount: z.string().describe(
|
|
1315
|
+
"Amount formatted with currency symbol."
|
|
1316
|
+
).optional()
|
|
1317
|
+
}).describe("Additional fee amount.").optional()
|
|
1318
|
+
}).describe(
|
|
1319
|
+
"Additional fee was added to the contract."
|
|
1320
|
+
)
|
|
1321
|
+
}),
|
|
1322
|
+
z.object({
|
|
1323
|
+
lineItemChanged: z.never().optional(),
|
|
1324
|
+
lineItemAdded: z.never().optional(),
|
|
1325
|
+
lineItemRemoved: z.never().optional(),
|
|
1326
|
+
discountAdded: z.never().optional(),
|
|
1327
|
+
discountRemoved: z.never().optional(),
|
|
1328
|
+
additionalFeeAdded: z.never().optional(),
|
|
1329
|
+
totalPriceChanged: z.never().optional(),
|
|
1330
|
+
additionalFeeRemoved: z.object({
|
|
1331
|
+
_id: z.string().describe("Additional fee ID.").regex(
|
|
1332
|
+
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
1333
|
+
"Must be a valid GUID"
|
|
1334
|
+
).optional(),
|
|
1335
|
+
name: z.object({
|
|
1336
|
+
original: z.string().describe(
|
|
1337
|
+
"Value in site default language."
|
|
1338
|
+
).min(1).optional(),
|
|
1339
|
+
translated: z.string().describe("Translated value.").min(1).optional().nullable()
|
|
1340
|
+
}).describe("Additional fee name.").optional(),
|
|
1341
|
+
totalAmount: z.object({
|
|
1342
|
+
amount: z.string().describe("Amount.").optional(),
|
|
1343
|
+
formattedAmount: z.string().describe(
|
|
1344
|
+
"Amount formatted with currency symbol."
|
|
1345
|
+
).optional()
|
|
1346
|
+
}).describe("Additional fee amount.").optional()
|
|
1347
|
+
}).describe(
|
|
1348
|
+
"Additional fee was removed from the contract."
|
|
1349
|
+
)
|
|
1350
|
+
}),
|
|
1351
|
+
z.object({
|
|
1352
|
+
lineItemChanged: z.never().optional(),
|
|
1353
|
+
lineItemAdded: z.never().optional(),
|
|
1354
|
+
lineItemRemoved: z.never().optional(),
|
|
1355
|
+
discountAdded: z.never().optional(),
|
|
1356
|
+
discountRemoved: z.never().optional(),
|
|
1357
|
+
additionalFeeAdded: z.never().optional(),
|
|
1358
|
+
additionalFeeRemoved: z.never().optional(),
|
|
1359
|
+
totalPriceChanged: z.object({
|
|
1360
|
+
originalTotal: z.object({
|
|
1361
|
+
amount: z.string().describe("Amount.").optional(),
|
|
1362
|
+
formattedAmount: z.string().describe(
|
|
1363
|
+
"Amount formatted with currency symbol."
|
|
1364
|
+
).optional()
|
|
1365
|
+
}).describe("Total price before the commit.").optional(),
|
|
1366
|
+
newTotal: z.object({
|
|
1367
|
+
amount: z.string().describe("Amount.").optional(),
|
|
1368
|
+
formattedAmount: z.string().describe(
|
|
1369
|
+
"Amount formatted with currency symbol."
|
|
1370
|
+
).optional()
|
|
1371
|
+
}).describe("Total price after the commit.").optional()
|
|
1372
|
+
}).describe("Total price changed.")
|
|
1373
|
+
})
|
|
1374
|
+
])
|
|
1375
|
+
)
|
|
1376
|
+
).max(100).optional(),
|
|
1377
|
+
reason: z.string().describe(
|
|
1378
|
+
"Reason for the edit, provided by the merchant (optional)."
|
|
1379
|
+
).max(200).optional().nullable()
|
|
1380
|
+
}),
|
|
1381
|
+
z.xor([
|
|
1382
|
+
z.object({ contractTarget: z.never().optional() }),
|
|
1383
|
+
z.object({
|
|
1384
|
+
contractTarget: z.object({
|
|
1385
|
+
nextCycleNumber: z.number().int().describe(
|
|
1386
|
+
"Cycle number of the next billing cycle (1-based). Set by the caller; returned by the server on read."
|
|
1387
|
+
).optional().nullable()
|
|
1388
|
+
}).describe(
|
|
1389
|
+
"Scopes the draft to the contract level, applying to all future cycles."
|
|
1390
|
+
)
|
|
1391
|
+
})
|
|
1392
|
+
])
|
|
1393
|
+
).describe(
|
|
1394
|
+
"Changes committed from a DraftSubscriptionContract."
|
|
1395
|
+
)
|
|
1396
|
+
})
|
|
1397
|
+
])
|
|
1398
|
+
)
|
|
1399
|
+
)
|
|
1400
|
+
).max(500).optional()
|
|
1068
1401
|
});
|
|
1069
1402
|
var QuerySubscriptionContractsRequest = z.object({
|
|
1070
1403
|
query: z.intersection(
|
|
@@ -1569,7 +1902,7 @@ var QuerySubscriptionContractsResponse = z.object({
|
|
|
1569
1902
|
).describe("Buyer information.").optional(),
|
|
1570
1903
|
buyerLanguage: z.string().describe(
|
|
1571
1904
|
"Language for communication with the buyer. Defaults to the site language.\nFor a site that supports multiple languages, this is the language the buyer selected."
|
|
1572
|
-
).optional().nullable(),
|
|
1905
|
+
).max(10).optional().nullable(),
|
|
1573
1906
|
weightUnit: z.enum(["UNSPECIFIED_WEIGHT_UNIT", "KG", "LB"]).describe("Weight measurement unit - defaults to site's weight unit.").optional(),
|
|
1574
1907
|
currency: z.string().describe(
|
|
1575
1908
|
"Currency used for the pricing of this order in [ISO-4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes) format."
|
|
@@ -1990,7 +2323,7 @@ var QuerySubscriptionContractsResponse = z.object({
|
|
|
1990
2323
|
})
|
|
1991
2324
|
])
|
|
1992
2325
|
)
|
|
1993
|
-
).optional(),
|
|
2326
|
+
).max(100).optional(),
|
|
1994
2327
|
channelInfo: z.object({
|
|
1995
2328
|
type: z.enum([
|
|
1996
2329
|
"UNSPECIFIED",
|
|
@@ -2029,7 +2362,7 @@ var QuerySubscriptionContractsResponse = z.object({
|
|
|
2029
2362
|
title: z.string().describe("Custom field title.").min(1).max(500).optional(),
|
|
2030
2363
|
translatedTitle: z.string().describe("Translated custom field title.").min(1).max(500).optional().nullable()
|
|
2031
2364
|
})
|
|
2032
|
-
).optional(),
|
|
2365
|
+
).max(100).optional(),
|
|
2033
2366
|
recipientInfo: z.object({
|
|
2034
2367
|
address: z.object({
|
|
2035
2368
|
streetAddress: z.object({
|
|
@@ -2187,7 +2520,348 @@ var QuerySubscriptionContractsResponse = z.object({
|
|
|
2187
2520
|
"PLATFORM"
|
|
2188
2521
|
]).describe("Specifies the entity that added the additional fee.").optional()
|
|
2189
2522
|
})
|
|
2190
|
-
).max(100).optional()
|
|
2523
|
+
).max(100).optional(),
|
|
2524
|
+
activities: z.array(
|
|
2525
|
+
z.intersection(
|
|
2526
|
+
z.object({
|
|
2527
|
+
_id: z.string().describe("Activity ID.").regex(
|
|
2528
|
+
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
2529
|
+
"Must be a valid GUID"
|
|
2530
|
+
).optional(),
|
|
2531
|
+
_createdDate: z.date().describe("When the activity occurred.").optional().nullable(),
|
|
2532
|
+
author: z.intersection(
|
|
2533
|
+
z.object({}),
|
|
2534
|
+
z.xor([
|
|
2535
|
+
z.object({
|
|
2536
|
+
userId: z.never().optional(),
|
|
2537
|
+
appId: z.never().optional()
|
|
2538
|
+
}),
|
|
2539
|
+
z.object({
|
|
2540
|
+
appId: z.never().optional(),
|
|
2541
|
+
userId: z.string().describe(
|
|
2542
|
+
"User ID. When the draft order was created by a Wix user."
|
|
2543
|
+
).regex(
|
|
2544
|
+
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
2545
|
+
"Must be a valid GUID"
|
|
2546
|
+
)
|
|
2547
|
+
}),
|
|
2548
|
+
z.object({
|
|
2549
|
+
userId: z.never().optional(),
|
|
2550
|
+
appId: z.string().describe(
|
|
2551
|
+
"App ID. When the draft order was created by an app."
|
|
2552
|
+
).regex(
|
|
2553
|
+
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
2554
|
+
"Must be a valid GUID"
|
|
2555
|
+
)
|
|
2556
|
+
})
|
|
2557
|
+
])
|
|
2558
|
+
).describe("Identity of the draft order's initiator.").optional(),
|
|
2559
|
+
activityType: z.enum(["UNKNOWN_ACTIVITY_TYPE", "CHANGES_APPLIED"]).describe("Activity type.").optional()
|
|
2560
|
+
}),
|
|
2561
|
+
z.intersection(
|
|
2562
|
+
z.xor([
|
|
2563
|
+
z.object({ contractTarget: z.never().optional() }),
|
|
2564
|
+
z.object({
|
|
2565
|
+
contractTarget: z.object({
|
|
2566
|
+
nextCycleNumber: z.number().int().describe(
|
|
2567
|
+
"Cycle number of the next billing cycle (1-based). Set by the caller; returned by the server on read."
|
|
2568
|
+
).optional().nullable()
|
|
2569
|
+
}).describe(
|
|
2570
|
+
"Scopes the draft to the contract level, applying to all future cycles."
|
|
2571
|
+
)
|
|
2572
|
+
})
|
|
2573
|
+
]),
|
|
2574
|
+
z.xor([
|
|
2575
|
+
z.object({ changesApplied: z.never().optional() }),
|
|
2576
|
+
z.object({
|
|
2577
|
+
changesApplied: z.intersection(
|
|
2578
|
+
z.object({
|
|
2579
|
+
draftSubscriptionContractId: z.string().describe(
|
|
2580
|
+
"ID of the DraftSubscriptionContract that was committed."
|
|
2581
|
+
).regex(
|
|
2582
|
+
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
2583
|
+
"Must be a valid GUID"
|
|
2584
|
+
).optional(),
|
|
2585
|
+
changes: z.array(
|
|
2586
|
+
z.intersection(
|
|
2587
|
+
z.object({}),
|
|
2588
|
+
z.xor([
|
|
2589
|
+
z.object({
|
|
2590
|
+
lineItemChanged: z.never().optional(),
|
|
2591
|
+
lineItemAdded: z.never().optional(),
|
|
2592
|
+
lineItemRemoved: z.never().optional(),
|
|
2593
|
+
discountAdded: z.never().optional(),
|
|
2594
|
+
discountRemoved: z.never().optional(),
|
|
2595
|
+
additionalFeeAdded: z.never().optional(),
|
|
2596
|
+
additionalFeeRemoved: z.never().optional(),
|
|
2597
|
+
totalPriceChanged: z.never().optional()
|
|
2598
|
+
}),
|
|
2599
|
+
z.object({
|
|
2600
|
+
lineItemAdded: z.never().optional(),
|
|
2601
|
+
lineItemRemoved: z.never().optional(),
|
|
2602
|
+
discountAdded: z.never().optional(),
|
|
2603
|
+
discountRemoved: z.never().optional(),
|
|
2604
|
+
additionalFeeAdded: z.never().optional(),
|
|
2605
|
+
additionalFeeRemoved: z.never().optional(),
|
|
2606
|
+
totalPriceChanged: z.never().optional(),
|
|
2607
|
+
lineItemChanged: z.object({
|
|
2608
|
+
_id: z.string().describe("Line item ID.").regex(
|
|
2609
|
+
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
2610
|
+
"Must be a valid GUID"
|
|
2611
|
+
).optional(),
|
|
2612
|
+
name: z.object({
|
|
2613
|
+
original: z.string().describe(
|
|
2614
|
+
"__Required.__ Item name in the site's default language as defined in the [request envelope](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/self-hosting/supported-extensions/backend-extensions/add-self-hosted-service-plugin-extensions#request-envelope).\n\nMin: 1 character.\nMax: 200 characters."
|
|
2615
|
+
).min(1).max(200).optional(),
|
|
2616
|
+
translated: z.string().describe(
|
|
2617
|
+
"Item name translated into the buyer's language.\n\nMin: 1 character.\nMax: 400 characters.\nDefault: Same as `original`."
|
|
2618
|
+
).min(1).max(400).optional().nullable()
|
|
2619
|
+
}).describe("Item name after change.").optional(),
|
|
2620
|
+
quantity: z.object({
|
|
2621
|
+
originalQuantity: z.number().int().describe(
|
|
2622
|
+
"Original item quantity before the change."
|
|
2623
|
+
).min(0).max(1e6).optional(),
|
|
2624
|
+
newQuantity: z.number().int().describe(
|
|
2625
|
+
"New item quantity after the change."
|
|
2626
|
+
).min(0).max(1e6).optional(),
|
|
2627
|
+
diff: z.number().int().describe(
|
|
2628
|
+
"Difference between new and original quantities."
|
|
2629
|
+
).min(1).max(1e6).optional(),
|
|
2630
|
+
deltaType: z.enum([
|
|
2631
|
+
"QUANTITY_INCREASED",
|
|
2632
|
+
"QUANTITY_DECREASED"
|
|
2633
|
+
]).describe(
|
|
2634
|
+
"Direction of the quantity change."
|
|
2635
|
+
).optional()
|
|
2636
|
+
}).describe("Item quantity change.").optional()
|
|
2637
|
+
}).describe("Line item was modified.")
|
|
2638
|
+
}),
|
|
2639
|
+
z.object({
|
|
2640
|
+
lineItemChanged: z.never().optional(),
|
|
2641
|
+
lineItemRemoved: z.never().optional(),
|
|
2642
|
+
discountAdded: z.never().optional(),
|
|
2643
|
+
discountRemoved: z.never().optional(),
|
|
2644
|
+
additionalFeeAdded: z.never().optional(),
|
|
2645
|
+
additionalFeeRemoved: z.never().optional(),
|
|
2646
|
+
totalPriceChanged: z.never().optional(),
|
|
2647
|
+
lineItemAdded: z.object({
|
|
2648
|
+
_id: z.string().describe("Line item ID.").regex(
|
|
2649
|
+
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
2650
|
+
"Must be a valid GUID"
|
|
2651
|
+
).optional(),
|
|
2652
|
+
name: z.object({
|
|
2653
|
+
original: z.string().describe(
|
|
2654
|
+
"__Required.__ Item name in the site's default language as defined in the [request envelope](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/self-hosting/supported-extensions/backend-extensions/add-self-hosted-service-plugin-extensions#request-envelope).\n\nMin: 1 character.\nMax: 200 characters."
|
|
2655
|
+
).min(1).max(200).optional(),
|
|
2656
|
+
translated: z.string().describe(
|
|
2657
|
+
"Item name translated into the buyer's language.\n\nMin: 1 character.\nMax: 400 characters.\nDefault: Same as `original`."
|
|
2658
|
+
).min(1).max(400).optional().nullable()
|
|
2659
|
+
}).describe("Item name.").optional(),
|
|
2660
|
+
quantity: z.number().int().describe(
|
|
2661
|
+
"Added or removed item quantity."
|
|
2662
|
+
).min(1).max(1e6).optional()
|
|
2663
|
+
}).describe(
|
|
2664
|
+
"Line item was added to the contract."
|
|
2665
|
+
)
|
|
2666
|
+
}),
|
|
2667
|
+
z.object({
|
|
2668
|
+
lineItemChanged: z.never().optional(),
|
|
2669
|
+
lineItemAdded: z.never().optional(),
|
|
2670
|
+
discountAdded: z.never().optional(),
|
|
2671
|
+
discountRemoved: z.never().optional(),
|
|
2672
|
+
additionalFeeAdded: z.never().optional(),
|
|
2673
|
+
additionalFeeRemoved: z.never().optional(),
|
|
2674
|
+
totalPriceChanged: z.never().optional(),
|
|
2675
|
+
lineItemRemoved: z.object({
|
|
2676
|
+
_id: z.string().describe("Line item ID.").regex(
|
|
2677
|
+
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
2678
|
+
"Must be a valid GUID"
|
|
2679
|
+
).optional(),
|
|
2680
|
+
name: z.object({
|
|
2681
|
+
original: z.string().describe(
|
|
2682
|
+
"__Required.__ Item name in the site's default language as defined in the [request envelope](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/self-hosting/supported-extensions/backend-extensions/add-self-hosted-service-plugin-extensions#request-envelope).\n\nMin: 1 character.\nMax: 200 characters."
|
|
2683
|
+
).min(1).max(200).optional(),
|
|
2684
|
+
translated: z.string().describe(
|
|
2685
|
+
"Item name translated into the buyer's language.\n\nMin: 1 character.\nMax: 400 characters.\nDefault: Same as `original`."
|
|
2686
|
+
).min(1).max(400).optional().nullable()
|
|
2687
|
+
}).describe("Item name.").optional(),
|
|
2688
|
+
quantity: z.number().int().describe(
|
|
2689
|
+
"Added or removed item quantity."
|
|
2690
|
+
).min(1).max(1e6).optional()
|
|
2691
|
+
}).describe(
|
|
2692
|
+
"Line item was removed from the contract."
|
|
2693
|
+
)
|
|
2694
|
+
}),
|
|
2695
|
+
z.object({
|
|
2696
|
+
lineItemChanged: z.never().optional(),
|
|
2697
|
+
lineItemAdded: z.never().optional(),
|
|
2698
|
+
lineItemRemoved: z.never().optional(),
|
|
2699
|
+
discountRemoved: z.never().optional(),
|
|
2700
|
+
additionalFeeAdded: z.never().optional(),
|
|
2701
|
+
additionalFeeRemoved: z.never().optional(),
|
|
2702
|
+
totalPriceChanged: z.never().optional(),
|
|
2703
|
+
discountAdded: z.object({
|
|
2704
|
+
_id: z.string().describe("Discount ID.").regex(
|
|
2705
|
+
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
2706
|
+
"Must be a valid GUID"
|
|
2707
|
+
).optional(),
|
|
2708
|
+
name: z.object({
|
|
2709
|
+
original: z.string().describe(
|
|
2710
|
+
"Value in site default language."
|
|
2711
|
+
).min(1).optional(),
|
|
2712
|
+
translated: z.string().describe("Translated value.").min(1).optional().nullable()
|
|
2713
|
+
}).describe("Discount name.").optional(),
|
|
2714
|
+
totalAmount: z.object({
|
|
2715
|
+
amount: z.string().describe("Amount.").optional(),
|
|
2716
|
+
formattedAmount: z.string().describe(
|
|
2717
|
+
"Amount formatted with currency symbol."
|
|
2718
|
+
).optional()
|
|
2719
|
+
}).describe("Discount amount.").optional()
|
|
2720
|
+
}).describe(
|
|
2721
|
+
"Discount was added to the contract."
|
|
2722
|
+
)
|
|
2723
|
+
}),
|
|
2724
|
+
z.object({
|
|
2725
|
+
lineItemChanged: z.never().optional(),
|
|
2726
|
+
lineItemAdded: z.never().optional(),
|
|
2727
|
+
lineItemRemoved: z.never().optional(),
|
|
2728
|
+
discountAdded: z.never().optional(),
|
|
2729
|
+
additionalFeeAdded: z.never().optional(),
|
|
2730
|
+
additionalFeeRemoved: z.never().optional(),
|
|
2731
|
+
totalPriceChanged: z.never().optional(),
|
|
2732
|
+
discountRemoved: z.object({
|
|
2733
|
+
_id: z.string().describe("Discount ID.").regex(
|
|
2734
|
+
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
2735
|
+
"Must be a valid GUID"
|
|
2736
|
+
).optional(),
|
|
2737
|
+
name: z.object({
|
|
2738
|
+
original: z.string().describe(
|
|
2739
|
+
"Value in site default language."
|
|
2740
|
+
).min(1).optional(),
|
|
2741
|
+
translated: z.string().describe("Translated value.").min(1).optional().nullable()
|
|
2742
|
+
}).describe("Discount name.").optional(),
|
|
2743
|
+
totalAmount: z.object({
|
|
2744
|
+
amount: z.string().describe("Amount.").optional(),
|
|
2745
|
+
formattedAmount: z.string().describe(
|
|
2746
|
+
"Amount formatted with currency symbol."
|
|
2747
|
+
).optional()
|
|
2748
|
+
}).describe("Discount amount.").optional()
|
|
2749
|
+
}).describe(
|
|
2750
|
+
"Discount was removed from the contract."
|
|
2751
|
+
)
|
|
2752
|
+
}),
|
|
2753
|
+
z.object({
|
|
2754
|
+
lineItemChanged: z.never().optional(),
|
|
2755
|
+
lineItemAdded: z.never().optional(),
|
|
2756
|
+
lineItemRemoved: z.never().optional(),
|
|
2757
|
+
discountAdded: z.never().optional(),
|
|
2758
|
+
discountRemoved: z.never().optional(),
|
|
2759
|
+
additionalFeeRemoved: z.never().optional(),
|
|
2760
|
+
totalPriceChanged: z.never().optional(),
|
|
2761
|
+
additionalFeeAdded: z.object({
|
|
2762
|
+
_id: z.string().describe("Additional fee ID.").regex(
|
|
2763
|
+
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
2764
|
+
"Must be a valid GUID"
|
|
2765
|
+
).optional(),
|
|
2766
|
+
name: z.object({
|
|
2767
|
+
original: z.string().describe(
|
|
2768
|
+
"Value in site default language."
|
|
2769
|
+
).min(1).optional(),
|
|
2770
|
+
translated: z.string().describe("Translated value.").min(1).optional().nullable()
|
|
2771
|
+
}).describe("Additional fee name.").optional(),
|
|
2772
|
+
totalAmount: z.object({
|
|
2773
|
+
amount: z.string().describe("Amount.").optional(),
|
|
2774
|
+
formattedAmount: z.string().describe(
|
|
2775
|
+
"Amount formatted with currency symbol."
|
|
2776
|
+
).optional()
|
|
2777
|
+
}).describe("Additional fee amount.").optional()
|
|
2778
|
+
}).describe(
|
|
2779
|
+
"Additional fee was added to the contract."
|
|
2780
|
+
)
|
|
2781
|
+
}),
|
|
2782
|
+
z.object({
|
|
2783
|
+
lineItemChanged: z.never().optional(),
|
|
2784
|
+
lineItemAdded: z.never().optional(),
|
|
2785
|
+
lineItemRemoved: z.never().optional(),
|
|
2786
|
+
discountAdded: z.never().optional(),
|
|
2787
|
+
discountRemoved: z.never().optional(),
|
|
2788
|
+
additionalFeeAdded: z.never().optional(),
|
|
2789
|
+
totalPriceChanged: z.never().optional(),
|
|
2790
|
+
additionalFeeRemoved: z.object({
|
|
2791
|
+
_id: z.string().describe("Additional fee ID.").regex(
|
|
2792
|
+
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
2793
|
+
"Must be a valid GUID"
|
|
2794
|
+
).optional(),
|
|
2795
|
+
name: z.object({
|
|
2796
|
+
original: z.string().describe(
|
|
2797
|
+
"Value in site default language."
|
|
2798
|
+
).min(1).optional(),
|
|
2799
|
+
translated: z.string().describe("Translated value.").min(1).optional().nullable()
|
|
2800
|
+
}).describe("Additional fee name.").optional(),
|
|
2801
|
+
totalAmount: z.object({
|
|
2802
|
+
amount: z.string().describe("Amount.").optional(),
|
|
2803
|
+
formattedAmount: z.string().describe(
|
|
2804
|
+
"Amount formatted with currency symbol."
|
|
2805
|
+
).optional()
|
|
2806
|
+
}).describe("Additional fee amount.").optional()
|
|
2807
|
+
}).describe(
|
|
2808
|
+
"Additional fee was removed from the contract."
|
|
2809
|
+
)
|
|
2810
|
+
}),
|
|
2811
|
+
z.object({
|
|
2812
|
+
lineItemChanged: z.never().optional(),
|
|
2813
|
+
lineItemAdded: z.never().optional(),
|
|
2814
|
+
lineItemRemoved: z.never().optional(),
|
|
2815
|
+
discountAdded: z.never().optional(),
|
|
2816
|
+
discountRemoved: z.never().optional(),
|
|
2817
|
+
additionalFeeAdded: z.never().optional(),
|
|
2818
|
+
additionalFeeRemoved: z.never().optional(),
|
|
2819
|
+
totalPriceChanged: z.object({
|
|
2820
|
+
originalTotal: z.object({
|
|
2821
|
+
amount: z.string().describe("Amount.").optional(),
|
|
2822
|
+
formattedAmount: z.string().describe(
|
|
2823
|
+
"Amount formatted with currency symbol."
|
|
2824
|
+
).optional()
|
|
2825
|
+
}).describe(
|
|
2826
|
+
"Total price before the commit."
|
|
2827
|
+
).optional(),
|
|
2828
|
+
newTotal: z.object({
|
|
2829
|
+
amount: z.string().describe("Amount.").optional(),
|
|
2830
|
+
formattedAmount: z.string().describe(
|
|
2831
|
+
"Amount formatted with currency symbol."
|
|
2832
|
+
).optional()
|
|
2833
|
+
}).describe(
|
|
2834
|
+
"Total price after the commit."
|
|
2835
|
+
).optional()
|
|
2836
|
+
}).describe("Total price changed.")
|
|
2837
|
+
})
|
|
2838
|
+
])
|
|
2839
|
+
)
|
|
2840
|
+
).max(100).optional(),
|
|
2841
|
+
reason: z.string().describe(
|
|
2842
|
+
"Reason for the edit, provided by the merchant (optional)."
|
|
2843
|
+
).max(200).optional().nullable()
|
|
2844
|
+
}),
|
|
2845
|
+
z.xor([
|
|
2846
|
+
z.object({ contractTarget: z.never().optional() }),
|
|
2847
|
+
z.object({
|
|
2848
|
+
contractTarget: z.object({
|
|
2849
|
+
nextCycleNumber: z.number().int().describe(
|
|
2850
|
+
"Cycle number of the next billing cycle (1-based). Set by the caller; returned by the server on read."
|
|
2851
|
+
).optional().nullable()
|
|
2852
|
+
}).describe(
|
|
2853
|
+
"Scopes the draft to the contract level, applying to all future cycles."
|
|
2854
|
+
)
|
|
2855
|
+
})
|
|
2856
|
+
])
|
|
2857
|
+
).describe(
|
|
2858
|
+
"Changes committed from a DraftSubscriptionContract."
|
|
2859
|
+
)
|
|
2860
|
+
})
|
|
2861
|
+
])
|
|
2862
|
+
)
|
|
2863
|
+
)
|
|
2864
|
+
).max(500).optional()
|
|
2191
2865
|
})
|
|
2192
2866
|
).optional(),
|
|
2193
2867
|
pagingMetadata: z.object({
|