Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .codegen.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{ "engineHash": "5a7add6", "specHash": "d028758", "version": "4.10.0" }
{ "engineHash": "2e559a0", "specHash": "d028758", "version": "4.10.0" }
2 changes: 1 addition & 1 deletion docs/sdk-gen/notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ See the endpoint docs at

<!-- sample post_notes_convert_v2026.0 -->
```ts
await downscopedClient.notes.createNoteConvertV2026R0({ content: markdownContent, contentFormat: "markdown" as NotesConvertRequestBodyV2026R0ContentFormatField, parent: new FolderReferenceV2026R0({ id: "0" }), name: noteName } satisfies NotesConvertRequestBodyV2026R0Input)
await client.notes.createNoteConvertV2026R0({ content: markdownContent, contentFormat: "markdown" as NotesConvertRequestBodyV2026R0ContentFormatField, parent: new FolderReferenceV2026R0({ id: "0" }), name: noteName } satisfies NotesConvertRequestBodyV2026R0Input)
```

### Arguments
Expand Down
13 changes: 1 addition & 12 deletions tests/sdk-gen/notes.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import { deserializeFolderReferenceV2026R0 } from '@/schemas/v2026R0/folderRefer
import { serializeFileFull } from '@/schemas/fileFull';
import { deserializeFileFull } from '@/schemas/fileFull';
import { NotesConvertRequestBodyV2026R0Input } from '@/schemas/v2026R0/notesConvertRequestBodyV2026R0';
import { AccessToken } from '@/schemas/accessToken';
import { NotesConvertResponseV2026R0 } from '@/schemas/v2026R0/notesConvertResponseV2026R0';
import { NotesConvertRequestBodyV2026R0 } from '@/schemas/v2026R0/notesConvertRequestBodyV2026R0';
import { NotesConvertRequestBodyV2026R0ContentFormatField } from '@/schemas/v2026R0/notesConvertRequestBodyV2026R0';
Expand All @@ -18,7 +17,6 @@ import { FileFull } from '@/schemas/fileFull';
import { getUuid } from '@/internal/utils';
import { getEnvVar } from '@/internal/utils';
import { BoxClient } from '@/client';
import { BoxDeveloperTokenAuth } from '@/box/developerTokenAuth';
import { getDefaultClientWithUserSubject } from './commons';
import { toString } from '@/internal/utils';
import { sdToJson } from '@/serialization/json';
Expand All @@ -35,17 +33,8 @@ export const client: BoxClient = getDefaultClientWithUserSubject(
test('testConvertMarkdownToBoxNote', async function testConvertMarkdownToBoxNote(): Promise<any> {
const noteName: string = getUuid();
const markdownContent: string = '# Heading\\n\\nSome text';
const downscopedToken: AccessToken = await client.auth.downscopeToken(
['item_upload'],
void 0,
void 0,
void 0
);
const downscopedClient: BoxClient = new BoxClient({
auth: new BoxDeveloperTokenAuth({ token: downscopedToken.accessToken! }),
});
const response: NotesConvertResponseV2026R0 =
await downscopedClient.notes.createNoteConvertV2026R0({
await client.notes.createNoteConvertV2026R0({
content: markdownContent,
contentFormat:
'markdown' as NotesConvertRequestBodyV2026R0ContentFormatField,
Expand Down
Loading