@gleanwork/api-client 0.14.12 → 0.14.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -9
- package/dist/commonjs/__tests__/messages.test.js +1 -1
- package/dist/commonjs/__tests__/messages.test.js.map +1 -1
- package/dist/commonjs/__tests__/summarize.test.js +3 -3
- package/dist/commonjs/__tests__/summarize.test.js.map +1 -1
- package/dist/commonjs/funcs/clientChatDeleteFiles.d.ts +1 -1
- package/dist/commonjs/funcs/clientChatDeleteFiles.js +1 -1
- package/dist/commonjs/funcs/clientChatRetrieveFiles.d.ts +1 -1
- package/dist/commonjs/funcs/clientChatRetrieveFiles.js +1 -1
- package/dist/commonjs/funcs/clientChatUploadFiles.d.ts +1 -1
- package/dist/commonjs/funcs/clientChatUploadFiles.js +4 -2
- package/dist/commonjs/funcs/clientChatUploadFiles.js.map +1 -1
- package/dist/commonjs/funcs/indexingPeopleIndex.d.ts +1 -1
- package/dist/commonjs/funcs/indexingPeopleIndex.js +1 -1
- package/dist/commonjs/lib/config.d.ts +3 -3
- package/dist/commonjs/lib/config.js +3 -3
- package/dist/commonjs/lib/encodings.d.ts.map +1 -1
- package/dist/commonjs/lib/encodings.js +20 -5
- package/dist/commonjs/lib/encodings.js.map +1 -1
- package/dist/commonjs/models/components/chatfilestatus.d.ts +1 -0
- package/dist/commonjs/models/components/chatfilestatus.d.ts.map +1 -1
- package/dist/commonjs/models/components/chatfilestatus.js +1 -0
- package/dist/commonjs/models/components/chatfilestatus.js.map +1 -1
- package/dist/commonjs/models/components/documentdefinition.d.ts +5 -0
- package/dist/commonjs/models/components/documentdefinition.d.ts.map +1 -1
- package/dist/commonjs/models/components/documentdefinition.js +1 -0
- package/dist/commonjs/models/components/documentdefinition.js.map +1 -1
- package/dist/commonjs/react-query/clientChatDeleteFiles.d.ts +1 -1
- package/dist/commonjs/react-query/clientChatDeleteFiles.js +1 -1
- package/dist/commonjs/react-query/clientChatRetrieveFiles.d.ts +1 -1
- package/dist/commonjs/react-query/clientChatRetrieveFiles.js +1 -1
- package/dist/commonjs/react-query/clientChatUploadFiles.d.ts +1 -1
- package/dist/commonjs/react-query/clientChatUploadFiles.js +1 -1
- package/dist/commonjs/react-query/indexingPeopleIndex.d.ts +1 -1
- package/dist/commonjs/react-query/indexingPeopleIndex.js +1 -1
- package/dist/commonjs/sdk/chat.d.ts +3 -3
- package/dist/commonjs/sdk/chat.js +3 -3
- package/dist/commonjs/sdk/people.d.ts +1 -1
- package/dist/commonjs/sdk/people.js +1 -1
- package/dist/esm/__tests__/messages.test.js +1 -1
- package/dist/esm/__tests__/messages.test.js.map +1 -1
- package/dist/esm/__tests__/summarize.test.js +3 -3
- package/dist/esm/__tests__/summarize.test.js.map +1 -1
- package/dist/esm/funcs/clientChatDeleteFiles.d.ts +1 -1
- package/dist/esm/funcs/clientChatDeleteFiles.js +1 -1
- package/dist/esm/funcs/clientChatRetrieveFiles.d.ts +1 -1
- package/dist/esm/funcs/clientChatRetrieveFiles.js +1 -1
- package/dist/esm/funcs/clientChatUploadFiles.d.ts +1 -1
- package/dist/esm/funcs/clientChatUploadFiles.js +4 -2
- package/dist/esm/funcs/clientChatUploadFiles.js.map +1 -1
- package/dist/esm/funcs/indexingPeopleIndex.d.ts +1 -1
- package/dist/esm/funcs/indexingPeopleIndex.js +1 -1
- package/dist/esm/lib/config.d.ts +3 -3
- package/dist/esm/lib/config.js +3 -3
- package/dist/esm/lib/encodings.d.ts.map +1 -1
- package/dist/esm/lib/encodings.js +20 -5
- package/dist/esm/lib/encodings.js.map +1 -1
- package/dist/esm/models/components/chatfilestatus.d.ts +1 -0
- package/dist/esm/models/components/chatfilestatus.d.ts.map +1 -1
- package/dist/esm/models/components/chatfilestatus.js +1 -0
- package/dist/esm/models/components/chatfilestatus.js.map +1 -1
- package/dist/esm/models/components/documentdefinition.d.ts +5 -0
- package/dist/esm/models/components/documentdefinition.d.ts.map +1 -1
- package/dist/esm/models/components/documentdefinition.js +1 -0
- package/dist/esm/models/components/documentdefinition.js.map +1 -1
- package/dist/esm/react-query/clientChatDeleteFiles.d.ts +1 -1
- package/dist/esm/react-query/clientChatDeleteFiles.js +1 -1
- package/dist/esm/react-query/clientChatRetrieveFiles.d.ts +1 -1
- package/dist/esm/react-query/clientChatRetrieveFiles.js +1 -1
- package/dist/esm/react-query/clientChatUploadFiles.d.ts +1 -1
- package/dist/esm/react-query/clientChatUploadFiles.js +1 -1
- package/dist/esm/react-query/indexingPeopleIndex.d.ts +1 -1
- package/dist/esm/react-query/indexingPeopleIndex.js +1 -1
- package/dist/esm/sdk/chat.d.ts +3 -3
- package/dist/esm/sdk/chat.js +3 -3
- package/dist/esm/sdk/people.d.ts +1 -1
- package/dist/esm/sdk/people.js +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 +3 -3
- package/src/funcs/clientChatDeleteFiles.ts +1 -1
- package/src/funcs/clientChatRetrieveFiles.ts +1 -1
- package/src/funcs/clientChatUploadFiles.ts +4 -2
- package/src/funcs/indexingPeopleIndex.ts +1 -1
- package/src/lib/config.ts +3 -3
- package/src/lib/encodings.ts +23 -4
- package/src/models/components/chatfilestatus.ts +1 -0
- package/src/models/components/documentdefinition.ts +6 -0
- package/src/react-query/clientChatDeleteFiles.ts +1 -1
- package/src/react-query/clientChatRetrieveFiles.ts +1 -1
- package/src/react-query/clientChatUploadFiles.ts +1 -1
- package/src/react-query/indexingPeopleIndex.ts +1 -1
- package/src/sdk/chat.ts +3 -3
- package/src/sdk/people.ts +1 -1
|
@@ -34,7 +34,7 @@ import { Result } from "../types/fp.js";
|
|
|
34
34
|
import { isReadableStream } from "../types/streams.js";
|
|
35
35
|
|
|
36
36
|
/**
|
|
37
|
-
* Upload files for Chat
|
|
37
|
+
* Upload files for Chat
|
|
38
38
|
*
|
|
39
39
|
* @remarks
|
|
40
40
|
* Upload files for Chat.
|
|
@@ -108,7 +108,9 @@ async function $do(
|
|
|
108
108
|
|
|
109
109
|
for (const fileItem of payload.UploadChatFilesRequest.files ?? []) {
|
|
110
110
|
if (isBlobLike(fileItem)) {
|
|
111
|
-
|
|
111
|
+
const blob = fileItem;
|
|
112
|
+
const name = "name" in blob ? (blob.name as string) : undefined;
|
|
113
|
+
appendForm(body, "files", blob, name);
|
|
112
114
|
} else if (isReadableStream(fileItem.content)) {
|
|
113
115
|
const buffer = await readableStreamToArrayBuffer(fileItem.content);
|
|
114
116
|
const contentType = getContentTypeFromFileName(fileItem.fileName)
|
|
@@ -30,7 +30,7 @@ import { Result } from "../types/fp.js";
|
|
|
30
30
|
* Index employee
|
|
31
31
|
*
|
|
32
32
|
* @remarks
|
|
33
|
-
* Adds an employee or
|
|
33
|
+
* Adds an employee or replaces the existing information about an employee.
|
|
34
34
|
*/
|
|
35
35
|
export function indexingPeopleIndex(
|
|
36
36
|
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.14.
|
|
77
|
-
genVersion: "2.869.
|
|
76
|
+
sdkVersion: "0.14.14",
|
|
77
|
+
genVersion: "2.869.25",
|
|
78
78
|
userAgent:
|
|
79
|
-
"speakeasy-sdk/typescript 0.14.
|
|
79
|
+
"speakeasy-sdk/typescript 0.14.14 2.869.25 0.9.0 @gleanwork/api-client",
|
|
80
80
|
} as const;
|
package/src/lib/encodings.ts
CHANGED
|
@@ -480,6 +480,23 @@ export const encodeSpaceDelimitedQuery = queryEncoder(encodeSpaceDelimited);
|
|
|
480
480
|
export const encodePipeDelimitedQuery = queryEncoder(encodePipeDelimited);
|
|
481
481
|
export const encodeDeepObjectQuery = queryEncoder(encodeDeepObject);
|
|
482
482
|
|
|
483
|
+
function isBlobLike(val: unknown): val is Blob {
|
|
484
|
+
if (val instanceof Blob) {
|
|
485
|
+
return true;
|
|
486
|
+
}
|
|
487
|
+
|
|
488
|
+
if (typeof val !== "object" || val == null || !(Symbol.toStringTag in val)) {
|
|
489
|
+
return false;
|
|
490
|
+
}
|
|
491
|
+
|
|
492
|
+
const tag = val[Symbol.toStringTag];
|
|
493
|
+
if (tag !== "Blob" && tag !== "File") {
|
|
494
|
+
return false;
|
|
495
|
+
}
|
|
496
|
+
|
|
497
|
+
return "stream" in val && typeof val.stream === "function";
|
|
498
|
+
}
|
|
499
|
+
|
|
483
500
|
export function appendForm(
|
|
484
501
|
fd: FormData,
|
|
485
502
|
key: string,
|
|
@@ -488,10 +505,12 @@ export function appendForm(
|
|
|
488
505
|
): void {
|
|
489
506
|
if (value == null) {
|
|
490
507
|
return;
|
|
491
|
-
} else if (value
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
508
|
+
} else if (isBlobLike(value)) {
|
|
509
|
+
if (fileName) {
|
|
510
|
+
fd.append(key, value as Blob, fileName);
|
|
511
|
+
} else {
|
|
512
|
+
fd.append(key, value as Blob);
|
|
513
|
+
}
|
|
495
514
|
} else {
|
|
496
515
|
fd.append(key, String(value));
|
|
497
516
|
}
|
|
@@ -121,6 +121,10 @@ export type DocumentDefinition = {
|
|
|
121
121
|
* Additional variations of the URL that this document points to.
|
|
122
122
|
*/
|
|
123
123
|
additionalUrls?: Array<string> | undefined;
|
|
124
|
+
/**
|
|
125
|
+
* A deep link, if available, into the datasource's native application for the user's platform (e.g. slack://channel/message).
|
|
126
|
+
*/
|
|
127
|
+
nativeAppUrl?: string | undefined;
|
|
124
128
|
/**
|
|
125
129
|
* Comments associated with the document.
|
|
126
130
|
*/
|
|
@@ -154,6 +158,7 @@ export type DocumentDefinition$Outbound = {
|
|
|
154
158
|
interactions?: DocumentInteractionsDefinition$Outbound | undefined;
|
|
155
159
|
status?: string | undefined;
|
|
156
160
|
additionalUrls?: Array<string> | undefined;
|
|
161
|
+
nativeAppUrl?: string | undefined;
|
|
157
162
|
comments?: Array<CommentDefinition$Outbound> | undefined;
|
|
158
163
|
customProperties?: Array<CustomProperty$Outbound> | undefined;
|
|
159
164
|
};
|
|
@@ -185,6 +190,7 @@ export const DocumentDefinition$outboundSchema: z.ZodType<
|
|
|
185
190
|
interactions: DocumentInteractionsDefinition$outboundSchema.optional(),
|
|
186
191
|
status: z.string().optional(),
|
|
187
192
|
additionalUrls: z.array(z.string()).optional(),
|
|
193
|
+
nativeAppUrl: z.string().optional(),
|
|
188
194
|
comments: z.array(CommentDefinition$outboundSchema).optional(),
|
|
189
195
|
customProperties: z.array(CustomProperty$outboundSchema).optional(),
|
|
190
196
|
});
|
|
@@ -48,7 +48,7 @@ export type IndexingPeopleIndexMutationError =
|
|
|
48
48
|
* Index employee
|
|
49
49
|
*
|
|
50
50
|
* @remarks
|
|
51
|
-
* Adds an employee or
|
|
51
|
+
* Adds an employee or replaces the existing information about an employee.
|
|
52
52
|
*/
|
|
53
53
|
export function useIndexingPeopleIndexMutation(
|
|
54
54
|
options?: MutationHookOptions<
|
package/src/sdk/chat.ts
CHANGED
|
@@ -141,7 +141,7 @@ export class Chat extends ClientSDK {
|
|
|
141
141
|
}
|
|
142
142
|
|
|
143
143
|
/**
|
|
144
|
-
* Upload files for Chat
|
|
144
|
+
* Upload files for Chat
|
|
145
145
|
*
|
|
146
146
|
* @remarks
|
|
147
147
|
* Upload files for Chat.
|
|
@@ -162,7 +162,7 @@ export class Chat extends ClientSDK {
|
|
|
162
162
|
}
|
|
163
163
|
|
|
164
164
|
/**
|
|
165
|
-
* Get files uploaded by a user for Chat
|
|
165
|
+
* Get files uploaded by a user for Chat
|
|
166
166
|
*
|
|
167
167
|
* @remarks
|
|
168
168
|
* Get files uploaded by a user for Chat.
|
|
@@ -183,7 +183,7 @@ export class Chat extends ClientSDK {
|
|
|
183
183
|
}
|
|
184
184
|
|
|
185
185
|
/**
|
|
186
|
-
* Delete files uploaded by a user for chat
|
|
186
|
+
* Delete files uploaded by a user for chat
|
|
187
187
|
*
|
|
188
188
|
* @remarks
|
|
189
189
|
* Delete files uploaded by a user for Chat.
|
package/src/sdk/people.ts
CHANGED
|
@@ -63,7 +63,7 @@ export class People extends ClientSDK {
|
|
|
63
63
|
* Index employee
|
|
64
64
|
*
|
|
65
65
|
* @remarks
|
|
66
|
-
* Adds an employee or
|
|
66
|
+
* Adds an employee or replaces the existing information about an employee.
|
|
67
67
|
*/
|
|
68
68
|
async index(
|
|
69
69
|
request: components.IndexEmployeeRequest,
|