@wix/auto_sdk_packages_packages 1.0.9 → 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.
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 };
@@ -381,12 +381,12 @@ function updatePackageExternalId(payload) {
381
381
 
382
382
  // src/premium-reseller-v1-packages-packages.universal.ts
383
383
  import { transformPaths as transformPaths2 } from "@wix/sdk-runtime/transformations/transform-paths";
384
- var FailureReasonFailureReason = /* @__PURE__ */ ((FailureReasonFailureReason2) => {
385
- FailureReasonFailureReason2["UNKNOWN"] = "UNKNOWN";
386
- FailureReasonFailureReason2["DELIVERY_TIMEOUT"] = "DELIVERY_TIMEOUT";
387
- FailureReasonFailureReason2["EXTERNAL_FAILURE"] = "EXTERNAL_FAILURE";
388
- return FailureReasonFailureReason2;
389
- })(FailureReasonFailureReason || {});
384
+ var FailureReasonCode = /* @__PURE__ */ ((FailureReasonCode2) => {
385
+ FailureReasonCode2["UNKNOWN"] = "UNKNOWN";
386
+ FailureReasonCode2["DELIVERY_TIMEOUT"] = "DELIVERY_TIMEOUT";
387
+ FailureReasonCode2["EXTERNAL_FAILURE"] = "EXTERNAL_FAILURE";
388
+ return FailureReasonCode2;
389
+ })(FailureReasonCode || {});
390
390
  var IntervalIntervalUnit = /* @__PURE__ */ ((IntervalIntervalUnit2) => {
391
391
  IntervalIntervalUnit2["UNKNOWN"] = "UNKNOWN";
392
392
  IntervalIntervalUnit2["DAY"] = "DAY";
@@ -666,6 +666,29 @@ function queryPackages2() {
666
666
  transformationPaths: {}
667
667
  });
668
668
  }
669
+ async function typedQueryPackages(query) {
670
+ const { httpClient, sideEffects } = arguments[1];
671
+ const payload = renameKeysFromSDKRequestToRESTRequest({ query });
672
+ const reqOpts = queryPackages(payload);
673
+ sideEffects?.onSiteCall?.();
674
+ try {
675
+ const result = await httpClient.request(reqOpts);
676
+ sideEffects?.onSuccess?.(result);
677
+ return renameKeysFromRESTResponseToSDKResponse(result.data);
678
+ } catch (err) {
679
+ const transformedError = sdkTransformError(
680
+ err,
681
+ {
682
+ spreadPathsToArguments: {},
683
+ explicitPathsToArguments: { query: "$[0]" },
684
+ singleArgumentUnchanged: false
685
+ },
686
+ ["query"]
687
+ );
688
+ sideEffects?.onError?.(err);
689
+ throw transformedError;
690
+ }
691
+ }
669
692
  async function assignProductInstanceToSite2(identifiers, options) {
670
693
  const { httpClient, sideEffects } = arguments[2];
671
694
  const payload = renameKeysFromSDKRequestToRESTRequest({
@@ -827,7 +850,7 @@ export {
827
850
  ContractSwitchReason,
828
851
  ContractSwitchType,
829
852
  CycleDescriptorType,
830
- FailureReasonFailureReason,
853
+ FailureReasonCode,
831
854
  FieldToUpdate,
832
855
  Initiator,
833
856
  IntervalIntervalUnit,
@@ -850,6 +873,7 @@ export {
850
873
  createPackageV22 as createPackageV2,
851
874
  getPackage2 as getPackage,
852
875
  queryPackages2 as queryPackages,
876
+ typedQueryPackages,
853
877
  unassignProductInstanceFromSite2 as unassignProductInstanceFromSite,
854
878
  updatePackageExternalId2 as updatePackageExternalId
855
879
  };