@respan/respan-sdk 1.0.1 → 1.0.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/README.md CHANGED
@@ -1 +1,5 @@
1
- # keywordsai
1
+ # Respan SDK
2
+
3
+ **[respan.ai](https://respan.ai)** | **[Documentation](https://docs.respan.ai)**
4
+
5
+ Respan SDK allows you to interact with the Respan API smoothly.
@@ -1,3 +1,4 @@
1
1
  export * from "./logConstants.js";
2
2
  export * from "./datasetConstants.js";
3
3
  export * from "./promptConstants.js";
4
+ export * from "./tracingConstants.js";
@@ -1,4 +1,5 @@
1
1
  export * from "./logConstants.js";
2
2
  export * from "./datasetConstants.js";
3
3
  export * from "./promptConstants.js";
4
+ export * from "./tracingConstants.js";
4
5
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/constants/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,cAAc,sBAAsB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/constants/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare const RESPAN_TRACING_INGEST_ENDPOINT: "https://api.respan.ai/api/v1/traces/ingest";
2
+ export declare function resolveTracingIngestEndpoint(baseUrl?: string): string;
@@ -0,0 +1,12 @@
1
+ export const RESPAN_TRACING_INGEST_ENDPOINT = "https://api.respan.ai/api/v1/traces/ingest";
2
+ export function resolveTracingIngestEndpoint(baseUrl) {
3
+ if (!baseUrl) {
4
+ return RESPAN_TRACING_INGEST_ENDPOINT;
5
+ }
6
+ const normalizedBaseUrl = baseUrl.replace(/\/$/, "");
7
+ if (normalizedBaseUrl.endsWith("/api")) {
8
+ return `${normalizedBaseUrl}/v1/traces/ingest`;
9
+ }
10
+ return `${normalizedBaseUrl}/api/v1/traces/ingest`;
11
+ }
12
+ //# sourceMappingURL=tracingConstants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tracingConstants.js","sourceRoot":"","sources":["../../src/constants/tracingConstants.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,8BAA8B,GACzC,4CAAqD,CAAC;AAExD,MAAM,UAAU,4BAA4B,CAAC,OAAgB;IAC3D,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,OAAO,8BAA8B,CAAC;IACxC,CAAC;IAED,MAAM,iBAAiB,GAAG,OAAO,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;IACrD,IAAI,iBAAiB,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC;QACvC,OAAO,GAAG,iBAAiB,mBAAmB,CAAC;IACjD,CAAC;IAED,OAAO,GAAG,iBAAiB,uBAAuB,CAAC;AACrD,CAAC"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@respan/respan-sdk",
3
3
  "type": "module",
4
- "version": "1.0.1",
4
+ "version": "1.0.2",
5
5
  "description": "Respan typing SDK",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",
@@ -32,4 +32,4 @@
32
32
  "devDependencies": {
33
33
  "@types/node": "^22.15.29"
34
34
  }
35
- }
35
+ }