@wix/auto_sdk_packages_packages 1.0.8 → 1.0.10
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 +8 -57
- package/build/cjs/index.js +52 -9
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +13 -6
- package/build/cjs/index.typings.js +34 -8
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +7 -6
- package/build/cjs/meta.js +9 -8
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.d.mts +8 -57
- package/build/es/index.mjs +51 -8
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +13 -6
- package/build/es/index.typings.mjs +32 -7
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +7 -6
- package/build/es/meta.mjs +8 -7
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +8 -57
- package/build/internal/cjs/index.js +52 -9
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +13 -6
- package/build/internal/cjs/index.typings.js +34 -8
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +7 -6
- package/build/internal/cjs/meta.js +9 -8
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/es/index.d.mts +8 -57
- package/build/internal/es/index.mjs +51 -8
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +13 -6
- package/build/internal/es/index.typings.mjs +32 -7
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.d.mts +7 -6
- package/build/internal/es/meta.mjs +8 -7
- package/build/internal/es/meta.mjs.map +1 -1
- package/package.json +3 -3
|
@@ -137,7 +137,7 @@ interface ProductInstanceContractDetailsOneOf {
|
|
|
137
137
|
/** Billing information for the contract between the reseller and Wix. */
|
|
138
138
|
billingInfo?: ProductInstanceCycle;
|
|
139
139
|
}
|
|
140
|
-
declare enum
|
|
140
|
+
declare enum FailureReasonCode {
|
|
141
141
|
UNKNOWN = "UNKNOWN",
|
|
142
142
|
/** The product instance couldn't be created because the Resellers API timed out. */
|
|
143
143
|
DELIVERY_TIMEOUT = "DELIVERY_TIMEOUT",
|
|
@@ -145,7 +145,7 @@ declare enum FailureReasonFailureReason {
|
|
|
145
145
|
EXTERNAL_FAILURE = "EXTERNAL_FAILURE"
|
|
146
146
|
}
|
|
147
147
|
/** @enumType */
|
|
148
|
-
type
|
|
148
|
+
type FailureReasonCodeWithLiterals = FailureReasonCode | 'UNKNOWN' | 'DELIVERY_TIMEOUT' | 'EXTERNAL_FAILURE';
|
|
149
149
|
declare enum IntervalIntervalUnit {
|
|
150
150
|
/** unknown interval unit */
|
|
151
151
|
UNKNOWN = "UNKNOWN",
|
|
@@ -195,7 +195,7 @@ declare enum Status {
|
|
|
195
195
|
type StatusWithLiterals = Status | 'PENDING' | 'ENABLED' | 'CANCELED' | 'FAILED' | 'AWAITING_ACTION';
|
|
196
196
|
interface FailureReason {
|
|
197
197
|
/** Failure code. */
|
|
198
|
-
code?:
|
|
198
|
+
code?: FailureReasonCodeWithLiterals;
|
|
199
199
|
/** Failure message. */
|
|
200
200
|
message?: string;
|
|
201
201
|
}
|
|
@@ -1090,10 +1090,11 @@ declare enum ContractSwitchType {
|
|
|
1090
1090
|
FULL_AMOUNT_PERIOD = "FULL_AMOUNT_PERIOD",
|
|
1091
1091
|
END_OF_PERIOD = "END_OF_PERIOD",
|
|
1092
1092
|
PENDING_CHANGES = "PENDING_CHANGES",
|
|
1093
|
-
DOWNGRADE_RENEWAL = "DOWNGRADE_RENEWAL"
|
|
1093
|
+
DOWNGRADE_RENEWAL = "DOWNGRADE_RENEWAL",
|
|
1094
|
+
FIXED_BILLING_DATE_PRORATION = "FIXED_BILLING_DATE_PRORATION"
|
|
1094
1095
|
}
|
|
1095
1096
|
/** @enumType */
|
|
1096
|
-
type ContractSwitchTypeWithLiterals = ContractSwitchType | 'NOT_APPLICABLE' | 'ADDITIONAL_QUANTITY' | 'CREDIT_UNUSED_PERIOD' | 'REFUND_PRICE_DIFF' | 'ADJUST_PERIOD_END' | 'DOWNGRADE_GRACE_PERIOD' | 'FULL_AMOUNT_PERIOD' | 'END_OF_PERIOD' | 'PENDING_CHANGES' | 'DOWNGRADE_RENEWAL';
|
|
1097
|
+
type ContractSwitchTypeWithLiterals = ContractSwitchType | 'NOT_APPLICABLE' | 'ADDITIONAL_QUANTITY' | 'CREDIT_UNUSED_PERIOD' | 'REFUND_PRICE_DIFF' | 'ADJUST_PERIOD_END' | 'DOWNGRADE_GRACE_PERIOD' | 'FULL_AMOUNT_PERIOD' | 'END_OF_PERIOD' | 'PENDING_CHANGES' | 'DOWNGRADE_RENEWAL' | 'FIXED_BILLING_DATE_PRORATION';
|
|
1097
1098
|
declare enum ContractSwitchReason {
|
|
1098
1099
|
EXTERNAL_PROVIDER_TRIGGER = "EXTERNAL_PROVIDER_TRIGGER",
|
|
1099
1100
|
PRICE_INCREASE = "PRICE_INCREASE"
|
|
@@ -1664,6 +1665,12 @@ interface PackagesQueryBuilder {
|
|
|
1664
1665
|
/** @documentationMaturity preview */
|
|
1665
1666
|
find: () => Promise<PackagesQueryResult>;
|
|
1666
1667
|
}
|
|
1668
|
+
/**
|
|
1669
|
+
* @hidden
|
|
1670
|
+
* @fqn com.wixpress.premium.reseller.packages.v1.Packages.QueryPackages
|
|
1671
|
+
* @requiredField query
|
|
1672
|
+
*/
|
|
1673
|
+
declare function typedQueryPackages(query: QueryV2): Promise<NonNullablePaths<QueryPackagesResponse, `packages` | `packages.${number}._id` | `packages.${number}.accountId`, 4>>;
|
|
1667
1674
|
/**
|
|
1668
1675
|
* Assigns a product instance to a site.
|
|
1669
1676
|
*
|
|
@@ -1863,4 +1870,4 @@ interface UpdatePackageExternalIdIdentifiers {
|
|
|
1863
1870
|
externalId: string;
|
|
1864
1871
|
}
|
|
1865
1872
|
|
|
1866
|
-
export { type ActionEvent, type AdjustProductInstanceSpecificationsOptions, type AdjustProductInstanceSpecificationsRequest, type AdjustProductInstanceSpecificationsResponse, type AdjustedProductInstanceSpecifications, type AssignProductInstanceToSiteIdentifiers, type AssignProductInstanceToSiteOptions, type AssignProductInstanceToSiteRequest, type AssignProductInstanceToSiteResponse, type AssignedProductInstanceToSite, type BillingReference, type Cancel, type CancelPackageOptions, type CancelPackageRequest, type CancelPackageResponse, type CancelProductInstanceOptions, type CancelProductInstanceRequest, type CancelProductInstanceResponse, type CancellationDetails, type Complete, ContractSwitchReason, type ContractSwitchReasonWithLiterals, ContractSwitchType, type ContractSwitchTypeWithLiterals, type ContractSwitched, type CountPackagesRequest, type CountPackagesResponse, type CreatePackageOptions, type CreatePackageRequest, type CreatePackageResponse, type CreatePackageV2Options, type CursorPaging, type Cursors, type Cycle, type CycleCycleSelectorOneOf, CycleDescriptorType, type CycleDescriptorTypeWithLiterals, type CycleInterval, type DomainEvent, type DomainEventBodyOneOf, type Empty, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, type FailureReason,
|
|
1873
|
+
export { type ActionEvent, type AdjustProductInstanceSpecificationsOptions, type AdjustProductInstanceSpecificationsRequest, type AdjustProductInstanceSpecificationsResponse, type AdjustedProductInstanceSpecifications, type AssignProductInstanceToSiteIdentifiers, type AssignProductInstanceToSiteOptions, type AssignProductInstanceToSiteRequest, type AssignProductInstanceToSiteResponse, type AssignedProductInstanceToSite, type BillingReference, type Cancel, type CancelPackageOptions, type CancelPackageRequest, type CancelPackageResponse, type CancelProductInstanceOptions, type CancelProductInstanceRequest, type CancelProductInstanceResponse, type CancellationDetails, type Complete, ContractSwitchReason, type ContractSwitchReasonWithLiterals, ContractSwitchType, type ContractSwitchTypeWithLiterals, type ContractSwitched, type CountPackagesRequest, type CountPackagesResponse, type CreatePackageOptions, type CreatePackageRequest, type CreatePackageResponse, type CreatePackageV2Options, type CursorPaging, type Cursors, type Cycle, type CycleCycleSelectorOneOf, CycleDescriptorType, type CycleDescriptorTypeWithLiterals, type CycleInterval, type DomainEvent, type DomainEventBodyOneOf, type Empty, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, type FailureReason, FailureReasonCode, type FailureReasonCodeWithLiterals, type FailureReportRequest, FieldToUpdate, type FieldToUpdateWithLiterals, type FixBrokenMigrationRequest, type FixBrokenMigrationResponse, type GetPackageRequest, type GetPackageResponse, type IdentificationData, type IdentificationDataIdOneOf, Initiator, type InitiatorWithLiterals, type Interval, IntervalIntervalUnit, type IntervalIntervalUnitWithLiterals, IntervalUnit, type IntervalUnitWithLiterals, type MessageEnvelope, type MigrateSubscriptionToPackagesRequest, type MigrateSubscriptionToPackagesResponse, type OneTime, type Package, type PackageCanceled, type PackagesQueryBuilder, type PackagesQueryResult, type Paging, type PagingMetadataV2, PriceIncreaseTrigger, type PriceIncreaseTriggerWithLiterals, ProductAdjustment, type ProductAdjustmentWithLiterals, type ProductInstance, type ProductInstanceCanceled, type ProductInstanceContractDetailsOneOf, type ProductInstanceCycle, type ProductInstanceFailed, type ProductInstanceUpdated, type ProductPriceIncreaseData, ProviderName, type ProviderNameWithLiterals, type QueryPackagesRequest, type QueryPackagesResponse, type QueryV2, type QueryV2PagingMethodOneOf, type ReactivationData, ReactivationReasonEnum, type ReactivationReasonEnumWithLiterals, type RecurringChargeAttemptFailed, type RecurringChargeSucceeded, RefundType, type RefundTypeWithLiterals, type Reschedule, type RestoreInfo, SortOrder, type SortOrderWithLiterals, type Sorting, Status, type StatusWithLiterals, type Subscription, type SubscriptionAssigned, type SubscriptionAutoRenewTurnedOff, type SubscriptionAutoRenewTurnedOn, type SubscriptionCancelled, type SubscriptionCreated, type SubscriptionEvent, type SubscriptionEventEventOneOf, type SubscriptionNearEndOfPeriod, type SubscriptionPendingChange, SubscriptionStatus, type SubscriptionStatusWithLiterals, type SubscriptionTransferred, type SubscriptionUnassigned, type Task, type TaskAction, type TaskActionActionOneOf, type TaskKey, type UnassignProductInstanceFromSiteOptions, type UnassignProductInstanceFromSiteRequest, type UnassignProductInstanceFromSiteResponse, UnassignReason, type UnassignReasonWithLiterals, type UnassignedProductInstanceFromSite, type UpdatePackageExternalIdIdentifiers, type UpdatePackageExternalIdRequest, type UpdatePackageExternalIdResponse, type UpdateProductInstanceRequest, type UpdateProductInstanceResponse, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, adjustProductInstanceSpecifications, assignProductInstanceToSite, cancelPackage, cancelProductInstance, createPackage, createPackageV2, getPackage, queryPackages, typedQueryPackages, unassignProductInstanceFromSite, updatePackageExternalId };
|
|
@@ -23,7 +23,7 @@ __export(index_typings_exports, {
|
|
|
23
23
|
ContractSwitchReason: () => ContractSwitchReason,
|
|
24
24
|
ContractSwitchType: () => ContractSwitchType,
|
|
25
25
|
CycleDescriptorType: () => CycleDescriptorType,
|
|
26
|
-
|
|
26
|
+
FailureReasonCode: () => FailureReasonCode,
|
|
27
27
|
FieldToUpdate: () => FieldToUpdate,
|
|
28
28
|
Initiator: () => Initiator,
|
|
29
29
|
IntervalIntervalUnit: () => IntervalIntervalUnit,
|
|
@@ -46,6 +46,7 @@ __export(index_typings_exports, {
|
|
|
46
46
|
createPackageV2: () => createPackageV22,
|
|
47
47
|
getPackage: () => getPackage2,
|
|
48
48
|
queryPackages: () => queryPackages2,
|
|
49
|
+
typedQueryPackages: () => typedQueryPackages,
|
|
49
50
|
unassignProductInstanceFromSite: () => unassignProductInstanceFromSite2,
|
|
50
51
|
updatePackageExternalId: () => updatePackageExternalId2
|
|
51
52
|
});
|
|
@@ -431,12 +432,12 @@ function updatePackageExternalId(payload) {
|
|
|
431
432
|
|
|
432
433
|
// src/premium-reseller-v1-packages-packages.universal.ts
|
|
433
434
|
var import_transform_paths2 = require("@wix/sdk-runtime/transformations/transform-paths");
|
|
434
|
-
var
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
return
|
|
439
|
-
})(
|
|
435
|
+
var FailureReasonCode = /* @__PURE__ */ ((FailureReasonCode2) => {
|
|
436
|
+
FailureReasonCode2["UNKNOWN"] = "UNKNOWN";
|
|
437
|
+
FailureReasonCode2["DELIVERY_TIMEOUT"] = "DELIVERY_TIMEOUT";
|
|
438
|
+
FailureReasonCode2["EXTERNAL_FAILURE"] = "EXTERNAL_FAILURE";
|
|
439
|
+
return FailureReasonCode2;
|
|
440
|
+
})(FailureReasonCode || {});
|
|
440
441
|
var IntervalIntervalUnit = /* @__PURE__ */ ((IntervalIntervalUnit2) => {
|
|
441
442
|
IntervalIntervalUnit2["UNKNOWN"] = "UNKNOWN";
|
|
442
443
|
IntervalIntervalUnit2["DAY"] = "DAY";
|
|
@@ -527,6 +528,7 @@ var ContractSwitchType = /* @__PURE__ */ ((ContractSwitchType2) => {
|
|
|
527
528
|
ContractSwitchType2["END_OF_PERIOD"] = "END_OF_PERIOD";
|
|
528
529
|
ContractSwitchType2["PENDING_CHANGES"] = "PENDING_CHANGES";
|
|
529
530
|
ContractSwitchType2["DOWNGRADE_RENEWAL"] = "DOWNGRADE_RENEWAL";
|
|
531
|
+
ContractSwitchType2["FIXED_BILLING_DATE_PRORATION"] = "FIXED_BILLING_DATE_PRORATION";
|
|
530
532
|
return ContractSwitchType2;
|
|
531
533
|
})(ContractSwitchType || {});
|
|
532
534
|
var ContractSwitchReason = /* @__PURE__ */ ((ContractSwitchReason2) => {
|
|
@@ -715,6 +717,29 @@ function queryPackages2() {
|
|
|
715
717
|
transformationPaths: {}
|
|
716
718
|
});
|
|
717
719
|
}
|
|
720
|
+
async function typedQueryPackages(query) {
|
|
721
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
722
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({ query });
|
|
723
|
+
const reqOpts = queryPackages(payload);
|
|
724
|
+
sideEffects?.onSiteCall?.();
|
|
725
|
+
try {
|
|
726
|
+
const result = await httpClient.request(reqOpts);
|
|
727
|
+
sideEffects?.onSuccess?.(result);
|
|
728
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
729
|
+
} catch (err) {
|
|
730
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
731
|
+
err,
|
|
732
|
+
{
|
|
733
|
+
spreadPathsToArguments: {},
|
|
734
|
+
explicitPathsToArguments: { query: "$[0]" },
|
|
735
|
+
singleArgumentUnchanged: false
|
|
736
|
+
},
|
|
737
|
+
["query"]
|
|
738
|
+
);
|
|
739
|
+
sideEffects?.onError?.(err);
|
|
740
|
+
throw transformedError;
|
|
741
|
+
}
|
|
742
|
+
}
|
|
718
743
|
async function assignProductInstanceToSite2(identifiers, options) {
|
|
719
744
|
const { httpClient, sideEffects } = arguments[2];
|
|
720
745
|
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
@@ -877,7 +902,7 @@ async function updatePackageExternalId2(identifiers) {
|
|
|
877
902
|
ContractSwitchReason,
|
|
878
903
|
ContractSwitchType,
|
|
879
904
|
CycleDescriptorType,
|
|
880
|
-
|
|
905
|
+
FailureReasonCode,
|
|
881
906
|
FieldToUpdate,
|
|
882
907
|
Initiator,
|
|
883
908
|
IntervalIntervalUnit,
|
|
@@ -900,6 +925,7 @@ async function updatePackageExternalId2(identifiers) {
|
|
|
900
925
|
createPackageV2,
|
|
901
926
|
getPackage,
|
|
902
927
|
queryPackages,
|
|
928
|
+
typedQueryPackages,
|
|
903
929
|
unassignProductInstanceFromSite,
|
|
904
930
|
updatePackageExternalId
|
|
905
931
|
});
|