@gleanwork/api-client 0.14.3 → 0.14.5
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 +11 -7
- package/dist/commonjs/__tests__/messages.test.js +1 -1
- package/dist/commonjs/__tests__/summarize.test.js +2 -4
- package/dist/commonjs/__tests__/summarize.test.js.map +1 -1
- package/dist/commonjs/lib/config.d.ts +3 -3
- package/dist/commonjs/lib/config.js +3 -3
- package/dist/commonjs/models/components/answer.d.ts +1 -1
- package/dist/commonjs/models/components/answercreationdata.d.ts +1 -1
- package/dist/commonjs/models/components/authstatus.d.ts +19 -0
- package/dist/commonjs/models/components/authstatus.d.ts.map +1 -0
- package/dist/commonjs/models/components/authstatus.js +54 -0
- package/dist/commonjs/models/components/authstatus.js.map +1 -0
- package/dist/commonjs/models/components/chatmessage.d.ts +24 -0
- package/dist/commonjs/models/components/chatmessage.d.ts.map +1 -1
- package/dist/commonjs/models/components/chatmessage.js +24 -0
- package/dist/commonjs/models/components/chatmessage.js.map +1 -1
- package/dist/commonjs/models/components/chatresponse.d.ts +7 -0
- package/dist/commonjs/models/components/chatresponse.d.ts.map +1 -1
- package/dist/commonjs/models/components/chatresponse.js +2 -0
- package/dist/commonjs/models/components/chatresponse.js.map +1 -1
- package/dist/commonjs/models/components/dlpconfig.d.ts +2 -2
- package/dist/commonjs/models/components/documentinteractions.d.ts +1 -1
- package/dist/commonjs/models/components/editanswerrequest.d.ts +1 -1
- package/dist/commonjs/models/components/employeeinfodefinition.d.ts +1 -1
- package/dist/commonjs/models/components/externalsharingoptions.d.ts +3 -3
- package/dist/commonjs/models/components/facetfiltervalue.d.ts +1 -1
- package/dist/commonjs/models/components/feedback.d.ts +4 -0
- package/dist/commonjs/models/components/feedback.d.ts.map +1 -1
- package/dist/commonjs/models/components/feedback.js +4 -0
- package/dist/commonjs/models/components/feedback.js.map +1 -1
- package/dist/commonjs/models/components/gleandataerror.d.ts +7 -0
- package/dist/commonjs/models/components/gleandataerror.d.ts.map +1 -1
- package/dist/commonjs/models/components/gleandataerror.js +2 -0
- package/dist/commonjs/models/components/gleandataerror.js.map +1 -1
- package/dist/commonjs/models/components/index.d.ts +2 -0
- package/dist/commonjs/models/components/index.d.ts.map +1 -1
- package/dist/commonjs/models/components/index.js +2 -0
- package/dist/commonjs/models/components/index.js.map +1 -1
- package/dist/commonjs/models/components/inputoptions.d.ts +2 -2
- package/dist/commonjs/models/components/relateddocuments.d.ts +1 -1
- package/dist/commonjs/models/components/sensitivecontentoptions.d.ts +3 -3
- package/dist/commonjs/models/components/sensitiveinfotype.d.ts +3 -3
- package/dist/commonjs/models/components/sensitiveinfotype.js +1 -1
- package/dist/commonjs/models/components/sharingoptions.d.ts +2 -2
- package/dist/commonjs/models/components/unauthorizeddatasourceinstance.d.ts +35 -0
- package/dist/commonjs/models/components/unauthorizeddatasourceinstance.d.ts.map +1 -0
- package/dist/commonjs/models/components/unauthorizeddatasourceinstance.js +54 -0
- package/dist/commonjs/models/components/unauthorizeddatasourceinstance.js.map +1 -0
- package/dist/commonjs/models/components/viewerinfo.d.ts +3 -3
- package/dist/commonjs/models/components/viewerinfo.js +1 -1
- package/dist/commonjs/models/errors/gleandataerror.d.ts +12 -0
- package/dist/commonjs/models/errors/gleandataerror.d.ts.map +1 -1
- package/dist/commonjs/models/errors/gleandataerror.js +5 -0
- package/dist/commonjs/models/errors/gleandataerror.js.map +1 -1
- package/dist/esm/__tests__/messages.test.js +1 -1
- package/dist/esm/__tests__/summarize.test.js +2 -4
- package/dist/esm/__tests__/summarize.test.js.map +1 -1
- package/dist/esm/lib/config.d.ts +3 -3
- package/dist/esm/lib/config.js +3 -3
- package/dist/esm/models/components/answer.d.ts +1 -1
- package/dist/esm/models/components/answercreationdata.d.ts +1 -1
- package/dist/esm/models/components/authstatus.d.ts +19 -0
- package/dist/esm/models/components/authstatus.d.ts.map +1 -0
- package/dist/esm/models/components/authstatus.js +18 -0
- package/dist/esm/models/components/authstatus.js.map +1 -0
- package/dist/esm/models/components/chatmessage.d.ts +24 -0
- package/dist/esm/models/components/chatmessage.d.ts.map +1 -1
- package/dist/esm/models/components/chatmessage.js +24 -0
- package/dist/esm/models/components/chatmessage.js.map +1 -1
- package/dist/esm/models/components/chatresponse.d.ts +7 -0
- package/dist/esm/models/components/chatresponse.d.ts.map +1 -1
- package/dist/esm/models/components/chatresponse.js +2 -0
- package/dist/esm/models/components/chatresponse.js.map +1 -1
- package/dist/esm/models/components/dlpconfig.d.ts +2 -2
- package/dist/esm/models/components/documentinteractions.d.ts +1 -1
- package/dist/esm/models/components/editanswerrequest.d.ts +1 -1
- package/dist/esm/models/components/employeeinfodefinition.d.ts +1 -1
- package/dist/esm/models/components/externalsharingoptions.d.ts +3 -3
- package/dist/esm/models/components/facetfiltervalue.d.ts +1 -1
- package/dist/esm/models/components/feedback.d.ts +4 -0
- package/dist/esm/models/components/feedback.d.ts.map +1 -1
- package/dist/esm/models/components/feedback.js +4 -0
- package/dist/esm/models/components/feedback.js.map +1 -1
- package/dist/esm/models/components/gleandataerror.d.ts +7 -0
- package/dist/esm/models/components/gleandataerror.d.ts.map +1 -1
- package/dist/esm/models/components/gleandataerror.js +2 -0
- package/dist/esm/models/components/gleandataerror.js.map +1 -1
- package/dist/esm/models/components/index.d.ts +2 -0
- package/dist/esm/models/components/index.d.ts.map +1 -1
- package/dist/esm/models/components/index.js +2 -0
- package/dist/esm/models/components/index.js.map +1 -1
- package/dist/esm/models/components/inputoptions.d.ts +2 -2
- package/dist/esm/models/components/relateddocuments.d.ts +1 -1
- package/dist/esm/models/components/sensitivecontentoptions.d.ts +3 -3
- package/dist/esm/models/components/sensitiveinfotype.d.ts +3 -3
- package/dist/esm/models/components/sensitiveinfotype.js +1 -1
- package/dist/esm/models/components/sharingoptions.d.ts +2 -2
- package/dist/esm/models/components/unauthorizeddatasourceinstance.d.ts +35 -0
- package/dist/esm/models/components/unauthorizeddatasourceinstance.d.ts.map +1 -0
- package/dist/esm/models/components/unauthorizeddatasourceinstance.js +17 -0
- package/dist/esm/models/components/unauthorizeddatasourceinstance.js.map +1 -0
- package/dist/esm/models/components/viewerinfo.d.ts +3 -3
- package/dist/esm/models/components/viewerinfo.js +1 -1
- package/dist/esm/models/errors/gleandataerror.d.ts +12 -0
- package/dist/esm/models/errors/gleandataerror.d.ts.map +1 -1
- package/dist/esm/models/errors/gleandataerror.js +5 -0
- package/dist/esm/models/errors/gleandataerror.js.map +1 -1
- package/examples/package-lock.json +1 -1
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/__tests__/messages.test.ts +1 -1
- package/src/__tests__/summarize.test.ts +2 -4
- package/src/lib/config.ts +3 -3
- package/src/models/components/answer.ts +1 -1
- package/src/models/components/answercreationdata.ts +1 -1
- package/src/models/components/authstatus.ts +25 -0
- package/src/models/components/chatmessage.ts +24 -0
- package/src/models/components/chatresponse.ts +15 -0
- package/src/models/components/dlpconfig.ts +2 -2
- package/src/models/components/documentinteractions.ts +1 -1
- package/src/models/components/editanswerrequest.ts +1 -1
- package/src/models/components/employeeinfodefinition.ts +1 -1
- package/src/models/components/externalsharingoptions.ts +3 -3
- package/src/models/components/facetfiltervalue.ts +1 -1
- package/src/models/components/feedback.ts +4 -0
- package/src/models/components/gleandataerror.ts +15 -0
- package/src/models/components/index.ts +2 -0
- package/src/models/components/inputoptions.ts +2 -2
- package/src/models/components/relateddocuments.ts +1 -1
- package/src/models/components/sensitivecontentoptions.ts +3 -3
- package/src/models/components/sensitiveinfotype.ts +3 -3
- package/src/models/components/sharingoptions.ts +2 -2
- package/src/models/components/unauthorizeddatasourceinstance.ts +59 -0
- package/src/models/components/viewerinfo.ts +3 -3
- package/src/models/errors/gleandataerror.ts +23 -0
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
import * as z from "zod/v3";
|
|
5
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
6
|
+
import { AuthStatus$inboundSchema } from "./authstatus.js";
|
|
7
|
+
/** @internal */
|
|
8
|
+
export const UnauthorizedDatasourceInstance$inboundSchema = z.object({
|
|
9
|
+
datasourceInstance: z.string().optional(),
|
|
10
|
+
displayName: z.string().optional(),
|
|
11
|
+
authStatus: AuthStatus$inboundSchema.optional(),
|
|
12
|
+
authUrlRelativePath: z.string().optional(),
|
|
13
|
+
});
|
|
14
|
+
export function unauthorizedDatasourceInstanceFromJSON(jsonString) {
|
|
15
|
+
return safeParse(jsonString, (x) => UnauthorizedDatasourceInstance$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UnauthorizedDatasourceInstance' from JSON`);
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=unauthorizeddatasourceinstance.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"unauthorizeddatasourceinstance.js","sourceRoot":"","sources":["../../../../src/models/components/unauthorizeddatasourceinstance.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAGjD,OAAO,EAAc,wBAAwB,EAAE,MAAM,iBAAiB,CAAC;AA8BvE,gBAAgB;AAChB,MAAM,CAAC,MAAM,4CAA4C,GAIrD,CAAC,CAAC,MAAM,CAAC;IACX,kBAAkB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACzC,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAClC,UAAU,EAAE,wBAAwB,CAAC,QAAQ,EAAE;IAC/C,mBAAmB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CAC3C,CAAC,CAAC;AAEH,MAAM,UAAU,sCAAsC,CACpD,UAAkB;IAElB,OAAO,SAAS,CACd,UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CAAC,4CAA4C,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EACxE,4DAA4D,CAC7D,CAAC;AACJ,CAAC"}
|
|
@@ -5,7 +5,7 @@ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
|
5
5
|
/**
|
|
6
6
|
* DEPRECATED - use permissions instead. Viewer's role on the specific document.
|
|
7
7
|
*
|
|
8
|
-
* @deprecated enum:
|
|
8
|
+
* @deprecated enum: Deprecated on 2026-02-05, removal scheduled for 2026-10-15: Use permissions instead.
|
|
9
9
|
*/
|
|
10
10
|
export declare const Role: {
|
|
11
11
|
readonly AnswerModerator: "ANSWER_MODERATOR";
|
|
@@ -15,14 +15,14 @@ export declare const Role: {
|
|
|
15
15
|
/**
|
|
16
16
|
* DEPRECATED - use permissions instead. Viewer's role on the specific document.
|
|
17
17
|
*
|
|
18
|
-
* @deprecated enum:
|
|
18
|
+
* @deprecated enum: Deprecated on 2026-02-05, removal scheduled for 2026-10-15: Use permissions instead.
|
|
19
19
|
*/
|
|
20
20
|
export type Role = ClosedEnum<typeof Role>;
|
|
21
21
|
export type ViewerInfo = {
|
|
22
22
|
/**
|
|
23
23
|
* DEPRECATED - use permissions instead. Viewer's role on the specific document.
|
|
24
24
|
*
|
|
25
|
-
* @deprecated field:
|
|
25
|
+
* @deprecated field: Deprecated on 2026-02-05, removal scheduled for 2026-10-15: Use permissions instead.
|
|
26
26
|
*/
|
|
27
27
|
role?: Role | undefined;
|
|
28
28
|
lastViewedTime?: Date | undefined;
|
|
@@ -6,7 +6,7 @@ import { safeParse } from "../../lib/schemas.js";
|
|
|
6
6
|
/**
|
|
7
7
|
* DEPRECATED - use permissions instead. Viewer's role on the specific document.
|
|
8
8
|
*
|
|
9
|
-
* @deprecated enum:
|
|
9
|
+
* @deprecated enum: Deprecated on 2026-02-05, removal scheduled for 2026-10-15: Use permissions instead.
|
|
10
10
|
*/
|
|
11
11
|
export const Role = {
|
|
12
12
|
AnswerModerator: "ANSWER_MODERATOR",
|
|
@@ -19,6 +19,12 @@ export type GleanDataErrorData = {
|
|
|
19
19
|
* Indicates the federated search results could not be fetched due to rate limiting.
|
|
20
20
|
*/
|
|
21
21
|
federatedSearchRateLimitError?: boolean | undefined;
|
|
22
|
+
/**
|
|
23
|
+
* Datasource instances that could not be queried because the user has not completed or has expired per-user OAuth.
|
|
24
|
+
*
|
|
25
|
+
* @remarks
|
|
26
|
+
*/
|
|
27
|
+
unauthorizedDatasourceInstances?: Array<components.UnauthorizedDatasourceInstance> | undefined;
|
|
22
28
|
};
|
|
23
29
|
export declare class GleanDataError extends GleanBaseError {
|
|
24
30
|
/**
|
|
@@ -38,6 +44,12 @@ export declare class GleanDataError extends GleanBaseError {
|
|
|
38
44
|
* Indicates the federated search results could not be fetched due to rate limiting.
|
|
39
45
|
*/
|
|
40
46
|
federatedSearchRateLimitError?: boolean | undefined;
|
|
47
|
+
/**
|
|
48
|
+
* Datasource instances that could not be queried because the user has not completed or has expired per-user OAuth.
|
|
49
|
+
*
|
|
50
|
+
* @remarks
|
|
51
|
+
*/
|
|
52
|
+
unauthorizedDatasourceInstances?: Array<components.UnauthorizedDatasourceInstance> | undefined;
|
|
41
53
|
/** The original data that was passed to this error instance. */
|
|
42
54
|
data$: GleanDataErrorData;
|
|
43
55
|
constructor(err: GleanDataErrorData, httpMeta: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gleandataerror.d.ts","sourceRoot":"","sources":["../../../../src/models/errors/gleandataerror.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,KAAK,UAAU,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAErD,MAAM,MAAM,kBAAkB,GAAG;IAC/B;;OAEG;IACH,aAAa,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IACpC;;OAEG;IACH,eAAe,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IACtC;;OAEG;IACH,gBAAgB,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,yBAAyB,CAAC,GAAG,SAAS,CAAC;IAC3E,aAAa,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,YAAY,CAAC,GAAG,SAAS,CAAC;IAC3D;;OAEG;IACH,6BAA6B,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"gleandataerror.d.ts","sourceRoot":"","sources":["../../../../src/models/errors/gleandataerror.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,KAAK,UAAU,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAErD,MAAM,MAAM,kBAAkB,GAAG;IAC/B;;OAEG;IACH,aAAa,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IACpC;;OAEG;IACH,eAAe,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IACtC;;OAEG;IACH,gBAAgB,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,yBAAyB,CAAC,GAAG,SAAS,CAAC;IAC3E,aAAa,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,YAAY,CAAC,GAAG,SAAS,CAAC;IAC3D;;OAEG;IACH,6BAA6B,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IACpD;;;;OAIG;IACH,+BAA+B,CAAC,EAC5B,KAAK,CAAC,UAAU,CAAC,8BAA8B,CAAC,GAChD,SAAS,CAAC;CACf,CAAC;AAEF,qBAAa,cAAe,SAAQ,cAAc;IAChD;;OAEG;IACH,aAAa,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IACpC;;OAEG;IACH,eAAe,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IACtC;;OAEG;IACH,gBAAgB,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,yBAAyB,CAAC,GAAG,SAAS,CAAC;IAC3E,aAAa,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,YAAY,CAAC,GAAG,SAAS,CAAC;IAC3D;;OAEG;IACH,6BAA6B,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IACpD;;;;OAIG;IACH,+BAA+B,CAAC,EAC5B,KAAK,CAAC,UAAU,CAAC,8BAA8B,CAAC,GAChD,SAAS,CAAC;IAEd,gEAAgE;IAChE,KAAK,EAAE,kBAAkB,CAAC;gBAGxB,GAAG,EAAE,kBAAkB,EACvB,QAAQ,EAAE;QAAE,QAAQ,EAAE,QAAQ,CAAC;QAAC,OAAO,EAAE,OAAO,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE;CAuBnE;AAED,gBAAgB;AAChB,eAAO,MAAM,4BAA4B,EAAE,CAAC,CAAC,OAAO,CAClD,cAAc,EACd,CAAC,CAAC,UAAU,EACZ,OAAO,CAqBL,CAAC"}
|
|
@@ -23,6 +23,10 @@ export class GleanDataError extends GleanBaseError {
|
|
|
23
23
|
if (err.federatedSearchRateLimitError != null) {
|
|
24
24
|
this.federatedSearchRateLimitError = err.federatedSearchRateLimitError;
|
|
25
25
|
}
|
|
26
|
+
if (err.unauthorizedDatasourceInstances != null) {
|
|
27
|
+
this.unauthorizedDatasourceInstances =
|
|
28
|
+
err.unauthorizedDatasourceInstances;
|
|
29
|
+
}
|
|
26
30
|
this.name = "GleanDataError";
|
|
27
31
|
}
|
|
28
32
|
}
|
|
@@ -34,6 +38,7 @@ export const GleanDataError$inboundSchema = z.object({
|
|
|
34
38
|
.optional(),
|
|
35
39
|
errorMessages: z.array(components.ErrorMessage$inboundSchema).optional(),
|
|
36
40
|
federatedSearchRateLimitError: z.boolean().optional(),
|
|
41
|
+
unauthorizedDatasourceInstances: z.array(components.UnauthorizedDatasourceInstance$inboundSchema).optional(),
|
|
37
42
|
request$: z.instanceof(Request),
|
|
38
43
|
response$: z.instanceof(Response),
|
|
39
44
|
body$: z.string(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gleandataerror.js","sourceRoot":"","sources":["../../../../src/models/errors/gleandataerror.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,KAAK,UAAU,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"gleandataerror.js","sourceRoot":"","sources":["../../../../src/models/errors/gleandataerror.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,KAAK,UAAU,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AA8BrD,MAAM,OAAO,cAAe,SAAQ,cAAc;IA8BhD,YACE,GAAuB,EACvB,QAAgE;QAEhE,MAAM,OAAO,GAAG,SAAS,IAAI,GAAG,IAAI,OAAO,GAAG,CAAC,OAAO,KAAK,QAAQ;YACjE,CAAC,CAAC,GAAG,CAAC,OAAO;YACb,CAAC,CAAC,uBAAuB,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,EAAE,CAAC;QACjD,KAAK,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;QACzB,IAAI,CAAC,KAAK,GAAG,GAAG,CAAC;QACjB,IAAI,GAAG,CAAC,aAAa,IAAI,IAAI;YAAE,IAAI,CAAC,aAAa,GAAG,GAAG,CAAC,aAAa,CAAC;QACtE,IAAI,GAAG,CAAC,eAAe,IAAI,IAAI;YAAE,IAAI,CAAC,eAAe,GAAG,GAAG,CAAC,eAAe,CAAC;QAC5E,IAAI,GAAG,CAAC,gBAAgB,IAAI,IAAI,EAAE,CAAC;YACjC,IAAI,CAAC,gBAAgB,GAAG,GAAG,CAAC,gBAAgB,CAAC;QAC/C,CAAC;QACD,IAAI,GAAG,CAAC,aAAa,IAAI,IAAI;YAAE,IAAI,CAAC,aAAa,GAAG,GAAG,CAAC,aAAa,CAAC;QACtE,IAAI,GAAG,CAAC,6BAA6B,IAAI,IAAI,EAAE,CAAC;YAC9C,IAAI,CAAC,6BAA6B,GAAG,GAAG,CAAC,6BAA6B,CAAC;QACzE,CAAC;QACD,IAAI,GAAG,CAAC,+BAA+B,IAAI,IAAI,EAAE,CAAC;YAChD,IAAI,CAAC,+BAA+B;gBAClC,GAAG,CAAC,+BAA+B,CAAC;QACxC,CAAC;QAED,IAAI,CAAC,IAAI,GAAG,gBAAgB,CAAC;IAC/B,CAAC;CACF;AAED,gBAAgB;AAChB,MAAM,CAAC,MAAM,4BAA4B,GAIrC,CAAC,CAAC,MAAM,CAAC;IACX,aAAa,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;IACrC,eAAe,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;IACvC,gBAAgB,EAAE,CAAC,CAAC,KAAK,CAAC,UAAU,CAAC,uCAAuC,CAAC;SAC1E,QAAQ,EAAE;IACb,aAAa,EAAE,CAAC,CAAC,KAAK,CAAC,UAAU,CAAC,0BAA0B,CAAC,CAAC,QAAQ,EAAE;IACxE,6BAA6B,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;IACrD,+BAA+B,EAAE,CAAC,CAAC,KAAK,CACtC,UAAU,CAAC,4CAA4C,CACxD,CAAC,QAAQ,EAAE;IACZ,QAAQ,EAAE,CAAC,CAAC,UAAU,CAAC,OAAO,CAAC;IAC/B,SAAS,EAAE,CAAC,CAAC,UAAU,CAAC,QAAQ,CAAC;IACjC,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;CAClB,CAAC;KACC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE;IACf,OAAO,IAAI,cAAc,CAAC,CAAC,EAAE;QAC3B,OAAO,EAAE,CAAC,CAAC,QAAQ;QACnB,QAAQ,EAAE,CAAC,CAAC,SAAS;QACrB,IAAI,EAAE,CAAC,CAAC,KAAK;KACd,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
package/jsr.json
CHANGED
package/package.json
CHANGED
|
@@ -18,12 +18,10 @@ test("Summarize Summarize", async () => {
|
|
|
18
18
|
const result = await glean.client.documents.summarize({
|
|
19
19
|
documentSpecs: [
|
|
20
20
|
{
|
|
21
|
-
|
|
22
|
-
contentId: 602763,
|
|
21
|
+
url: "https://dim-glider.com/",
|
|
23
22
|
},
|
|
24
23
|
{
|
|
25
|
-
|
|
26
|
-
contentId: 602763,
|
|
24
|
+
id: "<id>",
|
|
27
25
|
},
|
|
28
26
|
],
|
|
29
27
|
});
|
package/src/lib/config.ts
CHANGED
|
@@ -68,8 +68,8 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
|
|
|
68
68
|
export const SDK_METADATA = {
|
|
69
69
|
language: "typescript",
|
|
70
70
|
openapiDocVersion: "0.9.0",
|
|
71
|
-
sdkVersion: "0.14.
|
|
72
|
-
genVersion: "2.
|
|
71
|
+
sdkVersion: "0.14.5",
|
|
72
|
+
genVersion: "2.829.1",
|
|
73
73
|
userAgent:
|
|
74
|
-
"speakeasy-sdk/typescript 0.14.
|
|
74
|
+
"speakeasy-sdk/typescript 0.14.5 2.829.1 0.9.0 @gleanwork/api-client",
|
|
75
75
|
} as const;
|
|
@@ -95,7 +95,7 @@ export type Answer = {
|
|
|
95
95
|
/**
|
|
96
96
|
* The parent board ID of this Answer, or 0 if it's a floating Answer. Adding Answers to Answer Boards is no longer permitted.
|
|
97
97
|
*
|
|
98
|
-
* @deprecated field:
|
|
98
|
+
* @deprecated field: Deprecated on 2026-02-05, removal scheduled for 2026-10-15: Answer Boards no longer supported.
|
|
99
99
|
*/
|
|
100
100
|
boardId?: number | undefined;
|
|
101
101
|
/**
|
|
@@ -46,7 +46,7 @@ export type AnswerCreationData = {
|
|
|
46
46
|
/**
|
|
47
47
|
* The parent board ID of this Answer, or 0 if it's a floating Answer. Adding Answers to Answer Boards is no longer permitted.
|
|
48
48
|
*
|
|
49
|
-
* @deprecated field:
|
|
49
|
+
* @deprecated field: Deprecated on 2026-02-05, removal scheduled for 2026-10-15: Answer Boards no longer supported.
|
|
50
50
|
*/
|
|
51
51
|
boardId?: number | undefined;
|
|
52
52
|
/**
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { ClosedEnum } from "../../types/enums.js";
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* The per-user authorization status for a datasource.
|
|
10
|
+
*/
|
|
11
|
+
export const AuthStatus = {
|
|
12
|
+
Disabled: "DISABLED",
|
|
13
|
+
AwaitingAuth: "AWAITING_AUTH",
|
|
14
|
+
Authorized: "AUTHORIZED",
|
|
15
|
+
StaleOauth: "STALE_OAUTH",
|
|
16
|
+
SegMigration: "SEG_MIGRATION",
|
|
17
|
+
} as const;
|
|
18
|
+
/**
|
|
19
|
+
* The per-user authorization status for a datasource.
|
|
20
|
+
*/
|
|
21
|
+
export type AuthStatus = ClosedEnum<typeof AuthStatus>;
|
|
22
|
+
|
|
23
|
+
/** @internal */
|
|
24
|
+
export const AuthStatus$inboundSchema: z.ZodNativeEnum<typeof AuthStatus> = z
|
|
25
|
+
.nativeEnum(AuthStatus);
|
|
@@ -48,6 +48,30 @@ export const MessageType = {
|
|
|
48
48
|
* A message providing context in addition to the user query.
|
|
49
49
|
*/
|
|
50
50
|
Context: "CONTEXT",
|
|
51
|
+
/**
|
|
52
|
+
* Control signal for message streaming.
|
|
53
|
+
*/
|
|
54
|
+
Control: "CONTROL",
|
|
55
|
+
/**
|
|
56
|
+
* Control signal indicating the start of a message stream.
|
|
57
|
+
*/
|
|
58
|
+
ControlStart: "CONTROL_START",
|
|
59
|
+
/**
|
|
60
|
+
* Control signal indicating the end of a message stream.
|
|
61
|
+
*/
|
|
62
|
+
ControlFinish: "CONTROL_FINISH",
|
|
63
|
+
/**
|
|
64
|
+
* Control signal indicating the message stream was cancelled.
|
|
65
|
+
*/
|
|
66
|
+
ControlCancel: "CONTROL_CANCEL",
|
|
67
|
+
/**
|
|
68
|
+
* Indicates the message streaming needed to be retried.
|
|
69
|
+
*/
|
|
70
|
+
ControlRetry: "CONTROL_RETRY",
|
|
71
|
+
/**
|
|
72
|
+
* Fallback control signal for unrecognized control types.
|
|
73
|
+
*/
|
|
74
|
+
ControlUnknown: "CONTROL_UNKNOWN",
|
|
51
75
|
/**
|
|
52
76
|
* A debug message. Strictly used internally.
|
|
53
77
|
*/
|
|
@@ -7,6 +7,10 @@ import { safeParse } from "../../lib/schemas.js";
|
|
|
7
7
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
8
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
9
9
|
import { ChatMessage, ChatMessage$inboundSchema } from "./chatmessage.js";
|
|
10
|
+
import {
|
|
11
|
+
UnauthorizedDatasourceInstance,
|
|
12
|
+
UnauthorizedDatasourceInstance$inboundSchema,
|
|
13
|
+
} from "./unauthorizeddatasourceinstance.js";
|
|
10
14
|
|
|
11
15
|
/**
|
|
12
16
|
* A single response from the /chat backend.
|
|
@@ -29,6 +33,14 @@ export type ChatResponse = {
|
|
|
29
33
|
* A token that is used to track the session.
|
|
30
34
|
*/
|
|
31
35
|
chatSessionTrackingToken?: string | undefined;
|
|
36
|
+
/**
|
|
37
|
+
* Datasource instances that could not be queried because the user has not completed or has expired per-user OAuth, aggregated across all tools invoked in this turn.
|
|
38
|
+
*
|
|
39
|
+
* @remarks
|
|
40
|
+
*/
|
|
41
|
+
unauthorizedDatasourceInstances?:
|
|
42
|
+
| Array<UnauthorizedDatasourceInstance>
|
|
43
|
+
| undefined;
|
|
32
44
|
};
|
|
33
45
|
|
|
34
46
|
/** @internal */
|
|
@@ -42,6 +54,9 @@ export const ChatResponse$inboundSchema: z.ZodType<
|
|
|
42
54
|
followUpPrompts: z.array(z.string()).optional(),
|
|
43
55
|
backendTimeMillis: z.number().int().optional(),
|
|
44
56
|
chatSessionTrackingToken: z.string().optional(),
|
|
57
|
+
unauthorizedDatasourceInstances: z.array(
|
|
58
|
+
UnauthorizedDatasourceInstance$inboundSchema,
|
|
59
|
+
).optional(),
|
|
45
60
|
});
|
|
46
61
|
|
|
47
62
|
export function chatResponseFromJSON(
|
|
@@ -60,7 +60,7 @@ export type DlpConfig = {
|
|
|
60
60
|
/**
|
|
61
61
|
* DEPRECATED - use `sensitiveContentOptions` instead.
|
|
62
62
|
*
|
|
63
|
-
* @deprecated field:
|
|
63
|
+
* @deprecated field: Deprecated on 2026-02-05, removal scheduled for 2026-10-15: Use sensitiveContentOptions instead.
|
|
64
64
|
*/
|
|
65
65
|
sensitiveInfoTypes?: Array<SensitiveInfoType> | undefined;
|
|
66
66
|
/**
|
|
@@ -68,7 +68,7 @@ export type DlpConfig = {
|
|
|
68
68
|
*/
|
|
69
69
|
inputOptions?: InputOptions | undefined;
|
|
70
70
|
/**
|
|
71
|
-
* @deprecated field:
|
|
71
|
+
* @deprecated field: Deprecated on 2026-02-05, removal scheduled for 2026-10-15: Use broadSharingOptions instead.
|
|
72
72
|
*/
|
|
73
73
|
externalSharingOptions?: ExternalSharingOptions | undefined;
|
|
74
74
|
/**
|
|
@@ -37,7 +37,7 @@ export type DocumentInteractions = {
|
|
|
37
37
|
/**
|
|
38
38
|
* To be deprecated in favor of reacts. A (potentially non-exhaustive) list of reactions for the document.
|
|
39
39
|
*
|
|
40
|
-
* @deprecated field:
|
|
40
|
+
* @deprecated field: Deprecated on 2026-02-05, removal scheduled for 2026-10-15: Use reacts instead.
|
|
41
41
|
*/
|
|
42
42
|
reactions?: Array<string> | undefined;
|
|
43
43
|
reacts?: Array<Reaction> | undefined;
|
|
@@ -54,7 +54,7 @@ export type EditAnswerRequest = {
|
|
|
54
54
|
/**
|
|
55
55
|
* The parent board ID of this Answer, or 0 if it's a floating Answer. Adding Answers to Answer Boards is no longer permitted.
|
|
56
56
|
*
|
|
57
|
-
* @deprecated field:
|
|
57
|
+
* @deprecated field: Deprecated on 2026-02-05, removal scheduled for 2026-10-15: Answer Boards no longer supported.
|
|
58
58
|
*/
|
|
59
59
|
boardId?: number | undefined;
|
|
60
60
|
/**
|
|
@@ -72,7 +72,7 @@ export type EmployeeInfoDefinition = {
|
|
|
72
72
|
/**
|
|
73
73
|
* The employee's location (city/office name etc).
|
|
74
74
|
*
|
|
75
|
-
* @deprecated field:
|
|
75
|
+
* @deprecated field: Deprecated on 2026-02-05, removal scheduled for 2026-10-15: Field is deprecated.
|
|
76
76
|
*/
|
|
77
77
|
location?: string | undefined;
|
|
78
78
|
/**
|
|
@@ -10,11 +10,11 @@ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
|
10
10
|
/**
|
|
11
11
|
* Controls how "shared" a document must be to get picked for scans.
|
|
12
12
|
*
|
|
13
|
-
* @deprecated class:
|
|
13
|
+
* @deprecated class: Deprecated on 2026-02-05, removal scheduled for 2026-10-15: Use broadSharingOptions instead.
|
|
14
14
|
*/
|
|
15
15
|
export type ExternalSharingOptions = {
|
|
16
16
|
/**
|
|
17
|
-
* @deprecated field:
|
|
17
|
+
* @deprecated field: Deprecated on 2026-02-05, removal scheduled for 2026-10-15: Field is deprecated.
|
|
18
18
|
*/
|
|
19
19
|
enabled?: boolean | undefined;
|
|
20
20
|
/**
|
|
@@ -26,7 +26,7 @@ export type ExternalSharingOptions = {
|
|
|
26
26
|
*/
|
|
27
27
|
thresholdEnabled?: boolean | undefined;
|
|
28
28
|
/**
|
|
29
|
-
* @deprecated field:
|
|
29
|
+
* @deprecated field: Deprecated on 2026-02-05, removal scheduled for 2026-10-15: Field is deprecated.
|
|
30
30
|
*/
|
|
31
31
|
anyoneWithLinkEnabled?: boolean | undefined;
|
|
32
32
|
/**
|
|
@@ -38,7 +38,7 @@ export type FacetFilterValue = {
|
|
|
38
38
|
/**
|
|
39
39
|
* DEPRECATED - please use relationType instead
|
|
40
40
|
*
|
|
41
|
-
* @deprecated field:
|
|
41
|
+
* @deprecated field: Deprecated on 2026-02-05, removal scheduled for 2026-10-15: Use relationType instead.
|
|
42
42
|
*/
|
|
43
43
|
isNegated?: boolean | undefined;
|
|
44
44
|
};
|
|
@@ -118,6 +118,10 @@ export const Event = {
|
|
|
118
118
|
* The user submitted comparative feedback for multiple side-by-side implementations.
|
|
119
119
|
*/
|
|
120
120
|
ManualFeedbackSideBySide: "MANUAL_FEEDBACK_SIDE_BY_SIDE",
|
|
121
|
+
/**
|
|
122
|
+
* The user submitted feedback about time saved by an agent or workflow.
|
|
123
|
+
*/
|
|
124
|
+
FeedbackTimeSaved: "FEEDBACK_TIME_SAVED",
|
|
121
125
|
/**
|
|
122
126
|
* The user explicitly marked the content as read.
|
|
123
127
|
*/
|
|
@@ -11,6 +11,10 @@ import {
|
|
|
11
11
|
InvalidOperatorValueError,
|
|
12
12
|
InvalidOperatorValueError$inboundSchema,
|
|
13
13
|
} from "./invalidoperatorvalueerror.js";
|
|
14
|
+
import {
|
|
15
|
+
UnauthorizedDatasourceInstance,
|
|
16
|
+
UnauthorizedDatasourceInstance$inboundSchema,
|
|
17
|
+
} from "./unauthorizeddatasourceinstance.js";
|
|
14
18
|
|
|
15
19
|
export type GleanDataError = {
|
|
16
20
|
/**
|
|
@@ -30,6 +34,14 @@ export type GleanDataError = {
|
|
|
30
34
|
* Indicates the federated search results could not be fetched due to rate limiting.
|
|
31
35
|
*/
|
|
32
36
|
federatedSearchRateLimitError?: boolean | undefined;
|
|
37
|
+
/**
|
|
38
|
+
* Datasource instances that could not be queried because the user has not completed or has expired per-user OAuth.
|
|
39
|
+
*
|
|
40
|
+
* @remarks
|
|
41
|
+
*/
|
|
42
|
+
unauthorizedDatasourceInstances?:
|
|
43
|
+
| Array<UnauthorizedDatasourceInstance>
|
|
44
|
+
| undefined;
|
|
33
45
|
};
|
|
34
46
|
|
|
35
47
|
/** @internal */
|
|
@@ -43,6 +55,9 @@ export const GleanDataError$inboundSchema: z.ZodType<
|
|
|
43
55
|
invalidOperators: z.array(InvalidOperatorValueError$inboundSchema).optional(),
|
|
44
56
|
errorMessages: z.array(ErrorMessage$inboundSchema).optional(),
|
|
45
57
|
federatedSearchRateLimitError: z.boolean().optional(),
|
|
58
|
+
unauthorizedDatasourceInstances: z.array(
|
|
59
|
+
UnauthorizedDatasourceInstance$inboundSchema,
|
|
60
|
+
).optional(),
|
|
46
61
|
});
|
|
47
62
|
|
|
48
63
|
export function gleanDataErrorFromJSON(
|
|
@@ -32,6 +32,7 @@ export * from "./answerresult.js";
|
|
|
32
32
|
export * from "./appresult.js";
|
|
33
33
|
export * from "./assistantinsightsresponse.js";
|
|
34
34
|
export * from "./authconfig.js";
|
|
35
|
+
export * from "./authstatus.js";
|
|
35
36
|
export * from "./authtoken.js";
|
|
36
37
|
export * from "./autocompleterequest.js";
|
|
37
38
|
export * from "./autocompleteresponse.js";
|
|
@@ -394,6 +395,7 @@ export * from "./toolscallresponse.js";
|
|
|
394
395
|
export * from "./toolsets.js";
|
|
395
396
|
export * from "./toolslistresponse.js";
|
|
396
397
|
export * from "./ugctype.js";
|
|
398
|
+
export * from "./unauthorizeddatasourceinstance.js";
|
|
397
399
|
export * from "./unpin.js";
|
|
398
400
|
export * from "./updateannouncementrequest.js";
|
|
399
401
|
export * from "./updatedlpconfigrequest.js";
|
|
@@ -50,7 +50,7 @@ export type InputOptions = {
|
|
|
50
50
|
/**
|
|
51
51
|
* list of url regex matching documents excluded from report
|
|
52
52
|
*
|
|
53
|
-
* @deprecated field:
|
|
53
|
+
* @deprecated field: Deprecated on 2026-02-05, removal scheduled for 2026-10-15: Field is deprecated.
|
|
54
54
|
*/
|
|
55
55
|
urlGreenlist?: Array<string> | undefined;
|
|
56
56
|
/**
|
|
@@ -60,7 +60,7 @@ export type InputOptions = {
|
|
|
60
60
|
/**
|
|
61
61
|
* List of datasources to consider for report. DEPRECATED - use datasourceInstances instead.
|
|
62
62
|
*
|
|
63
|
-
* @deprecated field:
|
|
63
|
+
* @deprecated field: Deprecated on 2026-02-05, removal scheduled for 2026-10-15: Use datasourceInstances instead.
|
|
64
64
|
*/
|
|
65
65
|
datasources?: Array<string> | undefined;
|
|
66
66
|
/**
|
|
@@ -68,7 +68,7 @@ export type RelatedDocuments = {
|
|
|
68
68
|
/**
|
|
69
69
|
* A truncated list of documents with this relation. TO BE DEPRECATED.
|
|
70
70
|
*
|
|
71
|
-
* @deprecated field:
|
|
71
|
+
* @deprecated field: Deprecated on 2026-02-05, removal scheduled for 2026-10-15: Field is deprecated.
|
|
72
72
|
*/
|
|
73
73
|
documents?: Array<Document> | undefined;
|
|
74
74
|
/**
|
|
@@ -32,19 +32,19 @@ export type SensitiveContentOptions = {
|
|
|
32
32
|
/**
|
|
33
33
|
* DEPRECATED - use 'customSensitiveExpressions' instead.
|
|
34
34
|
*
|
|
35
|
-
* @deprecated field:
|
|
35
|
+
* @deprecated field: Deprecated on 2026-02-05, removal scheduled for 2026-10-15: Use customSensitiveExpressions instead.
|
|
36
36
|
*/
|
|
37
37
|
sensitiveInfoTypes?: Array<SensitiveInfoType> | undefined;
|
|
38
38
|
/**
|
|
39
39
|
* DEPRECATED - use 'customSensitiveExpressions' instead.
|
|
40
40
|
*
|
|
41
|
-
* @deprecated field:
|
|
41
|
+
* @deprecated field: Deprecated on 2026-02-05, removal scheduled for 2026-10-15: Use customSensitiveExpressions instead.
|
|
42
42
|
*/
|
|
43
43
|
sensitiveTerms?: Array<SensitiveExpression> | undefined;
|
|
44
44
|
/**
|
|
45
45
|
* DEPRECATED - use 'customSensitiveExpressions' instead.
|
|
46
46
|
*
|
|
47
|
-
* @deprecated field:
|
|
47
|
+
* @deprecated field: Deprecated on 2026-02-05, removal scheduled for 2026-10-15: Use customSensitiveExpressions instead.
|
|
48
48
|
*/
|
|
49
49
|
sensitiveRegexes?: Array<SensitiveExpression> | undefined;
|
|
50
50
|
/**
|
|
@@ -9,7 +9,7 @@ import { Result as SafeParseResult } from "../../types/fp.js";
|
|
|
9
9
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
|
-
* @deprecated enum:
|
|
12
|
+
* @deprecated enum: Deprecated on 2026-02-05, removal scheduled for 2026-10-15: Field is deprecated.
|
|
13
13
|
*/
|
|
14
14
|
export const SensitiveInfoTypeLikelihoodThreshold = {
|
|
15
15
|
Likely: "LIKELY",
|
|
@@ -19,7 +19,7 @@ export const SensitiveInfoTypeLikelihoodThreshold = {
|
|
|
19
19
|
VeryUnlikely: "VERY_UNLIKELY",
|
|
20
20
|
} as const;
|
|
21
21
|
/**
|
|
22
|
-
* @deprecated enum:
|
|
22
|
+
* @deprecated enum: Deprecated on 2026-02-05, removal scheduled for 2026-10-15: Field is deprecated.
|
|
23
23
|
*/
|
|
24
24
|
export type SensitiveInfoTypeLikelihoodThreshold = ClosedEnum<
|
|
25
25
|
typeof SensitiveInfoTypeLikelihoodThreshold
|
|
@@ -27,7 +27,7 @@ export type SensitiveInfoTypeLikelihoodThreshold = ClosedEnum<
|
|
|
27
27
|
|
|
28
28
|
export type SensitiveInfoType = {
|
|
29
29
|
/**
|
|
30
|
-
* @deprecated field:
|
|
30
|
+
* @deprecated field: Deprecated on 2026-02-05, removal scheduled for 2026-10-15: Field is deprecated.
|
|
31
31
|
*/
|
|
32
32
|
likelihoodThreshold?: SensitiveInfoTypeLikelihoodThreshold | undefined;
|
|
33
33
|
/**
|
|
@@ -12,7 +12,7 @@ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
|
12
12
|
*/
|
|
13
13
|
export type SharingOptions = {
|
|
14
14
|
/**
|
|
15
|
-
* @deprecated field:
|
|
15
|
+
* @deprecated field: Deprecated on 2026-02-05, removal scheduled for 2026-10-15: Field is deprecated.
|
|
16
16
|
*/
|
|
17
17
|
enabled?: boolean | undefined;
|
|
18
18
|
/**
|
|
@@ -24,7 +24,7 @@ export type SharingOptions = {
|
|
|
24
24
|
*/
|
|
25
25
|
thresholdEnabled?: boolean | undefined;
|
|
26
26
|
/**
|
|
27
|
-
* @deprecated field:
|
|
27
|
+
* @deprecated field: Deprecated on 2026-02-05, removal scheduled for 2026-10-15: Field is deprecated.
|
|
28
28
|
*/
|
|
29
29
|
anyoneWithLinkEnabled?: boolean | undefined;
|
|
30
30
|
/**
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
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 { AuthStatus, AuthStatus$inboundSchema } from "./authstatus.js";
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* A datasource instance that could not return results for this request because the user has not completed or has expired per-user OAuth.
|
|
13
|
+
*
|
|
14
|
+
* @remarks
|
|
15
|
+
*/
|
|
16
|
+
export type UnauthorizedDatasourceInstance = {
|
|
17
|
+
/**
|
|
18
|
+
* The instance identifier (e.g. "github", "github_enterprise_0", "slack_0"). Matches the instance names used in datasource configuration.
|
|
19
|
+
*
|
|
20
|
+
* @remarks
|
|
21
|
+
*/
|
|
22
|
+
datasourceInstance?: string | undefined;
|
|
23
|
+
/**
|
|
24
|
+
* Human-readable name of the datasource instance for display.
|
|
25
|
+
*/
|
|
26
|
+
displayName?: string | undefined;
|
|
27
|
+
/**
|
|
28
|
+
* The per-user authorization status for a datasource.
|
|
29
|
+
*/
|
|
30
|
+
authStatus?: AuthStatus | undefined;
|
|
31
|
+
/**
|
|
32
|
+
* Relative path to initiate or resume OAuth for the current user and instance. Clients should prepend their configured Glean backend base URL.
|
|
33
|
+
*
|
|
34
|
+
* @remarks
|
|
35
|
+
*/
|
|
36
|
+
authUrlRelativePath?: string | undefined;
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
/** @internal */
|
|
40
|
+
export const UnauthorizedDatasourceInstance$inboundSchema: z.ZodType<
|
|
41
|
+
UnauthorizedDatasourceInstance,
|
|
42
|
+
z.ZodTypeDef,
|
|
43
|
+
unknown
|
|
44
|
+
> = z.object({
|
|
45
|
+
datasourceInstance: z.string().optional(),
|
|
46
|
+
displayName: z.string().optional(),
|
|
47
|
+
authStatus: AuthStatus$inboundSchema.optional(),
|
|
48
|
+
authUrlRelativePath: z.string().optional(),
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
export function unauthorizedDatasourceInstanceFromJSON(
|
|
52
|
+
jsonString: string,
|
|
53
|
+
): SafeParseResult<UnauthorizedDatasourceInstance, SDKValidationError> {
|
|
54
|
+
return safeParse(
|
|
55
|
+
jsonString,
|
|
56
|
+
(x) => UnauthorizedDatasourceInstance$inboundSchema.parse(JSON.parse(x)),
|
|
57
|
+
`Failed to parse 'UnauthorizedDatasourceInstance' from JSON`,
|
|
58
|
+
);
|
|
59
|
+
}
|