diff --git a/package.json b/package.json index 0878d56..c28a360 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@revertdotdev/node", - "version": "0.0.796", + "version": "0.0.835", "private": false, "repository": "https://github.com/revertinc/revert-node-ts", "main": "./index.js", diff --git a/src/api/resources/chat/resources/channels/client/Client.ts b/src/api/resources/chat/resources/channels/client/Client.ts index 076a769..77ac490 100644 --- a/src/api/resources/chat/resources/channels/client/Client.ts +++ b/src/api/resources/chat/resources/channels/client/Client.ts @@ -56,7 +56,7 @@ export class Channels { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@revertdotdev/node", - "X-Fern-SDK-Version": "0.0.796", + "X-Fern-SDK-Version": "0.0.835", "x-revert-api-token": xRevertApiToken, "x-revert-t-id": xRevertTId, "x-api-version": xApiVersion != null ? xApiVersion : undefined, diff --git a/src/api/resources/chat/resources/messages/client/Client.ts b/src/api/resources/chat/resources/messages/client/Client.ts index 889da39..339a535 100644 --- a/src/api/resources/chat/resources/messages/client/Client.ts +++ b/src/api/resources/chat/resources/messages/client/Client.ts @@ -44,7 +44,7 @@ export class Messages { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@revertdotdev/node", - "X-Fern-SDK-Version": "0.0.796", + "X-Fern-SDK-Version": "0.0.835", "x-revert-api-token": xRevertApiToken, "x-revert-t-id": xRevertTId, "x-api-version": xApiVersion != null ? xApiVersion : undefined, diff --git a/src/api/resources/chat/resources/users/client/Client.ts b/src/api/resources/chat/resources/users/client/Client.ts index f862007..6822d07 100644 --- a/src/api/resources/chat/resources/users/client/Client.ts +++ b/src/api/resources/chat/resources/users/client/Client.ts @@ -56,7 +56,7 @@ export class Users { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@revertdotdev/node", - "X-Fern-SDK-Version": "0.0.796", + "X-Fern-SDK-Version": "0.0.835", "x-revert-api-token": xRevertApiToken, "x-revert-t-id": xRevertTId, "x-api-version": xApiVersion != null ? xApiVersion : undefined, diff --git a/src/api/resources/connection/client/Client.ts b/src/api/resources/connection/client/Client.ts index 001f29f..afd31b6 100644 --- a/src/api/resources/connection/client/Client.ts +++ b/src/api/resources/connection/client/Client.ts @@ -43,7 +43,7 @@ export class Connection { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@revertdotdev/node", - "X-Fern-SDK-Version": "0.0.796", + "X-Fern-SDK-Version": "0.0.835", "x-revert-api-token": xRevertApiToken, "x-api-version": xApiVersion != null ? xApiVersion : undefined, "x-revert-t-id": xRevertTId, @@ -133,7 +133,7 @@ export class Connection { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@revertdotdev/node", - "X-Fern-SDK-Version": "0.0.796", + "X-Fern-SDK-Version": "0.0.835", "x-revert-api-token": xRevertApiToken, "x-api-version": xApiVersion != null ? xApiVersion : undefined, "x-revert-t-id": xRevertTId, @@ -223,7 +223,7 @@ export class Connection { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@revertdotdev/node", - "X-Fern-SDK-Version": "0.0.796", + "X-Fern-SDK-Version": "0.0.835", "x-revert-api-token": xRevertApiToken, "x-api-version": xApiVersion != null ? xApiVersion : undefined, }, @@ -312,7 +312,7 @@ export class Connection { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@revertdotdev/node", - "X-Fern-SDK-Version": "0.0.796", + "X-Fern-SDK-Version": "0.0.835", "x-revert-api-token": xRevertApiToken, "x-api-version": xApiVersion != null ? xApiVersion : undefined, "x-revert-t-id": xRevertTId, @@ -405,7 +405,7 @@ export class Connection { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@revertdotdev/node", - "X-Fern-SDK-Version": "0.0.796", + "X-Fern-SDK-Version": "0.0.835", "x-revert-api-token": xRevertApiToken, "x-api-version": xApiVersion != null ? xApiVersion : undefined, "x-revert-t-id": xRevertTId, @@ -495,7 +495,7 @@ export class Connection { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@revertdotdev/node", - "X-Fern-SDK-Version": "0.0.796", + "X-Fern-SDK-Version": "0.0.835", "x-revert-api-token": xRevertApiToken, "x-api-version": xApiVersion != null ? xApiVersion : undefined, "x-revert-t-id": xRevertTId, @@ -587,7 +587,7 @@ export class Connection { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@revertdotdev/node", - "X-Fern-SDK-Version": "0.0.796", + "X-Fern-SDK-Version": "0.0.835", "x-revert-api-token": xRevertApiToken, "x-api-version": xApiVersion != null ? xApiVersion : undefined, }, @@ -647,4 +647,97 @@ export class Connection { }); } } + + /** + * Import multiple connections for a specific environment. Use this to bulk import connections as a one-time exercise. + * @throws {@link Revert.common.UnAuthorizedError} + * @throws {@link Revert.common.InternalServerError} + * @throws {@link Revert.common.NotFoundError} + */ + public async importConnections( + request: Revert.ImportConnectionsRequest, + requestOptions?: Connection.RequestOptions + ): Promise { + const { xRevertApiToken, xApiVersion, xRevertTId, body: _body } = request; + const _response = await core.fetcher({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.RevertEnvironment.Production, + "connection/import" + ), + method: "POST", + headers: { + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "@revertdotdev/node", + "X-Fern-SDK-Version": "0.0.835", + "x-revert-api-token": xRevertApiToken, + "x-api-version": xApiVersion != null ? xApiVersion : undefined, + "x-revert-t-id": xRevertTId, + }, + contentType: "application/json", + body: await serializers.ImportConnectionsRequestBody.jsonOrThrow(_body, { + unrecognizedObjectKeys: "strip", + }), + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : undefined, + maxRetries: requestOptions?.maxRetries, + }); + if (_response.ok) { + return await serializers.ImportConnectionsResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + breadcrumbsPrefix: ["response"], + }); + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 401: + throw new Revert.common.UnAuthorizedError( + await serializers.common.BaseError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 500: + throw new Revert.common.InternalServerError( + await serializers.common.BaseError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 404: + throw new Revert.common.NotFoundError( + await serializers.common.BaseError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + breadcrumbsPrefix: ["response"], + }) + ); + default: + throw new errors.RevertError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.RevertError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.RevertTimeoutError(); + case "unknown": + throw new errors.RevertError({ + message: _response.error.errorMessage, + }); + } + } } diff --git a/src/api/resources/connection/client/requests/ImportConnectionsRequest.ts b/src/api/resources/connection/client/requests/ImportConnectionsRequest.ts new file mode 100644 index 0000000..d05ee6a --- /dev/null +++ b/src/api/resources/connection/client/requests/ImportConnectionsRequest.ts @@ -0,0 +1,21 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Revert from "../../../.."; + +export interface ImportConnectionsRequest { + /** + * Your official API key for accessing revert apis. + */ + xRevertApiToken: string; + /** + * Optional Revert API version you're using. If missing we default to the latest version of the API. + */ + xApiVersion?: string; + /** + * The unique customer id used when the customer linked their account. + */ + xRevertTId: string; + body: Revert.ImportConnectionsRequestBody; +} diff --git a/src/api/resources/connection/client/requests/index.ts b/src/api/resources/connection/client/requests/index.ts index 7ae07c7..ced800f 100644 --- a/src/api/resources/connection/client/requests/index.ts +++ b/src/api/resources/connection/client/requests/index.ts @@ -5,3 +5,4 @@ export { CreateWebhookRequest } from "./CreateWebhookRequest"; export { GetConnectionWebhookRequest } from "./GetConnectionWebhookRequest"; export { DeleteConnectionWebhookRequest } from "./DeleteConnectionWebhookRequest"; export { GetConnectStatusRequest } from "./GetConnectStatusRequest"; +export { ImportConnectionsRequest } from "./ImportConnectionsRequest"; diff --git a/src/api/resources/connection/types/ConnectionImport.ts b/src/api/resources/connection/types/ConnectionImport.ts new file mode 100644 index 0000000..9808c78 --- /dev/null +++ b/src/api/resources/connection/types/ConnectionImport.ts @@ -0,0 +1,19 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Revert from "../../.."; + +export interface ConnectionImport { + tpId: Revert.common.Tpid; + tpAccessToken: string; + tpRefreshToken: string; + /** The emailId or a unique ID id of the user who connected the app. */ + tpCustomerId: string; + tId: string; + tpAccountUrl?: string; + appClientId: string; + appClientSecret: string; + /** Can be obtained from the integration dashboard. */ + appId: string; +} diff --git a/src/api/resources/connection/types/ImportConnectionsRequestBody.ts b/src/api/resources/connection/types/ImportConnectionsRequestBody.ts new file mode 100644 index 0000000..100d632 --- /dev/null +++ b/src/api/resources/connection/types/ImportConnectionsRequestBody.ts @@ -0,0 +1,9 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Revert from "../../.."; + +export interface ImportConnectionsRequestBody { + connections: Revert.ConnectionImport[]; +} diff --git a/src/api/resources/connection/types/ImportConnectionsResponse.ts b/src/api/resources/connection/types/ImportConnectionsResponse.ts new file mode 100644 index 0000000..7c05543 --- /dev/null +++ b/src/api/resources/connection/types/ImportConnectionsResponse.ts @@ -0,0 +1,9 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Revert from "../../.."; + +export interface ImportConnectionsResponse { + status: Revert.common.ResponseStatus; +} diff --git a/src/api/resources/connection/types/index.ts b/src/api/resources/connection/types/index.ts index 0eab250..86cec54 100644 --- a/src/api/resources/connection/types/index.ts +++ b/src/api/resources/connection/types/index.ts @@ -7,3 +7,6 @@ export * from "./CreateConnectionWebhookRequest"; export * from "./DeleteConnectionWebhookResponse"; export * from "./GetConnectStatusResponse"; export * from "./ConnectionStatus"; +export * from "./ConnectionImport"; +export * from "./ImportConnectionsRequestBody"; +export * from "./ImportConnectionsResponse"; diff --git a/src/api/resources/crm/resources/company/client/Client.ts b/src/api/resources/crm/resources/company/client/Client.ts index b76d578..ed5cd4b 100644 --- a/src/api/resources/crm/resources/company/client/Client.ts +++ b/src/api/resources/crm/resources/company/client/Client.ts @@ -49,7 +49,7 @@ export class Company { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@revertdotdev/node", - "X-Fern-SDK-Version": "0.0.796", + "X-Fern-SDK-Version": "0.0.835", "x-revert-api-token": xRevertApiToken, "x-revert-t-id": xRevertTId, "x-api-version": xApiVersion != null ? xApiVersion : undefined, @@ -153,7 +153,7 @@ export class Company { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@revertdotdev/node", - "X-Fern-SDK-Version": "0.0.796", + "X-Fern-SDK-Version": "0.0.835", "x-revert-api-token": xRevertApiToken, "x-revert-t-id": xRevertTId, "x-api-version": xApiVersion != null ? xApiVersion : undefined, @@ -244,7 +244,7 @@ export class Company { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@revertdotdev/node", - "X-Fern-SDK-Version": "0.0.796", + "X-Fern-SDK-Version": "0.0.835", "x-revert-api-token": xRevertApiToken, "x-revert-t-id": xRevertTId, "x-api-version": xApiVersion != null ? xApiVersion : undefined, @@ -338,7 +338,7 @@ export class Company { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@revertdotdev/node", - "X-Fern-SDK-Version": "0.0.796", + "X-Fern-SDK-Version": "0.0.835", "x-revert-api-token": xRevertApiToken, "x-revert-t-id": xRevertTId, "x-api-version": xApiVersion != null ? xApiVersion : undefined, @@ -434,7 +434,7 @@ export class Company { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@revertdotdev/node", - "X-Fern-SDK-Version": "0.0.796", + "X-Fern-SDK-Version": "0.0.835", "x-revert-api-token": xRevertApiToken, "x-revert-t-id": xRevertTId, "x-api-version": xApiVersion != null ? xApiVersion : undefined, diff --git a/src/api/resources/crm/resources/contact/client/Client.ts b/src/api/resources/crm/resources/contact/client/Client.ts index ba23a56..1abb579 100644 --- a/src/api/resources/crm/resources/contact/client/Client.ts +++ b/src/api/resources/crm/resources/contact/client/Client.ts @@ -49,7 +49,7 @@ export class Contact { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@revertdotdev/node", - "X-Fern-SDK-Version": "0.0.796", + "X-Fern-SDK-Version": "0.0.835", "x-revert-api-token": xRevertApiToken, "x-revert-t-id": xRevertTId, "x-api-version": xApiVersion != null ? xApiVersion : undefined, @@ -153,7 +153,7 @@ export class Contact { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@revertdotdev/node", - "X-Fern-SDK-Version": "0.0.796", + "X-Fern-SDK-Version": "0.0.835", "x-revert-api-token": xRevertApiToken, "x-revert-t-id": xRevertTId, "x-api-version": xApiVersion != null ? xApiVersion : undefined, @@ -245,7 +245,7 @@ export class Contact { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@revertdotdev/node", - "X-Fern-SDK-Version": "0.0.796", + "X-Fern-SDK-Version": "0.0.835", "x-revert-api-token": xRevertApiToken, "x-revert-t-id": xRevertTId, "x-api-version": xApiVersion != null ? xApiVersion : undefined, @@ -349,7 +349,7 @@ export class Contact { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@revertdotdev/node", - "X-Fern-SDK-Version": "0.0.796", + "X-Fern-SDK-Version": "0.0.835", "x-revert-api-token": xRevertApiToken, "x-revert-t-id": xRevertTId, "x-api-version": xApiVersion != null ? xApiVersion : undefined, @@ -456,7 +456,7 @@ export class Contact { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@revertdotdev/node", - "X-Fern-SDK-Version": "0.0.796", + "X-Fern-SDK-Version": "0.0.835", "x-revert-api-token": xRevertApiToken, "x-revert-t-id": xRevertTId, "x-api-version": xApiVersion != null ? xApiVersion : undefined, diff --git a/src/api/resources/crm/resources/deal/client/Client.ts b/src/api/resources/crm/resources/deal/client/Client.ts index aaf650e..dba0a53 100644 --- a/src/api/resources/crm/resources/deal/client/Client.ts +++ b/src/api/resources/crm/resources/deal/client/Client.ts @@ -49,7 +49,7 @@ export class Deal { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@revertdotdev/node", - "X-Fern-SDK-Version": "0.0.796", + "X-Fern-SDK-Version": "0.0.835", "x-revert-api-token": xRevertApiToken, "x-revert-t-id": xRevertTId, "x-api-version": xApiVersion != null ? xApiVersion : undefined, @@ -153,7 +153,7 @@ export class Deal { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@revertdotdev/node", - "X-Fern-SDK-Version": "0.0.796", + "X-Fern-SDK-Version": "0.0.835", "x-revert-api-token": xRevertApiToken, "x-revert-t-id": xRevertTId, "x-api-version": xApiVersion != null ? xApiVersion : undefined, @@ -244,7 +244,7 @@ export class Deal { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@revertdotdev/node", - "X-Fern-SDK-Version": "0.0.796", + "X-Fern-SDK-Version": "0.0.835", "x-revert-api-token": xRevertApiToken, "x-revert-t-id": xRevertTId, "x-api-version": xApiVersion != null ? xApiVersion : undefined, @@ -338,7 +338,7 @@ export class Deal { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@revertdotdev/node", - "X-Fern-SDK-Version": "0.0.796", + "X-Fern-SDK-Version": "0.0.835", "x-revert-api-token": xRevertApiToken, "x-revert-t-id": xRevertTId, "x-api-version": xApiVersion != null ? xApiVersion : undefined, @@ -436,7 +436,7 @@ export class Deal { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@revertdotdev/node", - "X-Fern-SDK-Version": "0.0.796", + "X-Fern-SDK-Version": "0.0.835", "x-revert-api-token": xRevertApiToken, "x-revert-t-id": xRevertTId, "x-api-version": xApiVersion != null ? xApiVersion : undefined, diff --git a/src/api/resources/crm/resources/event/client/Client.ts b/src/api/resources/crm/resources/event/client/Client.ts index 0414461..20082c7 100644 --- a/src/api/resources/crm/resources/event/client/Client.ts +++ b/src/api/resources/crm/resources/event/client/Client.ts @@ -49,7 +49,7 @@ export class Event { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@revertdotdev/node", - "X-Fern-SDK-Version": "0.0.796", + "X-Fern-SDK-Version": "0.0.835", "x-revert-api-token": xRevertApiToken, "x-revert-t-id": xRevertTId, "x-api-version": xApiVersion != null ? xApiVersion : undefined, @@ -153,7 +153,7 @@ export class Event { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@revertdotdev/node", - "X-Fern-SDK-Version": "0.0.796", + "X-Fern-SDK-Version": "0.0.835", "x-revert-api-token": xRevertApiToken, "x-revert-t-id": xRevertTId, "x-api-version": xApiVersion != null ? xApiVersion : undefined, @@ -244,7 +244,7 @@ export class Event { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@revertdotdev/node", - "X-Fern-SDK-Version": "0.0.796", + "X-Fern-SDK-Version": "0.0.835", "x-revert-api-token": xRevertApiToken, "x-revert-t-id": xRevertTId, "x-api-version": xApiVersion != null ? xApiVersion : undefined, @@ -338,7 +338,7 @@ export class Event { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@revertdotdev/node", - "X-Fern-SDK-Version": "0.0.796", + "X-Fern-SDK-Version": "0.0.835", "x-revert-api-token": xRevertApiToken, "x-revert-t-id": xRevertTId, "x-api-version": xApiVersion != null ? xApiVersion : undefined, @@ -436,7 +436,7 @@ export class Event { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@revertdotdev/node", - "X-Fern-SDK-Version": "0.0.796", + "X-Fern-SDK-Version": "0.0.835", "x-revert-api-token": xRevertApiToken, "x-revert-t-id": xRevertTId, "x-api-version": xApiVersion != null ? xApiVersion : undefined, @@ -529,7 +529,7 @@ export class Event { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@revertdotdev/node", - "X-Fern-SDK-Version": "0.0.796", + "X-Fern-SDK-Version": "0.0.835", "x-revert-api-token": xRevertApiToken, "x-revert-t-id": xRevertTId, "x-api-version": xApiVersion != null ? xApiVersion : undefined, diff --git a/src/api/resources/crm/resources/lead/client/Client.ts b/src/api/resources/crm/resources/lead/client/Client.ts index 403857d..7127d65 100644 --- a/src/api/resources/crm/resources/lead/client/Client.ts +++ b/src/api/resources/crm/resources/lead/client/Client.ts @@ -49,7 +49,7 @@ export class Lead { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@revertdotdev/node", - "X-Fern-SDK-Version": "0.0.796", + "X-Fern-SDK-Version": "0.0.835", "x-revert-api-token": xRevertApiToken, "x-revert-t-id": xRevertTId, "x-api-version": xApiVersion != null ? xApiVersion : undefined, @@ -153,7 +153,7 @@ export class Lead { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@revertdotdev/node", - "X-Fern-SDK-Version": "0.0.796", + "X-Fern-SDK-Version": "0.0.835", "x-revert-api-token": xRevertApiToken, "x-revert-t-id": xRevertTId, "x-api-version": xApiVersion != null ? xApiVersion : undefined, @@ -244,7 +244,7 @@ export class Lead { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@revertdotdev/node", - "X-Fern-SDK-Version": "0.0.796", + "X-Fern-SDK-Version": "0.0.835", "x-revert-api-token": xRevertApiToken, "x-revert-t-id": xRevertTId, "x-api-version": xApiVersion != null ? xApiVersion : undefined, @@ -338,7 +338,7 @@ export class Lead { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@revertdotdev/node", - "X-Fern-SDK-Version": "0.0.796", + "X-Fern-SDK-Version": "0.0.835", "x-revert-api-token": xRevertApiToken, "x-revert-t-id": xRevertTId, "x-api-version": xApiVersion != null ? xApiVersion : undefined, @@ -436,7 +436,7 @@ export class Lead { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@revertdotdev/node", - "X-Fern-SDK-Version": "0.0.796", + "X-Fern-SDK-Version": "0.0.835", "x-revert-api-token": xRevertApiToken, "x-revert-t-id": xRevertTId, "x-api-version": xApiVersion != null ? xApiVersion : undefined, diff --git a/src/api/resources/crm/resources/note/client/Client.ts b/src/api/resources/crm/resources/note/client/Client.ts index 4d1f756..4347213 100644 --- a/src/api/resources/crm/resources/note/client/Client.ts +++ b/src/api/resources/crm/resources/note/client/Client.ts @@ -49,7 +49,7 @@ export class Note { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@revertdotdev/node", - "X-Fern-SDK-Version": "0.0.796", + "X-Fern-SDK-Version": "0.0.835", "x-revert-api-token": xRevertApiToken, "x-revert-t-id": xRevertTId, "x-api-version": xApiVersion != null ? xApiVersion : undefined, @@ -153,7 +153,7 @@ export class Note { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@revertdotdev/node", - "X-Fern-SDK-Version": "0.0.796", + "X-Fern-SDK-Version": "0.0.835", "x-revert-api-token": xRevertApiToken, "x-revert-t-id": xRevertTId, "x-api-version": xApiVersion != null ? xApiVersion : undefined, @@ -244,7 +244,7 @@ export class Note { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@revertdotdev/node", - "X-Fern-SDK-Version": "0.0.796", + "X-Fern-SDK-Version": "0.0.835", "x-revert-api-token": xRevertApiToken, "x-revert-t-id": xRevertTId, "x-api-version": xApiVersion != null ? xApiVersion : undefined, @@ -338,7 +338,7 @@ export class Note { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@revertdotdev/node", - "X-Fern-SDK-Version": "0.0.796", + "X-Fern-SDK-Version": "0.0.835", "x-revert-api-token": xRevertApiToken, "x-revert-t-id": xRevertTId, "x-api-version": xApiVersion != null ? xApiVersion : undefined, @@ -436,7 +436,7 @@ export class Note { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@revertdotdev/node", - "X-Fern-SDK-Version": "0.0.796", + "X-Fern-SDK-Version": "0.0.835", "x-revert-api-token": xRevertApiToken, "x-revert-t-id": xRevertTId, "x-api-version": xApiVersion != null ? xApiVersion : undefined, diff --git a/src/api/resources/crm/resources/properties/client/Client.ts b/src/api/resources/crm/resources/properties/client/Client.ts index 6706ff8..c5f554a 100644 --- a/src/api/resources/crm/resources/properties/client/Client.ts +++ b/src/api/resources/crm/resources/properties/client/Client.ts @@ -44,7 +44,7 @@ export class Properties { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@revertdotdev/node", - "X-Fern-SDK-Version": "0.0.796", + "X-Fern-SDK-Version": "0.0.835", "x-revert-api-token": xRevertApiToken, "x-revert-t-id": xRevertTId, "x-api-version": xApiVersion != null ? xApiVersion : undefined, @@ -135,7 +135,7 @@ export class Properties { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@revertdotdev/node", - "X-Fern-SDK-Version": "0.0.796", + "X-Fern-SDK-Version": "0.0.835", "x-revert-api-token": xRevertApiToken, "x-revert-t-id": xRevertTId, "x-api-version": xApiVersion != null ? xApiVersion : undefined, diff --git a/src/api/resources/crm/resources/proxy/client/Client.ts b/src/api/resources/crm/resources/proxy/client/Client.ts index 2ed4854..36b36a4 100644 --- a/src/api/resources/crm/resources/proxy/client/Client.ts +++ b/src/api/resources/crm/resources/proxy/client/Client.ts @@ -43,7 +43,7 @@ export class Proxy { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@revertdotdev/node", - "X-Fern-SDK-Version": "0.0.796", + "X-Fern-SDK-Version": "0.0.835", "x-revert-api-token": xRevertApiToken, "x-revert-t-id": xRevertTId, "x-api-version": xApiVersion != null ? xApiVersion : undefined, diff --git a/src/api/resources/crm/resources/task/client/Client.ts b/src/api/resources/crm/resources/task/client/Client.ts index 2058bda..f525fd9 100644 --- a/src/api/resources/crm/resources/task/client/Client.ts +++ b/src/api/resources/crm/resources/task/client/Client.ts @@ -49,7 +49,7 @@ export class Task { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@revertdotdev/node", - "X-Fern-SDK-Version": "0.0.796", + "X-Fern-SDK-Version": "0.0.835", "x-revert-api-token": xRevertApiToken, "x-revert-t-id": xRevertTId, "x-api-version": xApiVersion != null ? xApiVersion : undefined, @@ -153,7 +153,7 @@ export class Task { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@revertdotdev/node", - "X-Fern-SDK-Version": "0.0.796", + "X-Fern-SDK-Version": "0.0.835", "x-revert-api-token": xRevertApiToken, "x-revert-t-id": xRevertTId, "x-api-version": xApiVersion != null ? xApiVersion : undefined, @@ -244,7 +244,7 @@ export class Task { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@revertdotdev/node", - "X-Fern-SDK-Version": "0.0.796", + "X-Fern-SDK-Version": "0.0.835", "x-revert-api-token": xRevertApiToken, "x-revert-t-id": xRevertTId, "x-api-version": xApiVersion != null ? xApiVersion : undefined, @@ -338,7 +338,7 @@ export class Task { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@revertdotdev/node", - "X-Fern-SDK-Version": "0.0.796", + "X-Fern-SDK-Version": "0.0.835", "x-revert-api-token": xRevertApiToken, "x-revert-t-id": xRevertTId, "x-api-version": xApiVersion != null ? xApiVersion : undefined, @@ -436,7 +436,7 @@ export class Task { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@revertdotdev/node", - "X-Fern-SDK-Version": "0.0.796", + "X-Fern-SDK-Version": "0.0.835", "x-revert-api-token": xRevertApiToken, "x-revert-t-id": xRevertTId, "x-api-version": xApiVersion != null ? xApiVersion : undefined, diff --git a/src/api/resources/crm/resources/user/client/Client.ts b/src/api/resources/crm/resources/user/client/Client.ts index ffe3fae..2e27c88 100644 --- a/src/api/resources/crm/resources/user/client/Client.ts +++ b/src/api/resources/crm/resources/user/client/Client.ts @@ -49,7 +49,7 @@ export class User { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@revertdotdev/node", - "X-Fern-SDK-Version": "0.0.796", + "X-Fern-SDK-Version": "0.0.835", "x-revert-api-token": xRevertApiToken, "x-revert-t-id": xRevertTId, "x-api-version": xApiVersion != null ? xApiVersion : undefined, @@ -153,7 +153,7 @@ export class User { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@revertdotdev/node", - "X-Fern-SDK-Version": "0.0.796", + "X-Fern-SDK-Version": "0.0.835", "x-revert-api-token": xRevertApiToken, "x-revert-t-id": xRevertTId, "x-api-version": xApiVersion != null ? xApiVersion : undefined, @@ -244,7 +244,7 @@ export class User { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@revertdotdev/node", - "X-Fern-SDK-Version": "0.0.796", + "X-Fern-SDK-Version": "0.0.835", "x-revert-api-token": xRevertApiToken, "x-revert-t-id": xRevertTId, "x-api-version": xApiVersion != null ? xApiVersion : undefined, diff --git a/src/api/resources/fieldMapping/client/Client.ts b/src/api/resources/fieldMapping/client/Client.ts index 8cd1ac2..fbb00c6 100644 --- a/src/api/resources/fieldMapping/client/Client.ts +++ b/src/api/resources/fieldMapping/client/Client.ts @@ -42,7 +42,7 @@ export class FieldMapping { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@revertdotdev/node", - "X-Fern-SDK-Version": "0.0.796", + "X-Fern-SDK-Version": "0.0.835", "x-revert-public-token": xRevertPublicToken, "x-revert-t-id": xRevertTId, "x-revert-t-token": xRevertTToken, @@ -123,7 +123,7 @@ export class FieldMapping { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@revertdotdev/node", - "X-Fern-SDK-Version": "0.0.796", + "X-Fern-SDK-Version": "0.0.835", "x-revert-api-token": xRevertApiToken, "x-revert-t-id": xRevertTId, }, @@ -212,7 +212,7 @@ export class FieldMapping { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@revertdotdev/node", - "X-Fern-SDK-Version": "0.0.796", + "X-Fern-SDK-Version": "0.0.835", "x-revert-public-token": xRevertPublicToken, "x-revert-t-id": xRevertTId, "x-revert-t-token": xRevertTToken, @@ -305,7 +305,7 @@ export class FieldMapping { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@revertdotdev/node", - "X-Fern-SDK-Version": "0.0.796", + "X-Fern-SDK-Version": "0.0.835", "x-revert-api-token": xRevertApiToken, "x-revert-t-id": xRevertTId, }, @@ -394,7 +394,7 @@ export class FieldMapping { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@revertdotdev/node", - "X-Fern-SDK-Version": "0.0.796", + "X-Fern-SDK-Version": "0.0.835", "x-revert-api-token": xRevertApiToken, }, contentType: "application/json", @@ -485,7 +485,7 @@ export class FieldMapping { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@revertdotdev/node", - "X-Fern-SDK-Version": "0.0.796", + "X-Fern-SDK-Version": "0.0.835", "x-revert-api-token": xRevertApiToken, }, contentType: "application/json", diff --git a/src/api/resources/metadata/client/Client.ts b/src/api/resources/metadata/client/Client.ts index 73f04ba..0f3737b 100644 --- a/src/api/resources/metadata/client/Client.ts +++ b/src/api/resources/metadata/client/Client.ts @@ -42,7 +42,7 @@ export class Metadata { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@revertdotdev/node", - "X-Fern-SDK-Version": "0.0.796", + "X-Fern-SDK-Version": "0.0.835", "x-revert-public-token": xRevertPublicToken, }, contentType: "application/json", diff --git a/src/api/resources/ticket/resources/collection/client/Client.ts b/src/api/resources/ticket/resources/collection/client/Client.ts index 8c367d7..1d9e55a 100644 --- a/src/api/resources/ticket/resources/collection/client/Client.ts +++ b/src/api/resources/ticket/resources/collection/client/Client.ts @@ -56,7 +56,7 @@ export class Collection { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@revertdotdev/node", - "X-Fern-SDK-Version": "0.0.796", + "X-Fern-SDK-Version": "0.0.835", "x-revert-api-token": xRevertApiToken, "x-revert-t-id": xRevertTId, "x-api-version": xApiVersion != null ? xApiVersion : undefined, diff --git a/src/api/resources/ticket/resources/comment/client/Client.ts b/src/api/resources/ticket/resources/comment/client/Client.ts index ad1fb5c..8b15069 100644 --- a/src/api/resources/ticket/resources/comment/client/Client.ts +++ b/src/api/resources/ticket/resources/comment/client/Client.ts @@ -49,7 +49,7 @@ export class Comment { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@revertdotdev/node", - "X-Fern-SDK-Version": "0.0.796", + "X-Fern-SDK-Version": "0.0.835", "x-revert-api-token": xRevertApiToken, "x-revert-t-id": xRevertTId, "x-api-version": xApiVersion != null ? xApiVersion : undefined, @@ -153,7 +153,7 @@ export class Comment { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@revertdotdev/node", - "X-Fern-SDK-Version": "0.0.796", + "X-Fern-SDK-Version": "0.0.835", "x-revert-api-token": xRevertApiToken, "x-revert-t-id": xRevertTId, "x-api-version": xApiVersion != null ? xApiVersion : undefined, @@ -249,7 +249,7 @@ export class Comment { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@revertdotdev/node", - "X-Fern-SDK-Version": "0.0.796", + "X-Fern-SDK-Version": "0.0.835", "x-revert-api-token": xRevertApiToken, "x-revert-t-id": xRevertTId, "x-api-version": xApiVersion != null ? xApiVersion : undefined, @@ -349,7 +349,7 @@ export class Comment { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@revertdotdev/node", - "X-Fern-SDK-Version": "0.0.796", + "X-Fern-SDK-Version": "0.0.835", "x-revert-api-token": xRevertApiToken, "x-revert-t-id": xRevertTId, "x-api-version": xApiVersion != null ? xApiVersion : undefined, diff --git a/src/api/resources/ticket/resources/proxy/client/Client.ts b/src/api/resources/ticket/resources/proxy/client/Client.ts index 898141a..e983e45 100644 --- a/src/api/resources/ticket/resources/proxy/client/Client.ts +++ b/src/api/resources/ticket/resources/proxy/client/Client.ts @@ -43,7 +43,7 @@ export class Proxy { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@revertdotdev/node", - "X-Fern-SDK-Version": "0.0.796", + "X-Fern-SDK-Version": "0.0.835", "x-revert-api-token": xRevertApiToken, "x-revert-t-id": xRevertTId, "x-api-version": xApiVersion != null ? xApiVersion : undefined, diff --git a/src/api/resources/ticket/resources/task/client/Client.ts b/src/api/resources/ticket/resources/task/client/Client.ts index 1392ae7..ae412a6 100644 --- a/src/api/resources/ticket/resources/task/client/Client.ts +++ b/src/api/resources/ticket/resources/task/client/Client.ts @@ -49,7 +49,7 @@ export class Task { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@revertdotdev/node", - "X-Fern-SDK-Version": "0.0.796", + "X-Fern-SDK-Version": "0.0.835", "x-revert-api-token": xRevertApiToken, "x-revert-t-id": xRevertTId, "x-api-version": xApiVersion != null ? xApiVersion : undefined, @@ -153,7 +153,7 @@ export class Task { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@revertdotdev/node", - "X-Fern-SDK-Version": "0.0.796", + "X-Fern-SDK-Version": "0.0.835", "x-revert-api-token": xRevertApiToken, "x-revert-t-id": xRevertTId, "x-api-version": xApiVersion != null ? xApiVersion : undefined, @@ -248,7 +248,7 @@ export class Task { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@revertdotdev/node", - "X-Fern-SDK-Version": "0.0.796", + "X-Fern-SDK-Version": "0.0.835", "x-revert-api-token": xRevertApiToken, "x-revert-t-id": xRevertTId, "x-api-version": xApiVersion != null ? xApiVersion : undefined, @@ -349,7 +349,7 @@ export class Task { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@revertdotdev/node", - "X-Fern-SDK-Version": "0.0.796", + "X-Fern-SDK-Version": "0.0.835", "x-revert-api-token": xRevertApiToken, "x-revert-t-id": xRevertTId, "x-api-version": xApiVersion != null ? xApiVersion : undefined, diff --git a/src/api/resources/ticket/resources/user/client/Client.ts b/src/api/resources/ticket/resources/user/client/Client.ts index 660420d..1dd5007 100644 --- a/src/api/resources/ticket/resources/user/client/Client.ts +++ b/src/api/resources/ticket/resources/user/client/Client.ts @@ -49,7 +49,7 @@ export class User { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@revertdotdev/node", - "X-Fern-SDK-Version": "0.0.796", + "X-Fern-SDK-Version": "0.0.835", "x-revert-api-token": xRevertApiToken, "x-revert-t-id": xRevertTId, "x-api-version": xApiVersion != null ? xApiVersion : undefined, @@ -153,7 +153,7 @@ export class User { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@revertdotdev/node", - "X-Fern-SDK-Version": "0.0.796", + "X-Fern-SDK-Version": "0.0.835", "x-revert-api-token": xRevertApiToken, "x-revert-t-id": xRevertTId, "x-api-version": xApiVersion != null ? xApiVersion : undefined, diff --git a/src/serialization/resources/connection/types/ConnectionImport.ts b/src/serialization/resources/connection/types/ConnectionImport.ts new file mode 100644 index 0000000..80d3657 --- /dev/null +++ b/src/serialization/resources/connection/types/ConnectionImport.ts @@ -0,0 +1,39 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../../.."; +import * as Revert from "../../../../api"; +import * as core from "../../../../core"; + +export const ConnectionImport: core.serialization.ObjectSchema< + serializers.ConnectionImport.Raw, + Revert.ConnectionImport +> = core.serialization.object({ + tpId: core.serialization.property( + "tp_id", + core.serialization.lazy(async () => (await import("../../..")).common.Tpid) + ), + tpAccessToken: core.serialization.property("tp_access_token", core.serialization.string()), + tpRefreshToken: core.serialization.property("tp_refresh_token", core.serialization.string()), + tpCustomerId: core.serialization.property("tp_customer_id", core.serialization.string()), + tId: core.serialization.property("t_id", core.serialization.string()), + tpAccountUrl: core.serialization.property("tp_account_url", core.serialization.string().optional()), + appClientId: core.serialization.property("app_client_id", core.serialization.string()), + appClientSecret: core.serialization.property("app_client_secret", core.serialization.string()), + appId: core.serialization.property("app_id", core.serialization.string()), +}); + +export declare namespace ConnectionImport { + interface Raw { + tp_id: serializers.common.Tpid.Raw; + tp_access_token: string; + tp_refresh_token: string; + tp_customer_id: string; + t_id: string; + tp_account_url?: string | null; + app_client_id: string; + app_client_secret: string; + app_id: string; + } +} diff --git a/src/serialization/resources/connection/types/ImportConnectionsRequestBody.ts b/src/serialization/resources/connection/types/ImportConnectionsRequestBody.ts new file mode 100644 index 0000000..5f3a586 --- /dev/null +++ b/src/serialization/resources/connection/types/ImportConnectionsRequestBody.ts @@ -0,0 +1,22 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../../.."; +import * as Revert from "../../../../api"; +import * as core from "../../../../core"; + +export const ImportConnectionsRequestBody: core.serialization.ObjectSchema< + serializers.ImportConnectionsRequestBody.Raw, + Revert.ImportConnectionsRequestBody +> = core.serialization.object({ + connections: core.serialization.list( + core.serialization.lazyObject(async () => (await import("../../..")).ConnectionImport) + ), +}); + +export declare namespace ImportConnectionsRequestBody { + interface Raw { + connections: serializers.ConnectionImport.Raw[]; + } +} diff --git a/src/serialization/resources/connection/types/ImportConnectionsResponse.ts b/src/serialization/resources/connection/types/ImportConnectionsResponse.ts new file mode 100644 index 0000000..23dd145 --- /dev/null +++ b/src/serialization/resources/connection/types/ImportConnectionsResponse.ts @@ -0,0 +1,20 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../../.."; +import * as Revert from "../../../../api"; +import * as core from "../../../../core"; + +export const ImportConnectionsResponse: core.serialization.ObjectSchema< + serializers.ImportConnectionsResponse.Raw, + Revert.ImportConnectionsResponse +> = core.serialization.object({ + status: core.serialization.lazy(async () => (await import("../../..")).common.ResponseStatus), +}); + +export declare namespace ImportConnectionsResponse { + interface Raw { + status: serializers.common.ResponseStatus.Raw; + } +} diff --git a/src/serialization/resources/connection/types/index.ts b/src/serialization/resources/connection/types/index.ts index 0eab250..86cec54 100644 --- a/src/serialization/resources/connection/types/index.ts +++ b/src/serialization/resources/connection/types/index.ts @@ -7,3 +7,6 @@ export * from "./CreateConnectionWebhookRequest"; export * from "./DeleteConnectionWebhookResponse"; export * from "./GetConnectStatusResponse"; export * from "./ConnectionStatus"; +export * from "./ConnectionImport"; +export * from "./ImportConnectionsRequestBody"; +export * from "./ImportConnectionsResponse";