krisspy-sdk 0.3.1 → 0.4.0
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/dist/index.d.mts +8 -4
- package/dist/index.d.ts +8 -4
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -6,8 +6,12 @@ interface KrisspyClientOptions {
|
|
|
6
6
|
url?: string;
|
|
7
7
|
/** Backend ID for this client */
|
|
8
8
|
backendId: string;
|
|
9
|
-
/**
|
|
10
|
-
|
|
9
|
+
/**
|
|
10
|
+
* Public API key for the backend (required)
|
|
11
|
+
* This key can be safely exposed in frontend code.
|
|
12
|
+
* Get it from your backend settings in the Krisspy dashboard.
|
|
13
|
+
*/
|
|
14
|
+
anonKey: string;
|
|
11
15
|
/** Custom headers to include in all requests */
|
|
12
16
|
headers?: Record<string, string>;
|
|
13
17
|
/** Enable debug logging */
|
|
@@ -1029,7 +1033,7 @@ declare class KrisspyClient {
|
|
|
1029
1033
|
*
|
|
1030
1034
|
* const krisspy = createClient({
|
|
1031
1035
|
* backendId: 'your-backend-id',
|
|
1032
|
-
*
|
|
1036
|
+
* anonKey: 'your-anon-key', // from backend settings
|
|
1033
1037
|
* })
|
|
1034
1038
|
*
|
|
1035
1039
|
* // Auth
|
|
@@ -1071,7 +1075,7 @@ declare class KrisspyClient {
|
|
|
1071
1075
|
* @example
|
|
1072
1076
|
* const krisspy = createClient({
|
|
1073
1077
|
* backendId: 'abc123',
|
|
1074
|
-
*
|
|
1078
|
+
* anonKey: 'your-anon-key',
|
|
1075
1079
|
* url: 'https://api.krisspy.ai', // optional
|
|
1076
1080
|
* })
|
|
1077
1081
|
*/
|
package/dist/index.d.ts
CHANGED
|
@@ -6,8 +6,12 @@ interface KrisspyClientOptions {
|
|
|
6
6
|
url?: string;
|
|
7
7
|
/** Backend ID for this client */
|
|
8
8
|
backendId: string;
|
|
9
|
-
/**
|
|
10
|
-
|
|
9
|
+
/**
|
|
10
|
+
* Public API key for the backend (required)
|
|
11
|
+
* This key can be safely exposed in frontend code.
|
|
12
|
+
* Get it from your backend settings in the Krisspy dashboard.
|
|
13
|
+
*/
|
|
14
|
+
anonKey: string;
|
|
11
15
|
/** Custom headers to include in all requests */
|
|
12
16
|
headers?: Record<string, string>;
|
|
13
17
|
/** Enable debug logging */
|
|
@@ -1029,7 +1033,7 @@ declare class KrisspyClient {
|
|
|
1029
1033
|
*
|
|
1030
1034
|
* const krisspy = createClient({
|
|
1031
1035
|
* backendId: 'your-backend-id',
|
|
1032
|
-
*
|
|
1036
|
+
* anonKey: 'your-anon-key', // from backend settings
|
|
1033
1037
|
* })
|
|
1034
1038
|
*
|
|
1035
1039
|
* // Auth
|
|
@@ -1071,7 +1075,7 @@ declare class KrisspyClient {
|
|
|
1071
1075
|
* @example
|
|
1072
1076
|
* const krisspy = createClient({
|
|
1073
1077
|
* backendId: 'abc123',
|
|
1074
|
-
*
|
|
1078
|
+
* anonKey: 'your-anon-key',
|
|
1075
1079
|
* url: 'https://api.krisspy.ai', // optional
|
|
1076
1080
|
* })
|
|
1077
1081
|
*/
|
package/dist/index.js
CHANGED
|
@@ -1431,7 +1431,7 @@ var KrisspyClient = class {
|
|
|
1431
1431
|
baseUrl: this.baseUrl,
|
|
1432
1432
|
headers: {
|
|
1433
1433
|
...options.headers,
|
|
1434
|
-
|
|
1434
|
+
"apikey": options.anonKey
|
|
1435
1435
|
},
|
|
1436
1436
|
debug: options.debug
|
|
1437
1437
|
});
|
package/dist/index.mjs
CHANGED
|
@@ -1397,7 +1397,7 @@ var KrisspyClient = class {
|
|
|
1397
1397
|
baseUrl: this.baseUrl,
|
|
1398
1398
|
headers: {
|
|
1399
1399
|
...options.headers,
|
|
1400
|
-
|
|
1400
|
+
"apikey": options.anonKey
|
|
1401
1401
|
},
|
|
1402
1402
|
debug: options.debug
|
|
1403
1403
|
});
|