export {} type AtLeast = Partial & Pick declare global { interface AccessToken { access_token: string expires_in: number token_type: string } interface CachedAccessToken { payload: import('jsonwebtoken').JwtPayload token: AccessToken } // type ApiCallType = keyof(typeof apiCallTypes) type ApiCallOptions = { method: 'GET' | 'POST' } type CryptrOptions = { server_url: string client_id: string client_secret: string tenant_domain: string grant_type: 'client_credentials' environment: 'development' | 'production' persist_token: boolean | string } type Address = { country: string formatted: string locality: string postal_code: string region: string street_address: string } type UserProfile = { email: string birthdate: string phone_number: string given_name: string family_name: string nickname: string profile: string picture: string website: string gender: string zoneinfo: string locale: string address: Address } type User = { __access__: string __domain__: string __environment__: string __managed_by__: string __type__: string id: string metadata: any[] profile: UserProfile } type Organization = { __type__: string country_name: string domain: string id: string inserted_at: string locality: string name: string privacy_policy_url: string state: string terms_of_service_url: string updated_at: string } type CollectionList = { __type__: 'List' data: T[] paginate: { current_page: number next_page: number per_page: number prev_page: number total_pages: number } total_count: number } type Collections = { User: { create: Partial> & { profile: AtLeast } update: Partial get: User list: CollectionList } Organization: { create: AtLeast update: Partial get: Organization list: CollectionList } } type AnyCollection = | Collections['User'] | Collections['Organization'] }