@wix/auto_sdk_payments_payment-acceptance-configurations 1.0.43 → 1.0.45

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 +1 -1
  2. package/build/cjs/index.js +80 -0
  3. package/build/cjs/index.js.map +1 -1
  4. package/build/cjs/index.typings.d.ts +63 -1
  5. package/build/cjs/index.typings.js +69 -0
  6. package/build/cjs/index.typings.js.map +1 -1
  7. package/build/cjs/meta.d.ts +49 -2
  8. package/build/cjs/meta.js +58 -0
  9. package/build/cjs/meta.js.map +1 -1
  10. package/build/es/index.d.mts +1 -1
  11. package/build/es/index.mjs +79 -0
  12. package/build/es/index.mjs.map +1 -1
  13. package/build/es/index.typings.d.mts +63 -1
  14. package/build/es/index.typings.mjs +68 -0
  15. package/build/es/index.typings.mjs.map +1 -1
  16. package/build/es/meta.d.mts +49 -2
  17. package/build/es/meta.mjs +57 -0
  18. package/build/es/meta.mjs.map +1 -1
  19. package/build/internal/cjs/index.d.ts +18 -5
  20. package/build/internal/cjs/index.js +80 -0
  21. package/build/internal/cjs/index.js.map +1 -1
  22. package/build/internal/cjs/index.typings.d.ts +77 -3
  23. package/build/internal/cjs/index.typings.js +69 -0
  24. package/build/internal/cjs/index.typings.js.map +1 -1
  25. package/build/internal/cjs/meta.d.ts +49 -2
  26. package/build/internal/cjs/meta.js +58 -0
  27. package/build/internal/cjs/meta.js.map +1 -1
  28. package/build/internal/es/index.d.mts +18 -5
  29. package/build/internal/es/index.mjs +79 -0
  30. package/build/internal/es/index.mjs.map +1 -1
  31. package/build/internal/es/index.typings.d.mts +77 -3
  32. package/build/internal/es/index.typings.mjs +68 -0
  33. package/build/internal/es/index.typings.mjs.map +1 -1
  34. package/build/internal/es/meta.d.mts +49 -2
  35. package/build/internal/es/meta.mjs +57 -0
  36. package/build/internal/es/meta.mjs.map +1 -1
  37. package/package.json +2 -2
@@ -238,6 +238,33 @@ interface RemovePaymentAcceptanceConfigurationRulesResponse {
238
238
  /** Updated PaymentAcceptanceConfiguration */
239
239
  paymentAcceptanceConfiguration?: PaymentAcceptanceConfiguration;
240
240
  }
241
+ interface ModifyPaymentAcceptanceConfigurationRulesRequest {
242
+ /**
243
+ * Id of payment acceptance configuration to update
244
+ * @format GUID
245
+ */
246
+ paymentAcceptanceConfigurationId: string;
247
+ /**
248
+ * Payment acceptance configuration revision
249
+ * @readonly
250
+ */
251
+ paymentAcceptanceConfigurationRevision?: string | null;
252
+ /**
253
+ * Rules to add
254
+ * @maxSize 1000
255
+ */
256
+ rulesToAdd?: PaymentAcceptanceRule[];
257
+ /**
258
+ * IDs of the rules to remove
259
+ * @format GUID
260
+ * @maxSize 1000
261
+ */
262
+ rulesToRemoveIds?: string[];
263
+ }
264
+ interface ModifyPaymentAcceptanceConfigurationRulesResponse {
265
+ /** Updated PaymentAcceptanceConfiguration */
266
+ paymentAcceptanceConfiguration?: PaymentAcceptanceConfiguration;
267
+ }
241
268
  interface DeletePaymentAcceptanceConfigurationRequest {
242
269
  /**
243
270
  * Id of payment acceptance configuration to delete
@@ -1034,6 +1061,23 @@ declare enum WebhookIdentityType {
1034
1061
  }
1035
1062
  /** @enumType */
1036
1063
  type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP';
1064
+ interface AccountDetails {
1065
+ /**
1066
+ * ID of the account.
1067
+ * @format GUID
1068
+ */
1069
+ accountId?: string | null;
1070
+ /**
1071
+ * ID of the parent account.
1072
+ * @format GUID
1073
+ */
1074
+ parentAccountId?: string | null;
1075
+ /**
1076
+ * ID of the site, if applicable.
1077
+ * @format GUID
1078
+ */
1079
+ siteId?: string | null;
1080
+ }
1037
1081
  interface UpdatePaymentAcceptanceConfiguration {
1038
1082
  /**
1039
1083
  * Id
@@ -1101,6 +1145,24 @@ interface RemovePaymentAcceptanceConfigurationRulesOptions {
1101
1145
  */
1102
1146
  ruleIds: string[];
1103
1147
  }
1148
+ interface ModifyPaymentAcceptanceConfigurationRulesOptions {
1149
+ /**
1150
+ * Payment acceptance configuration revision
1151
+ * @readonly
1152
+ */
1153
+ paymentAcceptanceConfigurationRevision?: string | null;
1154
+ /**
1155
+ * Rules to add
1156
+ * @maxSize 1000
1157
+ */
1158
+ rulesToAdd?: PaymentAcceptanceRule[];
1159
+ /**
1160
+ * IDs of the rules to remove
1161
+ * @format GUID
1162
+ * @maxSize 1000
1163
+ */
1164
+ rulesToRemoveIds?: string[];
1165
+ }
1104
1166
  interface QueryCursorResult {
1105
1167
  cursors: Cursors;
1106
1168
  hasNext: () => boolean;
@@ -1262,4 +1324,4 @@ interface BulkUpdatePaymentAcceptanceConfigurationTagsByFilterOptions {
1262
1324
  unassignTags?: Tags;
1263
1325
  }
1264
1326
 
1265
- export { type ActionEvent, type AddPaymentAcceptanceConfigurationRulesOptions, type AddPaymentAcceptanceConfigurationRulesRequest, type AddPaymentAcceptanceConfigurationRulesResponse, type ApplicationError, type Asset, type BulkActionMetadata, type BulkUpdatePaymentAcceptanceConfigurationTagsByFilterOptions, type BulkUpdatePaymentAcceptanceConfigurationTagsByFilterRequest, type BulkUpdatePaymentAcceptanceConfigurationTagsByFilterResponse, type BulkUpdatePaymentAcceptanceConfigurationTagsOptions, type BulkUpdatePaymentAcceptanceConfigurationTagsRequest, type BulkUpdatePaymentAcceptanceConfigurationTagsResponse, type BulkUpdatePaymentAcceptanceConfigurationTagsResult, type CommonQueryWithEntityContext, type Countries, type CreatePaymentAcceptanceConfigurationRequest, type CreatePaymentAcceptanceConfigurationResponse, type Currencies, type CursorPaging, type CursorPagingMetadata, type CursorQuery, type CursorQueryPagingMethodOneOf, type Cursors, type DeleteContext, type DeletePaymentAcceptanceConfigurationRequest, type DeletePaymentAcceptanceConfigurationResponse, DeleteStatus, type DeleteStatusWithLiterals, type DomainEvent, type DomainEventBodyOneOf, type Empty, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, type ExtendedFields, type GetPaymentAcceptanceConfigurationRequest, type GetPaymentAcceptanceConfigurationResponse, type IdentificationData, type IdentificationDataIdOneOf, type ItemMetadata, type MessageEnvelope, type MetaSiteSpecialEvent, type MetaSiteSpecialEventPayloadOneOf, Namespace, type NamespaceChanged, type NamespaceWithLiterals, type OdeditorAssigned, type OdeditorUnassigned, type PaymentAcceptanceConfiguration, type PaymentAcceptanceConfigurationQuery, type PaymentAcceptanceConfigurationQuerySpec, type PaymentAcceptanceConfigurationsQueryBuilder, type PaymentAcceptanceConfigurationsQueryResult, type PaymentAcceptanceRule, type PaymentBrands, type PicassoAssigned, type PicassoUnassigned, type QueryPaymentAcceptanceConfigurationsRequest, type QueryPaymentAcceptanceConfigurationsResponse, type RemovePaymentAcceptanceConfigurationRulesOptions, type RemovePaymentAcceptanceConfigurationRulesRequest, type RemovePaymentAcceptanceConfigurationRulesResponse, type RestoreInfo, type Restrictions, type RestrictionsCountriesOneOf, type RestrictionsCurrenciesOneOf, type RestrictionsPaymentBrandsOneOf, type ServiceProvisioned, type ServiceRemoved, type SiteCreated, SiteCreatedContext, type SiteCreatedContextWithLiterals, type SiteDeleted, type SiteHardDeleted, type SiteMarkedAsTemplate, type SiteMarkedAsWixSite, type SitePublished, type SitePurgedExternally, type SiteRenamed, type SiteTransferred, type SiteUndeleted, type SiteUnpublished, type SiteUrlChanged, SortOrder, type SortOrderWithLiterals, type Sorting, State, type StateWithLiterals, type StudioAssigned, type StudioTwoAssigned, type StudioTwoUnassigned, type StudioUnassigned, type TagList, type Tags, type UpdatePaymentAcceptanceConfiguration, type UpdatePaymentAcceptanceConfigurationRequest, type UpdatePaymentAcceptanceConfigurationResponse, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, type WixelAssigned, type WixelUnassigned, typedQueryPaymentAcceptanceConfigurations };
1327
+ export { type AccountDetails, type ActionEvent, type AddPaymentAcceptanceConfigurationRulesOptions, type AddPaymentAcceptanceConfigurationRulesRequest, type AddPaymentAcceptanceConfigurationRulesResponse, type ApplicationError, type Asset, type BulkActionMetadata, type BulkUpdatePaymentAcceptanceConfigurationTagsByFilterOptions, type BulkUpdatePaymentAcceptanceConfigurationTagsByFilterRequest, type BulkUpdatePaymentAcceptanceConfigurationTagsByFilterResponse, type BulkUpdatePaymentAcceptanceConfigurationTagsOptions, type BulkUpdatePaymentAcceptanceConfigurationTagsRequest, type BulkUpdatePaymentAcceptanceConfigurationTagsResponse, type BulkUpdatePaymentAcceptanceConfigurationTagsResult, type CommonQueryWithEntityContext, type Countries, type CreatePaymentAcceptanceConfigurationRequest, type CreatePaymentAcceptanceConfigurationResponse, type Currencies, type CursorPaging, type CursorPagingMetadata, type CursorQuery, type CursorQueryPagingMethodOneOf, type Cursors, type DeleteContext, type DeletePaymentAcceptanceConfigurationRequest, type DeletePaymentAcceptanceConfigurationResponse, DeleteStatus, type DeleteStatusWithLiterals, type DomainEvent, type DomainEventBodyOneOf, type Empty, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, type ExtendedFields, type GetPaymentAcceptanceConfigurationRequest, type GetPaymentAcceptanceConfigurationResponse, type IdentificationData, type IdentificationDataIdOneOf, type ItemMetadata, type MessageEnvelope, type MetaSiteSpecialEvent, type MetaSiteSpecialEventPayloadOneOf, type ModifyPaymentAcceptanceConfigurationRulesOptions, type ModifyPaymentAcceptanceConfigurationRulesRequest, type ModifyPaymentAcceptanceConfigurationRulesResponse, Namespace, type NamespaceChanged, type NamespaceWithLiterals, type OdeditorAssigned, type OdeditorUnassigned, type PaymentAcceptanceConfiguration, type PaymentAcceptanceConfigurationQuery, type PaymentAcceptanceConfigurationQuerySpec, type PaymentAcceptanceConfigurationsQueryBuilder, type PaymentAcceptanceConfigurationsQueryResult, type PaymentAcceptanceRule, type PaymentBrands, type PicassoAssigned, type PicassoUnassigned, type QueryPaymentAcceptanceConfigurationsRequest, type QueryPaymentAcceptanceConfigurationsResponse, type RemovePaymentAcceptanceConfigurationRulesOptions, type RemovePaymentAcceptanceConfigurationRulesRequest, type RemovePaymentAcceptanceConfigurationRulesResponse, type RestoreInfo, type Restrictions, type RestrictionsCountriesOneOf, type RestrictionsCurrenciesOneOf, type RestrictionsPaymentBrandsOneOf, type ServiceProvisioned, type ServiceRemoved, type SiteCreated, SiteCreatedContext, type SiteCreatedContextWithLiterals, type SiteDeleted, type SiteHardDeleted, type SiteMarkedAsTemplate, type SiteMarkedAsWixSite, type SitePublished, type SitePurgedExternally, type SiteRenamed, type SiteTransferred, type SiteUndeleted, type SiteUnpublished, type SiteUrlChanged, SortOrder, type SortOrderWithLiterals, type Sorting, State, type StateWithLiterals, type StudioAssigned, type StudioTwoAssigned, type StudioTwoUnassigned, type StudioUnassigned, type TagList, type Tags, type UpdatePaymentAcceptanceConfiguration, type UpdatePaymentAcceptanceConfigurationRequest, type UpdatePaymentAcceptanceConfigurationResponse, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, type WixelAssigned, type WixelUnassigned, typedQueryPaymentAcceptanceConfigurations };
@@ -231,6 +231,38 @@ function removePaymentAcceptanceConfigurationRules(payload) {
231
231
  }
232
232
  return __removePaymentAcceptanceConfigurationRules;
233
233
  }
234
+ function modifyPaymentAcceptanceConfigurationRules(payload) {
235
+ function __modifyPaymentAcceptanceConfigurationRules({ host }) {
236
+ const metadata = {
237
+ entityFqdn: "wix.payments.payment_acceptance_configurations.v1.payment_acceptance_configuration",
238
+ method: "POST",
239
+ methodFqn: "wix.payments.payment_acceptance_configurations.v1.PaymentAcceptanceConfigurationService.ModifyPaymentAcceptanceConfigurationRules",
240
+ packageName: PACKAGE_NAME,
241
+ migrationOptions: {
242
+ optInTransformResponse: true
243
+ },
244
+ url: resolveWixPaymentsPaymentAcceptanceConfigurationsV1PaymentAcceptanceConfigurationServiceUrl(
245
+ {
246
+ protoPath: "/v1/payment-acceptance-configurations/{paymentAcceptanceConfigurationId}/modify-rules",
247
+ data: payload,
248
+ host
249
+ }
250
+ ),
251
+ data: payload,
252
+ transformResponse: (payload2) => transformPaths(payload2, [
253
+ {
254
+ transformFn: transformRESTTimestampToSDKTimestamp,
255
+ paths: [
256
+ { path: "paymentAcceptanceConfiguration.createdDate" },
257
+ { path: "paymentAcceptanceConfiguration.updatedDate" }
258
+ ]
259
+ }
260
+ ])
261
+ };
262
+ return metadata;
263
+ }
264
+ return __modifyPaymentAcceptanceConfigurationRules;
265
+ }
234
266
  function deletePaymentAcceptanceConfiguration(payload) {
235
267
  function __deletePaymentAcceptanceConfiguration({ host }) {
236
268
  const metadata = {
@@ -576,6 +608,41 @@ async function removePaymentAcceptanceConfigurationRules2(paymentAcceptanceConfi
576
608
  throw transformedError;
577
609
  }
578
610
  }
611
+ async function modifyPaymentAcceptanceConfigurationRules2(paymentAcceptanceConfigurationId, options) {
612
+ const { httpClient, sideEffects } = arguments[2];
613
+ const payload = renameKeysFromSDKRequestToRESTRequest({
614
+ paymentAcceptanceConfigurationId,
615
+ paymentAcceptanceConfigurationRevision: options?.paymentAcceptanceConfigurationRevision,
616
+ rulesToAdd: options?.rulesToAdd,
617
+ rulesToRemoveIds: options?.rulesToRemoveIds
618
+ });
619
+ const reqOpts = modifyPaymentAcceptanceConfigurationRules(
620
+ payload
621
+ );
622
+ sideEffects?.onSiteCall?.();
623
+ try {
624
+ const result = await httpClient.request(reqOpts);
625
+ sideEffects?.onSuccess?.(result);
626
+ return renameKeysFromRESTResponseToSDKResponse(result.data);
627
+ } catch (err) {
628
+ const transformedError = sdkTransformError(
629
+ err,
630
+ {
631
+ spreadPathsToArguments: {},
632
+ explicitPathsToArguments: {
633
+ paymentAcceptanceConfigurationId: "$[0]",
634
+ paymentAcceptanceConfigurationRevision: "$[1].paymentAcceptanceConfigurationRevision",
635
+ rulesToAdd: "$[1].rulesToAdd",
636
+ rulesToRemoveIds: "$[1].rulesToRemoveIds"
637
+ },
638
+ singleArgumentUnchanged: false
639
+ },
640
+ ["paymentAcceptanceConfigurationId", "options"]
641
+ );
642
+ sideEffects?.onError?.(err);
643
+ throw transformedError;
644
+ }
645
+ }
579
646
  async function deletePaymentAcceptanceConfiguration2(paymentAcceptanceConfigurationId) {
580
647
  const { httpClient, sideEffects } = arguments[1];
581
648
  const payload = renameKeysFromSDKRequestToRESTRequest({
@@ -753,6 +820,7 @@ export {
753
820
  createPaymentAcceptanceConfiguration2 as createPaymentAcceptanceConfiguration,
754
821
  deletePaymentAcceptanceConfiguration2 as deletePaymentAcceptanceConfiguration,
755
822
  getPaymentAcceptanceConfiguration2 as getPaymentAcceptanceConfiguration,
823
+ modifyPaymentAcceptanceConfigurationRules2 as modifyPaymentAcceptanceConfigurationRules,
756
824
  queryPaymentAcceptanceConfigurations2 as queryPaymentAcceptanceConfigurations,
757
825
  removePaymentAcceptanceConfigurationRules2 as removePaymentAcceptanceConfigurationRules,
758
826
  typedQueryPaymentAcceptanceConfigurations,