@cellaware/utils 3.0.2 → 3.0.4

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.
@@ -4,7 +4,7 @@ const STATUS_SERVICE_UNAVAILABLE = 503;
4
4
  const RETRY_SLEEP_MS = 3000;
5
5
  const MAX_RETRIES = 3;
6
6
  async function functionFetch(url, req) {
7
- let res;
7
+ let res = { status: STATUS_SERVICE_UNAVAILABLE };
8
8
  let retryNum = 0;
9
9
  do {
10
10
  if (retryNum > 0) {
@@ -1,2 +1,2 @@
1
- export declare function chatwmsFetch(path: string, method: string, body?: any): Promise<any>;
2
- export declare function chatwmsQuery(path: string, method: string, query: string): Promise<any>;
1
+ export declare function chatwmsFunctionFetch(path: string, method: string, body?: any): Promise<any>;
2
+ export declare function chatwmsFunctionQuery(path: string, method: string, query: string): Promise<any>;
@@ -1,9 +1,9 @@
1
1
  import { functionFetchJson, functionFetchText } from "../../azure/function.js";
2
- export function chatwmsFetch(path, method, body) {
2
+ export function chatwmsFunctionFetch(path, method, body) {
3
3
  const url = `${process.env['CHATWMS_URL']}/${path}`;
4
4
  return functionFetchJson(url, method, process.env['CHATWMS_KEY'] ?? '', body);
5
5
  }
6
- export function chatwmsQuery(path, method, query) {
6
+ export function chatwmsFunctionQuery(path, method, query) {
7
7
  const url = `${process.env['CHATWMS_URL']}/${path}`;
8
8
  return functionFetchText(url, method, process.env['CHATWMS_KEY'] ?? '', query);
9
9
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cellaware/utils",
3
- "version": "3.0.2",
3
+ "version": "3.0.4",
4
4
  "description": "Cellaware Utilities for Node.js",
5
5
  "author": "Cellaware Technologies",
6
6
  "type": "module",
@@ -1,12 +0,0 @@
1
- import { ChatWMSUserData } from "./user.js";
2
- export interface ChatWMSApiInput {
3
- userData: ChatWMSUserData;
4
- data: any;
5
- }
6
- export declare function chatwmsInitApiInput(): ChatWMSApiInput;
7
- export interface ChatWMSApiOutput {
8
- status: number;
9
- message: string;
10
- data: any;
11
- }
12
- export declare function chatwmsInitApiOutput(): ChatWMSApiOutput;
@@ -1,14 +0,0 @@
1
- import { chatwmsInitUserData } from "./user.js";
2
- export function chatwmsInitApiInput() {
3
- return {
4
- userData: chatwmsInitUserData(),
5
- data: {}
6
- };
7
- }
8
- export function chatwmsInitApiOutput() {
9
- return {
10
- status: 0,
11
- message: '',
12
- data: {}
13
- };
14
- }