@cellaware/utils 5.4.7 → 5.4.9

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.
package/README.md CHANGED
@@ -42,7 +42,7 @@ Token used for GitHub authorization.
42
42
 
43
43
  ChatWMS URL.
44
44
 
45
- > NOTE: `CHATWMS_URL` could also refer to `chatwms-mgmt` or other ChatWMS services
45
+ > NOTE: `CHATWMS_URL` could also refer to `chatwms-mgmt`, `chatwms-gtwy`, or other ChatWMS services
46
46
 
47
47
  ### CHATWMS_KEY
48
48
 
@@ -1,6 +1,7 @@
1
1
  export declare const CHATWMS_GENERIC_CLIENT_ID = "chatwms";
2
2
  export declare function chatwmsGetClientId(customer: string, warehouse: string): string;
3
3
  export declare function chatwmsGetWarehouseFromClientId(clientId: string, customer: string): string;
4
+ export declare function chatwmsGetWarehouse(warehouse: string, organization?: string): string;
4
5
  export declare function chatwmsGetOrganizationFromWarehouse(warehouse: string): string | undefined;
5
6
  export declare function chatwmsGetOrganizationFromClientId(clientId: string, customer: string): string | undefined;
6
7
  export declare function chatwmsExtractWarehouseAndOrganizationFromWarehouse(warehouse: string): {
@@ -6,6 +6,9 @@ export function chatwmsGetWarehouseFromClientId(clientId, customer) {
6
6
  const prefix = `${customer}_`;
7
7
  return clientId.substring(clientId.indexOf(prefix) + prefix.length);
8
8
  }
9
+ export function chatwmsGetWarehouse(warehouse, organization) {
10
+ return !!organization ? `${organization}_${warehouse}` : warehouse;
11
+ }
9
12
  export function chatwmsGetOrganizationFromWarehouse(warehouse) {
10
13
  const lastIdx = warehouse.lastIndexOf('_');
11
14
  if (lastIdx === -1) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cellaware/utils",
3
- "version": "5.4.7",
3
+ "version": "5.4.9",
4
4
  "description": "Cellaware Utilities for Node.js",
5
5
  "author": "Cellaware Technologies",
6
6
  "type": "module",