import * as _wix_sdk_types from '@wix/sdk-types'; import { QuerySpec, Query, NonNullablePaths } from '@wix/sdk-types'; /** PayinsConfiguration */ interface PayinsConfiguration { /** * id * @format GUID * @readonly * @immutable */ _id?: string | null; /** * app_id * @format GUID * @immutable */ appId?: string | null; /** * rules * @maxSize 1000 */ rules?: PayinsRule[]; /** * revision * @readonly */ revision?: string | null; /** * Date when PayinsConfiguration was created * @readonly * @immutable */ _createdDate?: Date | null; /** * Date when PayinsConfiguration was updated * @readonly */ _updatedDate?: Date | null; /** Data Extensions */ extendedFields?: ExtendedFields; /** Tags */ tags?: Tags; } interface PayinsRule { /** * payment_method_type_id * @format GUID */ paymentMethodTypeId?: string; /** * account_connection_id * @format GUID */ accountConnectionId?: string; /** merchant_selection */ merchantSelection?: MerchantSelection; } interface MerchantSelection { /** payins_enabled */ payinsEnabled?: boolean; } interface ExtendedFields { /** * Extended field data. Each key corresponds to the namespace of the app that created the extended fields. * The value of each key is structured according to the schema defined when the extended fields were configured. * * You can only access fields for which you have the appropriate permissions. * * Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields). */ namespaces?: Record>; } interface Tags { /** Tags that require an additional permission in order to access them, normally not given to site members or visitors. */ privateTags?: TagList; /** Tags that are exposed to anyone who has access to the labeled entity itself, including site members and visitors. */ tags?: TagList; } interface TagList { /** * List of tag IDs * @maxSize 100 * @maxLength 5 */ tagIds?: string[]; } interface CreatePayinsConfigurationRequest { /** PayinsConfiguration to be created. */ payinsConfiguration: PayinsConfiguration; } interface CreatePayinsConfigurationResponse { /** The created PayinsConfiguration. */ payinsConfiguration?: PayinsConfiguration; } interface GetPayinsConfigurationRequest { /** * ID of the PayinsConfiguration to retrieve. * @format GUID */ payinsConfigurationId: string; } interface GetPayinsConfigurationResponse { /** The requested PayinsConfiguration. */ payinsConfiguration?: PayinsConfiguration; } interface UpdatePayinsConfigurationRequest { /** PayinsConfiguration to be updated, may be partial. */ payinsConfiguration: PayinsConfiguration; } interface UpdatePayinsConfigurationResponse { /** Updated PayinsConfiguration. */ payinsConfiguration?: PayinsConfiguration; } interface QueryPayinsConfigurationsRequest { /** WQL expression. */ query?: CursorQuery; } interface CursorQuery extends CursorQueryPagingMethodOneOf { /** 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`. */ cursorPaging?: CursorPaging; /** * Filter object in the following format: * `"filter" : { * "fieldName1": "value1", * "fieldName2":{"$operator":"value2"} * }` * Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains` */ filter?: Record | null; /** * Sort object in the following format: * `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]` * @maxSize 5 */ sort?: Sorting[]; } /** @oneof */ interface CursorQueryPagingMethodOneOf { /** 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`. */ cursorPaging?: CursorPaging; } interface Sorting { /** * Name of the field to sort by. * @maxLength 512 */ fieldName?: string; /** Sort order. */ order?: SortOrderWithLiterals; } declare enum SortOrder { ASC = "ASC", DESC = "DESC" } /** @enumType */ type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC'; interface CursorPaging { /** * Maximum number of items to return in the results. * @max 100 */ limit?: number | null; /** * Pointer to the next or previous page in the list of results. * * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response. * Not relevant for the first request. * @maxLength 16000 */ cursor?: string | null; } interface QueryPayinsConfigurationsResponse { /** List of PayinsConfigurations. */ payinsConfigurations?: PayinsConfiguration[]; /** Paging metadata */ pagingMetadata?: CursorPagingMetadata; } interface CursorPagingMetadata { /** Number of items returned in the response. */ count?: number | null; /** Cursor strings that point to the next page, previous page, or both. */ cursors?: Cursors; /** * Whether there are more pages to retrieve following the current page. * * + `true`: Another page of results can be retrieved. * + `false`: This is the last page. */ hasNext?: boolean | null; } interface Cursors { /** * Cursor string pointing to the next page in the list of results. * @maxLength 16000 */ next?: string | null; /** * Cursor pointing to the previous page in the list of results. * @maxLength 16000 */ prev?: string | null; } interface BulkUpdatePayinsConfigurationTagsRequest { /** * List of PayinsConfigurations that their tags will update. * @minSize 1 * @maxSize 100 * @format GUID */ ids: string[]; /** List of Tags to assign */ assignTags: Tags; /** List of Tags to unAssign */ unassignTags?: Tags; } interface BulkUpdatePayinsConfigurationTagsResponse { /** * Results * @minSize 1 * @maxSize 100 */ results?: BulkUpdatePayinsConfigurationTagsResult[]; /** Metadata regarding the bulk update operation */ bulkActionMetadata?: BulkActionMetadata; } interface ItemMetadata { /** * Item ID. Should always be available, unless it's impossible (for example, when failing to create an item). * @format GUID */ _id?: string | null; /** Index of the item within the request array. Allows for correlation between request and response items. */ originalIndex?: number; /** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */ success?: boolean; /** Details about the error in case of failure. */ error?: ApplicationError; } interface ApplicationError { /** Error code. */ code?: string; /** Description of the error. */ description?: string; /** Data related to the error. */ data?: Record | null; } interface BulkUpdatePayinsConfigurationTagsResult { /** Metadata regarding the specific single update operation */ itemMetadata?: ItemMetadata; } interface BulkActionMetadata { /** Number of items that were successfully processed. */ totalSuccesses?: number; /** Number of items that couldn't be processed. */ totalFailures?: number; /** Number of failures without details because detailed failure threshold was exceeded. */ undetailedFailures?: number; } interface BulkUpdatePayinsConfigurationTagsByFilterRequest { /** Filter */ filter: Record | null; /** List of Tags to assign */ assignTags: Tags; /** List of Tags to unAssign */ unassignTags?: Tags; } interface BulkUpdatePayinsConfigurationTagsByFilterResponse { /** * Job ID * @format GUID */ jobId?: string; } interface DomainEvent extends DomainEventBodyOneOf { createdEvent?: EntityCreatedEvent; updatedEvent?: EntityUpdatedEvent; deletedEvent?: EntityDeletedEvent; actionEvent?: ActionEvent; /** * Unique event ID. * Allows clients to ignore duplicate webhooks. */ _id?: string; /** * Assumes actions are also always typed to an entity_type * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction */ entityFqdn?: string; /** * This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug) * This is although the created/updated/deleted notion is duplication of the oneof types * Example: created/updated/deleted/started/completed/email_opened */ slug?: string; /** ID of the entity associated with the event. */ entityId?: string; /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */ eventTime?: Date | null; /** * Whether the event was triggered as a result of a privacy regulation application * (for example, GDPR). */ triggeredByAnonymizeRequest?: boolean | null; /** If present, indicates the action that triggered the event. */ originatedFrom?: string | null; /** * A sequence number defining the order of updates to the underlying entity. * For example, given that some entity was updated at 16:00 and than again at 16:01, * it is guaranteed that the sequence number of the second update is strictly higher than the first. * As the consumer, you can use this value to ensure that you handle messages in the correct order. * To do so, you will need to persist this number on your end, and compare the sequence number from the * message against the one you have stored. Given that the stored number is higher, you should ignore the message. */ entityEventSequence?: string | null; } /** @oneof */ interface DomainEventBodyOneOf { createdEvent?: EntityCreatedEvent; updatedEvent?: EntityUpdatedEvent; deletedEvent?: EntityDeletedEvent; actionEvent?: ActionEvent; } interface EntityCreatedEvent { entity?: string; } interface RestoreInfo { deletedDate?: Date | null; } interface EntityUpdatedEvent { /** * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff. * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects. * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it. */ currentEntity?: string; } interface EntityDeletedEvent { /** Entity that was deleted */ deletedEntity?: string | null; } interface ActionEvent { body?: string; } interface MessageEnvelope { /** * App instance ID. * @format GUID */ instanceId?: string | null; /** * Event type. * @maxLength 150 */ eventType?: string; /** The identification type and identity data. */ identity?: IdentificationData; /** Stringify payload. */ data?: string; } interface IdentificationData extends IdentificationDataIdOneOf { /** * ID of a site visitor that has not logged in to the site. * @format GUID */ anonymousVisitorId?: string; /** * ID of a site visitor that has logged in to the site. * @format GUID */ memberId?: string; /** * ID of a Wix user (site owner, contributor, etc.). * @format GUID */ wixUserId?: string; /** * ID of an app. * @format GUID */ appId?: string; /** @readonly */ identityType?: WebhookIdentityTypeWithLiterals; } /** @oneof */ interface IdentificationDataIdOneOf { /** * ID of a site visitor that has not logged in to the site. * @format GUID */ anonymousVisitorId?: string; /** * ID of a site visitor that has logged in to the site. * @format GUID */ memberId?: string; /** * ID of a Wix user (site owner, contributor, etc.). * @format GUID */ wixUserId?: string; /** * ID of an app. * @format GUID */ appId?: string; } declare enum WebhookIdentityType { UNKNOWN = "UNKNOWN", ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR", MEMBER = "MEMBER", WIX_USER = "WIX_USER", APP = "APP" } /** @enumType */ type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP'; interface UpdatePayinsConfiguration { /** * id * @format GUID * @readonly * @immutable */ _id?: string | null; /** * app_id * @format GUID * @immutable */ appId?: string | null; /** * rules * @maxSize 1000 */ rules?: PayinsRule[]; /** * revision * @readonly */ revision?: string | null; /** * Date when PayinsConfiguration was created * @readonly * @immutable */ _createdDate?: Date | null; /** * Date when PayinsConfiguration was updated * @readonly */ _updatedDate?: Date | null; /** Data Extensions */ extendedFields?: ExtendedFields; /** Tags */ tags?: Tags; } interface QueryCursorResult { cursors: Cursors; hasNext: () => boolean; hasPrev: () => boolean; length: number; pageSize: number; } interface PayinsConfigurationsQueryResult extends QueryCursorResult { items: PayinsConfiguration[]; query: PayinsConfigurationsQueryBuilder; next: () => Promise; prev: () => Promise; } interface PayinsConfigurationsQueryBuilder { /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. * @documentationMaturity preview */ eq: (propertyName: '_id' | 'appId' | 'rules.paymentMethodTypeId' | 'rules.accountConnectionId' | 'rules.merchantSelection.payinsEnabled', value: any) => PayinsConfigurationsQueryBuilder; /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. * @documentationMaturity preview */ ne: (propertyName: '_id' | 'appId' | 'rules.paymentMethodTypeId' | 'rules.accountConnectionId' | 'rules.merchantSelection.payinsEnabled', value: any) => PayinsConfigurationsQueryBuilder; /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. * @documentationMaturity preview */ ge: (propertyName: '_id' | 'appId' | 'rules.paymentMethodTypeId' | 'rules.accountConnectionId', value: any) => PayinsConfigurationsQueryBuilder; /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. * @documentationMaturity preview */ gt: (propertyName: '_id' | 'appId' | 'rules.paymentMethodTypeId' | 'rules.accountConnectionId', value: any) => PayinsConfigurationsQueryBuilder; /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. * @documentationMaturity preview */ le: (propertyName: '_id' | 'appId' | 'rules.paymentMethodTypeId' | 'rules.accountConnectionId', value: any) => PayinsConfigurationsQueryBuilder; /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. * @documentationMaturity preview */ lt: (propertyName: '_id' | 'appId' | 'rules.paymentMethodTypeId' | 'rules.accountConnectionId', value: any) => PayinsConfigurationsQueryBuilder; /** @param propertyName - Property whose value is compared with `string`. * @param string - String to compare against. Case-insensitive. * @documentationMaturity preview */ startsWith: (propertyName: '_id' | 'appId' | 'rules.paymentMethodTypeId' | 'rules.accountConnectionId', value: string) => PayinsConfigurationsQueryBuilder; /** @param propertyName - Property whose value is compared with `values`. * @param values - List of values to compare against. * @documentationMaturity preview */ hasSome: (propertyName: '_id' | 'appId' | 'rules.paymentMethodTypeId' | 'rules.accountConnectionId' | 'rules.merchantSelection.payinsEnabled', value: any[]) => PayinsConfigurationsQueryBuilder; /** @documentationMaturity preview */ in: (propertyName: '_id' | 'appId' | 'rules.paymentMethodTypeId' | 'rules.accountConnectionId' | 'rules.merchantSelection.payinsEnabled', value: any) => PayinsConfigurationsQueryBuilder; /** @documentationMaturity preview */ exists: (propertyName: '_id' | 'appId' | 'rules.paymentMethodTypeId' | 'rules.accountConnectionId' | 'rules.merchantSelection.payinsEnabled', value: boolean) => PayinsConfigurationsQueryBuilder; /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments. * @documentationMaturity preview */ ascending: (...propertyNames: Array<'_id' | 'appId' | 'rules.paymentMethodTypeId' | 'rules.accountConnectionId' | 'rules.merchantSelection.payinsEnabled'>) => PayinsConfigurationsQueryBuilder; /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments. * @documentationMaturity preview */ descending: (...propertyNames: Array<'_id' | 'appId' | 'rules.paymentMethodTypeId' | 'rules.accountConnectionId' | 'rules.merchantSelection.payinsEnabled'>) => PayinsConfigurationsQueryBuilder; /** @param limit - Number of items to return, which is also the `pageSize` of the results object. * @documentationMaturity preview */ limit: (limit: number) => PayinsConfigurationsQueryBuilder; /** @param cursor - A pointer to specific record * @documentationMaturity preview */ skipTo: (cursor: string) => PayinsConfigurationsQueryBuilder; /** @documentationMaturity preview */ find: () => Promise; } /** * @hidden * @fqn wix.payments.payins_configurations.v1.PayinsConfigurationService.QueryPayinsConfigurations * @requiredField query */ declare function typedQueryPayinsConfigurations(query: PayinsConfigurationQuery): Promise>; interface PayinsConfigurationQuerySpec extends QuerySpec { paging: 'cursor'; wql: [ { fields: [ 'rules.accountConnectionId', 'rules.merchantSelection.payinsEnabled', 'rules.paymentMethodTypeId' ]; operators: ['$hasAll', '$hasSome']; sort: 'BOTH'; }, { fields: ['_id', 'appId']; operators: '*'; sort: 'BOTH'; } ]; } type CommonQueryWithEntityContext = Query; type PayinsConfigurationQuery = { /** 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`. */ cursorPaging?: { /** Maximum number of items to return in the results. @max: 100 */ limit?: NonNullable['limit'] | null; /** Pointer to the next or previous page in the list of results. Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response. Not relevant for the first request. @maxLength: 16000 */ cursor?: NonNullable['cursor'] | null; }; /** Filter object in the following format: `"filter" : { "fieldName1": "value1", "fieldName2":{"$operator":"value2"} }` Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains` */ filter?: CommonQueryWithEntityContext['filter'] | null; /** Sort object in the following format: `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]` @maxSize: 5 */ sort?: { /** Name of the field to sort by. @maxLength: 512 */ fieldName?: NonNullable[number]['fieldName']; /** Sort order. */ order?: NonNullable[number]['order']; }[]; }; declare const utils: { query: { QueryBuilder: () => _wix_sdk_types.QueryBuilder; Filter: _wix_sdk_types.FilterFactory; Sort: _wix_sdk_types.SortFactory; }; }; interface BulkUpdatePayinsConfigurationTagsOptions { /** List of Tags to assign */ assignTags: Tags; /** List of Tags to unAssign */ unassignTags?: Tags; } interface BulkUpdatePayinsConfigurationTagsByFilterOptions { /** List of Tags to assign */ assignTags: Tags; /** List of Tags to unAssign */ unassignTags?: Tags; } export { type ActionEvent, type ApplicationError, type BulkActionMetadata, type BulkUpdatePayinsConfigurationTagsByFilterOptions, type BulkUpdatePayinsConfigurationTagsByFilterRequest, type BulkUpdatePayinsConfigurationTagsByFilterResponse, type BulkUpdatePayinsConfigurationTagsOptions, type BulkUpdatePayinsConfigurationTagsRequest, type BulkUpdatePayinsConfigurationTagsResponse, type BulkUpdatePayinsConfigurationTagsResult, type CommonQueryWithEntityContext, type CreatePayinsConfigurationRequest, type CreatePayinsConfigurationResponse, type CursorPaging, type CursorPagingMetadata, type CursorQuery, type CursorQueryPagingMethodOneOf, type Cursors, type DomainEvent, type DomainEventBodyOneOf, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, type ExtendedFields, type GetPayinsConfigurationRequest, type GetPayinsConfigurationResponse, type IdentificationData, type IdentificationDataIdOneOf, type ItemMetadata, type MerchantSelection, type MessageEnvelope, type PayinsConfiguration, type PayinsConfigurationQuery, type PayinsConfigurationQuerySpec, type PayinsConfigurationsQueryBuilder, type PayinsConfigurationsQueryResult, type PayinsRule, type QueryPayinsConfigurationsRequest, type QueryPayinsConfigurationsResponse, type RestoreInfo, SortOrder, type SortOrderWithLiterals, type Sorting, type TagList, type Tags, type UpdatePayinsConfiguration, type UpdatePayinsConfigurationRequest, type UpdatePayinsConfigurationResponse, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, typedQueryPayinsConfigurations, utils };