@great-detail/support-sdk
Advanced tools
Comparing version 0.1.2 to 0.1.3
#!/usr/bin/env node | ||
import{a as r}from"./chunk-2RK4MX2V.js";import"./chunk-V75IMWOW.js";r.parseAsync(process.argv); | ||
import{a as r}from"./chunk-XHFS4EBE.js";import"./chunk-5MVQFIMQ.js";r.parseAsync(process.argv); |
import { Command } from 'commander'; | ||
import { C as Client } from '../index-BdOHDvcP.js'; | ||
import { C as Client } from '../index-DqEBKPNI.js'; | ||
import { Options as Options$1 } from 'ora'; | ||
@@ -4,0 +4,0 @@ import 'zod'; |
@@ -1,1 +0,1 @@ | ||
import{a}from"../chunk-2RK4MX2V.js";import"../chunk-V75IMWOW.js";export{a as default}; | ||
import{a}from"../chunk-XHFS4EBE.js";import"../chunk-5MVQFIMQ.js";export{a as default}; |
@@ -1,3 +0,3 @@ | ||
import { A as Authentication } from './index-BdOHDvcP.js'; | ||
export { C as Client, d as CreateContactResponsePayload, q as CreateCorrectionResponsePayload, i as CreateLabelResponsePayload, r as CreateResponseResponsePayload, D as DeleteLabelResponsePayload, G as GetContactResponsePayload, e as GetConversationResponsePayload, j as GetLabelResponsePayload, o as GetModelResponsePayload, s as GetSourceResponsePayload, L as ListActionsResponsePayload, b as ListChannelsResponsePayload, c as ListContactsResponsePayload, m as ListConversationMessagesResponsePayload, f as ListConversationsResponsePayload, g as ListLabelConversationsResponsePayload, k as ListLabelsResponsePayload, n as ListMessagesResponsePayload, p as ListModelsResponsePayload, t as ListSourcesResponsePayload, O as Options, R as RequestFilterable, a as TransportOptions, S as TransportSendOptions, U as UpdateContactResponsePayload, h as UpdateConversationResponsePayload, l as UpdateLabelResponsePayload, C as default } from './index-BdOHDvcP.js'; | ||
import { A as Authentication } from './index-DqEBKPNI.js'; | ||
export { C as Client, e as CreateContactResponsePayload, r as CreateCorrectionResponsePayload, j as CreateLabelResponsePayload, s as CreateResponseResponsePayload, D as DeleteLabelResponsePayload, G as GetContactResponsePayload, f as GetConversationResponsePayload, k as GetLabelResponsePayload, p as GetModelResponsePayload, t as GetSourceResponsePayload, L as ListActionsResponsePayload, b as ListChannelsResponsePayload, c as ListContactsResponsePayload, n as ListConversationMessagesResponsePayload, g as ListConversationsResponsePayload, d as ListLabelContactsResponsePayload, h as ListLabelConversationsResponsePayload, l as ListLabelsResponsePayload, o as ListMessagesResponsePayload, q as ListModelsResponsePayload, u as ListSourcesResponsePayload, O as Options, R as RequestFilterable, a as TransportOptions, S as TransportSendOptions, U as UpdateContactResponsePayload, i as UpdateConversationResponsePayload, m as UpdateLabelResponsePayload, C as default } from './index-DqEBKPNI.js'; | ||
import 'zod'; | ||
@@ -4,0 +4,0 @@ |
@@ -1,1 +0,1 @@ | ||
import{a as y,b as a,c as p,d as n,e as i,f as l,g as f}from"./chunk-V75IMWOW.js";var t=class s{static DEFAULT_NAME=a;name;#e;constructor({name:e=process.env[i]??s.DEFAULT_NAME,key:r=process.env[n]}={}){if(!r)throw new Error("API Key option must be specified when using Key Authentication");this.name=e,this.#e=r}async filter(e){return{...e,headers:{...e.headers,Authorization:`Basic ${btoa(this.name+":"+this.#e)}`}}}};var o=class{#e;constructor({token:e=process.env[p]}={}){if(!e)throw new Error("Access Token option must be specified when using Token Authentication");this.#e=e}async filter(e){return{...e,headers:{...e.headers,Authorization:`Bearer ${this.#e}`}}}};export{l as Client,y as DEFAULT_SUPPORT_BASE_URL,t as KeyAuthentication,f as PublicAuthentication,o as TokenAuthentication,l as default}; | ||
import{a as y,b as a,c as p,d as n,e as i,f as l,g as f}from"./chunk-5MVQFIMQ.js";var t=class s{static DEFAULT_NAME=a;name;#e;constructor({name:e=process.env[i]??s.DEFAULT_NAME,key:r=process.env[n]}={}){if(!r)throw new Error("API Key option must be specified when using Key Authentication");this.name=e,this.#e=r}async filter(e){return{...e,headers:{...e.headers,Authorization:`Basic ${btoa(this.name+":"+this.#e)}`}}}};var o=class{#e;constructor({token:e=process.env[p]}={}){if(!e)throw new Error("Access Token option must be specified when using Token Authentication");this.#e=e}async filter(e){return{...e,headers:{...e.headers,Authorization:`Bearer ${this.#e}`}}}};export{l as Client,y as DEFAULT_SUPPORT_BASE_URL,t as KeyAuthentication,f as PublicAuthentication,o as TokenAuthentication,l as default}; |
{ | ||
"name": "@great-detail/support-sdk", | ||
"version": "0.1.2", | ||
"version": "0.1.3", | ||
"type": "module", | ||
@@ -5,0 +5,0 @@ "description": "JavaScript SDK for the Great Detail Support System", |
@@ -16,3 +16,3 @@ /** | ||
export default class ListActionsRequest { | ||
export default class ListActions { | ||
constructor(protected _transport: Transport) {} | ||
@@ -19,0 +19,0 @@ |
@@ -16,3 +16,3 @@ /** | ||
export default class ListChannelsRequest { | ||
export default class ListChannels { | ||
constructor(protected _transport: Transport) {} | ||
@@ -19,0 +19,0 @@ |
@@ -10,28 +10,29 @@ /** | ||
import ListActionsRequest from "../Action/ListActions.js"; | ||
import ListActions from "../Action/ListActions.js"; | ||
import Authentication from "../Authentication/index.js"; | ||
import ListChannelsRequest from "../Channel/ListChannels.js"; | ||
import ListChannels from "../Channel/ListChannels.js"; | ||
import { DEFAULT_SUPPORT_BASE_URL } from "../constants/index.js"; | ||
import CreateContactRequest from "../Contact/CreateContact.js"; | ||
import GetContactRequest from "../Contact/GetContact.js"; | ||
import ListContactsRequest from "../Contact/ListContacts.js"; | ||
import UpdateContactRequest from "../Contact/UpdateContact.js"; | ||
import GetConversationRequest from "../Conversation/GetConversation.js"; | ||
import ListConversationsRequest from "../Conversation/ListConversations.js"; | ||
import CreateContact from "../Contact/CreateContact.js"; | ||
import GetContact from "../Contact/GetContact.js"; | ||
import ListContacts from "../Contact/ListContacts.js"; | ||
import ListLabelContacts from "../Contact/ListLabelContacts.js"; | ||
import UpdateContact from "../Contact/UpdateContact.js"; | ||
import GetConversation from "../Conversation/GetConversation.js"; | ||
import ListConversations from "../Conversation/ListConversations.js"; | ||
import ListLabelConversations from "../Conversation/ListLabelConversations.js"; | ||
import UpdateConversationRequest from "../Conversation/UpdateConversation.js"; | ||
import CreateLabelRequest from "../Label/CreateLabel.js"; | ||
import DeleteLabelRequest from "../Label/DeleteLabel.js"; | ||
import GetLabelRequest from "../Label/GetLabel.js"; | ||
import ListLabelsRequest from "../Label/ListLabels.js"; | ||
import UpdateLabelRequest from "../Label/UpdateLabel.js"; | ||
import UpdateConversation from "../Conversation/UpdateConversation.js"; | ||
import CreateLabel from "../Label/CreateLabel.js"; | ||
import DeleteLabel from "../Label/DeleteLabel.js"; | ||
import GetLabel from "../Label/GetLabel.js"; | ||
import ListLabels from "../Label/ListLabels.js"; | ||
import UpdateLabel from "../Label/UpdateLabel.js"; | ||
import ListConversationMessages from "../Message/ListConversationMessages.js"; | ||
import ListMessagesRequest from "../Message/ListMessages.js"; | ||
import CreateCorrectionModelRequest from "../Model/Correction/CreateCorrectionModel.js"; | ||
import GetModelRequest from "../Model/GetModel.js"; | ||
import ListModelsRequest from "../Model/ListModels.js"; | ||
import CreateResponseModelRequest from "../Model/Response/CreateResponseModel.js"; | ||
import ListMessages from "../Message/ListMessages.js"; | ||
import CreateCorrectionModel from "../Model/Correction/CreateCorrectionModel.js"; | ||
import GetModel from "../Model/GetModel.js"; | ||
import ListModels from "../Model/ListModels.js"; | ||
import CreateResponseModel from "../Model/Response/CreateResponseModel.js"; | ||
import RequestStandardHeaders from "../Request/RequestStandardHeaders.js"; | ||
import GetSourceRequest from "../Source/GetSource.js"; | ||
import ListSourcesRequest from "../Source/ListSources.js"; | ||
import GetSource from "../Source/GetSource.js"; | ||
import ListSources from "../Source/ListSources.js"; | ||
import Transport from "../Transport/index.js"; | ||
@@ -65,3 +66,3 @@ | ||
return { | ||
list: new ListActionsRequest(this._transport), | ||
list: new ListActions(this._transport), | ||
}; | ||
@@ -72,3 +73,3 @@ } | ||
return { | ||
list: new ListChannelsRequest(this._transport), | ||
list: new ListChannels(this._transport), | ||
}; | ||
@@ -79,6 +80,6 @@ } | ||
return { | ||
get: new GetContactRequest(this._transport), | ||
list: new ListContactsRequest(this._transport), | ||
update: new UpdateContactRequest(this._transport), | ||
create: new CreateContactRequest(this._transport), | ||
get: new GetContact(this._transport), | ||
list: new ListContacts(this._transport), | ||
update: new UpdateContact(this._transport), | ||
create: new CreateContact(this._transport), | ||
}; | ||
@@ -89,5 +90,5 @@ } | ||
return { | ||
get: new GetConversationRequest(this._transport), | ||
list: new ListConversationsRequest(this._transport), | ||
update: new UpdateConversationRequest(this._transport), | ||
get: new GetConversation(this._transport), | ||
list: new ListConversations(this._transport), | ||
update: new UpdateConversation(this._transport), | ||
message: { | ||
@@ -101,7 +102,10 @@ list: new ListConversationMessages(this._transport), | ||
return { | ||
create: new CreateLabelRequest(this._transport), | ||
get: new GetLabelRequest(this._transport), | ||
list: new ListLabelsRequest(this._transport), | ||
update: new UpdateLabelRequest(this._transport), | ||
delete: new DeleteLabelRequest(this._transport), | ||
create: new CreateLabel(this._transport), | ||
get: new GetLabel(this._transport), | ||
list: new ListLabels(this._transport), | ||
update: new UpdateLabel(this._transport), | ||
delete: new DeleteLabel(this._transport), | ||
contact: { | ||
list: new ListLabelContacts(this._transport), | ||
}, | ||
conversation: { | ||
@@ -115,3 +119,3 @@ list: new ListLabelConversations(this._transport), | ||
return { | ||
list: new ListMessagesRequest(this._transport), | ||
list: new ListMessages(this._transport), | ||
}; | ||
@@ -122,9 +126,9 @@ } | ||
return { | ||
get: new GetModelRequest(this._transport), | ||
list: new ListModelsRequest(this._transport), | ||
get: new GetModel(this._transport), | ||
list: new ListModels(this._transport), | ||
response: { | ||
create: new CreateResponseModelRequest(this._transport), | ||
create: new CreateResponseModel(this._transport), | ||
}, | ||
correction: { | ||
create: new CreateCorrectionModelRequest(this._transport), | ||
create: new CreateCorrectionModel(this._transport), | ||
}, | ||
@@ -136,6 +140,6 @@ }; | ||
return { | ||
get: new GetSourceRequest(this._transport), | ||
list: new ListSourcesRequest(this._transport), | ||
get: new GetSource(this._transport), | ||
list: new ListSources(this._transport), | ||
}; | ||
} | ||
} |
@@ -14,7 +14,7 @@ /** | ||
export interface Options extends SendOptions { | ||
body: z.infer<typeof CreateContactRequest.SCHEMA>; | ||
body: z.infer<typeof CreateContact.SCHEMA>; | ||
request?: RequestInit; | ||
} | ||
export default class CreateContactRequest { | ||
export default class CreateContact { | ||
public static SCHEMA = z.object({ | ||
@@ -40,3 +40,3 @@ name: z.string(), | ||
}, | ||
body: JSON.stringify(CreateContactRequest.SCHEMA.parse(body)), | ||
body: JSON.stringify(CreateContact.SCHEMA.parse(body)), | ||
}, | ||
@@ -43,0 +43,0 @@ options, |
@@ -17,3 +17,3 @@ /** | ||
export default class GetContactRequest { | ||
export default class GetContact { | ||
constructor(protected _transport: Transport) {} | ||
@@ -20,0 +20,0 @@ |
@@ -16,3 +16,3 @@ /** | ||
export default class ListContactsRequest { | ||
export default class ListContacts { | ||
constructor(protected _transport: Transport) {} | ||
@@ -19,0 +19,0 @@ |
@@ -15,7 +15,7 @@ /** | ||
id: string; | ||
body: z.infer<typeof UpdateContactRequest.SCHEMA>; | ||
body: z.infer<typeof UpdateContact.SCHEMA>; | ||
request?: RequestInit; | ||
} | ||
export default class UpdateContactRequest { | ||
export default class UpdateContact { | ||
public static SCHEMA = z.object({ | ||
@@ -40,3 +40,3 @@ name: z.string().optional(), | ||
}, | ||
body: JSON.stringify(UpdateContactRequest.SCHEMA.parse(body)), | ||
body: JSON.stringify(UpdateContact.SCHEMA.parse(body)), | ||
}, | ||
@@ -43,0 +43,0 @@ options, |
@@ -17,3 +17,3 @@ /** | ||
export default class GetConversationRequest { | ||
export default class GetConversation { | ||
constructor(protected _transport: Transport) {} | ||
@@ -20,0 +20,0 @@ |
@@ -16,3 +16,3 @@ /** | ||
export default class ListConversationsRequest { | ||
export default class ListConversations { | ||
constructor(protected _transport: Transport) {} | ||
@@ -19,0 +19,0 @@ |
@@ -15,7 +15,7 @@ /** | ||
id: string; | ||
body: z.infer<typeof UpdateConversationRequest.SCHEMA>; | ||
body: z.infer<typeof UpdateConversation.SCHEMA>; | ||
request?: RequestInit; | ||
} | ||
export default class UpdateConversationRequest { | ||
export default class UpdateConversation { | ||
public static SCHEMA = z.object({ | ||
@@ -38,3 +38,3 @@ hasEnded: z.boolean(), | ||
}, | ||
body: JSON.stringify(UpdateConversationRequest.SCHEMA.parse(body)), | ||
body: JSON.stringify(UpdateConversation.SCHEMA.parse(body)), | ||
}, | ||
@@ -41,0 +41,0 @@ options, |
@@ -36,2 +36,3 @@ /** | ||
export { type ListContactsResponsePayload } from "./Contact/ListContacts.js"; | ||
export { type ListLabelContactsResponsePayload } from "./Contact/ListLabelContacts.js"; | ||
export { type UpdateContactResponsePayload } from "./Contact/UpdateContact.js"; | ||
@@ -38,0 +39,0 @@ export { type CreateContactResponsePayload } from "./Contact/CreateContact.js"; |
@@ -14,7 +14,7 @@ /** | ||
export interface Options extends SendOptions { | ||
body: z.infer<typeof CreateLabelRequest.SCHEMA>; | ||
body: z.infer<typeof CreateLabel.SCHEMA>; | ||
request?: RequestInit; | ||
} | ||
export default class CreateLabelRequest { | ||
export default class CreateLabel { | ||
public static SCHEMA = z.object({ | ||
@@ -39,3 +39,3 @@ title: z.string(), | ||
}, | ||
body: JSON.stringify(CreateLabelRequest.SCHEMA.parse(body)), | ||
body: JSON.stringify(CreateLabel.SCHEMA.parse(body)), | ||
}, | ||
@@ -42,0 +42,0 @@ options, |
@@ -17,3 +17,3 @@ /** | ||
export default class DeleteLabelRequest { | ||
export default class DeleteLabel { | ||
constructor(protected _transport: Transport) {} | ||
@@ -20,0 +20,0 @@ |
@@ -17,3 +17,3 @@ /** | ||
export default class GetLabelRequest { | ||
export default class GetLabel { | ||
constructor(protected _transport: Transport) {} | ||
@@ -20,0 +20,0 @@ |
@@ -16,3 +16,3 @@ /** | ||
export default class ListLabelsRequest { | ||
export default class ListLabels { | ||
constructor(protected _transport: Transport) {} | ||
@@ -19,0 +19,0 @@ |
@@ -15,7 +15,7 @@ /** | ||
id: string; | ||
body: z.infer<typeof UpdateLabelRequest.SCHEMA>; | ||
body: z.infer<typeof UpdateLabel.SCHEMA>; | ||
request?: RequestInit; | ||
} | ||
export default class UpdateLabelRequest { | ||
export default class UpdateLabel { | ||
public static SCHEMA = z.object({ | ||
@@ -39,3 +39,3 @@ title: z.string().optional(), | ||
}, | ||
body: JSON.stringify(UpdateLabelRequest.SCHEMA.parse(body)), | ||
body: JSON.stringify(UpdateLabel.SCHEMA.parse(body)), | ||
}, | ||
@@ -42,0 +42,0 @@ options, |
@@ -16,3 +16,3 @@ /** | ||
export default class ListMessagesRequest { | ||
export default class ListMessages { | ||
constructor(protected _transport: Transport) {} | ||
@@ -19,0 +19,0 @@ |
@@ -15,7 +15,7 @@ /** | ||
id: string; | ||
body: z.infer<typeof CreateCorrectionModelRequest.SCHEMA>; | ||
body: z.infer<typeof CreateCorrectionModel.SCHEMA>; | ||
request?: RequestInit; | ||
} | ||
export default class CreateCorrectionModelRequest { | ||
export default class CreateCorrectionModel { | ||
public static SCHEMA = z.object({ | ||
@@ -40,3 +40,3 @@ input: z.string().max(65_536), | ||
}, | ||
body: JSON.stringify(CreateCorrectionModelRequest.SCHEMA.parse(body)), | ||
body: JSON.stringify(CreateCorrectionModel.SCHEMA.parse(body)), | ||
}, | ||
@@ -43,0 +43,0 @@ options, |
@@ -17,3 +17,3 @@ /** | ||
export default class GetModelRequest { | ||
export default class GetModel { | ||
constructor(protected _transport: Transport) {} | ||
@@ -20,0 +20,0 @@ |
@@ -16,3 +16,3 @@ /** | ||
export default class ListModelsRequest { | ||
export default class ListModels { | ||
constructor(protected _transport: Transport) {} | ||
@@ -19,0 +19,0 @@ |
@@ -15,7 +15,7 @@ /** | ||
id: string; | ||
body: z.infer<typeof CreateResponseModelRequest.SCHEMA>; | ||
body: z.infer<typeof CreateResponseModel.SCHEMA>; | ||
request?: RequestInit; | ||
} | ||
export default class CreateResponseModelRequest { | ||
export default class CreateResponseModel { | ||
public static SCHEMA = z | ||
@@ -43,3 +43,3 @@ .array( | ||
}, | ||
body: JSON.stringify(CreateResponseModelRequest.SCHEMA.parse(body)), | ||
body: JSON.stringify(CreateResponseModel.SCHEMA.parse(body)), | ||
}, | ||
@@ -46,0 +46,0 @@ options, |
@@ -17,3 +17,3 @@ /** | ||
export default class GetSourceRequest { | ||
export default class GetSource { | ||
constructor(protected _transport: Transport) {} | ||
@@ -20,0 +20,0 @@ |
@@ -16,3 +16,3 @@ /** | ||
export default class ListSourcesRequest { | ||
export default class ListSources { | ||
constructor(protected _transport: Transport) {} | ||
@@ -19,0 +19,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 2 instances in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 2 instances in 1 package
187907
64
3362