samuel-integrations-sdk 0.0.13 → 0.0.14
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.ts +9 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +12 -8
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { CreateStreamBody, GenerateText200, GenerateTextBody, GetAuthorizationUrl200, GetAuthorizationUrlBody, HandleOAuthCallback200, HandleOAuthCallbackBody } from './generated-api';
|
|
1
2
|
/**
|
|
2
3
|
* UPTIQ Integrations SDK
|
|
3
4
|
*
|
|
@@ -18,8 +19,10 @@ export declare class Llm {
|
|
|
18
19
|
provider: string;
|
|
19
20
|
model?: string;
|
|
20
21
|
};
|
|
21
|
-
|
|
22
|
-
|
|
22
|
+
/** Chat with LLM */
|
|
23
|
+
generateText(body: Omit<GenerateTextBody, 'provider' | 'model'>): Promise<GenerateText200>;
|
|
24
|
+
/** Stream text generation from LLM */
|
|
25
|
+
createStream(body: Omit<CreateStreamBody, 'provider' | 'model'>): Promise<Awaited<ReturnType<typeof this.api.createStream>>>;
|
|
23
26
|
}
|
|
24
27
|
/**
|
|
25
28
|
* OAuth integration module
|
|
@@ -33,8 +36,10 @@ export declare class OAuth {
|
|
|
33
36
|
getConfig(): {
|
|
34
37
|
provider: string;
|
|
35
38
|
};
|
|
36
|
-
|
|
37
|
-
|
|
39
|
+
/** Get OAuth authorization URL */
|
|
40
|
+
getAuthorizationUrl(body: Omit<GetAuthorizationUrlBody, 'provider'>): Promise<GetAuthorizationUrl200>;
|
|
41
|
+
/** Handle OAuth callback */
|
|
42
|
+
handleOAuthCallback(body: Omit<HandleOAuthCallbackBody, 'provider'>): Promise<HandleOAuthCallback200>;
|
|
38
43
|
}
|
|
39
44
|
export * from './generated-api';
|
|
40
45
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsB,gBAAgB,EAAE,eAAe,EAAE,gBAAgB,EAAE,sBAAsB,EAAE,uBAAuB,EAAE,sBAAsB,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAC;AAE5M;;;;;GAKG;AAEH;;GAEG;AACH,qBAAa,GAAG;IACd,OAAO,CAAC,MAAM,CAGZ;IACF,OAAO,CAAC,GAAG,CAAwC;gBAEvC,OAAO,EAAE;QACnB,QAAQ,EAAE,MAAM,CAAC;QACjB,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB;IASD,SAAS;kBAjBG,MAAM;gBACR,MAAM;;IAqBhB,oBAAoB;IACpB,YAAY,CAAC,IAAI,EAAE,IAAI,CAAC,gBAAgB,EAAE,UAAU,GAAG,OAAO,CAAC,GAAG,OAAO,CAAC,eAAe,CAAC;IAK1F,sCAAsC;IACtC,YAAY,CAAC,IAAI,EAAE,IAAI,CAAC,gBAAgB,EAAE,UAAU,GAAG,OAAO,CAAC,GAAG,OAAO,CAAC,OAAO,CAAC,UAAU,CAAC,OAAO,IAAI,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC,CAAC;CAG7H;AAED;;GAEG;AACH,qBAAa,KAAK;IAChB,OAAO,CAAC,MAAM,CAEZ;IACF,OAAO,CAAC,GAAG,CAAwC;gBAEvC,OAAO,EAAE;QACnB,QAAQ,EAAE,MAAM,CAAC;KAClB;IASD,SAAS;kBAfG,MAAM;;IAoBlB,kCAAkC;IAClC,mBAAmB,CAAC,IAAI,EAAE,IAAI,CAAC,uBAAuB,EAAE,UAAU,CAAC,GAAG,OAAO,CAAC,sBAAsB,CAAC;IAKrG,4BAA4B;IAC5B,mBAAmB,CAAC,IAAI,EAAE,IAAI,CAAC,uBAAuB,EAAE,UAAU,CAAC,GAAG,OAAO,CAAC,sBAAsB,CAAC;CAGtG;AAGD,cAAc,iBAAiB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -36,11 +36,13 @@ class Llm {
|
|
|
36
36
|
getConfig() {
|
|
37
37
|
return this.config;
|
|
38
38
|
}
|
|
39
|
-
|
|
40
|
-
|
|
39
|
+
/** Chat with LLM */
|
|
40
|
+
generateText(body) {
|
|
41
|
+
return this.api.generateText({ ...body, ...this.config });
|
|
41
42
|
}
|
|
42
|
-
|
|
43
|
-
|
|
43
|
+
/** Stream text generation from LLM */
|
|
44
|
+
createStream(body) {
|
|
45
|
+
return this.api.createStream({ ...body, ...this.config });
|
|
44
46
|
}
|
|
45
47
|
}
|
|
46
48
|
exports.Llm = Llm;
|
|
@@ -58,11 +60,13 @@ class OAuth {
|
|
|
58
60
|
getConfig() {
|
|
59
61
|
return this.config;
|
|
60
62
|
}
|
|
61
|
-
|
|
62
|
-
|
|
63
|
+
/** Get OAuth authorization URL */
|
|
64
|
+
getAuthorizationUrl(body) {
|
|
65
|
+
return this.api.getAuthorizationUrl({ ...body, ...this.config });
|
|
63
66
|
}
|
|
64
|
-
|
|
65
|
-
|
|
67
|
+
/** Handle OAuth callback */
|
|
68
|
+
handleOAuthCallback(body) {
|
|
69
|
+
return this.api.handleOAuthCallback({ ...body, ...this.config });
|
|
66
70
|
}
|
|
67
71
|
}
|
|
68
72
|
exports.OAuth = OAuth;
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,mDAA4M;AAE5M;;;;;GAKG;AAEH;;GAEG;AACH,MAAa,GAAG;IAOd,YAAY,OAGX;QACC,iCAAi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