@gleanwork/api-client 0.9.1 → 0.10.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.
- package/dist/commonjs/__tests__/announcements.test.js +2 -2
- package/dist/commonjs/__tests__/announcements.test.js.map +1 -1
- package/dist/commonjs/__tests__/answers.test.js +2 -2
- package/dist/commonjs/__tests__/answers.test.js.map +1 -1
- package/dist/commonjs/__tests__/clientchat.test.js +24 -24
- package/dist/commonjs/__tests__/clientchat.test.js.map +1 -1
- package/dist/commonjs/__tests__/clientshortcuts.test.js +2 -2
- package/dist/commonjs/__tests__/clientshortcuts.test.js.map +1 -1
- package/dist/commonjs/__tests__/collections.test.js +2 -2
- package/dist/commonjs/__tests__/collections.test.js.map +1 -1
- package/dist/commonjs/__tests__/search.test.js +1 -1
- package/dist/commonjs/__tests__/search.test.js.map +1 -1
- package/dist/commonjs/__tests__/summarize.test.js +8 -2
- package/dist/commonjs/__tests__/summarize.test.js.map +1 -1
- package/dist/commonjs/funcs/clientCollectionsCreate.d.ts +2 -1
- package/dist/commonjs/funcs/clientCollectionsCreate.d.ts.map +1 -1
- package/dist/commonjs/funcs/clientCollectionsCreate.js +2 -1
- package/dist/commonjs/funcs/clientCollectionsCreate.js.map +1 -1
- package/dist/commonjs/lib/config.d.ts +2 -2
- package/dist/commonjs/lib/config.js +2 -2
- package/dist/commonjs/lib/config.js.map +1 -1
- package/dist/commonjs/models/components/agentconfig.d.ts +12 -0
- package/dist/commonjs/models/components/agentconfig.d.ts.map +1 -1
- package/dist/commonjs/models/components/agentconfig.js +5 -0
- package/dist/commonjs/models/components/agentconfig.js.map +1 -1
- package/dist/commonjs/models/components/chat.d.ts +9 -0
- package/dist/commonjs/models/components/chat.d.ts.map +1 -1
- package/dist/commonjs/models/components/chat.js +6 -0
- package/dist/commonjs/models/components/chat.js.map +1 -1
- package/dist/commonjs/models/components/chatmessage.d.ts +3 -0
- package/dist/commonjs/models/components/chatmessage.d.ts.map +1 -1
- package/dist/commonjs/models/components/chatmessage.js +3 -2
- package/dist/commonjs/models/components/chatmessage.js.map +1 -1
- package/dist/commonjs/models/components/chatmessagefragment.d.ts +1 -1
- package/dist/commonjs/models/components/chatsuggestion.d.ts +37 -0
- package/dist/commonjs/models/components/chatsuggestion.d.ts.map +1 -0
- package/dist/commonjs/models/components/chatsuggestion.js +71 -0
- package/dist/commonjs/models/components/chatsuggestion.js.map +1 -0
- package/dist/commonjs/models/components/clustertypeenum.d.ts +6 -0
- package/dist/commonjs/models/components/clustertypeenum.d.ts.map +1 -1
- package/dist/commonjs/models/components/clustertypeenum.js +2 -0
- package/dist/commonjs/models/components/clustertypeenum.js.map +1 -1
- package/dist/commonjs/models/components/customdatasourceconfig.d.ts +3 -0
- package/dist/commonjs/models/components/customdatasourceconfig.d.ts.map +1 -1
- package/dist/commonjs/models/components/customdatasourceconfig.js +1 -0
- package/dist/commonjs/models/components/customdatasourceconfig.js.map +1 -1
- package/dist/commonjs/models/components/digest.d.ts +48 -0
- package/dist/commonjs/models/components/digest.d.ts.map +1 -0
- package/dist/commonjs/models/components/digest.js +77 -0
- package/dist/commonjs/models/components/digest.js.map +1 -0
- package/dist/commonjs/models/components/digestsection.d.ts +64 -0
- package/dist/commonjs/models/components/digestsection.d.ts.map +1 -0
- package/dist/commonjs/models/components/digestsection.js +83 -0
- package/dist/commonjs/models/components/digestsection.js.map +1 -0
- package/dist/commonjs/models/components/digestupdate.d.ts +53 -0
- package/dist/commonjs/models/components/digestupdate.d.ts.map +1 -0
- package/dist/commonjs/models/components/digestupdate.js +78 -0
- package/dist/commonjs/models/components/digestupdate.js.map +1 -0
- package/dist/commonjs/models/components/documentspecunion.d.ts +99 -18
- package/dist/commonjs/models/components/documentspecunion.d.ts.map +1 -1
- package/dist/commonjs/models/components/documentspecunion.js +78 -19
- package/dist/commonjs/models/components/documentspecunion.js.map +1 -1
- package/dist/commonjs/models/components/feedentry.d.ts +12 -0
- package/dist/commonjs/models/components/feedentry.d.ts.map +1 -1
- package/dist/commonjs/models/components/feedentry.js +8 -0
- package/dist/commonjs/models/components/feedentry.js.map +1 -1
- package/dist/commonjs/models/components/feedrequest.d.ts +6 -0
- package/dist/commonjs/models/components/feedrequest.d.ts.map +1 -1
- package/dist/commonjs/models/components/feedrequest.js +2 -0
- package/dist/commonjs/models/components/feedrequest.js.map +1 -1
- package/dist/commonjs/models/components/feedresult.d.ts +6 -0
- package/dist/commonjs/models/components/feedresult.d.ts.map +1 -1
- package/dist/commonjs/models/components/feedresult.js +2 -0
- package/dist/commonjs/models/components/feedresult.js.map +1 -1
- package/dist/commonjs/models/components/getchatfilesrequest.d.ts +5 -0
- package/dist/commonjs/models/components/getchatfilesrequest.d.ts.map +1 -1
- package/dist/commonjs/models/components/getchatfilesrequest.js +2 -0
- package/dist/commonjs/models/components/getchatfilesrequest.js.map +1 -1
- package/dist/commonjs/models/components/group.d.ts +10 -0
- package/dist/commonjs/models/components/group.d.ts.map +1 -1
- package/dist/commonjs/models/components/group.js +4 -0
- package/dist/commonjs/models/components/group.js.map +1 -1
- package/dist/commonjs/models/components/index.d.ts +7 -1
- package/dist/commonjs/models/components/index.d.ts.map +1 -1
- package/dist/commonjs/models/components/index.js +7 -1
- package/dist/commonjs/models/components/index.js.map +1 -1
- package/dist/commonjs/models/components/manualfeedbackinfo.d.ts +2 -0
- package/dist/commonjs/models/components/manualfeedbackinfo.d.ts.map +1 -1
- package/dist/commonjs/models/components/manualfeedbackinfo.js.map +1 -1
- package/dist/commonjs/models/components/objectdefinition.d.ts +3 -0
- package/dist/commonjs/models/components/objectdefinition.d.ts.map +1 -1
- package/dist/commonjs/models/components/objectdefinition.js +1 -0
- package/dist/commonjs/models/components/objectdefinition.js.map +1 -1
- package/dist/commonjs/models/components/searchrequestoptions.d.ts +1 -1
- package/dist/commonjs/models/components/searchresultsnippet.d.ts +7 -5
- package/dist/commonjs/models/components/searchresultsnippet.d.ts.map +1 -1
- package/dist/commonjs/models/components/searchresultsnippet.js +2 -2
- package/dist/commonjs/models/components/searchresultsnippet.js.map +1 -1
- package/dist/commonjs/models/components/sectiontype.d.ts +37 -0
- package/dist/commonjs/models/components/sectiontype.d.ts.map +1 -0
- package/dist/commonjs/models/components/sectiontype.js +65 -0
- package/dist/commonjs/models/components/sectiontype.js.map +1 -0
- package/dist/commonjs/models/components/toolsets.d.ts +40 -0
- package/dist/commonjs/models/components/toolsets.d.ts.map +1 -0
- package/dist/commonjs/models/components/toolsets.js +71 -0
- package/dist/commonjs/models/components/toolsets.js.map +1 -0
- package/dist/commonjs/models/components/updatetype.d.ts +34 -0
- package/dist/commonjs/models/components/updatetype.d.ts.map +1 -0
- package/dist/commonjs/models/components/updatetype.js +64 -0
- package/dist/commonjs/models/components/updatetype.js.map +1 -0
- package/dist/commonjs/models/operations/createcollection.d.ts +83 -0
- package/dist/commonjs/models/operations/createcollection.d.ts.map +1 -0
- package/dist/commonjs/models/operations/createcollection.js +130 -0
- package/dist/commonjs/models/operations/createcollection.js.map +1 -0
- package/dist/commonjs/models/operations/index.d.ts +1 -0
- package/dist/commonjs/models/operations/index.d.ts.map +1 -1
- package/dist/commonjs/models/operations/index.js +1 -0
- package/dist/commonjs/models/operations/index.js.map +1 -1
- package/dist/commonjs/react-query/clientCollectionsCreate.d.ts +2 -1
- package/dist/commonjs/react-query/clientCollectionsCreate.d.ts.map +1 -1
- package/dist/commonjs/react-query/clientCollectionsCreate.js.map +1 -1
- package/dist/commonjs/sdk/collections.d.ts +2 -1
- package/dist/commonjs/sdk/collections.d.ts.map +1 -1
- package/dist/commonjs/sdk/collections.js.map +1 -1
- package/dist/esm/__tests__/announcements.test.js +2 -2
- package/dist/esm/__tests__/announcements.test.js.map +1 -1
- package/dist/esm/__tests__/answers.test.js +2 -2
- package/dist/esm/__tests__/answers.test.js.map +1 -1
- package/dist/esm/__tests__/clientchat.test.js +24 -24
- package/dist/esm/__tests__/clientchat.test.js.map +1 -1
- package/dist/esm/__tests__/clientshortcuts.test.js +2 -2
- package/dist/esm/__tests__/clientshortcuts.test.js.map +1 -1
- package/dist/esm/__tests__/collections.test.js +2 -2
- package/dist/esm/__tests__/collections.test.js.map +1 -1
- package/dist/esm/__tests__/search.test.js +1 -1
- package/dist/esm/__tests__/search.test.js.map +1 -1
- package/dist/esm/__tests__/summarize.test.js +8 -2
- package/dist/esm/__tests__/summarize.test.js.map +1 -1
- package/dist/esm/funcs/clientCollectionsCreate.d.ts +2 -1
- package/dist/esm/funcs/clientCollectionsCreate.d.ts.map +1 -1
- package/dist/esm/funcs/clientCollectionsCreate.js +2 -1
- package/dist/esm/funcs/clientCollectionsCreate.js.map +1 -1
- package/dist/esm/lib/config.d.ts +2 -2
- package/dist/esm/lib/config.js +2 -2
- package/dist/esm/lib/config.js.map +1 -1
- package/dist/esm/models/components/agentconfig.d.ts +12 -0
- package/dist/esm/models/components/agentconfig.d.ts.map +1 -1
- package/dist/esm/models/components/agentconfig.js +5 -0
- package/dist/esm/models/components/agentconfig.js.map +1 -1
- package/dist/esm/models/components/chat.d.ts +9 -0
- package/dist/esm/models/components/chat.d.ts.map +1 -1
- package/dist/esm/models/components/chat.js +6 -0
- package/dist/esm/models/components/chat.js.map +1 -1
- package/dist/esm/models/components/chatmessage.d.ts +3 -0
- package/dist/esm/models/components/chatmessage.d.ts.map +1 -1
- package/dist/esm/models/components/chatmessage.js +3 -2
- package/dist/esm/models/components/chatmessage.js.map +1 -1
- package/dist/esm/models/components/chatmessagefragment.d.ts +1 -1
- package/dist/esm/models/components/chatsuggestion.d.ts +37 -0
- package/dist/esm/models/components/chatsuggestion.d.ts.map +1 -0
- package/dist/esm/models/components/chatsuggestion.js +33 -0
- package/dist/esm/models/components/chatsuggestion.js.map +1 -0
- package/dist/esm/models/components/clustertypeenum.d.ts +6 -0
- package/dist/esm/models/components/clustertypeenum.d.ts.map +1 -1
- package/dist/esm/models/components/clustertypeenum.js +2 -0
- package/dist/esm/models/components/clustertypeenum.js.map +1 -1
- package/dist/esm/models/components/customdatasourceconfig.d.ts +3 -0
- package/dist/esm/models/components/customdatasourceconfig.d.ts.map +1 -1
- package/dist/esm/models/components/customdatasourceconfig.js +1 -0
- package/dist/esm/models/components/customdatasourceconfig.js.map +1 -1
- package/dist/esm/models/components/digest.d.ts +48 -0
- package/dist/esm/models/components/digest.d.ts.map +1 -0
- package/dist/esm/models/components/digest.js +39 -0
- package/dist/esm/models/components/digest.js.map +1 -0
- package/dist/esm/models/components/digestsection.d.ts +64 -0
- package/dist/esm/models/components/digestsection.d.ts.map +1 -0
- package/dist/esm/models/components/digestsection.js +45 -0
- package/dist/esm/models/components/digestsection.js.map +1 -0
- package/dist/esm/models/components/digestupdate.d.ts +53 -0
- package/dist/esm/models/components/digestupdate.d.ts.map +1 -0
- package/dist/esm/models/components/digestupdate.js +40 -0
- package/dist/esm/models/components/digestupdate.js.map +1 -0
- package/dist/esm/models/components/documentspecunion.d.ts +99 -18
- package/dist/esm/models/components/documentspecunion.d.ts.map +1 -1
- package/dist/esm/models/components/documentspecunion.js +75 -18
- package/dist/esm/models/components/documentspecunion.js.map +1 -1
- package/dist/esm/models/components/feedentry.d.ts +12 -0
- package/dist/esm/models/components/feedentry.d.ts.map +1 -1
- package/dist/esm/models/components/feedentry.js +8 -0
- package/dist/esm/models/components/feedentry.js.map +1 -1
- package/dist/esm/models/components/feedrequest.d.ts +6 -0
- package/dist/esm/models/components/feedrequest.d.ts.map +1 -1
- package/dist/esm/models/components/feedrequest.js +2 -0
- package/dist/esm/models/components/feedrequest.js.map +1 -1
- package/dist/esm/models/components/feedresult.d.ts +6 -0
- package/dist/esm/models/components/feedresult.d.ts.map +1 -1
- package/dist/esm/models/components/feedresult.js +2 -0
- package/dist/esm/models/components/feedresult.js.map +1 -1
- package/dist/esm/models/components/getchatfilesrequest.d.ts +5 -0
- package/dist/esm/models/components/getchatfilesrequest.d.ts.map +1 -1
- package/dist/esm/models/components/getchatfilesrequest.js +2 -0
- package/dist/esm/models/components/getchatfilesrequest.js.map +1 -1
- package/dist/esm/models/components/group.d.ts +10 -0
- package/dist/esm/models/components/group.d.ts.map +1 -1
- package/dist/esm/models/components/group.js +4 -0
- package/dist/esm/models/components/group.js.map +1 -1
- package/dist/esm/models/components/index.d.ts +7 -1
- package/dist/esm/models/components/index.d.ts.map +1 -1
- package/dist/esm/models/components/index.js +7 -1
- package/dist/esm/models/components/index.js.map +1 -1
- package/dist/esm/models/components/manualfeedbackinfo.d.ts +2 -0
- package/dist/esm/models/components/manualfeedbackinfo.d.ts.map +1 -1
- package/dist/esm/models/components/manualfeedbackinfo.js.map +1 -1
- package/dist/esm/models/components/objectdefinition.d.ts +3 -0
- package/dist/esm/models/components/objectdefinition.d.ts.map +1 -1
- package/dist/esm/models/components/objectdefinition.js +1 -0
- package/dist/esm/models/components/objectdefinition.js.map +1 -1
- package/dist/esm/models/components/searchrequestoptions.d.ts +1 -1
- package/dist/esm/models/components/searchresultsnippet.d.ts +7 -5
- package/dist/esm/models/components/searchresultsnippet.d.ts.map +1 -1
- package/dist/esm/models/components/searchresultsnippet.js +2 -2
- package/dist/esm/models/components/searchresultsnippet.js.map +1 -1
- package/dist/esm/models/components/sectiontype.d.ts +37 -0
- package/dist/esm/models/components/sectiontype.d.ts.map +1 -0
- package/dist/esm/models/components/sectiontype.js +29 -0
- package/dist/esm/models/components/sectiontype.js.map +1 -0
- package/dist/esm/models/components/toolsets.d.ts +40 -0
- package/dist/esm/models/components/toolsets.d.ts.map +1 -0
- package/dist/esm/models/components/toolsets.js +33 -0
- package/dist/esm/models/components/toolsets.js.map +1 -0
- package/dist/esm/models/components/updatetype.d.ts +34 -0
- package/dist/esm/models/components/updatetype.d.ts.map +1 -0
- package/dist/esm/models/components/updatetype.js +28 -0
- package/dist/esm/models/components/updatetype.js.map +1 -0
- package/dist/esm/models/operations/createcollection.d.ts +83 -0
- package/dist/esm/models/operations/createcollection.d.ts.map +1 -0
- package/dist/esm/models/operations/createcollection.js +88 -0
- package/dist/esm/models/operations/createcollection.js.map +1 -0
- package/dist/esm/models/operations/index.d.ts +1 -0
- package/dist/esm/models/operations/index.d.ts.map +1 -1
- package/dist/esm/models/operations/index.js +1 -0
- package/dist/esm/models/operations/index.js.map +1 -1
- package/dist/esm/react-query/clientCollectionsCreate.d.ts +2 -1
- package/dist/esm/react-query/clientCollectionsCreate.d.ts.map +1 -1
- package/dist/esm/react-query/clientCollectionsCreate.js.map +1 -1
- package/dist/esm/sdk/collections.d.ts +2 -1
- package/dist/esm/sdk/collections.d.ts.map +1 -1
- package/dist/esm/sdk/collections.js.map +1 -1
- package/docs/sdks/announcements/README.md +70 -70
- package/docs/sdks/answers/README.md +8 -8
- package/docs/sdks/clientdocuments/README.md +22 -6
- package/docs/sdks/clientshortcuts/README.md +14 -14
- package/docs/sdks/collections/README.md +11 -11
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/__tests__/announcements.test.ts +2 -2
- package/src/__tests__/answers.test.ts +2 -2
- package/src/__tests__/clientchat.test.ts +24 -24
- package/src/__tests__/clientshortcuts.test.ts +2 -2
- package/src/__tests__/collections.test.ts +2 -2
- package/src/__tests__/search.test.ts +1 -1
- package/src/__tests__/summarize.test.ts +8 -2
- package/src/funcs/clientCollectionsCreate.ts +5 -4
- package/src/lib/config.ts +2 -2
- package/src/models/components/agentconfig.ts +15 -0
- package/src/models/components/chat.ts +23 -0
- package/src/models/components/chatmessage.ts +3 -2
- package/src/models/components/chatmessagefragment.ts +1 -1
- package/src/models/components/chatsuggestion.ts +72 -0
- package/src/models/components/clustertypeenum.ts +2 -0
- package/src/models/components/customdatasourceconfig.ts +1 -0
- package/src/models/components/digest.ts +89 -0
- package/src/models/components/digestsection.ts +118 -0
- package/src/models/components/digestupdate.ts +98 -0
- package/src/models/components/documentspecunion.ts +147 -32
- package/src/models/components/feedentry.ts +22 -0
- package/src/models/components/feedrequest.ts +2 -0
- package/src/models/components/feedresult.ts +2 -0
- package/src/models/components/getchatfilesrequest.ts +7 -0
- package/src/models/components/group.ts +14 -0
- package/src/models/components/index.ts +7 -1
- package/src/models/components/manualfeedbackinfo.ts +2 -0
- package/src/models/components/objectdefinition.ts +1 -0
- package/src/models/components/searchrequestoptions.ts +1 -1
- package/src/models/components/searchresultsnippet.ts +9 -7
- package/src/models/components/sectiontype.ts +38 -0
- package/src/models/components/toolsets.ts +75 -0
- package/src/models/components/updatetype.ts +37 -0
- package/src/models/operations/createcollection.ts +186 -0
- package/src/models/operations/index.ts +1 -0
- package/src/react-query/clientCollectionsCreate.ts +2 -1
- package/src/sdk/collections.ts +2 -1
- package/dist/commonjs/models/components/createcollectionresponse.d.ts +0 -177
- package/dist/commonjs/models/components/createcollectionresponse.d.ts.map +0 -1
- package/dist/commonjs/models/components/createcollectionresponse.js +0 -154
- package/dist/commonjs/models/components/createcollectionresponse.js.map +0 -1
- package/dist/esm/models/components/createcollectionresponse.d.ts +0 -177
- package/dist/esm/models/components/createcollectionresponse.d.ts.map +0 -1
- package/dist/esm/models/components/createcollectionresponse.js +0 -116
- package/dist/esm/models/components/createcollectionresponse.js.map +0 -1
- package/src/models/components/createcollectionresponse.ts +0 -306
|
@@ -277,8 +277,8 @@ test("Collections Createcollection", async () => {
|
|
|
277
277
|
nativeAppUrl: "slack://foo/bar",
|
|
278
278
|
snippets: [
|
|
279
279
|
{
|
|
280
|
-
snippet: "snippet",
|
|
281
280
|
mimeType: "mimeType",
|
|
281
|
+
snippet: "snippet",
|
|
282
282
|
},
|
|
283
283
|
],
|
|
284
284
|
},
|
|
@@ -946,8 +946,8 @@ test("Collections Editcollection", async () => {
|
|
|
946
946
|
nativeAppUrl: "slack://foo/bar",
|
|
947
947
|
snippets: [
|
|
948
948
|
{
|
|
949
|
-
snippet: "snippet",
|
|
950
949
|
mimeType: "mimeType",
|
|
950
|
+
snippet: "snippet",
|
|
951
951
|
},
|
|
952
952
|
],
|
|
953
953
|
},
|
|
@@ -17,8 +17,14 @@ test("Summarize Summarize", async () => {
|
|
|
17
17
|
|
|
18
18
|
const result = await glean.client.documents.summarize({
|
|
19
19
|
documentSpecs: [
|
|
20
|
-
{
|
|
21
|
-
|
|
20
|
+
{
|
|
21
|
+
ugcType: "SHORTCUTS",
|
|
22
|
+
ugcId: "<id>",
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
ugcType: "CHATS",
|
|
26
|
+
ugcId: "<id>",
|
|
27
|
+
},
|
|
22
28
|
],
|
|
23
29
|
});
|
|
24
30
|
expect(result).toBeDefined();
|
|
@@ -21,6 +21,7 @@ import {
|
|
|
21
21
|
} from "../models/errors/httpclienterrors.js";
|
|
22
22
|
import * as errors from "../models/errors/index.js";
|
|
23
23
|
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
24
|
+
import * as operations from "../models/operations/index.js";
|
|
24
25
|
import { APICall, APIPromise } from "../types/async.js";
|
|
25
26
|
import { Result } from "../types/fp.js";
|
|
26
27
|
|
|
@@ -36,7 +37,7 @@ export function clientCollectionsCreate(
|
|
|
36
37
|
options?: RequestOptions,
|
|
37
38
|
): APIPromise<
|
|
38
39
|
Result<
|
|
39
|
-
|
|
40
|
+
operations.CreatecollectionResponse,
|
|
40
41
|
| errors.CollectionError
|
|
41
42
|
| GleanError
|
|
42
43
|
| SDKValidationError
|
|
@@ -61,7 +62,7 @@ async function $do(
|
|
|
61
62
|
): Promise<
|
|
62
63
|
[
|
|
63
64
|
Result<
|
|
64
|
-
|
|
65
|
+
operations.CreatecollectionResponse,
|
|
65
66
|
| errors.CollectionError
|
|
66
67
|
| GleanError
|
|
67
68
|
| SDKValidationError
|
|
@@ -140,7 +141,7 @@ async function $do(
|
|
|
140
141
|
};
|
|
141
142
|
|
|
142
143
|
const [result] = await M.match<
|
|
143
|
-
|
|
144
|
+
operations.CreatecollectionResponse,
|
|
144
145
|
| errors.CollectionError
|
|
145
146
|
| GleanError
|
|
146
147
|
| SDKValidationError
|
|
@@ -150,7 +151,7 @@ async function $do(
|
|
|
150
151
|
| RequestTimeoutError
|
|
151
152
|
| ConnectionError
|
|
152
153
|
>(
|
|
153
|
-
M.json(200,
|
|
154
|
+
M.json(200, operations.CreatecollectionResponse$inboundSchema),
|
|
154
155
|
M.jsonErr(422, errors.CollectionError$inboundSchema),
|
|
155
156
|
M.fail([400, 401, 429, "4XX"]),
|
|
156
157
|
M.fail("5XX"),
|
package/src/lib/config.ts
CHANGED
|
@@ -64,8 +64,8 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
|
|
|
64
64
|
export const SDK_METADATA = {
|
|
65
65
|
language: "typescript",
|
|
66
66
|
openapiDocVersion: "0.9.0",
|
|
67
|
-
sdkVersion: "0.
|
|
67
|
+
sdkVersion: "0.10.1",
|
|
68
68
|
genVersion: "2.610.0",
|
|
69
69
|
userAgent:
|
|
70
|
-
"speakeasy-sdk/typescript 0.
|
|
70
|
+
"speakeasy-sdk/typescript 0.10.1 2.610.0 0.9.0 @gleanwork/api-client",
|
|
71
71
|
} as const;
|
|
@@ -7,6 +7,12 @@ import { safeParse } from "../../lib/schemas.js";
|
|
|
7
7
|
import { ClosedEnum } from "../../types/enums.js";
|
|
8
8
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
9
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
|
+
import {
|
|
11
|
+
ToolSets,
|
|
12
|
+
ToolSets$inboundSchema,
|
|
13
|
+
ToolSets$Outbound,
|
|
14
|
+
ToolSets$outboundSchema,
|
|
15
|
+
} from "./toolsets.js";
|
|
10
16
|
|
|
11
17
|
/**
|
|
12
18
|
* Name of the agent.
|
|
@@ -15,6 +21,8 @@ export const AgentEnum = {
|
|
|
15
21
|
Default: "DEFAULT",
|
|
16
22
|
Gpt: "GPT",
|
|
17
23
|
Universal: "UNIVERSAL",
|
|
24
|
+
Fast: "FAST",
|
|
25
|
+
Advanced: "ADVANCED",
|
|
18
26
|
} as const;
|
|
19
27
|
/**
|
|
20
28
|
* Name of the agent.
|
|
@@ -41,6 +49,10 @@ export type AgentConfig = {
|
|
|
41
49
|
* Name of the agent.
|
|
42
50
|
*/
|
|
43
51
|
agent?: AgentEnum | undefined;
|
|
52
|
+
/**
|
|
53
|
+
* The types of tools that the agent is allowed to use. Only works with FAST and ADVANCED `agent` values
|
|
54
|
+
*/
|
|
55
|
+
toolSets?: ToolSets | undefined;
|
|
44
56
|
/**
|
|
45
57
|
* Top level modes to run GleanChat in.
|
|
46
58
|
*/
|
|
@@ -93,12 +105,14 @@ export const AgentConfig$inboundSchema: z.ZodType<
|
|
|
93
105
|
unknown
|
|
94
106
|
> = z.object({
|
|
95
107
|
agent: AgentEnum$inboundSchema.optional(),
|
|
108
|
+
toolSets: ToolSets$inboundSchema.optional(),
|
|
96
109
|
mode: Mode$inboundSchema.optional(),
|
|
97
110
|
});
|
|
98
111
|
|
|
99
112
|
/** @internal */
|
|
100
113
|
export type AgentConfig$Outbound = {
|
|
101
114
|
agent?: string | undefined;
|
|
115
|
+
toolSets?: ToolSets$Outbound | undefined;
|
|
102
116
|
mode?: string | undefined;
|
|
103
117
|
};
|
|
104
118
|
|
|
@@ -109,6 +123,7 @@ export const AgentConfig$outboundSchema: z.ZodType<
|
|
|
109
123
|
AgentConfig
|
|
110
124
|
> = z.object({
|
|
111
125
|
agent: AgentEnum$outboundSchema.optional(),
|
|
126
|
+
toolSets: ToolSets$outboundSchema.optional(),
|
|
112
127
|
mode: Mode$outboundSchema.optional(),
|
|
113
128
|
});
|
|
114
129
|
|
|
@@ -18,12 +18,24 @@ import {
|
|
|
18
18
|
IconConfig$Outbound,
|
|
19
19
|
IconConfig$outboundSchema,
|
|
20
20
|
} from "./iconconfig.js";
|
|
21
|
+
import {
|
|
22
|
+
ObjectPermissions,
|
|
23
|
+
ObjectPermissions$inboundSchema,
|
|
24
|
+
ObjectPermissions$Outbound,
|
|
25
|
+
ObjectPermissions$outboundSchema,
|
|
26
|
+
} from "./objectpermissions.js";
|
|
21
27
|
import {
|
|
22
28
|
Person,
|
|
23
29
|
Person$inboundSchema,
|
|
24
30
|
Person$Outbound,
|
|
25
31
|
Person$outboundSchema,
|
|
26
32
|
} from "./person.js";
|
|
33
|
+
import {
|
|
34
|
+
UserRoleSpecification,
|
|
35
|
+
UserRoleSpecification$inboundSchema,
|
|
36
|
+
UserRoleSpecification$Outbound,
|
|
37
|
+
UserRoleSpecification$outboundSchema,
|
|
38
|
+
} from "./userrolespecification.js";
|
|
27
39
|
|
|
28
40
|
/**
|
|
29
41
|
* A historical representation of a series of chat messages a user had with Glean Assistant.
|
|
@@ -58,10 +70,15 @@ export type Chat = {
|
|
|
58
70
|
* Defines how to render an icon
|
|
59
71
|
*/
|
|
60
72
|
icon?: IconConfig | undefined;
|
|
73
|
+
permissions?: ObjectPermissions | undefined;
|
|
61
74
|
/**
|
|
62
75
|
* The chat messages within a Chat.
|
|
63
76
|
*/
|
|
64
77
|
messages?: Array<ChatMessage> | undefined;
|
|
78
|
+
/**
|
|
79
|
+
* A list of roles for this Chat.
|
|
80
|
+
*/
|
|
81
|
+
roles?: Array<UserRoleSpecification> | undefined;
|
|
65
82
|
};
|
|
66
83
|
|
|
67
84
|
/** @internal */
|
|
@@ -75,7 +92,9 @@ export const Chat$inboundSchema: z.ZodType<Chat, z.ZodTypeDef, unknown> = z
|
|
|
75
92
|
applicationId: z.string().optional(),
|
|
76
93
|
applicationName: z.string().optional(),
|
|
77
94
|
icon: IconConfig$inboundSchema.optional(),
|
|
95
|
+
permissions: ObjectPermissions$inboundSchema.optional(),
|
|
78
96
|
messages: z.array(ChatMessage$inboundSchema).optional(),
|
|
97
|
+
roles: z.array(UserRoleSpecification$inboundSchema).optional(),
|
|
79
98
|
});
|
|
80
99
|
|
|
81
100
|
/** @internal */
|
|
@@ -88,7 +107,9 @@ export type Chat$Outbound = {
|
|
|
88
107
|
applicationId?: string | undefined;
|
|
89
108
|
applicationName?: string | undefined;
|
|
90
109
|
icon?: IconConfig$Outbound | undefined;
|
|
110
|
+
permissions?: ObjectPermissions$Outbound | undefined;
|
|
91
111
|
messages?: Array<ChatMessage$Outbound> | undefined;
|
|
112
|
+
roles?: Array<UserRoleSpecification$Outbound> | undefined;
|
|
92
113
|
};
|
|
93
114
|
|
|
94
115
|
/** @internal */
|
|
@@ -102,7 +123,9 @@ export const Chat$outboundSchema: z.ZodType<Chat$Outbound, z.ZodTypeDef, Chat> =
|
|
|
102
123
|
applicationId: z.string().optional(),
|
|
103
124
|
applicationName: z.string().optional(),
|
|
104
125
|
icon: IconConfig$outboundSchema.optional(),
|
|
126
|
+
permissions: ObjectPermissions$outboundSchema.optional(),
|
|
105
127
|
messages: z.array(ChatMessage$outboundSchema).optional(),
|
|
128
|
+
roles: z.array(UserRoleSpecification$outboundSchema).optional(),
|
|
106
129
|
});
|
|
107
130
|
|
|
108
131
|
/**
|
|
@@ -44,6 +44,7 @@ export const MessageType = {
|
|
|
44
44
|
Error: "ERROR",
|
|
45
45
|
Heading: "HEADING",
|
|
46
46
|
Warning: "WARNING",
|
|
47
|
+
ServerTool: "SERVER_TOOL",
|
|
47
48
|
} as const;
|
|
48
49
|
/**
|
|
49
50
|
* Semantically groups content of a certain type. It can be used for purposes such as differential UI treatment. USER authored messages should be of type CONTENT and do not need `messageType` specified.
|
|
@@ -140,7 +141,7 @@ export const ChatMessage$inboundSchema: z.ZodType<
|
|
|
140
141
|
unknown
|
|
141
142
|
> = z.object({
|
|
142
143
|
agentConfig: AgentConfig$inboundSchema.optional(),
|
|
143
|
-
author: Author$inboundSchema.default("
|
|
144
|
+
author: Author$inboundSchema.default("USER"),
|
|
144
145
|
citations: z.array(ChatMessageCitation$inboundSchema).optional(),
|
|
145
146
|
uploadedFileIds: z.array(z.string()).optional(),
|
|
146
147
|
fragments: z.array(ChatMessageFragment$inboundSchema).optional(),
|
|
@@ -172,7 +173,7 @@ export const ChatMessage$outboundSchema: z.ZodType<
|
|
|
172
173
|
ChatMessage
|
|
173
174
|
> = z.object({
|
|
174
175
|
agentConfig: AgentConfig$outboundSchema.optional(),
|
|
175
|
-
author: Author$outboundSchema.default("
|
|
176
|
+
author: Author$outboundSchema.default("USER"),
|
|
176
177
|
citations: z.array(ChatMessageCitation$outboundSchema).optional(),
|
|
177
178
|
uploadedFileIds: z.array(z.string()).optional(),
|
|
178
179
|
fragments: z.array(ChatMessageFragment$outboundSchema).optional(),
|
|
@@ -38,7 +38,7 @@ import {
|
|
|
38
38
|
} from "./toolinfo.js";
|
|
39
39
|
|
|
40
40
|
/**
|
|
41
|
-
* Represents a part of a ChatMessage that originates from a single action/tool. It is designed to support rich data formats beyond simple text, allowing for a more dynamic and interactive chat experience. Each fragment can include various types of content, such as text, search queries, action information, and more. Also, each ChatMessageFragment should only have one of structuredResults, querySuggestion, writeAction, followupAction, or file.
|
|
41
|
+
* Represents a part of a ChatMessage that originates from a single action/tool. It is designed to support rich data formats beyond simple text, allowing for a more dynamic and interactive chat experience. Each fragment can include various types of content, such as text, search queries, action information, and more. Also, each ChatMessageFragment should only have one of structuredResults, querySuggestion, writeAction, followupAction, agentRecommendation or file.
|
|
42
42
|
*/
|
|
43
43
|
export type ChatMessageFragment = {
|
|
44
44
|
/**
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
7
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
9
|
+
|
|
10
|
+
export type ChatSuggestion = {
|
|
11
|
+
/**
|
|
12
|
+
* The actionable chat query to run when the user selects this suggestion.
|
|
13
|
+
*/
|
|
14
|
+
query?: string | undefined;
|
|
15
|
+
/**
|
|
16
|
+
* Targeted Glean Chat feature for the suggestion.
|
|
17
|
+
*/
|
|
18
|
+
feature?: string | undefined;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
/** @internal */
|
|
22
|
+
export const ChatSuggestion$inboundSchema: z.ZodType<
|
|
23
|
+
ChatSuggestion,
|
|
24
|
+
z.ZodTypeDef,
|
|
25
|
+
unknown
|
|
26
|
+
> = z.object({
|
|
27
|
+
query: z.string().optional(),
|
|
28
|
+
feature: z.string().optional(),
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
/** @internal */
|
|
32
|
+
export type ChatSuggestion$Outbound = {
|
|
33
|
+
query?: string | undefined;
|
|
34
|
+
feature?: string | undefined;
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
/** @internal */
|
|
38
|
+
export const ChatSuggestion$outboundSchema: z.ZodType<
|
|
39
|
+
ChatSuggestion$Outbound,
|
|
40
|
+
z.ZodTypeDef,
|
|
41
|
+
ChatSuggestion
|
|
42
|
+
> = z.object({
|
|
43
|
+
query: z.string().optional(),
|
|
44
|
+
feature: z.string().optional(),
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* @internal
|
|
49
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
50
|
+
*/
|
|
51
|
+
export namespace ChatSuggestion$ {
|
|
52
|
+
/** @deprecated use `ChatSuggestion$inboundSchema` instead. */
|
|
53
|
+
export const inboundSchema = ChatSuggestion$inboundSchema;
|
|
54
|
+
/** @deprecated use `ChatSuggestion$outboundSchema` instead. */
|
|
55
|
+
export const outboundSchema = ChatSuggestion$outboundSchema;
|
|
56
|
+
/** @deprecated use `ChatSuggestion$Outbound` instead. */
|
|
57
|
+
export type Outbound = ChatSuggestion$Outbound;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export function chatSuggestionToJSON(chatSuggestion: ChatSuggestion): string {
|
|
61
|
+
return JSON.stringify(ChatSuggestion$outboundSchema.parse(chatSuggestion));
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export function chatSuggestionFromJSON(
|
|
65
|
+
jsonString: string,
|
|
66
|
+
): SafeParseResult<ChatSuggestion, SDKValidationError> {
|
|
67
|
+
return safeParse(
|
|
68
|
+
jsonString,
|
|
69
|
+
(x) => ChatSuggestion$inboundSchema.parse(JSON.parse(x)),
|
|
70
|
+
`Failed to parse 'ChatSuggestion' from JSON`,
|
|
71
|
+
);
|
|
72
|
+
}
|
|
@@ -47,6 +47,7 @@ export const DatasourceCategory = {
|
|
|
47
47
|
ExternalShortcut: "EXTERNAL_SHORTCUT",
|
|
48
48
|
Entity: "ENTITY",
|
|
49
49
|
Calendar: "CALENDAR",
|
|
50
|
+
Agents: "AGENTS",
|
|
50
51
|
} as const;
|
|
51
52
|
/**
|
|
52
53
|
* The type of this datasource. It is an important signal for relevance and must be specified and cannot be UNCATEGORIZED. Please refer to [this](https://developers.glean.com/docs/indexing_api_datasource_category/) for more details.
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
7
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
9
|
+
import {
|
|
10
|
+
DigestSection,
|
|
11
|
+
DigestSection$inboundSchema,
|
|
12
|
+
DigestSection$Outbound,
|
|
13
|
+
DigestSection$outboundSchema,
|
|
14
|
+
} from "./digestsection.js";
|
|
15
|
+
|
|
16
|
+
export type Digest = {
|
|
17
|
+
/**
|
|
18
|
+
* Identifier for the podcast file generated from this digest content.
|
|
19
|
+
*/
|
|
20
|
+
podcastFileId?: string | undefined;
|
|
21
|
+
/**
|
|
22
|
+
* Duration of the podcast file in seconds.
|
|
23
|
+
*/
|
|
24
|
+
podcastDuration?: number | undefined;
|
|
25
|
+
/**
|
|
26
|
+
* The date this digest covers, in YYYY-MM-DD format. Represents the specific day for which the digest content and updates were compiled. This can be empty if the digest is not yet available.
|
|
27
|
+
*/
|
|
28
|
+
digestDate?: string | undefined;
|
|
29
|
+
/**
|
|
30
|
+
* Array of digest sections from which the podcast was created.
|
|
31
|
+
*/
|
|
32
|
+
sections?: Array<DigestSection> | undefined;
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
/** @internal */
|
|
36
|
+
export const Digest$inboundSchema: z.ZodType<Digest, z.ZodTypeDef, unknown> = z
|
|
37
|
+
.object({
|
|
38
|
+
podcastFileId: z.string().optional(),
|
|
39
|
+
podcastDuration: z.number().optional(),
|
|
40
|
+
digestDate: z.string().optional(),
|
|
41
|
+
sections: z.array(DigestSection$inboundSchema).optional(),
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
/** @internal */
|
|
45
|
+
export type Digest$Outbound = {
|
|
46
|
+
podcastFileId?: string | undefined;
|
|
47
|
+
podcastDuration?: number | undefined;
|
|
48
|
+
digestDate?: string | undefined;
|
|
49
|
+
sections?: Array<DigestSection$Outbound> | undefined;
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
/** @internal */
|
|
53
|
+
export const Digest$outboundSchema: z.ZodType<
|
|
54
|
+
Digest$Outbound,
|
|
55
|
+
z.ZodTypeDef,
|
|
56
|
+
Digest
|
|
57
|
+
> = z.object({
|
|
58
|
+
podcastFileId: z.string().optional(),
|
|
59
|
+
podcastDuration: z.number().optional(),
|
|
60
|
+
digestDate: z.string().optional(),
|
|
61
|
+
sections: z.array(DigestSection$outboundSchema).optional(),
|
|
62
|
+
});
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* @internal
|
|
66
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
67
|
+
*/
|
|
68
|
+
export namespace Digest$ {
|
|
69
|
+
/** @deprecated use `Digest$inboundSchema` instead. */
|
|
70
|
+
export const inboundSchema = Digest$inboundSchema;
|
|
71
|
+
/** @deprecated use `Digest$outboundSchema` instead. */
|
|
72
|
+
export const outboundSchema = Digest$outboundSchema;
|
|
73
|
+
/** @deprecated use `Digest$Outbound` instead. */
|
|
74
|
+
export type Outbound = Digest$Outbound;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export function digestToJSON(digest: Digest): string {
|
|
78
|
+
return JSON.stringify(Digest$outboundSchema.parse(digest));
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
export function digestFromJSON(
|
|
82
|
+
jsonString: string,
|
|
83
|
+
): SafeParseResult<Digest, SDKValidationError> {
|
|
84
|
+
return safeParse(
|
|
85
|
+
jsonString,
|
|
86
|
+
(x) => Digest$inboundSchema.parse(JSON.parse(x)),
|
|
87
|
+
`Failed to parse 'Digest' from JSON`,
|
|
88
|
+
);
|
|
89
|
+
}
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
7
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
9
|
+
import {
|
|
10
|
+
DigestUpdate,
|
|
11
|
+
DigestUpdate$inboundSchema,
|
|
12
|
+
DigestUpdate$Outbound,
|
|
13
|
+
DigestUpdate$outboundSchema,
|
|
14
|
+
} from "./digestupdate.js";
|
|
15
|
+
import {
|
|
16
|
+
SectionType,
|
|
17
|
+
SectionType$inboundSchema,
|
|
18
|
+
SectionType$outboundSchema,
|
|
19
|
+
} from "./sectiontype.js";
|
|
20
|
+
|
|
21
|
+
export type DigestSection = {
|
|
22
|
+
/**
|
|
23
|
+
* Unique identifier for the digest section.
|
|
24
|
+
*/
|
|
25
|
+
id: string;
|
|
26
|
+
/**
|
|
27
|
+
* Type of the section. This defines how the section should be interpreted and rendered in the digest.
|
|
28
|
+
*/
|
|
29
|
+
type: SectionType;
|
|
30
|
+
/**
|
|
31
|
+
* Human-readable name for the digest section.
|
|
32
|
+
*/
|
|
33
|
+
displayName?: string | undefined;
|
|
34
|
+
/**
|
|
35
|
+
* Name of the channel (applicable for CHANNEL type sections). Used to display in the frontend.
|
|
36
|
+
*/
|
|
37
|
+
channelName?: string | undefined;
|
|
38
|
+
/**
|
|
39
|
+
* Instance identifier for the channel or workspace. Used for constructing channel URLs to display in the frontend.
|
|
40
|
+
*/
|
|
41
|
+
instanceId?: string | undefined;
|
|
42
|
+
/**
|
|
43
|
+
* Optional URL for the digest section. Should be populated only if the section is a CHANNEL type section.
|
|
44
|
+
*/
|
|
45
|
+
url?: string | undefined;
|
|
46
|
+
/**
|
|
47
|
+
* List of updates within this digest section.
|
|
48
|
+
*/
|
|
49
|
+
updates: Array<DigestUpdate>;
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
/** @internal */
|
|
53
|
+
export const DigestSection$inboundSchema: z.ZodType<
|
|
54
|
+
DigestSection,
|
|
55
|
+
z.ZodTypeDef,
|
|
56
|
+
unknown
|
|
57
|
+
> = z.object({
|
|
58
|
+
id: z.string(),
|
|
59
|
+
type: SectionType$inboundSchema,
|
|
60
|
+
displayName: z.string().optional(),
|
|
61
|
+
channelName: z.string().optional(),
|
|
62
|
+
instanceId: z.string().optional(),
|
|
63
|
+
url: z.string().optional(),
|
|
64
|
+
updates: z.array(DigestUpdate$inboundSchema),
|
|
65
|
+
});
|
|
66
|
+
|
|
67
|
+
/** @internal */
|
|
68
|
+
export type DigestSection$Outbound = {
|
|
69
|
+
id: string;
|
|
70
|
+
type: string;
|
|
71
|
+
displayName?: string | undefined;
|
|
72
|
+
channelName?: string | undefined;
|
|
73
|
+
instanceId?: string | undefined;
|
|
74
|
+
url?: string | undefined;
|
|
75
|
+
updates: Array<DigestUpdate$Outbound>;
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
/** @internal */
|
|
79
|
+
export const DigestSection$outboundSchema: z.ZodType<
|
|
80
|
+
DigestSection$Outbound,
|
|
81
|
+
z.ZodTypeDef,
|
|
82
|
+
DigestSection
|
|
83
|
+
> = z.object({
|
|
84
|
+
id: z.string(),
|
|
85
|
+
type: SectionType$outboundSchema,
|
|
86
|
+
displayName: z.string().optional(),
|
|
87
|
+
channelName: z.string().optional(),
|
|
88
|
+
instanceId: z.string().optional(),
|
|
89
|
+
url: z.string().optional(),
|
|
90
|
+
updates: z.array(DigestUpdate$outboundSchema),
|
|
91
|
+
});
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* @internal
|
|
95
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
96
|
+
*/
|
|
97
|
+
export namespace DigestSection$ {
|
|
98
|
+
/** @deprecated use `DigestSection$inboundSchema` instead. */
|
|
99
|
+
export const inboundSchema = DigestSection$inboundSchema;
|
|
100
|
+
/** @deprecated use `DigestSection$outboundSchema` instead. */
|
|
101
|
+
export const outboundSchema = DigestSection$outboundSchema;
|
|
102
|
+
/** @deprecated use `DigestSection$Outbound` instead. */
|
|
103
|
+
export type Outbound = DigestSection$Outbound;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
export function digestSectionToJSON(digestSection: DigestSection): string {
|
|
107
|
+
return JSON.stringify(DigestSection$outboundSchema.parse(digestSection));
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
export function digestSectionFromJSON(
|
|
111
|
+
jsonString: string,
|
|
112
|
+
): SafeParseResult<DigestSection, SDKValidationError> {
|
|
113
|
+
return safeParse(
|
|
114
|
+
jsonString,
|
|
115
|
+
(x) => DigestSection$inboundSchema.parse(JSON.parse(x)),
|
|
116
|
+
`Failed to parse 'DigestSection' from JSON`,
|
|
117
|
+
);
|
|
118
|
+
}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
7
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
9
|
+
import {
|
|
10
|
+
UpdateType,
|
|
11
|
+
UpdateType$inboundSchema,
|
|
12
|
+
UpdateType$outboundSchema,
|
|
13
|
+
} from "./updatetype.js";
|
|
14
|
+
|
|
15
|
+
export type DigestUpdate = {
|
|
16
|
+
/**
|
|
17
|
+
* URL link to the content or document.
|
|
18
|
+
*/
|
|
19
|
+
url?: string | undefined;
|
|
20
|
+
/**
|
|
21
|
+
* Title or headline of the update.
|
|
22
|
+
*/
|
|
23
|
+
title?: string | undefined;
|
|
24
|
+
/**
|
|
25
|
+
* Name or identifier of the data source (e.g., slack, confluence, etc.).
|
|
26
|
+
*/
|
|
27
|
+
datasource?: string | undefined;
|
|
28
|
+
/**
|
|
29
|
+
* Brief summary or description of the update content.
|
|
30
|
+
*/
|
|
31
|
+
summary?: string | undefined;
|
|
32
|
+
/**
|
|
33
|
+
* Optional type classification for the update.
|
|
34
|
+
*/
|
|
35
|
+
type?: UpdateType | undefined;
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
/** @internal */
|
|
39
|
+
export const DigestUpdate$inboundSchema: z.ZodType<
|
|
40
|
+
DigestUpdate,
|
|
41
|
+
z.ZodTypeDef,
|
|
42
|
+
unknown
|
|
43
|
+
> = z.object({
|
|
44
|
+
url: z.string().optional(),
|
|
45
|
+
title: z.string().optional(),
|
|
46
|
+
datasource: z.string().optional(),
|
|
47
|
+
summary: z.string().optional(),
|
|
48
|
+
type: UpdateType$inboundSchema.optional(),
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
/** @internal */
|
|
52
|
+
export type DigestUpdate$Outbound = {
|
|
53
|
+
url?: string | undefined;
|
|
54
|
+
title?: string | undefined;
|
|
55
|
+
datasource?: string | undefined;
|
|
56
|
+
summary?: string | undefined;
|
|
57
|
+
type?: string | undefined;
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
/** @internal */
|
|
61
|
+
export const DigestUpdate$outboundSchema: z.ZodType<
|
|
62
|
+
DigestUpdate$Outbound,
|
|
63
|
+
z.ZodTypeDef,
|
|
64
|
+
DigestUpdate
|
|
65
|
+
> = z.object({
|
|
66
|
+
url: z.string().optional(),
|
|
67
|
+
title: z.string().optional(),
|
|
68
|
+
datasource: z.string().optional(),
|
|
69
|
+
summary: z.string().optional(),
|
|
70
|
+
type: UpdateType$outboundSchema.optional(),
|
|
71
|
+
});
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* @internal
|
|
75
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
76
|
+
*/
|
|
77
|
+
export namespace DigestUpdate$ {
|
|
78
|
+
/** @deprecated use `DigestUpdate$inboundSchema` instead. */
|
|
79
|
+
export const inboundSchema = DigestUpdate$inboundSchema;
|
|
80
|
+
/** @deprecated use `DigestUpdate$outboundSchema` instead. */
|
|
81
|
+
export const outboundSchema = DigestUpdate$outboundSchema;
|
|
82
|
+
/** @deprecated use `DigestUpdate$Outbound` instead. */
|
|
83
|
+
export type Outbound = DigestUpdate$Outbound;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
export function digestUpdateToJSON(digestUpdate: DigestUpdate): string {
|
|
87
|
+
return JSON.stringify(DigestUpdate$outboundSchema.parse(digestUpdate));
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
export function digestUpdateFromJSON(
|
|
91
|
+
jsonString: string,
|
|
92
|
+
): SafeParseResult<DigestUpdate, SDKValidationError> {
|
|
93
|
+
return safeParse(
|
|
94
|
+
jsonString,
|
|
95
|
+
(x) => DigestUpdate$inboundSchema.parse(JSON.parse(x)),
|
|
96
|
+
`Failed to parse 'DigestUpdate' from JSON`,
|
|
97
|
+
);
|
|
98
|
+
}
|