@stigmer/sdk 0.4.7 → 0.4.8
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/package.json +2 -2
- package/src/stigmer.ts +12 -0
- package/stigmer.d.ts +10 -0
- package/stigmer.d.ts.map +1 -1
- package/stigmer.js +11 -0
- package/stigmer.js.map +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stigmer/sdk",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.8",
|
|
4
4
|
"description": "Stigmer TypeScript SDK — typed API client for all Stigmer platform resources",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
@@ -40,6 +40,6 @@
|
|
|
40
40
|
"peerDependencies": {
|
|
41
41
|
"@bufbuild/protobuf": "^2.0.0",
|
|
42
42
|
"@connectrpc/connect-node": "^2.0.0",
|
|
43
|
-
"@stigmer/protos": "0.4.
|
|
43
|
+
"@stigmer/protos": "0.4.8"
|
|
44
44
|
}
|
|
45
45
|
}
|
package/src/stigmer.ts
CHANGED
|
@@ -43,6 +43,17 @@ export class Stigmer extends GeneratedClient {
|
|
|
43
43
|
*/
|
|
44
44
|
readonly baseUrl: string;
|
|
45
45
|
|
|
46
|
+
/**
|
|
47
|
+
* Custom `fetch` implementation provided at construction time.
|
|
48
|
+
*
|
|
49
|
+
* `undefined` when the caller did not supply one (the global
|
|
50
|
+
* `fetch` should be used instead). Exposed so non-transport
|
|
51
|
+
* HTTP calls (e.g., model registry fetch) can use the same
|
|
52
|
+
* implementation that the gRPC transport uses, which is critical
|
|
53
|
+
* in Tauri where the global `fetch` is restricted by CSP/CORS.
|
|
54
|
+
*/
|
|
55
|
+
readonly fetch: typeof globalThis.fetch | undefined;
|
|
56
|
+
|
|
46
57
|
readonly billing: BillingClient;
|
|
47
58
|
readonly search: SearchClient;
|
|
48
59
|
readonly github: GitHubClient;
|
|
@@ -56,6 +67,7 @@ export class Stigmer extends GeneratedClient {
|
|
|
56
67
|
super(transport);
|
|
57
68
|
|
|
58
69
|
this.baseUrl = config.baseUrl;
|
|
70
|
+
this.fetch = config.fetch;
|
|
59
71
|
this._tokenProvider = config.apiKey
|
|
60
72
|
? () => config.apiKey!
|
|
61
73
|
: config.getAccessToken ?? (() => null);
|
package/stigmer.d.ts
CHANGED
|
@@ -36,6 +36,16 @@ export declare class Stigmer extends GeneratedClient {
|
|
|
36
36
|
* requiring the host application to pass it separately.
|
|
37
37
|
*/
|
|
38
38
|
readonly baseUrl: string;
|
|
39
|
+
/**
|
|
40
|
+
* Custom `fetch` implementation provided at construction time.
|
|
41
|
+
*
|
|
42
|
+
* `undefined` when the caller did not supply one (the global
|
|
43
|
+
* `fetch` should be used instead). Exposed so non-transport
|
|
44
|
+
* HTTP calls (e.g., model registry fetch) can use the same
|
|
45
|
+
* implementation that the gRPC transport uses, which is critical
|
|
46
|
+
* in Tauri where the global `fetch` is restricted by CSP/CORS.
|
|
47
|
+
*/
|
|
48
|
+
readonly fetch: typeof globalThis.fetch | undefined;
|
|
39
49
|
readonly billing: BillingClient;
|
|
40
50
|
readonly search: SearchClient;
|
|
41
51
|
readonly github: GitHubClient;
|
package/stigmer.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stigmer.d.ts","sourceRoot":"","sources":["../src/stigmer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AACxC,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAExC,OAAO,EAEL,KAAK,aAAa,EAEnB,MAAM,UAAU,CAAC;AAElB;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,qBAAa,OAAQ,SAAQ,eAAe;IAC1C;;;;;;OAMG;IACH,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IAEzB,QAAQ,CAAC,OAAO,EAAE,aAAa,CAAC;IAChC,QAAQ,CAAC,MAAM,EAAE,YAAY,CAAC;IAC9B,QAAQ,CAAC,MAAM,EAAE,YAAY,CAAC;IAE9B,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAgB;gBAEnC,MAAM,EAAE,aAAa;
|
|
1
|
+
{"version":3,"file":"stigmer.d.ts","sourceRoot":"","sources":["../src/stigmer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AACxC,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAExC,OAAO,EAEL,KAAK,aAAa,EAEnB,MAAM,UAAU,CAAC;AAElB;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,qBAAa,OAAQ,SAAQ,eAAe;IAC1C;;;;;;OAMG;IACH,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IAEzB;;;;;;;;OAQG;IACH,QAAQ,CAAC,KAAK,EAAE,OAAO,UAAU,CAAC,KAAK,GAAG,SAAS,CAAC;IAEpD,QAAQ,CAAC,OAAO,EAAE,aAAa,CAAC;IAChC,QAAQ,CAAC,MAAM,EAAE,YAAY,CAAC;IAC9B,QAAQ,CAAC,MAAM,EAAE,YAAY,CAAC;IAE9B,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAgB;gBAEnC,MAAM,EAAE,aAAa;IAiBjC;;;;;;;;;OASG;IACG,iBAAiB,IAAI,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;CAGlD"}
|
package/stigmer.js
CHANGED
|
@@ -37,6 +37,16 @@ export class Stigmer extends GeneratedClient {
|
|
|
37
37
|
* requiring the host application to pass it separately.
|
|
38
38
|
*/
|
|
39
39
|
baseUrl;
|
|
40
|
+
/**
|
|
41
|
+
* Custom `fetch` implementation provided at construction time.
|
|
42
|
+
*
|
|
43
|
+
* `undefined` when the caller did not supply one (the global
|
|
44
|
+
* `fetch` should be used instead). Exposed so non-transport
|
|
45
|
+
* HTTP calls (e.g., model registry fetch) can use the same
|
|
46
|
+
* implementation that the gRPC transport uses, which is critical
|
|
47
|
+
* in Tauri where the global `fetch` is restricted by CSP/CORS.
|
|
48
|
+
*/
|
|
49
|
+
fetch;
|
|
40
50
|
billing;
|
|
41
51
|
search;
|
|
42
52
|
github;
|
|
@@ -46,6 +56,7 @@ export class Stigmer extends GeneratedClient {
|
|
|
46
56
|
const transport = config.customTransport ?? createStigmerTransport(config);
|
|
47
57
|
super(transport);
|
|
48
58
|
this.baseUrl = config.baseUrl;
|
|
59
|
+
this.fetch = config.fetch;
|
|
49
60
|
this._tokenProvider = config.apiKey
|
|
50
61
|
? () => config.apiKey
|
|
51
62
|
: config.getAccessToken ?? (() => null);
|
package/stigmer.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stigmer.js","sourceRoot":"","sources":["../src/stigmer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AACxC,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AACxC,OAAO,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAC;AACrD,OAAO,EACL,cAAc,GAGf,MAAM,UAAU,CAAC;AAElB;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAM,OAAO,OAAQ,SAAQ,eAAe;IAC1C;;;;;;OAMG;IACM,OAAO,CAAS;
|
|
1
|
+
{"version":3,"file":"stigmer.js","sourceRoot":"","sources":["../src/stigmer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,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