@cellaware/utils 9.5.3 → 9.5.5

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.
@@ -1,15 +1,15 @@
1
1
  export declare function chatwmsStorageGetBlobId(clientId: string, blobName: string): string;
2
- export declare function chatwmsStorageContainerCreate(): Promise<void>;
2
+ export declare function chatwmsStorageContainerCreate(containerClientId?: string): Promise<void>;
3
3
  /**
4
4
  * Stringifies `data` and uploads to blob storage.
5
5
  *
6
6
  * **Important:** `data` must not be a string.
7
7
  */
8
- export declare function chatwmsStorageBlobUpload(blobId: string, data: any): Promise<void>;
8
+ export declare function chatwmsStorageBlobUpload(blobId: string, data: any, containerClientId?: string): Promise<void>;
9
9
  /**
10
10
  * Parses string data downloaded from blob storage and returns JSON object/JSON array.
11
11
  *
12
12
  * **Important:** will return `undefined` if any issues or blob does not exist.
13
13
  */
14
- export declare function chatwmsStorageBlobDownload(blobId: string): Promise<any>;
15
- export declare function chatwmsStorageBlobDelete(blobId: string): Promise<void>;
14
+ export declare function chatwmsStorageBlobDownload(blobId: string, containerClientId?: string): Promise<any>;
15
+ export declare function chatwmsStorageBlobDelete(blobId: string, containerClientId?: string): Promise<void>;
@@ -1,27 +1,27 @@
1
1
  import { storageBlobDelete, storageBlobDownload, storageBlobUpload, storageContainerCreate } from "../../azure/storage.js";
2
- const CONTAINER_CLIENT_ID = 'chatwms';
2
+ const DEFAULT_CONTAINER_CLIENT_ID = 'chatwms';
3
3
  export function chatwmsStorageGetBlobId(clientId, blobName) {
4
4
  return clientId.replaceAll('_', '-') + '-' + blobName;
5
5
  }
6
- export async function chatwmsStorageContainerCreate() {
7
- return storageContainerCreate(CONTAINER_CLIENT_ID);
6
+ export async function chatwmsStorageContainerCreate(containerClientId) {
7
+ return storageContainerCreate(containerClientId ?? DEFAULT_CONTAINER_CLIENT_ID);
8
8
  }
9
9
  /**
10
10
  * Stringifies `data` and uploads to blob storage.
11
11
  *
12
12
  * **Important:** `data` must not be a string.
13
13
  */
14
- export async function chatwmsStorageBlobUpload(blobId, data) {
15
- return storageBlobUpload(CONTAINER_CLIENT_ID, blobId, data);
14
+ export async function chatwmsStorageBlobUpload(blobId, data, containerClientId) {
15
+ return storageBlobUpload(containerClientId ?? DEFAULT_CONTAINER_CLIENT_ID, blobId, data);
16
16
  }
17
17
  /**
18
18
  * Parses string data downloaded from blob storage and returns JSON object/JSON array.
19
19
  *
20
20
  * **Important:** will return `undefined` if any issues or blob does not exist.
21
21
  */
22
- export async function chatwmsStorageBlobDownload(blobId) {
23
- return storageBlobDownload(CONTAINER_CLIENT_ID, blobId);
22
+ export async function chatwmsStorageBlobDownload(blobId, containerClientId) {
23
+ return storageBlobDownload(containerClientId ?? DEFAULT_CONTAINER_CLIENT_ID, blobId);
24
24
  }
25
- export async function chatwmsStorageBlobDelete(blobId) {
26
- return storageBlobDelete(CONTAINER_CLIENT_ID, blobId);
25
+ export async function chatwmsStorageBlobDelete(blobId, containerClientId) {
26
+ return storageBlobDelete(containerClientId ?? DEFAULT_CONTAINER_CLIENT_ID, blobId);
27
27
  }
@@ -31,3 +31,5 @@ export interface ChatWMSUserSettings {
31
31
  clientId: string;
32
32
  }
33
33
  export declare function chatwmsInitUserSettings(): ChatWMSUserSettings;
34
+ export declare const CHATWMS_USER_GROUP_ADMIN = "__admin__";
35
+ export declare const CHATWMS_USER_GROUP_CONFIG = "__config__";
@@ -41,3 +41,5 @@ export function chatwmsInitUserSettings() {
41
41
  clientId: ''
42
42
  };
43
43
  }
44
+ export const CHATWMS_USER_GROUP_ADMIN = '__admin__';
45
+ export const CHATWMS_USER_GROUP_CONFIG = '__config__';
package/dist/llm/cost.js CHANGED
@@ -1,7 +1,8 @@
1
1
  // https://platform.openai.com/docs/pricing
2
2
  // Important: prices increase with *long context* (>272K tokens).
3
3
  const MODEL_COSTS = {
4
- 'gpt-5.6-sol': { inputCost: 5.00, outputCost: 30.00 },
4
+ 'gpt-6-astra': { inputCost: 10.00, outputCost: 50.00 },
5
+ 'gpt-5.6-sol': { inputCost: 4.00, outputCost: 20.00 },
5
6
  'gpt-5.6-terra': { inputCost: 2.00, outputCost: 12.00 },
6
7
  'gpt-5.6-luna': { inputCost: 0.20, outputCost: 1.20 },
7
8
  'gpt-5.5': { inputCost: 5.00, outputCost: 30.00 },
@@ -1,4 +1,4 @@
1
- export type ModelName = 'gpt-5.6-sol' | 'gpt-5.6-terra' | 'gpt-5.6-luna' | 'gpt-5.5' | 'gpt-5.5-pro' | 'gpt-5.4' | 'gpt-5.4-mini' | 'gpt-5.4-nano' | 'gpt-5.4-pro' | 'gpt-5.3-chat-latest' | 'gpt-5.3-codex' | 'gpt-5.2-pro' | 'gpt-5.2-codex' | 'gpt-5.2-chat-latest' | 'gpt-5.2' | 'gpt-5.1' | 'gpt-5' | 'gpt-5-mini' | 'gpt-5-nano' | 'gpt-4.1' | 'gpt-4.1-mini' | 'gpt-4.1-nano' | 'gpt-4o' | 'gpt-4o-mini' | 'o1' | 'o1-mini' | 'o3' | 'o3-mini' | 'o4-mini';
1
+ export type ModelName = 'gpt-6-astra' | 'gpt-5.6-sol' | 'gpt-5.6-terra' | 'gpt-5.6-luna' | 'gpt-5.5' | 'gpt-5.5-pro' | 'gpt-5.4' | 'gpt-5.4-mini' | 'gpt-5.4-nano' | 'gpt-5.4-pro' | 'gpt-5.3-chat-latest' | 'gpt-5.3-codex' | 'gpt-5.2-pro' | 'gpt-5.2-codex' | 'gpt-5.2-chat-latest' | 'gpt-5.2' | 'gpt-5.1' | 'gpt-5' | 'gpt-5-mini' | 'gpt-5-nano' | 'gpt-4.1' | 'gpt-4.1-mini' | 'gpt-4.1-nano' | 'gpt-4o' | 'gpt-4o-mini' | 'o1' | 'o1-mini' | 'o3' | 'o3-mini' | 'o4-mini';
2
2
  export type ReasoningEffort = 'none' | 'low' | 'medium' | 'high' | 'xhigh' | 'max';
3
3
  export type Verbosity = 'low' | 'medium' | 'high';
4
4
  export interface OpenAIModelOptions {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cellaware/utils",
3
- "version": "9.5.3",
3
+ "version": "9.5.5",
4
4
  "description": "Cellaware Utilities for Node.js",
5
5
  "author": "Cellaware Technologies",
6
6
  "type": "module",