UNPKG

splitwise-ts

Version:

A typed, fast, flexible SDK for Splitwise written in TypeScript

1,411 lines (1,390 loc) 190 kB
declare type addUserToGroup = operations['addUserToGroup']; declare abstract class AuthClient { /** * Getter for retrieving access token. */ abstract get accessToken(): string | null; /** * Requests an access token from the authentication provider. * @abstract * @returns {Promise<TokenEndpointResponse>} - A promise that resolves with the token endpoint response. */ abstract requestAccessToken(): Promise<UseAuthResponse>; } export declare class Client { #private; constructor(auth: AuthClient); readonly users: { /** * @name getCurrentUser * */ getCurrentUser: () => Promise<{ user?: { id?: number; first_name?: string; last_name?: string | null; email?: string; registration_status?: "confirmed" | "dummy" | "invited"; picture?: { small?: string; medium?: string; large?: string; }; custom_picture?: boolean; } & { notifications_read?: string; notifications_count?: number; notifications?: { [key: string]: boolean; }; default_currency?: string; locale?: string; }; }>; /** * @name getUser * * @param id * */ getUser: (id: string) => Promise<{ user?: { id?: number; first_name?: string; last_name?: string | null; email?: string; registration_status?: "confirmed" | "dummy" | "invited"; picture?: { small?: string; medium?: string; large?: string; }; custom_picture?: boolean; }; }>; /** * @name updateUser * * @param id * */ updateUser: (id: string, request_body: OperationRequestBodyContent<updateUser>) => Promise<{ id?: number; first_name?: string; last_name?: string | null; email?: string; registration_status?: "confirmed" | "dummy" | "invited"; picture?: { small?: string; medium?: string; large?: string; }; custom_picture?: boolean; }>; }; readonly groups: { /** * @name getGroups * */ getGroups: () => Promise<{ groups?: { id?: number; name?: string; group_type?: "home" | "trip" | "couple" | "other" | "apartment" | "house"; updated_at?: string; simplify_by_default?: boolean; members?: ({ id?: number; first_name?: string; last_name?: string | null; email?: string; registration_status?: "confirmed" | "dummy" | "invited"; picture?: { small?: string; medium?: string; large?: string; }; custom_picture?: boolean; } & { balance?: { currency_code?: string; amount?: string; }[]; })[]; original_debts?: { from?: number; to?: number; amount?: string; currency_code?: string; }[]; simplified_debts?: { from?: number; to?: number; amount?: string; currency_code?: string; }[]; avatar?: { original?: string | null; xxlarge?: string; xlarge?: string; large?: string; medium?: string; small?: string; }; custom_avatar?: boolean; cover_photo?: { xxlarge?: string; xlarge?: string; }; invite_link?: string; }[]; }>; /** * @name getGroup * * @param id * */ getGroup: (id: string) => Promise<{ group?: { id?: number; name?: string; group_type?: "home" | "trip" | "couple" | "other" | "apartment" | "house"; updated_at?: string; simplify_by_default?: boolean; members?: ({ id?: number; first_name?: string; last_name?: string | null; email?: string; registration_status?: "confirmed" | "dummy" | "invited"; picture?: { small?: string; medium?: string; large?: string; }; custom_picture?: boolean; } & { balance?: { currency_code?: string; amount?: string; }[]; })[]; original_debts?: { from?: number; to?: number; amount?: string; currency_code?: string; }[]; simplified_debts?: { from?: number; to?: number; amount?: string; currency_code?: string; }[]; avatar?: { original?: string | null; xxlarge?: string; xlarge?: string; large?: string; medium?: string; small?: string; }; custom_avatar?: boolean; cover_photo?: { xxlarge?: string; xlarge?: string; }; invite_link?: string; }; }>; /** * @name createGroup * */ createGroup: (request_body: OperationRequestBodyContent<createGroup>) => Promise<{ group?: { id?: number; name?: string; group_type?: "home" | "trip" | "couple" | "other" | "apartment" | "house"; updated_at?: string; simplify_by_default?: boolean; members?: ({ id?: number; first_name?: string; last_name?: string | null; email?: string; registration_status?: "confirmed" | "dummy" | "invited"; picture?: { small?: string; medium?: string; large?: string; }; custom_picture?: boolean; } & { balance?: { currency_code?: string; amount?: string; }[]; })[]; original_debts?: { from?: number; to?: number; amount?: string; currency_code?: string; }[]; simplified_debts?: { from?: number; to?: number; amount?: string; currency_code?: string; }[]; avatar?: { original?: string | null; xxlarge?: string; xlarge?: string; large?: string; medium?: string; small?: string; }; custom_avatar?: boolean; cover_photo?: { xxlarge?: string; xlarge?: string; }; invite_link?: string; }; }>; /** * @name deleteGroup * * @param id * */ deleteGroup: (id: string) => Promise<{ success?: boolean; }>; /** * @name unDeleteGroup * * @param id * */ unDeleteGroup: (id: string) => Promise<{ success?: boolean; errors?: string[]; }>; /** * @name addUserToGroup * */ addUserToGroup: (request_body: OperationRequestBodyContent<addUserToGroup>) => Promise<{ success?: boolean; user?: { id?: number; first_name?: string; last_name?: string | null; email?: string; registration_status?: "confirmed" | "dummy" | "invited"; picture?: { small?: string; medium?: string; large?: string; }; custom_picture?: boolean; }; errors?: { [key: string]: string[]; }; }>; /** * @name removeUserFromGroup * */ removeUserFromGroup: (request_body: OperationRequestBodyContent<removeUserFromGroup>) => Promise<{ success?: boolean; errors?: { [key: string]: string[]; }; }>; }; readonly friends: { /** * @name getFriends * */ getFriends: () => Promise<{ friends?: (({ id?: number; first_name?: string; last_name?: string | null; email?: string; registration_status?: "confirmed" | "dummy" | "invited"; picture?: { small?: string; medium?: string; large?: string; }; custom_picture?: boolean; } & { groups?: { group_id?: number; balance?: { currency_code?: string; amount?: string; }[]; }[]; balance?: { currency_code?: string; amount?: string; }[]; updated_at?: string; }) & unknown)[]; }>; /** * @name getFriend * * @param id User ID of the friend * */ getFriend: (id: string) => Promise<{ friend?: { id?: number; first_name?: string; last_name?: string | null; email?: string; registration_status?: "confirmed" | "dummy" | "invited"; picture?: { small?: string; medium?: string; large?: string; }; custom_picture?: boolean; } & { groups?: { group_id?: number; balance?: { currency_code?: string; amount?: string; }[]; }[]; balance?: { currency_code?: string; amount?: string; }[]; updated_at?: string; }; }>; /** * @name createFriend * */ createFriend: (request_body: OperationRequestBodyContent<createFriend>) => Promise<{ friend?: { id?: number; first_name?: string; last_name?: string | null; email?: string; registration_status?: "confirmed" | "dummy" | "invited"; picture?: { small?: string; medium?: string; large?: string; }; custom_picture?: boolean; } & { groups?: { group_id?: number; balance?: { currency_code?: string; amount?: string; }[]; }[]; balance?: { currency_code?: string; amount?: string; }[]; updated_at?: string; }; }>; /** * @name createFriends * */ createFriends: (request_body: OperationRequestBodyContent<createFriends>) => Promise<{ users?: (({ id?: number; first_name?: string; last_name?: string | null; email?: string; registration_status?: "confirmed" | "dummy" | "invited"; picture?: { small?: string; medium?: string; large?: string; }; custom_picture?: boolean; } & { groups?: { group_id?: number; balance?: { currency_code?: string; amount?: string; }[]; }[]; balance?: { currency_code?: string; amount?: string; }[]; updated_at?: string; }) & unknown)[]; errors?: { [key: string]: string[]; }; }>; /** * @name deleteFriend * * @param id User ID of the friend * */ deleteFriend: (id: string) => Promise<{ success?: boolean; errors?: { [key: string]: string[]; }; }>; }; readonly expenses: { /** * @name getExpense * * @param id * */ getExpense: (id: string) => Promise<{ expense?: { cost?: string; description?: string; details?: string | null; date?: string; repeat_interval?: "never" | "weekly" | "fortnightly" | "monthly" | "yearly"; currency_code?: string; category_id?: number; } & { id?: number; group_id?: number | null; friendship_id?: number | null; expense_bundle_id?: number | null; description?: string; repeats?: boolean; repeat_interval?: "never" | "weekly" | "fortnightly" | "monthly" | "yearly"; email_reminder?: boolean; email_reminder_in_advance?: null | -1 | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 14; next_repeat?: string | null; details?: string | null; comments_count?: number; payment?: boolean; transaction_confirmed?: boolean; cost?: string; currency_code?: string; repayments?: { from?: number; to?: number; amount?: string; }[]; date?: string; created_at?: string; created_by?: { id?: number; first_name?: string; last_name?: string | null; email?: string; registration_status?: "confirmed" | "dummy" | "invited"; picture?: { small?: string; medium?: string; large?: string; }; custom_picture?: boolean; } & unknown; updated_at?: string; updated_by?: { id?: number; first_name?: string; last_name?: string | null; email?: string; registration_status?: "confirmed" | "dummy" | "invited"; picture?: { small?: string; medium?: string; large?: string; }; custom_picture?: boolean; } & unknown; deleted_at?: string | null; deleted_by?: { id?: number; first_name?: string; last_name?: string | null; email?: string; registration_status?: "confirmed" | "dummy" | "invited"; picture?: { small?: string; medium?: string; large?: string; }; custom_picture?: boolean; } & unknown; category?: { id?: number; name?: string; }; receipt?: { large?: string | null; original?: string | null; }; users?: { user?: { id?: number; first_name?: string; last_name?: string; picture?: { medium?: string; }; }; user_id?: number; paid_share?: string; owed_share?: string; net_balance?: string; }[]; comments?: { id?: number; content?: string; comment_type?: "System" | "User"; relation_type?: "ExpenseComment"; relation_id?: number; created_at?: string; deleted_at?: string | null; user?: { id?: number; first_name?: string; last_name?: string; picture?: { medium?: string; }; }; }[]; }; }>; /** * @name getExpenses * */ getExpenses: (params: OperationQueryParams<getExpenses>) => Promise<{ expenses?: ({ cost?: string; description?: string; details?: string | null; date?: string; repeat_interval?: "never" | "weekly" | "fortnightly" | "monthly" | "yearly"; currency_code?: string; category_id?: number; } & { id?: number; group_id?: number | null; friendship_id?: number | null; expense_bundle_id?: number | null; description?: string; repeats?: boolean; repeat_interval?: "never" | "weekly" | "fortnightly" | "monthly" | "yearly"; email_reminder?: boolean; email_reminder_in_advance?: null | -1 | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 14; next_repeat?: string | null; details?: string | null; comments_count?: number; payment?: boolean; transaction_confirmed?: boolean; cost?: string; currency_code?: string; repayments?: { from?: number; to?: number; amount?: string; }[]; date?: string; created_at?: string; created_by?: { id?: number; first_name?: string; last_name?: string | null; email?: string; registration_status?: "confirmed" | "dummy" | "invited"; picture?: { small?: string; medium?: string; large?: string; }; custom_picture?: boolean; } & unknown; updated_at?: string; updated_by?: { id?: number; first_name?: string; last_name?: string | null; email?: string; registration_status?: "confirmed" | "dummy" | "invited"; picture?: { small?: string; medium?: string; large?: string; }; custom_picture?: boolean; } & unknown; deleted_at?: string | null; deleted_by?: { id?: number; first_name?: string; last_name?: string | null; email?: string; registration_status?: "confirmed" | "dummy" | "invited"; picture?: { small?: string; medium?: string; large?: string; }; custom_picture?: boolean; } & unknown; category?: { id?: number; name?: string; }; receipt?: { large?: string | null; original?: string | null; }; users?: { user?: { id?: number; first_name?: string; last_name?: string; picture?: { medium?: string; }; }; user_id?: number; paid_share?: string; owed_share?: string; net_balance?: string; }[]; comments?: { id?: number; content?: string; comment_type?: "System" | "User"; relation_type?: "ExpenseComment"; relation_id?: number; created_at?: string; deleted_at?: string | null; user?: { id?: number; first_name?: string; last_name?: string; picture?: { medium?: string; }; }; }[]; })[]; }>; /** * @name createExpense * */ createExpense: (request_body: OperationRequestBodyContent<createExpense>) => Promise<{ expenses?: ({ cost?: string; description?: string; details?: string | null; date?: string; repeat_interval?: "never" | "weekly" | "fortnightly" | "monthly" | "yearly"; currency_code?: string; category_id?: number; } & { id?: number; group_id?: number | null; friendship_id?: number | null; expense_bundle_id?: number | null; description?: string; repeats?: boolean; repeat_interval?: "never" | "weekly" | "fortnightly" | "monthly" | "yearly"; email_reminder?: boolean; email_reminder_in_advance?: null | -1 | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 14; next_repeat?: string | null; details?: string | null; comments_count?: number; payment?: boolean; transaction_confirmed?: boolean; cost?: string; currency_code?: string; repayments?: { from?: number; to?: number; amount?: string; }[]; date?: string; created_at?: string; created_by?: { id?: number; first_name?: string; last_name?: string | null; email?: string; registration_status?: "confirmed" | "dummy" | "invited"; picture?: { small?: string; medium?: string; large?: string; }; custom_picture?: boolean; } & unknown; updated_at?: string; updated_by?: { id?: number; first_name?: string; last_name?: string | null; email?: string; registration_status?: "confirmed" | "dummy" | "invited"; picture?: { small?: string; medium?: string; large?: string; }; custom_picture?: boolean; } & unknown; deleted_at?: string | null; deleted_by?: { id?: number; first_name?: string; last_name?: string | null; email?: string; registration_status?: "confirmed" | "dummy" | "invited"; picture?: { small?: string; medium?: string; large?: string; }; custom_picture?: boolean; } & unknown; category?: { id?: number; name?: string; }; receipt?: { large?: string | null; original?: string | null; }; users?: { user?: { id?: number; first_name?: string; last_name?: string; picture?: { medium?: string; }; }; user_id?: number; paid_share?: string; owed_share?: string; net_balance?: string; }[]; comments?: { id?: number; content?: string; comment_type?: "System" | "User"; relation_type?: "ExpenseComment"; relation_id?: number; created_at?: string; deleted_at?: string | null; user?: { id?: number; first_name?: string; last_name?: string; picture?: { medium?: string; }; }; }[]; })[]; errors?: Record<string, never>; }>; /** * @name updateExpense * * @param id ID of the expense to update * */ updateExpense: (id: string, request_body: OperationRequestBodyContent<updateExpense>) => Promise<{ expenses?: ({ cost?: string; description?: string; details?: string | null; date?: string; repeat_interval?: "never" | "weekly" | "fortnightly" | "monthly" | "yearly"; currency_code?: string; category_id?: number; } & { id?: number; group_id?: number | null; friendship_id?: number | null; expense_bundle_id?: number | null; description?: string; repeats?: boolean; repeat_interval?: "never" | "weekly" | "fortnightly" | "monthly" | "yearly"; email_reminder?: boolean; email_reminder_in_advance?: null | -1 | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 14; next_repeat?: string | null; details?: string | null; comments_count?: number; payment?: boolean; transaction_confirmed?: boolean; cost?: string; currency_code?: string; repayments?: { from?: number; to?: number; amount?: string; }[]; date?: string; created_at?: string; created_by?: { id?: number; first_name?: string; last_name?: string | null; email?: string; registration_status?: "confirmed" | "dummy" | "invited"; picture?: { small?: string; medium?: string; large?: string; }; custom_picture?: boolean; } & unknown; updated_at?: string; updated_by?: { id?: number; first_name?: string; last_name?: string | null; email?: string; registration_status?: "confirmed" | "dummy" | "invited"; picture?: { small?: string; medium?: string; large?: string; }; custom_picture?: boolean; } & unknown; deleted_at?: string | null; deleted_by?: { id?: number; first_name?: string; last_name?: string | null; email?: string; registration_status?: "confirmed" | "dummy" | "invited"; picture?: { small?: string; medium?: string; large?: string; }; custom_picture?: boolean; } & unknown; category?: { id?: number; name?: string; }; receipt?: { large?: string | null; original?: string | null; }; users?: { user?: { id?: number; first_name?: string; last_name?: string; picture?: { medium?: string; }; }; user_id?: number; paid_share?: string; owed_share?: string; net_balance?: string; }[]; comments?: { id?: number; content?: string; comment_type?: "System" | "User"; relation_type?: "ExpenseComment"; relation_id?: number; created_at?: string; deleted_at?: string | null; user?: { id?: number; first_name?: string; last_name?: string; picture?: { medium?: string; }; }; }[]; })[]; errors?: Record<string, never>; }>; /** * @name deleteExpense * * @param id ID of the expense to delete * */ deleteExpense: (id: string) => Promise<{ success: boolean; errors?: Record<string, never>; }>; /** * @name unDeleteExpense * * @param id ID of the expense to restore * */ unDeleteExpense: (id: string) => Promise<{ success?: boolean; }>; }; readonly comments: { /** * @name getComments * */ getComments: (params: OperationQueryParams<getComments>) => Promise<{ comments?: { id?: number; content?: string; comment_type?: "System" | "User"; relation_type?: "ExpenseComment"; relation_id?: number; created_at?: string; deleted_at?: string | null; user?: { id?: number; first_name?: string; last_name?: string; picture?: { medium?: string; }; }; }[]; }>; /** * @name createComment * */ createComment: (request_body: OperationRequestBodyContent<createComment>) => Promise<{ comment?: { id?: number; content?: string; comment_type?: "System" | "User"; relation_type?: "ExpenseComment"; relation_id?: number; created_at?: string; deleted_at?: string | null; user?: { id?: number; first_name?: string; last_name?: string; picture?: { medium?: string; }; }; } & { relation_id?: unknown; comment_type?: unknown; content?: unknown; user?: { id?: number; first_name?: string; last_name?: string; picture?: { medium?: string; }; }; }; }>; /** * @name deleteComment * * @param id * */ deleteComment: (id: string) => Promise<{ comment?: { id?: number; content?: string; comment_type?: "System" | "User"; relation_type?: "ExpenseComment"; relation_id?: number; created_at?: string; deleted_at?: string | null; user?: { id?: number; first_name?: string; last_name?: string; picture?: { medium?: string; }; }; } & { comment_type?: unknown; content?: unknown; user?: { id?: number; first_name?: string; last_name?: string; picture?: { medium?: string; }; }; }; }>; }; readonly notifications: { /** * @name getNotifications * */ getNotifications: (params: OperationQueryParams<getNotifications>) => Promise<{ notifications?: { id?: number; type?: number; created_at?: string; created_by?: number; source?: { type?: string; id?: number; url?: string | null; } | null; image_url?: string; image_shape?: "square" | "circle"; content?: string; }[]; }>; }; readonly other: { /** * @name getCurrencies * */ getCurrencies: () => Promise<{ currencies?: { currency_code?: string; unit?: string; }[]; }>; /** * @name getCategories * */ getCategories: () => Promise<{ categories?: ({ id?: number; name?: string; icon?: string; icon_types?: { slim?: { small?: string; large?: string; }; square?: { large?: string; xlarge?: string; }; }; } & { id?: unknown; name?: unknown; subcategories?: { id?: number; name?: string; icon?: string; icon_types?: { slim?: { small?: string; large?: string; }; square?: { large?: string; xlarge?: string; }; }; }[]; })[]; }>; }; } declare type createComment = operations['createComment']; declare type createExpense = operations['createExpense']; declare type createFriend = operations['createFriend']; declare type createFriends = operations['createFriends']; declare type createGroup = operations['createGroup']; /** Find first match of multiple keys */ declare type FilterKeys<Obj, Matchers> = Obj[keyof Obj & Matchers]; declare type getComments = operations['getComments']; declare type getExpenses = operations['getExpenses']; declare type getNotifications = operations['getNotifications']; /** Resolve to `true` if request body is optional, else `false` */ declare type IsOperationRequestBodyOptional<T> = RequiredKeysOf<PickRequestBody<T>> extends never ? true : false; /** Return any `[string]/[string]` media type (important because openapi-fetch allows any content response, not just JSON-like) */ declare type MediaType = `${string}/${string}`; declare type NestedRecord = Record<string, Primitive>; export declare class OAuth2User implements AuthClient { #private; protected token?: string; constructor(credentials: OAuthCredentials); get accessToken(): string | null; requestAccessToken(): Promise<UseAuthResponse>; } declare type OAuthCredentials = { /** * The consumer key obtained from the Splitwise dashboard. * Used for authenticating API requests via OAuth. */ clientId: string; /** * The consumer secret obtained from the Splitwise dashboard. * Used in conjunction with the consumer key for OAuth authentication. */ clientSecret: string; }; declare type OperationQueryParams<T> = 'parameters' extends keyof T ? 'query' extends keyof T['parameters'] ? T['parameters']['query'] : never : never; /** Return type of `requestBody` for an Operation Object */ declare type OperationRequestBody<T> = "requestBody" extends keyof T ? T["requestBody"] : never; /** Return first `content` from a Request Object Mapping, allowing any media type */ declare type OperationRequestBodyContent<T> = FilterKeys<OperationRequestBodyMediaContent<T>, MediaType> extends never ? FilterKeys<NonNullable<OperationRequestBodyMediaContent<T>>, MediaType> | undefined : FilterKeys<OperationRequestBodyMediaContent<T>, MediaType>; /** Internal helper used in OperationRequestBodyContent */ declare type OperationRequestBodyMediaContent<T> = IsOperationRequestBodyOptional<T> extends true ? ResponseContent<NonNullable<OperationRequestBody<T>>> | undefined : ResponseContent<OperationRequestBody<T>>; declare interface operations { getCurrentUser: { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; requestBody?: never; responses: { /** @description OK */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": { user?: { id?: number; /** @example Ada */ first_name?: string; /** @example Lovelace */ last_name?: string | null; /** @example ada@example.com */ email?: string; /** @enum {string} */ registration_status?: "confirmed" | "dummy" | "invited"; picture?: { small?: string; medium?: string; large?: string; }; /** @example false */ custom_picture?: boolean; } & { /** * @description ISO 8601 date/time indicating the last time notifications were read * @example 2017-06-02T20:21:57Z */ notifications_read?: string; /** * @description Number of unread notifications since notifiations_read * @example 12 */ notifications_count?: number; /** * @description User's notification preferences * @example { * "added_as_friend": true * } */ notifications?: { [key: string]: boolean; }; /** @example USD */ default_currency?: string; /** * @description ISO_639-1 2-letter locale code * @example en */ locale?: string; }; }; }; }; /** @description Invalid API key or OAuth access token */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { /** @example Invalid API request: you are not logged in */ error?: string; }; }; }; }; }; getUser: { parameters: { query?: never; header?: never; path: { id: number; }; cookie?: never; }; requestBody?: never; responses: { /** @description OK */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": { user?: { id?: number; /** @example Ada */ first_name?: string; /** @example Lovelace */ last_name?: string | null; /** @example ada@example.com */ email?: string; /** @enum {string} */ registration_status?: "confirmed" | "dummy" | "invited"; picture?: { small?: string; medium?: string; large?: string; }; /** @example false */ custom_picture?: boolean; }; }; }; }; /** @description Invalid API key or OAuth access token */ 401: { headers: { [name: string]: unknown; }; content: { "application/json": { /** @example Invalid API request: you are not logged in */ error?: string; }; }; }; /** @description Forbidden */ 403: { headers: { [name: string]: unknown; }; content: { "application/json": { errors?: { base?: string[]; }; }; }; }; /** @description Not Found */ 404: { headers: { [name: string]: unknown; }; content: { "application/json": { errors?: { base?: string[]; }; }; }; }; }; }; updateUser: { parameters: { query?: never; header?: never; path: { id: number; }; cookie?: never; }; requestBody: { content: { "application/json": { first_name?: string; last_name?: string; email?: string; password?: string; locale?: string; default_currency?: string; }; }; }; responses: { /** @description OK */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": { id?: number; /** @example Ada */ first_name?: string; /** @example Lovelace */ last_name?: string | null; /** @example ada@example.com */ email?: string; /** @enum {string} */ registration_status?: "confirmed" | "dummy" | "invited"; picture?: { small?: string; medium?: string; large?: string; }; /** @example false */ custom_picture?: boolean; }; }; }; /** @description Invalid API key or OAuth access token */ 401: { headers: { [name: string]: unknown; }; content: { "application/json":