import { CreateProgramDefinitionRequest as CreateProgramDefinitionRequest$1, CreateProgramDefinitionResponse as CreateProgramDefinitionResponse$1, UpdateProgramDefinitionRequest as UpdateProgramDefinitionRequest$1, UpdateProgramDefinitionResponse as UpdateProgramDefinitionResponse$1, DeleteProgramDefinitionRequest as DeleteProgramDefinitionRequest$1, DeleteProgramDefinitionResponse as DeleteProgramDefinitionResponse$1, GetProgramDefinitionRequest as GetProgramDefinitionRequest$1, GetProgramDefinitionResponse as GetProgramDefinitionResponse$1, GetProgramDefinitionByExternalIdAndNamespaceRequest as GetProgramDefinitionByExternalIdAndNamespaceRequest$1, GetProgramDefinitionByExternalIdAndNamespaceResponse as GetProgramDefinitionByExternalIdAndNamespaceResponse$1, QueryProgramDefinitionsRequest as QueryProgramDefinitionsRequest$1, QueryProgramDefinitionsResponse as QueryProgramDefinitionsResponse$1 } from './index.typings.mjs'; import '@wix/sdk-types'; interface ProgramDefinition { /** * Program definition ID. * @format GUID * @immutable * @readonly */ id?: string | null; /** * Revision number, which increments by 1 each time the program definition is updated. * To prevent conflicting changes, the current revision must be passed when updating the program definition. * * Ignored when creating a program definition. * @readonly */ revision?: string | null; /** * Date and time the program definition was created. * @readonly */ createdDate?: Date | null; /** * Date and time the program definition was updated. * @readonly */ updatedDate?: Date | null; /** * Program definition name. * @maxLength 64 */ displayName?: string | null; /** * Namespace for your app or site's benefit programs. Namespaces allow you to distinguish between entities that you created and entities that other apps created. * @immutable * @readonly * @minLength 1 * @maxLength 20 */ namespace?: string | null; /** * Custom field data for the program definition object. * * [Extended fields](https://dev.wix.com/docs/build-apps/develop-your-app/extensions/backend-extensions/schema-plugins/about-schema-plugin-extensions) must be configured in the app dashboard before they can be accessed with API calls. */ extendedFields?: ExtendedFields; /** * ID for the program definition defined by you. You can use `externalId` to filter queries. * @format GUID * @immutable * @readonly */ externalId?: string | null; } 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 ProgramDefinitionTranslated { /** The translated program definition. */ programDefinition?: ProgramDefinition; /** * The language code of the translation. * @maxLength 20 * @format LANGUAGE_TAG */ language?: string; } interface ProgramDefinitionTranslationDeleted { /** * The ID of the program definition. * @format GUID */ programDefinitionId?: string; /** * The language code of the translation. * @maxLength 20 * @format LANGUAGE_TAG */ language?: string; } interface CreateProgramDefinitionRequest { /** Program definition to create. */ programDefinition: ProgramDefinition; } interface CreateProgramDefinitionResponse { /** Created program definition. */ programDefinition?: ProgramDefinition; } interface UpdateProgramDefinitionRequest { /** Program definition to update. */ programDefinition: ProgramDefinition; } interface UpdateProgramDefinitionResponse { /** Updated program definition. */ programDefinition?: ProgramDefinition; } interface DeleteProgramDefinitionRequest { /** * ID of the program definition to delete. * @format GUID */ programDefinitionId: string; /** Determines when the changes to this program definition will be applied to associated programs and pools. */ cascadeType?: CascadeWithLiterals; } declare enum Cascade { /** Unknown cascade. */ UNKNOWN_CASCADE = "UNKNOWN_CASCADE", /** Changes are applied to existing programs and pools when they are next renewed. */ NEXT_RENEWAL = "NEXT_RENEWAL", /** Changes are applied to associated programs and pools immediately. */ IMMEDIATELY = "IMMEDIATELY", /** Changes are not applied to existing associated programs and pools. They are only applied to future programs and pools. */ FUTURE_PROVISIONS = "FUTURE_PROVISIONS" } /** @enumType */ type CascadeWithLiterals = Cascade | 'UNKNOWN_CASCADE' | 'NEXT_RENEWAL' | 'IMMEDIATELY' | 'FUTURE_PROVISIONS'; interface DeleteProgramDefinitionResponse { } interface GetProgramDefinitionRequest { /** * ID of the program definition to retrieve. * @format GUID */ programDefinitionId: string; } interface GetProgramDefinitionResponse { /** Retrieved program definition. */ programDefinition?: ProgramDefinition; } interface GetProgramDefinitionByExternalIdAndNamespaceRequest { /** * Namespace for your app or site's benefit programs. Namespaces allow you to distinguish between entities that you created and entities that other apps created. * @minLength 1 * @maxLength 20 */ namespace: string; /** * Program definition external ID. * @format GUID */ externalId: string; } interface GetProgramDefinitionByExternalIdAndNamespaceResponse { /** Retrieved program definition. */ programDefinition?: ProgramDefinition; } interface QueryProgramDefinitionsRequest { /** Filter, sort, and paging to apply to the query. */ 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. * See [API Query Language](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language) * for more information. */ filter?: Record | null; /** * List of sort objects. * @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 { /** * Field to sort by. * @maxLength 512 */ fieldName?: string; /** * Sort order. Use `ASC` for ascending order or `DESC` for descending order. * * Default: `ASC` */ order?: SortOrderWithLiterals; } declare enum SortOrder { /** Ascending sort order. */ ASC = "ASC", /** Descending sort order. */ DESC = "DESC" } /** @enumType */ type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC'; interface CursorPaging { /** * Maximum number of items to return. * @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 QueryProgramDefinitionsResponse { /** List of retrieved program definitions. */ programDefinitions?: ProgramDefinition[]; /** Metadata for the paginated results. */ metadata?: 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 UpsertProgramDefinitionRequest { /** Program definition to be created or updated. */ programDefinition?: ProgramDefinition; } interface UpsertProgramDefinitionResponse { /** Created or updated program definition. */ programDefinition?: ProgramDefinition; } interface GetOrCreateProgramDefinitionRequest { /** * Application sub-module that represents the source of the program definition. Specified by the external developer. This namespace is used to handle and retrieve program definition and associated programs. * @minLength 1 * @maxLength 20 */ namespace?: string; /** * External program definition ID. * @format GUID */ externalId?: string; } interface GetOrCreateProgramDefinitionResponse { /** The created or updated program definition. */ programDefinition?: ProgramDefinition; } interface DomainEvent extends DomainEventBodyOneOf { createdEvent?: EntityCreatedEvent; updatedEvent?: EntityUpdatedEvent; deletedEvent?: EntityDeletedEvent; actionEvent?: ActionEvent; /** Event ID. With this ID you can easily spot duplicated events and ignore them. */ id?: string; /** * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities. * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`. */ entityFqdn?: string; /** * Event action name, placed at the top level to make it easier for users to dispatch messages. * For 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 that indicates the order of updates to an entity. For example, if an entity was updated at `16:00` and then again at `16:01`, the second update will always have a higher sequence number. * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it. */ entityEventSequence?: string | null; } /** @oneof */ interface DomainEventBodyOneOf { createdEvent?: EntityCreatedEvent; updatedEvent?: EntityUpdatedEvent; deletedEvent?: EntityDeletedEvent; actionEvent?: ActionEvent; } interface EntityCreatedEvent { entityAsJson?: string; /** Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity */ restoreInfo?: RestoreInfo; } 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. */ currentEntityAsJson?: string; } interface EntityDeletedEvent { /** Entity that was deleted. */ deletedEntityAsJson?: string | null; } interface ActionEvent { bodyAsJson?: 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; /** Details related to the account */ accountInfo?: AccountInfo; } 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 AccountInfo { /** * ID of the Wix account associated with the event. * @format GUID */ accountId?: string | null; /** * ID of the parent Wix account. Only included when accountId belongs to a child account. * @format GUID */ parentAccountId?: string | null; /** * ID of the Wix site associated with the event. Only included when the event is tied to a specific site. * @format GUID */ siteId?: string | null; } type __PublicMethodMetaInfo = { getUrl: (context: any) => string; httpMethod: K; path: string; pathParams: M; __requestType: T; __originalRequestType: S; __responseType: Q; __originalResponseType: R; }; declare function createProgramDefinition(): __PublicMethodMetaInfo<'POST', {}, CreateProgramDefinitionRequest$1, CreateProgramDefinitionRequest, CreateProgramDefinitionResponse$1, CreateProgramDefinitionResponse>; declare function updateProgramDefinition(): __PublicMethodMetaInfo<'PATCH', { programDefinitionId: string; }, UpdateProgramDefinitionRequest$1, UpdateProgramDefinitionRequest, UpdateProgramDefinitionResponse$1, UpdateProgramDefinitionResponse>; declare function deleteProgramDefinition(): __PublicMethodMetaInfo<'DELETE', { programDefinitionId: string; }, DeleteProgramDefinitionRequest$1, DeleteProgramDefinitionRequest, DeleteProgramDefinitionResponse$1, DeleteProgramDefinitionResponse>; declare function getProgramDefinition(): __PublicMethodMetaInfo<'GET', { programDefinitionId: string; }, GetProgramDefinitionRequest$1, GetProgramDefinitionRequest, GetProgramDefinitionResponse$1, GetProgramDefinitionResponse>; declare function getProgramDefinitionByExternalIdAndNamespace(): __PublicMethodMetaInfo<'GET', {}, GetProgramDefinitionByExternalIdAndNamespaceRequest$1, GetProgramDefinitionByExternalIdAndNamespaceRequest, GetProgramDefinitionByExternalIdAndNamespaceResponse$1, GetProgramDefinitionByExternalIdAndNamespaceResponse>; declare function queryProgramDefinitions(): __PublicMethodMetaInfo<'POST', {}, QueryProgramDefinitionsRequest$1, QueryProgramDefinitionsRequest, QueryProgramDefinitionsResponse$1, QueryProgramDefinitionsResponse>; export { type AccountInfo as AccountInfoOriginal, type ActionEvent as ActionEventOriginal, Cascade as CascadeOriginal, type CascadeWithLiterals as CascadeWithLiteralsOriginal, type CreateProgramDefinitionRequest as CreateProgramDefinitionRequestOriginal, type CreateProgramDefinitionResponse as CreateProgramDefinitionResponseOriginal, type CursorPagingMetadata as CursorPagingMetadataOriginal, type CursorPaging as CursorPagingOriginal, type CursorQuery as CursorQueryOriginal, type CursorQueryPagingMethodOneOf as CursorQueryPagingMethodOneOfOriginal, type Cursors as CursorsOriginal, type DeleteProgramDefinitionRequest as DeleteProgramDefinitionRequestOriginal, type DeleteProgramDefinitionResponse as DeleteProgramDefinitionResponseOriginal, type DomainEventBodyOneOf as DomainEventBodyOneOfOriginal, type DomainEvent as DomainEventOriginal, type EntityCreatedEvent as EntityCreatedEventOriginal, type EntityDeletedEvent as EntityDeletedEventOriginal, type EntityUpdatedEvent as EntityUpdatedEventOriginal, type ExtendedFields as ExtendedFieldsOriginal, type GetOrCreateProgramDefinitionRequest as GetOrCreateProgramDefinitionRequestOriginal, type GetOrCreateProgramDefinitionResponse as GetOrCreateProgramDefinitionResponseOriginal, type GetProgramDefinitionByExternalIdAndNamespaceRequest as GetProgramDefinitionByExternalIdAndNamespaceRequestOriginal, type GetProgramDefinitionByExternalIdAndNamespaceResponse as GetProgramDefinitionByExternalIdAndNamespaceResponseOriginal, type GetProgramDefinitionRequest as GetProgramDefinitionRequestOriginal, type GetProgramDefinitionResponse as GetProgramDefinitionResponseOriginal, type IdentificationDataIdOneOf as IdentificationDataIdOneOfOriginal, type IdentificationData as IdentificationDataOriginal, type MessageEnvelope as MessageEnvelopeOriginal, type ProgramDefinition as ProgramDefinitionOriginal, type ProgramDefinitionTranslated as ProgramDefinitionTranslatedOriginal, type ProgramDefinitionTranslationDeleted as ProgramDefinitionTranslationDeletedOriginal, type QueryProgramDefinitionsRequest as QueryProgramDefinitionsRequestOriginal, type QueryProgramDefinitionsResponse as QueryProgramDefinitionsResponseOriginal, type RestoreInfo as RestoreInfoOriginal, SortOrder as SortOrderOriginal, type SortOrderWithLiterals as SortOrderWithLiteralsOriginal, type Sorting as SortingOriginal, type UpdateProgramDefinitionRequest as UpdateProgramDefinitionRequestOriginal, type UpdateProgramDefinitionResponse as UpdateProgramDefinitionResponseOriginal, type UpsertProgramDefinitionRequest as UpsertProgramDefinitionRequestOriginal, type UpsertProgramDefinitionResponse as UpsertProgramDefinitionResponseOriginal, WebhookIdentityType as WebhookIdentityTypeOriginal, type WebhookIdentityTypeWithLiterals as WebhookIdentityTypeWithLiteralsOriginal, type __PublicMethodMetaInfo, createProgramDefinition, deleteProgramDefinition, getProgramDefinition, getProgramDefinitionByExternalIdAndNamespace, queryProgramDefinitions, updateProgramDefinition };