/** SiteDataUsage describes site-wide resource limits and usage */ interface SiteDataUsage { /** * Storage limit in bytes. Used storage for LIVE and SANDBOX is counted together towards the limit. For example given * 1 GB limit LIVE environment could contain 700 MB and SANDBOX 300 MB before limit is reached. */ storageLimitInBytes?: string | null; /** * Max number of items allowed. Limit is applied separately to LIVE and SANDBOX environments, that is if limit is 1000 items, * both LIVE and SANDBOX environments are allowed to contain 1000 items each. */ itemCountLimit?: string | null; /** Max number of native collections allowed */ collectionCountLimit?: number | null; /** Total number of native collections created */ collectionCount?: number | null; /** Current usage of all collections in LIVE environment */ totalUsedLive?: Usage; /** Current usage of all collections in SANDBOX environment */ totalUsedSandbox?: Usage; /** * Usages per data collection * @maxSize 1000 */ dataCollectionUsages?: DataCollectionUsage[]; } interface Usage { /** Number of bytes */ bytes?: string; /** Number of items */ items?: string; } interface DataCollectionUsage { /** * Data Collection ID * @maxLength 256 */ dataCollectionId?: string; /** * Data Collection display name * @maxLength 1024 */ displayName?: string | null; /** Type of data collection, currently only NATIVE are returned in this API */ dataCollectionType?: CollectionTypeWithLiterals; /** Current usage in LIVE environment */ totalUsedLive?: Usage; /** Current usage in SANDBOX environment */ totalUsedSandbox?: Usage; } declare enum CollectionType { /** User-created collection. */ NATIVE = "NATIVE", /** [Collection](https://support.wix.com/en/article/velo-working-with-wix-app-collections-and-code#what-are-wix-app-collections) created by a Wix app when it is installed. This type of collection can be modified dynamically by that app (for example, Wix Forms). */ WIX_APP = "WIX_APP", /** Collection created by a Wix Blocks app. */ BLOCKS_APP = "BLOCKS_APP", /** Collection located in externally connected storage. */ EXTERNAL = "EXTERNAL" } /** @enumType */ type CollectionTypeWithLiterals = CollectionType | 'NATIVE' | 'WIX_APP' | 'BLOCKS_APP' | 'EXTERNAL'; interface GetSiteDataUsageRequest { /** * SiteDataUsage fields to return, if empty all are returned * @maxLength 1000 * @maxSize 1000 */ fields?: string[]; /** If true, operation queries collections for up-to-date values (rather than using cached values) */ consistentRead?: boolean; } interface GetSiteDataUsageResponse { /** The retrieved SiteDataUsage */ siteDataUsage?: SiteDataUsage; } interface BulkUpdateUsagesRequest { /** * Usages to update * @maxSize 10000 */ updates?: InstanceUsageUpdate[]; } interface DataCollectionUsageUpdate { /** * Data Collection ID * @maxLength 256 */ dataCollectionId?: string; /** if true present values are added to existing, otherwise values are replaced */ relative?: boolean; /** Data Collection item count in the live environment */ liveItemCount?: string | null; /** Data Collection item count in the sandbox environment */ sandboxItemCount?: string | null; /** Data Collection used storage in bytes in the live environment */ liveUsedStorageInBytes?: string | null; /** Data Collection used storage in bytes in the sandbox environment */ sandboxUsedStorageInBytes?: string | null; } declare enum Segment { BOTH = "BOTH", LIVE = "LIVE", SANDBOX = "SANDBOX" } /** @enumType */ type SegmentWithLiterals = Segment | 'BOTH' | 'LIVE' | 'SANDBOX'; interface InstanceUsageUpdate { /** * Data Instance ID * @format GUID */ instanceId?: string; /** * Usage updates per collection * @maxSize 10000 */ collections?: DataCollectionUsageUpdate[]; /** if true all collections not in the list assumed to have 0 usage */ allCollectionsPresent?: boolean; /** Indicates which segment is being updated */ segment?: SegmentWithLiterals; } interface BulkUpdateUsagesResponse { } 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 { 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 Empty { } interface DataChangeEvent extends DataChangeEventEventOneOf { dataChanged?: DataChanged; /** resume point is lost so some changes may be lost */ changesLost?: ChangesLost; referenceChanged?: ReferenceChanged; /** segment access or mapping changed */ segmentChanged?: SegmentChanged; /** segment migration started to new physical location */ segmentMigrationStarted?: SegmentMigrationStarted; /** source should be added or removed from ignore list */ ignoredSource?: IgnoredSourceEvent; /** @maxLength 1024 */ idempotenceKey?: string; } /** @oneof */ interface DataChangeEventEventOneOf { dataChanged?: DataChanged; /** resume point is lost so some changes may be lost */ changesLost?: ChangesLost; referenceChanged?: ReferenceChanged; /** segment access or mapping changed */ segmentChanged?: SegmentChanged; /** segment migration started to new physical location */ segmentMigrationStarted?: SegmentMigrationStarted; /** source should be added or removed from ignore list */ ignoredSource?: IgnoredSourceEvent; } interface DataChanged extends DataChangedChangeOneOf { /** inserted document */ inserted?: Record | null; /** full replaced document */ replaced?: Record | null; /** partial update, removed fields are set to Empty */ partial?: Record | null; /** * deleted document ID * @maxLength 256 */ removedId?: string; /** * physical cluster ID * @maxLength 1024 */ clusterId?: string; /** * physical source * db.collection for MongoDB * @maxLength 1024 */ source?: string; /** * instance ID * @format GUID */ tenantId?: string; /** * logical collection name * @maxLength 256 */ collectionName?: string; dataStore?: DataStoreWithLiterals; /** @maxLength 256 */ documentId?: string; clusterTime?: Date | null; /** Initiator of the request */ initiator?: Initiator; /** Identity of the user who initiated the request */ writer?: Identity; /** * Contains changes that, when applied to raw item, will result in the item as it would look like * when returned from the data-items API. * This includes * * fully prefixed page link paths * * calculated draft-published status * * decrypted PII fields * * deleted schema fields (removed_fields) */ enrichment?: Enrichment; /** * Sequence number. Event with higher sequence number happened after the event with lower sequence number in the same cluster. * Two or more events can have same sequence number if they happened in the same transaction. * Events in different clusters have independent sequence numbers and should not be compared. */ seqNumber?: string; } /** @oneof */ interface DataChangedChangeOneOf { /** inserted document */ inserted?: Record | null; /** full replaced document */ replaced?: Record | null; /** partial update, removed fields are set to Empty */ partial?: Record | null; /** * deleted document ID * @maxLength 256 */ removedId?: string; } declare enum Type { /** Initiator is unknown */ Unknown = "Unknown", /** Indicated that write has been initiated by SSR indexer */ SsrIndexer = "SsrIndexer" } /** @enumType */ type TypeWithLiterals = Type | 'Unknown' | 'SsrIndexer'; declare enum DataStore { Dev = "Dev", Public = "Public" } /** @enumType */ type DataStoreWithLiterals = DataStore | 'Dev' | 'Public'; interface Initiator { type?: TypeWithLiterals; } interface Identity { /** * User ID, when the request is initiated by a user * @maxLength 36 */ userId?: string | null; /** * Member ID, when the request is initiated by a member * @maxLength 36 */ memberId?: string | null; /** * Visitor ID, when the request is initiated by a visitor * @maxLength 36 */ visitorId?: string | null; /** * External App ID, when the request is initiated by an external app * @maxLength 36 */ externalAppId?: string | null; /** * Service ID, when the request is initiated by a service * @maxLength 36 */ serviceId?: string | null; } interface Enrichment { /** Struct that should be merged into the raw item. */ replace?: Record | null; /** * Fields that should be removed from the raw item. * @maxSize 1000 * @maxLength 1000 */ removeFields?: string[]; } interface ChangesLost { /** @maxLength 1024 */ clusterId?: string; } interface ReferenceChanged { /** * physical cluster ID * @maxLength 1024 */ clusterId?: string; /** * physical source * db.collection for MongoDB * @maxLength 1024 */ source?: string; /** * instance ID * @format GUID */ tenantId?: string; dataStore?: DataStoreWithLiterals; /** @maxLength 1024 */ relationshipName?: string; /** @maxLength 10000 */ leftId?: string; /** @maxLength 10000 */ rightId?: string; /** if reference is set or unset */ isRemoved?: boolean; clusterTime?: Date | null; /** ref created date */ createdAt?: Date | null; /** * Sequence number. Event with higher sequence number happened after the event with lower sequence number in the same cluster. * Two or more events can have same sequence number if they happened in the same transaction. * Events in different clusters have independent sequence numbers and should not be compared. */ seqNumber?: string; } interface SegmentChanged { /** * physical cluster ID * @maxLength 1024 */ clusterId?: string; /** * physical source * db.collection for MongoDB * @maxLength 1024 */ source?: string; /** * instance ID * @format GUID */ tenantId?: string; /** segment */ dataStore?: DataStoreWithLiterals; /** * new db name if changed * @maxLength 1024 */ newDatabase?: string | null; /** * new cluster if changed * @maxLength 1024 */ newClusterId?: string | null; /** read permissions if changed */ readsEnabled?: boolean | null; /** write permissions if changed */ writesEnabled?: boolean | null; /** event time */ clusterTime?: Date | null; /** * Sequence number. Event with higher sequence number happened after the event with lower sequence number in the same cluster. * Two or more events can have same sequence number if they happened in the same transaction. * Events in different clusters have independent sequence numbers and should not be compared. */ seqNumber?: string; } interface SegmentMigrationStarted { /** * physical cluster ID * @maxLength 1024 */ clusterId?: string; /** * physical source * db.collection for MongoDB * @maxLength 1024 */ source?: string; /** * instance ID * @format GUID */ tenantId?: string; /** segment */ dataStore?: DataStoreWithLiterals; /** * new db name if changed * @maxLength 1024 */ newDatabase?: string; /** * new cluster if changed * @maxLength 1024 */ newClusterId?: string; /** event time */ clusterTime?: Date | null; /** * Sequence number. Event with higher sequence number happened after the event with lower sequence number in the same cluster. * Two or more events can have same sequence number if they happened in the same transaction. * Events in different clusters have independent sequence numbers and should not be compared. */ seqNumber?: string; } interface IgnoredSourceEvent { /** * physical cluster ID * @maxLength 1024 */ clusterId?: string; /** * physical database name * @minLength 1 * @maxLength 100 */ database?: string; /** * instance ID * @format GUID */ tenantId?: string; /** segment */ dataStore?: DataStoreWithLiterals; /** event action if ignored source should be added or removed */ action?: ActionWithLiterals; } declare enum Action { Unknown = "Unknown", AddIgnoredSource = "AddIgnoredSource", RemoveIgnoredSource = "RemoveIgnoredSource" } /** @enumType */ type ActionWithLiterals = Action | 'Unknown' | 'AddIgnoredSource' | 'RemoveIgnoredSource'; 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; } interface GetSiteDataUsageOptions { /** * SiteDataUsage fields to return, if empty all are returned * @maxLength 1000 * @maxSize 1000 */ fields?: string[]; /** If true, operation queries collections for up-to-date values (rather than using cached values) */ consistentRead?: boolean; } export { type AccountInfo, Action, type ActionEvent, type ActionWithLiterals, type BulkUpdateUsagesRequest, type BulkUpdateUsagesResponse, type ChangesLost, CollectionType, type CollectionTypeWithLiterals, type DataChangeEvent, type DataChangeEventEventOneOf, type DataChanged, type DataChangedChangeOneOf, type DataCollectionUsage, type DataCollectionUsageUpdate, DataStore, type DataStoreWithLiterals, type DomainEvent, type DomainEventBodyOneOf, type Empty, type Enrichment, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, type GetSiteDataUsageOptions, type GetSiteDataUsageRequest, type GetSiteDataUsageResponse, type IdentificationData, type IdentificationDataIdOneOf, type Identity, type IgnoredSourceEvent, type Initiator, type InstanceUsageUpdate, type MessageEnvelope, type ReferenceChanged, type RestoreInfo, Segment, type SegmentChanged, type SegmentMigrationStarted, type SegmentWithLiterals, type SiteDataUsage, Type, type TypeWithLiterals, type Usage, WebhookIdentityType, type WebhookIdentityTypeWithLiterals };