@wix/auto_sdk_payments_payment-acceptance-configurations 1.0.42 → 1.0.44
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 +4 -4
- package/build/cjs/index.js +80 -0
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +113 -3
- package/build/cjs/index.typings.js +69 -0
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +32 -2
- package/build/cjs/meta.js +58 -0
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.d.mts +4 -4
- package/build/es/index.mjs +79 -0
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +113 -3
- package/build/es/index.typings.mjs +68 -0
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +32 -2
- package/build/es/meta.mjs +57 -0
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +19 -6
- package/build/internal/cjs/index.js +80 -0
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +127 -5
- package/build/internal/cjs/index.typings.js +69 -0
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +32 -2
- package/build/internal/cjs/meta.js +58 -0
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/es/index.d.mts +19 -6
- package/build/internal/es/index.mjs +79 -0
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +127 -5
- package/build/internal/es/index.typings.mjs +68 -0
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.d.mts +32 -2
- package/build/internal/es/meta.mjs +57 -0
- package/build/internal/es/meta.mjs.map +1 -1
- package/package.json +3 -3
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { NonNullablePaths } from '@wix/sdk-types';
|
|
1
|
+
import { QuerySpec, Query, NonNullablePaths } from '@wix/sdk-types';
|
|
2
2
|
|
|
3
3
|
/** PaymentAcceptanceConfiguration */
|
|
4
4
|
interface PaymentAcceptanceConfiguration {
|
|
@@ -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
|
|
@@ -1101,6 +1128,24 @@ interface RemovePaymentAcceptanceConfigurationRulesOptions {
|
|
|
1101
1128
|
*/
|
|
1102
1129
|
ruleIds: string[];
|
|
1103
1130
|
}
|
|
1131
|
+
interface ModifyPaymentAcceptanceConfigurationRulesOptions {
|
|
1132
|
+
/**
|
|
1133
|
+
* Payment acceptance configuration revision
|
|
1134
|
+
* @readonly
|
|
1135
|
+
*/
|
|
1136
|
+
paymentAcceptanceConfigurationRevision?: string | null;
|
|
1137
|
+
/**
|
|
1138
|
+
* Rules to add
|
|
1139
|
+
* @maxSize 1000
|
|
1140
|
+
*/
|
|
1141
|
+
rulesToAdd?: PaymentAcceptanceRule[];
|
|
1142
|
+
/**
|
|
1143
|
+
* IDs of the rules to remove
|
|
1144
|
+
* @format GUID
|
|
1145
|
+
* @maxSize 1000
|
|
1146
|
+
*/
|
|
1147
|
+
rulesToRemoveIds?: string[];
|
|
1148
|
+
}
|
|
1104
1149
|
interface QueryCursorResult {
|
|
1105
1150
|
cursors: Cursors;
|
|
1106
1151
|
hasNext: () => boolean;
|
|
@@ -1183,7 +1228,72 @@ interface PaymentAcceptanceConfigurationsQueryBuilder {
|
|
|
1183
1228
|
* @fqn wix.payments.payment_acceptance_configurations.v1.PaymentAcceptanceConfigurationService.QueryPaymentAcceptanceConfigurations
|
|
1184
1229
|
* @requiredField query
|
|
1185
1230
|
*/
|
|
1186
|
-
declare function typedQueryPaymentAcceptanceConfigurations(query:
|
|
1231
|
+
declare function typedQueryPaymentAcceptanceConfigurations(query: PaymentAcceptanceConfigurationQuery): Promise<NonNullablePaths<QueryPaymentAcceptanceConfigurationsResponse, `paymentAcceptanceConfigurations`, 2>>;
|
|
1232
|
+
interface PaymentAcceptanceConfigurationQuerySpec extends QuerySpec {
|
|
1233
|
+
paging: 'cursor';
|
|
1234
|
+
wql: [
|
|
1235
|
+
{
|
|
1236
|
+
fields: [
|
|
1237
|
+
'rules.accountConnectionId',
|
|
1238
|
+
'rules.merchantEnabled',
|
|
1239
|
+
'rules.paymentMethodTypeId'
|
|
1240
|
+
];
|
|
1241
|
+
operators: ['$hasAll', '$hasSome'];
|
|
1242
|
+
sort: 'BOTH';
|
|
1243
|
+
},
|
|
1244
|
+
{
|
|
1245
|
+
fields: ['_createdDate', '_id', '_updatedDate', 'appId'];
|
|
1246
|
+
operators: '*';
|
|
1247
|
+
sort: 'BOTH';
|
|
1248
|
+
}
|
|
1249
|
+
];
|
|
1250
|
+
}
|
|
1251
|
+
type CommonQueryWithEntityContext = Query<PaymentAcceptanceConfiguration, PaymentAcceptanceConfigurationQuerySpec>;
|
|
1252
|
+
type PaymentAcceptanceConfigurationQuery = {
|
|
1253
|
+
/**
|
|
1254
|
+
Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`.
|
|
1255
|
+
*/
|
|
1256
|
+
cursorPaging?: {
|
|
1257
|
+
/**
|
|
1258
|
+
Maximum number of items to return in the results.
|
|
1259
|
+
@max: 100
|
|
1260
|
+
*/
|
|
1261
|
+
limit?: NonNullable<CommonQueryWithEntityContext['cursorPaging']>['limit'] | null;
|
|
1262
|
+
/**
|
|
1263
|
+
Pointer to the next or previous page in the list of results.
|
|
1264
|
+
|
|
1265
|
+
Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.
|
|
1266
|
+
Not relevant for the first request.
|
|
1267
|
+
@maxLength: 16000
|
|
1268
|
+
*/
|
|
1269
|
+
cursor?: NonNullable<CommonQueryWithEntityContext['cursorPaging']>['cursor'] | null;
|
|
1270
|
+
};
|
|
1271
|
+
/**
|
|
1272
|
+
Filter object in the following format:
|
|
1273
|
+
`"filter" : {
|
|
1274
|
+
"fieldName1": "value1",
|
|
1275
|
+
"fieldName2":{"$operator":"value2"}
|
|
1276
|
+
}`
|
|
1277
|
+
Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`
|
|
1278
|
+
*/
|
|
1279
|
+
filter?: CommonQueryWithEntityContext['filter'] | null;
|
|
1280
|
+
/**
|
|
1281
|
+
Sort object in the following format:
|
|
1282
|
+
`[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]`
|
|
1283
|
+
@maxSize: 5
|
|
1284
|
+
*/
|
|
1285
|
+
sort?: {
|
|
1286
|
+
/**
|
|
1287
|
+
Name of the field to sort by.
|
|
1288
|
+
@maxLength: 512
|
|
1289
|
+
*/
|
|
1290
|
+
fieldName?: NonNullable<CommonQueryWithEntityContext['sort']>[number]['fieldName'];
|
|
1291
|
+
/**
|
|
1292
|
+
Sort order.
|
|
1293
|
+
*/
|
|
1294
|
+
order?: NonNullable<CommonQueryWithEntityContext['sort']>[number]['order'];
|
|
1295
|
+
}[];
|
|
1296
|
+
};
|
|
1187
1297
|
interface BulkUpdatePaymentAcceptanceConfigurationTagsOptions {
|
|
1188
1298
|
/** List of Tags to assign */
|
|
1189
1299
|
assignTags?: Tags;
|
|
@@ -1197,4 +1307,4 @@ interface BulkUpdatePaymentAcceptanceConfigurationTagsByFilterOptions {
|
|
|
1197
1307
|
unassignTags?: Tags;
|
|
1198
1308
|
}
|
|
1199
1309
|
|
|
1200
|
-
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 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 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 };
|
|
1310
|
+
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, 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,
|