export interface Location { /** * Location ID. * @readonly */ id?: string | null; /** Location name. */ name?: string; /** Location description. */ description?: string | null; /** * Whether this is the default location. There can only be one default location per site. The default location can't be archived. * @readonly */ default?: boolean; /** * Location status. Defaults to `ACTIVE`. * __Notes:__ * - [Archiving a location](https://dev.wix.com/api/rest/business-info/locations/archive-location) * doesn't affect the location's status. * - `INACTIVE` status is currently not supported. */ status?: LocationStatus; /** * Location type. * * **Note:** Currently not supported. * @deprecated */ locationType?: LocationType; /** Fax number. */ fax?: string | null; /** Timezone in `America/New_York` format. */ timeZone?: string | null; /** Email address. */ email?: string | null; /** Phone number. */ phone?: string | null; /** Address. */ address?: Address; /** * Business schedule. Array of weekly recurring time periods when the location is open for business. Limited to 100 time periods. * * __Note:__ Not supported by Wix Bookings. */ businessSchedule?: BusinessSchedule; /** * Revision number, which increments by 1 each time the location is updated. * To prevent conflicting changes, the existing revision must be used when updating a location. */ revision?: string | null; /** * Whether the location is archived. Archived locations can't be updated. * __Note:__ [Archiving a location](https://dev.wix.com/api/rest/business-info/locations/archive-location) * doesn't affect its `status`. * @readonly */ archived?: boolean; /** Location types. */ locationTypes?: LocationType[]; } /** For future use */ export declare enum LocationStatus { ACTIVE = "ACTIVE", INACTIVE = "INACTIVE" } /** For future use */ export declare enum LocationType { UNKNOWN = "UNKNOWN", BRANCH = "BRANCH", OFFICES = "OFFICES", RECEPTION = "RECEPTION", HEADQUARTERS = "HEADQUARTERS", INVENTORY = "INVENTORY" } export interface Address { /** 2-letter country code in an [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format. */ country?: string | null; /** Code for a subdivision (such as state, prefecture, or province) in [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) format. */ subdivision?: string | null; /** City name. */ city?: string | null; /** Postal or zip code. */ postalCode?: string | null; /** Street address. Includes street name, number, and apartment number in separate fields. */ streetAddress?: StreetAddress; /** Full address of the location. */ formattedAddress?: string | null; /** Extra information that helps finding the location. */ hint?: string | null; /** Geographic coordinates of location. */ geocode?: AddressLocation; } /** Street address. Includes street name, number, and apartment number in separate fields. */ export interface StreetAddress { /** Street number. */ number?: string; /** Street name. */ name?: string; /** Apartment number. */ apt?: string; } /** Address Geolocation */ export interface AddressLocation { /** Latitude of the location. Must be between -90 and 90. */ latitude?: number | null; /** Longitude of the location. Must be between -180 and 180. */ longitude?: number | null; } /** Business schedule. Regular and exceptional time periods when the business is open or the service is available. */ export interface BusinessSchedule { /** Weekly recurring time periods when the business is regularly open or the service is available. Limited to 100 time periods. */ periods?: TimePeriod[]; /** Exceptions to the business's regular hours. The business can be open or closed during the exception. */ specialHourPeriod?: SpecialHourPeriod[]; } /** Weekly recurring time periods when the business is regularly open or the service is available. */ export interface TimePeriod { /** Day of the week the period starts on. */ openDay?: DayOfWeek; /** * Time the period starts in 24-hour [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) extended format. Valid values are `00:00` to `24:00`, where `24:00` represents * midnight at the end of the specified day. */ openTime?: string; /** Day of the week the period ends on. */ closeDay?: DayOfWeek; /** * Time the period ends in 24-hour [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) extended format. Valid values are `00:00` to `24:00`, where `24:00` represents * midnight at the end of the specified day. * * __Note:__ If `openDay` and `closeDay` specify the same day of the week `closeTime` must be later than `openTime`. */ closeTime?: string; } /** Enumerates the days of the week. */ export declare enum DayOfWeek { MONDAY = "MONDAY", TUESDAY = "TUESDAY", WEDNESDAY = "WEDNESDAY", THURSDAY = "THURSDAY", FRIDAY = "FRIDAY", SATURDAY = "SATURDAY", SUNDAY = "SUNDAY" } /** Exception to the business's regular hours. The business can be open or closed during the exception. */ export interface SpecialHourPeriod { /** Start date and time of the exception in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format and [Coordinated Universal Time (UTC)](https://en.wikipedia.org/wiki/Coordinated_Universal_Time). */ startDate?: string; /** End date and time of the exception in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format and [Coordinated Universal Time (UTC)](https://en.wikipedia.org/wiki/Coordinated_Universal_Time). */ endDate?: string; /** * Whether the business is closed (or the service is not available) during the exception. * * Default: `true`. */ isClosed?: boolean; /** Additional info about the exception. For example, "We close earlier on New Year's Eve." */ comment?: string; } export interface CreateLocationRequest { /** Location to create. */ location: Location; } export interface CreateLocationResponse { /** Created location. */ location?: Location; } export interface BulkCreateLocationRequest { /** Locations to create. */ locations?: Location[]; } export interface BulkCreateLocationResponse { /** Locations that were created. */ successfulLocations?: Location[]; /** Locations that failed. */ failedLocations?: FailedCreateLocation[]; } export interface FailedCreateLocation { /** Location that couldn't be created. */ location?: Location; /** Error message. */ errorMessage?: string; } export interface GetLocationRequest { /** ID of the location to retrieve. */ id: string; } export interface GetLocationResponse { /** Retrieved location. */ location?: Location; } export interface ListLocationsRequest { /** Sort order. */ sort?: Sorting; /** * Pagination. * * Default values: * `offset`: 0 * `limit`: 50 (Max: 1000) */ paging?: Paging; /** * Whether to include `archived` locations in the response. * * Default: `false` */ includeArchived?: boolean; } 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 ListLocationsResponse { /** Retrieved locations. */ locations?: Location[]; /** Paging info. */ pagingMetadata?: PagingMetadata; } export interface PagingMetadata { /** Number of items returned in the response. */ count?: number | null; /** Offset that was requested. */ offset?: number | null; /** * Indicates if there are more results after the current page. * If `true`, another page of results can be retrieved. * If `false`, this is the last page. */ hasNext?: boolean | null; } export interface UpdateLocationRequest { /** Location to update. */ location: Location; } export interface UpdateLocationResponse { /** Updated location. */ location?: Location; } export interface BulkUpdateLocationRequest { /** Locations to update. */ locations?: Location[]; } export interface BulkUpdateLocationResponse { /** Locations that were updated. */ successfulLocations?: Location[]; /** Locations that failed. */ failedLocations?: FailedUpdateLocation[]; } export interface FailedUpdateLocation { /** Location that couldn't be updated. */ id?: string; /** Error message. */ errorMessage?: string; } export interface QueryLocationsRequest { /** Information about the filters, sorting, and paging. */ query?: Query; } export interface Query { /** * 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?: any; /** * Sort object in the following format: * `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]` */ sort?: Sorting[]; /** Paging options to limit and skip the number of items. */ paging?: Paging; /** 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[]; } export interface QueryLocationsResponse { /** Retrieved locations. */ locations?: Location[]; /** Paging info. */ pagingMetadata?: PagingMetadata; } export interface SetDefaultLocationRequest { /** ID of the location to set as the default location. */ id: string; } export interface SetDefaultLocationResponse { /** New default location. */ location?: Location; } export interface SetDefaultLocation { /** Previous default location id. */ prevDefaultLocationId?: string; /** Current default location id. */ currDefaultLocationId?: string; } export interface ArchiveLocationRequest { /** ID of the location to archive. */ id: string; } export interface ArchiveLocationResponse { /** Archived location. */ location?: Location; } export interface ArchiveLocation { id?: string; } export interface UnarchiveLocationRequest { /** ID of the location to unarchive. */ id?: string; } export interface UnarchiveLocationResponse { /** Unarchived location. */ location?: Location; } export interface AddTypeToLocationRequest { /** ID of the location where the type will be added. */ id: string; /** Location type to add. */ locationType: LocationType; } export interface AddTypeToLocationResponse { /** Updated location. */ location?: Location; } export interface RemoveTypeFromLocationRequest { /** ID of the location where the type will be removed. */ id: string; /** Location type to remove. */ locationType: LocationType; } export interface RemoveTypeFromLocationResponse { /** Updated location. */ location?: Location; } export interface AddLocationTypeRequest { /** Location id to add type */ id: string; locationType: LocationType; } export interface AddLocationTypeResponse { /** Full location with the new type */ location?: Location; } export interface RemoveLocationTypeRequest { /** Location id to add type */ id: string; locationType: LocationType; } export interface RemoveLocationTypeResponse { /** Full location with the new type */ location?: Location; } 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 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 */ export interface DomainEventBodyOneOf { createdEvent?: EntityCreatedEvent; updatedEvent?: EntityUpdatedEvent; deletedEvent?: EntityDeletedEvent; actionEvent?: ActionEvent; } export interface EntityCreatedEvent { entityAsJson?: string; /** Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity */ restoreInfo?: RestoreInfo; } export interface RestoreInfo { deletedDate?: Date | null; } 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 MessageEnvelope { /** App instance ID. */ instanceId?: string | null; /** Event type. */ eventType?: string; /** The identification type and identity data. */ identity?: IdentificationData; /** Stringify payload. */ data?: string; } export interface IdentificationData extends IdentificationDataIdOneOf { /** ID of a site visitor that has not logged in to the site. */ anonymousVisitorId?: string; /** ID of a site visitor that has logged in to the site. */ memberId?: string; /** ID of a Wix user (site owner, contributor, etc.). */ wixUserId?: string; /** ID of an app. */ appId?: string; /** @readonly */ identityType?: WebhookIdentityType; } /** @oneof */ export interface IdentificationDataIdOneOf { /** ID of a site visitor that has not logged in to the site. */ anonymousVisitorId?: string; /** ID of a site visitor that has logged in to the site. */ memberId?: string; /** ID of a Wix user (site owner, contributor, etc.). */ wixUserId?: string; /** ID of an app. */ appId?: string; } export declare enum WebhookIdentityType { UNKNOWN = "UNKNOWN", ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR", MEMBER = "MEMBER", WIX_USER = "WIX_USER", APP = "APP" } interface StreetAddressNonNullableFields { number: string; name: string; apt: string; } interface AddressNonNullableFields { streetAddress?: StreetAddressNonNullableFields; } interface TimePeriodNonNullableFields { openDay: DayOfWeek; openTime: string; closeDay: DayOfWeek; closeTime: string; } interface SpecialHourPeriodNonNullableFields { startDate: string; endDate: string; isClosed: boolean; comment: string; } interface BusinessScheduleNonNullableFields { periods: TimePeriodNonNullableFields[]; specialHourPeriod: SpecialHourPeriodNonNullableFields[]; } interface LocationNonNullableFields { name: string; default: boolean; status: LocationStatus; locationType: LocationType; address?: AddressNonNullableFields; businessSchedule?: BusinessScheduleNonNullableFields; archived: boolean; locationTypes: LocationType[]; } export interface CreateLocationResponseNonNullableFields { location?: LocationNonNullableFields; } export interface GetLocationResponseNonNullableFields { location?: LocationNonNullableFields; } export interface ListLocationsResponseNonNullableFields { locations: LocationNonNullableFields[]; } export interface UpdateLocationResponseNonNullableFields { location?: LocationNonNullableFields; } export interface QueryLocationsResponseNonNullableFields { locations: LocationNonNullableFields[]; } export interface SetDefaultLocationResponseNonNullableFields { location?: LocationNonNullableFields; } export interface ArchiveLocationResponseNonNullableFields { location?: LocationNonNullableFields; } export interface AddTypeToLocationResponseNonNullableFields { location?: LocationNonNullableFields; } export interface RemoveTypeFromLocationResponseNonNullableFields { location?: LocationNonNullableFields; } export interface AddLocationTypeResponseNonNullableFields { location?: LocationNonNullableFields; } export interface RemoveLocationTypeResponseNonNullableFields { location?: LocationNonNullableFields; } export {};