repo_name
string
dataset
string
owner
string
lang
string
func_name
string
code
string
docstring
string
url
string
sha
string
freechat
github_2023
freechat-fun
typescript
OrganizationApiRequestFactory.getSubordinateSubordinates
public async getSubordinateSubordinates(username: string, all?: 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("OrganizationApi", "getSubordinateSubordinates", "username"); } // Path Params const localVarPath = '/api/v2/org/manage/{username}/subordinates' .replace('{' + 'username' + '}', encodeURIComponent(String(username))); // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") // Query Params if (all !== undefined) { requestContext.setQueryParam("all", ObjectSerializer.serialize(all, "string", "")); } 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 subordinate relationship of the subordinate account, including direct and indirect subordinates, default does not include virtual managed subordinates, so there will be no circular relationship.<br/>By specifying all=1, virtual managed subordinates can be returned, in this case, there may be a circular relationship. * Get Subordinate Relationship * @param username The account being queried, must be a subordinate account of the current account * @param all Whether to return virtual managed subordinates */
https://github.com/freechat-fun/freechat/blob/cb80c3708b85cf52c02a91bdc0c9e9ddc14856db/freechat-sdk/typescript/apis/OrganizationApi.ts#L142-L179
cb80c3708b85cf52c02a91bdc0c9e9ddc14856db
freechat
github_2023
freechat-fun
typescript
OrganizationApiRequestFactory.getSubordinates
public async getSubordinates(all?: string, _options?: Configuration): Promise<RequestContext> { let _config = _options || this.configuration; // Path Params const localVarPath = '/api/v2/org/subordinates'; // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") // Query Params if (all !== undefined) { requestContext.setQueryParam("all", ObjectSerializer.serialize(all, "string", "")); } 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 subordinate relationships of the current account, including direct and indirect subordinates, by default does not include virtual managed subordinates, so there will be no circular relationship.<br/>By specifying all=1, virtual managed subordinates can be returned, in this case, there may be a circular relationship. * Get My Subordinate Relationship * @param all Whether to return virtual managed subordinates */
https://github.com/freechat-fun/freechat/blob/cb80c3708b85cf52c02a91bdc0c9e9ddc14856db/freechat-sdk/typescript/apis/OrganizationApi.ts#L186-L216
cb80c3708b85cf52c02a91bdc0c9e9ddc14856db
freechat
github_2023
freechat-fun
typescript
OrganizationApiRequestFactory.getSubordinatesDot
public async getSubordinatesDot(all?: string, _options?: Configuration): Promise<RequestContext> { let _config = _options || this.configuration; // Path Params const localVarPath = '/api/v2/org/subordinates/dot'; // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") // Query Params if (all !== undefined) { requestContext.setQueryParam("all", ObjectSerializer.serialize(all, "string", "")); } 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; }
/** * Same as /api/v2/org/subordinates, but returns a DOT format view, DOT reference: [graphviz](https://www.graphviz.org/) * Get DOT of Subordinate Relationship * @param all Whether to return virtual managed subordinates */
https://github.com/freechat-fun/freechat/blob/cb80c3708b85cf52c02a91bdc0c9e9ddc14856db/freechat-sdk/typescript/apis/OrganizationApi.ts#L223-L253
cb80c3708b85cf52c02a91bdc0c9e9ddc14856db
freechat
github_2023
freechat-fun
typescript
OrganizationApiRequestFactory.listSubordinateAuthorities
public async listSubordinateAuthorities(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("OrganizationApi", "listSubordinateAuthorities", "username"); } // Path Params const localVarPath = '/api/v2/org/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 permission list of the subordinate account. * List Subordinate Permissions * @param username Username */
https://github.com/freechat-fun/freechat/blob/cb80c3708b85cf52c02a91bdc0c9e9ddc14856db/freechat-sdk/typescript/apis/OrganizationApi.ts#L260-L291
cb80c3708b85cf52c02a91bdc0c9e9ddc14856db
freechat
github_2023
freechat-fun
typescript
OrganizationApiRequestFactory.removeSubordinateSubordinatesTree
public async removeSubordinateSubordinatesTree(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("OrganizationApi", "removeSubordinateSubordinatesTree", "username"); } // Path Params const localVarPath = '/api/v2/org/manage/{username}/subordinates' .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; }
/** * Fully delete the direct subordinate relationship of the subordinate account. * Clear Subordinate Relationship * @param username The account being operated, must be a subordinate account of the current account */
https://github.com/freechat-fun/freechat/blob/cb80c3708b85cf52c02a91bdc0c9e9ddc14856db/freechat-sdk/typescript/apis/OrganizationApi.ts#L298-L329
cb80c3708b85cf52c02a91bdc0c9e9ddc14856db
freechat
github_2023
freechat-fun
typescript
OrganizationApiRequestFactory.updateSubordinateAuthorities
public async updateSubordinateAuthorities(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("OrganizationApi", "updateSubordinateAuthorities", "username"); } // verify required parameter 'requestBody' is not null or undefined if (requestBody === null || requestBody === undefined) { throw new RequiredError("OrganizationApi", "updateSubordinateAuthorities", "requestBody"); } // Path Params const localVarPath = '/api/v2/org/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 permission list of the subordinate account, the granted permissions cannot be higher than the permissions owned by oneself, for example, a resource administrator cannot grant the role of an organization administrator to a subordinate account. * Update Subordinate Permissions * @param username Username * @param requestBody Permission list */
https://github.com/freechat-fun/freechat/blob/cb80c3708b85cf52c02a91bdc0c9e9ddc14856db/freechat-sdk/typescript/apis/OrganizationApi.ts#L337-L385
cb80c3708b85cf52c02a91bdc0c9e9ddc14856db
freechat
github_2023
freechat-fun
typescript
OrganizationApiRequestFactory.updateSubordinateOwners
public async updateSubordinateOwners(username: string, requestBody: Array<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("OrganizationApi", "updateSubordinateOwners", "username"); } // verify required parameter 'requestBody' is not null or undefined if (requestBody === null || requestBody === undefined) { throw new RequiredError("OrganizationApi", "updateSubordinateOwners", "requestBody"); } // Path Params const localVarPath = '/api/v2/org/manage/{username}/owners' .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, "Array<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; }
/** * Fully update the direct superior relationship of the subordinate account (i.e., will delete the relationship that existed before but is not in this list), if there is a circular relationship, it will automatically be set as a virtual relationship. * Update Superior Relationship * @param username The account being operated, must be a subordinate account of the current account * @param requestBody The (direct) superior account of the subordinate account, all accounts must be subordinate accounts of the current account */
https://github.com/freechat-fun/freechat/blob/cb80c3708b85cf52c02a91bdc0c9e9ddc14856db/freechat-sdk/typescript/apis/OrganizationApi.ts#L393-L441
cb80c3708b85cf52c02a91bdc0c9e9ddc14856db
freechat
github_2023
freechat-fun
typescript
OrganizationApiRequestFactory.updateSubordinateSubordinates
public async updateSubordinateSubordinates(username: string, requestBody: Array<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("OrganizationApi", "updateSubordinateSubordinates", "username"); } // verify required parameter 'requestBody' is not null or undefined if (requestBody === null || requestBody === undefined) { throw new RequiredError("OrganizationApi", "updateSubordinateSubordinates", "requestBody"); } // Path Params const localVarPath = '/api/v2/org/manage/{username}/subordinates' .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, "Array<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; }
/** * Fully update the direct subordinate relationship of the subordinate account (i.e., will delete the relationship that existed before but is not in this list), if there is a circular relationship, it will automatically be set as a virtual relationship. * Update Subordinate Relationship * @param username The account being operated, must be a subordinate account of the current account * @param requestBody The (direct) subordinate account of the subordinate account, all accounts must be subordinate accounts of the current account */
https://github.com/freechat-fun/freechat/blob/cb80c3708b85cf52c02a91bdc0c9e9ddc14856db/freechat-sdk/typescript/apis/OrganizationApi.ts#L449-L497
cb80c3708b85cf52c02a91bdc0c9e9ddc14856db
freechat
github_2023
freechat-fun
typescript
OrganizationApiResponseProcessor.getOwnersWithHttpInfo
public async getOwnersWithHttpInfo(response: ResponseContext): Promise<HttpInfo<Array<string> >> { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body: Array<string> = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), "Array<string>", "" ) as Array<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: Array<string> = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), "Array<string>", "" ) as Array<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 getOwners * @throws ApiException if the response code was not in [200, 299] */
https://github.com/freechat-fun/freechat/blob/cb80c3708b85cf52c02a91bdc0c9e9ddc14856db/freechat-sdk/typescript/apis/OrganizationApi.ts#L510-L530
cb80c3708b85cf52c02a91bdc0c9e9ddc14856db
freechat
github_2023
freechat-fun
typescript
OrganizationApiResponseProcessor.getOwnersDotWithHttpInfo
public async getOwnersDotWithHttpInfo(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 getOwnersDot * @throws ApiException if the response code was not in [200, 299] */
https://github.com/freechat-fun/freechat/blob/cb80c3708b85cf52c02a91bdc0c9e9ddc14856db/freechat-sdk/typescript/apis/OrganizationApi.ts#L539-L559
cb80c3708b85cf52c02a91bdc0c9e9ddc14856db
freechat
github_2023
freechat-fun
typescript
OrganizationApiResponseProcessor.getSubordinateOwnersWithHttpInfo
public async getSubordinateOwnersWithHttpInfo(response: ResponseContext): Promise<HttpInfo<Array<string> >> { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body: Array<string> = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), "Array<string>", "" ) as Array<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: Array<string> = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), "Array<string>", "" ) as Array<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 getSubordinateOwners * @throws ApiException if the response code was not in [200, 299] */
https://github.com/freechat-fun/freechat/blob/cb80c3708b85cf52c02a91bdc0c9e9ddc14856db/freechat-sdk/typescript/apis/OrganizationApi.ts#L568-L588
cb80c3708b85cf52c02a91bdc0c9e9ddc14856db
freechat
github_2023
freechat-fun
typescript
OrganizationApiResponseProcessor.getSubordinateSubordinatesWithHttpInfo
public async getSubordinateSubordinatesWithHttpInfo(response: ResponseContext): Promise<HttpInfo<Array<string> >> { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body: Array<string> = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), "Array<string>", "" ) as Array<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: Array<string> = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), "Array<string>", "" ) as Array<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 getSubordinateSubordinates * @throws ApiException if the response code was not in [200, 299] */
https://github.com/freechat-fun/freechat/blob/cb80c3708b85cf52c02a91bdc0c9e9ddc14856db/freechat-sdk/typescript/apis/OrganizationApi.ts#L597-L617
cb80c3708b85cf52c02a91bdc0c9e9ddc14856db
freechat
github_2023
freechat-fun
typescript
OrganizationApiResponseProcessor.getSubordinatesWithHttpInfo
public async getSubordinatesWithHttpInfo(response: ResponseContext): Promise<HttpInfo<Array<string> >> { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body: Array<string> = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), "Array<string>", "" ) as Array<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: Array<string> = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), "Array<string>", "" ) as Array<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 getSubordinates * @throws ApiException if the response code was not in [200, 299] */
https://github.com/freechat-fun/freechat/blob/cb80c3708b85cf52c02a91bdc0c9e9ddc14856db/freechat-sdk/typescript/apis/OrganizationApi.ts#L626-L646
cb80c3708b85cf52c02a91bdc0c9e9ddc14856db
freechat
github_2023
freechat-fun
typescript
OrganizationApiResponseProcessor.getSubordinatesDotWithHttpInfo
public async getSubordinatesDotWithHttpInfo(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 getSubordinatesDot * @throws ApiException if the response code was not in [200, 299] */
https://github.com/freechat-fun/freechat/blob/cb80c3708b85cf52c02a91bdc0c9e9ddc14856db/freechat-sdk/typescript/apis/OrganizationApi.ts#L655-L675
cb80c3708b85cf52c02a91bdc0c9e9ddc14856db
freechat
github_2023
freechat-fun
typescript
OrganizationApiResponseProcessor.listSubordinateAuthoritiesWithHttpInfo
public async listSubordinateAuthoritiesWithHttpInfo(response: ResponseContext): Promise<HttpInfo<Array<string> >> { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body: Array<string> = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), "Array<string>", "" ) as Array<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: Array<string> = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), "Array<string>", "" ) as Array<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 listSubordinateAuthorities * @throws ApiException if the response code was not in [200, 299] */
https://github.com/freechat-fun/freechat/blob/cb80c3708b85cf52c02a91bdc0c9e9ddc14856db/freechat-sdk/typescript/apis/OrganizationApi.ts#L684-L704
cb80c3708b85cf52c02a91bdc0c9e9ddc14856db
freechat
github_2023
freechat-fun
typescript
OrganizationApiResponseProcessor.removeSubordinateSubordinatesTreeWithHttpInfo
public async removeSubordinateSubordinatesTreeWithHttpInfo(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 removeSubordinateSubordinatesTree * @throws ApiException if the response code was not in [200, 299] */
https://github.com/freechat-fun/freechat/blob/cb80c3708b85cf52c02a91bdc0c9e9ddc14856db/freechat-sdk/typescript/apis/OrganizationApi.ts#L713-L733
cb80c3708b85cf52c02a91bdc0c9e9ddc14856db
freechat
github_2023
freechat-fun
typescript
OrganizationApiResponseProcessor.updateSubordinateAuthoritiesWithHttpInfo
public async updateSubordinateAuthoritiesWithHttpInfo(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 updateSubordinateAuthorities * @throws ApiException if the response code was not in [200, 299] */
https://github.com/freechat-fun/freechat/blob/cb80c3708b85cf52c02a91bdc0c9e9ddc14856db/freechat-sdk/typescript/apis/OrganizationApi.ts#L742-L762
cb80c3708b85cf52c02a91bdc0c9e9ddc14856db
freechat
github_2023
freechat-fun
typescript
OrganizationApiResponseProcessor.updateSubordinateOwnersWithHttpInfo
public async updateSubordinateOwnersWithHttpInfo(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 updateSubordinateOwners * @throws ApiException if the response code was not in [200, 299] */
https://github.com/freechat-fun/freechat/blob/cb80c3708b85cf52c02a91bdc0c9e9ddc14856db/freechat-sdk/typescript/apis/OrganizationApi.ts#L771-L791
cb80c3708b85cf52c02a91bdc0c9e9ddc14856db
freechat
github_2023
freechat-fun
typescript
OrganizationApiResponseProcessor.updateSubordinateSubordinatesWithHttpInfo
public async updateSubordinateSubordinatesWithHttpInfo(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 updateSubordinateSubordinates * @throws ApiException if the response code was not in [200, 299] */
https://github.com/freechat-fun/freechat/blob/cb80c3708b85cf52c02a91bdc0c9e9ddc14856db/freechat-sdk/typescript/apis/OrganizationApi.ts#L800-L820
cb80c3708b85cf52c02a91bdc0c9e9ddc14856db
freechat
github_2023
freechat-fun
typescript
PluginApiRequestFactory.batchSearchPluginDetails
public async batchSearchPluginDetails(pluginQueryDTO: Array<PluginQueryDTO>, _options?: Configuration): Promise<RequestContext> { let _config = _options || this.configuration; // verify required parameter 'pluginQueryDTO' is not null or undefined if (pluginQueryDTO === null || pluginQueryDTO === undefined) { throw new RequiredError("PluginApi", "batchSearchPluginDetails", "pluginQueryDTO"); } // Path Params const localVarPath = '/api/v2/plugin/batch/details/search'; // 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(pluginQueryDTO, "Array<PluginQueryDTO>", ""), 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; }
/** * Batch call shortcut for /api/v2/plugin/details/search. * Batch Search Plugin Details * @param pluginQueryDTO Query conditions */
https://github.com/freechat-fun/freechat/blob/cb80c3708b85cf52c02a91bdc0c9e9ddc14856db/freechat-sdk/typescript/apis/PluginApi.ts#L27-L68
cb80c3708b85cf52c02a91bdc0c9e9ddc14856db
freechat
github_2023
freechat-fun
typescript
PluginApiRequestFactory.batchSearchPluginSummary
public async batchSearchPluginSummary(pluginQueryDTO: Array<PluginQueryDTO>, _options?: Configuration): Promise<RequestContext> { let _config = _options || this.configuration; // verify required parameter 'pluginQueryDTO' is not null or undefined if (pluginQueryDTO === null || pluginQueryDTO === undefined) { throw new RequiredError("PluginApi", "batchSearchPluginSummary", "pluginQueryDTO"); } // Path Params const localVarPath = '/api/v2/plugin/batch/search'; // 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(pluginQueryDTO, "Array<PluginQueryDTO>", ""), 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; }
/** * Batch call shortcut for /api/v2/plugin/search. * Batch Search Plugin Summaries * @param pluginQueryDTO Query conditions */
https://github.com/freechat-fun/freechat/blob/cb80c3708b85cf52c02a91bdc0c9e9ddc14856db/freechat-sdk/typescript/apis/PluginApi.ts#L75-L116
cb80c3708b85cf52c02a91bdc0c9e9ddc14856db
freechat
github_2023
freechat-fun
typescript
PluginApiRequestFactory.countPlugins
public async countPlugins(pluginQueryDTO: PluginQueryDTO, _options?: Configuration): Promise<RequestContext> { let _config = _options || this.configuration; // verify required parameter 'pluginQueryDTO' is not null or undefined if (pluginQueryDTO === null || pluginQueryDTO === undefined) { throw new RequiredError("PluginApi", "countPlugins", "pluginQueryDTO"); } // Path Params const localVarPath = '/api/v2/plugin/count'; // 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(pluginQueryDTO, "PluginQueryDTO", ""), 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; }
/** * Calculate the number of plugins according to the specified query conditions. * Calculate Number of Plugins * @param pluginQueryDTO Query conditions */
https://github.com/freechat-fun/freechat/blob/cb80c3708b85cf52c02a91bdc0c9e9ddc14856db/freechat-sdk/typescript/apis/PluginApi.ts#L123-L164
cb80c3708b85cf52c02a91bdc0c9e9ddc14856db
freechat
github_2023
freechat-fun
typescript
PluginApiRequestFactory.createPlugin
public async createPlugin(pluginCreateDTO: PluginCreateDTO, _options?: Configuration): Promise<RequestContext> { let _config = _options || this.configuration; // verify required parameter 'pluginCreateDTO' is not null or undefined if (pluginCreateDTO === null || pluginCreateDTO === undefined) { throw new RequiredError("PluginApi", "createPlugin", "pluginCreateDTO"); } // Path Params const localVarPath = '/api/v2/plugin'; // 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(pluginCreateDTO, "PluginCreateDTO", ""), 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 a plugin, required fields: - Plugin name - Plugin manifestInfo (URL or JSON) - Plugin apiInfo (URL or JSON) Limitations: - Name: 100 characters - Example: 2000 characters - Tags: 5 * Create Plugin * @param pluginCreateDTO Information of the plugin to be created */
https://github.com/freechat-fun/freechat/blob/cb80c3708b85cf52c02a91bdc0c9e9ddc14856db/freechat-sdk/typescript/apis/PluginApi.ts#L171-L212
cb80c3708b85cf52c02a91bdc0c9e9ddc14856db
freechat
github_2023
freechat-fun
typescript
PluginApiRequestFactory.createPlugins
public async createPlugins(pluginCreateDTO: Array<PluginCreateDTO>, _options?: Configuration): Promise<RequestContext> { let _config = _options || this.configuration; // verify required parameter 'pluginCreateDTO' is not null or undefined if (pluginCreateDTO === null || pluginCreateDTO === undefined) { throw new RequiredError("PluginApi", "createPlugins", "pluginCreateDTO"); } // Path Params const localVarPath = '/api/v2/plugin/batch'; // 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(pluginCreateDTO, "Array<PluginCreateDTO>", ""), 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; }
/** * Batch create multiple plugins. Ensure transactionality, return the pluginId list after success. * Batch Create Plugins * @param pluginCreateDTO List of plugin information to be created */
https://github.com/freechat-fun/freechat/blob/cb80c3708b85cf52c02a91bdc0c9e9ddc14856db/freechat-sdk/typescript/apis/PluginApi.ts#L219-L260
cb80c3708b85cf52c02a91bdc0c9e9ddc14856db
freechat
github_2023
freechat-fun
typescript
PluginApiRequestFactory.deletePlugin
public async deletePlugin(pluginId: number, _options?: Configuration): Promise<RequestContext> { let _config = _options || this.configuration; // verify required parameter 'pluginId' is not null or undefined if (pluginId === null || pluginId === undefined) { throw new RequiredError("PluginApi", "deletePlugin", "pluginId"); } // Path Params const localVarPath = '/api/v2/plugin/{pluginId}' .replace('{' + 'pluginId' + '}', encodeURIComponent(String(pluginId))); // 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 plugin. Returns success or failure. * Delete Plugin * @param pluginId The pluginId to be deleted */
https://github.com/freechat-fun/freechat/blob/cb80c3708b85cf52c02a91bdc0c9e9ddc14856db/freechat-sdk/typescript/apis/PluginApi.ts#L267-L298
cb80c3708b85cf52c02a91bdc0c9e9ddc14856db
freechat
github_2023
freechat-fun
typescript
PluginApiRequestFactory.deletePlugins
public async deletePlugins(requestBody: Array<number>, _options?: Configuration): Promise<RequestContext> { let _config = _options || this.configuration; // verify required parameter 'requestBody' is not null or undefined if (requestBody === null || requestBody === undefined) { throw new RequiredError("PluginApi", "deletePlugins", "requestBody"); } // Path Params const localVarPath = '/api/v2/plugin/batch'; // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.DELETE); 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, "Array<number>", ""), 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; }
/** * Delete multiple plugins. Ensure transactionality, return the list of successfully deleted pluginIds. * Batch Delete Plugins * @param requestBody List of pluginIds to be deleted */
https://github.com/freechat-fun/freechat/blob/cb80c3708b85cf52c02a91bdc0c9e9ddc14856db/freechat-sdk/typescript/apis/PluginApi.ts#L305-L346
cb80c3708b85cf52c02a91bdc0c9e9ddc14856db
freechat
github_2023
freechat-fun
typescript
PluginApiRequestFactory.getPluginDetails
public async getPluginDetails(pluginId: number, _options?: Configuration): Promise<RequestContext> { let _config = _options || this.configuration; // verify required parameter 'pluginId' is not null or undefined if (pluginId === null || pluginId === undefined) { throw new RequiredError("PluginApi", "getPluginDetails", "pluginId"); } // Path Params const localVarPath = '/api/v2/plugin/details/{pluginId}' .replace('{' + 'pluginId' + '}', encodeURIComponent(String(pluginId))); // 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 plugin detailed information. * Get Plugin Details * @param pluginId PluginId to be obtained */
https://github.com/freechat-fun/freechat/blob/cb80c3708b85cf52c02a91bdc0c9e9ddc14856db/freechat-sdk/typescript/apis/PluginApi.ts#L353-L384
cb80c3708b85cf52c02a91bdc0c9e9ddc14856db
freechat
github_2023
freechat-fun
typescript
PluginApiRequestFactory.getPluginSummary
public async getPluginSummary(pluginId: number, _options?: Configuration): Promise<RequestContext> { let _config = _options || this.configuration; // verify required parameter 'pluginId' is not null or undefined if (pluginId === null || pluginId === undefined) { throw new RequiredError("PluginApi", "getPluginSummary", "pluginId"); } // Path Params const localVarPath = '/api/v2/plugin/summary/{pluginId}' .replace('{' + 'pluginId' + '}', encodeURIComponent(String(pluginId))); // 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 plugin summary information. * Get Plugin Summary * @param pluginId PluginId to be obtained */
https://github.com/freechat-fun/freechat/blob/cb80c3708b85cf52c02a91bdc0c9e9ddc14856db/freechat-sdk/typescript/apis/PluginApi.ts#L391-L422
cb80c3708b85cf52c02a91bdc0c9e9ddc14856db
freechat
github_2023
freechat-fun
typescript
PluginApiRequestFactory.refreshPluginInfo
public async refreshPluginInfo(pluginId: number, _options?: Configuration): Promise<RequestContext> { let _config = _options || this.configuration; // verify required parameter 'pluginId' is not null or undefined if (pluginId === null || pluginId === undefined) { throw new RequiredError("PluginApi", "refreshPluginInfo", "pluginId"); } // Path Params const localVarPath = '/api/v2/plugin/refresh/{pluginId}' .replace('{' + 'pluginId' + '}', encodeURIComponent(String(pluginId))); // 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; }
/** * For online manifest, api-docs information provided at the time of entry, this interface can immediately refresh the information in the system cache (default cache time is 1 hour). Generally, there is no need to call, unless you know that the corresponding plugin platform has just updated the interface, and the business side wants to get the latest information immediately, then call this interface to delete the system cache. * Refresh Plugin Information * @param pluginId The pluginId to be fetched */
https://github.com/freechat-fun/freechat/blob/cb80c3708b85cf52c02a91bdc0c9e9ddc14856db/freechat-sdk/typescript/apis/PluginApi.ts#L429-L460
cb80c3708b85cf52c02a91bdc0c9e9ddc14856db
freechat
github_2023
freechat-fun
typescript
PluginApiRequestFactory.searchPluginDetails
public async searchPluginDetails(pluginQueryDTO: PluginQueryDTO, _options?: Configuration): Promise<RequestContext> { let _config = _options || this.configuration; // verify required parameter 'pluginQueryDTO' is not null or undefined if (pluginQueryDTO === null || pluginQueryDTO === undefined) { throw new RequiredError("PluginApi", "searchPluginDetails", "pluginQueryDTO"); } // Path Params const localVarPath = '/api/v2/plugin/details/search'; // 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(pluginQueryDTO, "PluginQueryDTO", ""), 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; }
/** * Same as /api/v2/plugin/search, but returns detailed information of the plugin. * Search Plugin Details * @param pluginQueryDTO Query conditions */
https://github.com/freechat-fun/freechat/blob/cb80c3708b85cf52c02a91bdc0c9e9ddc14856db/freechat-sdk/typescript/apis/PluginApi.ts#L467-L508
cb80c3708b85cf52c02a91bdc0c9e9ddc14856db
freechat
github_2023
freechat-fun
typescript
PluginApiRequestFactory.searchPluginSummary
public async searchPluginSummary(pluginQueryDTO: PluginQueryDTO, _options?: Configuration): Promise<RequestContext> { let _config = _options || this.configuration; // verify required parameter 'pluginQueryDTO' is not null or undefined if (pluginQueryDTO === null || pluginQueryDTO === undefined) { throw new RequiredError("PluginApi", "searchPluginSummary", "pluginQueryDTO"); } // Path Params const localVarPath = '/api/v2/plugin/search'; // 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(pluginQueryDTO, "PluginQueryDTO", ""), 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; }
/** * Search plugins: - Specifiable query fields, and relationship: - Scope: private, public_org or public. Private can only search this account. - Username: exact match, only valid when searching public, public_org. If not specified, search all users. - Plugin information format: currently supported: dash_scope, open_ai. - Interface information format: currently supported: openapi_v3. - Tags: exact match (support and, or logic). - Model type: exact match (support and, or logic). - Name: left match. - Provider: left match. - General: name, provider information, manifest (real-time pull mode is not currently supported), fuzzy match, one hit is enough; public scope + all user\'s general search does not guarantee timeliness. - A certain sorting rule can be specified, such as view count, reference count, rating, time, descending or ascending. - The search result is the plugin summary content. - Support pagination. * Search Plugin Summary * @param pluginQueryDTO Query conditions */
https://github.com/freechat-fun/freechat/blob/cb80c3708b85cf52c02a91bdc0c9e9ddc14856db/freechat-sdk/typescript/apis/PluginApi.ts#L515-L556
cb80c3708b85cf52c02a91bdc0c9e9ddc14856db
freechat
github_2023
freechat-fun
typescript
PluginApiRequestFactory.updatePlugin
public async updatePlugin(pluginId: number, pluginUpdateDTO: PluginUpdateDTO, _options?: Configuration): Promise<RequestContext> { let _config = _options || this.configuration; // verify required parameter 'pluginId' is not null or undefined if (pluginId === null || pluginId === undefined) { throw new RequiredError("PluginApi", "updatePlugin", "pluginId"); } // verify required parameter 'pluginUpdateDTO' is not null or undefined if (pluginUpdateDTO === null || pluginUpdateDTO === undefined) { throw new RequiredError("PluginApi", "updatePlugin", "pluginUpdateDTO"); } // Path Params const localVarPath = '/api/v2/plugin/{pluginId}' .replace('{' + 'pluginId' + '}', encodeURIComponent(String(pluginId))); // 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(pluginUpdateDTO, "PluginUpdateDTO", ""), 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 plugin, refer to /api/v2/plugin/create, required field: pluginId. Returns success or failure. * Update Plugin * @param pluginId The pluginId to be updated * @param pluginUpdateDTO The plugin information to be updated */
https://github.com/freechat-fun/freechat/blob/cb80c3708b85cf52c02a91bdc0c9e9ddc14856db/freechat-sdk/typescript/apis/PluginApi.ts#L564-L612
cb80c3708b85cf52c02a91bdc0c9e9ddc14856db
freechat
github_2023
freechat-fun
typescript
PluginApiResponseProcessor.batchSearchPluginDetailsWithHttpInfo
public async batchSearchPluginDetailsWithHttpInfo(response: ResponseContext): Promise<HttpInfo<Array<Array<PluginDetailsDTO>> >> { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body: Array<Array<PluginDetailsDTO>> = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), "Array<Array<PluginDetailsDTO>>", "" ) as Array<Array<PluginDetailsDTO>>; 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<Array<PluginDetailsDTO>> = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), "Array<Array<PluginDetailsDTO>>", "" ) as Array<Array<PluginDetailsDTO>>; 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 batchSearchPluginDetails * @throws ApiException if the response code was not in [200, 299] */
https://github.com/freechat-fun/freechat/blob/cb80c3708b85cf52c02a91bdc0c9e9ddc14856db/freechat-sdk/typescript/apis/PluginApi.ts#L625-L645
cb80c3708b85cf52c02a91bdc0c9e9ddc14856db
freechat
github_2023
freechat-fun
typescript
PluginApiResponseProcessor.batchSearchPluginSummaryWithHttpInfo
public async batchSearchPluginSummaryWithHttpInfo(response: ResponseContext): Promise<HttpInfo<Array<Array<PluginSummaryDTO>> >> { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body: Array<Array<PluginSummaryDTO>> = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), "Array<Array<PluginSummaryDTO>>", "" ) as Array<Array<PluginSummaryDTO>>; 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<Array<PluginSummaryDTO>> = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), "Array<Array<PluginSummaryDTO>>", "" ) as Array<Array<PluginSummaryDTO>>; 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 batchSearchPluginSummary * @throws ApiException if the response code was not in [200, 299] */
https://github.com/freechat-fun/freechat/blob/cb80c3708b85cf52c02a91bdc0c9e9ddc14856db/freechat-sdk/typescript/apis/PluginApi.ts#L654-L674
cb80c3708b85cf52c02a91bdc0c9e9ddc14856db
freechat
github_2023
freechat-fun
typescript
PluginApiResponseProcessor.countPluginsWithHttpInfo
public async countPluginsWithHttpInfo(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 countPlugins * @throws ApiException if the response code was not in [200, 299] */
https://github.com/freechat-fun/freechat/blob/cb80c3708b85cf52c02a91bdc0c9e9ddc14856db/freechat-sdk/typescript/apis/PluginApi.ts#L683-L703
cb80c3708b85cf52c02a91bdc0c9e9ddc14856db
freechat
github_2023
freechat-fun
typescript
PluginApiResponseProcessor.createPluginWithHttpInfo
public async createPluginWithHttpInfo(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 createPlugin * @throws ApiException if the response code was not in [200, 299] */
https://github.com/freechat-fun/freechat/blob/cb80c3708b85cf52c02a91bdc0c9e9ddc14856db/freechat-sdk/typescript/apis/PluginApi.ts#L712-L732
cb80c3708b85cf52c02a91bdc0c9e9ddc14856db
freechat
github_2023
freechat-fun
typescript
PluginApiResponseProcessor.createPluginsWithHttpInfo
public async createPluginsWithHttpInfo(response: ResponseContext): Promise<HttpInfo<Array<number> >> { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body: Array<number> = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), "Array<number>", "int64" ) as Array<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: Array<number> = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), "Array<number>", "int64" ) as Array<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 createPlugins * @throws ApiException if the response code was not in [200, 299] */
https://github.com/freechat-fun/freechat/blob/cb80c3708b85cf52c02a91bdc0c9e9ddc14856db/freechat-sdk/typescript/apis/PluginApi.ts#L741-L761
cb80c3708b85cf52c02a91bdc0c9e9ddc14856db
freechat
github_2023
freechat-fun
typescript
PluginApiResponseProcessor.deletePluginWithHttpInfo
public async deletePluginWithHttpInfo(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 deletePlugin * @throws ApiException if the response code was not in [200, 299] */
https://github.com/freechat-fun/freechat/blob/cb80c3708b85cf52c02a91bdc0c9e9ddc14856db/freechat-sdk/typescript/apis/PluginApi.ts#L770-L790
cb80c3708b85cf52c02a91bdc0c9e9ddc14856db
freechat
github_2023
freechat-fun
typescript
PluginApiResponseProcessor.deletePluginsWithHttpInfo
public async deletePluginsWithHttpInfo(response: ResponseContext): Promise<HttpInfo<Array<number> >> { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body: Array<number> = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), "Array<number>", "int64" ) as Array<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: Array<number> = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), "Array<number>", "int64" ) as Array<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 deletePlugins * @throws ApiException if the response code was not in [200, 299] */
https://github.com/freechat-fun/freechat/blob/cb80c3708b85cf52c02a91bdc0c9e9ddc14856db/freechat-sdk/typescript/apis/PluginApi.ts#L799-L819
cb80c3708b85cf52c02a91bdc0c9e9ddc14856db
freechat
github_2023
freechat-fun
typescript
PluginApiResponseProcessor.getPluginDetailsWithHttpInfo
public async getPluginDetailsWithHttpInfo(response: ResponseContext): Promise<HttpInfo<PluginDetailsDTO >> { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body: PluginDetailsDTO = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), "PluginDetailsDTO", "" ) as PluginDetailsDTO; 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: PluginDetailsDTO = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), "PluginDetailsDTO", "" ) as PluginDetailsDTO; 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 getPluginDetails * @throws ApiException if the response code was not in [200, 299] */
https://github.com/freechat-fun/freechat/blob/cb80c3708b85cf52c02a91bdc0c9e9ddc14856db/freechat-sdk/typescript/apis/PluginApi.ts#L828-L848
cb80c3708b85cf52c02a91bdc0c9e9ddc14856db
freechat
github_2023
freechat-fun
typescript
PluginApiResponseProcessor.getPluginSummaryWithHttpInfo
public async getPluginSummaryWithHttpInfo(response: ResponseContext): Promise<HttpInfo<PluginSummaryDTO >> { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body: PluginSummaryDTO = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), "PluginSummaryDTO", "" ) as PluginSummaryDTO; 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: PluginSummaryDTO = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), "PluginSummaryDTO", "" ) as PluginSummaryDTO; 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 getPluginSummary * @throws ApiException if the response code was not in [200, 299] */
https://github.com/freechat-fun/freechat/blob/cb80c3708b85cf52c02a91bdc0c9e9ddc14856db/freechat-sdk/typescript/apis/PluginApi.ts#L857-L877
cb80c3708b85cf52c02a91bdc0c9e9ddc14856db
freechat
github_2023
freechat-fun
typescript
PluginApiResponseProcessor.refreshPluginInfoWithHttpInfo
public async refreshPluginInfoWithHttpInfo(response: ResponseContext): Promise<HttpInfo<void >> { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { return new HttpInfo(response.httpStatusCode, response.headers, response.body, undefined); } // Work around for missing responses in specification, e.g. for petstore.yaml if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { const body: void = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), "void", "" ) as void; 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 refreshPluginInfo * @throws ApiException if the response code was not in [200, 299] */
https://github.com/freechat-fun/freechat/blob/cb80c3708b85cf52c02a91bdc0c9e9ddc14856db/freechat-sdk/typescript/apis/PluginApi.ts#L886-L902
cb80c3708b85cf52c02a91bdc0c9e9ddc14856db
freechat
github_2023
freechat-fun
typescript
PluginApiResponseProcessor.searchPluginDetailsWithHttpInfo
public async searchPluginDetailsWithHttpInfo(response: ResponseContext): Promise<HttpInfo<Array<PluginDetailsDTO> >> { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body: Array<PluginDetailsDTO> = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), "Array<PluginDetailsDTO>", "" ) as Array<PluginDetailsDTO>; 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<PluginDetailsDTO> = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), "Array<PluginDetailsDTO>", "" ) as Array<PluginDetailsDTO>; 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 searchPluginDetails * @throws ApiException if the response code was not in [200, 299] */
https://github.com/freechat-fun/freechat/blob/cb80c3708b85cf52c02a91bdc0c9e9ddc14856db/freechat-sdk/typescript/apis/PluginApi.ts#L911-L931
cb80c3708b85cf52c02a91bdc0c9e9ddc14856db
freechat
github_2023
freechat-fun
typescript
PluginApiResponseProcessor.searchPluginSummaryWithHttpInfo
public async searchPluginSummaryWithHttpInfo(response: ResponseContext): Promise<HttpInfo<Array<PluginSummaryDTO> >> { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body: Array<PluginSummaryDTO> = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), "Array<PluginSummaryDTO>", "" ) as Array<PluginSummaryDTO>; 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<PluginSummaryDTO> = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), "Array<PluginSummaryDTO>", "" ) as Array<PluginSummaryDTO>; 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 searchPluginSummary * @throws ApiException if the response code was not in [200, 299] */
https://github.com/freechat-fun/freechat/blob/cb80c3708b85cf52c02a91bdc0c9e9ddc14856db/freechat-sdk/typescript/apis/PluginApi.ts#L940-L960
cb80c3708b85cf52c02a91bdc0c9e9ddc14856db
freechat
github_2023
freechat-fun
typescript
PluginApiResponseProcessor.updatePluginWithHttpInfo
public async updatePluginWithHttpInfo(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 updatePlugin * @throws ApiException if the response code was not in [200, 299] */
https://github.com/freechat-fun/freechat/blob/cb80c3708b85cf52c02a91bdc0c9e9ddc14856db/freechat-sdk/typescript/apis/PluginApi.ts#L969-L989
cb80c3708b85cf52c02a91bdc0c9e9ddc14856db
freechat
github_2023
freechat-fun
typescript
PromptApiRequestFactory.applyPromptRef
public async applyPromptRef(promptRefDTO: PromptRefDTO, _options?: Configuration): Promise<RequestContext> { let _config = _options || this.configuration; // verify required parameter 'promptRefDTO' is not null or undefined if (promptRefDTO === null || promptRefDTO === undefined) { throw new RequiredError("PromptApi", "applyPromptRef", "promptRefDTO"); } // Path Params const localVarPath = '/api/v2/prompt/apply/ref'; // 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(promptRefDTO, "PromptRefDTO", ""), 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; }
/** * Apply parameters to prompt record. * Apply Parameters to Prompt Record * @param promptRefDTO Prompt record */
https://github.com/freechat-fun/freechat/blob/cb80c3708b85cf52c02a91bdc0c9e9ddc14856db/freechat-sdk/typescript/apis/PromptApi.ts#L33-L74
cb80c3708b85cf52c02a91bdc0c9e9ddc14856db
freechat
github_2023
freechat-fun
typescript
PromptApiRequestFactory.applyPromptTemplate
public async applyPromptTemplate(promptTemplateDTO: PromptTemplateDTO, _options?: Configuration): Promise<RequestContext> { let _config = _options || this.configuration; // verify required parameter 'promptTemplateDTO' is not null or undefined if (promptTemplateDTO === null || promptTemplateDTO === undefined) { throw new RequiredError("PromptApi", "applyPromptTemplate", "promptTemplateDTO"); } // Path Params const localVarPath = '/api/v2/prompt/apply/template'; // 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(promptTemplateDTO, "PromptTemplateDTO", ""), 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; }
/** * Apply parameters to prompt template. * Apply Parameters to Prompt Template * @param promptTemplateDTO String type prompt template */
https://github.com/freechat-fun/freechat/blob/cb80c3708b85cf52c02a91bdc0c9e9ddc14856db/freechat-sdk/typescript/apis/PromptApi.ts#L81-L122
cb80c3708b85cf52c02a91bdc0c9e9ddc14856db
freechat
github_2023
freechat-fun
typescript
PromptApiRequestFactory.batchSearchPromptDetails
public async batchSearchPromptDetails(promptQueryDTO: Array<PromptQueryDTO>, _options?: Configuration): Promise<RequestContext> { let _config = _options || this.configuration; // verify required parameter 'promptQueryDTO' is not null or undefined if (promptQueryDTO === null || promptQueryDTO === undefined) { throw new RequiredError("PromptApi", "batchSearchPromptDetails", "promptQueryDTO"); } // Path Params const localVarPath = '/api/v2/prompt/batch/details/search'; // 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(promptQueryDTO, "Array<PromptQueryDTO>", ""), 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; }
/** * Batch call shortcut for /api/v2/prompt/details/search. * Batch Search Prompt Details * @param promptQueryDTO Query conditions */
https://github.com/freechat-fun/freechat/blob/cb80c3708b85cf52c02a91bdc0c9e9ddc14856db/freechat-sdk/typescript/apis/PromptApi.ts#L129-L170
cb80c3708b85cf52c02a91bdc0c9e9ddc14856db
freechat
github_2023
freechat-fun
typescript
PromptApiRequestFactory.batchSearchPromptSummary
public async batchSearchPromptSummary(promptQueryDTO: Array<PromptQueryDTO>, _options?: Configuration): Promise<RequestContext> { let _config = _options || this.configuration; // verify required parameter 'promptQueryDTO' is not null or undefined if (promptQueryDTO === null || promptQueryDTO === undefined) { throw new RequiredError("PromptApi", "batchSearchPromptSummary", "promptQueryDTO"); } // Path Params const localVarPath = '/api/v2/prompt/batch/search'; // 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(promptQueryDTO, "Array<PromptQueryDTO>", ""), 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; }
/** * Batch call shortcut for /api/v2/prompt/search. * Batch Search Prompt Summaries * @param promptQueryDTO Query conditions */
https://github.com/freechat-fun/freechat/blob/cb80c3708b85cf52c02a91bdc0c9e9ddc14856db/freechat-sdk/typescript/apis/PromptApi.ts#L177-L218
cb80c3708b85cf52c02a91bdc0c9e9ddc14856db
freechat
github_2023
freechat-fun
typescript
PromptApiRequestFactory.clonePrompt
public async clonePrompt(promptId: number, _options?: Configuration): Promise<RequestContext> { let _config = _options || this.configuration; // verify required parameter 'promptId' is not null or undefined if (promptId === null || promptId === undefined) { throw new RequiredError("PromptApi", "clonePrompt", "promptId"); } // Path Params const localVarPath = '/api/v2/prompt/clone/{promptId}' .replace('{' + 'promptId' + '}', encodeURIComponent(String(promptId))); // 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; }
/** * Enter the promptId, generate a new record, the content is basically the same as the original prompt, but the following fields are different: - Version number is 1 - Visibility is private - The parent prompt is the source promptId - The creation time is the current moment. - All statistical indicators are zeroed. Return the new promptId. * Clone Prompt * @param promptId The referenced promptId */
https://github.com/freechat-fun/freechat/blob/cb80c3708b85cf52c02a91bdc0c9e9ddc14856db/freechat-sdk/typescript/apis/PromptApi.ts#L225-L256
cb80c3708b85cf52c02a91bdc0c9e9ddc14856db
freechat
github_2023
freechat-fun
typescript
PromptApiRequestFactory.clonePrompts
public async clonePrompts(requestBody: Array<number>, _options?: Configuration): Promise<RequestContext> { let _config = _options || this.configuration; // verify required parameter 'requestBody' is not null or undefined if (requestBody === null || requestBody === undefined) { throw new RequiredError("PromptApi", "clonePrompts", "requestBody"); } // Path Params const localVarPath = '/api/v2/prompt/batch/clone'; // 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(requestBody, "Array<number>", ""), 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; }
/** * Batch clone multiple prompts. Ensure transactionality, return the promptId list after success. * Batch Clone Prompts * @param requestBody List of prompt information to be created */
https://github.com/freechat-fun/freechat/blob/cb80c3708b85cf52c02a91bdc0c9e9ddc14856db/freechat-sdk/typescript/apis/PromptApi.ts#L263-L304
cb80c3708b85cf52c02a91bdc0c9e9ddc14856db
freechat
github_2023
freechat-fun
typescript
PromptApiRequestFactory.countPrompts
public async countPrompts(promptQueryDTO: PromptQueryDTO, _options?: Configuration): Promise<RequestContext> { let _config = _options || this.configuration; // verify required parameter 'promptQueryDTO' is not null or undefined if (promptQueryDTO === null || promptQueryDTO === undefined) { throw new RequiredError("PromptApi", "countPrompts", "promptQueryDTO"); } // Path Params const localVarPath = '/api/v2/prompt/count'; // 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(promptQueryDTO, "PromptQueryDTO", ""), 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; }
/** * Calculate the number of prompts according to the specified query conditions. * Calculate Number of Prompts * @param promptQueryDTO Query conditions */
https://github.com/freechat-fun/freechat/blob/cb80c3708b85cf52c02a91bdc0c9e9ddc14856db/freechat-sdk/typescript/apis/PromptApi.ts#L311-L352
cb80c3708b85cf52c02a91bdc0c9e9ddc14856db
freechat
github_2023
freechat-fun
typescript
PromptApiRequestFactory.countPublicPrompts
public async countPublicPrompts(promptQueryDTO: PromptQueryDTO, _options?: Configuration): Promise<RequestContext> { let _config = _options || this.configuration; // verify required parameter 'promptQueryDTO' is not null or undefined if (promptQueryDTO === null || promptQueryDTO === undefined) { throw new RequiredError("PromptApi", "countPublicPrompts", "promptQueryDTO"); } // Path Params const localVarPath = '/api/v2/public/prompt/count'; // 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(promptQueryDTO, "PromptQueryDTO", ""), 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; }
/** * Calculate the number of prompts according to the specified query conditions. * Calculate Number of Public Prompts * @param promptQueryDTO Query conditions */
https://github.com/freechat-fun/freechat/blob/cb80c3708b85cf52c02a91bdc0c9e9ddc14856db/freechat-sdk/typescript/apis/PromptApi.ts#L359-L400
cb80c3708b85cf52c02a91bdc0c9e9ddc14856db
freechat
github_2023
freechat-fun
typescript
PromptApiRequestFactory.createPrompt
public async createPrompt(promptCreateDTO: PromptCreateDTO, _options?: Configuration): Promise<RequestContext> { let _config = _options || this.configuration; // verify required parameter 'promptCreateDTO' is not null or undefined if (promptCreateDTO === null || promptCreateDTO === undefined) { throw new RequiredError("PromptApi", "createPrompt", "promptCreateDTO"); } // Path Params const localVarPath = '/api/v2/prompt'; // 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(promptCreateDTO, "PromptCreateDTO", ""), 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 a prompt, required fields: - Prompt name - Prompt content - Applicable model Limitations: - Description: 300 characters - Template: 1000 characters - Example: 2000 characters - Tags: 5 - Parameters: 10 * Create Prompt * @param promptCreateDTO Information of the prompt to be created */
https://github.com/freechat-fun/freechat/blob/cb80c3708b85cf52c02a91bdc0c9e9ddc14856db/freechat-sdk/typescript/apis/PromptApi.ts#L407-L448
cb80c3708b85cf52c02a91bdc0c9e9ddc14856db
freechat
github_2023
freechat-fun
typescript
PromptApiRequestFactory.createPrompts
public async createPrompts(promptCreateDTO: Array<PromptCreateDTO>, _options?: Configuration): Promise<RequestContext> { let _config = _options || this.configuration; // verify required parameter 'promptCreateDTO' is not null or undefined if (promptCreateDTO === null || promptCreateDTO === undefined) { throw new RequiredError("PromptApi", "createPrompts", "promptCreateDTO"); } // Path Params const localVarPath = '/api/v2/prompt/batch'; // 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(promptCreateDTO, "Array<PromptCreateDTO>", ""), 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; }
/** * Batch create multiple prompts. Ensure transactionality, return the promptId list after success. * Batch Create Prompts * @param promptCreateDTO List of prompt information to be created */
https://github.com/freechat-fun/freechat/blob/cb80c3708b85cf52c02a91bdc0c9e9ddc14856db/freechat-sdk/typescript/apis/PromptApi.ts#L455-L496
cb80c3708b85cf52c02a91bdc0c9e9ddc14856db
freechat
github_2023
freechat-fun
typescript
PromptApiRequestFactory.deletePrompt
public async deletePrompt(promptId: number, _options?: Configuration): Promise<RequestContext> { let _config = _options || this.configuration; // verify required parameter 'promptId' is not null or undefined if (promptId === null || promptId === undefined) { throw new RequiredError("PromptApi", "deletePrompt", "promptId"); } // Path Params const localVarPath = '/api/v2/prompt/{promptId}' .replace('{' + 'promptId' + '}', encodeURIComponent(String(promptId))); // 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 prompt. Returns success or failure. * Delete Prompt * @param promptId The promptId to be deleted */
https://github.com/freechat-fun/freechat/blob/cb80c3708b85cf52c02a91bdc0c9e9ddc14856db/freechat-sdk/typescript/apis/PromptApi.ts#L503-L534
cb80c3708b85cf52c02a91bdc0c9e9ddc14856db
freechat
github_2023
freechat-fun
typescript
PromptApiRequestFactory.deletePromptByName
public async deletePromptByName(name: string, _options?: Configuration): Promise<RequestContext> { let _config = _options || this.configuration; // verify required parameter 'name' is not null or undefined if (name === null || name === undefined) { throw new RequiredError("PromptApi", "deletePromptByName", "name"); } // Path Params const localVarPath = '/api/v2/prompt/name/{name}' .replace('{' + 'name' + '}', encodeURIComponent(String(name))); // 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 prompt by name. return the list of successfully deleted promptIds. * Delete Prompt by Name * @param name The prompt name to be deleted */
https://github.com/freechat-fun/freechat/blob/cb80c3708b85cf52c02a91bdc0c9e9ddc14856db/freechat-sdk/typescript/apis/PromptApi.ts#L541-L572
cb80c3708b85cf52c02a91bdc0c9e9ddc14856db
freechat
github_2023
freechat-fun
typescript
PromptApiRequestFactory.deletePrompts
public async deletePrompts(requestBody: Array<number>, _options?: Configuration): Promise<RequestContext> { let _config = _options || this.configuration; // verify required parameter 'requestBody' is not null or undefined if (requestBody === null || requestBody === undefined) { throw new RequiredError("PromptApi", "deletePrompts", "requestBody"); } // Path Params const localVarPath = '/api/v2/prompt/batch'; // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.DELETE); 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, "Array<number>", ""), 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; }
/** * Delete multiple prompts. Ensure transactionality, return the list of successfully deleted promptIds. * Batch Delete Prompts * @param requestBody List of promptIds to be deleted */
https://github.com/freechat-fun/freechat/blob/cb80c3708b85cf52c02a91bdc0c9e9ddc14856db/freechat-sdk/typescript/apis/PromptApi.ts#L579-L620
cb80c3708b85cf52c02a91bdc0c9e9ddc14856db
freechat
github_2023
freechat-fun
typescript
PromptApiRequestFactory.existsPromptName
public async existsPromptName(name: string, _options?: Configuration): Promise<RequestContext> { let _config = _options || this.configuration; // verify required parameter 'name' is not null or undefined if (name === null || name === undefined) { throw new RequiredError("PromptApi", "existsPromptName", "name"); } // Path Params const localVarPath = '/api/v2/prompt/exists/name/{name}' .replace('{' + 'name' + '}', encodeURIComponent(String(name))); // 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; }
/** * Check if the prompt name already exists. * Check If Prompt Name Exists * @param name Name */
https://github.com/freechat-fun/freechat/blob/cb80c3708b85cf52c02a91bdc0c9e9ddc14856db/freechat-sdk/typescript/apis/PromptApi.ts#L627-L658
cb80c3708b85cf52c02a91bdc0c9e9ddc14856db
freechat
github_2023
freechat-fun
typescript
PromptApiRequestFactory.getPromptDetails
public async getPromptDetails(promptId: number, _options?: Configuration): Promise<RequestContext> { let _config = _options || this.configuration; // verify required parameter 'promptId' is not null or undefined if (promptId === null || promptId === undefined) { throw new RequiredError("PromptApi", "getPromptDetails", "promptId"); } // Path Params const localVarPath = '/api/v2/prompt/details/{promptId}' .replace('{' + 'promptId' + '}', encodeURIComponent(String(promptId))); // 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 prompt detailed information. * Get Prompt Details * @param promptId PromptId to be obtained */
https://github.com/freechat-fun/freechat/blob/cb80c3708b85cf52c02a91bdc0c9e9ddc14856db/freechat-sdk/typescript/apis/PromptApi.ts#L665-L696
cb80c3708b85cf52c02a91bdc0c9e9ddc14856db
freechat
github_2023
freechat-fun
typescript
PromptApiRequestFactory.getPromptSummary
public async getPromptSummary(promptId: number, _options?: Configuration): Promise<RequestContext> { let _config = _options || this.configuration; // verify required parameter 'promptId' is not null or undefined if (promptId === null || promptId === undefined) { throw new RequiredError("PromptApi", "getPromptSummary", "promptId"); } // Path Params const localVarPath = '/api/v2/prompt/summary/{promptId}' .replace('{' + 'promptId' + '}', encodeURIComponent(String(promptId))); // 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 prompt summary information. * Get Prompt Summary * @param promptId PromptId to be obtained */
https://github.com/freechat-fun/freechat/blob/cb80c3708b85cf52c02a91bdc0c9e9ddc14856db/freechat-sdk/typescript/apis/PromptApi.ts#L703-L734
cb80c3708b85cf52c02a91bdc0c9e9ddc14856db
freechat
github_2023
freechat-fun
typescript
PromptApiRequestFactory.listPromptVersionsByName
public async listPromptVersionsByName(name: string, _options?: Configuration): Promise<RequestContext> { let _config = _options || this.configuration; // verify required parameter 'name' is not null or undefined if (name === null || name === undefined) { throw new RequiredError("PromptApi", "listPromptVersionsByName", "name"); } // Path Params const localVarPath = '/api/v2/prompt/versions/{name}' .replace('{' + 'name' + '}', encodeURIComponent(String(name))); // 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; }
/** * List the versions and corresponding promptIds by prompt name. * List Versions by Prompt Name * @param name Prompt name */
https://github.com/freechat-fun/freechat/blob/cb80c3708b85cf52c02a91bdc0c9e9ddc14856db/freechat-sdk/typescript/apis/PromptApi.ts#L741-L772
cb80c3708b85cf52c02a91bdc0c9e9ddc14856db
freechat
github_2023
freechat-fun
typescript
PromptApiRequestFactory.newPromptName
public async newPromptName(desired: string, _options?: Configuration): Promise<RequestContext> { let _config = _options || this.configuration; // verify required parameter 'desired' is not null or undefined if (desired === null || desired === undefined) { throw new RequiredError("PromptApi", "newPromptName", "desired"); } // Path Params const localVarPath = '/api/v2/prompt/create/name/{desired}' .replace('{' + 'desired' + '}', encodeURIComponent(String(desired))); // 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; }
/** * Create a new prompt name starting with a desired name. * Create New Prompt Name * @param desired Desired name */
https://github.com/freechat-fun/freechat/blob/cb80c3708b85cf52c02a91bdc0c9e9ddc14856db/freechat-sdk/typescript/apis/PromptApi.ts#L779-L810
cb80c3708b85cf52c02a91bdc0c9e9ddc14856db
freechat
github_2023
freechat-fun
typescript
PromptApiRequestFactory.publishPrompt
public async publishPrompt(promptId: number, visibility: string, _options?: Configuration): Promise<RequestContext> { let _config = _options || this.configuration; // verify required parameter 'promptId' is not null or undefined if (promptId === null || promptId === undefined) { throw new RequiredError("PromptApi", "publishPrompt", "promptId"); } // verify required parameter 'visibility' is not null or undefined if (visibility === null || visibility === undefined) { throw new RequiredError("PromptApi", "publishPrompt", "visibility"); } // Path Params const localVarPath = '/api/v2/prompt/publish/{promptId}/{visibility}' .replace('{' + 'promptId' + '}', encodeURIComponent(String(promptId))) .replace('{' + 'visibility' + '}', encodeURIComponent(String(visibility))); // 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; }
/** * Publish prompt, draft content becomes formal content, version number increases by 1. After successful publication, a new promptId will be generated and returned. You need to specify the visibility for publication. * Publish Prompt * @param promptId The promptId to be published * @param visibility Visibility: public | private | ... */
https://github.com/freechat-fun/freechat/blob/cb80c3708b85cf52c02a91bdc0c9e9ddc14856db/freechat-sdk/typescript/apis/PromptApi.ts#L818-L856
cb80c3708b85cf52c02a91bdc0c9e9ddc14856db
freechat
github_2023
freechat-fun
typescript
PromptApiRequestFactory.searchPromptDetails
public async searchPromptDetails(promptQueryDTO: PromptQueryDTO, _options?: Configuration): Promise<RequestContext> { let _config = _options || this.configuration; // verify required parameter 'promptQueryDTO' is not null or undefined if (promptQueryDTO === null || promptQueryDTO === undefined) { throw new RequiredError("PromptApi", "searchPromptDetails", "promptQueryDTO"); } // Path Params const localVarPath = '/api/v2/prompt/details/search'; // 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(promptQueryDTO, "PromptQueryDTO", ""), 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; }
/** * Same as /api/v2/prompt/search, but returns detailed information of the prompt. * Search Prompt Details * @param promptQueryDTO Query conditions */
https://github.com/freechat-fun/freechat/blob/cb80c3708b85cf52c02a91bdc0c9e9ddc14856db/freechat-sdk/typescript/apis/PromptApi.ts#L863-L904
cb80c3708b85cf52c02a91bdc0c9e9ddc14856db
freechat
github_2023
freechat-fun
typescript
PromptApiRequestFactory.searchPromptSummary
public async searchPromptSummary(promptQueryDTO: PromptQueryDTO, _options?: Configuration): Promise<RequestContext> { let _config = _options || this.configuration; // verify required parameter 'promptQueryDTO' is not null or undefined if (promptQueryDTO === null || promptQueryDTO === undefined) { throw new RequiredError("PromptApi", "searchPromptSummary", "promptQueryDTO"); } // Path Params const localVarPath = '/api/v2/prompt/search'; // 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(promptQueryDTO, "PromptQueryDTO", ""), 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; }
/** * Search prompts: - Specifiable query fields, and relationship: - Scope: private, public_org or public. Private can only search this account. - Username: exact match, only valid when searching public, public_org. If not specified, search all users. - Tags: exact match (support and, or logic). - Model type: exact match (support and, or logic). - Name: left match. - Type, exact match: string (default) | chat. - Language, exact match. - General: name, description, template, example, fuzzy match, one hit is enough; public scope + all user\'s general search does not guarantee timeliness. - A certain sorting rule can be specified, such as view count, reference count, rating, time, descending or ascending. - The search result is the prompt summary content. - Support pagination. * Search Prompt Summary * @param promptQueryDTO Query conditions */
https://github.com/freechat-fun/freechat/blob/cb80c3708b85cf52c02a91bdc0c9e9ddc14856db/freechat-sdk/typescript/apis/PromptApi.ts#L911-L952
cb80c3708b85cf52c02a91bdc0c9e9ddc14856db
freechat
github_2023
freechat-fun
typescript
PromptApiRequestFactory.searchPublicPromptSummary
public async searchPublicPromptSummary(promptQueryDTO: PromptQueryDTO, _options?: Configuration): Promise<RequestContext> { let _config = _options || this.configuration; // verify required parameter 'promptQueryDTO' is not null or undefined if (promptQueryDTO === null || promptQueryDTO === undefined) { throw new RequiredError("PromptApi", "searchPublicPromptSummary", "promptQueryDTO"); } // Path Params const localVarPath = '/api/v2/public/prompt/search'; // 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(promptQueryDTO, "PromptQueryDTO", ""), 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; }
/** * Search prompts: - Specifiable query fields, and relationship: - Scope: public(fixed). - Username: exact match. If not specified, search all users. - Tags: exact match (support and, or logic). - Model type: exact match (support and, or logic). - Name: left match. - Type, exact match: string (default) | chat. - Language, exact match. - General: name, description, template, example, fuzzy match, one hit is enough; public scope + all user\'s general search does not guarantee timeliness. - A certain sorting rule can be specified, such as view count, reference count, rating, time, descending or ascending. - The search result is the prompt summary content. - Support pagination. * Search Public Prompt Summary * @param promptQueryDTO Query conditions */
https://github.com/freechat-fun/freechat/blob/cb80c3708b85cf52c02a91bdc0c9e9ddc14856db/freechat-sdk/typescript/apis/PromptApi.ts#L959-L1000
cb80c3708b85cf52c02a91bdc0c9e9ddc14856db
freechat
github_2023
freechat-fun
typescript
PromptApiRequestFactory.sendPrompt
public async sendPrompt(promptAiParamDTO: PromptAiParamDTO, _options?: Configuration): Promise<RequestContext> { let _config = _options || this.configuration; // verify required parameter 'promptAiParamDTO' is not null or undefined if (promptAiParamDTO === null || promptAiParamDTO === undefined) { throw new RequiredError("PromptApi", "sendPrompt", "promptAiParamDTO"); } // Path Params const localVarPath = '/api/v2/prompt/send'; // 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(promptAiParamDTO, "PromptAiParamDTO", ""), 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; }
/** * Send the prompt to the AI service. Note that if the embedding model is called, the return is an embedding array, placed in the details field of the result; the original text is in the text field of the result. * Send Prompt * @param promptAiParamDTO Call parameters */
https://github.com/freechat-fun/freechat/blob/cb80c3708b85cf52c02a91bdc0c9e9ddc14856db/freechat-sdk/typescript/apis/PromptApi.ts#L1007-L1048
cb80c3708b85cf52c02a91bdc0c9e9ddc14856db
freechat
github_2023
freechat-fun
typescript
PromptApiRequestFactory.streamSendPrompt
public async streamSendPrompt(promptAiParamDTO: PromptAiParamDTO, _options?: Configuration): Promise<RequestContext> { let _config = _options || this.configuration; // verify required parameter 'promptAiParamDTO' is not null or undefined if (promptAiParamDTO === null || promptAiParamDTO === undefined) { throw new RequiredError("PromptApi", "streamSendPrompt", "promptAiParamDTO"); } // Path Params const localVarPath = '/api/v2/prompt/send/stream'; // 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(promptAiParamDTO, "PromptAiParamDTO", ""), 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; }
/** * Refer to /api/v2/prompt/send, stream back chunks of the response. * Send Prompt by Streaming Back * @param promptAiParamDTO Call parameters */
https://github.com/freechat-fun/freechat/blob/cb80c3708b85cf52c02a91bdc0c9e9ddc14856db/freechat-sdk/typescript/apis/PromptApi.ts#L1055-L1096
cb80c3708b85cf52c02a91bdc0c9e9ddc14856db
freechat
github_2023
freechat-fun
typescript
PromptApiRequestFactory.updatePrompt
public async updatePrompt(promptId: number, promptUpdateDTO: PromptUpdateDTO, _options?: Configuration): Promise<RequestContext> { let _config = _options || this.configuration; // verify required parameter 'promptId' is not null or undefined if (promptId === null || promptId === undefined) { throw new RequiredError("PromptApi", "updatePrompt", "promptId"); } // verify required parameter 'promptUpdateDTO' is not null or undefined if (promptUpdateDTO === null || promptUpdateDTO === undefined) { throw new RequiredError("PromptApi", "updatePrompt", "promptUpdateDTO"); } // Path Params const localVarPath = '/api/v2/prompt/{promptId}' .replace('{' + 'promptId' + '}', encodeURIComponent(String(promptId))); // 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(promptUpdateDTO, "PromptUpdateDTO", ""), 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 prompt, refer to /api/v2/prompt/create, required field: promptId. Returns success or failure. * Update Prompt * @param promptId The promptId to be updated * @param promptUpdateDTO The prompt information to be updated */
https://github.com/freechat-fun/freechat/blob/cb80c3708b85cf52c02a91bdc0c9e9ddc14856db/freechat-sdk/typescript/apis/PromptApi.ts#L1104-L1152
cb80c3708b85cf52c02a91bdc0c9e9ddc14856db
freechat
github_2023
freechat-fun
typescript
PromptApiResponseProcessor.applyPromptRefWithHttpInfo
public async applyPromptRefWithHttpInfo(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 applyPromptRef * @throws ApiException if the response code was not in [200, 299] */
https://github.com/freechat-fun/freechat/blob/cb80c3708b85cf52c02a91bdc0c9e9ddc14856db/freechat-sdk/typescript/apis/PromptApi.ts#L1165-L1185
cb80c3708b85cf52c02a91bdc0c9e9ddc14856db
freechat
github_2023
freechat-fun
typescript
PromptApiResponseProcessor.applyPromptTemplateWithHttpInfo
public async applyPromptTemplateWithHttpInfo(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 applyPromptTemplate * @throws ApiException if the response code was not in [200, 299] */
https://github.com/freechat-fun/freechat/blob/cb80c3708b85cf52c02a91bdc0c9e9ddc14856db/freechat-sdk/typescript/apis/PromptApi.ts#L1194-L1214
cb80c3708b85cf52c02a91bdc0c9e9ddc14856db
freechat
github_2023
freechat-fun
typescript
PromptApiResponseProcessor.batchSearchPromptDetailsWithHttpInfo
public async batchSearchPromptDetailsWithHttpInfo(response: ResponseContext): Promise<HttpInfo<Array<Array<PromptDetailsDTO>> >> { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body: Array<Array<PromptDetailsDTO>> = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), "Array<Array<PromptDetailsDTO>>", "" ) as Array<Array<PromptDetailsDTO>>; 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<Array<PromptDetailsDTO>> = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), "Array<Array<PromptDetailsDTO>>", "" ) as Array<Array<PromptDetailsDTO>>; 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 batchSearchPromptDetails * @throws ApiException if the response code was not in [200, 299] */
https://github.com/freechat-fun/freechat/blob/cb80c3708b85cf52c02a91bdc0c9e9ddc14856db/freechat-sdk/typescript/apis/PromptApi.ts#L1223-L1243
cb80c3708b85cf52c02a91bdc0c9e9ddc14856db
freechat
github_2023
freechat-fun
typescript
PromptApiResponseProcessor.batchSearchPromptSummaryWithHttpInfo
public async batchSearchPromptSummaryWithHttpInfo(response: ResponseContext): Promise<HttpInfo<Array<Array<PromptSummaryDTO>> >> { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body: Array<Array<PromptSummaryDTO>> = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), "Array<Array<PromptSummaryDTO>>", "" ) as Array<Array<PromptSummaryDTO>>; 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<Array<PromptSummaryDTO>> = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), "Array<Array<PromptSummaryDTO>>", "" ) as Array<Array<PromptSummaryDTO>>; 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 batchSearchPromptSummary * @throws ApiException if the response code was not in [200, 299] */
https://github.com/freechat-fun/freechat/blob/cb80c3708b85cf52c02a91bdc0c9e9ddc14856db/freechat-sdk/typescript/apis/PromptApi.ts#L1252-L1272
cb80c3708b85cf52c02a91bdc0c9e9ddc14856db
freechat
github_2023
freechat-fun
typescript
PromptApiResponseProcessor.clonePromptWithHttpInfo
public async clonePromptWithHttpInfo(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 clonePrompt * @throws ApiException if the response code was not in [200, 299] */
https://github.com/freechat-fun/freechat/blob/cb80c3708b85cf52c02a91bdc0c9e9ddc14856db/freechat-sdk/typescript/apis/PromptApi.ts#L1281-L1301
cb80c3708b85cf52c02a91bdc0c9e9ddc14856db
freechat
github_2023
freechat-fun
typescript
PromptApiResponseProcessor.clonePromptsWithHttpInfo
public async clonePromptsWithHttpInfo(response: ResponseContext): Promise<HttpInfo<Array<number> >> { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body: Array<number> = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), "Array<number>", "int64" ) as Array<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: Array<number> = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), "Array<number>", "int64" ) as Array<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 clonePrompts * @throws ApiException if the response code was not in [200, 299] */
https://github.com/freechat-fun/freechat/blob/cb80c3708b85cf52c02a91bdc0c9e9ddc14856db/freechat-sdk/typescript/apis/PromptApi.ts#L1310-L1330
cb80c3708b85cf52c02a91bdc0c9e9ddc14856db
freechat
github_2023
freechat-fun
typescript
PromptApiResponseProcessor.countPromptsWithHttpInfo
public async countPromptsWithHttpInfo(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 countPrompts * @throws ApiException if the response code was not in [200, 299] */
https://github.com/freechat-fun/freechat/blob/cb80c3708b85cf52c02a91bdc0c9e9ddc14856db/freechat-sdk/typescript/apis/PromptApi.ts#L1339-L1359
cb80c3708b85cf52c02a91bdc0c9e9ddc14856db
freechat
github_2023
freechat-fun
typescript
PromptApiResponseProcessor.countPublicPromptsWithHttpInfo
public async countPublicPromptsWithHttpInfo(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 countPublicPrompts * @throws ApiException if the response code was not in [200, 299] */
https://github.com/freechat-fun/freechat/blob/cb80c3708b85cf52c02a91bdc0c9e9ddc14856db/freechat-sdk/typescript/apis/PromptApi.ts#L1368-L1388
cb80c3708b85cf52c02a91bdc0c9e9ddc14856db
freechat
github_2023
freechat-fun
typescript
PromptApiResponseProcessor.createPromptWithHttpInfo
public async createPromptWithHttpInfo(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 createPrompt * @throws ApiException if the response code was not in [200, 299] */
https://github.com/freechat-fun/freechat/blob/cb80c3708b85cf52c02a91bdc0c9e9ddc14856db/freechat-sdk/typescript/apis/PromptApi.ts#L1397-L1417
cb80c3708b85cf52c02a91bdc0c9e9ddc14856db
freechat
github_2023
freechat-fun
typescript
PromptApiResponseProcessor.createPromptsWithHttpInfo
public async createPromptsWithHttpInfo(response: ResponseContext): Promise<HttpInfo<Array<number> >> { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body: Array<number> = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), "Array<number>", "int64" ) as Array<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: Array<number> = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), "Array<number>", "int64" ) as Array<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 createPrompts * @throws ApiException if the response code was not in [200, 299] */
https://github.com/freechat-fun/freechat/blob/cb80c3708b85cf52c02a91bdc0c9e9ddc14856db/freechat-sdk/typescript/apis/PromptApi.ts#L1426-L1446
cb80c3708b85cf52c02a91bdc0c9e9ddc14856db
freechat
github_2023
freechat-fun
typescript
PromptApiResponseProcessor.deletePromptWithHttpInfo
public async deletePromptWithHttpInfo(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 deletePrompt * @throws ApiException if the response code was not in [200, 299] */
https://github.com/freechat-fun/freechat/blob/cb80c3708b85cf52c02a91bdc0c9e9ddc14856db/freechat-sdk/typescript/apis/PromptApi.ts#L1455-L1475
cb80c3708b85cf52c02a91bdc0c9e9ddc14856db
freechat
github_2023
freechat-fun
typescript
PromptApiResponseProcessor.deletePromptByNameWithHttpInfo
public async deletePromptByNameWithHttpInfo(response: ResponseContext): Promise<HttpInfo<Array<number> >> { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body: Array<number> = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), "Array<number>", "int64" ) as Array<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: Array<number> = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), "Array<number>", "int64" ) as Array<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 deletePromptByName * @throws ApiException if the response code was not in [200, 299] */
https://github.com/freechat-fun/freechat/blob/cb80c3708b85cf52c02a91bdc0c9e9ddc14856db/freechat-sdk/typescript/apis/PromptApi.ts#L1484-L1504
cb80c3708b85cf52c02a91bdc0c9e9ddc14856db
freechat
github_2023
freechat-fun
typescript
PromptApiResponseProcessor.deletePromptsWithHttpInfo
public async deletePromptsWithHttpInfo(response: ResponseContext): Promise<HttpInfo<Array<number> >> { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body: Array<number> = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), "Array<number>", "int64" ) as Array<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: Array<number> = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), "Array<number>", "int64" ) as Array<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 deletePrompts * @throws ApiException if the response code was not in [200, 299] */
https://github.com/freechat-fun/freechat/blob/cb80c3708b85cf52c02a91bdc0c9e9ddc14856db/freechat-sdk/typescript/apis/PromptApi.ts#L1513-L1533
cb80c3708b85cf52c02a91bdc0c9e9ddc14856db
freechat
github_2023
freechat-fun
typescript
PromptApiResponseProcessor.existsPromptNameWithHttpInfo
public async existsPromptNameWithHttpInfo(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 existsPromptName * @throws ApiException if the response code was not in [200, 299] */
https://github.com/freechat-fun/freechat/blob/cb80c3708b85cf52c02a91bdc0c9e9ddc14856db/freechat-sdk/typescript/apis/PromptApi.ts#L1542-L1562
cb80c3708b85cf52c02a91bdc0c9e9ddc14856db
freechat
github_2023
freechat-fun
typescript
PromptApiResponseProcessor.getPromptDetailsWithHttpInfo
public async getPromptDetailsWithHttpInfo(response: ResponseContext): Promise<HttpInfo<PromptDetailsDTO >> { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body: PromptDetailsDTO = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), "PromptDetailsDTO", "" ) as PromptDetailsDTO; 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: PromptDetailsDTO = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), "PromptDetailsDTO", "" ) as PromptDetailsDTO; 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 getPromptDetails * @throws ApiException if the response code was not in [200, 299] */
https://github.com/freechat-fun/freechat/blob/cb80c3708b85cf52c02a91bdc0c9e9ddc14856db/freechat-sdk/typescript/apis/PromptApi.ts#L1571-L1591
cb80c3708b85cf52c02a91bdc0c9e9ddc14856db
freechat
github_2023
freechat-fun
typescript
PromptApiResponseProcessor.getPromptSummaryWithHttpInfo
public async getPromptSummaryWithHttpInfo(response: ResponseContext): Promise<HttpInfo<PromptSummaryDTO >> { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body: PromptSummaryDTO = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), "PromptSummaryDTO", "" ) as PromptSummaryDTO; 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: PromptSummaryDTO = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), "PromptSummaryDTO", "" ) as PromptSummaryDTO; 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 getPromptSummary * @throws ApiException if the response code was not in [200, 299] */
https://github.com/freechat-fun/freechat/blob/cb80c3708b85cf52c02a91bdc0c9e9ddc14856db/freechat-sdk/typescript/apis/PromptApi.ts#L1600-L1620
cb80c3708b85cf52c02a91bdc0c9e9ddc14856db
freechat
github_2023
freechat-fun
typescript
PromptApiResponseProcessor.listPromptVersionsByNameWithHttpInfo
public async listPromptVersionsByNameWithHttpInfo(response: ResponseContext): Promise<HttpInfo<Array<PromptItemForNameDTO> >> { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body: Array<PromptItemForNameDTO> = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), "Array<PromptItemForNameDTO>", "" ) as Array<PromptItemForNameDTO>; 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<PromptItemForNameDTO> = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), "Array<PromptItemForNameDTO>", "" ) as Array<PromptItemForNameDTO>; 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 listPromptVersionsByName * @throws ApiException if the response code was not in [200, 299] */
https://github.com/freechat-fun/freechat/blob/cb80c3708b85cf52c02a91bdc0c9e9ddc14856db/freechat-sdk/typescript/apis/PromptApi.ts#L1629-L1649
cb80c3708b85cf52c02a91bdc0c9e9ddc14856db
freechat
github_2023
freechat-fun
typescript
PromptApiResponseProcessor.newPromptNameWithHttpInfo
public async newPromptNameWithHttpInfo(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 newPromptName * @throws ApiException if the response code was not in [200, 299] */
https://github.com/freechat-fun/freechat/blob/cb80c3708b85cf52c02a91bdc0c9e9ddc14856db/freechat-sdk/typescript/apis/PromptApi.ts#L1658-L1678
cb80c3708b85cf52c02a91bdc0c9e9ddc14856db
freechat
github_2023
freechat-fun
typescript
PromptApiResponseProcessor.publishPromptWithHttpInfo
public async publishPromptWithHttpInfo(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 publishPrompt * @throws ApiException if the response code was not in [200, 299] */
https://github.com/freechat-fun/freechat/blob/cb80c3708b85cf52c02a91bdc0c9e9ddc14856db/freechat-sdk/typescript/apis/PromptApi.ts#L1687-L1707
cb80c3708b85cf52c02a91bdc0c9e9ddc14856db
freechat
github_2023
freechat-fun
typescript
PromptApiResponseProcessor.searchPromptDetailsWithHttpInfo
public async searchPromptDetailsWithHttpInfo(response: ResponseContext): Promise<HttpInfo<Array<PromptDetailsDTO> >> { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body: Array<PromptDetailsDTO> = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), "Array<PromptDetailsDTO>", "" ) as Array<PromptDetailsDTO>; 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<PromptDetailsDTO> = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), "Array<PromptDetailsDTO>", "" ) as Array<PromptDetailsDTO>; 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 searchPromptDetails * @throws ApiException if the response code was not in [200, 299] */
https://github.com/freechat-fun/freechat/blob/cb80c3708b85cf52c02a91bdc0c9e9ddc14856db/freechat-sdk/typescript/apis/PromptApi.ts#L1716-L1736
cb80c3708b85cf52c02a91bdc0c9e9ddc14856db
freechat
github_2023
freechat-fun
typescript
PromptApiResponseProcessor.searchPromptSummaryWithHttpInfo
public async searchPromptSummaryWithHttpInfo(response: ResponseContext): Promise<HttpInfo<Array<PromptSummaryDTO> >> { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body: Array<PromptSummaryDTO> = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), "Array<PromptSummaryDTO>", "" ) as Array<PromptSummaryDTO>; 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<PromptSummaryDTO> = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), "Array<PromptSummaryDTO>", "" ) as Array<PromptSummaryDTO>; 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 searchPromptSummary * @throws ApiException if the response code was not in [200, 299] */
https://github.com/freechat-fun/freechat/blob/cb80c3708b85cf52c02a91bdc0c9e9ddc14856db/freechat-sdk/typescript/apis/PromptApi.ts#L1745-L1765
cb80c3708b85cf52c02a91bdc0c9e9ddc14856db
freechat
github_2023
freechat-fun
typescript
PromptApiResponseProcessor.searchPublicPromptSummaryWithHttpInfo
public async searchPublicPromptSummaryWithHttpInfo(response: ResponseContext): Promise<HttpInfo<Array<PromptSummaryDTO> >> { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body: Array<PromptSummaryDTO> = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), "Array<PromptSummaryDTO>", "" ) as Array<PromptSummaryDTO>; 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<PromptSummaryDTO> = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), "Array<PromptSummaryDTO>", "" ) as Array<PromptSummaryDTO>; 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 searchPublicPromptSummary * @throws ApiException if the response code was not in [200, 299] */
https://github.com/freechat-fun/freechat/blob/cb80c3708b85cf52c02a91bdc0c9e9ddc14856db/freechat-sdk/typescript/apis/PromptApi.ts#L1774-L1794
cb80c3708b85cf52c02a91bdc0c9e9ddc14856db
freechat
github_2023
freechat-fun
typescript
PromptApiResponseProcessor.sendPromptWithHttpInfo
public async sendPromptWithHttpInfo(response: ResponseContext): Promise<HttpInfo<LlmResultDTO >> { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body: LlmResultDTO = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), "LlmResultDTO", "" ) as LlmResultDTO; 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: LlmResultDTO = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), "LlmResultDTO", "" ) as LlmResultDTO; 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 sendPrompt * @throws ApiException if the response code was not in [200, 299] */
https://github.com/freechat-fun/freechat/blob/cb80c3708b85cf52c02a91bdc0c9e9ddc14856db/freechat-sdk/typescript/apis/PromptApi.ts#L1803-L1823
cb80c3708b85cf52c02a91bdc0c9e9ddc14856db
freechat
github_2023
freechat-fun
typescript
PromptApiResponseProcessor.streamSendPromptWithHttpInfo
public async streamSendPromptWithHttpInfo(response: ResponseContext): Promise<HttpInfo<SseEmitter >> { const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); if (isCodeInRange("200", response.httpStatusCode)) { const body: SseEmitter = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), "SseEmitter", "" ) as SseEmitter; 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: SseEmitter = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), "SseEmitter", "" ) as SseEmitter; 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 streamSendPrompt * @throws ApiException if the response code was not in [200, 299] */
https://github.com/freechat-fun/freechat/blob/cb80c3708b85cf52c02a91bdc0c9e9ddc14856db/freechat-sdk/typescript/apis/PromptApi.ts#L1832-L1852
cb80c3708b85cf52c02a91bdc0c9e9ddc14856db
freechat
github_2023
freechat-fun
typescript
PromptApiResponseProcessor.updatePromptWithHttpInfo
public async updatePromptWithHttpInfo(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 updatePrompt * @throws ApiException if the response code was not in [200, 299] */
https://github.com/freechat-fun/freechat/blob/cb80c3708b85cf52c02a91bdc0c9e9ddc14856db/freechat-sdk/typescript/apis/PromptApi.ts#L1861-L1881
cb80c3708b85cf52c02a91bdc0c9e9ddc14856db
freechat
github_2023
freechat-fun
typescript
PromptTaskApiRequestFactory.createPromptTask
public async createPromptTask(promptTaskDTO: PromptTaskDTO, _options?: Configuration): Promise<RequestContext> { let _config = _options || this.configuration; // verify required parameter 'promptTaskDTO' is not null or undefined if (promptTaskDTO === null || promptTaskDTO === undefined) { throw new RequiredError("PromptTaskApi", "createPromptTask", "promptTaskDTO"); } // Path Params const localVarPath = '/api/v2/prompt/task'; // 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(promptTaskDTO, "PromptTaskDTO", ""), 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 a prompt task. * Create Prompt Task * @param promptTaskDTO The prompt task to be added */
https://github.com/freechat-fun/freechat/blob/cb80c3708b85cf52c02a91bdc0c9e9ddc14856db/freechat-sdk/typescript/apis/PromptTaskApi.ts#L24-L65
cb80c3708b85cf52c02a91bdc0c9e9ddc14856db
freechat
github_2023
freechat-fun
typescript
PromptTaskApiRequestFactory.deletePromptTask
public async deletePromptTask(promptTaskId: string, _options?: Configuration): Promise<RequestContext> { let _config = _options || this.configuration; // verify required parameter 'promptTaskId' is not null or undefined if (promptTaskId === null || promptTaskId === undefined) { throw new RequiredError("PromptTaskApi", "deletePromptTask", "promptTaskId"); } // Path Params const localVarPath = '/api/v2/prompt/task/{promptTaskId}' .replace('{' + 'promptTaskId' + '}', encodeURIComponent(String(promptTaskId))); // 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 a prompt task. * Delete Prompt Task * @param promptTaskId The promptTaskId to be deleted */
https://github.com/freechat-fun/freechat/blob/cb80c3708b85cf52c02a91bdc0c9e9ddc14856db/freechat-sdk/typescript/apis/PromptTaskApi.ts#L72-L103
cb80c3708b85cf52c02a91bdc0c9e9ddc14856db
freechat
github_2023
freechat-fun
typescript
PromptTaskApiRequestFactory.getPromptTask
public async getPromptTask(promptTaskId: string, _options?: Configuration): Promise<RequestContext> { let _config = _options || this.configuration; // verify required parameter 'promptTaskId' is not null or undefined if (promptTaskId === null || promptTaskId === undefined) { throw new RequiredError("PromptTaskApi", "getPromptTask", "promptTaskId"); } // Path Params const localVarPath = '/api/v2/prompt/task/{promptTaskId}' .replace('{' + 'promptTaskId' + '}', encodeURIComponent(String(promptTaskId))); // 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 prompt task details. * Get Prompt Task * @param promptTaskId The promptTaskId to be queried */
https://github.com/freechat-fun/freechat/blob/cb80c3708b85cf52c02a91bdc0c9e9ddc14856db/freechat-sdk/typescript/apis/PromptTaskApi.ts#L110-L141
cb80c3708b85cf52c02a91bdc0c9e9ddc14856db
freechat
github_2023
freechat-fun
typescript
PromptTaskApiRequestFactory.updatePromptTask
public async updatePromptTask(promptTaskId: string, promptTaskDTO: PromptTaskDTO, _options?: Configuration): Promise<RequestContext> { let _config = _options || this.configuration; // verify required parameter 'promptTaskId' is not null or undefined if (promptTaskId === null || promptTaskId === undefined) { throw new RequiredError("PromptTaskApi", "updatePromptTask", "promptTaskId"); } // verify required parameter 'promptTaskDTO' is not null or undefined if (promptTaskDTO === null || promptTaskDTO === undefined) { throw new RequiredError("PromptTaskApi", "updatePromptTask", "promptTaskDTO"); } // Path Params const localVarPath = '/api/v2/prompt/task/{promptTaskId}' .replace('{' + 'promptTaskId' + '}', encodeURIComponent(String(promptTaskId))); // 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(promptTaskDTO, "PromptTaskDTO", ""), 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 a prompt task. * Update Prompt Task * @param promptTaskId The promptTaskId to be updated * @param promptTaskDTO The prompt task info to be updated */
https://github.com/freechat-fun/freechat/blob/cb80c3708b85cf52c02a91bdc0c9e9ddc14856db/freechat-sdk/typescript/apis/PromptTaskApi.ts#L149-L197
cb80c3708b85cf52c02a91bdc0c9e9ddc14856db
freechat
github_2023
freechat-fun
typescript
PromptTaskApiResponseProcessor.createPromptTaskWithHttpInfo
public async createPromptTaskWithHttpInfo(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 createPromptTask * @throws ApiException if the response code was not in [200, 299] */
https://github.com/freechat-fun/freechat/blob/cb80c3708b85cf52c02a91bdc0c9e9ddc14856db/freechat-sdk/typescript/apis/PromptTaskApi.ts#L210-L230
cb80c3708b85cf52c02a91bdc0c9e9ddc14856db