/** An intermediary application that authorizes and authenticates an external client to access data on a Wix project or site. */ export interface OAuthApp { /** * ID of the OAuth app. * @readonly */ id?: string | null; /** * Date and time the OAuth app was created, in ISO 8601 format. * @readonly */ createdDate?: Date; /** Display name of the OAuth app, as it appears in the dashboard. */ name?: string | null; /** Description of the OAuth app, as it appears in the dashboard. */ description?: string | null; /** * Client secret for the OAuth app. **Note:** This is returned only when the OAuth app is created. It can't be retrieved later. * @readonly */ secret?: string | null; /** External login URL to which users are redirected automatically to authenticate. If no login URL is specified, the user is redirected to Wix to authenticate. */ loginUrl?: string | null; /** * List of URIs to which redirection from Wix is allowed after authentication. * * When a client redirects a user to Wix for authentication, the client provides a URI to redirect the user back to after the user has been authenticated. * Wix only redirects the user if the exact URI is contained in this array. */ allowedRedirectUris?: string[]; /** * List of domains to which redirection from Wix is allowed after processes other than authentication. * * When a client redirects a user to a Wix page (for example, for checkout), the client provides a URL to redirect the user back to. * Wix only redirects the user if the URL is in one of the specified domains. */ allowedRedirectDomains?: string[]; } export interface CreateOAuthAppRequest { /** OAuth app to create. */ oAuthApp: OAuthApp; } export interface CreateOAuthAppResponse { /** Created OAuth app info. */ oAuthApp?: OAuthApp; } export interface GetOAuthAppRequest { /** ID of the OAuth app to retrieve. */ oAuthAppId: string; } export interface GetOAuthAppResponse { /** Retrieved OAuth app info. */ oAuthApp?: OAuthApp; } export interface UpdateOAuthAppRequest { /** Updated OAuth app details. May include some or all fields. */ oAuthApp: OAuthApp; /** Explicit list of fields to update. Only fields listed are updated. */ mask: string[]; } export interface UpdateOAuthAppResponse { /** Updated OAuth app info. */ oAuthApp?: OAuthApp; } export interface DeleteOAuthAppRequest { /** ID of the OAuth app to delete. */ oAuthAppId?: string; } export interface DeleteOAuthAppResponse { } export interface QueryOAuthAppsRequest { /** Query options. */ query?: PlatformQuery; } export interface PlatformQuery extends PlatformQueryPagingMethodOneOf { /** 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` */ filter?: Record | null; /** * Sort object in the following format: * `[{"fieldName":"name","order":"ASC"},{"fieldName":"created_date","order":"DESC"}]` */ sort?: Sorting[]; } /** @oneof */ export interface PlatformQueryPagingMethodOneOf { /** 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 QueryOAuthAppsResponse { /** List of OAuth apps matching the query. */ oAuthApps?: OAuthApp[]; /** Paging metadata. */ 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; }