@studyfetch/sdk 1.42.0 → 1.45.0
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/CHANGELOG.md +57 -0
- package/internal/to-file.d.mts +1 -1
- package/internal/to-file.d.ts +1 -1
- package/internal/to-file.js +1 -1
- package/internal/to-file.mjs +1 -1
- package/package.json +1 -1
- package/resources/v1/assignment-grader/assignment-grader.d.mts +12 -0
- package/resources/v1/assignment-grader/assignment-grader.d.mts.map +1 -1
- package/resources/v1/assignment-grader/assignment-grader.d.ts +12 -0
- package/resources/v1/assignment-grader/assignment-grader.d.ts.map +1 -1
- package/resources/v1/assignment-grader/assignment-grader.js.map +1 -1
- package/resources/v1/assignment-grader/assignment-grader.mjs.map +1 -1
- package/resources/v1/assignment-grader/rubric-templates.d.mts +8 -0
- package/resources/v1/assignment-grader/rubric-templates.d.mts.map +1 -1
- package/resources/v1/assignment-grader/rubric-templates.d.ts +8 -0
- package/resources/v1/assignment-grader/rubric-templates.d.ts.map +1 -1
- package/resources/v1/chat.d.mts +53 -1
- package/resources/v1/chat.d.mts.map +1 -1
- package/resources/v1/chat.d.ts +53 -1
- package/resources/v1/chat.d.ts.map +1 -1
- package/resources/v1/chat.js +30 -0
- package/resources/v1/chat.js.map +1 -1
- package/resources/v1/chat.mjs +30 -0
- package/resources/v1/chat.mjs.map +1 -1
- package/resources/v1/components.d.mts +37 -1
- package/resources/v1/components.d.mts.map +1 -1
- package/resources/v1/components.d.ts +37 -1
- package/resources/v1/components.d.ts.map +1 -1
- package/resources/v1/embed/context.d.mts +61 -0
- package/resources/v1/embed/context.d.mts.map +1 -0
- package/resources/v1/embed/context.d.ts +61 -0
- package/resources/v1/embed/context.d.ts.map +1 -0
- package/resources/v1/embed/context.js +61 -0
- package/resources/v1/embed/context.js.map +1 -0
- package/resources/v1/embed/context.mjs +57 -0
- package/resources/v1/embed/context.mjs.map +1 -0
- package/resources/v1/embed/embed.d.mts +4 -0
- package/resources/v1/embed/embed.d.mts.map +1 -1
- package/resources/v1/embed/embed.d.ts +4 -0
- package/resources/v1/embed/embed.d.ts.map +1 -1
- package/resources/v1/embed/embed.js +4 -0
- package/resources/v1/embed/embed.js.map +1 -1
- package/resources/v1/embed/embed.mjs +4 -0
- package/resources/v1/embed/embed.mjs.map +1 -1
- package/resources/v1/embed/index.d.mts +1 -0
- package/resources/v1/embed/index.d.mts.map +1 -1
- package/resources/v1/embed/index.d.ts +1 -0
- package/resources/v1/embed/index.d.ts.map +1 -1
- package/resources/v1/embed/index.js +3 -1
- package/resources/v1/embed/index.js.map +1 -1
- package/resources/v1/embed/index.mjs +1 -0
- package/resources/v1/embed/index.mjs.map +1 -1
- package/resources/v1/folders.d.mts +25 -1
- package/resources/v1/folders.d.mts.map +1 -1
- package/resources/v1/folders.d.ts +25 -1
- package/resources/v1/folders.d.ts.map +1 -1
- package/resources/v1/folders.js +11 -0
- package/resources/v1/folders.js.map +1 -1
- package/resources/v1/folders.mjs +11 -0
- package/resources/v1/folders.mjs.map +1 -1
- package/resources/v1/index.d.mts +5 -3
- package/resources/v1/index.d.mts.map +1 -1
- package/resources/v1/index.d.ts +5 -3
- package/resources/v1/index.d.ts.map +1 -1
- package/resources/v1/index.js +5 -1
- package/resources/v1/index.js.map +1 -1
- package/resources/v1/index.mjs +2 -0
- package/resources/v1/index.mjs.map +1 -1
- package/resources/v1/materials/index.d.mts +1 -1
- package/resources/v1/materials/index.d.mts.map +1 -1
- package/resources/v1/materials/index.d.ts +1 -1
- package/resources/v1/materials/index.d.ts.map +1 -1
- package/resources/v1/materials/index.js.map +1 -1
- package/resources/v1/materials/index.mjs.map +1 -1
- package/resources/v1/materials/materials.d.mts +92 -1
- package/resources/v1/materials/materials.d.mts.map +1 -1
- package/resources/v1/materials/materials.d.ts +92 -1
- package/resources/v1/materials/materials.d.ts.map +1 -1
- package/resources/v1/materials/materials.js +25 -0
- package/resources/v1/materials/materials.js.map +1 -1
- package/resources/v1/materials/materials.mjs +25 -0
- package/resources/v1/materials/materials.mjs.map +1 -1
- package/resources/v1/materials/upload.d.mts +38 -4
- package/resources/v1/materials/upload.d.mts.map +1 -1
- package/resources/v1/materials/upload.d.ts +38 -4
- package/resources/v1/materials/upload.d.ts.map +1 -1
- package/resources/v1/materials/upload.js +20 -3
- package/resources/v1/materials/upload.js.map +1 -1
- package/resources/v1/materials/upload.mjs +19 -2
- package/resources/v1/materials/upload.mjs.map +1 -1
- package/resources/v1/pdf-generator/get.d.mts +65 -0
- package/resources/v1/pdf-generator/get.d.mts.map +1 -0
- package/resources/v1/pdf-generator/get.d.ts +65 -0
- package/resources/v1/pdf-generator/get.d.ts.map +1 -0
- package/resources/v1/pdf-generator/get.js +9 -0
- package/resources/v1/pdf-generator/get.js.map +1 -0
- package/resources/v1/pdf-generator/get.mjs +5 -0
- package/resources/v1/pdf-generator/get.mjs.map +1 -0
- package/resources/v1/pdf-generator/index.d.mts +3 -0
- package/resources/v1/pdf-generator/index.d.mts.map +1 -0
- package/resources/v1/pdf-generator/index.d.ts +3 -0
- package/resources/v1/pdf-generator/index.d.ts.map +1 -0
- package/resources/v1/pdf-generator/index.js +9 -0
- package/resources/v1/pdf-generator/index.js.map +1 -0
- package/resources/v1/pdf-generator/index.mjs +4 -0
- package/resources/v1/pdf-generator/index.mjs.map +1 -0
- package/resources/v1/pdf-generator/pdf-generator.d.mts +109 -0
- package/resources/v1/pdf-generator/pdf-generator.d.mts.map +1 -0
- package/resources/v1/pdf-generator/pdf-generator.d.ts +109 -0
- package/resources/v1/pdf-generator/pdf-generator.d.ts.map +1 -0
- package/resources/v1/pdf-generator/pdf-generator.js +70 -0
- package/resources/v1/pdf-generator/pdf-generator.js.map +1 -0
- package/resources/v1/pdf-generator/pdf-generator.mjs +65 -0
- package/resources/v1/pdf-generator/pdf-generator.mjs.map +1 -0
- package/resources/v1/pdf-generator.d.mts +2 -0
- package/resources/v1/pdf-generator.d.mts.map +1 -0
- package/resources/v1/pdf-generator.d.ts +2 -0
- package/resources/v1/pdf-generator.d.ts.map +1 -0
- package/resources/v1/pdf-generator.js +6 -0
- package/resources/v1/pdf-generator.js.map +1 -0
- package/resources/v1/pdf-generator.mjs +3 -0
- package/resources/v1/pdf-generator.mjs.map +1 -0
- package/resources/v1/performance-insights/conversations.d.mts +131 -0
- package/resources/v1/performance-insights/conversations.d.mts.map +1 -0
- package/resources/v1/performance-insights/conversations.d.ts +131 -0
- package/resources/v1/performance-insights/conversations.d.ts.map +1 -0
- package/resources/v1/performance-insights/conversations.js +131 -0
- package/resources/v1/performance-insights/conversations.js.map +1 -0
- package/resources/v1/performance-insights/conversations.mjs +127 -0
- package/resources/v1/performance-insights/conversations.mjs.map +1 -0
- package/resources/v1/performance-insights/index.d.mts +3 -0
- package/resources/v1/performance-insights/index.d.mts.map +1 -0
- package/resources/v1/performance-insights/index.d.ts +3 -0
- package/resources/v1/performance-insights/index.d.ts.map +1 -0
- package/resources/v1/performance-insights/index.js +9 -0
- package/resources/v1/performance-insights/index.js.map +1 -0
- package/resources/v1/performance-insights/index.mjs +4 -0
- package/resources/v1/performance-insights/index.mjs.map +1 -0
- package/resources/v1/performance-insights/performance-insights.d.mts +139 -0
- package/resources/v1/performance-insights/performance-insights.d.mts.map +1 -0
- package/resources/v1/performance-insights/performance-insights.d.ts +139 -0
- package/resources/v1/performance-insights/performance-insights.d.ts.map +1 -0
- package/resources/v1/performance-insights/performance-insights.js +55 -0
- package/resources/v1/performance-insights/performance-insights.js.map +1 -0
- package/resources/v1/performance-insights/performance-insights.mjs +50 -0
- package/resources/v1/performance-insights/performance-insights.mjs.map +1 -0
- package/resources/v1/performance-insights.d.mts +2 -0
- package/resources/v1/performance-insights.d.mts.map +1 -0
- package/resources/v1/performance-insights.d.ts +2 -0
- package/resources/v1/performance-insights.d.ts.map +1 -0
- package/resources/v1/performance-insights.js +6 -0
- package/resources/v1/performance-insights.js.map +1 -0
- package/resources/v1/performance-insights.mjs +3 -0
- package/resources/v1/performance-insights.mjs.map +1 -0
- package/resources/v1/usage.d.mts +8 -0
- package/resources/v1/usage.d.mts.map +1 -1
- package/resources/v1/usage.d.ts +8 -0
- package/resources/v1/usage.d.ts.map +1 -1
- package/resources/v1/v1.d.mts +14 -6
- package/resources/v1/v1.d.mts.map +1 -1
- package/resources/v1/v1.d.ts +14 -6
- package/resources/v1/v1.d.ts.map +1 -1
- package/resources/v1/v1.js +8 -0
- package/resources/v1/v1.js.map +1 -1
- package/resources/v1/v1.mjs +8 -0
- package/resources/v1/v1.mjs.map +1 -1
- package/src/internal/to-file.ts +1 -1
- package/src/resources/v1/assignment-grader/assignment-grader.ts +15 -0
- package/src/resources/v1/assignment-grader/rubric-templates.ts +10 -0
- package/src/resources/v1/chat.ts +81 -1
- package/src/resources/v1/components.ts +45 -1
- package/src/resources/v1/embed/context.ts +96 -0
- package/src/resources/v1/embed/embed.ts +11 -0
- package/src/resources/v1/embed/index.ts +6 -0
- package/src/resources/v1/folders.ts +35 -0
- package/src/resources/v1/index.ts +18 -1
- package/src/resources/v1/materials/index.ts +2 -0
- package/src/resources/v1/materials/materials.ts +117 -0
- package/src/resources/v1/materials/upload.ts +74 -7
- package/src/resources/v1/pdf-generator/get.ts +80 -0
- package/src/resources/v1/pdf-generator/index.ts +10 -0
- package/src/resources/v1/pdf-generator/pdf-generator.ts +147 -0
- package/src/resources/v1/pdf-generator.ts +3 -0
- package/src/resources/v1/performance-insights/conversations.ts +238 -0
- package/src/resources/v1/performance-insights/index.ts +17 -0
- package/src/resources/v1/performance-insights/performance-insights.ts +214 -0
- package/src/resources/v1/performance-insights.ts +3 -0
- package/src/resources/v1/usage.ts +10 -0
- package/src/resources/v1/v1.ts +49 -2
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
import { APIResource } from "../../../core/resource.mjs";
|
|
3
|
+
import { toFile } from "../../../core/uploads.mjs";
|
|
3
4
|
import { multipartFormRequestOptions } from "../../../internal/uploads.mjs";
|
|
4
5
|
export class Upload extends APIResource {
|
|
5
6
|
/**
|
|
@@ -46,7 +47,7 @@ export class Upload extends APIResource {
|
|
|
46
47
|
* ```
|
|
47
48
|
*/
|
|
48
49
|
uploadFile(body, options) {
|
|
49
|
-
return this._client.post('/api/v1/materials/upload',
|
|
50
|
+
return this._client.post('/api/v1/materials/upload', multipartUploadRequestOptions(body, options, this._client));
|
|
50
51
|
}
|
|
51
52
|
/**
|
|
52
53
|
* Uploads a file and waits for processing to finish before returning. Useful for
|
|
@@ -62,7 +63,7 @@ export class Upload extends APIResource {
|
|
|
62
63
|
* ```
|
|
63
64
|
*/
|
|
64
65
|
uploadFileAndProcess(body, options) {
|
|
65
|
-
return this._client.post('/api/v1/materials/upload/file-and-process',
|
|
66
|
+
return this._client.post('/api/v1/materials/upload/file-and-process', multipartUploadRequestOptions(body, options, this._client));
|
|
66
67
|
}
|
|
67
68
|
/**
|
|
68
69
|
* Upload material from URL
|
|
@@ -96,4 +97,20 @@ export class Upload extends APIResource {
|
|
|
96
97
|
return this._client.post('/api/v1/materials/upload/url-and-process', { body, ...options });
|
|
97
98
|
}
|
|
98
99
|
}
|
|
100
|
+
async function multipartUploadRequestOptions(body, options, client) {
|
|
101
|
+
const { contentType, ...bodyWithoutContentType } = body;
|
|
102
|
+
const multipartBody = contentType ?
|
|
103
|
+
{ ...bodyWithoutContentType, file: await toUploadableWithContentType(body.file, contentType) }
|
|
104
|
+
: bodyWithoutContentType;
|
|
105
|
+
return multipartFormRequestOptions({ body: multipartBody, ...options }, client);
|
|
106
|
+
}
|
|
107
|
+
async function toUploadableWithContentType(file, contentType) {
|
|
108
|
+
const typedFile = await toFile(file, undefined, { type: contentType });
|
|
109
|
+
if (typedFile.type === contentType)
|
|
110
|
+
return typedFile;
|
|
111
|
+
return new File([typedFile], typedFile.name, {
|
|
112
|
+
type: contentType,
|
|
113
|
+
lastModified: typedFile.lastModified,
|
|
114
|
+
});
|
|
115
|
+
}
|
|
99
116
|
//# sourceMappingURL=upload.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"upload.mjs","sourceRoot":"","sources":["../../../src/resources/v1/materials/upload.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;
|
|
1
|
+
{"version":3,"file":"upload.mjs","sourceRoot":"","sources":["../../../src/resources/v1/materials/upload.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAGf,EAAE,MAAM,EAAmB;OAE3B,EAAE,2BAA2B,EAAE;AAEtC,MAAM,OAAO,MAAO,SAAQ,WAAW;IACrC;;;;;;;;;;;OAWG;IACH,cAAc,CACZ,IAAgC,EAChC,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,mCAAmC,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACtF,CAAC;IAED;;;;;;;;;;;;OAYG;IACH,eAAe,CACb,IAAiC,EACjC,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,wCAAwC,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC3F,CAAC;IAED;;;;;;;;;;;OAWG;IACH,UAAU,CACR,IAA4B,EAC5B,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CACtB,0BAA0B,EAC1B,6BAA6B,CAAC,IAAI,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,CAAC,CAC3D,CAAC;IACJ,CAAC;IAED;;;;;;;;;;;;OAYG;IACH,oBAAoB,CAClB,IAAsC,EACtC,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CACtB,2CAA2C,EAC3C,6BAA6B,CAAC,IAAI,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,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"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { APIResource } from "../../../core/resource.mjs";
|
|
2
|
+
export declare class Get extends APIResource {
|
|
3
|
+
}
|
|
4
|
+
export interface PdfResponse {
|
|
5
|
+
/**
|
|
6
|
+
* PDF presentation ID
|
|
7
|
+
*/
|
|
8
|
+
_id: string;
|
|
9
|
+
/**
|
|
10
|
+
* Creation timestamp
|
|
11
|
+
*/
|
|
12
|
+
createdAt: string;
|
|
13
|
+
/**
|
|
14
|
+
* Locale of the presentation
|
|
15
|
+
*/
|
|
16
|
+
locale: string;
|
|
17
|
+
/**
|
|
18
|
+
* Number of slides
|
|
19
|
+
*/
|
|
20
|
+
numberOfSlides: number;
|
|
21
|
+
/**
|
|
22
|
+
* Organization ID
|
|
23
|
+
*/
|
|
24
|
+
organizationId: string;
|
|
25
|
+
/**
|
|
26
|
+
* Topic of the presentation
|
|
27
|
+
*/
|
|
28
|
+
topic: string;
|
|
29
|
+
/**
|
|
30
|
+
* Transcript of each slide
|
|
31
|
+
*/
|
|
32
|
+
transcript: Array<PdfResponse.Transcript>;
|
|
33
|
+
/**
|
|
34
|
+
* Update timestamp
|
|
35
|
+
*/
|
|
36
|
+
updatedAt: string;
|
|
37
|
+
/**
|
|
38
|
+
* URL to the generated PDF on S3
|
|
39
|
+
*/
|
|
40
|
+
url: string;
|
|
41
|
+
/**
|
|
42
|
+
* URL to the generated PowerPoint (PPTX) on S3
|
|
43
|
+
*/
|
|
44
|
+
pptxUrl?: string;
|
|
45
|
+
/**
|
|
46
|
+
* User ID
|
|
47
|
+
*/
|
|
48
|
+
userId?: string;
|
|
49
|
+
}
|
|
50
|
+
export declare namespace PdfResponse {
|
|
51
|
+
interface Transcript {
|
|
52
|
+
/**
|
|
53
|
+
* Description of the slide content and OCR text
|
|
54
|
+
*/
|
|
55
|
+
descriptionOfPage: string;
|
|
56
|
+
/**
|
|
57
|
+
* Page number of the slide
|
|
58
|
+
*/
|
|
59
|
+
pageNum: number;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
export declare namespace Get {
|
|
63
|
+
export { type PdfResponse as PdfResponse };
|
|
64
|
+
}
|
|
65
|
+
//# sourceMappingURL=get.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get.d.mts","sourceRoot":"","sources":["../../../src/resources/v1/pdf-generator/get.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;AAEtB,qBAAa,GAAI,SAAQ,WAAW;CAAG;AAEvC,MAAM,WAAW,WAAW;IAC1B;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;IAEZ;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,cAAc,EAAE,MAAM,CAAC;IAEvB;;OAEG;IACH,cAAc,EAAE,MAAM,CAAC;IAEvB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,UAAU,EAAE,KAAK,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC;IAE1C;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;IAEZ;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,yBAAiB,WAAW,CAAC;IAC3B,UAAiB,UAAU;QACzB;;WAEG;QACH,iBAAiB,EAAE,MAAM,CAAC;QAE1B;;WAEG;QACH,OAAO,EAAE,MAAM,CAAC;KACjB;CACF;AAED,MAAM,CAAC,OAAO,WAAW,GAAG,CAAC;IAC3B,OAAO,EAAE,KAAK,WAAW,IAAI,WAAW,EAAE,CAAC;CAC5C"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { APIResource } from "../../../core/resource.js";
|
|
2
|
+
export declare class Get extends APIResource {
|
|
3
|
+
}
|
|
4
|
+
export interface PdfResponse {
|
|
5
|
+
/**
|
|
6
|
+
* PDF presentation ID
|
|
7
|
+
*/
|
|
8
|
+
_id: string;
|
|
9
|
+
/**
|
|
10
|
+
* Creation timestamp
|
|
11
|
+
*/
|
|
12
|
+
createdAt: string;
|
|
13
|
+
/**
|
|
14
|
+
* Locale of the presentation
|
|
15
|
+
*/
|
|
16
|
+
locale: string;
|
|
17
|
+
/**
|
|
18
|
+
* Number of slides
|
|
19
|
+
*/
|
|
20
|
+
numberOfSlides: number;
|
|
21
|
+
/**
|
|
22
|
+
* Organization ID
|
|
23
|
+
*/
|
|
24
|
+
organizationId: string;
|
|
25
|
+
/**
|
|
26
|
+
* Topic of the presentation
|
|
27
|
+
*/
|
|
28
|
+
topic: string;
|
|
29
|
+
/**
|
|
30
|
+
* Transcript of each slide
|
|
31
|
+
*/
|
|
32
|
+
transcript: Array<PdfResponse.Transcript>;
|
|
33
|
+
/**
|
|
34
|
+
* Update timestamp
|
|
35
|
+
*/
|
|
36
|
+
updatedAt: string;
|
|
37
|
+
/**
|
|
38
|
+
* URL to the generated PDF on S3
|
|
39
|
+
*/
|
|
40
|
+
url: string;
|
|
41
|
+
/**
|
|
42
|
+
* URL to the generated PowerPoint (PPTX) on S3
|
|
43
|
+
*/
|
|
44
|
+
pptxUrl?: string;
|
|
45
|
+
/**
|
|
46
|
+
* User ID
|
|
47
|
+
*/
|
|
48
|
+
userId?: string;
|
|
49
|
+
}
|
|
50
|
+
export declare namespace PdfResponse {
|
|
51
|
+
interface Transcript {
|
|
52
|
+
/**
|
|
53
|
+
* Description of the slide content and OCR text
|
|
54
|
+
*/
|
|
55
|
+
descriptionOfPage: string;
|
|
56
|
+
/**
|
|
57
|
+
* Page number of the slide
|
|
58
|
+
*/
|
|
59
|
+
pageNum: number;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
export declare namespace Get {
|
|
63
|
+
export { type PdfResponse as PdfResponse };
|
|
64
|
+
}
|
|
65
|
+
//# sourceMappingURL=get.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get.d.ts","sourceRoot":"","sources":["../../../src/resources/v1/pdf-generator/get.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;AAEtB,qBAAa,GAAI,SAAQ,WAAW;CAAG;AAEvC,MAAM,WAAW,WAAW;IAC1B;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;IAEZ;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,cAAc,EAAE,MAAM,CAAC;IAEvB;;OAEG;IACH,cAAc,EAAE,MAAM,CAAC;IAEvB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,UAAU,EAAE,KAAK,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC;IAE1C;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;IAEZ;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,yBAAiB,WAAW,CAAC;IAC3B,UAAiB,UAAU;QACzB;;WAEG;QACH,iBAAiB,EAAE,MAAM,CAAC;QAE1B;;WAEG;QACH,OAAO,EAAE,MAAM,CAAC;KACjB;CACF;AAED,MAAM,CAAC,OAAO,WAAW,GAAG,CAAC;IAC3B,OAAO,EAAE,KAAK,WAAW,IAAI,WAAW,EAAE,CAAC;CAC5C"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.Get = void 0;
|
|
5
|
+
const resource_1 = require("../../../core/resource.js");
|
|
6
|
+
class Get extends resource_1.APIResource {
|
|
7
|
+
}
|
|
8
|
+
exports.Get = Get;
|
|
9
|
+
//# sourceMappingURL=get.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get.js","sourceRoot":"","sources":["../../../src/resources/v1/pdf-generator/get.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,wDAAqD;AAErD,MAAa,GAAI,SAAQ,sBAAW;CAAG;AAAvC,kBAAuC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get.mjs","sourceRoot":"","sources":["../../../src/resources/v1/pdf-generator/get.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;AAEtB,MAAM,OAAO,GAAI,SAAQ,WAAW;CAAG"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../../src/resources/v1/pdf-generator/index.ts"],"names":[],"mappings":"OAEO,EAAE,GAAG,EAAE,KAAK,WAAW,EAAE;OACzB,EACL,YAAY,EACZ,KAAK,0BAA0B,EAC/B,KAAK,0BAA0B,EAC/B,KAAK,0BAA0B,EAC/B,KAAK,wBAAwB,GAC9B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/resources/v1/pdf-generator/index.ts"],"names":[],"mappings":"OAEO,EAAE,GAAG,EAAE,KAAK,WAAW,EAAE;OACzB,EACL,YAAY,EACZ,KAAK,0BAA0B,EAC/B,KAAK,0BAA0B,EAC/B,KAAK,0BAA0B,EAC/B,KAAK,wBAAwB,GAC9B"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.PdfGenerator = exports.Get = void 0;
|
|
5
|
+
var get_1 = require("./get.js");
|
|
6
|
+
Object.defineProperty(exports, "Get", { enumerable: true, get: function () { return get_1.Get; } });
|
|
7
|
+
var pdf_generator_1 = require("./pdf-generator.js");
|
|
8
|
+
Object.defineProperty(exports, "PdfGenerator", { enumerable: true, get: function () { return pdf_generator_1.PdfGenerator; } });
|
|
9
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/resources/v1/pdf-generator/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,gCAA8C;AAArC,0FAAA,GAAG,OAAA;AACZ,oDAMyB;AALvB,6GAAA,YAAY,OAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../../src/resources/v1/pdf-generator/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,GAAG,EAAoB;OACzB,EACL,YAAY,GAKb"}
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import { APIResource } from "../../../core/resource.mjs";
|
|
2
|
+
import * as GetAPI from "./get.mjs";
|
|
3
|
+
import { Get, PdfResponse } from "./get.mjs";
|
|
4
|
+
import { APIPromise } from "../../../core/api-promise.mjs";
|
|
5
|
+
import { RequestOptions } from "../../../internal/request-options.mjs";
|
|
6
|
+
export declare class PdfGenerator extends APIResource {
|
|
7
|
+
get: GetAPI.Get;
|
|
8
|
+
/**
|
|
9
|
+
* Generate a new PDF presentation
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```ts
|
|
13
|
+
* const pdfGenerator = await client.v1.pdfGenerator.create({
|
|
14
|
+
* locale: 'locale',
|
|
15
|
+
* numberOfSlides: 1,
|
|
16
|
+
* topic: 'topic',
|
|
17
|
+
* });
|
|
18
|
+
* ```
|
|
19
|
+
*/
|
|
20
|
+
create(body: PdfGeneratorCreateParams, options?: RequestOptions): APIPromise<PdfGeneratorCreateResponse>;
|
|
21
|
+
/**
|
|
22
|
+
* Delete a PDF presentation by ID
|
|
23
|
+
*
|
|
24
|
+
* @example
|
|
25
|
+
* ```ts
|
|
26
|
+
* const pdfGenerator = await client.v1.pdfGenerator.delete(
|
|
27
|
+
* 'id',
|
|
28
|
+
* );
|
|
29
|
+
* ```
|
|
30
|
+
*/
|
|
31
|
+
delete(id: string, options?: RequestOptions): APIPromise<PdfGeneratorDeleteResponse>;
|
|
32
|
+
/**
|
|
33
|
+
* Get all PDF presentations
|
|
34
|
+
*
|
|
35
|
+
* @example
|
|
36
|
+
* ```ts
|
|
37
|
+
* const pdfResponses = await client.v1.pdfGenerator.getAll();
|
|
38
|
+
* ```
|
|
39
|
+
*/
|
|
40
|
+
getAll(options?: RequestOptions): APIPromise<PdfGeneratorGetAllResponse>;
|
|
41
|
+
/**
|
|
42
|
+
* Get a PDF presentation by ID
|
|
43
|
+
*
|
|
44
|
+
* @example
|
|
45
|
+
* ```ts
|
|
46
|
+
* const pdfResponse = await client.v1.pdfGenerator.getByID(
|
|
47
|
+
* 'id',
|
|
48
|
+
* );
|
|
49
|
+
* ```
|
|
50
|
+
*/
|
|
51
|
+
getByID(id: string, options?: RequestOptions): APIPromise<GetAPI.PdfResponse>;
|
|
52
|
+
}
|
|
53
|
+
export interface PdfGeneratorCreateResponse {
|
|
54
|
+
presentation?: GetAPI.PdfResponse;
|
|
55
|
+
success?: boolean;
|
|
56
|
+
}
|
|
57
|
+
export interface PdfGeneratorDeleteResponse {
|
|
58
|
+
message?: string;
|
|
59
|
+
success?: boolean;
|
|
60
|
+
}
|
|
61
|
+
export type PdfGeneratorGetAllResponse = Array<GetAPI.PdfResponse>;
|
|
62
|
+
export interface PdfGeneratorCreateParams {
|
|
63
|
+
/**
|
|
64
|
+
* Locale/language for the presentation (e.g., en-US, es-ES, fr-FR)
|
|
65
|
+
*/
|
|
66
|
+
locale: string;
|
|
67
|
+
/**
|
|
68
|
+
* Number of slides to generate
|
|
69
|
+
*/
|
|
70
|
+
numberOfSlides: number;
|
|
71
|
+
/**
|
|
72
|
+
* The topic for the PDF presentation
|
|
73
|
+
*/
|
|
74
|
+
topic: string;
|
|
75
|
+
/**
|
|
76
|
+
* Custom images to use (required when imageMode is "provide-own")
|
|
77
|
+
*/
|
|
78
|
+
customImages?: Array<PdfGeneratorCreateParams.CustomImage>;
|
|
79
|
+
/**
|
|
80
|
+
* Image handling mode: search (auto-search), provide-own (use custom images), none
|
|
81
|
+
* (no images, use icons)
|
|
82
|
+
*/
|
|
83
|
+
imageMode?: 'search' | 'provide-own' | 'none';
|
|
84
|
+
/**
|
|
85
|
+
* Custom logo URL to use (optional, falls back to default StudyFetch logo)
|
|
86
|
+
*/
|
|
87
|
+
logoUrl?: string;
|
|
88
|
+
}
|
|
89
|
+
export declare namespace PdfGeneratorCreateParams {
|
|
90
|
+
interface CustomImage {
|
|
91
|
+
/**
|
|
92
|
+
* Description of what this image shows
|
|
93
|
+
*/
|
|
94
|
+
description: string;
|
|
95
|
+
/**
|
|
96
|
+
* Base64-encoded image data (provide either url or base64)
|
|
97
|
+
*/
|
|
98
|
+
base64?: string;
|
|
99
|
+
/**
|
|
100
|
+
* Image URL to download and use (provide either url or base64)
|
|
101
|
+
*/
|
|
102
|
+
url?: string;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
export declare namespace PdfGenerator {
|
|
106
|
+
export { type PdfGeneratorCreateResponse as PdfGeneratorCreateResponse, type PdfGeneratorDeleteResponse as PdfGeneratorDeleteResponse, type PdfGeneratorGetAllResponse as PdfGeneratorGetAllResponse, type PdfGeneratorCreateParams as PdfGeneratorCreateParams, };
|
|
107
|
+
export { Get as Get, type PdfResponse as PdfResponse };
|
|
108
|
+
}
|
|
109
|
+
//# sourceMappingURL=pdf-generator.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pdf-generator.d.mts","sourceRoot":"","sources":["../../../src/resources/v1/pdf-generator/pdf-generator.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,MAAM;OACX,EAAE,GAA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;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,yBAAiB,wBAAwB,CAAC;IACxC,UAAiB,WAAW;QAC1B;;WAEG;QACH,WAAW,EAAE,MAAM,CAAC;QAEpB;;WAEG;QACH,MAAM,CAAC,EAAE,MAAM,CAAC;QAEhB;;WAEG;QACH,GAAG,CAAC,EAAE,MAAM,CAAC;KACd;CACF;AAID,MAAM,CAAC,OAAO,WAAW,YAAY,CAAC;IACpC,OAAO,EACL,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,wBAAwB,IAAI,wBAAwB,GAC1D,CAAC;IAEF,OAAO,EAAE,GAAG,IAAI,GAAG,EAAE,KAAK,WAAW,IAAI,WAAW,EAAE,CAAC;CACxD"}
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import { APIResource } from "../../../core/resource.js";
|
|
2
|
+
import * as GetAPI from "./get.js";
|
|
3
|
+
import { Get, PdfResponse } from "./get.js";
|
|
4
|
+
import { APIPromise } from "../../../core/api-promise.js";
|
|
5
|
+
import { RequestOptions } from "../../../internal/request-options.js";
|
|
6
|
+
export declare class PdfGenerator extends APIResource {
|
|
7
|
+
get: GetAPI.Get;
|
|
8
|
+
/**
|
|
9
|
+
* Generate a new PDF presentation
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```ts
|
|
13
|
+
* const pdfGenerator = await client.v1.pdfGenerator.create({
|
|
14
|
+
* locale: 'locale',
|
|
15
|
+
* numberOfSlides: 1,
|
|
16
|
+
* topic: 'topic',
|
|
17
|
+
* });
|
|
18
|
+
* ```
|
|
19
|
+
*/
|
|
20
|
+
create(body: PdfGeneratorCreateParams, options?: RequestOptions): APIPromise<PdfGeneratorCreateResponse>;
|
|
21
|
+
/**
|
|
22
|
+
* Delete a PDF presentation by ID
|
|
23
|
+
*
|
|
24
|
+
* @example
|
|
25
|
+
* ```ts
|
|
26
|
+
* const pdfGenerator = await client.v1.pdfGenerator.delete(
|
|
27
|
+
* 'id',
|
|
28
|
+
* );
|
|
29
|
+
* ```
|
|
30
|
+
*/
|
|
31
|
+
delete(id: string, options?: RequestOptions): APIPromise<PdfGeneratorDeleteResponse>;
|
|
32
|
+
/**
|
|
33
|
+
* Get all PDF presentations
|
|
34
|
+
*
|
|
35
|
+
* @example
|
|
36
|
+
* ```ts
|
|
37
|
+
* const pdfResponses = await client.v1.pdfGenerator.getAll();
|
|
38
|
+
* ```
|
|
39
|
+
*/
|
|
40
|
+
getAll(options?: RequestOptions): APIPromise<PdfGeneratorGetAllResponse>;
|
|
41
|
+
/**
|
|
42
|
+
* Get a PDF presentation by ID
|
|
43
|
+
*
|
|
44
|
+
* @example
|
|
45
|
+
* ```ts
|
|
46
|
+
* const pdfResponse = await client.v1.pdfGenerator.getByID(
|
|
47
|
+
* 'id',
|
|
48
|
+
* );
|
|
49
|
+
* ```
|
|
50
|
+
*/
|
|
51
|
+
getByID(id: string, options?: RequestOptions): APIPromise<GetAPI.PdfResponse>;
|
|
52
|
+
}
|
|
53
|
+
export interface PdfGeneratorCreateResponse {
|
|
54
|
+
presentation?: GetAPI.PdfResponse;
|
|
55
|
+
success?: boolean;
|
|
56
|
+
}
|
|
57
|
+
export interface PdfGeneratorDeleteResponse {
|
|
58
|
+
message?: string;
|
|
59
|
+
success?: boolean;
|
|
60
|
+
}
|
|
61
|
+
export type PdfGeneratorGetAllResponse = Array<GetAPI.PdfResponse>;
|
|
62
|
+
export interface PdfGeneratorCreateParams {
|
|
63
|
+
/**
|
|
64
|
+
* Locale/language for the presentation (e.g., en-US, es-ES, fr-FR)
|
|
65
|
+
*/
|
|
66
|
+
locale: string;
|
|
67
|
+
/**
|
|
68
|
+
* Number of slides to generate
|
|
69
|
+
*/
|
|
70
|
+
numberOfSlides: number;
|
|
71
|
+
/**
|
|
72
|
+
* The topic for the PDF presentation
|
|
73
|
+
*/
|
|
74
|
+
topic: string;
|
|
75
|
+
/**
|
|
76
|
+
* Custom images to use (required when imageMode is "provide-own")
|
|
77
|
+
*/
|
|
78
|
+
customImages?: Array<PdfGeneratorCreateParams.CustomImage>;
|
|
79
|
+
/**
|
|
80
|
+
* Image handling mode: search (auto-search), provide-own (use custom images), none
|
|
81
|
+
* (no images, use icons)
|
|
82
|
+
*/
|
|
83
|
+
imageMode?: 'search' | 'provide-own' | 'none';
|
|
84
|
+
/**
|
|
85
|
+
* Custom logo URL to use (optional, falls back to default StudyFetch logo)
|
|
86
|
+
*/
|
|
87
|
+
logoUrl?: string;
|
|
88
|
+
}
|
|
89
|
+
export declare namespace PdfGeneratorCreateParams {
|
|
90
|
+
interface CustomImage {
|
|
91
|
+
/**
|
|
92
|
+
* Description of what this image shows
|
|
93
|
+
*/
|
|
94
|
+
description: string;
|
|
95
|
+
/**
|
|
96
|
+
* Base64-encoded image data (provide either url or base64)
|
|
97
|
+
*/
|
|
98
|
+
base64?: string;
|
|
99
|
+
/**
|
|
100
|
+
* Image URL to download and use (provide either url or base64)
|
|
101
|
+
*/
|
|
102
|
+
url?: string;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
export declare namespace PdfGenerator {
|
|
106
|
+
export { type PdfGeneratorCreateResponse as PdfGeneratorCreateResponse, type PdfGeneratorDeleteResponse as PdfGeneratorDeleteResponse, type PdfGeneratorGetAllResponse as PdfGeneratorGetAllResponse, type PdfGeneratorCreateParams as PdfGeneratorCreateParams, };
|
|
107
|
+
export { Get as Get, type PdfResponse as PdfResponse };
|
|
108
|
+
}
|
|
109
|
+
//# sourceMappingURL=pdf-generator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pdf-generator.d.ts","sourceRoot":"","sources":["../../../src/resources/v1/pdf-generator/pdf-generator.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,MAAM;OACX,EAAE,GAAG,EAAE,WAAW,EAAE;OACpB,EAAE,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AM,CAAC;CAClB;AAED,yBAAiB,wBAAwB,CAAC;IACxC,UAAiB,WAAW;QAC1B;;WAEG;QACH,WAAW,EAAE,MAAM,CAAC;QAEpB;;WAEG;QACH,MAAM,CAAC,EAAE,MAAM,CAAC;QAEhB;;WAEG;QACH,GAAG,CAAC,EAAE,MAAM,CAAC;KACd;CACF;AAID,MAAM,CAAC,OAAO,WAAW,YAAY,CAAC;IACpC,OAAO,EACL,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,wBAAwB,IAAI,wBAAwB,GAC1D,CAAC;IAEF,OAAO,EAAE,GAAG,IAAI,GAAG,EAAE,KAAK,WAAW,IAAI,WAAW,EAAE,CAAC;CACxD"}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.PdfGenerator = void 0;
|
|
5
|
+
const tslib_1 = require("../../../internal/tslib.js");
|
|
6
|
+
const resource_1 = require("../../../core/resource.js");
|
|
7
|
+
const GetAPI = tslib_1.__importStar(require("./get.js"));
|
|
8
|
+
const get_1 = require("./get.js");
|
|
9
|
+
const path_1 = require("../../../internal/utils/path.js");
|
|
10
|
+
class PdfGenerator extends resource_1.APIResource {
|
|
11
|
+
constructor() {
|
|
12
|
+
super(...arguments);
|
|
13
|
+
this.get = new GetAPI.Get(this._client);
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Generate a new PDF presentation
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* ```ts
|
|
20
|
+
* const pdfGenerator = await client.v1.pdfGenerator.create({
|
|
21
|
+
* locale: 'locale',
|
|
22
|
+
* numberOfSlides: 1,
|
|
23
|
+
* topic: 'topic',
|
|
24
|
+
* });
|
|
25
|
+
* ```
|
|
26
|
+
*/
|
|
27
|
+
create(body, options) {
|
|
28
|
+
return this._client.post('/api/v1/pdf-generator/create', { body, ...options });
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Delete a PDF presentation by ID
|
|
32
|
+
*
|
|
33
|
+
* @example
|
|
34
|
+
* ```ts
|
|
35
|
+
* const pdfGenerator = await client.v1.pdfGenerator.delete(
|
|
36
|
+
* 'id',
|
|
37
|
+
* );
|
|
38
|
+
* ```
|
|
39
|
+
*/
|
|
40
|
+
delete(id, options) {
|
|
41
|
+
return this._client.delete((0, path_1.path) `/api/v1/pdf-generator/delete/${id}`, options);
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Get all PDF presentations
|
|
45
|
+
*
|
|
46
|
+
* @example
|
|
47
|
+
* ```ts
|
|
48
|
+
* const pdfResponses = await client.v1.pdfGenerator.getAll();
|
|
49
|
+
* ```
|
|
50
|
+
*/
|
|
51
|
+
getAll(options) {
|
|
52
|
+
return this._client.get('/api/v1/pdf-generator/get', options);
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Get a PDF presentation by ID
|
|
56
|
+
*
|
|
57
|
+
* @example
|
|
58
|
+
* ```ts
|
|
59
|
+
* const pdfResponse = await client.v1.pdfGenerator.getByID(
|
|
60
|
+
* 'id',
|
|
61
|
+
* );
|
|
62
|
+
* ```
|
|
63
|
+
*/
|
|
64
|
+
getByID(id, options) {
|
|
65
|
+
return this._client.get((0, path_1.path) `/api/v1/pdf-generator/get/${id}`, options);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
exports.PdfGenerator = PdfGenerator;
|
|
69
|
+
PdfGenerator.Get = get_1.Get;
|
|
70
|
+
//# sourceMappingURL=pdf-generator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pdf-generator.js","sourceRoot":"","sources":["../../../src/resources/v1/pdf-generator/pdf-generator.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;AAEtF,wDAAqD;AACrD,yDAAgC;AAChC,kCAAyC;AAGzC,0DAAoD;AAEpD,MAAa,YAAa,SAAQ,sBAAW;IAA7C;;QACE,QAAG,GAAe,IAAI,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAyDjD,CAAC;IAvDC;;;;;;;;;;;OAWG;IACH,MAAM,CAAC,IAA8B,EAAE,OAAwB;QAC7D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,8BAA8B,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACjF,CAAC;IAED;;;;;;;;;OASG;IACH,MAAM,CAAC,EAAU,EAAE,OAAwB;QACzC,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAA,WAAI,EAAA,gCAAgC,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IAChF,CAAC;IAED;;;;;;;OAOG;IACH,MAAM,CAAC,OAAwB;QAC7B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,2BAA2B,EAAE,OAAO,CAAC,CAAC;IAChE,CAAC;IAED;;;;;;;;;OASG;IACH,OAAO,CAAC,EAAU,EAAE,OAAwB;QAC1C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,6BAA6B,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IAC1E,CAAC;CACF;AA1DD,oCA0DC;AAoED,YAAY,CAAC,GAAG,GAAG,SAAG,CAAC"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
import { APIResource } from "../../../core/resource.mjs";
|
|
3
|
+
import * as GetAPI from "./get.mjs";
|
|
4
|
+
import { Get } from "./get.mjs";
|
|
5
|
+
import { path } from "../../../internal/utils/path.mjs";
|
|
6
|
+
export class PdfGenerator extends APIResource {
|
|
7
|
+
constructor() {
|
|
8
|
+
super(...arguments);
|
|
9
|
+
this.get = new GetAPI.Get(this._client);
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Generate a new PDF presentation
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```ts
|
|
16
|
+
* const pdfGenerator = await client.v1.pdfGenerator.create({
|
|
17
|
+
* locale: 'locale',
|
|
18
|
+
* numberOfSlides: 1,
|
|
19
|
+
* topic: 'topic',
|
|
20
|
+
* });
|
|
21
|
+
* ```
|
|
22
|
+
*/
|
|
23
|
+
create(body, options) {
|
|
24
|
+
return this._client.post('/api/v1/pdf-generator/create', { body, ...options });
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Delete a PDF presentation by ID
|
|
28
|
+
*
|
|
29
|
+
* @example
|
|
30
|
+
* ```ts
|
|
31
|
+
* const pdfGenerator = await client.v1.pdfGenerator.delete(
|
|
32
|
+
* 'id',
|
|
33
|
+
* );
|
|
34
|
+
* ```
|
|
35
|
+
*/
|
|
36
|
+
delete(id, options) {
|
|
37
|
+
return this._client.delete(path `/api/v1/pdf-generator/delete/${id}`, options);
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Get all PDF presentations
|
|
41
|
+
*
|
|
42
|
+
* @example
|
|
43
|
+
* ```ts
|
|
44
|
+
* const pdfResponses = await client.v1.pdfGenerator.getAll();
|
|
45
|
+
* ```
|
|
46
|
+
*/
|
|
47
|
+
getAll(options) {
|
|
48
|
+
return this._client.get('/api/v1/pdf-generator/get', options);
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Get a PDF presentation by ID
|
|
52
|
+
*
|
|
53
|
+
* @example
|
|
54
|
+
* ```ts
|
|
55
|
+
* const pdfResponse = await client.v1.pdfGenerator.getByID(
|
|
56
|
+
* 'id',
|
|
57
|
+
* );
|
|
58
|
+
* ```
|
|
59
|
+
*/
|
|
60
|
+
getByID(id, options) {
|
|
61
|
+
return this._client.get(path `/api/v1/pdf-generator/get/${id}`, options);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
PdfGenerator.Get = Get;
|
|
65
|
+
//# sourceMappingURL=pdf-generator.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pdf-generator.mjs","sourceRoot":"","sources":["../../../src/resources/v1/pdf-generator/pdf-generator.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OACf,KAAK,MAAM;OACX,EAAE,GAAG,EAAe;OAGpB,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,YAAa,SAAQ,WAAW;IAA7C;;QACE,QAAG,GAAe,IAAI,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAyDjD,CAAC;IAvDC;;;;;;;;;;;OAWG;IACH,MAAM,CAAC,IAA8B,EAAE,OAAwB;QAC7D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,8BAA8B,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACjF,CAAC;IAED;;;;;;;;;OASG;IACH,MAAM,CAAC,EAAU,EAAE,OAAwB;QACzC,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAA,gCAAgC,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IAChF,CAAC;IAED;;;;;;;OAOG;IACH,MAAM,CAAC,OAAwB;QAC7B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,2BAA2B,EAAE,OAAO,CAAC,CAAC;IAChE,CAAC;IAED;;;;;;;;;OASG;IACH,OAAO,CAAC,EAAU,EAAE,OAAwB;QAC1C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,6BAA6B,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IAC1E,CAAC;CACF;AAoED,YAAY,CAAC,GAAG,GAAG,GAAG,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pdf-generator.d.mts","sourceRoot":"","sources":["../../src/resources/v1/pdf-generator.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pdf-generator.d.ts","sourceRoot":"","sources":["../../src/resources/v1/pdf-generator.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
const tslib_1 = require("../../internal/tslib.js");
|
|
5
|
+
tslib_1.__exportStar(require("./pdf-generator/index.js"), exports);
|
|
6
|
+
//# sourceMappingURL=pdf-generator.js.map
|