@stack-spot/portal-network 0.136.0 → 0.136.2

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.
@@ -79,6 +79,9 @@ export type DocumentUploadRequest = {
79
79
  typeId?: string;
80
80
  origin?: "AI" | "UPLOAD";
81
81
  };
82
+ export type DocumentAttachRequest = {
83
+ documentIds?: string[];
84
+ };
82
85
  export type AgentResponse = {
83
86
  id?: string;
84
87
  label?: string;
@@ -203,19 +206,6 @@ export function deleteHypothesisById({ hypothesisId }: {
203
206
  method: "DELETE"
204
207
  }));
205
208
  }
206
- export function attach({ hypothesisId, documentId, authorization }: {
207
- hypothesisId: string;
208
- documentId: string;
209
- authorization: string;
210
- }, opts?: Oazapfts.RequestOpts) {
211
- return oazapfts.ok(oazapfts.fetchText(`/v1/documents/${encodeURIComponent(documentId)}/hypotheses/${encodeURIComponent(hypothesisId)}/attach`, {
212
- ...opts,
213
- method: "PUT",
214
- headers: oazapfts.mergeHeaders(opts?.headers, {
215
- Authorization: authorization
216
- })
217
- }));
218
- }
219
209
  export function listHypothesis({ filter, page, size, sort, direction }: {
220
210
  filter?: string;
221
211
  page?: number;
@@ -266,6 +256,20 @@ export function upload({ hypothesisId, authorization, documentUploadRequest }: {
266
256
  })
267
257
  })));
268
258
  }
259
+ export function attach({ hypothesisId, authorization, documentAttachRequest }: {
260
+ hypothesisId: string;
261
+ authorization: string;
262
+ documentAttachRequest: DocumentAttachRequest;
263
+ }, opts?: Oazapfts.RequestOpts) {
264
+ return oazapfts.ok(oazapfts.fetchText(`/v1/documents/hypotheses/${encodeURIComponent(hypothesisId)}/attach`, oazapfts.json({
265
+ ...opts,
266
+ method: "POST",
267
+ body: documentAttachRequest,
268
+ headers: oazapfts.mergeHeaders(opts?.headers, {
269
+ Authorization: authorization
270
+ })
271
+ })));
272
+ }
269
273
  export function getById({ documentId }: {
270
274
  documentId: string;
271
275
  }, opts?: Oazapfts.RequestOpts) {