@axiom-lattice/client-sdk 8.7.1 → 8.7.2
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/__tests__/runtime-client.test.js +17 -0
- package/dist/__tests__/runtime-client.test.js.map +1 -1
- package/dist/index.d.mts +8 -6
- package/dist/index.d.ts +8 -6
- package/dist/index.js +6 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +6 -1
- package/dist/index.mjs.map +1 -1
- package/dist/runtime-client.d.ts +2 -0
- package/dist/runtime-client.d.ts.map +1 -1
- package/dist/runtime-client.js +6 -1
- package/dist/runtime-client.js.map +1 -1
- package/dist/types.d.ts +6 -6
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js.map +1 -1
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -6129,6 +6129,7 @@ var RuntimeAxiomClient = class _RuntimeAxiomClient extends Client {
|
|
|
6129
6129
|
this.gatewayUrl = config.gatewayUrl.replace(/\/$/, "");
|
|
6130
6130
|
this.webAppId = config.webAppId;
|
|
6131
6131
|
this.identity = config.identity;
|
|
6132
|
+
this.projectId = config.projectId;
|
|
6132
6133
|
if (config.identity.mode === "unverified" && config.identity.userId.length === 0) {
|
|
6133
6134
|
throw new Error("RuntimeAxiomClient requires a non-empty userId in unverified mode");
|
|
6134
6135
|
}
|
|
@@ -6160,7 +6161,10 @@ var RuntimeAxiomClient = class _RuntimeAxiomClient extends Client {
|
|
|
6160
6161
|
return { "X-Axiom-External-User-Id": this.identity.userId };
|
|
6161
6162
|
}
|
|
6162
6163
|
getAllHeaders() {
|
|
6163
|
-
return {
|
|
6164
|
+
return {
|
|
6165
|
+
...this.identityHeaders(),
|
|
6166
|
+
...this.projectId ? { "x-project-id": this.projectId } : {}
|
|
6167
|
+
};
|
|
6164
6168
|
}
|
|
6165
6169
|
async makeRequest(url, options) {
|
|
6166
6170
|
await this.primeToken();
|
|
@@ -6209,6 +6213,7 @@ var RuntimeAxiomClient = class _RuntimeAxiomClient extends Client {
|
|
|
6209
6213
|
gatewayUrl: this.gatewayUrl,
|
|
6210
6214
|
webAppId: this.webAppId,
|
|
6211
6215
|
identity: this.identity,
|
|
6216
|
+
...this.projectId ? { projectId: this.projectId } : {},
|
|
6212
6217
|
assistantId: config.assistantId,
|
|
6213
6218
|
transport: config.transport,
|
|
6214
6219
|
...config.timeout !== void 0 ? { timeout: config.timeout } : {},
|