Skip to content
Merged
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": "74a3b04", "specHash": "fc01415", "version": "1.1.0" }
{ "engineHash": "62a25a4", "specHash": "e95d6fa", "version": "1.1.0" }
112 changes: 56 additions & 56 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion src/test/collaborationAllowlistEntries.generated.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import { CollaborationAllowlistEntry } from '../schemas/collaborationAllowlistEn
import { CreateCollaborationWhitelistEntryRequestBody } from '../managers/collaborationAllowlistEntries.generated.js';
import { CreateCollaborationWhitelistEntryRequestBodyDirectionField } from '../managers/collaborationAllowlistEntries.generated.js';
import { getDefaultClient } from './commons.generated.js';
import { getUuid } from '../internal/utils.js';
import { toString } from '../internal/utils.js';
import { sdToJson } from '../serialization/json.js';
import { SerializedData } from '../serialization/json.js';
Expand All @@ -28,7 +29,7 @@ test('testCollaborationAllowlistEntries', async function testCollaborationAllowl
if (!(allowlist.entries!.length >= 0)) {
throw new Error('Assertion failed');
}
const domain: string = 'example.com';
const domain: string = ''.concat(getUuid(), 'example.com') as string;
const newEntry: CollaborationAllowlistEntry =
await client.collaborationAllowlistEntries.createCollaborationWhitelistEntry(
{
Expand Down
19 changes: 13 additions & 6 deletions src/test/fileMetadata.generated.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ test('testGlobalFileMetadata', async function testGlobalFileMetadata(): Promise<
'global' as GetFileMetadataByIdScope,
'properties'
);
if (!(receivedMetadata.extraData!.abc == 'xyz')) {
if (!((toString(receivedMetadata.extraData!.abc) as string) == 'xyz')) {
throw new Error('Assertion failed');
}
const newValue: string = 'bar';
Expand All @@ -107,7 +107,9 @@ test('testGlobalFileMetadata', async function testGlobalFileMetadata(): Promise<
'global' as GetFileMetadataByIdScope,
'properties'
);
if (!(receivedUpdatedMetadata.extraData!.abc == newValue)) {
if (
!((toString(receivedUpdatedMetadata.extraData!.abc) as string) == newValue)
) {
throw new Error('Assertion failed');
}
await client.fileMetadata.deleteFileMetadataById(
Expand Down Expand Up @@ -194,16 +196,21 @@ test('testEnterpriseFileMetadata', async function testEnterpriseFileMetadata():
if (!((toString(createdMetadata.template) as string) == templateKey)) {
throw new Error('Assertion failed');
}
if (!(createdMetadata.extraData!.name == 'John')) {
if (!((toString(createdMetadata.extraData!.name) as string) == 'John')) {
throw new Error('Assertion failed');
}
if (!(createdMetadata.extraData!.age == 23)) {
if (!((toString(createdMetadata.extraData!.age) as string) == '23')) {
throw new Error('Assertion failed');
}
if (!(createdMetadata.extraData!.birthDate == '2001-01-03T02:20:50.520Z')) {
if (
!(
(toString(createdMetadata.extraData!.birthDate) as string) ==
'2001-01-03T02:20:50.520Z'
)
) {
throw new Error('Assertion failed');
}
if (!(createdMetadata.extraData!.countryCode == 'US')) {
if (!((toString(createdMetadata.extraData!.countryCode) as string) == 'US')) {
throw new Error('Assertion failed');
}
const sports: readonly string[] = createdMetadata.extraData!.sports;
Expand Down
19 changes: 13 additions & 6 deletions src/test/folderMetadata.generated.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ test('testGlobalFolderMetadata', async function testGlobalFolderMetadata(): Prom
'global' as GetFolderMetadataByIdScope,
'properties'
);
if (!(receivedMetadata.extraData!.abc == 'xyz')) {
if (!((toString(receivedMetadata.extraData!.abc) as string) == 'xyz')) {
throw new Error('Assertion failed');
}
const newValue: string = 'bar';
Expand All @@ -108,7 +108,9 @@ test('testGlobalFolderMetadata', async function testGlobalFolderMetadata(): Prom
'global' as GetFolderMetadataByIdScope,
'properties'
);
if (!(receivedUpdatedMetadata.extraData!.abc == newValue)) {
if (
!((toString(receivedUpdatedMetadata.extraData!.abc) as string) == newValue)
) {
throw new Error('Assertion failed');
}
await client.folderMetadata.deleteFolderMetadataById(
Expand Down Expand Up @@ -196,16 +198,21 @@ test('testEnterpriseFolderMetadata', async function testEnterpriseFolderMetadata
if (!((toString(createdMetadata.template) as string) == templateKey)) {
throw new Error('Assertion failed');
}
if (!(createdMetadata.extraData!.name == 'John')) {
if (!((toString(createdMetadata.extraData!.name) as string) == 'John')) {
throw new Error('Assertion failed');
}
if (!(createdMetadata.extraData!.age == 23)) {
if (!((toString(createdMetadata.extraData!.age) as string) == '23')) {
throw new Error('Assertion failed');
}
if (!(createdMetadata.extraData!.birthDate == '2001-01-03T02:20:50.520Z')) {
if (
!(
(toString(createdMetadata.extraData!.birthDate) as string) ==
'2001-01-03T02:20:50.520Z'
)
) {
throw new Error('Assertion failed');
}
if (!(createdMetadata.extraData!.countryCode == 'US')) {
if (!((toString(createdMetadata.extraData!.countryCode) as string) == 'US')) {
throw new Error('Assertion failed');
}
const sports: readonly string[] = createdMetadata.extraData!.sports;
Expand Down
5 changes: 1 addition & 4 deletions src/test/metadataCascadePolicies.generated.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -131,14 +131,11 @@ test('testMetadataCascadePolicies', async function testMetadataCascadePolicies()
} satisfies ApplyMetadataCascadePolicyRequestBody
);
}).rejects.toThrow();
const data: {
readonly [key: string]: string;
} = { ['testName']: 'xyz' };
await client.folderMetadata.createFolderMetadataById(
folder.id,
'enterprise' as CreateFolderMetadataByIdScope,
templateKey,
data
{ ['testName']: 'xyz' }
);
await client.metadataCascadePolicies.applyMetadataCascadePolicy(
cascadePolicyId,
Expand Down