Skip to content

Commit

Permalink
Release 0.0.592
Browse files Browse the repository at this point in the history
  • Loading branch information
fern-api[bot] committed Jan 18, 2024
1 parent 166845d commit bc5decd
Show file tree
Hide file tree
Showing 275 changed files with 1,523 additions and 1,523 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@revertdotdev/node",
"version": "0.0.589",
"version": "0.0.592",
"private": false,
"repository": "https://github.com/revertinc/revert-node-ts",
"main": "./index.js",
Expand Down
8 changes: 4 additions & 4 deletions src/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ import { Crm } from "./api/resources/crm/client/Client";
import { Metadata } from "./api/resources/metadata/client/Client";
import { Ticket } from "./api/resources/ticket/client/Client";

export declare namespace VellumClient {
export declare namespace RevertClient {
interface Options {
environment?: core.Supplier<environments.VellumEnvironment | string>;
environment?: core.Supplier<environments.RevertEnvironment | string>;
}

interface RequestOptions {
Expand All @@ -21,8 +21,8 @@ export declare namespace VellumClient {
}
}

export class VellumClient {
constructor(protected readonly _options: VellumClient.Options = {}) {}
export class RevertClient {
constructor(protected readonly _options: RevertClient.Options = {}) {}

protected _chat: Chat | undefined;

Expand Down
2 changes: 1 addition & 1 deletion src/api/resources/chat/client/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { Users } from "../resources/users/client/Client";

export declare namespace Chat {
interface Options {
environment?: core.Supplier<environments.VellumEnvironment | string>;
environment?: core.Supplier<environments.RevertEnvironment | string>;
}

interface RequestOptions {
Expand Down
32 changes: 16 additions & 16 deletions src/api/resources/chat/resources/channels/client/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@

import * as environments from "../../../../../../environments";
import * as core from "../../../../../../core";
import * as Vellum from "../../../../..";
import * as Revert from "../../../../..";
import urlJoin from "url-join";
import * as serializers from "../../../../../../serialization";
import * as errors from "../../../../../../errors";

export declare namespace Channels {
interface Options {
environment?: core.Supplier<environments.VellumEnvironment | string>;
environment?: core.Supplier<environments.RevertEnvironment | string>;
}

interface RequestOptions {
Expand All @@ -25,14 +25,14 @@ export class Channels {

/**
* Get all the channels
* @throws {@link Vellum.common.UnAuthorizedError}
* @throws {@link Vellum.common.InternalServerError}
* @throws {@link Vellum.common.NotFoundError}
* @throws {@link Revert.common.UnAuthorizedError}
* @throws {@link Revert.common.InternalServerError}
* @throws {@link Revert.common.NotFoundError}
*/
public async getChannels(
request: Vellum.chat.GetChannelsRequest,
request: Revert.chat.GetChannelsRequest,
requestOptions?: Channels.RequestOptions
): Promise<Vellum.chat.GetChannelsResponse> {
): Promise<Revert.chat.GetChannelsResponse> {
const { fields, pageSize, cursor, xRevertApiToken, xRevertTId, xApiVersion } = request;
const _queryParams: Record<string, string | string[]> = {};
if (fields != null) {
Expand All @@ -49,14 +49,14 @@ export class Channels {

const _response = await core.fetcher({
url: urlJoin(
(await core.Supplier.get(this._options.environment)) ?? environments.VellumEnvironment.Production,
(await core.Supplier.get(this._options.environment)) ?? environments.RevertEnvironment.Production,
"/chat/channels"
),
method: "GET",
headers: {
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "@revertdotdev/node",
"X-Fern-SDK-Version": "0.0.589",
"X-Fern-SDK-Version": "0.0.592",
"x-revert-api-token": xRevertApiToken,
"x-revert-t-id": xRevertTId,
"x-api-version": xApiVersion != null ? xApiVersion : undefined,
Expand All @@ -78,7 +78,7 @@ export class Channels {
if (_response.error.reason === "status-code") {
switch (_response.error.statusCode) {
case 401:
throw new Vellum.common.UnAuthorizedError(
throw new Revert.common.UnAuthorizedError(
await serializers.common.BaseError.parseOrThrow(_response.error.body, {
unrecognizedObjectKeys: "passthrough",
allowUnrecognizedUnionMembers: true,
Expand All @@ -87,7 +87,7 @@ export class Channels {
})
);
case 500:
throw new Vellum.common.InternalServerError(
throw new Revert.common.InternalServerError(
await serializers.common.BaseError.parseOrThrow(_response.error.body, {
unrecognizedObjectKeys: "passthrough",
allowUnrecognizedUnionMembers: true,
Expand All @@ -96,7 +96,7 @@ export class Channels {
})
);
case 404:
throw new Vellum.common.NotFoundError(
throw new Revert.common.NotFoundError(
await serializers.common.BaseError.parseOrThrow(_response.error.body, {
unrecognizedObjectKeys: "passthrough",
allowUnrecognizedUnionMembers: true,
Expand All @@ -105,7 +105,7 @@ export class Channels {
})
);
default:
throw new errors.VellumError({
throw new errors.RevertError({
statusCode: _response.error.statusCode,
body: _response.error.body,
});
Expand All @@ -114,14 +114,14 @@ export class Channels {

switch (_response.error.reason) {
case "non-json":
throw new errors.VellumError({
throw new errors.RevertError({
statusCode: _response.error.statusCode,
body: _response.error.rawBody,
});
case "timeout":
throw new errors.VellumTimeoutError();
throw new errors.RevertTimeoutError();
case "unknown":
throw new errors.VellumError({
throw new errors.RevertError({
message: _response.error.errorMessage,
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
* This file was auto-generated by Fern from our API Definition.
*/

import * as Vellum from "../../../../..";
import * as Revert from "../../../../..";

export interface GetChannelsResponse {
status: Vellum.common.ResponseStatus;
status: Revert.common.ResponseStatus;
next?: string;
previous?: string;
results: Vellum.common.Channel[];
results: Revert.common.Channel[];
}
36 changes: 18 additions & 18 deletions src/api/resources/chat/resources/messages/client/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@

import * as environments from "../../../../../../environments";
import * as core from "../../../../../../core";
import * as Vellum from "../../../../..";
import * as Revert from "../../../../..";
import * as serializers from "../../../../../../serialization";
import urlJoin from "url-join";
import * as errors from "../../../../../../errors";

export declare namespace Messages {
interface Options {
environment?: core.Supplier<environments.VellumEnvironment | string>;
environment?: core.Supplier<environments.RevertEnvironment | string>;
}

interface RequestOptions {
Expand All @@ -25,26 +25,26 @@ export class Messages {

/**
* Create a new message
* @throws {@link Vellum.common.UnAuthorizedError}
* @throws {@link Vellum.common.InternalServerError}
* @throws {@link Vellum.common.NotFoundError}
* @throws {@link Vellum.common.BadRequestError}
* @throws {@link Revert.common.UnAuthorizedError}
* @throws {@link Revert.common.InternalServerError}
* @throws {@link Revert.common.NotFoundError}
* @throws {@link Revert.common.BadRequestError}
*/
public async createMessage(
request: Vellum.chat.CreateMessageRequest,
request: Revert.chat.CreateMessageRequest,
requestOptions?: Messages.RequestOptions
): Promise<Vellum.chat.CreateorUpdateMessageResponse> {
): Promise<Revert.chat.CreateorUpdateMessageResponse> {
const { xRevertApiToken, xRevertTId, xApiVersion, body: _body } = request;
const _response = await core.fetcher({
url: urlJoin(
(await core.Supplier.get(this._options.environment)) ?? environments.VellumEnvironment.Production,
(await core.Supplier.get(this._options.environment)) ?? environments.RevertEnvironment.Production,
"/chat/message"
),
method: "POST",
headers: {
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "@revertdotdev/node",
"X-Fern-SDK-Version": "0.0.589",
"X-Fern-SDK-Version": "0.0.592",
"x-revert-api-token": xRevertApiToken,
"x-revert-t-id": xRevertTId,
"x-api-version": xApiVersion != null ? xApiVersion : undefined,
Expand All @@ -68,7 +68,7 @@ export class Messages {
if (_response.error.reason === "status-code") {
switch (_response.error.statusCode) {
case 401:
throw new Vellum.common.UnAuthorizedError(
throw new Revert.common.UnAuthorizedError(
await serializers.common.BaseError.parseOrThrow(_response.error.body, {
unrecognizedObjectKeys: "passthrough",
allowUnrecognizedUnionMembers: true,
Expand All @@ -77,7 +77,7 @@ export class Messages {
})
);
case 500:
throw new Vellum.common.InternalServerError(
throw new Revert.common.InternalServerError(
await serializers.common.BaseError.parseOrThrow(_response.error.body, {
unrecognizedObjectKeys: "passthrough",
allowUnrecognizedUnionMembers: true,
Expand All @@ -86,7 +86,7 @@ export class Messages {
})
);
case 404:
throw new Vellum.common.NotFoundError(
throw new Revert.common.NotFoundError(
await serializers.common.BaseError.parseOrThrow(_response.error.body, {
unrecognizedObjectKeys: "passthrough",
allowUnrecognizedUnionMembers: true,
Expand All @@ -95,7 +95,7 @@ export class Messages {
})
);
case 400:
throw new Vellum.common.BadRequestError(
throw new Revert.common.BadRequestError(
await serializers.common.BaseError.parseOrThrow(_response.error.body, {
unrecognizedObjectKeys: "passthrough",
allowUnrecognizedUnionMembers: true,
Expand All @@ -104,7 +104,7 @@ export class Messages {
})
);
default:
throw new errors.VellumError({
throw new errors.RevertError({
statusCode: _response.error.statusCode,
body: _response.error.body,
});
Expand All @@ -113,14 +113,14 @@ export class Messages {

switch (_response.error.reason) {
case "non-json":
throw new errors.VellumError({
throw new errors.RevertError({
statusCode: _response.error.statusCode,
body: _response.error.rawBody,
});
case "timeout":
throw new errors.VellumTimeoutError();
throw new errors.RevertTimeoutError();
case "unknown":
throw new errors.VellumError({
throw new errors.RevertError({
message: _response.error.errorMessage,
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* This file was auto-generated by Fern from our API Definition.
*/

import * as Vellum from "../../../../../..";
import * as Revert from "../../../../../..";

export interface CreateMessageRequest {
/**
Expand All @@ -17,5 +17,5 @@ export interface CreateMessageRequest {
* Optional Revert API version you're using. If missing we default to the latest version of the API.
*/
xApiVersion?: string;
body: Vellum.chat.CreateorUpdateMessageRequest;
body: Revert.chat.CreateorUpdateMessageRequest;
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
* This file was auto-generated by Fern from our API Definition.
*/

import * as Vellum from "../../../../..";
import * as Revert from "../../../../..";

export interface CreateorUpdateMessageRequest extends Vellum.common.Message {}
export interface CreateorUpdateMessageRequest extends Revert.common.Message {}
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
* This file was auto-generated by Fern from our API Definition.
*/

import * as Vellum from "../../../../..";
import * as Revert from "../../../../..";

export interface CreateorUpdateMessageResponse {
status: Vellum.common.ResponseStatus;
result: Vellum.common.Message;
status: Revert.common.ResponseStatus;
result: Revert.common.Message;
}
Loading

0 comments on commit bc5decd

Please sign in to comment.