box-node-sdk 10.0.1 → 10.1.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/README.md +105 -69
- package/lib/box/errors.d.ts.map +1 -1
- package/lib/box/errors.js +2 -0
- package/lib/box/errors.js.map +1 -1
- package/lib/bundle.js +1725 -25
- package/lib/bundle.js.map +1 -1
- package/lib/client.d.ts +3 -1
- package/lib/client.d.ts.map +1 -1
- package/lib/client.js +5 -0
- package/lib/client.js.map +1 -1
- package/lib/managers/archives.d.ts +60 -1
- package/lib/managers/archives.d.ts.map +1 -1
- package/lib/managers/archives.js +120 -3
- package/lib/managers/archives.js.map +1 -1
- package/lib/managers/enterpriseConfigurations.d.ts +60 -0
- package/lib/managers/enterpriseConfigurations.d.ts.map +1 -0
- package/lib/managers/enterpriseConfigurations.js +95 -0
- package/lib/managers/enterpriseConfigurations.js.map +1 -0
- package/lib/managers/index.d.ts +1 -0
- package/lib/managers/index.d.ts.map +1 -1
- package/lib/managers/index.js +1 -0
- package/lib/managers/index.js.map +1 -1
- package/lib/managers/users.d.ts +5 -5
- package/lib/managers/users.d.ts.map +1 -1
- package/lib/managers/users.js +3 -3
- package/lib/networking/boxNetworkClient.d.ts.map +1 -1
- package/lib/networking/boxNetworkClient.js +10 -4
- package/lib/networking/boxNetworkClient.js.map +1 -1
- package/lib/networking/retries.d.ts.map +1 -1
- package/lib/networking/retries.js +3 -1
- package/lib/networking/retries.js.map +1 -1
- package/lib/networking/version.d.ts +1 -1
- package/lib/networking/version.js +1 -1
- package/lib/schemas/v2025R0/archiveV2025R0.d.ts +25 -2
- package/lib/schemas/v2025R0/archiveV2025R0.d.ts.map +1 -1
- package/lib/schemas/v2025R0/archiveV2025R0.js +72 -1
- package/lib/schemas/v2025R0/archiveV2025R0.js.map +1 -1
- package/lib/schemas/v2025R0/collaborationPermissionsV2025R0.d.ts +28 -0
- package/lib/schemas/v2025R0/collaborationPermissionsV2025R0.d.ts.map +1 -0
- package/lib/schemas/v2025R0/collaborationPermissionsV2025R0.js +94 -0
- package/lib/schemas/v2025R0/collaborationPermissionsV2025R0.js.map +1 -0
- package/lib/schemas/v2025R0/customSessionDurationGroupItemV2025R0.d.ts +13 -0
- package/lib/schemas/v2025R0/customSessionDurationGroupItemV2025R0.d.ts.map +1 -0
- package/lib/schemas/v2025R0/customSessionDurationGroupItemV2025R0.js +31 -0
- package/lib/schemas/v2025R0/customSessionDurationGroupItemV2025R0.js.map +1 -0
- package/lib/schemas/v2025R0/enterpriseConfigurationContentAndSharingV2025R0.d.ts +96 -0
- package/lib/schemas/v2025R0/enterpriseConfigurationContentAndSharingV2025R0.d.ts.map +1 -0
- package/lib/schemas/v2025R0/enterpriseConfigurationContentAndSharingV2025R0.js +640 -0
- package/lib/schemas/v2025R0/enterpriseConfigurationContentAndSharingV2025R0.js.map +1 -0
- package/lib/schemas/v2025R0/enterpriseConfigurationItemBooleanV2025R0.d.ts +10 -0
- package/lib/schemas/v2025R0/enterpriseConfigurationItemBooleanV2025R0.d.ts.map +1 -0
- package/lib/schemas/v2025R0/enterpriseConfigurationItemBooleanV2025R0.js +41 -0
- package/lib/schemas/v2025R0/enterpriseConfigurationItemBooleanV2025R0.js.map +1 -0
- package/lib/schemas/v2025R0/enterpriseConfigurationItemIntegerV2025R0.d.ts +10 -0
- package/lib/schemas/v2025R0/enterpriseConfigurationItemIntegerV2025R0.d.ts.map +1 -0
- package/lib/schemas/v2025R0/enterpriseConfigurationItemIntegerV2025R0.js +42 -0
- package/lib/schemas/v2025R0/enterpriseConfigurationItemIntegerV2025R0.js.map +1 -0
- package/lib/schemas/v2025R0/enterpriseConfigurationItemStringV2025R0.d.ts +10 -0
- package/lib/schemas/v2025R0/enterpriseConfigurationItemStringV2025R0.d.ts.map +1 -0
- package/lib/schemas/v2025R0/enterpriseConfigurationItemStringV2025R0.js +42 -0
- package/lib/schemas/v2025R0/enterpriseConfigurationItemStringV2025R0.js.map +1 -0
- package/lib/schemas/v2025R0/enterpriseConfigurationItemV2025R0.d.ts +10 -0
- package/lib/schemas/v2025R0/enterpriseConfigurationItemV2025R0.d.ts.map +1 -0
- package/lib/schemas/v2025R0/enterpriseConfigurationItemV2025R0.js +25 -0
- package/lib/schemas/v2025R0/enterpriseConfigurationItemV2025R0.js.map +1 -0
- package/lib/schemas/v2025R0/enterpriseConfigurationSecurityV2025R0.d.ts +83 -0
- package/lib/schemas/v2025R0/enterpriseConfigurationSecurityV2025R0.d.ts.map +1 -0
- package/lib/schemas/v2025R0/enterpriseConfigurationSecurityV2025R0.js +472 -0
- package/lib/schemas/v2025R0/enterpriseConfigurationSecurityV2025R0.js.map +1 -0
- package/lib/schemas/v2025R0/enterpriseConfigurationShieldV2025R0.d.ts +11 -0
- package/lib/schemas/v2025R0/enterpriseConfigurationShieldV2025R0.d.ts.map +1 -0
- package/lib/schemas/v2025R0/enterpriseConfigurationShieldV2025R0.js +41 -0
- package/lib/schemas/v2025R0/enterpriseConfigurationShieldV2025R0.js.map +1 -0
- package/lib/schemas/v2025R0/enterpriseConfigurationUserSettingsV2025R0.d.ts +37 -0
- package/lib/schemas/v2025R0/enterpriseConfigurationUserSettingsV2025R0.d.ts.map +1 -0
- package/lib/schemas/v2025R0/enterpriseConfigurationUserSettingsV2025R0.js +224 -0
- package/lib/schemas/v2025R0/enterpriseConfigurationUserSettingsV2025R0.js.map +1 -0
- package/lib/schemas/v2025R0/enterpriseConfigurationV2025R0.d.ts +24 -0
- package/lib/schemas/v2025R0/enterpriseConfigurationV2025R0.d.ts.map +1 -0
- package/lib/schemas/v2025R0/enterpriseConfigurationV2025R0.js +101 -0
- package/lib/schemas/v2025R0/enterpriseConfigurationV2025R0.js.map +1 -0
- package/lib/schemas/v2025R0/enterpriseFeatureSettingV2025R0.d.ts +37 -0
- package/lib/schemas/v2025R0/enterpriseFeatureSettingV2025R0.d.ts.map +1 -0
- package/lib/schemas/v2025R0/enterpriseFeatureSettingV2025R0.js +119 -0
- package/lib/schemas/v2025R0/enterpriseFeatureSettingV2025R0.js.map +1 -0
- package/lib/schemas/v2025R0/enterpriseFeatureSettingsItemV2025R0.d.ts +9 -0
- package/lib/schemas/v2025R0/enterpriseFeatureSettingsItemV2025R0.d.ts.map +1 -0
- package/lib/schemas/v2025R0/enterpriseFeatureSettingsItemV2025R0.js +44 -0
- package/lib/schemas/v2025R0/enterpriseFeatureSettingsItemV2025R0.js.map +1 -0
- package/lib/schemas/v2025R0/externalCollabSecuritySettingsV2025R0.d.ts +32 -0
- package/lib/schemas/v2025R0/externalCollabSecuritySettingsV2025R0.d.ts.map +1 -0
- package/lib/schemas/v2025R0/externalCollabSecuritySettingsV2025R0.js +151 -0
- package/lib/schemas/v2025R0/externalCollabSecuritySettingsV2025R0.js.map +1 -0
- package/lib/schemas/v2025R0/hubItemReferenceV2025R0.js +2 -2
- package/lib/schemas/v2025R0/hubItemReferenceV2025R0.js.map +1 -1
- package/lib/schemas/v2025R0/index.d.ts +20 -0
- package/lib/schemas/v2025R0/index.d.ts.map +1 -1
- package/lib/schemas/v2025R0/index.js +20 -0
- package/lib/schemas/v2025R0/index.js.map +1 -1
- package/lib/schemas/v2025R0/keysafeSettingsV2025R0.d.ts +28 -0
- package/lib/schemas/v2025R0/keysafeSettingsV2025R0.d.ts.map +1 -0
- package/lib/schemas/v2025R0/keysafeSettingsV2025R0.js +78 -0
- package/lib/schemas/v2025R0/keysafeSettingsV2025R0.js.map +1 -0
- package/lib/schemas/v2025R0/listUserV2025R0.d.ts +16 -0
- package/lib/schemas/v2025R0/listUserV2025R0.d.ts.map +1 -0
- package/lib/schemas/v2025R0/listUserV2025R0.js +36 -0
- package/lib/schemas/v2025R0/listUserV2025R0.js.map +1 -0
- package/lib/schemas/v2025R0/sharedLinkPermissionsV2025R0.d.ts +19 -0
- package/lib/schemas/v2025R0/sharedLinkPermissionsV2025R0.d.ts.map +1 -0
- package/lib/schemas/v2025R0/sharedLinkPermissionsV2025R0.js +63 -0
- package/lib/schemas/v2025R0/sharedLinkPermissionsV2025R0.js.map +1 -0
- package/lib/schemas/v2025R0/shieldRuleItemV2025R0.d.ts +38 -0
- package/lib/schemas/v2025R0/shieldRuleItemV2025R0.d.ts.map +1 -0
- package/lib/schemas/v2025R0/shieldRuleItemV2025R0.js +130 -0
- package/lib/schemas/v2025R0/shieldRuleItemV2025R0.js.map +1 -0
- package/lib/schemas/v2025R0/userOrGroupReferenceV2025R0.d.ts +16 -0
- package/lib/schemas/v2025R0/userOrGroupReferenceV2025R0.d.ts.map +1 -0
- package/lib/schemas/v2025R0/userOrGroupReferenceV2025R0.js +49 -0
- package/lib/schemas/v2025R0/userOrGroupReferenceV2025R0.js.map +1 -0
- package/lib/schemas/v2025R0/userTrackingCodeV2025R0.d.ts +13 -0
- package/lib/schemas/v2025R0/userTrackingCodeV2025R0.d.ts.map +1 -0
- package/lib/schemas/v2025R0/userTrackingCodeV2025R0.js +32 -0
- package/lib/schemas/v2025R0/userTrackingCodeV2025R0.js.map +1 -0
- package/lib/schemas/v2025R0/weblinkReferenceV2025R0.d.ts +3 -3
- package/lib/schemas/v2025R0/weblinkReferenceV2025R0.d.ts.map +1 -1
- package/lib/schemas/v2025R0/weblinkReferenceV2025R0.js +3 -3
- package/lib/schemas/v2025R0/weblinkReferenceV2025R0.js.map +1 -1
- package/lib-esm/box/errors.js +2 -0
- package/lib-esm/box/errors.js.map +1 -1
- package/lib-esm/client.d.ts +3 -1
- package/lib-esm/client.js +6 -0
- package/lib-esm/client.js.map +1 -1
- package/lib-esm/managers/archives.d.ts +60 -1
- package/lib-esm/managers/archives.js +124 -3
- package/lib-esm/managers/archives.js.map +1 -1
- package/lib-esm/managers/enterpriseConfigurations.d.ts +59 -0
- package/lib-esm/managers/enterpriseConfigurations.js +91 -0
- package/lib-esm/managers/enterpriseConfigurations.js.map +1 -0
- package/lib-esm/managers/index.d.ts +1 -0
- package/lib-esm/managers/index.js +1 -0
- package/lib-esm/managers/index.js.map +1 -1
- package/lib-esm/managers/users.d.ts +5 -5
- package/lib-esm/managers/users.js +3 -3
- package/lib-esm/networking/boxNetworkClient.js +10 -4
- package/lib-esm/networking/boxNetworkClient.js.map +1 -1
- package/lib-esm/networking/retries.js +3 -1
- package/lib-esm/networking/retries.js.map +1 -1
- package/lib-esm/networking/version.d.ts +1 -1
- package/lib-esm/networking/version.js +1 -1
- package/lib-esm/schemas/v2025R0/archiveV2025R0.d.ts +25 -2
- package/lib-esm/schemas/v2025R0/archiveV2025R0.js +78 -1
- package/lib-esm/schemas/v2025R0/archiveV2025R0.js.map +1 -1
- package/lib-esm/schemas/v2025R0/collaborationPermissionsV2025R0.d.ts +27 -0
- package/lib-esm/schemas/v2025R0/collaborationPermissionsV2025R0.js +94 -0
- package/lib-esm/schemas/v2025R0/collaborationPermissionsV2025R0.js.map +1 -0
- package/lib-esm/schemas/v2025R0/customSessionDurationGroupItemV2025R0.d.ts +12 -0
- package/lib-esm/schemas/v2025R0/customSessionDurationGroupItemV2025R0.js +31 -0
- package/lib-esm/schemas/v2025R0/customSessionDurationGroupItemV2025R0.js.map +1 -0
- package/lib-esm/schemas/v2025R0/enterpriseConfigurationContentAndSharingV2025R0.d.ts +95 -0
- package/lib-esm/schemas/v2025R0/enterpriseConfigurationContentAndSharingV2025R0.js +655 -0
- package/lib-esm/schemas/v2025R0/enterpriseConfigurationContentAndSharingV2025R0.js.map +1 -0
- package/lib-esm/schemas/v2025R0/enterpriseConfigurationItemBooleanV2025R0.d.ts +9 -0
- package/lib-esm/schemas/v2025R0/enterpriseConfigurationItemBooleanV2025R0.js +41 -0
- package/lib-esm/schemas/v2025R0/enterpriseConfigurationItemBooleanV2025R0.js.map +1 -0
- package/lib-esm/schemas/v2025R0/enterpriseConfigurationItemIntegerV2025R0.d.ts +9 -0
- package/lib-esm/schemas/v2025R0/enterpriseConfigurationItemIntegerV2025R0.js +42 -0
- package/lib-esm/schemas/v2025R0/enterpriseConfigurationItemIntegerV2025R0.js.map +1 -0
- package/lib-esm/schemas/v2025R0/enterpriseConfigurationItemStringV2025R0.d.ts +9 -0
- package/lib-esm/schemas/v2025R0/enterpriseConfigurationItemStringV2025R0.js +42 -0
- package/lib-esm/schemas/v2025R0/enterpriseConfigurationItemStringV2025R0.js.map +1 -0
- package/lib-esm/schemas/v2025R0/enterpriseConfigurationItemV2025R0.d.ts +9 -0
- package/lib-esm/schemas/v2025R0/enterpriseConfigurationItemV2025R0.js +25 -0
- package/lib-esm/schemas/v2025R0/enterpriseConfigurationItemV2025R0.js.map +1 -0
- package/lib-esm/schemas/v2025R0/enterpriseConfigurationSecurityV2025R0.d.ts +82 -0
- package/lib-esm/schemas/v2025R0/enterpriseConfigurationSecurityV2025R0.js +487 -0
- package/lib-esm/schemas/v2025R0/enterpriseConfigurationSecurityV2025R0.js.map +1 -0
- package/lib-esm/schemas/v2025R0/enterpriseConfigurationShieldV2025R0.d.ts +10 -0
- package/lib-esm/schemas/v2025R0/enterpriseConfigurationShieldV2025R0.js +41 -0
- package/lib-esm/schemas/v2025R0/enterpriseConfigurationShieldV2025R0.js.map +1 -0
- package/lib-esm/schemas/v2025R0/enterpriseConfigurationUserSettingsV2025R0.d.ts +36 -0
- package/lib-esm/schemas/v2025R0/enterpriseConfigurationUserSettingsV2025R0.js +227 -0
- package/lib-esm/schemas/v2025R0/enterpriseConfigurationUserSettingsV2025R0.js.map +1 -0
- package/lib-esm/schemas/v2025R0/enterpriseConfigurationV2025R0.d.ts +23 -0
- package/lib-esm/schemas/v2025R0/enterpriseConfigurationV2025R0.js +101 -0
- package/lib-esm/schemas/v2025R0/enterpriseConfigurationV2025R0.js.map +1 -0
- package/lib-esm/schemas/v2025R0/enterpriseFeatureSettingV2025R0.d.ts +36 -0
- package/lib-esm/schemas/v2025R0/enterpriseFeatureSettingV2025R0.js +119 -0
- package/lib-esm/schemas/v2025R0/enterpriseFeatureSettingV2025R0.js.map +1 -0
- package/lib-esm/schemas/v2025R0/enterpriseFeatureSettingsItemV2025R0.d.ts +8 -0
- package/lib-esm/schemas/v2025R0/enterpriseFeatureSettingsItemV2025R0.js +47 -0
- package/lib-esm/schemas/v2025R0/enterpriseFeatureSettingsItemV2025R0.js.map +1 -0
- package/lib-esm/schemas/v2025R0/externalCollabSecuritySettingsV2025R0.d.ts +31 -0
- package/lib-esm/schemas/v2025R0/externalCollabSecuritySettingsV2025R0.js +151 -0
- package/lib-esm/schemas/v2025R0/externalCollabSecuritySettingsV2025R0.js.map +1 -0
- package/lib-esm/schemas/v2025R0/hubItemReferenceV2025R0.js +2 -2
- package/lib-esm/schemas/v2025R0/hubItemReferenceV2025R0.js.map +1 -1
- package/lib-esm/schemas/v2025R0/index.d.ts +20 -0
- package/lib-esm/schemas/v2025R0/index.js +20 -0
- package/lib-esm/schemas/v2025R0/index.js.map +1 -1
- package/lib-esm/schemas/v2025R0/keysafeSettingsV2025R0.d.ts +27 -0
- package/lib-esm/schemas/v2025R0/keysafeSettingsV2025R0.js +78 -0
- package/lib-esm/schemas/v2025R0/keysafeSettingsV2025R0.js.map +1 -0
- package/lib-esm/schemas/v2025R0/listUserV2025R0.d.ts +15 -0
- package/lib-esm/schemas/v2025R0/listUserV2025R0.js +36 -0
- package/lib-esm/schemas/v2025R0/listUserV2025R0.js.map +1 -0
- package/lib-esm/schemas/v2025R0/sharedLinkPermissionsV2025R0.d.ts +18 -0
- package/lib-esm/schemas/v2025R0/sharedLinkPermissionsV2025R0.js +63 -0
- package/lib-esm/schemas/v2025R0/sharedLinkPermissionsV2025R0.js.map +1 -0
- package/lib-esm/schemas/v2025R0/shieldRuleItemV2025R0.d.ts +37 -0
- package/lib-esm/schemas/v2025R0/shieldRuleItemV2025R0.js +130 -0
- package/lib-esm/schemas/v2025R0/shieldRuleItemV2025R0.js.map +1 -0
- package/lib-esm/schemas/v2025R0/userOrGroupReferenceV2025R0.d.ts +15 -0
- package/lib-esm/schemas/v2025R0/userOrGroupReferenceV2025R0.js +49 -0
- package/lib-esm/schemas/v2025R0/userOrGroupReferenceV2025R0.js.map +1 -0
- package/lib-esm/schemas/v2025R0/userTrackingCodeV2025R0.d.ts +12 -0
- package/lib-esm/schemas/v2025R0/userTrackingCodeV2025R0.js +32 -0
- package/lib-esm/schemas/v2025R0/userTrackingCodeV2025R0.js.map +1 -0
- package/lib-esm/schemas/v2025R0/weblinkReferenceV2025R0.d.ts +3 -3
- package/lib-esm/schemas/v2025R0/weblinkReferenceV2025R0.js +3 -3
- package/lib-esm/schemas/v2025R0/weblinkReferenceV2025R0.js.map +1 -1
- package/package.json +1 -1
- package/src/box/errors.ts +2 -0
- package/src/client.ts +7 -0
- package/src/managers/archives.ts +202 -2
- package/src/managers/enterpriseConfigurations.ts +180 -0
- package/src/managers/index.ts +1 -0
- package/src/managers/users.ts +5 -5
- package/src/networking/boxNetworkClient.ts +12 -5
- package/src/networking/retries.ts +3 -1
- package/src/networking/version.ts +1 -1
- package/src/schemas/v2025R0/archiveV2025R0.ts +106 -2
- package/src/schemas/v2025R0/collaborationPermissionsV2025R0.ts +150 -0
- package/src/schemas/v2025R0/customSessionDurationGroupItemV2025R0.ts +46 -0
- package/src/schemas/v2025R0/enterpriseConfigurationContentAndSharingV2025R0.ts +1190 -0
- package/src/schemas/v2025R0/enterpriseConfigurationItemBooleanV2025R0.ts +58 -0
- package/src/schemas/v2025R0/enterpriseConfigurationItemIntegerV2025R0.ts +58 -0
- package/src/schemas/v2025R0/enterpriseConfigurationItemStringV2025R0.ts +56 -0
- package/src/schemas/v2025R0/enterpriseConfigurationItemV2025R0.ts +37 -0
- package/src/schemas/v2025R0/enterpriseConfigurationSecurityV2025R0.ts +848 -0
- package/src/schemas/v2025R0/enterpriseConfigurationShieldV2025R0.ts +59 -0
- package/src/schemas/v2025R0/enterpriseConfigurationUserSettingsV2025R0.ts +434 -0
- package/src/schemas/v2025R0/enterpriseConfigurationV2025R0.ts +155 -0
- package/src/schemas/v2025R0/enterpriseFeatureSettingV2025R0.ts +178 -0
- package/src/schemas/v2025R0/enterpriseFeatureSettingsItemV2025R0.ts +62 -0
- package/src/schemas/v2025R0/externalCollabSecuritySettingsV2025R0.ts +208 -0
- package/src/schemas/v2025R0/hubItemReferenceV2025R0.ts +2 -2
- package/src/schemas/v2025R0/index.ts +20 -0
- package/src/schemas/v2025R0/keysafeSettingsV2025R0.ts +117 -0
- package/src/schemas/v2025R0/listUserV2025R0.ts +49 -0
- package/src/schemas/v2025R0/sharedLinkPermissionsV2025R0.ts +98 -0
- package/src/schemas/v2025R0/shieldRuleItemV2025R0.ts +188 -0
- package/src/schemas/v2025R0/userOrGroupReferenceV2025R0.ts +68 -0
- package/src/schemas/v2025R0/userTrackingCodeV2025R0.ts +44 -0
- package/src/schemas/v2025R0/weblinkReferenceV2025R0.ts +5 -5
- package/src/test/archives.test.ts +25 -0
- package/src/test/enterpriseConfigurations.test.ts +86 -0
- package/src/test/events.test.ts +1 -1
- package/lib-esm/test/ai.test.d.ts +0 -3
- package/lib-esm/test/ai.test.js +0 -428
- package/lib-esm/test/ai.test.js.map +0 -1
- package/lib-esm/test/aiStudio.test.d.ts +0 -3
- package/lib-esm/test/aiStudio.test.js +0 -102
- package/lib-esm/test/aiStudio.test.js.map +0 -1
- package/lib-esm/test/appItemAssociations.test.d.ts +0 -1
- package/lib-esm/test/appItemAssociations.test.js +0 -70
- package/lib-esm/test/appItemAssociations.test.js.map +0 -1
- package/lib-esm/test/archives.test.d.ts +0 -4
- package/lib-esm/test/archives.test.js +0 -32
- package/lib-esm/test/archives.test.js.map +0 -1
- package/lib-esm/test/auth.test.d.ts +0 -3
- package/lib-esm/test/auth.test.js +0 -382
- package/lib-esm/test/auth.test.js.map +0 -1
- package/lib-esm/test/avatars.test.d.ts +0 -3
- package/lib-esm/test/avatars.test.js +0 -36
- package/lib-esm/test/avatars.test.js.map +0 -1
- package/lib-esm/test/chunkedUploads.test.d.ts +0 -22
- package/lib-esm/test/chunkedUploads.test.js +0 -247
- package/lib-esm/test/chunkedUploads.test.js.map +0 -1
- package/lib-esm/test/classifications.test.d.ts +0 -3
- package/lib-esm/test/classifications.test.js +0 -52
- package/lib-esm/test/classifications.test.js.map +0 -1
- package/lib-esm/test/client.test.d.ts +0 -46
- package/lib-esm/test/client.test.js +0 -310
- package/lib-esm/test/client.test.js.map +0 -1
- package/lib-esm/test/collaborationAllowlistEntries.test.d.ts +0 -3
- package/lib-esm/test/collaborationAllowlistEntries.test.js +0 -43
- package/lib-esm/test/collaborationAllowlistEntries.test.js.map +0 -1
- package/lib-esm/test/collaborationAllowlistExemptTargets.test.d.ts +0 -3
- package/lib-esm/test/collaborationAllowlistExemptTargets.test.js +0 -43
- package/lib-esm/test/collaborationAllowlistExemptTargets.test.js.map +0 -1
- package/lib-esm/test/collections.test.d.ts +0 -3
- package/lib-esm/test/collections.test.js +0 -40
- package/lib-esm/test/collections.test.js.map +0 -1
- package/lib-esm/test/comments.test.d.ts +0 -3
- package/lib-esm/test/comments.test.js +0 -78
- package/lib-esm/test/comments.test.js.map +0 -1
- package/lib-esm/test/commons.d.ts +0 -21
- package/lib-esm/test/commons.js +0 -161
- package/lib-esm/test/commons.js.map +0 -1
- package/lib-esm/test/devicePinners.test.d.ts +0 -3
- package/lib-esm/test/devicePinners.test.js +0 -29
- package/lib-esm/test/devicePinners.test.js.map +0 -1
- package/lib-esm/test/docgen.test.d.ts +0 -3
- package/lib-esm/test/docgen.test.js +0 -135
- package/lib-esm/test/docgen.test.js.map +0 -1
- package/lib-esm/test/docgenTemplate.test.d.ts +0 -3
- package/lib-esm/test/docgenTemplate.test.js +0 -29
- package/lib-esm/test/docgenTemplate.test.js.map +0 -1
- package/lib-esm/test/downloads.test.d.ts +0 -3
- package/lib-esm/test/downloads.test.js +0 -96
- package/lib-esm/test/downloads.test.js.map +0 -1
- package/lib-esm/test/emailAliases.test.d.ts +0 -3
- package/lib-esm/test/emailAliases.test.js +0 -34
- package/lib-esm/test/emailAliases.test.js.map +0 -1
- package/lib-esm/test/events.test.d.ts +0 -3
- package/lib-esm/test/events.test.js +0 -111
- package/lib-esm/test/events.test.js.map +0 -1
- package/lib-esm/test/externalUsers.test.d.ts +0 -3
- package/lib-esm/test/externalUsers.test.js +0 -35
- package/lib-esm/test/externalUsers.test.js.map +0 -1
- package/lib-esm/test/fileClassifications.test.d.ts +0 -6
- package/lib-esm/test/fileClassifications.test.js +0 -81
- package/lib-esm/test/fileClassifications.test.js.map +0 -1
- package/lib-esm/test/fileMetadata.test.d.ts +0 -3
- package/lib-esm/test/fileMetadata.test.js +0 -247
- package/lib-esm/test/fileMetadata.test.js.map +0 -1
- package/lib-esm/test/fileRequests.test.d.ts +0 -1
- package/lib-esm/test/fileRequests.test.js +0 -50
- package/lib-esm/test/fileRequests.test.js.map +0 -1
- package/lib-esm/test/fileVersionLegalHolds.test.d.ts +0 -3
- package/lib-esm/test/fileVersionLegalHolds.test.js +0 -22
- package/lib-esm/test/fileVersionLegalHolds.test.js.map +0 -1
- package/lib-esm/test/fileVersionRetentions.test.d.ts +0 -3
- package/lib-esm/test/fileVersionRetentions.test.js +0 -90
- package/lib-esm/test/fileVersionRetentions.test.js.map +0 -1
- package/lib-esm/test/fileVersions.test.d.ts +0 -3
- package/lib-esm/test/fileVersions.test.js +0 -144
- package/lib-esm/test/fileVersions.test.js.map +0 -1
- package/lib-esm/test/fileWatermarks.test.d.ts +0 -3
- package/lib-esm/test/fileWatermarks.test.js +0 -31
- package/lib-esm/test/fileWatermarks.test.js.map +0 -1
- package/lib-esm/test/files.test.d.ts +0 -6
- package/lib-esm/test/files.test.js +0 -144
- package/lib-esm/test/files.test.js.map +0 -1
- package/lib-esm/test/folderClassifications.test.d.ts +0 -6
- package/lib-esm/test/folderClassifications.test.js +0 -81
- package/lib-esm/test/folderClassifications.test.js.map +0 -1
- package/lib-esm/test/folderLocks.test.d.ts +0 -3
- package/lib-esm/test/folderLocks.test.js +0 -46
- package/lib-esm/test/folderLocks.test.js.map +0 -1
- package/lib-esm/test/folderMetadata.test.d.ts +0 -3
- package/lib-esm/test/folderMetadata.test.js +0 -247
- package/lib-esm/test/folderMetadata.test.js.map +0 -1
- package/lib-esm/test/folderWatermarks.test.d.ts +0 -3
- package/lib-esm/test/folderWatermarks.test.js +0 -26
- package/lib-esm/test/folderWatermarks.test.js.map +0 -1
- package/lib-esm/test/folders.test.d.ts +0 -3
- package/lib-esm/test/folders.test.js +0 -109
- package/lib-esm/test/folders.test.js.map +0 -1
- package/lib-esm/test/groups.test.d.ts +0 -3
- package/lib-esm/test/groups.test.js +0 -48
- package/lib-esm/test/groups.test.js.map +0 -1
- package/lib-esm/test/integrationMappings.test.d.ts +0 -3
- package/lib-esm/test/integrationMappings.test.js +0 -122
- package/lib-esm/test/integrationMappings.test.js.map +0 -1
- package/lib-esm/test/invites.test.d.ts +0 -1
- package/lib-esm/test/invites.test.js +0 -35
- package/lib-esm/test/invites.test.js.map +0 -1
- package/lib-esm/test/legalHoldPolicies.test.d.ts +0 -3
- package/lib-esm/test/legalHoldPolicies.test.js +0 -71
- package/lib-esm/test/legalHoldPolicies.test.js.map +0 -1
- package/lib-esm/test/legalHoldPolicyAssignments.test.d.ts +0 -3
- package/lib-esm/test/legalHoldPolicyAssignments.test.js +0 -69
- package/lib-esm/test/legalHoldPolicyAssignments.test.js.map +0 -1
- package/lib-esm/test/listCollaborations.test.d.ts +0 -1
- package/lib-esm/test/listCollaborations.test.js +0 -67
- package/lib-esm/test/listCollaborations.test.js.map +0 -1
- package/lib-esm/test/memberships.test.d.ts +0 -3
- package/lib-esm/test/memberships.test.js +0 -61
- package/lib-esm/test/memberships.test.js.map +0 -1
- package/lib-esm/test/metadataCascadePolicies.test.d.ts +0 -3
- package/lib-esm/test/metadataCascadePolicies.test.js +0 -80
- package/lib-esm/test/metadataCascadePolicies.test.js.map +0 -1
- package/lib-esm/test/metadataTemplates.test.d.ts +0 -3
- package/lib-esm/test/metadataTemplates.test.js +0 -185
- package/lib-esm/test/metadataTemplates.test.js.map +0 -1
- package/lib-esm/test/recentItems.test.d.ts +0 -1
- package/lib-esm/test/recentItems.test.js +0 -12
- package/lib-esm/test/recentItems.test.js.map +0 -1
- package/lib-esm/test/retentionPolicies.test.d.ts +0 -3
- package/lib-esm/test/retentionPolicies.test.js +0 -45
- package/lib-esm/test/retentionPolicies.test.js.map +0 -1
- package/lib-esm/test/retentionPolicyAssignments.test.d.ts +0 -3
- package/lib-esm/test/retentionPolicyAssignments.test.js +0 -75
- package/lib-esm/test/retentionPolicyAssignments.test.js.map +0 -1
- package/lib-esm/test/search.test.d.ts +0 -3
- package/lib-esm/test/search.test.js +0 -232
- package/lib-esm/test/search.test.js.map +0 -1
- package/lib-esm/test/sessionTermination.test.d.ts +0 -3
- package/lib-esm/test/sessionTermination.test.js +0 -35
- package/lib-esm/test/sessionTermination.test.js.map +0 -1
- package/lib-esm/test/sharedLinksAppItems.test.d.ts +0 -3
- package/lib-esm/test/sharedLinksAppItems.test.js +0 -20
- package/lib-esm/test/sharedLinksAppItems.test.js.map +0 -1
- package/lib-esm/test/sharedLinksFiles.test.d.ts +0 -3
- package/lib-esm/test/sharedLinksFiles.test.js +0 -63
- package/lib-esm/test/sharedLinksFiles.test.js.map +0 -1
- package/lib-esm/test/sharedLinksFolders.test.d.ts +0 -3
- package/lib-esm/test/sharedLinksFolders.test.js +0 -60
- package/lib-esm/test/sharedLinksFolders.test.js.map +0 -1
- package/lib-esm/test/sharedLinksWebLinks.test.d.ts +0 -3
- package/lib-esm/test/sharedLinksWebLinks.test.js +0 -64
- package/lib-esm/test/sharedLinksWebLinks.test.js.map +0 -1
- package/lib-esm/test/shieldInformationBarrierReports.test.d.ts +0 -1
- package/lib-esm/test/shieldInformationBarrierReports.test.js +0 -51
- package/lib-esm/test/shieldInformationBarrierReports.test.js.map +0 -1
- package/lib-esm/test/shieldInformationBarrierSegmentMembers.test.d.ts +0 -1
- package/lib-esm/test/shieldInformationBarrierSegmentMembers.test.js +0 -53
- package/lib-esm/test/shieldInformationBarrierSegmentMembers.test.js.map +0 -1
- package/lib-esm/test/shieldInformationBarrierSegmentRestrictions.test.d.ts +0 -1
- package/lib-esm/test/shieldInformationBarrierSegmentRestrictions.test.js +0 -71
- package/lib-esm/test/shieldInformationBarrierSegmentRestrictions.test.js.map +0 -1
- package/lib-esm/test/shieldInformationBarrierSegments.test.d.ts +0 -1
- package/lib-esm/test/shieldInformationBarrierSegments.test.js +0 -64
- package/lib-esm/test/shieldInformationBarrierSegments.test.js.map +0 -1
- package/lib-esm/test/shieldInformationBarriers.test.d.ts +0 -1
- package/lib-esm/test/shieldInformationBarriers.test.js +0 -39
- package/lib-esm/test/shieldInformationBarriers.test.js.map +0 -1
- package/lib-esm/test/shieldLists.test.d.ts +0 -4
- package/lib-esm/test/shieldLists.test.js +0 -78
- package/lib-esm/test/shieldLists.test.js.map +0 -1
- package/lib-esm/test/signRequests.test.d.ts +0 -3
- package/lib-esm/test/signRequests.test.js +0 -173
- package/lib-esm/test/signRequests.test.js.map +0 -1
- package/lib-esm/test/signTemplates.test.d.ts +0 -1
- package/lib-esm/test/signTemplates.test.js +0 -38
- package/lib-esm/test/signTemplates.test.js.map +0 -1
- package/lib-esm/test/skills.test.d.ts +0 -3
- package/lib-esm/test/skills.test.js +0 -90
- package/lib-esm/test/skills.test.js.map +0 -1
- package/lib-esm/test/storagePolicicyAssignments.test.d.ts +0 -5
- package/lib-esm/test/storagePolicicyAssignments.test.js +0 -74
- package/lib-esm/test/storagePolicicyAssignments.test.js.map +0 -1
- package/lib-esm/test/storagePolicies.test.d.ts +0 -2
- package/lib-esm/test/storagePolicies.test.js +0 -20
- package/lib-esm/test/storagePolicies.test.js.map +0 -1
- package/lib-esm/test/taskAssignments.test.d.ts +0 -3
- package/lib-esm/test/taskAssignments.test.js +0 -70
- package/lib-esm/test/taskAssignments.test.js.map +0 -1
- package/lib-esm/test/tasks.test.d.ts +0 -3
- package/lib-esm/test/tasks.test.js +0 -58
- package/lib-esm/test/tasks.test.js.map +0 -1
- package/lib-esm/test/termsOfServiceUserStatuses.test.d.ts +0 -1
- package/lib-esm/test/termsOfServiceUserStatuses.test.js +0 -62
- package/lib-esm/test/termsOfServiceUserStatuses.test.js.map +0 -1
- package/lib-esm/test/termsOfServices.test.d.ts +0 -3
- package/lib-esm/test/termsOfServices.test.js +0 -35
- package/lib-esm/test/termsOfServices.test.js.map +0 -1
- package/lib-esm/test/transfer.test.d.ts +0 -3
- package/lib-esm/test/transfer.test.js +0 -34
- package/lib-esm/test/transfer.test.js.map +0 -1
- package/lib-esm/test/trashedFiles.test.d.ts +0 -3
- package/lib-esm/test/trashedFiles.test.js +0 -50
- package/lib-esm/test/trashedFiles.test.js.map +0 -1
- package/lib-esm/test/trashedFolders.test.d.ts +0 -3
- package/lib-esm/test/trashedFolders.test.js +0 -37
- package/lib-esm/test/trashedFolders.test.js.map +0 -1
- package/lib-esm/test/trashedItems.test.d.ts +0 -3
- package/lib-esm/test/trashedItems.test.js +0 -15
- package/lib-esm/test/trashedItems.test.js.map +0 -1
- package/lib-esm/test/trashedWebLinks.test.d.ts +0 -3
- package/lib-esm/test/trashedWebLinks.test.js +0 -45
- package/lib-esm/test/trashedWebLinks.test.js.map +0 -1
- package/lib-esm/test/uploads.test.d.ts +0 -3
- package/lib-esm/test/uploads.test.js +0 -118
- package/lib-esm/test/uploads.test.js.map +0 -1
- package/lib-esm/test/userCollaborations.test.d.ts +0 -3
- package/lib-esm/test/userCollaborations.test.js +0 -146
- package/lib-esm/test/userCollaborations.test.js.map +0 -1
- package/lib-esm/test/users.test.d.ts +0 -3
- package/lib-esm/test/users.test.js +0 -44
- package/lib-esm/test/users.test.js.map +0 -1
- package/lib-esm/test/webhooks.test.d.ts +0 -3
- package/lib-esm/test/webhooks.test.js +0 -222
- package/lib-esm/test/webhooks.test.js.map +0 -1
- package/lib-esm/test/weblinks.test.d.ts +0 -3
- package/lib-esm/test/weblinks.test.js +0 -61
- package/lib-esm/test/weblinks.test.js.map +0 -1
- package/lib-esm/test/workflows.test.d.ts +0 -3
- package/lib-esm/test/workflows.test.js +0 -74
- package/lib-esm/test/workflows.test.js.map +0 -1
- package/lib-esm/test/zipDownloads.test.d.ts +0 -3
- package/lib-esm/test/zipDownloads.test.js +0 -97
- package/lib-esm/test/zipDownloads.test.js.map +0 -1
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { BoxSdkError } from '../../box/errors';
|
|
2
|
+
import { SerializedData } from '../../serialization/json';
|
|
3
|
+
import { sdIsEmpty } from '../../serialization/json';
|
|
4
|
+
import { sdIsBoolean } from '../../serialization/json';
|
|
5
|
+
import { sdIsNumber } from '../../serialization/json';
|
|
6
|
+
import { sdIsString } from '../../serialization/json';
|
|
7
|
+
import { sdIsList } from '../../serialization/json';
|
|
8
|
+
import { sdIsMap } from '../../serialization/json';
|
|
9
|
+
export interface ListUserV2025R0 {
|
|
10
|
+
/**
|
|
11
|
+
* The ID of the user. */
|
|
12
|
+
readonly id?: number | null;
|
|
13
|
+
/**
|
|
14
|
+
* The name of the user. */
|
|
15
|
+
readonly name?: string | null;
|
|
16
|
+
/**
|
|
17
|
+
* The email of the user. */
|
|
18
|
+
readonly email?: string | null;
|
|
19
|
+
readonly rawData?: SerializedData;
|
|
20
|
+
}
|
|
21
|
+
export function serializeListUserV2025R0(val: ListUserV2025R0): SerializedData {
|
|
22
|
+
return { ['id']: val.id, ['name']: val.name, ['email']: val.email };
|
|
23
|
+
}
|
|
24
|
+
export function deserializeListUserV2025R0(
|
|
25
|
+
val: SerializedData,
|
|
26
|
+
): ListUserV2025R0 {
|
|
27
|
+
if (!sdIsMap(val)) {
|
|
28
|
+
throw new BoxSdkError({ message: 'Expecting a map for "ListUserV2025R0"' });
|
|
29
|
+
}
|
|
30
|
+
if (!(val.id == void 0) && !sdIsNumber(val.id)) {
|
|
31
|
+
throw new BoxSdkError({
|
|
32
|
+
message: 'Expecting number for "id" of type "ListUserV2025R0"',
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
const id: undefined | number = val.id == void 0 ? void 0 : val.id;
|
|
36
|
+
if (!(val.name == void 0) && !sdIsString(val.name)) {
|
|
37
|
+
throw new BoxSdkError({
|
|
38
|
+
message: 'Expecting string for "name" of type "ListUserV2025R0"',
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
const name: undefined | string = val.name == void 0 ? void 0 : val.name;
|
|
42
|
+
if (!(val.email == void 0) && !sdIsString(val.email)) {
|
|
43
|
+
throw new BoxSdkError({
|
|
44
|
+
message: 'Expecting string for "email" of type "ListUserV2025R0"',
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
const email: undefined | string = val.email == void 0 ? void 0 : val.email;
|
|
48
|
+
return { id: id, name: name, email: email } satisfies ListUserV2025R0;
|
|
49
|
+
}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { BoxSdkError } from '../../box/errors';
|
|
2
|
+
import { SerializedData } from '../../serialization/json';
|
|
3
|
+
import { sdIsEmpty } from '../../serialization/json';
|
|
4
|
+
import { sdIsBoolean } from '../../serialization/json';
|
|
5
|
+
import { sdIsNumber } from '../../serialization/json';
|
|
6
|
+
import { sdIsString } from '../../serialization/json';
|
|
7
|
+
import { sdIsList } from '../../serialization/json';
|
|
8
|
+
import { sdIsMap } from '../../serialization/json';
|
|
9
|
+
export interface SharedLinkPermissionsV2025R0 {
|
|
10
|
+
/**
|
|
11
|
+
* The selected option for shared links permissions. */
|
|
12
|
+
readonly sharedLinksOption?: string | null;
|
|
13
|
+
/**
|
|
14
|
+
* The default shared link type. */
|
|
15
|
+
readonly defaultSharedLinkType?: string | null;
|
|
16
|
+
/**
|
|
17
|
+
* The selected option for notes shared links permissions. */
|
|
18
|
+
readonly notesSharedLinkOption?: string | null;
|
|
19
|
+
/**
|
|
20
|
+
* The default notes shared link type. */
|
|
21
|
+
readonly defaultNotesSharedLinkType?: string | null;
|
|
22
|
+
readonly rawData?: SerializedData;
|
|
23
|
+
}
|
|
24
|
+
export function serializeSharedLinkPermissionsV2025R0(
|
|
25
|
+
val: SharedLinkPermissionsV2025R0,
|
|
26
|
+
): SerializedData {
|
|
27
|
+
return {
|
|
28
|
+
['shared_links_option']: val.sharedLinksOption,
|
|
29
|
+
['default_shared_link_type']: val.defaultSharedLinkType,
|
|
30
|
+
['notes_shared_link_option']: val.notesSharedLinkOption,
|
|
31
|
+
['default_notes_shared_link_type']: val.defaultNotesSharedLinkType,
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
export function deserializeSharedLinkPermissionsV2025R0(
|
|
35
|
+
val: SerializedData,
|
|
36
|
+
): SharedLinkPermissionsV2025R0 {
|
|
37
|
+
if (!sdIsMap(val)) {
|
|
38
|
+
throw new BoxSdkError({
|
|
39
|
+
message: 'Expecting a map for "SharedLinkPermissionsV2025R0"',
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
if (
|
|
43
|
+
!(val.shared_links_option == void 0) &&
|
|
44
|
+
!sdIsString(val.shared_links_option)
|
|
45
|
+
) {
|
|
46
|
+
throw new BoxSdkError({
|
|
47
|
+
message:
|
|
48
|
+
'Expecting string for "shared_links_option" of type "SharedLinkPermissionsV2025R0"',
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
const sharedLinksOption: undefined | string =
|
|
52
|
+
val.shared_links_option == void 0 ? void 0 : val.shared_links_option;
|
|
53
|
+
if (
|
|
54
|
+
!(val.default_shared_link_type == void 0) &&
|
|
55
|
+
!sdIsString(val.default_shared_link_type)
|
|
56
|
+
) {
|
|
57
|
+
throw new BoxSdkError({
|
|
58
|
+
message:
|
|
59
|
+
'Expecting string for "default_shared_link_type" of type "SharedLinkPermissionsV2025R0"',
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
const defaultSharedLinkType: undefined | string =
|
|
63
|
+
val.default_shared_link_type == void 0
|
|
64
|
+
? void 0
|
|
65
|
+
: val.default_shared_link_type;
|
|
66
|
+
if (
|
|
67
|
+
!(val.notes_shared_link_option == void 0) &&
|
|
68
|
+
!sdIsString(val.notes_shared_link_option)
|
|
69
|
+
) {
|
|
70
|
+
throw new BoxSdkError({
|
|
71
|
+
message:
|
|
72
|
+
'Expecting string for "notes_shared_link_option" of type "SharedLinkPermissionsV2025R0"',
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
const notesSharedLinkOption: undefined | string =
|
|
76
|
+
val.notes_shared_link_option == void 0
|
|
77
|
+
? void 0
|
|
78
|
+
: val.notes_shared_link_option;
|
|
79
|
+
if (
|
|
80
|
+
!(val.default_notes_shared_link_type == void 0) &&
|
|
81
|
+
!sdIsString(val.default_notes_shared_link_type)
|
|
82
|
+
) {
|
|
83
|
+
throw new BoxSdkError({
|
|
84
|
+
message:
|
|
85
|
+
'Expecting string for "default_notes_shared_link_type" of type "SharedLinkPermissionsV2025R0"',
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
const defaultNotesSharedLinkType: undefined | string =
|
|
89
|
+
val.default_notes_shared_link_type == void 0
|
|
90
|
+
? void 0
|
|
91
|
+
: val.default_notes_shared_link_type;
|
|
92
|
+
return {
|
|
93
|
+
sharedLinksOption: sharedLinksOption,
|
|
94
|
+
defaultSharedLinkType: defaultSharedLinkType,
|
|
95
|
+
notesSharedLinkOption: notesSharedLinkOption,
|
|
96
|
+
defaultNotesSharedLinkType: defaultNotesSharedLinkType,
|
|
97
|
+
} satisfies SharedLinkPermissionsV2025R0;
|
|
98
|
+
}
|
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
import { serializeDateTime } from '../../internal/utils';
|
|
2
|
+
import { deserializeDateTime } from '../../internal/utils';
|
|
3
|
+
import { BoxSdkError } from '../../box/errors';
|
|
4
|
+
import { DateTime } from '../../internal/utils';
|
|
5
|
+
import { SerializedData } from '../../serialization/json';
|
|
6
|
+
import { sdIsEmpty } from '../../serialization/json';
|
|
7
|
+
import { sdIsBoolean } from '../../serialization/json';
|
|
8
|
+
import { sdIsNumber } from '../../serialization/json';
|
|
9
|
+
import { sdIsString } from '../../serialization/json';
|
|
10
|
+
import { sdIsList } from '../../serialization/json';
|
|
11
|
+
import { sdIsMap } from '../../serialization/json';
|
|
12
|
+
export type ShieldRuleItemV2025R0TypeField = 'shield_rule';
|
|
13
|
+
export type ShieldRuleItemV2025R0PriorityField =
|
|
14
|
+
| 'informational'
|
|
15
|
+
| 'low'
|
|
16
|
+
| 'medium'
|
|
17
|
+
| 'high'
|
|
18
|
+
| 'critical'
|
|
19
|
+
| string;
|
|
20
|
+
export interface ShieldRuleItemV2025R0 {
|
|
21
|
+
/**
|
|
22
|
+
* The identifier of the shield rule. */
|
|
23
|
+
readonly id?: string;
|
|
24
|
+
/**
|
|
25
|
+
* The value will always be `shield_rule`. */
|
|
26
|
+
readonly type?: ShieldRuleItemV2025R0TypeField;
|
|
27
|
+
/**
|
|
28
|
+
* The category of the shield rule. */
|
|
29
|
+
readonly ruleCategory?: string;
|
|
30
|
+
/**
|
|
31
|
+
* The name of the shield rule. */
|
|
32
|
+
readonly name?: string;
|
|
33
|
+
/**
|
|
34
|
+
* The description of the shield rule. */
|
|
35
|
+
readonly description?: string;
|
|
36
|
+
/**
|
|
37
|
+
* The priority level of the shield rule. */
|
|
38
|
+
readonly priority?: ShieldRuleItemV2025R0PriorityField;
|
|
39
|
+
/**
|
|
40
|
+
* The date and time when the shield rule was created. */
|
|
41
|
+
readonly createdAt?: DateTime;
|
|
42
|
+
/**
|
|
43
|
+
* The date and time when the shield rule was last modified. */
|
|
44
|
+
readonly modifiedAt?: DateTime;
|
|
45
|
+
readonly rawData?: SerializedData;
|
|
46
|
+
}
|
|
47
|
+
export function serializeShieldRuleItemV2025R0TypeField(
|
|
48
|
+
val: ShieldRuleItemV2025R0TypeField,
|
|
49
|
+
): SerializedData {
|
|
50
|
+
return val;
|
|
51
|
+
}
|
|
52
|
+
export function deserializeShieldRuleItemV2025R0TypeField(
|
|
53
|
+
val: SerializedData,
|
|
54
|
+
): ShieldRuleItemV2025R0TypeField {
|
|
55
|
+
if (val == 'shield_rule') {
|
|
56
|
+
return val;
|
|
57
|
+
}
|
|
58
|
+
throw new BoxSdkError({
|
|
59
|
+
message: "Can't deserialize ShieldRuleItemV2025R0TypeField",
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
export function serializeShieldRuleItemV2025R0PriorityField(
|
|
63
|
+
val: ShieldRuleItemV2025R0PriorityField,
|
|
64
|
+
): SerializedData {
|
|
65
|
+
return val;
|
|
66
|
+
}
|
|
67
|
+
export function deserializeShieldRuleItemV2025R0PriorityField(
|
|
68
|
+
val: SerializedData,
|
|
69
|
+
): ShieldRuleItemV2025R0PriorityField {
|
|
70
|
+
if (val == 'informational') {
|
|
71
|
+
return val;
|
|
72
|
+
}
|
|
73
|
+
if (val == 'low') {
|
|
74
|
+
return val;
|
|
75
|
+
}
|
|
76
|
+
if (val == 'medium') {
|
|
77
|
+
return val;
|
|
78
|
+
}
|
|
79
|
+
if (val == 'high') {
|
|
80
|
+
return val;
|
|
81
|
+
}
|
|
82
|
+
if (val == 'critical') {
|
|
83
|
+
return val;
|
|
84
|
+
}
|
|
85
|
+
if (sdIsString(val)) {
|
|
86
|
+
return val;
|
|
87
|
+
}
|
|
88
|
+
throw new BoxSdkError({
|
|
89
|
+
message: "Can't deserialize ShieldRuleItemV2025R0PriorityField",
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
export function serializeShieldRuleItemV2025R0(
|
|
93
|
+
val: ShieldRuleItemV2025R0,
|
|
94
|
+
): SerializedData {
|
|
95
|
+
return {
|
|
96
|
+
['id']: val.id,
|
|
97
|
+
['type']:
|
|
98
|
+
val.type == void 0
|
|
99
|
+
? val.type
|
|
100
|
+
: serializeShieldRuleItemV2025R0TypeField(val.type),
|
|
101
|
+
['rule_category']: val.ruleCategory,
|
|
102
|
+
['name']: val.name,
|
|
103
|
+
['description']: val.description,
|
|
104
|
+
['priority']:
|
|
105
|
+
val.priority == void 0
|
|
106
|
+
? val.priority
|
|
107
|
+
: serializeShieldRuleItemV2025R0PriorityField(val.priority),
|
|
108
|
+
['created_at']:
|
|
109
|
+
val.createdAt == void 0
|
|
110
|
+
? val.createdAt
|
|
111
|
+
: serializeDateTime(val.createdAt),
|
|
112
|
+
['modified_at']:
|
|
113
|
+
val.modifiedAt == void 0
|
|
114
|
+
? val.modifiedAt
|
|
115
|
+
: serializeDateTime(val.modifiedAt),
|
|
116
|
+
};
|
|
117
|
+
}
|
|
118
|
+
export function deserializeShieldRuleItemV2025R0(
|
|
119
|
+
val: SerializedData,
|
|
120
|
+
): ShieldRuleItemV2025R0 {
|
|
121
|
+
if (!sdIsMap(val)) {
|
|
122
|
+
throw new BoxSdkError({
|
|
123
|
+
message: 'Expecting a map for "ShieldRuleItemV2025R0"',
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
if (!(val.id == void 0) && !sdIsString(val.id)) {
|
|
127
|
+
throw new BoxSdkError({
|
|
128
|
+
message: 'Expecting string for "id" of type "ShieldRuleItemV2025R0"',
|
|
129
|
+
});
|
|
130
|
+
}
|
|
131
|
+
const id: undefined | string = val.id == void 0 ? void 0 : val.id;
|
|
132
|
+
const type: undefined | ShieldRuleItemV2025R0TypeField =
|
|
133
|
+
val.type == void 0
|
|
134
|
+
? void 0
|
|
135
|
+
: deserializeShieldRuleItemV2025R0TypeField(val.type);
|
|
136
|
+
if (!(val.rule_category == void 0) && !sdIsString(val.rule_category)) {
|
|
137
|
+
throw new BoxSdkError({
|
|
138
|
+
message:
|
|
139
|
+
'Expecting string for "rule_category" of type "ShieldRuleItemV2025R0"',
|
|
140
|
+
});
|
|
141
|
+
}
|
|
142
|
+
const ruleCategory: undefined | string =
|
|
143
|
+
val.rule_category == void 0 ? void 0 : val.rule_category;
|
|
144
|
+
if (!(val.name == void 0) && !sdIsString(val.name)) {
|
|
145
|
+
throw new BoxSdkError({
|
|
146
|
+
message: 'Expecting string for "name" of type "ShieldRuleItemV2025R0"',
|
|
147
|
+
});
|
|
148
|
+
}
|
|
149
|
+
const name: undefined | string = val.name == void 0 ? void 0 : val.name;
|
|
150
|
+
if (!(val.description == void 0) && !sdIsString(val.description)) {
|
|
151
|
+
throw new BoxSdkError({
|
|
152
|
+
message:
|
|
153
|
+
'Expecting string for "description" of type "ShieldRuleItemV2025R0"',
|
|
154
|
+
});
|
|
155
|
+
}
|
|
156
|
+
const description: undefined | string =
|
|
157
|
+
val.description == void 0 ? void 0 : val.description;
|
|
158
|
+
const priority: undefined | ShieldRuleItemV2025R0PriorityField =
|
|
159
|
+
val.priority == void 0
|
|
160
|
+
? void 0
|
|
161
|
+
: deserializeShieldRuleItemV2025R0PriorityField(val.priority);
|
|
162
|
+
if (!(val.created_at == void 0) && !sdIsString(val.created_at)) {
|
|
163
|
+
throw new BoxSdkError({
|
|
164
|
+
message:
|
|
165
|
+
'Expecting string for "created_at" of type "ShieldRuleItemV2025R0"',
|
|
166
|
+
});
|
|
167
|
+
}
|
|
168
|
+
const createdAt: undefined | DateTime =
|
|
169
|
+
val.created_at == void 0 ? void 0 : deserializeDateTime(val.created_at);
|
|
170
|
+
if (!(val.modified_at == void 0) && !sdIsString(val.modified_at)) {
|
|
171
|
+
throw new BoxSdkError({
|
|
172
|
+
message:
|
|
173
|
+
'Expecting string for "modified_at" of type "ShieldRuleItemV2025R0"',
|
|
174
|
+
});
|
|
175
|
+
}
|
|
176
|
+
const modifiedAt: undefined | DateTime =
|
|
177
|
+
val.modified_at == void 0 ? void 0 : deserializeDateTime(val.modified_at);
|
|
178
|
+
return {
|
|
179
|
+
id: id,
|
|
180
|
+
type: type,
|
|
181
|
+
ruleCategory: ruleCategory,
|
|
182
|
+
name: name,
|
|
183
|
+
description: description,
|
|
184
|
+
priority: priority,
|
|
185
|
+
createdAt: createdAt,
|
|
186
|
+
modifiedAt: modifiedAt,
|
|
187
|
+
} satisfies ShieldRuleItemV2025R0;
|
|
188
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { BoxSdkError } from '../../box/errors';
|
|
2
|
+
import { SerializedData } from '../../serialization/json';
|
|
3
|
+
import { sdIsEmpty } from '../../serialization/json';
|
|
4
|
+
import { sdIsBoolean } from '../../serialization/json';
|
|
5
|
+
import { sdIsNumber } from '../../serialization/json';
|
|
6
|
+
import { sdIsString } from '../../serialization/json';
|
|
7
|
+
import { sdIsList } from '../../serialization/json';
|
|
8
|
+
import { sdIsMap } from '../../serialization/json';
|
|
9
|
+
export type UserOrGroupReferenceV2025R0TypeField = 'user' | 'group';
|
|
10
|
+
export interface UserOrGroupReferenceV2025R0 {
|
|
11
|
+
/**
|
|
12
|
+
* The type `user` or `group`. */
|
|
13
|
+
readonly type?: UserOrGroupReferenceV2025R0TypeField;
|
|
14
|
+
/**
|
|
15
|
+
* The identifier of the user or group. */
|
|
16
|
+
readonly id?: string;
|
|
17
|
+
readonly rawData?: SerializedData;
|
|
18
|
+
}
|
|
19
|
+
export function serializeUserOrGroupReferenceV2025R0TypeField(
|
|
20
|
+
val: UserOrGroupReferenceV2025R0TypeField,
|
|
21
|
+
): SerializedData {
|
|
22
|
+
return val;
|
|
23
|
+
}
|
|
24
|
+
export function deserializeUserOrGroupReferenceV2025R0TypeField(
|
|
25
|
+
val: SerializedData,
|
|
26
|
+
): UserOrGroupReferenceV2025R0TypeField {
|
|
27
|
+
if (val == 'user') {
|
|
28
|
+
return val;
|
|
29
|
+
}
|
|
30
|
+
if (val == 'group') {
|
|
31
|
+
return val;
|
|
32
|
+
}
|
|
33
|
+
throw new BoxSdkError({
|
|
34
|
+
message: "Can't deserialize UserOrGroupReferenceV2025R0TypeField",
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
export function serializeUserOrGroupReferenceV2025R0(
|
|
38
|
+
val: UserOrGroupReferenceV2025R0,
|
|
39
|
+
): SerializedData {
|
|
40
|
+
return {
|
|
41
|
+
['type']:
|
|
42
|
+
val.type == void 0
|
|
43
|
+
? val.type
|
|
44
|
+
: serializeUserOrGroupReferenceV2025R0TypeField(val.type),
|
|
45
|
+
['id']: val.id,
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
export function deserializeUserOrGroupReferenceV2025R0(
|
|
49
|
+
val: SerializedData,
|
|
50
|
+
): UserOrGroupReferenceV2025R0 {
|
|
51
|
+
if (!sdIsMap(val)) {
|
|
52
|
+
throw new BoxSdkError({
|
|
53
|
+
message: 'Expecting a map for "UserOrGroupReferenceV2025R0"',
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
const type: undefined | UserOrGroupReferenceV2025R0TypeField =
|
|
57
|
+
val.type == void 0
|
|
58
|
+
? void 0
|
|
59
|
+
: deserializeUserOrGroupReferenceV2025R0TypeField(val.type);
|
|
60
|
+
if (!(val.id == void 0) && !sdIsString(val.id)) {
|
|
61
|
+
throw new BoxSdkError({
|
|
62
|
+
message:
|
|
63
|
+
'Expecting string for "id" of type "UserOrGroupReferenceV2025R0"',
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
const id: undefined | string = val.id == void 0 ? void 0 : val.id;
|
|
67
|
+
return { type: type, id: id } satisfies UserOrGroupReferenceV2025R0;
|
|
68
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { BoxSdkError } from '../../box/errors';
|
|
2
|
+
import { SerializedData } from '../../serialization/json';
|
|
3
|
+
import { sdIsEmpty } from '../../serialization/json';
|
|
4
|
+
import { sdIsBoolean } from '../../serialization/json';
|
|
5
|
+
import { sdIsNumber } from '../../serialization/json';
|
|
6
|
+
import { sdIsString } from '../../serialization/json';
|
|
7
|
+
import { sdIsList } from '../../serialization/json';
|
|
8
|
+
import { sdIsMap } from '../../serialization/json';
|
|
9
|
+
export interface UserTrackingCodeV2025R0 {
|
|
10
|
+
/**
|
|
11
|
+
* The ID of the user tracking code. */
|
|
12
|
+
readonly id?: number | null;
|
|
13
|
+
/**
|
|
14
|
+
* The name of the user tracking code. */
|
|
15
|
+
readonly name?: string | null;
|
|
16
|
+
readonly rawData?: SerializedData;
|
|
17
|
+
}
|
|
18
|
+
export function serializeUserTrackingCodeV2025R0(
|
|
19
|
+
val: UserTrackingCodeV2025R0,
|
|
20
|
+
): SerializedData {
|
|
21
|
+
return { ['id']: val.id, ['name']: val.name };
|
|
22
|
+
}
|
|
23
|
+
export function deserializeUserTrackingCodeV2025R0(
|
|
24
|
+
val: SerializedData,
|
|
25
|
+
): UserTrackingCodeV2025R0 {
|
|
26
|
+
if (!sdIsMap(val)) {
|
|
27
|
+
throw new BoxSdkError({
|
|
28
|
+
message: 'Expecting a map for "UserTrackingCodeV2025R0"',
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
if (!(val.id == void 0) && !sdIsNumber(val.id)) {
|
|
32
|
+
throw new BoxSdkError({
|
|
33
|
+
message: 'Expecting number for "id" of type "UserTrackingCodeV2025R0"',
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
const id: undefined | number = val.id == void 0 ? void 0 : val.id;
|
|
37
|
+
if (!(val.name == void 0) && !sdIsString(val.name)) {
|
|
38
|
+
throw new BoxSdkError({
|
|
39
|
+
message: 'Expecting string for "name" of type "UserTrackingCodeV2025R0"',
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
const name: undefined | string = val.name == void 0 ? void 0 : val.name;
|
|
43
|
+
return { id: id, name: name } satisfies UserTrackingCodeV2025R0;
|
|
44
|
+
}
|
|
@@ -6,12 +6,12 @@ import { sdIsNumber } from '../../serialization/json';
|
|
|
6
6
|
import { sdIsString } from '../../serialization/json';
|
|
7
7
|
import { sdIsList } from '../../serialization/json';
|
|
8
8
|
import { sdIsMap } from '../../serialization/json';
|
|
9
|
-
export type WeblinkReferenceV2025R0TypeField = '
|
|
9
|
+
export type WeblinkReferenceV2025R0TypeField = 'web_link';
|
|
10
10
|
export class WeblinkReferenceV2025R0 {
|
|
11
11
|
/**
|
|
12
|
-
* The value will always be `
|
|
12
|
+
* The value will always be `web_link`. */
|
|
13
13
|
readonly type: WeblinkReferenceV2025R0TypeField =
|
|
14
|
-
'
|
|
14
|
+
'web_link' as WeblinkReferenceV2025R0TypeField;
|
|
15
15
|
/**
|
|
16
16
|
* ID of the web link. */
|
|
17
17
|
readonly id!: string;
|
|
@@ -33,7 +33,7 @@ export class WeblinkReferenceV2025R0 {
|
|
|
33
33
|
}
|
|
34
34
|
export interface WeblinkReferenceV2025R0Input {
|
|
35
35
|
/**
|
|
36
|
-
* The value will always be `
|
|
36
|
+
* The value will always be `web_link`. */
|
|
37
37
|
readonly type?: WeblinkReferenceV2025R0TypeField;
|
|
38
38
|
/**
|
|
39
39
|
* ID of the web link. */
|
|
@@ -48,7 +48,7 @@ export function serializeWeblinkReferenceV2025R0TypeField(
|
|
|
48
48
|
export function deserializeWeblinkReferenceV2025R0TypeField(
|
|
49
49
|
val: SerializedData,
|
|
50
50
|
): WeblinkReferenceV2025R0TypeField {
|
|
51
|
-
if (val == '
|
|
51
|
+
if (val == 'web_link') {
|
|
52
52
|
return val;
|
|
53
53
|
}
|
|
54
54
|
throw new BoxSdkError({
|
|
@@ -2,11 +2,16 @@ import { serializeArchiveV2025R0 } from '@/schemas/v2025R0/archiveV2025R0';
|
|
|
2
2
|
import { deserializeArchiveV2025R0 } from '@/schemas/v2025R0/archiveV2025R0';
|
|
3
3
|
import { serializeCreateArchiveV2025R0RequestBody } from '@/managers/archives';
|
|
4
4
|
import { deserializeCreateArchiveV2025R0RequestBody } from '@/managers/archives';
|
|
5
|
+
import { serializeUpdateArchiveByIdV2025R0RequestBody } from '@/managers/archives';
|
|
6
|
+
import { deserializeUpdateArchiveByIdV2025R0RequestBody } from '@/managers/archives';
|
|
5
7
|
import { serializeArchivesV2025R0 } from '@/schemas/v2025R0/archivesV2025R0';
|
|
6
8
|
import { deserializeArchivesV2025R0 } from '@/schemas/v2025R0/archivesV2025R0';
|
|
9
|
+
import { UpdateArchiveByIdV2025R0OptionalsInput } from '@/managers/archives';
|
|
10
|
+
import { UpdateArchiveByIdV2025R0Optionals } from '@/managers/archives';
|
|
7
11
|
import { BoxClient } from '@/client';
|
|
8
12
|
import { ArchiveV2025R0 } from '@/schemas/v2025R0/archiveV2025R0';
|
|
9
13
|
import { CreateArchiveV2025R0RequestBody } from '@/managers/archives';
|
|
14
|
+
import { UpdateArchiveByIdV2025R0RequestBody } from '@/managers/archives';
|
|
10
15
|
import { ArchivesV2025R0 } from '@/schemas/v2025R0/archivesV2025R0';
|
|
11
16
|
import { GetArchivesV2025R0QueryParams } from '@/managers/archives';
|
|
12
17
|
import { getUuid } from '@/internal/utils';
|
|
@@ -25,8 +30,10 @@ export const userId: string = getEnvVar('USER_ID');
|
|
|
25
30
|
export const client: BoxClient = getDefaultClientWithUserSubject(userId);
|
|
26
31
|
test('testArchivesCreateListDelete', async function testArchivesCreateListDelete(): Promise<any> {
|
|
27
32
|
const archiveName: string = getUuid();
|
|
33
|
+
const archiveDescription: string = 'Test Archive Description';
|
|
28
34
|
const archive: ArchiveV2025R0 = await client.archives.createArchiveV2025R0({
|
|
29
35
|
name: archiveName,
|
|
36
|
+
description: archiveDescription,
|
|
30
37
|
} satisfies CreateArchiveV2025R0RequestBody);
|
|
31
38
|
if (!((toString(archive.type) as string) == 'archive')) {
|
|
32
39
|
throw new Error('Assertion failed');
|
|
@@ -34,6 +41,24 @@ test('testArchivesCreateListDelete', async function testArchivesCreateListDelete
|
|
|
34
41
|
if (!(archive.name == archiveName)) {
|
|
35
42
|
throw new Error('Assertion failed');
|
|
36
43
|
}
|
|
44
|
+
if (!(archive.description == archiveDescription)) {
|
|
45
|
+
throw new Error('Assertion failed');
|
|
46
|
+
}
|
|
47
|
+
const newArchiveName: string = getUuid();
|
|
48
|
+
const newArchiveDescription: string = 'Updated Archive Description';
|
|
49
|
+
const updatedArchive: ArchiveV2025R0 =
|
|
50
|
+
await client.archives.updateArchiveByIdV2025R0(archive.id, {
|
|
51
|
+
requestBody: {
|
|
52
|
+
name: newArchiveName,
|
|
53
|
+
description: newArchiveDescription,
|
|
54
|
+
} satisfies UpdateArchiveByIdV2025R0RequestBody,
|
|
55
|
+
} satisfies UpdateArchiveByIdV2025R0OptionalsInput);
|
|
56
|
+
if (!(updatedArchive.name == newArchiveName)) {
|
|
57
|
+
throw new Error('Assertion failed');
|
|
58
|
+
}
|
|
59
|
+
if (!(updatedArchive.description! == newArchiveDescription)) {
|
|
60
|
+
throw new Error('Assertion failed');
|
|
61
|
+
}
|
|
37
62
|
const archives: ArchivesV2025R0 = await client.archives.getArchivesV2025R0({
|
|
38
63
|
limit: 100,
|
|
39
64
|
} satisfies GetArchivesV2025R0QueryParams);
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { serializeEnterpriseConfigurationV2025R0 } from '@/schemas/v2025R0/enterpriseConfigurationV2025R0';
|
|
2
|
+
import { deserializeEnterpriseConfigurationV2025R0 } from '@/schemas/v2025R0/enterpriseConfigurationV2025R0';
|
|
3
|
+
import { serializeEnterpriseConfigurationUserSettingsV2025R0 } from '@/schemas/v2025R0/enterpriseConfigurationUserSettingsV2025R0';
|
|
4
|
+
import { deserializeEnterpriseConfigurationUserSettingsV2025R0 } from '@/schemas/v2025R0/enterpriseConfigurationUserSettingsV2025R0';
|
|
5
|
+
import { serializeEnterpriseConfigurationContentAndSharingV2025R0 } from '@/schemas/v2025R0/enterpriseConfigurationContentAndSharingV2025R0';
|
|
6
|
+
import { deserializeEnterpriseConfigurationContentAndSharingV2025R0 } from '@/schemas/v2025R0/enterpriseConfigurationContentAndSharingV2025R0';
|
|
7
|
+
import { serializeEnterpriseConfigurationSecurityV2025R0 } from '@/schemas/v2025R0/enterpriseConfigurationSecurityV2025R0';
|
|
8
|
+
import { deserializeEnterpriseConfigurationSecurityV2025R0 } from '@/schemas/v2025R0/enterpriseConfigurationSecurityV2025R0';
|
|
9
|
+
import { serializeEnterpriseConfigurationShieldV2025R0 } from '@/schemas/v2025R0/enterpriseConfigurationShieldV2025R0';
|
|
10
|
+
import { deserializeEnterpriseConfigurationShieldV2025R0 } from '@/schemas/v2025R0/enterpriseConfigurationShieldV2025R0';
|
|
11
|
+
import { BoxClient } from '@/client';
|
|
12
|
+
import { EnterpriseConfigurationV2025R0 } from '@/schemas/v2025R0/enterpriseConfigurationV2025R0';
|
|
13
|
+
import { GetEnterpriseConfigurationByIdV2025R0QueryParams } from '@/managers/enterpriseConfigurations';
|
|
14
|
+
import { getEnvVar } from '@/internal/utils';
|
|
15
|
+
import { getDefaultClientWithUserSubject } from './commons';
|
|
16
|
+
import { EnterpriseConfigurationUserSettingsV2025R0 } from '@/schemas/v2025R0/enterpriseConfigurationUserSettingsV2025R0';
|
|
17
|
+
import { EnterpriseConfigurationContentAndSharingV2025R0 } from '@/schemas/v2025R0/enterpriseConfigurationContentAndSharingV2025R0';
|
|
18
|
+
import { EnterpriseConfigurationSecurityV2025R0 } from '@/schemas/v2025R0/enterpriseConfigurationSecurityV2025R0';
|
|
19
|
+
import { EnterpriseConfigurationShieldV2025R0 } from '@/schemas/v2025R0/enterpriseConfigurationShieldV2025R0';
|
|
20
|
+
import { toString } from '@/internal/utils';
|
|
21
|
+
import { sdToJson } from '@/serialization/json';
|
|
22
|
+
import { SerializedData } from '@/serialization/json';
|
|
23
|
+
import { sdIsEmpty } from '@/serialization/json';
|
|
24
|
+
import { sdIsBoolean } from '@/serialization/json';
|
|
25
|
+
import { sdIsNumber } from '@/serialization/json';
|
|
26
|
+
import { sdIsString } from '@/serialization/json';
|
|
27
|
+
import { sdIsList } from '@/serialization/json';
|
|
28
|
+
import { sdIsMap } from '@/serialization/json';
|
|
29
|
+
export const adminClient: BoxClient = getDefaultClientWithUserSubject(
|
|
30
|
+
getEnvVar('USER_ID'),
|
|
31
|
+
);
|
|
32
|
+
test('testGetEnterpriseConfigurationById', async function testGetEnterpriseConfigurationById(): Promise<any> {
|
|
33
|
+
const enterpriseId: string = getEnvVar('ENTERPRISE_ID');
|
|
34
|
+
const enterpriseConfiguration: EnterpriseConfigurationV2025R0 =
|
|
35
|
+
await adminClient.enterpriseConfigurations.getEnterpriseConfigurationByIdV2025R0(
|
|
36
|
+
enterpriseId,
|
|
37
|
+
{
|
|
38
|
+
categories: [
|
|
39
|
+
'user_settings',
|
|
40
|
+
'content_and_sharing',
|
|
41
|
+
'security',
|
|
42
|
+
'shield',
|
|
43
|
+
],
|
|
44
|
+
} satisfies GetEnterpriseConfigurationByIdV2025R0QueryParams,
|
|
45
|
+
);
|
|
46
|
+
if (
|
|
47
|
+
!(
|
|
48
|
+
(toString(enterpriseConfiguration.type) as string) ==
|
|
49
|
+
'enterprise_configuration'
|
|
50
|
+
)
|
|
51
|
+
) {
|
|
52
|
+
throw new Error('Assertion failed');
|
|
53
|
+
}
|
|
54
|
+
const userSettings: EnterpriseConfigurationUserSettingsV2025R0 =
|
|
55
|
+
enterpriseConfiguration.userSettings!!;
|
|
56
|
+
if (!(userSettings.isEnterpriseSsoRequired!.value == false)) {
|
|
57
|
+
throw new Error('Assertion failed');
|
|
58
|
+
}
|
|
59
|
+
if (!(userSettings.newUserDefaultLanguage!.value == 'English (US)')) {
|
|
60
|
+
throw new Error('Assertion failed');
|
|
61
|
+
}
|
|
62
|
+
if (!(userSettings.newUserDefaultStorageLimit!.value == -1)) {
|
|
63
|
+
throw new Error('Assertion failed');
|
|
64
|
+
}
|
|
65
|
+
const contentAndSharing: EnterpriseConfigurationContentAndSharingV2025R0 =
|
|
66
|
+
enterpriseConfiguration.contentAndSharing!!;
|
|
67
|
+
if (
|
|
68
|
+
!(
|
|
69
|
+
contentAndSharing.collaborationPermissions!.value!.isEditorRoleEnabled ==
|
|
70
|
+
true
|
|
71
|
+
)
|
|
72
|
+
) {
|
|
73
|
+
throw new Error('Assertion failed');
|
|
74
|
+
}
|
|
75
|
+
const security: EnterpriseConfigurationSecurityV2025R0 =
|
|
76
|
+
enterpriseConfiguration.security!!;
|
|
77
|
+
if (!(security.isManagedUserSignupEnabled!.value! == false)) {
|
|
78
|
+
throw new Error('Assertion failed');
|
|
79
|
+
}
|
|
80
|
+
const shield: EnterpriseConfigurationShieldV2025R0 =
|
|
81
|
+
enterpriseConfiguration.shield!!;
|
|
82
|
+
if (!(shield.shieldRules!.length == 0)) {
|
|
83
|
+
throw new Error('Assertion failed');
|
|
84
|
+
}
|
|
85
|
+
});
|
|
86
|
+
export {};
|
package/src/test/events.test.ts
CHANGED
|
@@ -74,7 +74,7 @@ test('testEventUpload', async function testEventUpload(): Promise<any> {
|
|
|
74
74
|
throw new Error('Assertion failed');
|
|
75
75
|
}
|
|
76
76
|
if (
|
|
77
|
-
|
|
77
|
+
!!((toString(firstEvent.additionalDetails!.service_id) as string) == '')
|
|
78
78
|
) {
|
|
79
79
|
throw new Error('Assertion failed');
|
|
80
80
|
}
|