@wix/auto_sdk_packages_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.
Files changed (37) hide show
  1. package/build/cjs/index.d.ts +8 -57
  2. package/build/cjs/index.js +51 -9
  3. package/build/cjs/index.js.map +1 -1
  4. package/build/cjs/index.typings.d.ts +10 -4
  5. package/build/cjs/index.typings.js +33 -8
  6. package/build/cjs/index.typings.js.map +1 -1
  7. package/build/cjs/meta.d.ts +4 -4
  8. package/build/cjs/meta.js +8 -8
  9. package/build/cjs/meta.js.map +1 -1
  10. package/build/es/index.d.mts +8 -57
  11. package/build/es/index.mjs +50 -8
  12. package/build/es/index.mjs.map +1 -1
  13. package/build/es/index.typings.d.mts +10 -4
  14. package/build/es/index.typings.mjs +31 -7
  15. package/build/es/index.typings.mjs.map +1 -1
  16. package/build/es/meta.d.mts +4 -4
  17. package/build/es/meta.mjs +7 -7
  18. package/build/es/meta.mjs.map +1 -1
  19. package/build/internal/cjs/index.d.ts +8 -57
  20. package/build/internal/cjs/index.js +51 -9
  21. package/build/internal/cjs/index.js.map +1 -1
  22. package/build/internal/cjs/index.typings.d.ts +10 -4
  23. package/build/internal/cjs/index.typings.js +33 -8
  24. package/build/internal/cjs/index.typings.js.map +1 -1
  25. package/build/internal/cjs/meta.d.ts +4 -4
  26. package/build/internal/cjs/meta.js +8 -8
  27. package/build/internal/cjs/meta.js.map +1 -1
  28. package/build/internal/es/index.d.mts +8 -57
  29. package/build/internal/es/index.mjs +50 -8
  30. package/build/internal/es/index.mjs.map +1 -1
  31. package/build/internal/es/index.typings.d.mts +10 -4
  32. package/build/internal/es/index.typings.mjs +31 -7
  33. package/build/internal/es/index.typings.mjs.map +1 -1
  34. package/build/internal/es/meta.d.mts +4 -4
  35. package/build/internal/es/meta.mjs +7 -7
  36. package/build/internal/es/meta.mjs.map +1 -1
  37. 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 FailureReasonFailureReason {
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 FailureReasonFailureReasonWithLiterals = FailureReasonFailureReason | 'UNKNOWN' | 'DELIVERY_TIMEOUT' | 'EXTERNAL_FAILURE';
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?: FailureReasonFailureReasonWithLiterals;
198
+ code?: FailureReasonCodeWithLiterals;
199
199
  /** Failure message. */
200
200
  message?: string;
201
201
  }
@@ -1665,6 +1665,12 @@ interface PackagesQueryBuilder {
1665
1665
  /** @documentationMaturity preview */
1666
1666
  find: () => Promise<PackagesQueryResult>;
1667
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>>;
1668
1674
  /**
1669
1675
  * Assigns a product instance to a site.
1670
1676
  *
@@ -1864,4 +1870,4 @@ interface UpdatePackageExternalIdIdentifiers {
1864
1870
  externalId: string;
1865
1871
  }
1866
1872
 
1867
- 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, FailureReasonFailureReason, type FailureReasonFailureReasonWithLiterals, 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, unassignProductInstanceFromSite, updatePackageExternalId };
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
- FailureReasonFailureReason: () => FailureReasonFailureReason,
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 FailureReasonFailureReason = /* @__PURE__ */ ((FailureReasonFailureReason2) => {
435
- FailureReasonFailureReason2["UNKNOWN"] = "UNKNOWN";
436
- FailureReasonFailureReason2["DELIVERY_TIMEOUT"] = "DELIVERY_TIMEOUT";
437
- FailureReasonFailureReason2["EXTERNAL_FAILURE"] = "EXTERNAL_FAILURE";
438
- return FailureReasonFailureReason2;
439
- })(FailureReasonFailureReason || {});
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";
@@ -716,6 +717,29 @@ function queryPackages2() {
716
717
  transformationPaths: {}
717
718
  });
718
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
+ }
719
743
  async function assignProductInstanceToSite2(identifiers, options) {
720
744
  const { httpClient, sideEffects } = arguments[2];
721
745
  const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
@@ -878,7 +902,7 @@ async function updatePackageExternalId2(identifiers) {
878
902
  ContractSwitchReason,
879
903
  ContractSwitchType,
880
904
  CycleDescriptorType,
881
- FailureReasonFailureReason,
905
+ FailureReasonCode,
882
906
  FieldToUpdate,
883
907
  Initiator,
884
908
  IntervalIntervalUnit,
@@ -901,6 +925,7 @@ async function updatePackageExternalId2(identifiers) {
901
925
  createPackageV2,
902
926
  getPackage,
903
927
  queryPackages,
928
+ typedQueryPackages,
904
929
  unassignProductInstanceFromSite,
905
930
  updatePackageExternalId
906
931
  });