repo_name
string
dataset
string
owner
string
lang
string
func_name
string
code
string
docstring
string
url
string
sha
string
Panora
github_2023
panoratech
typescript
SyncService.kickstartSync
async kickstartSync(id_project?: string) { try { const linkedUsers = await this.prisma.linked_users.findMany({ where: { id_project: id_project, }, }); linkedUsers.map(async (linkedUser) => { try { const providers = FILESTORAGE_PROVIDERS; for (const provider of providers) { try { await this.syncForLinkedUser({ integrationId: provider, linkedUserId: linkedUser.id_linked_user, }); } catch (error) { throw error; } } } catch (error) { throw error; } }); } catch (error) { throw error; } }
// every 8 hours
https://github.com/panoratech/Panora/blob/c6741e9ef154bf215bcd7a6a4cc51522eae7c7f2/packages/api/src/filestorage/group/sync/sync.service.ts#L42-L69
c6741e9ef154bf215bcd7a6a4cc51522eae7c7f2
Panora
github_2023
panoratech
typescript
SyncService.saveToDb
async saveToDb( connection_id: string, linkedUserId: string, permissions: UnifiedFilestoragePermissionOutput[], originSource: string, remote_data: Record<string, any>[], extra?: { object_name: 'file' | 'folder'; value: string; }, ): Promise<FileStoragePermission[]> { try { const permissions_results: FileStoragePermission[] = []; const updateOrCreatePermission = async ( permission: UnifiedFilestoragePermissionOutput, originId: string, extra: { object_name: 'file' | 'folder'; value: string }, ) => { let existingPermission; if (!originId) { if (extra.object_name === 'file') { const file = await this.prisma.fs_files.findUnique({ where: { id_fs_file: extra.value, }, }); if (file?.id_fs_permissions?.length > 0) { existingPermission = await this.prisma.fs_permissions.findMany({ where: { id_fs_permission: { in: file.id_fs_permissions, }, }, }); } } else { const folder = await this.prisma.fs_folders.findUnique({ where: { id_fs_folder: extra.value, }, }); if (folder?.id_fs_permissions?.length > 0) { existingPermission = await this.prisma.fs_permissions.findMany({ where: { id_fs_permission: { in: folder.id_fs_permissions, }, }, }); } } } else { existingPermission = await this.prisma.fs_permissions.findFirst({ where: { remote_id: originId, id_connection: connection_id, }, }); } const baseData: any = { roles: permission.roles ?? null, type: permission.type ?? null, user: permission.user_id ?? null, group: permission.group_id ?? null, modified_at: new Date(), }; if (existingPermission) { return await this.prisma.fs_permissions.update({ where: { id_fs_permission: existingPermission.id_fs_permission, }, data: baseData, }); } else { return await this.prisma.fs_permissions.create({ data: { ...baseData, id_fs_permission: uuidv4(), created_at: new Date(), remote_id: originId ?? null, id_connection: connection_id, }, }); } }; for (let i = 0; i < permissions.length; i++) { const permission = permissions[i]; const originId = permission.remote_id; const res = await updateOrCreatePermission(permission, originId, extra); const permission_id = res.id_fs_permission; permissions_results.push(res); // Process field mappings await this.ingestService.processFieldMappings( permission.field_mappings, permission_id, originSource, linkedUserId, ); // Process remote data await this.ingestService.processRemoteData( permission_id, remote_data[i], ); } return permissions_results; } catch (error) { throw error; } }
// permissions are synced within file, folders, users, groups
https://github.com/panoratech/Panora/blob/c6741e9ef154bf215bcd7a6a4cc51522eae7c7f2/packages/api/src/filestorage/permission/sync/sync.service.ts#L43-L159
c6741e9ef154bf215bcd7a6a4cc51522eae7c7f2
Panora
github_2023
panoratech
typescript
SyncService.onModuleInit
onModuleInit() { return; }
// syncs are performed within File/Folder objects so its not useful to do it here
https://github.com/panoratech/Panora/blob/c6741e9ef154bf215bcd7a6a4cc51522eae7c7f2/packages/api/src/filestorage/sharedlink/sync/sync.service.ts#L33-L35
c6741e9ef154bf215bcd7a6a4cc51522eae7c7f2
Panora
github_2023
panoratech
typescript
OnedriveService.sync
async sync(data: SyncParam): Promise<ApiResponse<OnedriveUserOutput[]>> { try { const { linkedUserId } = data; const connection = await this.prisma.connections.findFirst({ where: { id_linked_user: linkedUserId, provider_slug: 'onedrive', vertical: 'filestorage', }, }); const config: AxiosRequestConfig = { method: 'get', url: `${connection.account_url}/v1.0/users`, headers: { 'Content-Type': 'application/json', Authorization: `Bearer ${this.cryptoService.decrypt( connection.access_token, )}`, }, }; const resp: AxiosResponse = await this.makeRequestWithRetry(config); const users: OnedriveUserOutput[] = resp.data.value; this.logger.log(`Synchronized OneDrive users successfully.`); return { data: users, message: 'OneDrive users retrieved successfully.', statusCode: 200, }; } catch (error: any) { this.logger.error( `Error syncing OneDrive users: ${error.message}`, error, OnedriveService.name, ); throw error; } }
/** * Synchronizes OneDrive users. * @param data - Synchronization parameters. * @returns API response with an array of OneDrive user outputs. */
https://github.com/panoratech/Panora/blob/c6741e9ef154bf215bcd7a6a4cc51522eae7c7f2/packages/api/src/filestorage/user/services/onedrive/index.ts#L35-L76
c6741e9ef154bf215bcd7a6a4cc51522eae7c7f2
Panora
github_2023
panoratech
typescript
OnedriveService.makeRequestWithRetry
private async makeRequestWithRetry( config: AxiosRequestConfig, ): Promise<AxiosResponse> { let attempts = 0; let backoff: number = this.INITIAL_BACKOFF_MS; while (attempts < this.MAX_RETRIES) { try { const response: AxiosResponse = await axios(config); return response; } catch (error: any) { attempts++; // Handle rate limiting (429) and server errors (500+) if ( (error.response && error.response.status === 429) || (error.response && error.response.status >= 500) || error.code === 'ECONNABORTED' || error.code === 'ETIMEDOUT' || error.response?.code === 'ETIMEDOUT' ) { const retryAfter = this.getRetryAfter( error.response?.headers['retry-after'], ); const delayTime: number = Math.max(retryAfter * 1000, backoff); this.logger.warn( `Request failed with ${ error.code || error.response?.status }. Retrying in ${delayTime}ms (Attempt ${attempts}/${ this.MAX_RETRIES })`, ); await this.delay(delayTime); backoff *= 2; // Exponential backoff continue; } // Handle other errors this.logger.error( `Request failed: ${error.message}`, error, OnedriveService.name, ); throw error; } } this.logger.error( 'Max retry attempts reached. Request failed.', OnedriveService.name, ); throw new Error('Max retry attempts reached.'); }
/** * Makes an HTTP request with retry logic for handling 500 and 429 errors. * @param config - Axios request configuration. * @returns Axios response. */
https://github.com/panoratech/Panora/blob/c6741e9ef154bf215bcd7a6a4cc51522eae7c7f2/packages/api/src/filestorage/user/services/onedrive/index.ts#L83-L137
c6741e9ef154bf215bcd7a6a4cc51522eae7c7f2
Panora
github_2023
panoratech
typescript
OnedriveService.getRetryAfter
private getRetryAfter(retryAfterHeader: string | undefined): number { if (!retryAfterHeader) { return 1; // Default to 1 second if header is missing } const retryAfterSeconds: number = parseInt(retryAfterHeader, 10); return isNaN(retryAfterSeconds) ? 1 : retryAfterSeconds; }
/** * Parses the Retry-After header to determine the wait time. * @param retryAfterHeader - Value of the Retry-After header. * @returns Retry delay in seconds. */
https://github.com/panoratech/Panora/blob/c6741e9ef154bf215bcd7a6a4cc51522eae7c7f2/packages/api/src/filestorage/user/services/onedrive/index.ts#L144-L151
c6741e9ef154bf215bcd7a6a4cc51522eae7c7f2
Panora
github_2023
panoratech
typescript
OnedriveService.delay
private delay(ms: number): Promise<void> { return new Promise((resolve) => setTimeout(resolve, ms)); }
/** * Delays execution for the specified duration. * @param ms - Duration in milliseconds. * @returns Promise that resolves after the delay. */
https://github.com/panoratech/Panora/blob/c6741e9ef154bf215bcd7a6a4cc51522eae7c7f2/packages/api/src/filestorage/user/services/onedrive/index.ts#L158-L160
c6741e9ef154bf215bcd7a6a4cc51522eae7c7f2
Panora
github_2023
panoratech
typescript
SyncService.kickstartSync
async kickstartSync(id_project?: string) { try { const linkedUsers = await this.prisma.linked_users.findMany({ where: { id_project: id_project, }, }); linkedUsers.map(async (linkedUser) => { try { const providers = FILESTORAGE_PROVIDERS; for (const provider of providers) { try { await this.syncForLinkedUser({ integrationId: provider, linkedUserId: linkedUser.id_linked_user, }); } catch (error) { throw error; } } } catch (error) { throw error; } }); } catch (error) { throw error; } }
// every 8 hours
https://github.com/panoratech/Panora/blob/c6741e9ef154bf215bcd7a6a4cc51522eae7c7f2/packages/api/src/filestorage/user/sync/sync.service.ts#L35-L62
c6741e9ef154bf215bcd7a6a4cc51522eae7c7f2
Panora
github_2023
panoratech
typescript
SyncService.kickstartSync
async kickstartSync(id_project?: string) { try { const linkedUsers = await this.prisma.linked_users.findMany({ where: { id_project: id_project, }, }); linkedUsers.map(async (linkedUser) => { try { const providers = TICKETING_PROVIDERS; for (const provider of providers) { try { await this.syncForLinkedUser({ integrationId: provider, linkedUserId: linkedUser.id_linked_user, }); } catch (error) { throw error; } } } catch (error) { throw error; } }); } catch (error) { throw error; } }
// every 8 hours
https://github.com/panoratech/Panora/blob/c6741e9ef154bf215bcd7a6a4cc51522eae7c7f2/packages/api/src/ticketing/account/sync/sync.service.ts#L38-L65
c6741e9ef154bf215bcd7a6a4cc51522eae7c7f2
Panora
github_2023
panoratech
typescript
SyncService.syncForLinkedUser
async syncForLinkedUser(data: SyncLinkedUserType) { try { const { integrationId, linkedUserId, wh_real_time_trigger } = data; const service: IAccountService = this.serviceRegistry.getService(integrationId); if (!service) { this.logger.log( `No service found in {vertical:ticketing, commonObject: account} for integration ID: ${integrationId}`, ); return; } await this.ingestService.syncForLinkedUser< UnifiedTicketingAccountOutput, OriginalAccountOutput, IAccountService >( integrationId, linkedUserId, 'ticketing', 'account', service, [], wh_real_time_trigger, ); } catch (error) { throw error; } }
//todo: HANDLE DATA REMOVED FROM PROVIDER
https://github.com/panoratech/Panora/blob/c6741e9ef154bf215bcd7a6a4cc51522eae7c7f2/packages/api/src/ticketing/account/sync/sync.service.ts#L68-L97
c6741e9ef154bf215bcd7a6a4cc51522eae7c7f2
Panora
github_2023
panoratech
typescript
AttachmentService.downloadAttachment
async downloadAttachment( id_ticketing_attachment: string, remote_data?: boolean, ): Promise<UnifiedTicketingAttachmentOutput> { return; }
//TODO
https://github.com/panoratech/Panora/blob/c6741e9ef154bf215bcd7a6a4cc51522eae7c7f2/packages/api/src/ticketing/attachment/services/attachment.service.ts#L373-L378
c6741e9ef154bf215bcd7a6a4cc51522eae7c7f2
Panora
github_2023
panoratech
typescript
SyncService.kickstartSync
async kickstartSync(id_project?: string) { return; }
// we only save to the db
https://github.com/panoratech/Panora/blob/c6741e9ef154bf215bcd7a6a4cc51522eae7c7f2/packages/api/src/ticketing/attachment/sync/sync.service.ts#L29-L31
c6741e9ef154bf215bcd7a6a4cc51522eae7c7f2
Panora
github_2023
panoratech
typescript
SyncService.kickstartSync
async kickstartSync(id_project?: string) { try { const linkedUsers = await this.prisma.linked_users.findMany({ where: { id_project: id_project, }, }); linkedUsers.map(async (linkedUser) => { try { const providers = TICKETING_PROVIDERS; for (const provider of providers) { try { await this.syncForLinkedUser({ integrationId: provider, linkedUserId: linkedUser.id_linked_user, }); } catch (error) { throw error; } } } catch (error) { throw error; } }); } catch (error) { throw error; } }
// every 8 hours
https://github.com/panoratech/Panora/blob/c6741e9ef154bf215bcd7a6a4cc51522eae7c7f2/packages/api/src/ticketing/collection/sync/sync.service.ts#L38-L65
c6741e9ef154bf215bcd7a6a4cc51522eae7c7f2
Panora
github_2023
panoratech
typescript
SyncService.syncForLinkedUser
async syncForLinkedUser(param: SyncLinkedUserType) { try { const { integrationId, linkedUserId } = param; const service: ICollectionService = this.serviceRegistry.getService(integrationId); if (!service) { this.logger.log( `No service found in {vertical:ticketing, commonObject: collection} for integration ID: ${integrationId}`, ); return; } await this.ingestService.syncForLinkedUser< UnifiedTicketingCollectionOutput, OriginalCollectionOutput, ICollectionService >(integrationId, linkedUserId, 'ticketing', 'collection', service, []); } catch (error) { throw error; } }
//todo: HANDLE DATA REMOVED FROM PROVIDER
https://github.com/panoratech/Panora/blob/c6741e9ef154bf215bcd7a6a4cc51522eae7c7f2/packages/api/src/ticketing/collection/sync/sync.service.ts#L68-L88
c6741e9ef154bf215bcd7a6a4cc51522eae7c7f2
Panora
github_2023
panoratech
typescript
SyncService.kickstartSync
async kickstartSync(id_project?: string) { try { const linkedUsers = await this.prisma.linked_users.findMany({ where: { id_project: id_project, }, }); linkedUsers.map(async (linkedUser) => { try { const providers = TICKETING_PROVIDERS; for (const provider of providers) { try { await this.syncForLinkedUser({ integrationId: provider, linkedUserId: linkedUser.id_linked_user, }); } catch (error) { throw error; } } } catch (error) { throw error; } }); } catch (error) { throw error; } }
// every 8 hours
https://github.com/panoratech/Panora/blob/c6741e9ef154bf215bcd7a6a4cc51522eae7c7f2/packages/api/src/ticketing/comment/sync/sync.service.ts#L39-L66
c6741e9ef154bf215bcd7a6a4cc51522eae7c7f2
Panora
github_2023
panoratech
typescript
SyncService.syncForLinkedUser
async syncForLinkedUser(data: SyncLinkedUserType) { try { const { integrationId, linkedUserId, id_ticket } = data; const service: ICommentService = this.serviceRegistry.getService(integrationId); if (!service) { this.logger.log( `No service found in {vertical:ticketing, commonObject: comment} for integration ID: ${integrationId}`, ); return; } await this.ingestService.syncForLinkedUser< UnifiedTicketingCommentOutput, OriginalCommentOutput, ICommentService >(integrationId, linkedUserId, 'ticketing', 'comment', service, [ { param: id_ticket, paramName: 'id_ticket', shouldPassToService: true, shouldPassToIngest: true, }, ]); } catch (error) { throw error; } }
//todo: HANDLE DATA REMOVED FROM PROVIDER
https://github.com/panoratech/Panora/blob/c6741e9ef154bf215bcd7a6a4cc51522eae7c7f2/packages/api/src/ticketing/comment/sync/sync.service.ts#L69-L96
c6741e9ef154bf215bcd7a6a4cc51522eae7c7f2
Panora
github_2023
panoratech
typescript
SyncService.kickstartSync
async kickstartSync(id_project?: string) { try { const linkedUsers = await this.prisma.linked_users.findMany({ where: { id_project: id_project, }, }); linkedUsers.map(async (linkedUser) => { try { const providers = TICKETING_PROVIDERS; for (const provider of providers) { try { await this.syncForLinkedUser({ integrationId: provider, linkedUserId: linkedUser.id_linked_user, }); } catch (error) { throw error; } } } catch (error) { throw error; } }); } catch (error) { throw error; } }
// every 8 hours
https://github.com/panoratech/Panora/blob/c6741e9ef154bf215bcd7a6a4cc51522eae7c7f2/packages/api/src/ticketing/contact/sync/sync.service.ts#L38-L65
c6741e9ef154bf215bcd7a6a4cc51522eae7c7f2
Panora
github_2023
panoratech
typescript
SyncService.syncForLinkedUser
async syncForLinkedUser(data: SyncLinkedUserType) { try { const { integrationId, linkedUserId, account_id, wh_real_time_trigger } = data; const service: IContactService = this.serviceRegistry.getService(integrationId); if (!service) { this.logger.log( `No service found in {vertical:ticketing, commonObject: contact} for integration ID: ${integrationId}`, ); return; } await this.ingestService.syncForLinkedUser< UnifiedTicketingContactOutput, OriginalContactOutput, IContactService >( integrationId, linkedUserId, 'ticketing', 'contact', service, [], wh_real_time_trigger, ); } catch (error) { throw error; } }
//todo: HANDLE DATA REMOVED FROM PROVIDER
https://github.com/panoratech/Panora/blob/c6741e9ef154bf215bcd7a6a4cc51522eae7c7f2/packages/api/src/ticketing/contact/sync/sync.service.ts#L68-L98
c6741e9ef154bf215bcd7a6a4cc51522eae7c7f2
Panora
github_2023
panoratech
typescript
SyncService.kickstartSync
async kickstartSync(id_project?: string) { try { const linkedUsers = await this.prisma.linked_users.findMany({ where: { id_project: id_project, }, }); linkedUsers.map(async (linkedUser) => { try { const providers = TICKETING_PROVIDERS; for (const provider of providers) { try { await this.syncForLinkedUser({ integrationId: provider, linkedUserId: linkedUser.id_linked_user, }); } catch (error) { throw error; } } } catch (error) { throw error; } }); } catch (error) { throw error; } }
// every 8 hours
https://github.com/panoratech/Panora/blob/c6741e9ef154bf215bcd7a6a4cc51522eae7c7f2/packages/api/src/ticketing/tag/sync/sync.service.ts#L45-L72
c6741e9ef154bf215bcd7a6a4cc51522eae7c7f2
Panora
github_2023
panoratech
typescript
SyncService.syncForLinkedUser
async syncForLinkedUser(data: SyncLinkedUserType) { try { const { integrationId, linkedUserId, id_ticket } = data; const service: ITagService = this.serviceRegistry.getService(integrationId); if (!service) { this.logger.log( `No service found in {vertical:ticketing, commonObject: tag} for integration ID: ${integrationId}`, ); return; } await this.ingestService.syncForLinkedUser< UnifiedTicketingTagOutput, OriginalTagOutput, ITagService >(integrationId, linkedUserId, 'ticketing', 'tag', service, [ { param: id_ticket, paramName: 'id_ticket', shouldPassToService: true, shouldPassToIngest: true, }, ]); //TODO; do it in every file /*if (!sourceObject || sourceObject.length == 0) { this.logger.warn('Source object is empty, returning :) ....'); return; }*/ } catch (error) { throw error; } }
//todo: HANDLE DATA REMOVED FROM PROVIDER
https://github.com/panoratech/Panora/blob/c6741e9ef154bf215bcd7a6a4cc51522eae7c7f2/packages/api/src/ticketing/tag/sync/sync.service.ts#L75-L108
c6741e9ef154bf215bcd7a6a4cc51522eae7c7f2
Panora
github_2023
panoratech
typescript
SyncService.kickstartSync
async kickstartSync(id_project?: string) { try { const linkedUsers = await this.prisma.linked_users.findMany({ where: { id_project: id_project, }, }); linkedUsers.map(async (linkedUser) => { try { const providers = TICKETING_PROVIDERS; for (const provider of providers) { try { await this.syncForLinkedUser({ integrationId: provider, linkedUserId: linkedUser.id_linked_user, }); } catch (error) { throw error; } } } catch (error) { throw error; } }); } catch (error) { throw error; } }
// every 8 hours
https://github.com/panoratech/Panora/blob/c6741e9ef154bf215bcd7a6a4cc51522eae7c7f2/packages/api/src/ticketing/team/sync/sync.service.ts#L38-L65
c6741e9ef154bf215bcd7a6a4cc51522eae7c7f2
Panora
github_2023
panoratech
typescript
SyncService.syncForLinkedUser
async syncForLinkedUser(param: SyncLinkedUserType) { try { const { integrationId, linkedUserId } = param; const service: ITeamService = this.serviceRegistry.getService(integrationId); if (!service) { this.logger.log( `No service found in {vertical:ticketing, commonObject: team} for integration ID: ${integrationId}`, ); return; } await this.ingestService.syncForLinkedUser< UnifiedTicketingTeamOutput, OriginalTeamOutput, ITeamService >(integrationId, linkedUserId, 'ticketing', 'team', service, []); } catch (error) { throw error; } }
//todo: HANDLE DATA REMOVED FROM PROVIDER
https://github.com/panoratech/Panora/blob/c6741e9ef154bf215bcd7a6a4cc51522eae7c7f2/packages/api/src/ticketing/team/sync/sync.service.ts#L68-L88
c6741e9ef154bf215bcd7a6a4cc51522eae7c7f2
Panora
github_2023
panoratech
typescript
SyncService.kickstartSync
async kickstartSync(id_project?: string) { try { const linkedUsers = await this.prisma.linked_users.findMany({ where: { id_project: id_project, }, }); linkedUsers.map(async (linkedUser) => { try { const providers = TICKETING_PROVIDERS; for (const provider of providers) { try { await this.syncForLinkedUser({ integrationId: provider, linkedUserId: linkedUser.id_linked_user, }); } catch (error) { throw error; } } } catch (error) { throw error; } }); } catch (error) { throw error; } }
// every 8 hours
https://github.com/panoratech/Panora/blob/c6741e9ef154bf215bcd7a6a4cc51522eae7c7f2/packages/api/src/ticketing/ticket/sync/sync.service.ts#L41-L68
c6741e9ef154bf215bcd7a6a4cc51522eae7c7f2
Panora
github_2023
panoratech
typescript
SyncService.syncForLinkedUser
async syncForLinkedUser(param: SyncLinkedUserType) { try { const { integrationId, linkedUserId, wh_real_time_trigger } = param; const service: ITicketService = this.serviceRegistry.getService(integrationId); if (!service) { this.logger.log( `No service found in {vertical:ticketing, commonObject: ticket} for integration ID: ${integrationId}`, ); return; } await this.ingestService.syncForLinkedUser< UnifiedTicketingTicketOutput, OriginalTicketOutput, ITicketService >( integrationId, linkedUserId, 'ticketing', 'ticket', service, [], wh_real_time_trigger, ); } catch (error) { throw error; } }
//todo: HANDLE DATA REMOVED FROM PROVIDER
https://github.com/panoratech/Panora/blob/c6741e9ef154bf215bcd7a6a4cc51522eae7c7f2/packages/api/src/ticketing/ticket/sync/sync.service.ts#L71-L100
c6741e9ef154bf215bcd7a6a4cc51522eae7c7f2
Panora
github_2023
panoratech
typescript
SyncService.kickstartSync
async kickstartSync(id_project?: string) { try { const linkedUsers = await this.prisma.linked_users.findMany({ where: { id_project: id_project, }, }); linkedUsers.map(async (linkedUser) => { try { const providers = TICKETING_PROVIDERS; for (const provider of providers) { try { await this.syncForLinkedUser({ integrationId: provider, linkedUserId: linkedUser.id_linked_user, }); } catch (error) { throw error; } } } catch (error) { throw error; } }); } catch (error) { throw error; } }
// every 8 hours
https://github.com/panoratech/Panora/blob/c6741e9ef154bf215bcd7a6a4cc51522eae7c7f2/packages/api/src/ticketing/user/sync/sync.service.ts#L38-L65
c6741e9ef154bf215bcd7a6a4cc51522eae7c7f2
Panora
github_2023
panoratech
typescript
SyncService.syncForLinkedUser
async syncForLinkedUser(param: SyncLinkedUserType) { try { const { integrationId, linkedUserId, wh_real_time_trigger } = param; const service: IUserService = this.serviceRegistry.getService(integrationId); if (!service) { this.logger.log( `No service found in {vertical:ticketing, commonObject: user} for integration ID: ${integrationId}`, ); return; } await this.ingestService.syncForLinkedUser< UnifiedTicketingUserOutput, OriginalUserOutput, IUserService >( integrationId, linkedUserId, 'ticketing', 'user', service, [], wh_real_time_trigger, ); } catch (error) { throw error; } }
//todo: HANDLE DATA REMOVED FROM PROVIDER
https://github.com/panoratech/Panora/blob/c6741e9ef154bf215bcd7a6a4cc51522eae7c7f2/packages/api/src/ticketing/user/sync/sync.service.ts#L68-L96
c6741e9ef154bf215bcd7a6a4cc51522eae7c7f2
Panora
github_2023
panoratech
typescript
prependPrefixToEnumValues
const prependPrefixToEnumValues = (prefix: string, enumObj: any) => { return Object.values(enumObj).map(value => `${prefix}.${value}`); }
// Utility function to prepend prefix to enum values
https://github.com/panoratech/Panora/blob/c6741e9ef154bf215bcd7a6a4cc51522eae7c7f2/packages/shared/src/standardObjects.ts#L79-L81
c6741e9ef154bf215bcd7a6a4cc51522eae7c7f2
freechat
github_2023
freechat-fun
typescript
ServerConfiguration.setVariables
public setVariables(variableConfiguration: Partial<T>) { Object.assign(this.variableConfiguration, variableConfiguration); }
/** * Sets the value of the variables of this server. Variables are included in * the `url` of this ServerConfiguration in the form `{variableName}` * * @param variableConfiguration a partial variable configuration for the * variables contained in the url */
https://github.com/freechat-fun/freechat/blob/cb80c3708b85cf52c02a91bdc0c9e9ddc14856db/freechat-sdk/typescript/servers.ts#L23-L25
cb80c3708b85cf52c02a91bdc0c9e9ddc14856db
freechat
github_2023
freechat-fun
typescript
ServerConfiguration.makeRequestContext
public makeRequestContext(endpoint: string, httpMethod: HttpMethod): RequestContext { return new RequestContext(this.getUrl() + endpoint, httpMethod); }
/** * Creates a new request context for this server using the url with variables * replaced with their respective values and the endpoint of the request appended. * * @param endpoint the endpoint to be queried on the server * @param httpMethod httpMethod to be used * */
https://github.com/freechat-fun/freechat/blob/cb80c3708b85cf52c02a91bdc0c9e9ddc14856db/freechat-sdk/typescript/servers.ts#L47-L49
cb80c3708b85cf52c02a91bdc0c9e9ddc14856db
freechat
github_2023
freechat-fun
typescript
AIManagerForBizAdminApiRequestFactory.createOrUpdateAiModelInfo
public async createOrUpdateAiModelInfo(aiModelInfoUpdateDTO: AiModelInfoUpdateDTO, _options?: Configuration): Promise<RequestContext> { let _config = _options || this.configuration; // verify required parameter 'aiModelInfoUpdateDTO' is not null or undefined if (aiModelInfoUpdateDTO === null || aiModelInfoUpdateDTO === undefined) { throw new RequiredError("AIManagerForBizAdminApi", "createOrUpdateAiModelInfo", "aiModelInfoUpdateDTO"); } // Path Params const localVarPath = '/api/v2/biz/admin/ai/model'; // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.PUT); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") // Body Params const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); requestContext.setHeaderParam("Content-Type", contentType); const serializedBody = ObjectSerializer.stringify( ObjectSerializer.serialize(aiModelInfoUpdateDTO, "AiModelInfoUpdateDTO", ""), contentType ); requestContext.setBody(serializedBody); let authMethod: SecurityAuthentication | undefined; // Apply auth methods authMethod = _config.authMethods["bearerAuth"] if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default if (defaultAuth?.applySecurityAuthentication) { await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; }
/** * Create or update model information. If no modelId is passed or the modelId does not exist in the database, create a new one (keep the same modelId); otherwise update. Return modelId if successful. * Create or Update Model Information * @param aiModelInfoUpdateDTO Model information */
https://github.com/freechat-fun/freechat/blob/cb80c3708b85cf52c02a91bdc0c9e9ddc14856db/freechat-sdk/typescript/apis/AIManagerForBizAdminApi.ts#L23-L64
cb80c3708b85cf52c02a91bdc0c9e9ddc14856db
freechat
github_2023
freechat-fun
typescript
AIManagerForBizAdminApiRequestFactory.deleteAiModelInfo
public async deleteAiModelInfo(modelId: string, _options?: Configuration): Promise<RequestContext> { let _config = _options || this.configuration; // verify required parameter 'modelId' is not null or undefined if (modelId === null || modelId === undefined) { throw new RequiredError("AIManagerForBizAdminApi", "deleteAiModelInfo", "modelId"); } // Path Params const localVarPath = '/api/v2/biz/admin/ai/model/{modelId}' .replace('{' + 'modelId' + '}', encodeURIComponent(String(modelId))); // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.DELETE); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") let authMethod: SecurityAuthentication | undefined; // Apply auth methods authMethod = _config.authMethods["bearerAuth"] if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default if (defaultAuth?.applySecurityAuthentication) { await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; }
/** * Delete model information based on modelId. * Delete Model Information * @param modelId Model identifier */
https://github.com/freechat-fun/freechat/blob/cb80c3708b85cf52c02a91bdc0c9e9ddc14856db/freechat-sdk/typescript/apis/AIManagerForBizAdminApi.ts#L71-L102
cb80c3708b85cf52c02a91bdc0c9e9ddc14856db
freechat
github_2023
freechat-fun
typescript
AIManagerForBizAdminApiResponseProcessor.createOrUpdateAiModelInfoWithHttpInfo
public async createOrUpdateAiModelInfoWithHttpInfo(response: ResponseContext): Promise<HttpInfo<string >> { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body: string = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), "string", "" ) as string; return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); } // Work around for missing responses in specification, e.g. for petstore.yaml if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body: string = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), "string", "" ) as string; return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); } throw new ApiException<string | Blob | undefined>(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); }
/** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * * @params response Response returned by the server for a request to createOrUpdateAiModelInfo * @throws ApiException if the response code was not in [200, 299] */
https://github.com/freechat-fun/freechat/blob/cb80c3708b85cf52c02a91bdc0c9e9ddc14856db/freechat-sdk/typescript/apis/AIManagerForBizAdminApi.ts#L115-L135
cb80c3708b85cf52c02a91bdc0c9e9ddc14856db
freechat
github_2023
freechat-fun
typescript
AIManagerForBizAdminApiResponseProcessor.deleteAiModelInfoWithHttpInfo
public async deleteAiModelInfoWithHttpInfo(response: ResponseContext): Promise<HttpInfo<boolean >> { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body: boolean = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), "boolean", "" ) as boolean; return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); } // Work around for missing responses in specification, e.g. for petstore.yaml if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body: boolean = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), "boolean", "" ) as boolean; return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); } throw new ApiException<string | Blob | undefined>(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); }
/** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * * @params response Response returned by the server for a request to deleteAiModelInfo * @throws ApiException if the response code was not in [200, 299] */
https://github.com/freechat-fun/freechat/blob/cb80c3708b85cf52c02a91bdc0c9e9ddc14856db/freechat-sdk/typescript/apis/AIManagerForBizAdminApi.ts#L144-L164
cb80c3708b85cf52c02a91bdc0c9e9ddc14856db
freechat
github_2023
freechat-fun
typescript
AIServiceApiRequestFactory.addAiApiKey
public async addAiApiKey(aiApiKeyCreateDTO: AiApiKeyCreateDTO, _options?: Configuration): Promise<RequestContext> { let _config = _options || this.configuration; // verify required parameter 'aiApiKeyCreateDTO' is not null or undefined if (aiApiKeyCreateDTO === null || aiApiKeyCreateDTO === undefined) { throw new RequiredError("AIServiceApi", "addAiApiKey", "aiApiKeyCreateDTO"); } // Path Params const localVarPath = '/api/v2/ai/apikey'; // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") // Body Params const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); requestContext.setHeaderParam("Content-Type", contentType); const serializedBody = ObjectSerializer.stringify( ObjectSerializer.serialize(aiApiKeyCreateDTO, "AiApiKeyCreateDTO", ""), contentType ); requestContext.setBody(serializedBody); let authMethod: SecurityAuthentication | undefined; // Apply auth methods authMethod = _config.authMethods["bearerAuth"] if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default if (defaultAuth?.applySecurityAuthentication) { await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; }
/** * Add a credential for the model service. * Add Model Provider Credential * @param aiApiKeyCreateDTO Model call credential information */
https://github.com/freechat-fun/freechat/blob/cb80c3708b85cf52c02a91bdc0c9e9ddc14856db/freechat-sdk/typescript/apis/AIServiceApi.ts#L25-L66
cb80c3708b85cf52c02a91bdc0c9e9ddc14856db
freechat
github_2023
freechat-fun
typescript
AIServiceApiRequestFactory.deleteAiApiKey
public async deleteAiApiKey(id: number, _options?: Configuration): Promise<RequestContext> { let _config = _options || this.configuration; // verify required parameter 'id' is not null or undefined if (id === null || id === undefined) { throw new RequiredError("AIServiceApi", "deleteAiApiKey", "id"); } // Path Params const localVarPath = '/api/v2/ai/apikey/{id}' .replace('{' + 'id' + '}', encodeURIComponent(String(id))); // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.DELETE); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") let authMethod: SecurityAuthentication | undefined; // Apply auth methods authMethod = _config.authMethods["bearerAuth"] if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default if (defaultAuth?.applySecurityAuthentication) { await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; }
/** * Delete the credential information of the model provider. * Delete Credential of Model Provider * @param id Credential identifier */
https://github.com/freechat-fun/freechat/blob/cb80c3708b85cf52c02a91bdc0c9e9ddc14856db/freechat-sdk/typescript/apis/AIServiceApi.ts#L73-L104
cb80c3708b85cf52c02a91bdc0c9e9ddc14856db
freechat
github_2023
freechat-fun
typescript
AIServiceApiRequestFactory.disableAiApiKey
public async disableAiApiKey(id: number, _options?: Configuration): Promise<RequestContext> { let _config = _options || this.configuration; // verify required parameter 'id' is not null or undefined if (id === null || id === undefined) { throw new RequiredError("AIServiceApi", "disableAiApiKey", "id"); } // Path Params const localVarPath = '/api/v2/ai/apikey/disable/{id}' .replace('{' + 'id' + '}', encodeURIComponent(String(id))); // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.PUT); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") let authMethod: SecurityAuthentication | undefined; // Apply auth methods authMethod = _config.authMethods["bearerAuth"] if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default if (defaultAuth?.applySecurityAuthentication) { await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; }
/** * Disable the credential information of the model provider. * Disable Model Provider Credential * @param id Credential identifier */
https://github.com/freechat-fun/freechat/blob/cb80c3708b85cf52c02a91bdc0c9e9ddc14856db/freechat-sdk/typescript/apis/AIServiceApi.ts#L111-L142
cb80c3708b85cf52c02a91bdc0c9e9ddc14856db
freechat
github_2023
freechat-fun
typescript
AIServiceApiRequestFactory.enableAiApiKey
public async enableAiApiKey(id: number, _options?: Configuration): Promise<RequestContext> { let _config = _options || this.configuration; // verify required parameter 'id' is not null or undefined if (id === null || id === undefined) { throw new RequiredError("AIServiceApi", "enableAiApiKey", "id"); } // Path Params const localVarPath = '/api/v2/ai/apikey/enable/{id}' .replace('{' + 'id' + '}', encodeURIComponent(String(id))); // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.PUT); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") let authMethod: SecurityAuthentication | undefined; // Apply auth methods authMethod = _config.authMethods["bearerAuth"] if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default if (defaultAuth?.applySecurityAuthentication) { await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; }
/** * Enable the credential information of the model provider. * Enable Model Provider Credential * @param id Credential identifier */
https://github.com/freechat-fun/freechat/blob/cb80c3708b85cf52c02a91bdc0c9e9ddc14856db/freechat-sdk/typescript/apis/AIServiceApi.ts#L149-L180
cb80c3708b85cf52c02a91bdc0c9e9ddc14856db
freechat
github_2023
freechat-fun
typescript
AIServiceApiRequestFactory.getAiApiKey
public async getAiApiKey(id: number, _options?: Configuration): Promise<RequestContext> { let _config = _options || this.configuration; // verify required parameter 'id' is not null or undefined if (id === null || id === undefined) { throw new RequiredError("AIServiceApi", "getAiApiKey", "id"); } // Path Params const localVarPath = '/api/v2/ai/apikey/{id}' .replace('{' + 'id' + '}', encodeURIComponent(String(id))); // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") let authMethod: SecurityAuthentication | undefined; // Apply auth methods authMethod = _config.authMethods["bearerAuth"] if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default if (defaultAuth?.applySecurityAuthentication) { await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; }
/** * Get the credential information of the model provider. * Get credential of Model Provider * @param id Credential identifier */
https://github.com/freechat-fun/freechat/blob/cb80c3708b85cf52c02a91bdc0c9e9ddc14856db/freechat-sdk/typescript/apis/AIServiceApi.ts#L187-L218
cb80c3708b85cf52c02a91bdc0c9e9ddc14856db
freechat
github_2023
freechat-fun
typescript
AIServiceApiRequestFactory.getAiModelInfo
public async getAiModelInfo(modelId: string, _options?: Configuration): Promise<RequestContext> { let _config = _options || this.configuration; // verify required parameter 'modelId' is not null or undefined if (modelId === null || modelId === undefined) { throw new RequiredError("AIServiceApi", "getAiModelInfo", "modelId"); } // Path Params const localVarPath = '/api/v2/public/ai/model/{modelId}' .replace('{' + 'modelId' + '}', encodeURIComponent(String(modelId))); // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") let authMethod: SecurityAuthentication | undefined; // Apply auth methods authMethod = _config.authMethods["bearerAuth"] if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default if (defaultAuth?.applySecurityAuthentication) { await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; }
/** * Return specific model information. * Get Model Information * @param modelId Model identifier */
https://github.com/freechat-fun/freechat/blob/cb80c3708b85cf52c02a91bdc0c9e9ddc14856db/freechat-sdk/typescript/apis/AIServiceApi.ts#L225-L256
cb80c3708b85cf52c02a91bdc0c9e9ddc14856db
freechat
github_2023
freechat-fun
typescript
AIServiceApiRequestFactory.listAiApiKeys
public async listAiApiKeys(provider: string, _options?: Configuration): Promise<RequestContext> { let _config = _options || this.configuration; // verify required parameter 'provider' is not null or undefined if (provider === null || provider === undefined) { throw new RequiredError("AIServiceApi", "listAiApiKeys", "provider"); } // Path Params const localVarPath = '/api/v2/ai/apikeys/{provider}' .replace('{' + 'provider' + '}', encodeURIComponent(String(provider))); // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") let authMethod: SecurityAuthentication | undefined; // Apply auth methods authMethod = _config.authMethods["bearerAuth"] if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default if (defaultAuth?.applySecurityAuthentication) { await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; }
/** * List all credential information of the model provider. * List Credentials of Model Provider * @param provider Model provider */
https://github.com/freechat-fun/freechat/blob/cb80c3708b85cf52c02a91bdc0c9e9ddc14856db/freechat-sdk/typescript/apis/AIServiceApi.ts#L263-L294
cb80c3708b85cf52c02a91bdc0c9e9ddc14856db
freechat
github_2023
freechat-fun
typescript
AIServiceApiRequestFactory.listAiModelInfo
public async listAiModelInfo(_options?: Configuration): Promise<RequestContext> { let _config = _options || this.configuration; // Path Params const localVarPath = '/api/v2/public/ai/models'; // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") let authMethod: SecurityAuthentication | undefined; // Apply auth methods authMethod = _config.authMethods["bearerAuth"] if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default if (defaultAuth?.applySecurityAuthentication) { await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; }
/** * Return model information by page, return the pageNum page, up to pageSize model information. * List Models */
https://github.com/freechat-fun/freechat/blob/cb80c3708b85cf52c02a91bdc0c9e9ddc14856db/freechat-sdk/typescript/apis/AIServiceApi.ts#L300-L324
cb80c3708b85cf52c02a91bdc0c9e9ddc14856db
freechat
github_2023
freechat-fun
typescript
AIServiceApiRequestFactory.listAiModelInfo1
public async listAiModelInfo1(pageSize: number, _options?: Configuration): Promise<RequestContext> { let _config = _options || this.configuration; // verify required parameter 'pageSize' is not null or undefined if (pageSize === null || pageSize === undefined) { throw new RequiredError("AIServiceApi", "listAiModelInfo1", "pageSize"); } // Path Params const localVarPath = '/api/v2/public/ai/models/{pageSize}' .replace('{' + 'pageSize' + '}', encodeURIComponent(String(pageSize))); // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") let authMethod: SecurityAuthentication | undefined; // Apply auth methods authMethod = _config.authMethods["bearerAuth"] if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default if (defaultAuth?.applySecurityAuthentication) { await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; }
/** * Return model information by page, return the pageNum page, up to pageSize model information. * List Models * @param pageSize Maximum quantity */
https://github.com/freechat-fun/freechat/blob/cb80c3708b85cf52c02a91bdc0c9e9ddc14856db/freechat-sdk/typescript/apis/AIServiceApi.ts#L331-L362
cb80c3708b85cf52c02a91bdc0c9e9ddc14856db
freechat
github_2023
freechat-fun
typescript
AIServiceApiRequestFactory.listAiModelInfo2
public async listAiModelInfo2(pageSize: number, pageNum: number, _options?: Configuration): Promise<RequestContext> { let _config = _options || this.configuration; // verify required parameter 'pageSize' is not null or undefined if (pageSize === null || pageSize === undefined) { throw new RequiredError("AIServiceApi", "listAiModelInfo2", "pageSize"); } // verify required parameter 'pageNum' is not null or undefined if (pageNum === null || pageNum === undefined) { throw new RequiredError("AIServiceApi", "listAiModelInfo2", "pageNum"); } // Path Params const localVarPath = '/api/v2/public/ai/models/{pageSize}/{pageNum}' .replace('{' + 'pageSize' + '}', encodeURIComponent(String(pageSize))) .replace('{' + 'pageNum' + '}', encodeURIComponent(String(pageNum))); // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") let authMethod: SecurityAuthentication | undefined; // Apply auth methods authMethod = _config.authMethods["bearerAuth"] if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default if (defaultAuth?.applySecurityAuthentication) { await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; }
/** * Return model information by page, return the pageNum page, up to pageSize model information. * List Models * @param pageSize Maximum quantity * @param pageNum Current page number */
https://github.com/freechat-fun/freechat/blob/cb80c3708b85cf52c02a91bdc0c9e9ddc14856db/freechat-sdk/typescript/apis/AIServiceApi.ts#L370-L408
cb80c3708b85cf52c02a91bdc0c9e9ddc14856db
freechat
github_2023
freechat-fun
typescript
AIServiceApiResponseProcessor.addAiApiKeyWithHttpInfo
public async addAiApiKeyWithHttpInfo(response: ResponseContext): Promise<HttpInfo<number >> { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body: number = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), "number", "int64" ) as number; return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); } // Work around for missing responses in specification, e.g. for petstore.yaml if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body: number = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), "number", "int64" ) as number; return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); } throw new ApiException<string | Blob | undefined>(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); }
/** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * * @params response Response returned by the server for a request to addAiApiKey * @throws ApiException if the response code was not in [200, 299] */
https://github.com/freechat-fun/freechat/blob/cb80c3708b85cf52c02a91bdc0c9e9ddc14856db/freechat-sdk/typescript/apis/AIServiceApi.ts#L421-L441
cb80c3708b85cf52c02a91bdc0c9e9ddc14856db
freechat
github_2023
freechat-fun
typescript
AIServiceApiResponseProcessor.deleteAiApiKeyWithHttpInfo
public async deleteAiApiKeyWithHttpInfo(response: ResponseContext): Promise<HttpInfo<boolean >> { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body: boolean = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), "boolean", "" ) as boolean; return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); } // Work around for missing responses in specification, e.g. for petstore.yaml if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body: boolean = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), "boolean", "" ) as boolean; return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); } throw new ApiException<string | Blob | undefined>(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); }
/** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * * @params response Response returned by the server for a request to deleteAiApiKey * @throws ApiException if the response code was not in [200, 299] */
https://github.com/freechat-fun/freechat/blob/cb80c3708b85cf52c02a91bdc0c9e9ddc14856db/freechat-sdk/typescript/apis/AIServiceApi.ts#L450-L470
cb80c3708b85cf52c02a91bdc0c9e9ddc14856db
freechat
github_2023
freechat-fun
typescript
AIServiceApiResponseProcessor.disableAiApiKeyWithHttpInfo
public async disableAiApiKeyWithHttpInfo(response: ResponseContext): Promise<HttpInfo<boolean >> { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body: boolean = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), "boolean", "" ) as boolean; return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); } // Work around for missing responses in specification, e.g. for petstore.yaml if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body: boolean = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), "boolean", "" ) as boolean; return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); } throw new ApiException<string | Blob | undefined>(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); }
/** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * * @params response Response returned by the server for a request to disableAiApiKey * @throws ApiException if the response code was not in [200, 299] */
https://github.com/freechat-fun/freechat/blob/cb80c3708b85cf52c02a91bdc0c9e9ddc14856db/freechat-sdk/typescript/apis/AIServiceApi.ts#L479-L499
cb80c3708b85cf52c02a91bdc0c9e9ddc14856db
freechat
github_2023
freechat-fun
typescript
AIServiceApiResponseProcessor.enableAiApiKeyWithHttpInfo
public async enableAiApiKeyWithHttpInfo(response: ResponseContext): Promise<HttpInfo<boolean >> { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body: boolean = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), "boolean", "" ) as boolean; return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); } // Work around for missing responses in specification, e.g. for petstore.yaml if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body: boolean = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), "boolean", "" ) as boolean; return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); } throw new ApiException<string | Blob | undefined>(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); }
/** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * * @params response Response returned by the server for a request to enableAiApiKey * @throws ApiException if the response code was not in [200, 299] */
https://github.com/freechat-fun/freechat/blob/cb80c3708b85cf52c02a91bdc0c9e9ddc14856db/freechat-sdk/typescript/apis/AIServiceApi.ts#L508-L528
cb80c3708b85cf52c02a91bdc0c9e9ddc14856db
freechat
github_2023
freechat-fun
typescript
AIServiceApiResponseProcessor.getAiApiKeyWithHttpInfo
public async getAiApiKeyWithHttpInfo(response: ResponseContext): Promise<HttpInfo<AiApiKeyInfoDTO >> { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body: AiApiKeyInfoDTO = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), "AiApiKeyInfoDTO", "" ) as AiApiKeyInfoDTO; return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); } // Work around for missing responses in specification, e.g. for petstore.yaml if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body: AiApiKeyInfoDTO = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), "AiApiKeyInfoDTO", "" ) as AiApiKeyInfoDTO; return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); } throw new ApiException<string | Blob | undefined>(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); }
/** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * * @params response Response returned by the server for a request to getAiApiKey * @throws ApiException if the response code was not in [200, 299] */
https://github.com/freechat-fun/freechat/blob/cb80c3708b85cf52c02a91bdc0c9e9ddc14856db/freechat-sdk/typescript/apis/AIServiceApi.ts#L537-L557
cb80c3708b85cf52c02a91bdc0c9e9ddc14856db
freechat
github_2023
freechat-fun
typescript
AIServiceApiResponseProcessor.getAiModelInfoWithHttpInfo
public async getAiModelInfoWithHttpInfo(response: ResponseContext): Promise<HttpInfo<AiModelInfoDTO >> { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body: AiModelInfoDTO = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), "AiModelInfoDTO", "" ) as AiModelInfoDTO; return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); } // Work around for missing responses in specification, e.g. for petstore.yaml if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body: AiModelInfoDTO = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), "AiModelInfoDTO", "" ) as AiModelInfoDTO; return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); } throw new ApiException<string | Blob | undefined>(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); }
/** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * * @params response Response returned by the server for a request to getAiModelInfo * @throws ApiException if the response code was not in [200, 299] */
https://github.com/freechat-fun/freechat/blob/cb80c3708b85cf52c02a91bdc0c9e9ddc14856db/freechat-sdk/typescript/apis/AIServiceApi.ts#L566-L586
cb80c3708b85cf52c02a91bdc0c9e9ddc14856db
freechat
github_2023
freechat-fun
typescript
AIServiceApiResponseProcessor.listAiApiKeysWithHttpInfo
public async listAiApiKeysWithHttpInfo(response: ResponseContext): Promise<HttpInfo<Array<AiApiKeyInfoDTO> >> { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body: Array<AiApiKeyInfoDTO> = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), "Array<AiApiKeyInfoDTO>", "" ) as Array<AiApiKeyInfoDTO>; return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); } // Work around for missing responses in specification, e.g. for petstore.yaml if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body: Array<AiApiKeyInfoDTO> = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), "Array<AiApiKeyInfoDTO>", "" ) as Array<AiApiKeyInfoDTO>; return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); } throw new ApiException<string | Blob | undefined>(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); }
/** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * * @params response Response returned by the server for a request to listAiApiKeys * @throws ApiException if the response code was not in [200, 299] */
https://github.com/freechat-fun/freechat/blob/cb80c3708b85cf52c02a91bdc0c9e9ddc14856db/freechat-sdk/typescript/apis/AIServiceApi.ts#L595-L615
cb80c3708b85cf52c02a91bdc0c9e9ddc14856db
freechat
github_2023
freechat-fun
typescript
AIServiceApiResponseProcessor.listAiModelInfoWithHttpInfo
public async listAiModelInfoWithHttpInfo(response: ResponseContext): Promise<HttpInfo<Array<AiModelInfoDTO> >> { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body: Array<AiModelInfoDTO> = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), "Array<AiModelInfoDTO>", "" ) as Array<AiModelInfoDTO>; return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); } // Work around for missing responses in specification, e.g. for petstore.yaml if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body: Array<AiModelInfoDTO> = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), "Array<AiModelInfoDTO>", "" ) as Array<AiModelInfoDTO>; return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); } throw new ApiException<string | Blob | undefined>(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); }
/** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * * @params response Response returned by the server for a request to listAiModelInfo * @throws ApiException if the response code was not in [200, 299] */
https://github.com/freechat-fun/freechat/blob/cb80c3708b85cf52c02a91bdc0c9e9ddc14856db/freechat-sdk/typescript/apis/AIServiceApi.ts#L624-L644
cb80c3708b85cf52c02a91bdc0c9e9ddc14856db
freechat
github_2023
freechat-fun
typescript
AIServiceApiResponseProcessor.listAiModelInfo1WithHttpInfo
public async listAiModelInfo1WithHttpInfo(response: ResponseContext): Promise<HttpInfo<Array<AiModelInfoDTO> >> { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body: Array<AiModelInfoDTO> = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), "Array<AiModelInfoDTO>", "" ) as Array<AiModelInfoDTO>; return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); } // Work around for missing responses in specification, e.g. for petstore.yaml if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body: Array<AiModelInfoDTO> = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), "Array<AiModelInfoDTO>", "" ) as Array<AiModelInfoDTO>; return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); } throw new ApiException<string | Blob | undefined>(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); }
/** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * * @params response Response returned by the server for a request to listAiModelInfo1 * @throws ApiException if the response code was not in [200, 299] */
https://github.com/freechat-fun/freechat/blob/cb80c3708b85cf52c02a91bdc0c9e9ddc14856db/freechat-sdk/typescript/apis/AIServiceApi.ts#L653-L673
cb80c3708b85cf52c02a91bdc0c9e9ddc14856db
freechat
github_2023
freechat-fun
typescript
AIServiceApiResponseProcessor.listAiModelInfo2WithHttpInfo
public async listAiModelInfo2WithHttpInfo(response: ResponseContext): Promise<HttpInfo<Array<AiModelInfoDTO> >> { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body: Array<AiModelInfoDTO> = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), "Array<AiModelInfoDTO>", "" ) as Array<AiModelInfoDTO>; return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); } // Work around for missing responses in specification, e.g. for petstore.yaml if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body: Array<AiModelInfoDTO> = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), "Array<AiModelInfoDTO>", "" ) as Array<AiModelInfoDTO>; return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); } throw new ApiException<string | Blob | undefined>(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); }
/** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * * @params response Response returned by the server for a request to listAiModelInfo2 * @throws ApiException if the response code was not in [200, 299] */
https://github.com/freechat-fun/freechat/blob/cb80c3708b85cf52c02a91bdc0c9e9ddc14856db/freechat-sdk/typescript/apis/AIServiceApi.ts#L682-L702
cb80c3708b85cf52c02a91bdc0c9e9ddc14856db
freechat
github_2023
freechat-fun
typescript
AccountApiRequestFactory.createToken
public async createToken(duration: number, _options?: Configuration): Promise<RequestContext> { let _config = _options || this.configuration; // verify required parameter 'duration' is not null or undefined if (duration === null || duration === undefined) { throw new RequiredError("AccountApi", "createToken", "duration"); } // Path Params const localVarPath = '/api/v2/account/token/{duration}' .replace('{' + 'duration' + '}', encodeURIComponent(String(duration))); // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") let authMethod: SecurityAuthentication | undefined; // Apply auth methods authMethod = _config.authMethods["bearerAuth"] if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default if (defaultAuth?.applySecurityAuthentication) { await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; }
/** * Create a timed API Token, valid for {duration} seconds. * Create API Token * @param duration Token validity duration (seconds) */
https://github.com/freechat-fun/freechat/blob/cb80c3708b85cf52c02a91bdc0c9e9ddc14856db/freechat-sdk/typescript/apis/AccountApi.ts#L25-L56
cb80c3708b85cf52c02a91bdc0c9e9ddc14856db
freechat
github_2023
freechat-fun
typescript
AccountApiRequestFactory.createToken1
public async createToken1(_options?: Configuration): Promise<RequestContext> { let _config = _options || this.configuration; // Path Params const localVarPath = '/api/v2/account/token'; // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") let authMethod: SecurityAuthentication | undefined; // Apply auth methods authMethod = _config.authMethods["bearerAuth"] if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default if (defaultAuth?.applySecurityAuthentication) { await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; }
/** * Create a timed API Token, valid for {duration} seconds. * Create API Token */
https://github.com/freechat-fun/freechat/blob/cb80c3708b85cf52c02a91bdc0c9e9ddc14856db/freechat-sdk/typescript/apis/AccountApi.ts#L62-L86
cb80c3708b85cf52c02a91bdc0c9e9ddc14856db
freechat
github_2023
freechat-fun
typescript
AccountApiRequestFactory.deleteToken
public async deleteToken(token: string, _options?: Configuration): Promise<RequestContext> { let _config = _options || this.configuration; // verify required parameter 'token' is not null or undefined if (token === null || token === undefined) { throw new RequiredError("AccountApi", "deleteToken", "token"); } // Path Params const localVarPath = '/api/v2/account/token/{token}' .replace('{' + 'token' + '}', encodeURIComponent(String(token))); // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.DELETE); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") let authMethod: SecurityAuthentication | undefined; // Apply auth methods authMethod = _config.authMethods["bearerAuth"] if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default if (defaultAuth?.applySecurityAuthentication) { await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; }
/** * Delete an API Token. * Delete API Token * @param token Token content */
https://github.com/freechat-fun/freechat/blob/cb80c3708b85cf52c02a91bdc0c9e9ddc14856db/freechat-sdk/typescript/apis/AccountApi.ts#L93-L124
cb80c3708b85cf52c02a91bdc0c9e9ddc14856db
freechat
github_2023
freechat-fun
typescript
AccountApiRequestFactory.deleteTokenById
public async deleteTokenById(id: number, _options?: Configuration): Promise<RequestContext> { let _config = _options || this.configuration; // verify required parameter 'id' is not null or undefined if (id === null || id === undefined) { throw new RequiredError("AccountApi", "deleteTokenById", "id"); } // Path Params const localVarPath = '/api/v2/account/token/id/{id}' .replace('{' + 'id' + '}', encodeURIComponent(String(id))); // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.DELETE); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") let authMethod: SecurityAuthentication | undefined; // Apply auth methods authMethod = _config.authMethods["bearerAuth"] if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default if (defaultAuth?.applySecurityAuthentication) { await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; }
/** * Delete the API token by id. * Delete API Token by Id * @param id Token id */
https://github.com/freechat-fun/freechat/blob/cb80c3708b85cf52c02a91bdc0c9e9ddc14856db/freechat-sdk/typescript/apis/AccountApi.ts#L131-L162
cb80c3708b85cf52c02a91bdc0c9e9ddc14856db
freechat
github_2023
freechat-fun
typescript
AccountApiRequestFactory.disableToken
public async disableToken(token: string, _options?: Configuration): Promise<RequestContext> { let _config = _options || this.configuration; // verify required parameter 'token' is not null or undefined if (token === null || token === undefined) { throw new RequiredError("AccountApi", "disableToken", "token"); } // Path Params const localVarPath = '/api/v2/account/token/{token}' .replace('{' + 'token' + '}', encodeURIComponent(String(token))); // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.PUT); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") let authMethod: SecurityAuthentication | undefined; // Apply auth methods authMethod = _config.authMethods["bearerAuth"] if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default if (defaultAuth?.applySecurityAuthentication) { await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; }
/** * Disable an API Token, the token is not deleted. * Disable API Token * @param token Token content */
https://github.com/freechat-fun/freechat/blob/cb80c3708b85cf52c02a91bdc0c9e9ddc14856db/freechat-sdk/typescript/apis/AccountApi.ts#L169-L200
cb80c3708b85cf52c02a91bdc0c9e9ddc14856db
freechat
github_2023
freechat-fun
typescript
AccountApiRequestFactory.disableTokenById
public async disableTokenById(id: number, _options?: Configuration): Promise<RequestContext> { let _config = _options || this.configuration; // verify required parameter 'id' is not null or undefined if (id === null || id === undefined) { throw new RequiredError("AccountApi", "disableTokenById", "id"); } // Path Params const localVarPath = '/api/v2/account/token/id/{id}' .replace('{' + 'id' + '}', encodeURIComponent(String(id))); // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.PUT); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") let authMethod: SecurityAuthentication | undefined; // Apply auth methods authMethod = _config.authMethods["bearerAuth"] if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default if (defaultAuth?.applySecurityAuthentication) { await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; }
/** * Disable the API token by id. * Disable API Token by Id * @param id Token id */
https://github.com/freechat-fun/freechat/blob/cb80c3708b85cf52c02a91bdc0c9e9ddc14856db/freechat-sdk/typescript/apis/AccountApi.ts#L207-L238
cb80c3708b85cf52c02a91bdc0c9e9ddc14856db
freechat
github_2023
freechat-fun
typescript
AccountApiRequestFactory.getTokenById
public async getTokenById(id: number, _options?: Configuration): Promise<RequestContext> { let _config = _options || this.configuration; // verify required parameter 'id' is not null or undefined if (id === null || id === undefined) { throw new RequiredError("AccountApi", "getTokenById", "id"); } // Path Params const localVarPath = '/api/v2/account/token/id/{id}' .replace('{' + 'id' + '}', encodeURIComponent(String(id))); // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") let authMethod: SecurityAuthentication | undefined; // Apply auth methods authMethod = _config.authMethods["bearerAuth"] if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default if (defaultAuth?.applySecurityAuthentication) { await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; }
/** * Get the API token by id. * Get API Token by Id * @param id Token id */
https://github.com/freechat-fun/freechat/blob/cb80c3708b85cf52c02a91bdc0c9e9ddc14856db/freechat-sdk/typescript/apis/AccountApi.ts#L245-L276
cb80c3708b85cf52c02a91bdc0c9e9ddc14856db
freechat
github_2023
freechat-fun
typescript
AccountApiRequestFactory.getUserBasic
public async getUserBasic(username: string, _options?: Configuration): Promise<RequestContext> { let _config = _options || this.configuration; // verify required parameter 'username' is not null or undefined if (username === null || username === undefined) { throw new RequiredError("AccountApi", "getUserBasic", "username"); } // Path Params const localVarPath = '/api/v2/account/basic/{username}' .replace('{' + 'username' + '}', encodeURIComponent(String(username))); // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") let authMethod: SecurityAuthentication | undefined; // Apply auth methods authMethod = _config.authMethods["bearerAuth"] if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default if (defaultAuth?.applySecurityAuthentication) { await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; }
/** * Return user basic information, including: username, nickname, avatar link. * Get User Basic Information * @param username Username */
https://github.com/freechat-fun/freechat/blob/cb80c3708b85cf52c02a91bdc0c9e9ddc14856db/freechat-sdk/typescript/apis/AccountApi.ts#L283-L314
cb80c3708b85cf52c02a91bdc0c9e9ddc14856db
freechat
github_2023
freechat-fun
typescript
AccountApiRequestFactory.getUserBasic1
public async getUserBasic1(_options?: Configuration): Promise<RequestContext> { let _config = _options || this.configuration; // Path Params const localVarPath = '/api/v2/account/basic'; // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") let authMethod: SecurityAuthentication | undefined; // Apply auth methods authMethod = _config.authMethods["bearerAuth"] if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default if (defaultAuth?.applySecurityAuthentication) { await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; }
/** * Return user basic information, including: username, nickname, avatar link. * Get User Basic Information */
https://github.com/freechat-fun/freechat/blob/cb80c3708b85cf52c02a91bdc0c9e9ddc14856db/freechat-sdk/typescript/apis/AccountApi.ts#L320-L344
cb80c3708b85cf52c02a91bdc0c9e9ddc14856db
freechat
github_2023
freechat-fun
typescript
AccountApiRequestFactory.getUserDetails
public async getUserDetails(_options?: Configuration): Promise<RequestContext> { let _config = _options || this.configuration; // Path Params const localVarPath = '/api/v2/account/details'; // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") let authMethod: SecurityAuthentication | undefined; // Apply auth methods authMethod = _config.authMethods["bearerAuth"] if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default if (defaultAuth?.applySecurityAuthentication) { await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; }
/** * Return the detailed user information of the current account, the fields refer to the [standard claims](https://openid.net/specs/openid-connect-core-1_0.html#Claims) of OpenID Connect (OIDC). * Get User Details */
https://github.com/freechat-fun/freechat/blob/cb80c3708b85cf52c02a91bdc0c9e9ddc14856db/freechat-sdk/typescript/apis/AccountApi.ts#L350-L374
cb80c3708b85cf52c02a91bdc0c9e9ddc14856db
freechat
github_2023
freechat-fun
typescript
AccountApiRequestFactory.listTokens
public async listTokens(_options?: Configuration): Promise<RequestContext> { let _config = _options || this.configuration; // Path Params const localVarPath = '/api/v2/account/tokens'; // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") let authMethod: SecurityAuthentication | undefined; // Apply auth methods authMethod = _config.authMethods["bearerAuth"] if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default if (defaultAuth?.applySecurityAuthentication) { await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; }
/** * List currently valid tokens. * List API Tokens */
https://github.com/freechat-fun/freechat/blob/cb80c3708b85cf52c02a91bdc0c9e9ddc14856db/freechat-sdk/typescript/apis/AccountApi.ts#L380-L404
cb80c3708b85cf52c02a91bdc0c9e9ddc14856db
freechat
github_2023
freechat-fun
typescript
AccountApiRequestFactory.updateUserInfo
public async updateUserInfo(userDetailsDTO: UserDetailsDTO, _options?: Configuration): Promise<RequestContext> { let _config = _options || this.configuration; // verify required parameter 'userDetailsDTO' is not null or undefined if (userDetailsDTO === null || userDetailsDTO === undefined) { throw new RequiredError("AccountApi", "updateUserInfo", "userDetailsDTO"); } // Path Params const localVarPath = '/api/v2/account/details'; // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.PUT); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") // Body Params const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); requestContext.setHeaderParam("Content-Type", contentType); const serializedBody = ObjectSerializer.stringify( ObjectSerializer.serialize(userDetailsDTO, "UserDetailsDTO", ""), contentType ); requestContext.setBody(serializedBody); let authMethod: SecurityAuthentication | undefined; // Apply auth methods authMethod = _config.authMethods["bearerAuth"] if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default if (defaultAuth?.applySecurityAuthentication) { await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; }
/** * Update the detailed user information of the current account. * Update User Details * @param userDetailsDTO User information */
https://github.com/freechat-fun/freechat/blob/cb80c3708b85cf52c02a91bdc0c9e9ddc14856db/freechat-sdk/typescript/apis/AccountApi.ts#L411-L452
cb80c3708b85cf52c02a91bdc0c9e9ddc14856db
freechat
github_2023
freechat-fun
typescript
AccountApiRequestFactory.uploadUserPicture
public async uploadUserPicture(file: HttpFile, _options?: Configuration): Promise<RequestContext> { let _config = _options || this.configuration; // verify required parameter 'file' is not null or undefined if (file === null || file === undefined) { throw new RequiredError("AccountApi", "uploadUserPicture", "file"); } // Path Params const localVarPath = '/api/v2/account/picture'; // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") // Form Params const useForm = canConsumeForm([ 'multipart/form-data', ]); let localVarFormParams if (useForm) { localVarFormParams = new FormData(); } else { localVarFormParams = new URLSearchParams(); } if (file !== undefined) { // TODO: replace .append with .set if (localVarFormParams instanceof FormData) { localVarFormParams.append('file', file, file.name); } } requestContext.setBody(localVarFormParams); if(!useForm) { const contentType = ObjectSerializer.getPreferredMediaType([ "multipart/form-data" ]); requestContext.setHeaderParam("Content-Type", contentType); } let authMethod: SecurityAuthentication | undefined; // Apply auth methods authMethod = _config.authMethods["bearerAuth"] if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default if (defaultAuth?.applySecurityAuthentication) { await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; }
/** * Upload a picture of the user. * Upload User Picture * @param file User picture */
https://github.com/freechat-fun/freechat/blob/cb80c3708b85cf52c02a91bdc0c9e9ddc14856db/freechat-sdk/typescript/apis/AccountApi.ts#L459-L516
cb80c3708b85cf52c02a91bdc0c9e9ddc14856db
freechat
github_2023
freechat-fun
typescript
AccountApiResponseProcessor.createTokenWithHttpInfo
public async createTokenWithHttpInfo(response: ResponseContext): Promise<HttpInfo<string >> { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body: string = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), "string", "" ) as string; return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); } // Work around for missing responses in specification, e.g. for petstore.yaml if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body: string = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), "string", "" ) as string; return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); } throw new ApiException<string | Blob | undefined>(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); }
/** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * * @params response Response returned by the server for a request to createToken * @throws ApiException if the response code was not in [200, 299] */
https://github.com/freechat-fun/freechat/blob/cb80c3708b85cf52c02a91bdc0c9e9ddc14856db/freechat-sdk/typescript/apis/AccountApi.ts#L529-L549
cb80c3708b85cf52c02a91bdc0c9e9ddc14856db
freechat
github_2023
freechat-fun
typescript
AccountApiResponseProcessor.createToken1WithHttpInfo
public async createToken1WithHttpInfo(response: ResponseContext): Promise<HttpInfo<string >> { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body: string = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), "string", "" ) as string; return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); } // Work around for missing responses in specification, e.g. for petstore.yaml if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body: string = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), "string", "" ) as string; return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); } throw new ApiException<string | Blob | undefined>(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); }
/** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * * @params response Response returned by the server for a request to createToken1 * @throws ApiException if the response code was not in [200, 299] */
https://github.com/freechat-fun/freechat/blob/cb80c3708b85cf52c02a91bdc0c9e9ddc14856db/freechat-sdk/typescript/apis/AccountApi.ts#L558-L578
cb80c3708b85cf52c02a91bdc0c9e9ddc14856db
freechat
github_2023
freechat-fun
typescript
AccountApiResponseProcessor.deleteTokenWithHttpInfo
public async deleteTokenWithHttpInfo(response: ResponseContext): Promise<HttpInfo<string >> { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body: string = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), "string", "" ) as string; return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); } // Work around for missing responses in specification, e.g. for petstore.yaml if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body: string = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), "string", "" ) as string; return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); } throw new ApiException<string | Blob | undefined>(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); }
/** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * * @params response Response returned by the server for a request to deleteToken * @throws ApiException if the response code was not in [200, 299] */
https://github.com/freechat-fun/freechat/blob/cb80c3708b85cf52c02a91bdc0c9e9ddc14856db/freechat-sdk/typescript/apis/AccountApi.ts#L587-L607
cb80c3708b85cf52c02a91bdc0c9e9ddc14856db
freechat
github_2023
freechat-fun
typescript
AccountApiResponseProcessor.deleteTokenByIdWithHttpInfo
public async deleteTokenByIdWithHttpInfo(response: ResponseContext): Promise<HttpInfo<boolean >> { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body: boolean = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), "boolean", "" ) as boolean; return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); } // Work around for missing responses in specification, e.g. for petstore.yaml if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body: boolean = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), "boolean", "" ) as boolean; return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); } throw new ApiException<string | Blob | undefined>(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); }
/** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * * @params response Response returned by the server for a request to deleteTokenById * @throws ApiException if the response code was not in [200, 299] */
https://github.com/freechat-fun/freechat/blob/cb80c3708b85cf52c02a91bdc0c9e9ddc14856db/freechat-sdk/typescript/apis/AccountApi.ts#L616-L636
cb80c3708b85cf52c02a91bdc0c9e9ddc14856db
freechat
github_2023
freechat-fun
typescript
AccountApiResponseProcessor.disableTokenWithHttpInfo
public async disableTokenWithHttpInfo(response: ResponseContext): Promise<HttpInfo<string >> { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body: string = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), "string", "" ) as string; return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); } // Work around for missing responses in specification, e.g. for petstore.yaml if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body: string = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), "string", "" ) as string; return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); } throw new ApiException<string | Blob | undefined>(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); }
/** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * * @params response Response returned by the server for a request to disableToken * @throws ApiException if the response code was not in [200, 299] */
https://github.com/freechat-fun/freechat/blob/cb80c3708b85cf52c02a91bdc0c9e9ddc14856db/freechat-sdk/typescript/apis/AccountApi.ts#L645-L665
cb80c3708b85cf52c02a91bdc0c9e9ddc14856db
freechat
github_2023
freechat-fun
typescript
AccountApiResponseProcessor.disableTokenByIdWithHttpInfo
public async disableTokenByIdWithHttpInfo(response: ResponseContext): Promise<HttpInfo<boolean >> { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body: boolean = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), "boolean", "" ) as boolean; return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); } // Work around for missing responses in specification, e.g. for petstore.yaml if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body: boolean = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), "boolean", "" ) as boolean; return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); } throw new ApiException<string | Blob | undefined>(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); }
/** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * * @params response Response returned by the server for a request to disableTokenById * @throws ApiException if the response code was not in [200, 299] */
https://github.com/freechat-fun/freechat/blob/cb80c3708b85cf52c02a91bdc0c9e9ddc14856db/freechat-sdk/typescript/apis/AccountApi.ts#L674-L694
cb80c3708b85cf52c02a91bdc0c9e9ddc14856db
freechat
github_2023
freechat-fun
typescript
AccountApiResponseProcessor.getTokenByIdWithHttpInfo
public async getTokenByIdWithHttpInfo(response: ResponseContext): Promise<HttpInfo<string >> { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body: string = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), "string", "" ) as string; return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); } // Work around for missing responses in specification, e.g. for petstore.yaml if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body: string = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), "string", "" ) as string; return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); } throw new ApiException<string | Blob | undefined>(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); }
/** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * * @params response Response returned by the server for a request to getTokenById * @throws ApiException if the response code was not in [200, 299] */
https://github.com/freechat-fun/freechat/blob/cb80c3708b85cf52c02a91bdc0c9e9ddc14856db/freechat-sdk/typescript/apis/AccountApi.ts#L703-L723
cb80c3708b85cf52c02a91bdc0c9e9ddc14856db
freechat
github_2023
freechat-fun
typescript
AccountApiResponseProcessor.getUserBasicWithHttpInfo
public async getUserBasicWithHttpInfo(response: ResponseContext): Promise<HttpInfo<UserBasicInfoDTO >> { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body: UserBasicInfoDTO = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), "UserBasicInfoDTO", "" ) as UserBasicInfoDTO; return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); } // Work around for missing responses in specification, e.g. for petstore.yaml if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body: UserBasicInfoDTO = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), "UserBasicInfoDTO", "" ) as UserBasicInfoDTO; return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); } throw new ApiException<string | Blob | undefined>(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); }
/** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * * @params response Response returned by the server for a request to getUserBasic * @throws ApiException if the response code was not in [200, 299] */
https://github.com/freechat-fun/freechat/blob/cb80c3708b85cf52c02a91bdc0c9e9ddc14856db/freechat-sdk/typescript/apis/AccountApi.ts#L732-L752
cb80c3708b85cf52c02a91bdc0c9e9ddc14856db
freechat
github_2023
freechat-fun
typescript
AccountApiResponseProcessor.getUserBasic1WithHttpInfo
public async getUserBasic1WithHttpInfo(response: ResponseContext): Promise<HttpInfo<UserBasicInfoDTO >> { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body: UserBasicInfoDTO = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), "UserBasicInfoDTO", "" ) as UserBasicInfoDTO; return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); } // Work around for missing responses in specification, e.g. for petstore.yaml if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body: UserBasicInfoDTO = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), "UserBasicInfoDTO", "" ) as UserBasicInfoDTO; return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); } throw new ApiException<string | Blob | undefined>(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); }
/** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * * @params response Response returned by the server for a request to getUserBasic1 * @throws ApiException if the response code was not in [200, 299] */
https://github.com/freechat-fun/freechat/blob/cb80c3708b85cf52c02a91bdc0c9e9ddc14856db/freechat-sdk/typescript/apis/AccountApi.ts#L761-L781
cb80c3708b85cf52c02a91bdc0c9e9ddc14856db
freechat
github_2023
freechat-fun
typescript
AccountApiResponseProcessor.getUserDetailsWithHttpInfo
public async getUserDetailsWithHttpInfo(response: ResponseContext): Promise<HttpInfo<UserDetailsDTO >> { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body: UserDetailsDTO = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), "UserDetailsDTO", "" ) as UserDetailsDTO; return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); } // Work around for missing responses in specification, e.g. for petstore.yaml if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body: UserDetailsDTO = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), "UserDetailsDTO", "" ) as UserDetailsDTO; return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); } throw new ApiException<string | Blob | undefined>(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); }
/** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * * @params response Response returned by the server for a request to getUserDetails * @throws ApiException if the response code was not in [200, 299] */
https://github.com/freechat-fun/freechat/blob/cb80c3708b85cf52c02a91bdc0c9e9ddc14856db/freechat-sdk/typescript/apis/AccountApi.ts#L790-L810
cb80c3708b85cf52c02a91bdc0c9e9ddc14856db
freechat
github_2023
freechat-fun
typescript
AccountApiResponseProcessor.listTokensWithHttpInfo
public async listTokensWithHttpInfo(response: ResponseContext): Promise<HttpInfo<Array<ApiTokenInfoDTO> >> { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body: Array<ApiTokenInfoDTO> = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), "Array<ApiTokenInfoDTO>", "" ) as Array<ApiTokenInfoDTO>; return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); } // Work around for missing responses in specification, e.g. for petstore.yaml if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body: Array<ApiTokenInfoDTO> = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), "Array<ApiTokenInfoDTO>", "" ) as Array<ApiTokenInfoDTO>; return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); } throw new ApiException<string | Blob | undefined>(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); }
/** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * * @params response Response returned by the server for a request to listTokens * @throws ApiException if the response code was not in [200, 299] */
https://github.com/freechat-fun/freechat/blob/cb80c3708b85cf52c02a91bdc0c9e9ddc14856db/freechat-sdk/typescript/apis/AccountApi.ts#L819-L839
cb80c3708b85cf52c02a91bdc0c9e9ddc14856db
freechat
github_2023
freechat-fun
typescript
AccountApiResponseProcessor.updateUserInfoWithHttpInfo
public async updateUserInfoWithHttpInfo(response: ResponseContext): Promise<HttpInfo<boolean >> { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body: boolean = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), "boolean", "" ) as boolean; return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); } // Work around for missing responses in specification, e.g. for petstore.yaml if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body: boolean = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), "boolean", "" ) as boolean; return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); } throw new ApiException<string | Blob | undefined>(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); }
/** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * * @params response Response returned by the server for a request to updateUserInfo * @throws ApiException if the response code was not in [200, 299] */
https://github.com/freechat-fun/freechat/blob/cb80c3708b85cf52c02a91bdc0c9e9ddc14856db/freechat-sdk/typescript/apis/AccountApi.ts#L848-L868
cb80c3708b85cf52c02a91bdc0c9e9ddc14856db
freechat
github_2023
freechat-fun
typescript
AccountApiResponseProcessor.uploadUserPictureWithHttpInfo
public async uploadUserPictureWithHttpInfo(response: ResponseContext): Promise<HttpInfo<string >> { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body: string = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), "string", "" ) as string; return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); } // Work around for missing responses in specification, e.g. for petstore.yaml if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body: string = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), "string", "" ) as string; return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); } throw new ApiException<string | Blob | undefined>(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); }
/** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * * @params response Response returned by the server for a request to uploadUserPicture * @throws ApiException if the response code was not in [200, 299] */
https://github.com/freechat-fun/freechat/blob/cb80c3708b85cf52c02a91bdc0c9e9ddc14856db/freechat-sdk/typescript/apis/AccountApi.ts#L877-L897
cb80c3708b85cf52c02a91bdc0c9e9ddc14856db
freechat
github_2023
freechat-fun
typescript
AccountManagerForAdminApiRequestFactory.createTokenForUser
public async createTokenForUser(username: string, duration: number, _options?: Configuration): Promise<RequestContext> { let _config = _options || this.configuration; // verify required parameter 'username' is not null or undefined if (username === null || username === undefined) { throw new RequiredError("AccountManagerForAdminApi", "createTokenForUser", "username"); } // verify required parameter 'duration' is not null or undefined if (duration === null || duration === undefined) { throw new RequiredError("AccountManagerForAdminApi", "createTokenForUser", "duration"); } // Path Params const localVarPath = '/api/v2/admin/token/{username}/{duration}' .replace('{' + 'username' + '}', encodeURIComponent(String(username))) .replace('{' + 'duration' + '}', encodeURIComponent(String(duration))); // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") let authMethod: SecurityAuthentication | undefined; // Apply auth methods authMethod = _config.authMethods["bearerAuth"] if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default if (defaultAuth?.applySecurityAuthentication) { await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; }
/** * Create an API Token for a specified user, valid for duration seconds. * Create API Token for User. * @param username Username * @param duration Validity period (seconds) */
https://github.com/freechat-fun/freechat/blob/cb80c3708b85cf52c02a91bdc0c9e9ddc14856db/freechat-sdk/typescript/apis/AccountManagerForAdminApi.ts#L27-L65
cb80c3708b85cf52c02a91bdc0c9e9ddc14856db
freechat
github_2023
freechat-fun
typescript
AccountManagerForAdminApiRequestFactory.createUser
public async createUser(userFullDetailsDTO: UserFullDetailsDTO, _options?: Configuration): Promise<RequestContext> { let _config = _options || this.configuration; // verify required parameter 'userFullDetailsDTO' is not null or undefined if (userFullDetailsDTO === null || userFullDetailsDTO === undefined) { throw new RequiredError("AccountManagerForAdminApi", "createUser", "userFullDetailsDTO"); } // Path Params const localVarPath = '/api/v2/admin/user'; // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") // Body Params const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); requestContext.setHeaderParam("Content-Type", contentType); const serializedBody = ObjectSerializer.stringify( ObjectSerializer.serialize(userFullDetailsDTO, "UserFullDetailsDTO", ""), contentType ); requestContext.setBody(serializedBody); let authMethod: SecurityAuthentication | undefined; // Apply auth methods authMethod = _config.authMethods["bearerAuth"] if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default if (defaultAuth?.applySecurityAuthentication) { await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; }
/** * Create user. * Create User * @param userFullDetailsDTO User information */
https://github.com/freechat-fun/freechat/blob/cb80c3708b85cf52c02a91bdc0c9e9ddc14856db/freechat-sdk/typescript/apis/AccountManagerForAdminApi.ts#L72-L113
cb80c3708b85cf52c02a91bdc0c9e9ddc14856db
freechat
github_2023
freechat-fun
typescript
AccountManagerForAdminApiRequestFactory.deleteTokenForUser
public async deleteTokenForUser(token: string, _options?: Configuration): Promise<RequestContext> { let _config = _options || this.configuration; // verify required parameter 'token' is not null or undefined if (token === null || token === undefined) { throw new RequiredError("AccountManagerForAdminApi", "deleteTokenForUser", "token"); } // Path Params const localVarPath = '/api/v2/admin/token/{token}' .replace('{' + 'token' + '}', encodeURIComponent(String(token))); // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.DELETE); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") let authMethod: SecurityAuthentication | undefined; // Apply auth methods authMethod = _config.authMethods["bearerAuth"] if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default if (defaultAuth?.applySecurityAuthentication) { await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; }
/** * Delete the specified API Token. * Delete API Token * @param token API Token */
https://github.com/freechat-fun/freechat/blob/cb80c3708b85cf52c02a91bdc0c9e9ddc14856db/freechat-sdk/typescript/apis/AccountManagerForAdminApi.ts#L120-L151
cb80c3708b85cf52c02a91bdc0c9e9ddc14856db
freechat
github_2023
freechat-fun
typescript
AccountManagerForAdminApiRequestFactory.deleteUser
public async deleteUser(username: string, _options?: Configuration): Promise<RequestContext> { let _config = _options || this.configuration; // verify required parameter 'username' is not null or undefined if (username === null || username === undefined) { throw new RequiredError("AccountManagerForAdminApi", "deleteUser", "username"); } // Path Params const localVarPath = '/api/v2/admin/user/{username}' .replace('{' + 'username' + '}', encodeURIComponent(String(username))); // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.DELETE); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") let authMethod: SecurityAuthentication | undefined; // Apply auth methods authMethod = _config.authMethods["bearerAuth"] if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default if (defaultAuth?.applySecurityAuthentication) { await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; }
/** * Delete user by username. * Delete User * @param username Username */
https://github.com/freechat-fun/freechat/blob/cb80c3708b85cf52c02a91bdc0c9e9ddc14856db/freechat-sdk/typescript/apis/AccountManagerForAdminApi.ts#L158-L189
cb80c3708b85cf52c02a91bdc0c9e9ddc14856db
freechat
github_2023
freechat-fun
typescript
AccountManagerForAdminApiRequestFactory.disableTokenForUser
public async disableTokenForUser(token: string, _options?: Configuration): Promise<RequestContext> { let _config = _options || this.configuration; // verify required parameter 'token' is not null or undefined if (token === null || token === undefined) { throw new RequiredError("AccountManagerForAdminApi", "disableTokenForUser", "token"); } // Path Params const localVarPath = '/api/v2/admin/token/{token}' .replace('{' + 'token' + '}', encodeURIComponent(String(token))); // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.PUT); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") let authMethod: SecurityAuthentication | undefined; // Apply auth methods authMethod = _config.authMethods["bearerAuth"] if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default if (defaultAuth?.applySecurityAuthentication) { await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; }
/** * Disable the specified API Token. * Disable API Token * @param token API Token */
https://github.com/freechat-fun/freechat/blob/cb80c3708b85cf52c02a91bdc0c9e9ddc14856db/freechat-sdk/typescript/apis/AccountManagerForAdminApi.ts#L196-L227
cb80c3708b85cf52c02a91bdc0c9e9ddc14856db
freechat
github_2023
freechat-fun
typescript
AccountManagerForAdminApiRequestFactory.getDetailsOfUser
public async getDetailsOfUser(username: string, _options?: Configuration): Promise<RequestContext> { let _config = _options || this.configuration; // verify required parameter 'username' is not null or undefined if (username === null || username === undefined) { throw new RequiredError("AccountManagerForAdminApi", "getDetailsOfUser", "username"); } // Path Params const localVarPath = '/api/v2/admin/user/{username}' .replace('{' + 'username' + '}', encodeURIComponent(String(username))); // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") let authMethod: SecurityAuthentication | undefined; // Apply auth methods authMethod = _config.authMethods["bearerAuth"] if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default if (defaultAuth?.applySecurityAuthentication) { await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; }
/** * Return detailed user information. * Get User Details * @param username Username */
https://github.com/freechat-fun/freechat/blob/cb80c3708b85cf52c02a91bdc0c9e9ddc14856db/freechat-sdk/typescript/apis/AccountManagerForAdminApi.ts#L234-L265
cb80c3708b85cf52c02a91bdc0c9e9ddc14856db
freechat
github_2023
freechat-fun
typescript
AccountManagerForAdminApiRequestFactory.getUserByToken
public async getUserByToken(token: string, _options?: Configuration): Promise<RequestContext> { let _config = _options || this.configuration; // verify required parameter 'token' is not null or undefined if (token === null || token === undefined) { throw new RequiredError("AccountManagerForAdminApi", "getUserByToken", "token"); } // Path Params const localVarPath = '/api/v2/admin/tokenBy/{token}' .replace('{' + 'token' + '}', encodeURIComponent(String(token))); // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") let authMethod: SecurityAuthentication | undefined; // Apply auth methods authMethod = _config.authMethods["bearerAuth"] if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default if (defaultAuth?.applySecurityAuthentication) { await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; }
/** * Get the detailed user information corresponding to the API Token. * Get User by API Token * @param token API Token */
https://github.com/freechat-fun/freechat/blob/cb80c3708b85cf52c02a91bdc0c9e9ddc14856db/freechat-sdk/typescript/apis/AccountManagerForAdminApi.ts#L272-L303
cb80c3708b85cf52c02a91bdc0c9e9ddc14856db
freechat
github_2023
freechat-fun
typescript
AccountManagerForAdminApiRequestFactory.listAuthoritiesOfUser
public async listAuthoritiesOfUser(username: string, _options?: Configuration): Promise<RequestContext> { let _config = _options || this.configuration; // verify required parameter 'username' is not null or undefined if (username === null || username === undefined) { throw new RequiredError("AccountManagerForAdminApi", "listAuthoritiesOfUser", "username"); } // Path Params const localVarPath = '/api/v2/admin/authority/{username}' .replace('{' + 'username' + '}', encodeURIComponent(String(username))); // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") let authMethod: SecurityAuthentication | undefined; // Apply auth methods authMethod = _config.authMethods["bearerAuth"] if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default if (defaultAuth?.applySecurityAuthentication) { await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; }
/** * List the user\'s permissions. * List User Permissions * @param username Username */
https://github.com/freechat-fun/freechat/blob/cb80c3708b85cf52c02a91bdc0c9e9ddc14856db/freechat-sdk/typescript/apis/AccountManagerForAdminApi.ts#L310-L341
cb80c3708b85cf52c02a91bdc0c9e9ddc14856db
freechat
github_2023
freechat-fun
typescript
AccountManagerForAdminApiRequestFactory.listTokensOfUser
public async listTokensOfUser(username: string, _options?: Configuration): Promise<RequestContext> { let _config = _options || this.configuration; // verify required parameter 'username' is not null or undefined if (username === null || username === undefined) { throw new RequiredError("AccountManagerForAdminApi", "listTokensOfUser", "username"); } // Path Params const localVarPath = '/api/v2/admin/token/{username}' .replace('{' + 'username' + '}', encodeURIComponent(String(username))); // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") let authMethod: SecurityAuthentication | undefined; // Apply auth methods authMethod = _config.authMethods["bearerAuth"] if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default if (defaultAuth?.applySecurityAuthentication) { await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; }
/** * Get the list of API Tokens of the user. * Get API Token of User * @param username Username */
https://github.com/freechat-fun/freechat/blob/cb80c3708b85cf52c02a91bdc0c9e9ddc14856db/freechat-sdk/typescript/apis/AccountManagerForAdminApi.ts#L348-L379
cb80c3708b85cf52c02a91bdc0c9e9ddc14856db
freechat
github_2023
freechat-fun
typescript
AccountManagerForAdminApiRequestFactory.listUsers
public async listUsers(pageSize: number, pageNum: number, _options?: Configuration): Promise<RequestContext> { let _config = _options || this.configuration; // verify required parameter 'pageSize' is not null or undefined if (pageSize === null || pageSize === undefined) { throw new RequiredError("AccountManagerForAdminApi", "listUsers", "pageSize"); } // verify required parameter 'pageNum' is not null or undefined if (pageNum === null || pageNum === undefined) { throw new RequiredError("AccountManagerForAdminApi", "listUsers", "pageNum"); } // Path Params const localVarPath = '/api/v2/admin/users/{pageSize}/{pageNum}' .replace('{' + 'pageSize' + '}', encodeURIComponent(String(pageSize))) .replace('{' + 'pageNum' + '}', encodeURIComponent(String(pageNum))); // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") let authMethod: SecurityAuthentication | undefined; // Apply auth methods authMethod = _config.authMethods["bearerAuth"] if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default if (defaultAuth?.applySecurityAuthentication) { await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; }
/** * Return user information by page, return the pageNum page, up to pageSize user information. * List User Information * @param pageSize Maximum quantity * @param pageNum Current page number */
https://github.com/freechat-fun/freechat/blob/cb80c3708b85cf52c02a91bdc0c9e9ddc14856db/freechat-sdk/typescript/apis/AccountManagerForAdminApi.ts#L387-L425
cb80c3708b85cf52c02a91bdc0c9e9ddc14856db
freechat
github_2023
freechat-fun
typescript
AccountManagerForAdminApiRequestFactory.listUsers1
public async listUsers1(_options?: Configuration): Promise<RequestContext> { let _config = _options || this.configuration; // Path Params const localVarPath = '/api/v2/admin/users'; // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") let authMethod: SecurityAuthentication | undefined; // Apply auth methods authMethod = _config.authMethods["bearerAuth"] if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default if (defaultAuth?.applySecurityAuthentication) { await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; }
/** * Return user information by page, return the pageNum page, up to pageSize user information. * List User Information */
https://github.com/freechat-fun/freechat/blob/cb80c3708b85cf52c02a91bdc0c9e9ddc14856db/freechat-sdk/typescript/apis/AccountManagerForAdminApi.ts#L431-L455
cb80c3708b85cf52c02a91bdc0c9e9ddc14856db
freechat
github_2023
freechat-fun
typescript
AccountManagerForAdminApiRequestFactory.listUsers2
public async listUsers2(pageSize: number, _options?: Configuration): Promise<RequestContext> { let _config = _options || this.configuration; // verify required parameter 'pageSize' is not null or undefined if (pageSize === null || pageSize === undefined) { throw new RequiredError("AccountManagerForAdminApi", "listUsers2", "pageSize"); } // Path Params const localVarPath = '/api/v2/admin/users/{pageSize}' .replace('{' + 'pageSize' + '}', encodeURIComponent(String(pageSize))); // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") let authMethod: SecurityAuthentication | undefined; // Apply auth methods authMethod = _config.authMethods["bearerAuth"] if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default if (defaultAuth?.applySecurityAuthentication) { await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; }
/** * Return user information by page, return the pageNum page, up to pageSize user information. * List User Information * @param pageSize Maximum quantity */
https://github.com/freechat-fun/freechat/blob/cb80c3708b85cf52c02a91bdc0c9e9ddc14856db/freechat-sdk/typescript/apis/AccountManagerForAdminApi.ts#L462-L493
cb80c3708b85cf52c02a91bdc0c9e9ddc14856db
freechat
github_2023
freechat-fun
typescript
AccountManagerForAdminApiRequestFactory.updateAuthoritiesOfUser
public async updateAuthoritiesOfUser(username: string, requestBody: Set<string>, _options?: Configuration): Promise<RequestContext> { let _config = _options || this.configuration; // verify required parameter 'username' is not null or undefined if (username === null || username === undefined) { throw new RequiredError("AccountManagerForAdminApi", "updateAuthoritiesOfUser", "username"); } // verify required parameter 'requestBody' is not null or undefined if (requestBody === null || requestBody === undefined) { throw new RequiredError("AccountManagerForAdminApi", "updateAuthoritiesOfUser", "requestBody"); } // Path Params const localVarPath = '/api/v2/admin/authority/{username}' .replace('{' + 'username' + '}', encodeURIComponent(String(username))); // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.PUT); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") // Body Params const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); requestContext.setHeaderParam("Content-Type", contentType); const serializedBody = ObjectSerializer.stringify( ObjectSerializer.serialize(requestBody, "Set<string>", ""), contentType ); requestContext.setBody(serializedBody); let authMethod: SecurityAuthentication | undefined; // Apply auth methods authMethod = _config.authMethods["bearerAuth"] if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default if (defaultAuth?.applySecurityAuthentication) { await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; }
/** * Update the user\'s permission list. * Update User Permissions * @param username Username * @param requestBody Permission list */
https://github.com/freechat-fun/freechat/blob/cb80c3708b85cf52c02a91bdc0c9e9ddc14856db/freechat-sdk/typescript/apis/AccountManagerForAdminApi.ts#L501-L549
cb80c3708b85cf52c02a91bdc0c9e9ddc14856db
freechat
github_2023
freechat-fun
typescript
AccountManagerForAdminApiRequestFactory.updateUser
public async updateUser(userFullDetailsDTO: UserFullDetailsDTO, _options?: Configuration): Promise<RequestContext> { let _config = _options || this.configuration; // verify required parameter 'userFullDetailsDTO' is not null or undefined if (userFullDetailsDTO === null || userFullDetailsDTO === undefined) { throw new RequiredError("AccountManagerForAdminApi", "updateUser", "userFullDetailsDTO"); } // Path Params const localVarPath = '/api/v2/admin/user'; // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.PUT); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") // Body Params const contentType = ObjectSerializer.getPreferredMediaType([ "application/json" ]); requestContext.setHeaderParam("Content-Type", contentType); const serializedBody = ObjectSerializer.stringify( ObjectSerializer.serialize(userFullDetailsDTO, "UserFullDetailsDTO", ""), contentType ); requestContext.setBody(serializedBody); let authMethod: SecurityAuthentication | undefined; // Apply auth methods authMethod = _config.authMethods["bearerAuth"] if (authMethod?.applySecurityAuthentication) { await authMethod?.applySecurityAuthentication(requestContext); } const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default if (defaultAuth?.applySecurityAuthentication) { await defaultAuth?.applySecurityAuthentication(requestContext); } return requestContext; }
/** * Update user information. * Update User * @param userFullDetailsDTO User information */
https://github.com/freechat-fun/freechat/blob/cb80c3708b85cf52c02a91bdc0c9e9ddc14856db/freechat-sdk/typescript/apis/AccountManagerForAdminApi.ts#L556-L597
cb80c3708b85cf52c02a91bdc0c9e9ddc14856db
freechat
github_2023
freechat-fun
typescript
AccountManagerForAdminApiResponseProcessor.createTokenForUserWithHttpInfo
public async createTokenForUserWithHttpInfo(response: ResponseContext): Promise<HttpInfo<string >> { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body: string = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), "string", "" ) as string; return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); } // Work around for missing responses in specification, e.g. for petstore.yaml if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body: string = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), "string", "" ) as string; return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); } throw new ApiException<string | Blob | undefined>(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); }
/** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * * @params response Response returned by the server for a request to createTokenForUser * @throws ApiException if the response code was not in [200, 299] */
https://github.com/freechat-fun/freechat/blob/cb80c3708b85cf52c02a91bdc0c9e9ddc14856db/freechat-sdk/typescript/apis/AccountManagerForAdminApi.ts#L610-L630
cb80c3708b85cf52c02a91bdc0c9e9ddc14856db
freechat
github_2023
freechat-fun
typescript
AccountManagerForAdminApiResponseProcessor.createUserWithHttpInfo
public async createUserWithHttpInfo(response: ResponseContext): Promise<HttpInfo<boolean >> { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body: boolean = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), "boolean", "" ) as boolean; return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); } // Work around for missing responses in specification, e.g. for petstore.yaml if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body: boolean = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), "boolean", "" ) as boolean; return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); } throw new ApiException<string | Blob | undefined>(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); }
/** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * * @params response Response returned by the server for a request to createUser * @throws ApiException if the response code was not in [200, 299] */
https://github.com/freechat-fun/freechat/blob/cb80c3708b85cf52c02a91bdc0c9e9ddc14856db/freechat-sdk/typescript/apis/AccountManagerForAdminApi.ts#L639-L659
cb80c3708b85cf52c02a91bdc0c9e9ddc14856db
freechat
github_2023
freechat-fun
typescript
AccountManagerForAdminApiResponseProcessor.deleteTokenForUserWithHttpInfo
public async deleteTokenForUserWithHttpInfo(response: ResponseContext): Promise<HttpInfo<boolean >> { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body: boolean = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), "boolean", "" ) as boolean; return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); } // Work around for missing responses in specification, e.g. for petstore.yaml if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body: boolean = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), "boolean", "" ) as boolean; return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); } throw new ApiException<string | Blob | undefined>(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); }
/** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * * @params response Response returned by the server for a request to deleteTokenForUser * @throws ApiException if the response code was not in [200, 299] */
https://github.com/freechat-fun/freechat/blob/cb80c3708b85cf52c02a91bdc0c9e9ddc14856db/freechat-sdk/typescript/apis/AccountManagerForAdminApi.ts#L668-L688
cb80c3708b85cf52c02a91bdc0c9e9ddc14856db
freechat
github_2023
freechat-fun
typescript
AccountManagerForAdminApiResponseProcessor.deleteUserWithHttpInfo
public async deleteUserWithHttpInfo(response: ResponseContext): Promise<HttpInfo<boolean >> { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body: boolean = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), "boolean", "" ) as boolean; return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); } // Work around for missing responses in specification, e.g. for petstore.yaml if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body: boolean = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), "boolean", "" ) as boolean; return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); } throw new ApiException<string | Blob | undefined>(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); }
/** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * * @params response Response returned by the server for a request to deleteUser * @throws ApiException if the response code was not in [200, 299] */
https://github.com/freechat-fun/freechat/blob/cb80c3708b85cf52c02a91bdc0c9e9ddc14856db/freechat-sdk/typescript/apis/AccountManagerForAdminApi.ts#L697-L717
cb80c3708b85cf52c02a91bdc0c9e9ddc14856db
freechat
github_2023
freechat-fun
typescript
AccountManagerForAdminApiResponseProcessor.disableTokenForUserWithHttpInfo
public async disableTokenForUserWithHttpInfo(response: ResponseContext): Promise<HttpInfo<boolean >> { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body: boolean = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), "boolean", "" ) as boolean; return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); } // Work around for missing responses in specification, e.g. for petstore.yaml if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body: boolean = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), "boolean", "" ) as boolean; return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); } throw new ApiException<string | Blob | undefined>(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); }
/** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * * @params response Response returned by the server for a request to disableTokenForUser * @throws ApiException if the response code was not in [200, 299] */
https://github.com/freechat-fun/freechat/blob/cb80c3708b85cf52c02a91bdc0c9e9ddc14856db/freechat-sdk/typescript/apis/AccountManagerForAdminApi.ts#L726-L746
cb80c3708b85cf52c02a91bdc0c9e9ddc14856db
freechat
github_2023
freechat-fun
typescript
AccountManagerForAdminApiResponseProcessor.getDetailsOfUserWithHttpInfo
public async getDetailsOfUserWithHttpInfo(response: ResponseContext): Promise<HttpInfo<UserDetailsDTO >> { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body: UserDetailsDTO = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), "UserDetailsDTO", "" ) as UserDetailsDTO; return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); } // Work around for missing responses in specification, e.g. for petstore.yaml if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body: UserDetailsDTO = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), "UserDetailsDTO", "" ) as UserDetailsDTO; return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); } throw new ApiException<string | Blob | undefined>(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); }
/** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * * @params response Response returned by the server for a request to getDetailsOfUser * @throws ApiException if the response code was not in [200, 299] */
https://github.com/freechat-fun/freechat/blob/cb80c3708b85cf52c02a91bdc0c9e9ddc14856db/freechat-sdk/typescript/apis/AccountManagerForAdminApi.ts#L755-L775
cb80c3708b85cf52c02a91bdc0c9e9ddc14856db
freechat
github_2023
freechat-fun
typescript
AccountManagerForAdminApiResponseProcessor.getUserByTokenWithHttpInfo
public async getUserByTokenWithHttpInfo(response: ResponseContext): Promise<HttpInfo<UserDetailsDTO >> { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body: UserDetailsDTO = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), "UserDetailsDTO", "" ) as UserDetailsDTO; return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); } // Work around for missing responses in specification, e.g. for petstore.yaml if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body: UserDetailsDTO = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), "UserDetailsDTO", "" ) as UserDetailsDTO; return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); } throw new ApiException<string | Blob | undefined>(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); }
/** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * * @params response Response returned by the server for a request to getUserByToken * @throws ApiException if the response code was not in [200, 299] */
https://github.com/freechat-fun/freechat/blob/cb80c3708b85cf52c02a91bdc0c9e9ddc14856db/freechat-sdk/typescript/apis/AccountManagerForAdminApi.ts#L784-L804
cb80c3708b85cf52c02a91bdc0c9e9ddc14856db