/** WalletAction is the main entity of WalletActionService that can be used for lorem ipsum dolor */ export interface WalletAction { /** * WalletAction ID * @readonly */ id?: string | null; /** * Represents the current state of an item. Each time the item is modified, its `revision` changes. For an update operation to succeed, you MUST pass the latest revision * @readonly */ revision?: string | null; /** * Represents the time this WalletAction was created * @readonly */ createdDate?: Date; /** * Represents the time this WalletAction was last updated * @readonly */ updatedDate?: Date; /** Wallet ID */ walletId?: string; /** Represents the time when the walletAction's amount will be added to the account */ startDate?: Date; /** Represents the time when the unused balance will be deducted from the account */ expirationDate?: Date; /** * Represents the time when the walletAction was manually disabled * @readonly */ disableDate?: Date; /** The amount to be added to the Wallet */ amount?: string; /** Free text comment regarding the WalletAction context */ note?: string | null; /** Indicates the kind of the specific walletAction */ type?: WalletActionType; /** @readonly */ walletActionStarted?: WalletActionExecutionDetails; /** @readonly */ walletActionEnded?: WalletActionExecutionDetails; /** @readonly */ status?: WalletActionStatus; /** @readonly */ source?: WalletActionSource; context?: WalletActionContext; notifications?: Notifications; liability?: boolean | null; } export interface EmailParams { skipEmailDispatch?: boolean | null; overrideTemplateId?: string | null; } export declare enum SourceType { UNKNOWN_SOURCE = "UNKNOWN_SOURCE", APP = "APP", USER = "USER" } export declare enum ContextType { UNKNOWN_CONTEXT = "UNKNOWN_CONTEXT", WORKFLOW = "WORKFLOW" } export interface WorkflowPayload { id?: string; name?: string; } export declare enum WalletActionType { UNKNOWN = "UNKNOWN", REWARD = "REWARD", REFUND = "REFUND" } export interface WalletActionExecutionDetails { /** @readonly */ transactionId?: string | null; /** @readonly */ executionDate?: Date; } export declare enum WalletActionStatus { PENDING = "PENDING", ACTIVE = "ACTIVE", DISABLED = "DISABLED", EXPIRED = "EXPIRED" } export interface WalletActionSource { type?: SourceType; id?: string | null; } export interface WalletActionContext extends WalletActionContextPayloadOneOf { /** Workflow payload */ workflowPayload?: WorkflowPayload; type?: ContextType; } /** @oneof */ export interface WalletActionContextPayloadOneOf { /** Workflow payload */ workflowPayload?: WorkflowPayload; } export interface Notifications { emailParams?: EmailParams; } export interface CreateWalletActionRequest { /** WalletAction to be created */ walletAction: WalletAction; } export interface CreateWalletActionResponse { /** The created WalletAction */ walletAction?: WalletAction; } export interface WalletActionCreationExpirationDateInThePastDetails { /** The date when the walletAction expires. */ expirationDate?: Date; /** The date when the walletAction was tried to be created. */ currentDate?: Date; } export interface WalletActionCreationStartLaterThanExpirationDetails { /** The start date of the walletAction. */ startDate?: Date; /** The date when the walletAction expires. */ expirationDate?: Date; } export interface WalletActionCreationDisabledAtDateSetDetails { /** Represents the time when the walletAction was disabled. */ disableDate?: Date; } export interface GetWalletActionRequest { /** ID of the WalletAction to retrieve */ walletActionId: string; } export interface GetWalletActionResponse { /** The retrieved WalletAction */ walletAction?: WalletAction; } export interface UpdateWalletActionRequest { /** WalletAction to be updated, may be partial */ walletAction: WalletAction; } export interface UpdateWalletActionResponse { /** The updated WalletAction */ walletAction?: WalletAction; } export interface InvalidWalletActionDetails { /** WalletAction ID. */ walletActionId?: string; } export interface WalletActionUpdateStartDateInThePastDetails { /** WalletAction ID. */ walletActionId?: string; /** The date when the walletAction expires. */ newStartDate?: Date; /** The date when the walletAction was tried to be updated. */ currentDate?: Date; } export interface WalletActionUpdateExpirationDateInThePastDetails { /** WalletAction ID. */ walletActionId?: string; /** The date when the walletAction expires. */ newExpirationDate?: Date; /** The date when the walletAction was tried to be updated. */ currentDate?: Date; } export interface WalletActionUpdateStartLaterThanExpirationDetails { /** WalletAction ID. */ walletActionId?: string; /** The start date of the walletAction. */ startDate?: Date; /** The date when the walletAction expires. */ expirationDate?: Date; } export interface DisableWalletActionRequest { /** ID of the WalletAction to delete */ walletActionId: string; /** The revision of the WalletAction */ revision: string; } export interface DisableWalletActionResponse { /** The expired WalletAction */ walletAction?: WalletAction; } export interface WalletActionDisabled { walletAction?: WalletAction; } export interface DeleteWalletActionRequest { /** ID of the WalletAction to delete */ walletActionId?: string; /** The revision of the WalletAction */ revision?: string; } export interface DeleteWalletActionResponse { } export interface QueryWalletActionRequest { /** WQL expression */ query: QueryV2; } export interface QueryV2 extends QueryV2PagingMethodOneOf { /** Paging options to limit and skip the number of items. */ paging?: Paging; /** 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"}]` */ sort?: Sorting[]; /** Array of projected fields. A list of specific field names to return. If `fieldsets` are also specified, the union of `fieldsets` and `fields` is returned. */ fields?: string[]; /** Array of named, predefined sets of projected fields. A array of predefined named sets of fields to be returned. Specifying multiple `fieldsets` will return the union of fields from all sets. If `fields` are also specified, the union of `fieldsets` and `fields` is returned. */ fieldsets?: string[]; } /** @oneof */ export interface QueryV2PagingMethodOneOf { /** Paging options to limit and skip the number of items. */ paging?: Paging; /** 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; } export interface Sorting { /** Name of the field to sort by. */ fieldName?: string; /** Sort order. */ order?: SortOrder; } export declare enum SortOrder { ASC = "ASC", DESC = "DESC" } export interface Paging { /** Number of items to load. */ limit?: number | null; /** Number of items to skip in the current sort order. */ offset?: number | null; } export interface CursorPaging { /** Number of items to load. */ limit?: number | null; /** * Pointer to the next or previous page in the list of results. * * You can get the relevant cursor token * from the `pagingMetadata` object in the previous call's response. * Not relevant for the first request. */ cursor?: string | null; } export interface QueryWalletActionResponse { /** The retrieved WalletActions */ walletActions?: WalletAction[]; pagingMetadata?: PagingMetadataV2; } export interface PagingMetadataV2 { /** Number of items returned in the response. */ count?: number | null; /** Offset that was requested. */ offset?: number | null; /** Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set. */ total?: number | null; /** Flag that indicates the server failed to calculate the `total` field. */ tooManyToCount?: boolean | null; /** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */ cursors?: Cursors; } export interface Cursors { /** Cursor pointing to next page in the list of results. */ next?: string | null; /** Cursor pointing to previous page in the list of results. */ prev?: string | null; } export interface QueryWalletActionBalancesRequest { /** WQL expression */ query: QueryV2; } export interface QueryWalletActionBalancesResponse { /** The retrieved WalletActions with their balance */ walletActions?: WalletActionWithBalance[]; pagingMetadata?: PagingMetadataV2; } export interface WalletActionWithBalance { /** WalletAction */ walletAction?: WalletAction; /** WalletAction balance */ balance?: string | null; } export 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. */ eventTime?: Date; /** * 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 */ export interface DomainEventBodyOneOf { createdEvent?: EntityCreatedEvent; updatedEvent?: EntityUpdatedEvent; deletedEvent?: EntityDeletedEvent; actionEvent?: ActionEvent; } export interface EntityCreatedEvent { entityAsJson?: string; } export 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. */ currentEntityAsJson?: string; } export interface EntityDeletedEvent { /** Entity that was deleted */ deletedEntityAsJson?: string | null; } export interface ActionEvent { bodyAsJson?: string; } export interface Empty { } export interface CreateMigrationWalletActionRequest { /** WalletAction to be created */ walletAction?: WalletAction; } export interface CreateMigrationWalletActionResponse { /** The created WalletAction */ walletAction?: WalletAction; } export interface CreateWalletActionResponseNonNullableFields { walletAction?: { walletId: string; amount: string; type: WalletActionType; status: WalletActionStatus; source?: { type: SourceType; }; context?: { workflowPayload?: { id: string; name: string; }; type: ContextType; }; }; } export interface GetWalletActionResponseNonNullableFields { walletAction?: { walletId: string; amount: string; type: WalletActionType; status: WalletActionStatus; source?: { type: SourceType; }; context?: { workflowPayload?: { id: string; name: string; }; type: ContextType; }; }; } export interface UpdateWalletActionResponseNonNullableFields { walletAction?: { walletId: string; amount: string; type: WalletActionType; status: WalletActionStatus; source?: { type: SourceType; }; context?: { workflowPayload?: { id: string; name: string; }; type: ContextType; }; }; } export interface DisableWalletActionResponseNonNullableFields { walletAction?: { walletId: string; amount: string; type: WalletActionType; status: WalletActionStatus; source?: { type: SourceType; }; context?: { workflowPayload?: { id: string; name: string; }; type: ContextType; }; }; } export interface QueryWalletActionResponseNonNullableFields { walletActions: { walletId: string; amount: string; type: WalletActionType; status: WalletActionStatus; source?: { type: SourceType; }; context?: { workflowPayload?: { id: string; name: string; }; type: ContextType; }; }[]; } export interface QueryWalletActionBalancesResponseNonNullableFields { walletActions: { walletAction?: { walletId: string; amount: string; type: WalletActionType; status: WalletActionStatus; source?: { type: SourceType; }; context?: { workflowPayload?: { id: string; name: string; }; type: ContextType; }; }; }[]; }