@gleanwork/api-client 0.20.0 → 0.20.1

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.
Files changed (40) hide show
  1. package/dist/commonjs/__tests__/messages.test.js +1 -1
  2. package/dist/commonjs/__tests__/summarize.test.js +2 -4
  3. package/dist/commonjs/__tests__/summarize.test.js.map +1 -1
  4. package/dist/commonjs/funcs/chatCreate.d.ts +1 -1
  5. package/dist/commonjs/funcs/chatCreate.js +1 -1
  6. package/dist/commonjs/funcs/chatCreateStream.d.ts +1 -1
  7. package/dist/commonjs/funcs/chatCreateStream.js +1 -1
  8. package/dist/commonjs/lib/config.d.ts +2 -2
  9. package/dist/commonjs/lib/config.js +2 -2
  10. package/dist/commonjs/react-query/chatCreate.d.ts +1 -1
  11. package/dist/commonjs/react-query/chatCreate.js +1 -1
  12. package/dist/commonjs/react-query/chatCreateStream.d.ts +1 -1
  13. package/dist/commonjs/react-query/chatCreateStream.js +1 -1
  14. package/dist/commonjs/sdk/chat.d.ts +2 -2
  15. package/dist/commonjs/sdk/chat.js +2 -2
  16. package/dist/esm/__tests__/messages.test.js +1 -1
  17. package/dist/esm/__tests__/summarize.test.js +2 -4
  18. package/dist/esm/__tests__/summarize.test.js.map +1 -1
  19. package/dist/esm/funcs/chatCreate.d.ts +1 -1
  20. package/dist/esm/funcs/chatCreate.js +1 -1
  21. package/dist/esm/funcs/chatCreateStream.d.ts +1 -1
  22. package/dist/esm/funcs/chatCreateStream.js +1 -1
  23. package/dist/esm/lib/config.d.ts +2 -2
  24. package/dist/esm/lib/config.js +2 -2
  25. package/dist/esm/react-query/chatCreate.d.ts +1 -1
  26. package/dist/esm/react-query/chatCreate.js +1 -1
  27. package/dist/esm/react-query/chatCreateStream.d.ts +1 -1
  28. package/dist/esm/react-query/chatCreateStream.js +1 -1
  29. package/dist/esm/sdk/chat.d.ts +2 -2
  30. package/dist/esm/sdk/chat.js +2 -2
  31. package/jsr.json +1 -1
  32. package/package.json +1 -1
  33. package/src/__tests__/messages.test.ts +1 -1
  34. package/src/__tests__/summarize.test.ts +2 -4
  35. package/src/funcs/chatCreate.ts +1 -1
  36. package/src/funcs/chatCreateStream.ts +1 -1
  37. package/src/lib/config.ts +2 -2
  38. package/src/react-query/chatCreate.ts +1 -1
  39. package/src/react-query/chatCreateStream.ts +1 -1
  40. package/src/sdk/chat.ts +2 -2
@@ -18,7 +18,7 @@ const testclient_js_1 = require("./testclient.js");
18
18
  idType: "CONVERSATION_ID",
19
19
  id: "<id>",
20
20
  timestampMillis: 558834,
21
- datasource: "SLACK",
21
+ datasource: "GCHAT",
22
22
  });
23
23
  (0, vitest_1.expect)(result).toBeDefined();
24
24
  });
@@ -17,12 +17,10 @@ const testclient_js_1 = require("./testclient.js");
17
17
  const result = await glean.client.documents.summarize({
18
18
  documentSpecs: [
19
19
  {
20
- ugcType: "SHORTCUTS",
21
- contentId: 602763,
20
+ id: "<id>",
22
21
  },
23
22
  {
24
- ugcType: "SHORTCUTS",
25
- contentId: 602763,
23
+ id: "<id>",
26
24
  },
27
25
  ],
28
26
  });
@@ -1 +1 @@
1
- {"version":3,"file":"summarize.test.js","sourceRoot":"","sources":["../../../src/__tests__/summarize.test.ts"],"names":[],"mappings":";AAAA;;;GAGG;;AAEH,mCAAsC;AACtC,0CAAoC;AACpC,mDAAuD;AAEvD,IAAA,aAAI,EAAC,qBAAqB,EAAE,KAAK,IAAI,EAAE;IACrC,MAAM,cAAc,GAAG,IAAA,oCAAoB,EAAC,WAAW,CAAC,CAAC;IAEzD,MAAM,KAAK,GAAG,IAAI,gBAAK,CAAC;QACtB,SAAS,EAAE,OAAO,CAAC,GAAG,CAAC,iBAAiB,CAAC,IAAI,wBAAwB;QACrE,UAAU,EAAE,cAAc;QAC1B,QAAQ,EAAE,OAAO,CAAC,GAAG,CAAC,iBAAiB,CAAC,IAAI,OAAO;KACpD,CAAC,CAAC;IAEH,MAAM,MAAM,GAAG,MAAM,KAAK,CAAC,MAAM,CAAC,SAAS,CAAC,SAAS,CAAC;QACpD,aAAa,EAAE;YACb;gBACE,OAAO,EAAE,WAAW;gBACpB,SAAS,EAAE,MAAM;aAClB;YACD;gBACE,OAAO,EAAE,WAAW;gBACpB,SAAS,EAAE,MAAM;aAClB;SACF;KACF,CAAC,CAAC;IACH,IAAA,eAAM,EAAC,MAAM,CAAC,CAAC,WAAW,EAAE,CAAC;AAC/B,CAAC,CAAC,CAAC"}
1
+ {"version":3,"file":"summarize.test.js","sourceRoot":"","sources":["../../../src/__tests__/summarize.test.ts"],"names":[],"mappings":";AAAA;;;GAGG;;AAEH,mCAAsC;AACtC,0CAAoC;AACpC,mDAAuD;AAEvD,IAAA,aAAI,EAAC,qBAAqB,EAAE,KAAK,IAAI,EAAE;IACrC,MAAM,cAAc,GAAG,IAAA,oCAAoB,EAAC,WAAW,CAAC,CAAC;IAEzD,MAAM,KAAK,GAAG,IAAI,gBAAK,CAAC;QACtB,SAAS,EAAE,OAAO,CAAC,GAAG,CAAC,iBAAiB,CAAC,IAAI,wBAAwB;QACrE,UAAU,EAAE,cAAc;QAC1B,QAAQ,EAAE,OAAO,CAAC,GAAG,CAAC,iBAAiB,CAAC,IAAI,OAAO;KACpD,CAAC,CAAC;IAEH,MAAM,MAAM,GAAG,MAAM,KAAK,CAAC,MAAM,CAAC,SAAS,CAAC,SAAS,CAAC;QACpD,aAAa,EAAE;YACb;gBACE,EAAE,EAAE,MAAM;aACX;YACD;gBACE,EAAE,EAAE,MAAM;aACX;SACF;KACF,CAAC,CAAC;IACH,IAAA,eAAM,EAAC,MAAM,CAAC,CAAC,WAAW,EAAE,CAAC;AAC/B,CAAC,CAAC,CAAC"}
@@ -13,7 +13,7 @@ import { Result } from "../types/fp.js";
13
13
  * Create a chat response
14
14
  *
15
15
  * @remarks
16
- * Run an assistant turn. Set `stream` to true to receive server-sent events; otherwise the response is a typed JSON response object.
16
+ * Run an assistant turn. The default response is JSON. HTTP clients request server-sent events by setting `stream` to true in the JSON body. An `Accept: text/event-stream` header does not replace `stream`.
17
17
  */
18
18
  export declare function chatCreate(client: GleanCore, request: operations.PlatformChatCreateRequest, options?: RequestOptions): APIPromise<Result<components.PlatformChatCompletedResponse, errors.PlatformProblemDetailError | GleanBaseError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
19
19
  //# sourceMappingURL=chatCreate.d.ts.map
@@ -53,7 +53,7 @@ const async_js_1 = require("../types/async.js");
53
53
  * Create a chat response
54
54
  *
55
55
  * @remarks
56
- * Run an assistant turn. Set `stream` to true to receive server-sent events; otherwise the response is a typed JSON response object.
56
+ * Run an assistant turn. The default response is JSON. HTTP clients request server-sent events by setting `stream` to true in the JSON body. An `Accept: text/event-stream` header does not replace `stream`.
57
57
  */
58
58
  function chatCreate(client, request, options) {
59
59
  return new async_js_1.APIPromise($do(client, request, options));
@@ -14,7 +14,7 @@ import { Result } from "../types/fp.js";
14
14
  * SDK-only logical operation. HTTP clients must call the base path; the URL fragment is not sent. Create a chat response
15
15
  *
16
16
  * @remarks
17
- * SDK-only logical operation. HTTP clients must call the base path; the URL fragment is not sent. Run an assistant turn. Set `stream` to true to receive server-sent events; otherwise the response is a typed JSON response object.
17
+ * SDK-only logical operation. HTTP clients must call the base path; the URL fragment is not sent. Run an assistant turn. The default response is JSON. HTTP clients request server-sent events by setting `stream` to true in the JSON body. An `Accept: text/event-stream` header does not replace `stream`.
18
18
  */
19
19
  export declare function chatCreateStream(client: GleanCore, request: operations.PlatformChatCreateStreamRequest, options?: RequestOptions): APIPromise<Result<EventStream<components.PlatformChatStreamEventServerSentEvent>, errors.PlatformProblemDetailError | GleanBaseError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
20
20
  //# sourceMappingURL=chatCreateStream.d.ts.map
@@ -55,7 +55,7 @@ const async_js_1 = require("../types/async.js");
55
55
  * SDK-only logical operation. HTTP clients must call the base path; the URL fragment is not sent. Create a chat response
56
56
  *
57
57
  * @remarks
58
- * SDK-only logical operation. HTTP clients must call the base path; the URL fragment is not sent. Run an assistant turn. Set `stream` to true to receive server-sent events; otherwise the response is a typed JSON response object.
58
+ * SDK-only logical operation. HTTP clients must call the base path; the URL fragment is not sent. Run an assistant turn. The default response is JSON. HTTP clients request server-sent events by setting `stream` to true in the JSON body. An `Accept: text/event-stream` header does not replace `stream`.
59
59
  */
60
60
  function chatCreateStream(client, request, options) {
61
61
  return new async_js_1.APIPromise($do(client, request, options));
@@ -35,8 +35,8 @@ export declare function serverURLFromOptions(options: SDKOptions): URL | null;
35
35
  export declare const SDK_METADATA: {
36
36
  readonly language: "typescript";
37
37
  readonly openapiDocVersion: "0.9.0";
38
- readonly sdkVersion: "0.20.0";
38
+ readonly sdkVersion: "0.20.1";
39
39
  readonly genVersion: "2.934.1";
40
- readonly userAgent: "speakeasy-sdk/typescript 0.20.0 2.934.1 0.9.0 @gleanwork/api-client";
40
+ readonly userAgent: "speakeasy-sdk/typescript 0.20.1 2.934.1 0.9.0 @gleanwork/api-client";
41
41
  };
42
42
  //# sourceMappingURL=config.d.ts.map
@@ -39,8 +39,8 @@ function serverURLFromOptions(options) {
39
39
  exports.SDK_METADATA = {
40
40
  language: "typescript",
41
41
  openapiDocVersion: "0.9.0",
42
- sdkVersion: "0.20.0",
42
+ sdkVersion: "0.20.1",
43
43
  genVersion: "2.934.1",
44
- userAgent: "speakeasy-sdk/typescript 0.20.0 2.934.1 0.9.0 @gleanwork/api-client",
44
+ userAgent: "speakeasy-sdk/typescript 0.20.1 2.934.1 0.9.0 @gleanwork/api-client",
45
45
  };
46
46
  //# sourceMappingURL=config.js.map
@@ -19,7 +19,7 @@ export type ChatCreateMutationError = errors.PlatformProblemDetailError | GleanB
19
19
  * Create a chat response
20
20
  *
21
21
  * @remarks
22
- * Run an assistant turn. Set `stream` to true to receive server-sent events; otherwise the response is a typed JSON response object.
22
+ * Run an assistant turn. The default response is JSON. HTTP clients request server-sent events by setting `stream` to true in the JSON body. An `Accept: text/event-stream` header does not replace `stream`.
23
23
  */
24
24
  export declare function useChatCreateMutation(options?: MutationHookOptions<ChatCreateMutationData, ChatCreateMutationError, ChatCreateMutationVariables>): UseMutationResult<ChatCreateMutationData, ChatCreateMutationError, ChatCreateMutationVariables>;
25
25
  export declare function mutationKeyChatCreate(): MutationKey;
@@ -16,7 +16,7 @@ const _context_js_1 = require("./_context.js");
16
16
  * Create a chat response
17
17
  *
18
18
  * @remarks
19
- * Run an assistant turn. Set `stream` to true to receive server-sent events; otherwise the response is a typed JSON response object.
19
+ * Run an assistant turn. The default response is JSON. HTTP clients request server-sent events by setting `stream` to true in the JSON body. An `Accept: text/event-stream` header does not replace `stream`.
20
20
  */
21
21
  function useChatCreateMutation(options) {
22
22
  const client = (0, _context_js_1.useGleanContext)();
@@ -20,7 +20,7 @@ export type ChatCreateStreamMutationError = errors.PlatformProblemDetailError |
20
20
  * SDK-only logical operation. HTTP clients must call the base path; the URL fragment is not sent. Create a chat response
21
21
  *
22
22
  * @remarks
23
- * SDK-only logical operation. HTTP clients must call the base path; the URL fragment is not sent. Run an assistant turn. Set `stream` to true to receive server-sent events; otherwise the response is a typed JSON response object.
23
+ * SDK-only logical operation. HTTP clients must call the base path; the URL fragment is not sent. Run an assistant turn. The default response is JSON. HTTP clients request server-sent events by setting `stream` to true in the JSON body. An `Accept: text/event-stream` header does not replace `stream`.
24
24
  */
25
25
  export declare function useChatCreateStreamMutation(options?: MutationHookOptions<ChatCreateStreamMutationData, ChatCreateStreamMutationError, ChatCreateStreamMutationVariables>): UseMutationResult<ChatCreateStreamMutationData, ChatCreateStreamMutationError, ChatCreateStreamMutationVariables>;
26
26
  export declare function mutationKeyChatCreateStream(): MutationKey;
@@ -16,7 +16,7 @@ const _context_js_1 = require("./_context.js");
16
16
  * SDK-only logical operation. HTTP clients must call the base path; the URL fragment is not sent. Create a chat response
17
17
  *
18
18
  * @remarks
19
- * SDK-only logical operation. HTTP clients must call the base path; the URL fragment is not sent. Run an assistant turn. Set `stream` to true to receive server-sent events; otherwise the response is a typed JSON response object.
19
+ * SDK-only logical operation. HTTP clients must call the base path; the URL fragment is not sent. Run an assistant turn. The default response is JSON. HTTP clients request server-sent events by setting `stream` to true in the JSON body. An `Accept: text/event-stream` header does not replace `stream`.
20
20
  */
21
21
  function useChatCreateStreamMutation(options) {
22
22
  const client = (0, _context_js_1.useGleanContext)();
@@ -7,14 +7,14 @@ export declare class Chat extends ClientSDK {
7
7
  * Create a chat response
8
8
  *
9
9
  * @remarks
10
- * Run an assistant turn. Set `stream` to true to receive server-sent events; otherwise the response is a typed JSON response object.
10
+ * Run an assistant turn. The default response is JSON. HTTP clients request server-sent events by setting `stream` to true in the JSON body. An `Accept: text/event-stream` header does not replace `stream`.
11
11
  */
12
12
  create(request: operations.PlatformChatCreateRequest, options?: RequestOptions): Promise<components.PlatformChatCompletedResponse>;
13
13
  /**
14
14
  * SDK-only logical operation. HTTP clients must call the base path; the URL fragment is not sent. Create a chat response
15
15
  *
16
16
  * @remarks
17
- * SDK-only logical operation. HTTP clients must call the base path; the URL fragment is not sent. Run an assistant turn. Set `stream` to true to receive server-sent events; otherwise the response is a typed JSON response object.
17
+ * SDK-only logical operation. HTTP clients must call the base path; the URL fragment is not sent. Run an assistant turn. The default response is JSON. HTTP clients request server-sent events by setting `stream` to true in the JSON body. An `Accept: text/event-stream` header does not replace `stream`.
18
18
  */
19
19
  createStream(request: operations.PlatformChatCreateStreamRequest, options?: RequestOptions): Promise<EventStream<components.PlatformChatStreamEventServerSentEvent>>;
20
20
  }
@@ -14,7 +14,7 @@ class Chat extends sdks_js_1.ClientSDK {
14
14
  * Create a chat response
15
15
  *
16
16
  * @remarks
17
- * Run an assistant turn. Set `stream` to true to receive server-sent events; otherwise the response is a typed JSON response object.
17
+ * Run an assistant turn. The default response is JSON. HTTP clients request server-sent events by setting `stream` to true in the JSON body. An `Accept: text/event-stream` header does not replace `stream`.
18
18
  */
19
19
  async create(request, options) {
20
20
  return (0, fp_js_1.unwrapAsync)((0, chatCreate_js_1.chatCreate)(this, request, options));
@@ -23,7 +23,7 @@ class Chat extends sdks_js_1.ClientSDK {
23
23
  * SDK-only logical operation. HTTP clients must call the base path; the URL fragment is not sent. Create a chat response
24
24
  *
25
25
  * @remarks
26
- * SDK-only logical operation. HTTP clients must call the base path; the URL fragment is not sent. Run an assistant turn. Set `stream` to true to receive server-sent events; otherwise the response is a typed JSON response object.
26
+ * SDK-only logical operation. HTTP clients must call the base path; the URL fragment is not sent. Run an assistant turn. The default response is JSON. HTTP clients request server-sent events by setting `stream` to true in the JSON body. An `Accept: text/event-stream` header does not replace `stream`.
27
27
  */
28
28
  async createStream(request, options) {
29
29
  return (0, fp_js_1.unwrapAsync)((0, chatCreateStream_js_1.chatCreateStream)(this, request, options));
@@ -16,7 +16,7 @@ test("Messages Messages", async () => {
16
16
  idType: "CONVERSATION_ID",
17
17
  id: "<id>",
18
18
  timestampMillis: 558834,
19
- datasource: "SLACK",
19
+ datasource: "GCHAT",
20
20
  });
21
21
  expect(result).toBeDefined();
22
22
  });
@@ -15,12 +15,10 @@ test("Summarize Summarize", async () => {
15
15
  const result = await glean.client.documents.summarize({
16
16
  documentSpecs: [
17
17
  {
18
- ugcType: "SHORTCUTS",
19
- contentId: 602763,
18
+ id: "<id>",
20
19
  },
21
20
  {
22
- ugcType: "SHORTCUTS",
23
- contentId: 602763,
21
+ id: "<id>",
24
22
  },
25
23
  ],
26
24
  });
@@ -1 +1 @@
1
- {"version":3,"file":"summarize.test.js","sourceRoot":"","sources":["../../../src/__tests__/summarize.test.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AACtC,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACpC,OAAO,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AAEvD,IAAI,CAAC,qBAAqB,EAAE,KAAK,IAAI,EAAE;IACrC,MAAM,cAAc,GAAG,oBAAoB,CAAC,WAAW,CAAC,CAAC;IAEzD,MAAM,KAAK,GAAG,IAAI,KAAK,CAAC;QACtB,SAAS,EAAE,OAAO,CAAC,GAAG,CAAC,iBAAiB,CAAC,IAAI,wBAAwB;QACrE,UAAU,EAAE,cAAc;QAC1B,QAAQ,EAAE,OAAO,CAAC,GAAG,CAAC,iBAAiB,CAAC,IAAI,OAAO;KACpD,CAAC,CAAC;IAEH,MAAM,MAAM,GAAG,MAAM,KAAK,CAAC,MAAM,CAAC,SAAS,CAAC,SAAS,CAAC;QACpD,aAAa,EAAE;YACb;gBACE,OAAO,EAAE,WAAW;gBACpB,SAAS,EAAE,MAAM;aAClB;YACD;gBACE,OAAO,EAAE,WAAW;gBACpB,SAAS,EAAE,MAAM;aAClB;SACF;KACF,CAAC,CAAC;IACH,MAAM,CAAC,MAAM,CAAC,CAAC,WAAW,EAAE,CAAC;AAC/B,CAAC,CAAC,CAAC"}
1
+ {"version":3,"file":"summarize.test.js","sourceRoot":"","sources":["../../../src/__tests__/summarize.test.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AACtC,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACpC,OAAO,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AAEvD,IAAI,CAAC,qBAAqB,EAAE,KAAK,IAAI,EAAE;IACrC,MAAM,cAAc,GAAG,oBAAoB,CAAC,WAAW,CAAC,CAAC;IAEzD,MAAM,KAAK,GAAG,IAAI,KAAK,CAAC;QACtB,SAAS,EAAE,OAAO,CAAC,GAAG,CAAC,iBAAiB,CAAC,IAAI,wBAAwB;QACrE,UAAU,EAAE,cAAc;QAC1B,QAAQ,EAAE,OAAO,CAAC,GAAG,CAAC,iBAAiB,CAAC,IAAI,OAAO;KACpD,CAAC,CAAC;IAEH,MAAM,MAAM,GAAG,MAAM,KAAK,CAAC,MAAM,CAAC,SAAS,CAAC,SAAS,CAAC;QACpD,aAAa,EAAE;YACb;gBACE,EAAE,EAAE,MAAM;aACX;YACD;gBACE,EAAE,EAAE,MAAM;aACX;SACF;KACF,CAAC,CAAC;IACH,MAAM,CAAC,MAAM,CAAC,CAAC,WAAW,EAAE,CAAC;AAC/B,CAAC,CAAC,CAAC"}
@@ -13,7 +13,7 @@ import { Result } from "../types/fp.js";
13
13
  * Create a chat response
14
14
  *
15
15
  * @remarks
16
- * Run an assistant turn. Set `stream` to true to receive server-sent events; otherwise the response is a typed JSON response object.
16
+ * Run an assistant turn. The default response is JSON. HTTP clients request server-sent events by setting `stream` to true in the JSON body. An `Accept: text/event-stream` header does not replace `stream`.
17
17
  */
18
18
  export declare function chatCreate(client: GleanCore, request: operations.PlatformChatCreateRequest, options?: RequestOptions): APIPromise<Result<components.PlatformChatCompletedResponse, errors.PlatformProblemDetailError | GleanBaseError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
19
19
  //# sourceMappingURL=chatCreate.d.ts.map
@@ -17,7 +17,7 @@ import { APIPromise } from "../types/async.js";
17
17
  * Create a chat response
18
18
  *
19
19
  * @remarks
20
- * Run an assistant turn. Set `stream` to true to receive server-sent events; otherwise the response is a typed JSON response object.
20
+ * Run an assistant turn. The default response is JSON. HTTP clients request server-sent events by setting `stream` to true in the JSON body. An `Accept: text/event-stream` header does not replace `stream`.
21
21
  */
22
22
  export function chatCreate(client, request, options) {
23
23
  return new APIPromise($do(client, request, options));
@@ -14,7 +14,7 @@ import { Result } from "../types/fp.js";
14
14
  * SDK-only logical operation. HTTP clients must call the base path; the URL fragment is not sent. Create a chat response
15
15
  *
16
16
  * @remarks
17
- * SDK-only logical operation. HTTP clients must call the base path; the URL fragment is not sent. Run an assistant turn. Set `stream` to true to receive server-sent events; otherwise the response is a typed JSON response object.
17
+ * SDK-only logical operation. HTTP clients must call the base path; the URL fragment is not sent. Run an assistant turn. The default response is JSON. HTTP clients request server-sent events by setting `stream` to true in the JSON body. An `Accept: text/event-stream` header does not replace `stream`.
18
18
  */
19
19
  export declare function chatCreateStream(client: GleanCore, request: operations.PlatformChatCreateStreamRequest, options?: RequestOptions): APIPromise<Result<EventStream<components.PlatformChatStreamEventServerSentEvent>, errors.PlatformProblemDetailError | GleanBaseError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
20
20
  //# sourceMappingURL=chatCreateStream.d.ts.map
@@ -19,7 +19,7 @@ import { APIPromise } from "../types/async.js";
19
19
  * SDK-only logical operation. HTTP clients must call the base path; the URL fragment is not sent. Create a chat response
20
20
  *
21
21
  * @remarks
22
- * SDK-only logical operation. HTTP clients must call the base path; the URL fragment is not sent. Run an assistant turn. Set `stream` to true to receive server-sent events; otherwise the response is a typed JSON response object.
22
+ * SDK-only logical operation. HTTP clients must call the base path; the URL fragment is not sent. Run an assistant turn. The default response is JSON. HTTP clients request server-sent events by setting `stream` to true in the JSON body. An `Accept: text/event-stream` header does not replace `stream`.
23
23
  */
24
24
  export function chatCreateStream(client, request, options) {
25
25
  return new APIPromise($do(client, request, options));
@@ -35,8 +35,8 @@ export declare function serverURLFromOptions(options: SDKOptions): URL | null;
35
35
  export declare const SDK_METADATA: {
36
36
  readonly language: "typescript";
37
37
  readonly openapiDocVersion: "0.9.0";
38
- readonly sdkVersion: "0.20.0";
38
+ readonly sdkVersion: "0.20.1";
39
39
  readonly genVersion: "2.934.1";
40
- readonly userAgent: "speakeasy-sdk/typescript 0.20.0 2.934.1 0.9.0 @gleanwork/api-client";
40
+ readonly userAgent: "speakeasy-sdk/typescript 0.20.1 2.934.1 0.9.0 @gleanwork/api-client";
41
41
  };
42
42
  //# sourceMappingURL=config.d.ts.map
@@ -35,8 +35,8 @@ export function serverURLFromOptions(options) {
35
35
  export const SDK_METADATA = {
36
36
  language: "typescript",
37
37
  openapiDocVersion: "0.9.0",
38
- sdkVersion: "0.20.0",
38
+ sdkVersion: "0.20.1",
39
39
  genVersion: "2.934.1",
40
- userAgent: "speakeasy-sdk/typescript 0.20.0 2.934.1 0.9.0 @gleanwork/api-client",
40
+ userAgent: "speakeasy-sdk/typescript 0.20.1 2.934.1 0.9.0 @gleanwork/api-client",
41
41
  };
42
42
  //# sourceMappingURL=config.js.map
@@ -19,7 +19,7 @@ export type ChatCreateMutationError = errors.PlatformProblemDetailError | GleanB
19
19
  * Create a chat response
20
20
  *
21
21
  * @remarks
22
- * Run an assistant turn. Set `stream` to true to receive server-sent events; otherwise the response is a typed JSON response object.
22
+ * Run an assistant turn. The default response is JSON. HTTP clients request server-sent events by setting `stream` to true in the JSON body. An `Accept: text/event-stream` header does not replace `stream`.
23
23
  */
24
24
  export declare function useChatCreateMutation(options?: MutationHookOptions<ChatCreateMutationData, ChatCreateMutationError, ChatCreateMutationVariables>): UseMutationResult<ChatCreateMutationData, ChatCreateMutationError, ChatCreateMutationVariables>;
25
25
  export declare function mutationKeyChatCreate(): MutationKey;
@@ -11,7 +11,7 @@ import { useGleanContext } from "./_context.js";
11
11
  * Create a chat response
12
12
  *
13
13
  * @remarks
14
- * Run an assistant turn. Set `stream` to true to receive server-sent events; otherwise the response is a typed JSON response object.
14
+ * Run an assistant turn. The default response is JSON. HTTP clients request server-sent events by setting `stream` to true in the JSON body. An `Accept: text/event-stream` header does not replace `stream`.
15
15
  */
16
16
  export function useChatCreateMutation(options) {
17
17
  const client = useGleanContext();
@@ -20,7 +20,7 @@ export type ChatCreateStreamMutationError = errors.PlatformProblemDetailError |
20
20
  * SDK-only logical operation. HTTP clients must call the base path; the URL fragment is not sent. Create a chat response
21
21
  *
22
22
  * @remarks
23
- * SDK-only logical operation. HTTP clients must call the base path; the URL fragment is not sent. Run an assistant turn. Set `stream` to true to receive server-sent events; otherwise the response is a typed JSON response object.
23
+ * SDK-only logical operation. HTTP clients must call the base path; the URL fragment is not sent. Run an assistant turn. The default response is JSON. HTTP clients request server-sent events by setting `stream` to true in the JSON body. An `Accept: text/event-stream` header does not replace `stream`.
24
24
  */
25
25
  export declare function useChatCreateStreamMutation(options?: MutationHookOptions<ChatCreateStreamMutationData, ChatCreateStreamMutationError, ChatCreateStreamMutationVariables>): UseMutationResult<ChatCreateStreamMutationData, ChatCreateStreamMutationError, ChatCreateStreamMutationVariables>;
26
26
  export declare function mutationKeyChatCreateStream(): MutationKey;
@@ -11,7 +11,7 @@ import { useGleanContext } from "./_context.js";
11
11
  * SDK-only logical operation. HTTP clients must call the base path; the URL fragment is not sent. Create a chat response
12
12
  *
13
13
  * @remarks
14
- * SDK-only logical operation. HTTP clients must call the base path; the URL fragment is not sent. Run an assistant turn. Set `stream` to true to receive server-sent events; otherwise the response is a typed JSON response object.
14
+ * SDK-only logical operation. HTTP clients must call the base path; the URL fragment is not sent. Run an assistant turn. The default response is JSON. HTTP clients request server-sent events by setting `stream` to true in the JSON body. An `Accept: text/event-stream` header does not replace `stream`.
15
15
  */
16
16
  export function useChatCreateStreamMutation(options) {
17
17
  const client = useGleanContext();
@@ -7,14 +7,14 @@ export declare class Chat extends ClientSDK {
7
7
  * Create a chat response
8
8
  *
9
9
  * @remarks
10
- * Run an assistant turn. Set `stream` to true to receive server-sent events; otherwise the response is a typed JSON response object.
10
+ * Run an assistant turn. The default response is JSON. HTTP clients request server-sent events by setting `stream` to true in the JSON body. An `Accept: text/event-stream` header does not replace `stream`.
11
11
  */
12
12
  create(request: operations.PlatformChatCreateRequest, options?: RequestOptions): Promise<components.PlatformChatCompletedResponse>;
13
13
  /**
14
14
  * SDK-only logical operation. HTTP clients must call the base path; the URL fragment is not sent. Create a chat response
15
15
  *
16
16
  * @remarks
17
- * SDK-only logical operation. HTTP clients must call the base path; the URL fragment is not sent. Run an assistant turn. Set `stream` to true to receive server-sent events; otherwise the response is a typed JSON response object.
17
+ * SDK-only logical operation. HTTP clients must call the base path; the URL fragment is not sent. Run an assistant turn. The default response is JSON. HTTP clients request server-sent events by setting `stream` to true in the JSON body. An `Accept: text/event-stream` header does not replace `stream`.
18
18
  */
19
19
  createStream(request: operations.PlatformChatCreateStreamRequest, options?: RequestOptions): Promise<EventStream<components.PlatformChatStreamEventServerSentEvent>>;
20
20
  }
@@ -11,7 +11,7 @@ export class Chat extends ClientSDK {
11
11
  * Create a chat response
12
12
  *
13
13
  * @remarks
14
- * Run an assistant turn. Set `stream` to true to receive server-sent events; otherwise the response is a typed JSON response object.
14
+ * Run an assistant turn. The default response is JSON. HTTP clients request server-sent events by setting `stream` to true in the JSON body. An `Accept: text/event-stream` header does not replace `stream`.
15
15
  */
16
16
  async create(request, options) {
17
17
  return unwrapAsync(chatCreate(this, request, options));
@@ -20,7 +20,7 @@ export class Chat extends ClientSDK {
20
20
  * SDK-only logical operation. HTTP clients must call the base path; the URL fragment is not sent. Create a chat response
21
21
  *
22
22
  * @remarks
23
- * SDK-only logical operation. HTTP clients must call the base path; the URL fragment is not sent. Run an assistant turn. Set `stream` to true to receive server-sent events; otherwise the response is a typed JSON response object.
23
+ * SDK-only logical operation. HTTP clients must call the base path; the URL fragment is not sent. Run an assistant turn. The default response is JSON. HTTP clients request server-sent events by setting `stream` to true in the JSON body. An `Accept: text/event-stream` header does not replace `stream`.
24
24
  */
25
25
  async createStream(request, options) {
26
26
  return unwrapAsync(chatCreateStream(this, request, options));
package/jsr.json CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  {
4
4
  "name": "@gleanwork/api-client",
5
- "version": "0.20.0",
5
+ "version": "0.20.1",
6
6
  "exports": {
7
7
  ".": "./src/index.ts",
8
8
  "./models/errors": "./src/models/errors/index.ts",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gleanwork/api-client",
3
- "version": "0.20.0",
3
+ "version": "0.20.1",
4
4
  "author": "Speakeasy",
5
5
  "tshy": {
6
6
  "sourceDialects": [
@@ -20,7 +20,7 @@ test("Messages Messages", async () => {
20
20
  idType: "CONVERSATION_ID",
21
21
  id: "<id>",
22
22
  timestampMillis: 558834,
23
- datasource: "SLACK",
23
+ datasource: "GCHAT",
24
24
  });
25
25
  expect(result).toBeDefined();
26
26
  });
@@ -19,12 +19,10 @@ test("Summarize Summarize", async () => {
19
19
  const result = await glean.client.documents.summarize({
20
20
  documentSpecs: [
21
21
  {
22
- ugcType: "SHORTCUTS",
23
- contentId: 602763,
22
+ id: "<id>",
24
23
  },
25
24
  {
26
- ugcType: "SHORTCUTS",
27
- contentId: 602763,
25
+ id: "<id>",
28
26
  },
29
27
  ],
30
28
  });
@@ -32,7 +32,7 @@ import { Result } from "../types/fp.js";
32
32
  * Create a chat response
33
33
  *
34
34
  * @remarks
35
- * Run an assistant turn. Set `stream` to true to receive server-sent events; otherwise the response is a typed JSON response object.
35
+ * Run an assistant turn. The default response is JSON. HTTP clients request server-sent events by setting `stream` to true in the JSON body. An `Accept: text/event-stream` header does not replace `stream`.
36
36
  */
37
37
  export function chatCreate(
38
38
  client: GleanCore,
@@ -34,7 +34,7 @@ import { Result } from "../types/fp.js";
34
34
  * SDK-only logical operation. HTTP clients must call the base path; the URL fragment is not sent. Create a chat response
35
35
  *
36
36
  * @remarks
37
- * SDK-only logical operation. HTTP clients must call the base path; the URL fragment is not sent. Run an assistant turn. Set `stream` to true to receive server-sent events; otherwise the response is a typed JSON response object.
37
+ * SDK-only logical operation. HTTP clients must call the base path; the URL fragment is not sent. Run an assistant turn. The default response is JSON. HTTP clients request server-sent events by setting `stream` to true in the JSON body. An `Accept: text/event-stream` header does not replace `stream`.
38
38
  */
39
39
  export function chatCreateStream(
40
40
  client: GleanCore,
package/src/lib/config.ts CHANGED
@@ -73,8 +73,8 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
73
73
  export const SDK_METADATA = {
74
74
  language: "typescript",
75
75
  openapiDocVersion: "0.9.0",
76
- sdkVersion: "0.20.0",
76
+ sdkVersion: "0.20.1",
77
77
  genVersion: "2.934.1",
78
78
  userAgent:
79
- "speakeasy-sdk/typescript 0.20.0 2.934.1 0.9.0 @gleanwork/api-client",
79
+ "speakeasy-sdk/typescript 0.20.1 2.934.1 0.9.0 @gleanwork/api-client",
80
80
  } as const;
@@ -51,7 +51,7 @@ export type ChatCreateMutationError =
51
51
  * Create a chat response
52
52
  *
53
53
  * @remarks
54
- * Run an assistant turn. Set `stream` to true to receive server-sent events; otherwise the response is a typed JSON response object.
54
+ * Run an assistant turn. The default response is JSON. HTTP clients request server-sent events by setting `stream` to true in the JSON body. An `Accept: text/event-stream` header does not replace `stream`.
55
55
  */
56
56
  export function useChatCreateMutation(
57
57
  options?: MutationHookOptions<
@@ -54,7 +54,7 @@ export type ChatCreateStreamMutationError =
54
54
  * SDK-only logical operation. HTTP clients must call the base path; the URL fragment is not sent. Create a chat response
55
55
  *
56
56
  * @remarks
57
- * SDK-only logical operation. HTTP clients must call the base path; the URL fragment is not sent. Run an assistant turn. Set `stream` to true to receive server-sent events; otherwise the response is a typed JSON response object.
57
+ * SDK-only logical operation. HTTP clients must call the base path; the URL fragment is not sent. Run an assistant turn. The default response is JSON. HTTP clients request server-sent events by setting `stream` to true in the JSON body. An `Accept: text/event-stream` header does not replace `stream`.
58
58
  */
59
59
  export function useChatCreateStreamMutation(
60
60
  options?: MutationHookOptions<
package/src/sdk/chat.ts CHANGED
@@ -16,7 +16,7 @@ export class Chat extends ClientSDK {
16
16
  * Create a chat response
17
17
  *
18
18
  * @remarks
19
- * Run an assistant turn. Set `stream` to true to receive server-sent events; otherwise the response is a typed JSON response object.
19
+ * Run an assistant turn. The default response is JSON. HTTP clients request server-sent events by setting `stream` to true in the JSON body. An `Accept: text/event-stream` header does not replace `stream`.
20
20
  */
21
21
  async create(
22
22
  request: operations.PlatformChatCreateRequest,
@@ -33,7 +33,7 @@ export class Chat extends ClientSDK {
33
33
  * SDK-only logical operation. HTTP clients must call the base path; the URL fragment is not sent. Create a chat response
34
34
  *
35
35
  * @remarks
36
- * SDK-only logical operation. HTTP clients must call the base path; the URL fragment is not sent. Run an assistant turn. Set `stream` to true to receive server-sent events; otherwise the response is a typed JSON response object.
36
+ * SDK-only logical operation. HTTP clients must call the base path; the URL fragment is not sent. Run an assistant turn. The default response is JSON. HTTP clients request server-sent events by setting `stream` to true in the JSON body. An `Accept: text/event-stream` header does not replace `stream`.
37
37
  */
38
38
  async createStream(
39
39
  request: operations.PlatformChatCreateStreamRequest,