@great-detail/support-sdk
Advanced tools
Comparing version 0.2.5 to 0.2.6
#!/usr/bin/env node | ||
import{a as r}from"./chunk-MWZY543W.js";import"./chunk-AYV3HOB2.js";r.parseAsync(process.argv); | ||
import{a as r}from"./chunk-6P6PJOYL.js";import"./chunk-WWLNDX6W.js";r.parseAsync(process.argv); |
@@ -1,1 +0,1 @@ | ||
import{a}from"../chunk-MWZY543W.js";import"../chunk-AYV3HOB2.js";export{a as default}; | ||
import{a}from"../chunk-6P6PJOYL.js";import"../chunk-WWLNDX6W.js";export{a as default}; |
@@ -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-AYV3HOB2.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 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-WWLNDX6W.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}; |
{ | ||
"name": "@great-detail/support-sdk", | ||
"version": "0.2.5", | ||
"version": "0.2.6", | ||
"type": "module", | ||
@@ -5,0 +5,0 @@ "description": "JavaScript SDK for the Great Detail Support System", |
@@ -10,3 +10,3 @@ /** | ||
import fetch from "cross-fetch"; | ||
import fetch, { Request } from "cross-fetch"; | ||
import isNetworkError from "is-network-error"; | ||
@@ -13,0 +13,0 @@ import AuthenticationError from "../Error/AuthenticationError.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
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
236005