@kohost/api-client 7.8.0 → 7.8.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -152,8 +152,9 @@ var KohostHTTPClient = class KohostHTTPClient {
152
152
  else url.searchParams.append(key, value);
153
153
  });
154
154
  const headers = new Headers(this.headers);
155
- if (config.headers) Object.keys(config.headers).forEach((key) => {
156
- headers.set(key, config.headers[key]);
155
+ if (config.headers) Object.entries(config.headers).forEach(([key, value]) => {
156
+ if (value === null || value === void 0 || value === "") headers.delete(key);
157
+ else headers.set(key, value);
157
158
  });
158
159
  const body = config.data !== null && [
159
160
  "POST",
@@ -1 +1 @@
1
- {"version":3,"file":"httpClient.js","names":["#onSuccess","#onError","#onPhoneVerificationRequired","#onLoginRequired"],"sources":["../.generated/httpClient.js"],"sourcesContent":["export class KohostHTTPClient {\n #onSuccess;\n #onError;\n\n /** \n @param {Object} options - The options to create the client\n @param {String} options.organizationId - The organization ID\n @param {String} options.propertyId - The property ID\n @param {String | URL} options.url - The base URL for the API endpint\n @param {String} options.apiKey - The API key to use for requests\n @param {Headers} options.headers - Additional headers to send with each request\n @param {Function} options.onSuccess - A callback to handle successful responses\n @param {Function} options.onError - A callback to handle errors\n */\n constructor(\n options = {\n url: \"\",\n propertyId: \"\",\n organizationId: \"\",\n apiKey: \"\",\n headers: new Headers({}),\n onSuccess: (response) => response,\n onError: (error) => error,\n },\n ) {\n if (!options.url) throw new Error(\"options.url is required\");\n this.options = options;\n\n this.baseUrl = new URL(options.url);\n this.headers = new Headers({\n \"Content-Type\": \"application/json\",\n Accept: \"application/json\",\n ...options.headers,\n });\n\n if (options.apiKey) {\n this.headers.set(KohostHTTPClient.defs.apiKeyHeader, options.apiKey);\n }\n\n if (options.propertyId) {\n this.propertyId = options.propertyId;\n }\n\n if (options.organizationId) {\n this.organizationId = options.organizationId;\n }\n\n this.#onSuccess = options.onSuccess\n ? options.onSuccess\n : (response) => response;\n\n this.#onError = options.onError ? options.onError : (error) => error;\n\n this.callbacks = {};\n }\n\n /**\n *\n * @param {\"LoginRequired\" | \"PhoneVerificationRequired\"} event\n * @param {Function} callback\n */\n on(event, callback) {\n if (typeof callback !== \"function\") {\n throw new Error(\"Callback must be a function\");\n }\n if (!this.callbacks[event]) {\n this.callbacks[event] = [];\n }\n this.callbacks[event].push(callback);\n }\n\n emit(event, ...args) {\n if (this.callbacks[event]) {\n this.callbacks[event].forEach((callback) => callback(...args));\n }\n }\n\n /**\n * @param {string} orgId\n * @returns {void}\n * @memberof KohostApiClient\n * @example\n * client.organizationId = \"1234\";\n */\n set organizationId(orgId) {\n const key = KohostHTTPClient.defs.organizationHeader;\n this.headers.set(key, orgId);\n }\n\n get organizationId() {\n const key = KohostHTTPClient.defs.organizationHeader;\n return this.headers.get(key);\n }\n\n /**\n * @param {string} propertyId\n * @returns {void}\n * @memberof KohostApiClient\n * @example\n * client.propertyId = \"1234\";\n */\n\n set propertyId(propertyId) {\n const key = KohostHTTPClient.defs.propertyHeader;\n this.headers.set(key, propertyId);\n }\n\n get propertyId() {\n const key = KohostHTTPClient.defs.propertyHeader;\n return this.headers.get(key);\n }\n\n static get defs() {\n return {\n apiKeyHeader: \"X-Api-Key\",\n propertyHeader: \"X-Property-Id\",\n organizationHeader: \"X-Organization-Id\",\n };\n }\n\n /**\n * @typedef {keyof typeof import('./useCases')} CommandName\n * @typedef {import('./useCases')[CommandName]} Command\n *\n * @param {Command} command\n */\n async send(command) {\n const commandConfig = command.config;\n const request = this.createRequest(commandConfig);\n\n const response = await fetch(request);\n\n const isJsonResponse =\n response.headers.get(\"Content-Type\")?.includes(\"application/json\") ||\n false;\n\n const responseData = isJsonResponse ? await response.json() : response.body;\n\n if (!response.ok) {\n let error = responseData?.error || new Error(response.statusText);\n\n const status = response.status;\n const errorMessage = responseData?.error?.message;\n\n const expectedError = status >= 400 && status < 500;\n\n if (expectedError && errorMessage === \"Phone Verification is required\") {\n this.#onPhoneVerificationRequired();\n return Promise.reject(error);\n }\n\n if (expectedError && errorMessage === \"Login Required\") {\n this.#onLoginRequired();\n return Promise.reject(error);\n }\n\n if (\n expectedError &&\n errorMessage === \"No auth header or cookie provided\"\n ) {\n this.#onLoginRequired();\n return Promise.reject(error);\n }\n\n error = this.#onError(error);\n\n return Promise.reject(error);\n }\n\n return this.#onSuccess(responseData);\n }\n\n #onLoginRequired() {\n this.emit(\"LoginRequired\");\n }\n\n #onPhoneVerificationRequired() {\n this.emit(\"PhoneVerificationRequired\");\n }\n\n /**\n * @param {Command} config\n * @returns {Request}\n */\n createRequest(config) {\n if (typeof config.headers !== \"object\") {\n config.headers = {};\n }\n\n let apiPath = config.url;\n\n if (apiPath.startsWith(\"/\")) {\n apiPath = `.${apiPath}`;\n }\n const url = new URL(apiPath, this.baseUrl);\n const method = config.method?.toUpperCase() || \"GET\";\n\n // Add parameters to URL if they exist\n if (config.params && typeof config.params === \"object\") {\n Object.entries(config.params).forEach(([key, value]) => {\n // Handle array values\n if (Array.isArray(value)) {\n value.forEach((item) => {\n if (typeof item === \"object\" && item !== null) {\n Object.entries(item).forEach(([itemKey, itemValue]) => {\n url.searchParams.append(`${key}[][${itemKey}]`, itemValue);\n });\n } else {\n url.searchParams.append(`${key}[]`, item);\n }\n });\n }\n // Handle null/undefined\n else if (value === null || value === undefined) {\n url.searchParams.append(key, \"\");\n }\n // Handle nested objects\n else if (typeof value === \"object\") {\n Object.entries(value).forEach(([nestedKey, nestedValue]) => {\n if (Array.isArray(nestedValue)) {\n nestedValue.forEach((item) => {\n url.searchParams.append(`${key}[${nestedKey}][]`, item);\n });\n } else {\n url.searchParams.append(`${key}[${nestedKey}]`, nestedValue);\n }\n });\n }\n // Handle primitive values\n else {\n url.searchParams.append(key, value);\n }\n });\n }\n\n const headers = new Headers(this.headers);\n // Add any additional headers\n if (config.headers) {\n Object.keys(config.headers).forEach((key) => {\n headers.set(key, config.headers[key]);\n });\n }\n\n const body =\n config.data !== null && [\"POST\", \"PUT\", \"PATCH\"].includes(method)\n ? headers.get(\"Content-Type\") === \"application/json\"\n ? JSON.stringify(config.data)\n : config.data\n : undefined;\n\n const request = new Request(url, {\n method: method,\n headers: headers,\n credentials: \"include\",\n body: body,\n });\n\n return request;\n }\n}\n"],"mappings":";AAAA,IAAa,mBAAb,MAAa,iBAAiB;CAC5B;CACA;;;;;;;;;;;CAYA,YACE,UAAU;EACR,KAAK;EACL,YAAY;EACZ,gBAAgB;EAChB,QAAQ;EACR,SAAS,IAAI,QAAQ,CAAC,CAAC;EACvB,YAAY,aAAa;EACzB,UAAU,UAAU;CACtB,GACA;EACA,IAAI,CAAC,QAAQ,KAAK,MAAM,IAAI,MAAM,yBAAyB;EAC3D,KAAK,UAAU;EAEf,KAAK,UAAU,IAAI,IAAI,QAAQ,GAAG;EAClC,KAAK,UAAU,IAAI,QAAQ;GACzB,gBAAgB;GAChB,QAAQ;GACR,GAAG,QAAQ;EACb,CAAC;EAED,IAAI,QAAQ,QACV,KAAK,QAAQ,IAAI,iBAAiB,KAAK,cAAc,QAAQ,MAAM;EAGrE,IAAI,QAAQ,YACV,KAAK,aAAa,QAAQ;EAG5B,IAAI,QAAQ,gBACV,KAAK,iBAAiB,QAAQ;EAGhC,KAAKA,aAAa,QAAQ,YACtB,QAAQ,aACP,aAAa;EAElB,KAAKC,WAAW,QAAQ,UAAU,QAAQ,WAAW,UAAU;EAE/D,KAAK,YAAY,CAAC;CACpB;;;;;;CAOA,GAAG,OAAO,UAAU;EAClB,IAAI,OAAO,aAAa,YACtB,MAAM,IAAI,MAAM,6BAA6B;EAE/C,IAAI,CAAC,KAAK,UAAU,QAClB,KAAK,UAAU,SAAS,CAAC;EAE3B,KAAK,UAAU,MAAM,CAAC,KAAK,QAAQ;CACrC;CAEA,KAAK,OAAO,GAAG,MAAM;EACnB,IAAI,KAAK,UAAU,QACjB,KAAK,UAAU,MAAM,CAAC,SAAS,aAAa,SAAS,GAAG,IAAI,CAAC;CAEjE;;;;;;;;CASA,IAAI,eAAe,OAAO;EACxB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,KAAK,OAAO;EAExC,IAAI,OAAO,SACT,OAAO,KAAK,OAAO,OAAO,CAAC,CAAC,SAAS,QAAQ;GAC3C,QAAQ,IAAI,KAAK,OAAO,QAAQ,IAAI;EACtC,CAAC;EAGH,MAAM,OACJ,OAAO,SAAS,QAAQ;GAAC;GAAQ;GAAO;EAAO,CAAC,CAAC,SAAS,MAAM,IAC5D,QAAQ,IAAI,cAAc,MAAM,qBAC9B,KAAK,UAAU,OAAO,IAAI,IAC1B,OAAO,OACT,KAAA;EASN,OAAO,IAPa,QAAQ,KAAK;GACvB;GACC;GACT,aAAa;GACP;EACR,CAEa;CACf;AACF"}
1
+ {"version":3,"file":"httpClient.js","names":["#onSuccess","#onError","#onPhoneVerificationRequired","#onLoginRequired"],"sources":["../.generated/httpClient.js"],"sourcesContent":["export class KohostHTTPClient {\n #onSuccess;\n #onError;\n\n /** \n @param {Object} options - The options to create the client\n @param {String} options.organizationId - The organization ID\n @param {String} options.propertyId - The property ID\n @param {String | URL} options.url - The base URL for the API endpint\n @param {String} options.apiKey - The API key to use for requests\n @param {Headers} options.headers - Additional headers to send with each request\n @param {Function} options.onSuccess - A callback to handle successful responses\n @param {Function} options.onError - A callback to handle errors\n */\n constructor(\n options = {\n url: \"\",\n propertyId: \"\",\n organizationId: \"\",\n apiKey: \"\",\n headers: new Headers({}),\n onSuccess: (response) => response,\n onError: (error) => error,\n },\n ) {\n if (!options.url) throw new Error(\"options.url is required\");\n this.options = options;\n\n this.baseUrl = new URL(options.url);\n this.headers = new Headers({\n \"Content-Type\": \"application/json\",\n Accept: \"application/json\",\n ...options.headers,\n });\n\n if (options.apiKey) {\n this.headers.set(KohostHTTPClient.defs.apiKeyHeader, options.apiKey);\n }\n\n if (options.propertyId) {\n this.propertyId = options.propertyId;\n }\n\n if (options.organizationId) {\n this.organizationId = options.organizationId;\n }\n\n this.#onSuccess = options.onSuccess\n ? options.onSuccess\n : (response) => response;\n\n this.#onError = options.onError ? options.onError : (error) => error;\n\n this.callbacks = {};\n }\n\n /**\n *\n * @param {\"LoginRequired\" | \"PhoneVerificationRequired\"} event\n * @param {Function} callback\n */\n on(event, callback) {\n if (typeof callback !== \"function\") {\n throw new Error(\"Callback must be a function\");\n }\n if (!this.callbacks[event]) {\n this.callbacks[event] = [];\n }\n this.callbacks[event].push(callback);\n }\n\n emit(event, ...args) {\n if (this.callbacks[event]) {\n this.callbacks[event].forEach((callback) => callback(...args));\n }\n }\n\n /**\n * @param {string} orgId\n * @returns {void}\n * @memberof KohostApiClient\n * @example\n * client.organizationId = \"1234\";\n */\n set organizationId(orgId) {\n const key = KohostHTTPClient.defs.organizationHeader;\n this.headers.set(key, orgId);\n }\n\n get organizationId() {\n const key = KohostHTTPClient.defs.organizationHeader;\n return this.headers.get(key);\n }\n\n /**\n * @param {string} propertyId\n * @returns {void}\n * @memberof KohostApiClient\n * @example\n * client.propertyId = \"1234\";\n */\n\n set propertyId(propertyId) {\n const key = KohostHTTPClient.defs.propertyHeader;\n this.headers.set(key, propertyId);\n }\n\n get propertyId() {\n const key = KohostHTTPClient.defs.propertyHeader;\n return this.headers.get(key);\n }\n\n static get defs() {\n return {\n apiKeyHeader: \"X-Api-Key\",\n propertyHeader: \"X-Property-Id\",\n organizationHeader: \"X-Organization-Id\",\n };\n }\n\n /**\n * @typedef {keyof typeof import('./useCases')} CommandName\n * @typedef {import('./useCases')[CommandName]} Command\n *\n * @param {Command} command\n */\n async send(command) {\n const commandConfig = command.config;\n const request = this.createRequest(commandConfig);\n\n const response = await fetch(request);\n\n const isJsonResponse =\n response.headers.get(\"Content-Type\")?.includes(\"application/json\") ||\n false;\n\n const responseData = isJsonResponse ? await response.json() : response.body;\n\n if (!response.ok) {\n let error = responseData?.error || new Error(response.statusText);\n\n const status = response.status;\n const errorMessage = responseData?.error?.message;\n\n const expectedError = status >= 400 && status < 500;\n\n if (expectedError && errorMessage === \"Phone Verification is required\") {\n this.#onPhoneVerificationRequired();\n return Promise.reject(error);\n }\n\n if (expectedError && errorMessage === \"Login Required\") {\n this.#onLoginRequired();\n return Promise.reject(error);\n }\n\n if (\n expectedError &&\n errorMessage === \"No auth header or cookie provided\"\n ) {\n this.#onLoginRequired();\n return Promise.reject(error);\n }\n\n error = this.#onError(error);\n\n return Promise.reject(error);\n }\n\n return this.#onSuccess(responseData);\n }\n\n #onLoginRequired() {\n this.emit(\"LoginRequired\");\n }\n\n #onPhoneVerificationRequired() {\n this.emit(\"PhoneVerificationRequired\");\n }\n\n /**\n * @param {Command} config\n * @returns {Request}\n */\n createRequest(config) {\n if (typeof config.headers !== \"object\") {\n config.headers = {};\n }\n\n let apiPath = config.url;\n\n if (apiPath.startsWith(\"/\")) {\n apiPath = `.${apiPath}`;\n }\n const url = new URL(apiPath, this.baseUrl);\n const method = config.method?.toUpperCase() || \"GET\";\n\n // Add parameters to URL if they exist\n if (config.params && typeof config.params === \"object\") {\n Object.entries(config.params).forEach(([key, value]) => {\n // Handle array values\n if (Array.isArray(value)) {\n value.forEach((item) => {\n if (typeof item === \"object\" && item !== null) {\n Object.entries(item).forEach(([itemKey, itemValue]) => {\n url.searchParams.append(`${key}[][${itemKey}]`, itemValue);\n });\n } else {\n url.searchParams.append(`${key}[]`, item);\n }\n });\n }\n // Handle null/undefined\n else if (value === null || value === undefined) {\n url.searchParams.append(key, \"\");\n }\n // Handle nested objects\n else if (typeof value === \"object\") {\n Object.entries(value).forEach(([nestedKey, nestedValue]) => {\n if (Array.isArray(nestedValue)) {\n nestedValue.forEach((item) => {\n url.searchParams.append(`${key}[${nestedKey}][]`, item);\n });\n } else {\n url.searchParams.append(`${key}[${nestedKey}]`, nestedValue);\n }\n });\n }\n // Handle primitive values\n else {\n url.searchParams.append(key, value);\n }\n });\n }\n\n const headers = new Headers(this.headers);\n // Per-request headers override the client's ambient ones. An empty or\n // nullish value removes the ambient header entirely — callers use this to\n // strip a scope header (e.g. X-Property-Id) the singleton has armed.\n if (config.headers) {\n Object.entries(config.headers).forEach(([key, value]) => {\n if (value === null || value === undefined || value === \"\") {\n headers.delete(key);\n } else {\n headers.set(key, value);\n }\n });\n }\n\n const body =\n config.data !== null && [\"POST\", \"PUT\", \"PATCH\"].includes(method)\n ? headers.get(\"Content-Type\") === \"application/json\"\n ? JSON.stringify(config.data)\n : config.data\n : undefined;\n\n const request = new Request(url, {\n method: method,\n headers: headers,\n credentials: \"include\",\n body: body,\n });\n\n return request;\n }\n}\n"],"mappings":";AAAA,IAAa,mBAAb,MAAa,iBAAiB;CAC5B;CACA;;;;;;;;;;;CAYA,YACE,UAAU;EACR,KAAK;EACL,YAAY;EACZ,gBAAgB;EAChB,QAAQ;EACR,SAAS,IAAI,QAAQ,CAAC,CAAC;EACvB,YAAY,aAAa;EACzB,UAAU,UAAU;CACtB,GACA;EACA,IAAI,CAAC,QAAQ,KAAK,MAAM,IAAI,MAAM,yBAAyB;EAC3D,KAAK,UAAU;EAEf,KAAK,UAAU,IAAI,IAAI,QAAQ,GAAG;EAClC,KAAK,UAAU,IAAI,QAAQ;GACzB,gBAAgB;GAChB,QAAQ;GACR,GAAG,QAAQ;EACb,CAAC;EAED,IAAI,QAAQ,QACV,KAAK,QAAQ,IAAI,iBAAiB,KAAK,cAAc,QAAQ,MAAM;EAGrE,IAAI,QAAQ,YACV,KAAK,aAAa,QAAQ;EAG5B,IAAI,QAAQ,gBACV,KAAK,iBAAiB,QAAQ;EAGhC,KAAKA,aAAa,QAAQ,YACtB,QAAQ,aACP,aAAa;EAElB,KAAKC,WAAW,QAAQ,UAAU,QAAQ,WAAW,UAAU;EAE/D,KAAK,YAAY,CAAC;CACpB;;;;;;CAOA,GAAG,OAAO,UAAU;EAClB,IAAI,OAAO,aAAa,YACtB,MAAM,IAAI,MAAM,6BAA6B;EAE/C,IAAI,CAAC,KAAK,UAAU,QAClB,KAAK,UAAU,SAAS,CAAC;EAE3B,KAAK,UAAU,MAAM,CAAC,KAAK,QAAQ;CACrC;CAEA,KAAK,OAAO,GAAG,MAAM;EACnB,IAAI,KAAK,UAAU,QACjB,KAAK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,WAAW;GAE/D,CAAC;QAID,IAAI,aAAa,OAAO,KAAK,KAAK;EAEtC,CAAC;EAGH,MAAM,UAAU,IAAI,QAAQ,KAAK,OAAO;EAIxC,IAAI,OAAO,SACT,OAAO,QAAQ,OAAO,OAAO,CAAC,CAAC,SAAS,CAAC,KAAK,WAAW;GACvD,IAAI,UAAU,QAAQ,UAAU,KAAA,KAAa,UAAU,IACrD,QAAQ,OAAO,GAAG;QAElB,QAAQ,IAAI,KAAK,KAAK;EAE1B,CAAC;EAGH,MAAM,OACJ,OAAO,SAAS,QAAQ;GAAC;GAAQ;GAAO;EAAO,CAAC,CAAC,SAAS,MAAM,IAC5D,QAAQ,IAAI,cAAc,MAAM,qBAC9B,KAAK,UAAU,OAAO,IAAI,IAC1B,OAAO,OACT,KAAA;EASN,OAAO,IAPa,QAAQ,KAAK;GACvB;GACC;GACT,aAAa;GACP;EACR,CAEa;CACf;AACF"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kohost/api-client",
3
- "version": "7.8.0",
3
+ "version": "7.8.1",
4
4
  "description": "API client, models, schemas, commands, and events for Kohost applications",
5
5
  "author": "Ian Rogers",
6
6
  "readme": "README.md",