@great-detail/support-sdk
Advanced tools
Comparing version 0.2.8 to 0.2.9
#!/usr/bin/env node | ||
import{a as r}from"./chunk-IQESWTED.js";import"./chunk-UWNMFEJS.js";r.parseAsync(process.argv); | ||
import{a as r}from"./chunk-ZYSG2PTQ.js";import"./chunk-KG7KNOPC.js";r.parseAsync(process.argv); |
import { Command } from 'commander'; | ||
import { C as Client } from '../index-DsZ1QEUj.js'; | ||
import { C as Client } from '../index-BMsEq65I.js'; | ||
import { Options as Options$1 } from 'ora'; | ||
@@ -4,0 +4,0 @@ import 'ky'; |
@@ -1,1 +0,1 @@ | ||
import{a}from"../chunk-IQESWTED.js";import"../chunk-UWNMFEJS.js";export{a as default}; | ||
import{a}from"../chunk-ZYSG2PTQ.js";import"../chunk-KG7KNOPC.js";export{a as default}; |
@@ -1,3 +0,3 @@ | ||
import { A as Authentication } from './index-DsZ1QEUj.js'; | ||
export { C as Client, y as CreateContactNoteResponsePayload, e as CreateContactResponsePayload, x as CreateConversationNoteResponsePayload, 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 GetNoteResponsePayload, z as GetSourceResponsePayload, L as ListActionsResponsePayload, b as ListChannelsResponsePayload, w as ListContactNotesResponsePayload, c as ListContactsResponsePayload, n as ListConversationMessagesResponsePayload, v as ListConversationNotesResponsePayload, g as ListConversationsResponsePayload, d as ListLabelContactsResponsePayload, h as ListLabelConversationsResponsePayload, l as ListLabelsResponsePayload, o as ListMessagesResponsePayload, q as ListModelsResponsePayload, B as ListSourcesResponsePayload, O as Options, R as RequestFilterable, a as TransportOptions, U as UpdateContactResponsePayload, i as UpdateConversationResponsePayload, m as UpdateLabelResponsePayload, u as UpdateNoteResponsePayload, C as default } from './index-DsZ1QEUj.js'; | ||
import { A as Authentication } from './index-BMsEq65I.js'; | ||
export { C as Client, b as CreateBoilerplateResponsePayload, x as CreateContactNoteResponsePayload, e as CreateContactResponsePayload, y as CreateConversationNoteResponsePayload, v as CreateCorrectionResponsePayload, n as CreateLabelResponsePayload, w as CreateResponseResponsePayload, D as DeleteLabelResponsePayload, G as GetBoilerplateResponsePayload, f as GetContactResponsePayload, j as GetConversationResponsePayload, o as GetLabelResponsePayload, t as GetModelResponsePayload, z as GetNoteResponsePayload, H as GetSourceResponsePayload, L as ListActionsResponsePayload, c as ListBoilerplatesResponsePayload, d as ListChannelsResponsePayload, B as ListContactNotesResponsePayload, g as ListContactsResponsePayload, r as ListConversationMessagesResponsePayload, E as ListConversationNotesResponsePayload, k as ListConversationsResponsePayload, h as ListLabelContactsResponsePayload, l as ListLabelConversationsResponsePayload, p as ListLabelsResponsePayload, s as ListMessagesResponsePayload, u as ListModelsResponsePayload, I as ListSourcesResponsePayload, O as Options, R as RequestFilterable, a as TransportOptions, U as UpdateBoilerplateResponsePayload, i as UpdateContactResponsePayload, m as UpdateConversationResponsePayload, q as UpdateLabelResponsePayload, F as UpdateNoteResponsePayload, C as default } from './index-BMsEq65I.js'; | ||
import 'ky'; | ||
@@ -4,0 +4,0 @@ import 'zod'; |
@@ -1,1 +0,1 @@ | ||
import{a as P,b as A,c as a,d as p,e as n,f as i,g as f,h as l,i as y,j as m,k as d,l as x,m as u,n as c,o as h}from"./chunk-UWNMFEJS.js";var R={};P(R,{AuthError:()=>l,AuthenticationError:()=>y,AuthorizationError:()=>m,LogicError:()=>d,NetworkError:()=>x,SupportError:()=>f,ValidationError:()=>u});var o=class r{static DEFAULT_NAME=a;name;#e;constructor({name:e=process.env[i]??r.DEFAULT_NAME,key:s=process.env[n]}={}){if(!s)throw new Error("API Key option must be specified when using Key Authentication");this.name=e,this.#e=s}async filter(){return{headers:this.getHeaders()}}getHeaders(){return{Authorization:`Basic ${btoa(this.name+":"+this.#e)}`}}};var t=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(){return{headers:this.getHeaders()}}getHeaders(){return{Authorization:`Bearer ${this.#e}`}}};export{c as Client,A as DEFAULT_SUPPORT_BASE_URL,R as Error,o as KeyAuthentication,h as PublicAuthentication,t as TokenAuthentication,c as default}; | ||
import{a as d,b as g,c as s,d as n,e as a,f as p,g as f,h as u,i as m,j as c,k as l,l as x,m as A,n as h,o as _}from"./chunk-KG7KNOPC.js";var E={};d(E,{AuthError:()=>u,AuthenticationError:()=>m,AuthorizationError:()=>c,LogicError:()=>l,NetworkError:()=>x,SupportError:()=>f,ValidationError:()=>A});var r=class o{static DEFAULT_NAME=s;name;#t;constructor({name:t=process.env[p]??o.DEFAULT_NAME,key:i=process.env[a]}={}){if(!i)throw new Error("API Key option must be specified when using Key Authentication");this.name=t,this.#t=i}async filter(){return{headers:this.getHeaders()}}getHeaders(){return{Authorization:`Basic ${btoa(this.name+":"+this.#t)}`}}};var e=class{#t;constructor({token:t=process.env[n]}={}){if(!t)throw new Error("Access Token option must be specified when using Token Authentication");this.#t=t}async filter(){return{headers:this.getHeaders()}}getHeaders(){return{Authorization:`Bearer ${this.#t}`}}};export{h as Client,g as DEFAULT_SUPPORT_BASE_URL,E as Error,r as KeyAuthentication,_ as PublicAuthentication,e as TokenAuthentication,h as default}; |
{ | ||
"name": "@great-detail/support-sdk", | ||
"version": "0.2.8", | ||
"version": "0.2.9", | ||
"type": "module", | ||
@@ -64,3 +64,2 @@ "description": "JavaScript SDK for the Great Detail Support System", | ||
"commander": "^12.1.0", | ||
"cross-fetch": "^4.0.0", | ||
"is-network-error": "^1.1.0", | ||
@@ -67,0 +66,0 @@ "ky": "^1.7.2", |
@@ -12,2 +12,6 @@ /** | ||
import Authentication from "../Authentication/index.js"; | ||
import CreateBoilerplate from "../Boilerplate/CreateBoilerplate.js"; | ||
import GetBoilerplate from "../Boilerplate/GetBoilerplate.js"; | ||
import ListBoilerplates from "../Boilerplate/ListBoilerplates.js"; | ||
import UpdateBoilerplate from "../Boilerplate/UpdateBoilerplate.js"; | ||
import ListChannels from "../Channel/ListChannels.js"; | ||
@@ -78,2 +82,11 @@ import { BASE_URL_ENV_VAR } from "../constants/environment.js"; | ||
public get boilerplate() { | ||
return { | ||
get: new GetBoilerplate(this._transport), | ||
list: new ListBoilerplates(this._transport), | ||
create: new CreateBoilerplate(this._transport), | ||
update: new UpdateBoilerplate(this._transport), | ||
}; | ||
} | ||
public get channel() { | ||
@@ -80,0 +93,0 @@ return { |
@@ -27,48 +27,11 @@ /** | ||
// Actions | ||
export { type ListActionsResponsePayload } from "./Action/ListActions.js"; | ||
// Channels | ||
export { type ListChannelsResponsePayload } from "./Channel/ListChannels.js"; | ||
// Contacts | ||
export { type GetContactResponsePayload } from "./Contact/GetContact.js"; | ||
export { type ListContactsResponsePayload } from "./Contact/ListContacts.js"; | ||
export { type ListLabelContactsResponsePayload } from "./Contact/ListLabelContacts.js"; | ||
export { type UpdateContactResponsePayload } from "./Contact/UpdateContact.js"; | ||
export { type CreateContactResponsePayload } from "./Contact/CreateContact.js"; | ||
// Conversations | ||
export { type GetConversationResponsePayload } from "./Conversation/GetConversation.js"; | ||
export { type ListConversationsResponsePayload } from "./Conversation/ListConversations.js"; | ||
export { type ListLabelConversationsResponsePayload } from "./Conversation/ListLabelConversations.js"; | ||
export { type UpdateConversationResponsePayload } from "./Conversation/UpdateConversation.js"; | ||
// Labels | ||
export { type CreateLabelResponsePayload } from "./Label/CreateLabel.js"; | ||
export { type DeleteLabelResponsePayload } from "./Label/DeleteLabel.js"; | ||
export { type GetLabelResponsePayload } from "./Label/GetLabel.js"; | ||
export { type ListLabelsResponsePayload } from "./Label/ListLabels.js"; | ||
export { type UpdateLabelResponsePayload } from "./Label/UpdateLabel.js"; | ||
// Messages | ||
export { type ListConversationMessagesResponsePayload } from "./Message/ListConversationMessages.js"; | ||
export { type ListMessagesResponsePayload } from "./Message/ListMessages.js"; | ||
// Models | ||
export { type GetModelResponsePayload } from "./Model/GetModel.js"; | ||
export { type ListModelsResponsePayload } from "./Model/ListModels.js"; | ||
export { type CreateCorrectionResponsePayload } from "./Model/Correction/CreateCorrectionModel.js"; | ||
export { type CreateResponseResponsePayload } from "./Model/Response/CreateResponseModel.js"; | ||
// Notes | ||
export { type GetNoteResponsePayload } from "./Note/GetNote.js"; | ||
export { type UpdateNoteResponsePayload } from "./Note/UpdateNote.js"; | ||
export { type ListConversationNotesResponsePayload } from "./Note/ListConversationNotes.js"; | ||
export { type ListContactNotesResponsePayload } from "./Note/ListContactNotes.js"; | ||
export { type CreateConversationNoteResponsePayload } from "./Note/CreateConversationNote.js"; | ||
export { type CreateContactNoteResponsePayload } from "./Note/CreateContactNote.js"; | ||
// Sources | ||
export { type GetSourceResponsePayload } from "./Source/GetSource.js"; | ||
export { type ListSourcesResponsePayload } from "./Source/ListSources.js"; | ||
export * from "./Action/index.js"; | ||
export * from "./Boilerplate/index.js"; | ||
export * from "./Channel/index.js"; | ||
export * from "./Contact/index.js"; | ||
export * from "./Conversation/index.js"; | ||
export * from "./Label/index.js"; | ||
export * from "./Message/index.js"; | ||
export * from "./Model/index.js"; | ||
export * from "./Note/index.js"; | ||
export * from "./Source/index.js"; |
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 7 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 7 instances in 1 package
258541
5
94
4554
- Removedcross-fetch@^4.0.0
- Removedcross-fetch@4.0.0(transitive)
- Removednode-fetch@2.7.0(transitive)
- Removedtr46@0.0.3(transitive)
- Removedwebidl-conversions@3.0.1(transitive)
- Removedwhatwg-url@5.0.0(transitive)