@squidcloud/client 1.0.355 → 1.0.357

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.
@@ -20,7 +20,7 @@ export interface AiFunctionIdWithContext {
20
20
  */
21
21
  name: AiFunctionId;
22
22
  /** A record of contextual data associated with the function call. */
23
- context: Record<string, unknown>;
23
+ context?: Record<string, unknown>;
24
24
  /** A list of predefined parameter values for the AI function. These parameters are hidden from the AI. */
25
25
  predefinedParameters?: Record<string, unknown>;
26
26
  }
@@ -14,4 +14,21 @@ export declare function generateShortId(length?: number, prefix?: string): strin
14
14
  * @param prefix The prefix of the generated ID. Default is an empty string.
15
15
  * @param count The number of IDs to be generated.
16
16
  */
17
- export declare function generateShortIds(length: number | undefined, prefix: string | undefined, count: number): Promise<string[]>;
17
+ export declare function generateShortIds({ count, length, prefix }: GenerateShortIdsOptions): string[];
18
+ /**
19
+ * Options for generating multiple short IDs.
20
+ */
21
+ export interface GenerateShortIdsOptions {
22
+ /** The number of IDs to generate. */
23
+ count: number;
24
+ /**
25
+ * The length of each generated ID.
26
+ * @default DEFAULT_SHORT_ID_LENGTH.
27
+ */
28
+ length?: number;
29
+ /**
30
+ * A string that must be a predefined prefix for each ID. Replaces the first generated characters.
31
+ * @default - no prefix.
32
+ */
33
+ prefix?: string;
34
+ }
@@ -2,4 +2,4 @@
2
2
  * The current version of the SquidCloud client package.
3
3
  * @category Platform
4
4
  */
5
- export declare const SQUIDCLOUD_CLIENT_PACKAGE_VERSION = "1.0.355";
5
+ export declare const SQUIDCLOUD_CLIENT_PACKAGE_VERSION = "1.0.357";
package/package.json CHANGED
@@ -1,8 +1,9 @@
1
1
  {
2
2
  "name": "@squidcloud/client",
3
- "version": "1.0.355",
3
+ "version": "1.0.357",
4
4
  "description": "A typescript implementation of the Squid client",
5
5
  "main": "dist/cjs/index.js",
6
+ "module": "dist/esm/index.js",
6
7
  "types": "dist/typescript-client/src/index.d.ts",
7
8
  "files": [
8
9
  "dist/**/*"
@@ -63,6 +64,9 @@
63
64
  "webpack": "^5.96.0",
64
65
  "webpack-cli": "^5.1.4"
65
66
  },
67
+ "browser": {
68
+ "ws": false
69
+ },
66
70
  "engines": {
67
71
  "node": ">=20.0.0"
68
72
  }