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,180 @@
|
|
|
1
|
+
import { serializeEnterpriseConfigurationV2025R0 } from '../schemas/v2025R0/enterpriseConfigurationV2025R0';
|
|
2
|
+
import { deserializeEnterpriseConfigurationV2025R0 } from '../schemas/v2025R0/enterpriseConfigurationV2025R0';
|
|
3
|
+
import { serializeClientErrorV2025R0 } from '../schemas/v2025R0/clientErrorV2025R0';
|
|
4
|
+
import { deserializeClientErrorV2025R0 } from '../schemas/v2025R0/clientErrorV2025R0';
|
|
5
|
+
import { serializeBoxVersionHeaderV2025R0 } from '../parameters/v2025R0/boxVersionHeaderV2025R0';
|
|
6
|
+
import { deserializeBoxVersionHeaderV2025R0 } from '../parameters/v2025R0/boxVersionHeaderV2025R0';
|
|
7
|
+
import { ResponseFormat } from '../networking/fetchOptions';
|
|
8
|
+
import { EnterpriseConfigurationV2025R0 } from '../schemas/v2025R0/enterpriseConfigurationV2025R0';
|
|
9
|
+
import { ClientErrorV2025R0 } from '../schemas/v2025R0/clientErrorV2025R0';
|
|
10
|
+
import { BoxVersionHeaderV2025R0 } from '../parameters/v2025R0/boxVersionHeaderV2025R0';
|
|
11
|
+
import { BoxSdkError } from '../box/errors';
|
|
12
|
+
import { Authentication } from '../networking/auth';
|
|
13
|
+
import { NetworkSession } from '../networking/network';
|
|
14
|
+
import { FetchOptions } from '../networking/fetchOptions';
|
|
15
|
+
import { FetchResponse } from '../networking/fetchResponse';
|
|
16
|
+
import { prepareParams } from '../internal/utils';
|
|
17
|
+
import { toString } from '../internal/utils';
|
|
18
|
+
import { ByteStream } from '../internal/utils';
|
|
19
|
+
import { CancellationToken } from '../internal/utils';
|
|
20
|
+
import { sdToJson } from '../serialization/json';
|
|
21
|
+
import { SerializedData } from '../serialization/json';
|
|
22
|
+
import { sdIsEmpty } from '../serialization/json';
|
|
23
|
+
import { sdIsBoolean } from '../serialization/json';
|
|
24
|
+
import { sdIsNumber } from '../serialization/json';
|
|
25
|
+
import { sdIsString } from '../serialization/json';
|
|
26
|
+
import { sdIsList } from '../serialization/json';
|
|
27
|
+
import { sdIsMap } from '../serialization/json';
|
|
28
|
+
export class GetEnterpriseConfigurationByIdV2025R0Optionals {
|
|
29
|
+
readonly headers: GetEnterpriseConfigurationByIdV2025R0Headers =
|
|
30
|
+
new GetEnterpriseConfigurationByIdV2025R0Headers({});
|
|
31
|
+
readonly cancellationToken?: CancellationToken = void 0;
|
|
32
|
+
constructor(
|
|
33
|
+
fields: Omit<
|
|
34
|
+
GetEnterpriseConfigurationByIdV2025R0Optionals,
|
|
35
|
+
'headers' | 'cancellationToken'
|
|
36
|
+
> &
|
|
37
|
+
Partial<
|
|
38
|
+
Pick<
|
|
39
|
+
GetEnterpriseConfigurationByIdV2025R0Optionals,
|
|
40
|
+
'headers' | 'cancellationToken'
|
|
41
|
+
>
|
|
42
|
+
>,
|
|
43
|
+
) {
|
|
44
|
+
if (fields.headers !== undefined) {
|
|
45
|
+
this.headers = fields.headers;
|
|
46
|
+
}
|
|
47
|
+
if (fields.cancellationToken !== undefined) {
|
|
48
|
+
this.cancellationToken = fields.cancellationToken;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
export interface GetEnterpriseConfigurationByIdV2025R0OptionalsInput {
|
|
53
|
+
readonly headers?: GetEnterpriseConfigurationByIdV2025R0Headers;
|
|
54
|
+
readonly cancellationToken?: undefined | CancellationToken;
|
|
55
|
+
}
|
|
56
|
+
export interface GetEnterpriseConfigurationByIdV2025R0QueryParams {
|
|
57
|
+
/**
|
|
58
|
+
* A comma-separated list of the enterprise configuration categories.
|
|
59
|
+
* Allowed values: `security`, `content_and_sharing`, `user_settings`, `shield`. */
|
|
60
|
+
readonly categories: readonly string[];
|
|
61
|
+
}
|
|
62
|
+
export class GetEnterpriseConfigurationByIdV2025R0Headers {
|
|
63
|
+
/**
|
|
64
|
+
* Version header. */
|
|
65
|
+
readonly boxVersion: BoxVersionHeaderV2025R0 =
|
|
66
|
+
'2025.0' as BoxVersionHeaderV2025R0;
|
|
67
|
+
/**
|
|
68
|
+
* Extra headers that will be included in the HTTP request. */
|
|
69
|
+
readonly extraHeaders?: {
|
|
70
|
+
readonly [key: string]: undefined | string;
|
|
71
|
+
} = {};
|
|
72
|
+
constructor(
|
|
73
|
+
fields: Omit<
|
|
74
|
+
GetEnterpriseConfigurationByIdV2025R0Headers,
|
|
75
|
+
'boxVersion' | 'extraHeaders'
|
|
76
|
+
> &
|
|
77
|
+
Partial<
|
|
78
|
+
Pick<
|
|
79
|
+
GetEnterpriseConfigurationByIdV2025R0Headers,
|
|
80
|
+
'boxVersion' | 'extraHeaders'
|
|
81
|
+
>
|
|
82
|
+
>,
|
|
83
|
+
) {
|
|
84
|
+
if (fields.boxVersion !== undefined) {
|
|
85
|
+
this.boxVersion = fields.boxVersion;
|
|
86
|
+
}
|
|
87
|
+
if (fields.extraHeaders !== undefined) {
|
|
88
|
+
this.extraHeaders = fields.extraHeaders;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
export interface GetEnterpriseConfigurationByIdV2025R0HeadersInput {
|
|
93
|
+
/**
|
|
94
|
+
* Version header. */
|
|
95
|
+
readonly boxVersion?: BoxVersionHeaderV2025R0;
|
|
96
|
+
/**
|
|
97
|
+
* Extra headers that will be included in the HTTP request. */
|
|
98
|
+
readonly extraHeaders?:
|
|
99
|
+
| undefined
|
|
100
|
+
| {
|
|
101
|
+
readonly [key: string]: undefined | string;
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
export class EnterpriseConfigurationsManager {
|
|
105
|
+
readonly auth?: Authentication;
|
|
106
|
+
readonly networkSession: NetworkSession = new NetworkSession({});
|
|
107
|
+
constructor(
|
|
108
|
+
fields: Omit<
|
|
109
|
+
EnterpriseConfigurationsManager,
|
|
110
|
+
'networkSession' | 'getEnterpriseConfigurationByIdV2025R0'
|
|
111
|
+
> &
|
|
112
|
+
Partial<Pick<EnterpriseConfigurationsManager, 'networkSession'>>,
|
|
113
|
+
) {
|
|
114
|
+
if (fields.auth !== undefined) {
|
|
115
|
+
this.auth = fields.auth;
|
|
116
|
+
}
|
|
117
|
+
if (fields.networkSession !== undefined) {
|
|
118
|
+
this.networkSession = fields.networkSession;
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* Retrieves the configuration for an enterprise.
|
|
123
|
+
* @param {string} enterpriseId The ID of the enterprise.
|
|
124
|
+
Example: "3442311"
|
|
125
|
+
* @param {GetEnterpriseConfigurationByIdV2025R0QueryParams} queryParams Query parameters of getEnterpriseConfigurationByIdV2025R0 method
|
|
126
|
+
* @param {GetEnterpriseConfigurationByIdV2025R0OptionalsInput} optionalsInput
|
|
127
|
+
* @returns {Promise<EnterpriseConfigurationV2025R0>}
|
|
128
|
+
*/
|
|
129
|
+
async getEnterpriseConfigurationByIdV2025R0(
|
|
130
|
+
enterpriseId: string,
|
|
131
|
+
queryParams: GetEnterpriseConfigurationByIdV2025R0QueryParams,
|
|
132
|
+
optionalsInput: GetEnterpriseConfigurationByIdV2025R0OptionalsInput = {},
|
|
133
|
+
): Promise<EnterpriseConfigurationV2025R0> {
|
|
134
|
+
const optionals: GetEnterpriseConfigurationByIdV2025R0Optionals =
|
|
135
|
+
new GetEnterpriseConfigurationByIdV2025R0Optionals({
|
|
136
|
+
headers: optionalsInput.headers,
|
|
137
|
+
cancellationToken: optionalsInput.cancellationToken,
|
|
138
|
+
});
|
|
139
|
+
const headers: any = optionals.headers;
|
|
140
|
+
const cancellationToken: any = optionals.cancellationToken;
|
|
141
|
+
const queryParamsMap: {
|
|
142
|
+
readonly [key: string]: string;
|
|
143
|
+
} = prepareParams({
|
|
144
|
+
['categories']: queryParams.categories
|
|
145
|
+
? queryParams.categories.map(toString).join(',')
|
|
146
|
+
: undefined,
|
|
147
|
+
});
|
|
148
|
+
const headersMap: {
|
|
149
|
+
readonly [key: string]: string;
|
|
150
|
+
} = prepareParams({
|
|
151
|
+
...{ ['box-version']: toString(headers.boxVersion) as string },
|
|
152
|
+
...headers.extraHeaders,
|
|
153
|
+
});
|
|
154
|
+
const response: FetchResponse =
|
|
155
|
+
await this.networkSession.networkClient.fetch(
|
|
156
|
+
new FetchOptions({
|
|
157
|
+
url: ''.concat(
|
|
158
|
+
this.networkSession.baseUrls.baseUrl,
|
|
159
|
+
'/2.0/enterprise_configurations/',
|
|
160
|
+
toString(enterpriseId) as string,
|
|
161
|
+
) as string,
|
|
162
|
+
method: 'GET',
|
|
163
|
+
params: queryParamsMap,
|
|
164
|
+
headers: headersMap,
|
|
165
|
+
responseFormat: 'json' as ResponseFormat,
|
|
166
|
+
auth: this.auth,
|
|
167
|
+
networkSession: this.networkSession,
|
|
168
|
+
cancellationToken: cancellationToken,
|
|
169
|
+
}),
|
|
170
|
+
);
|
|
171
|
+
return {
|
|
172
|
+
...deserializeEnterpriseConfigurationV2025R0(response.data!),
|
|
173
|
+
rawData: response.data!,
|
|
174
|
+
};
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
export interface EnterpriseConfigurationsManagerInput {
|
|
178
|
+
readonly auth?: Authentication;
|
|
179
|
+
readonly networkSession?: NetworkSession;
|
|
180
|
+
}
|
package/src/managers/index.ts
CHANGED
|
@@ -72,6 +72,7 @@ export * from './ai';
|
|
|
72
72
|
export * from './aiStudio';
|
|
73
73
|
export * from './docgenTemplate';
|
|
74
74
|
export * from './docgen';
|
|
75
|
+
export * from './enterpriseConfigurations';
|
|
75
76
|
export * from './hubs';
|
|
76
77
|
export * from './hubCollaborations';
|
|
77
78
|
export * from './hubItems';
|
package/src/managers/users.ts
CHANGED
|
@@ -595,8 +595,8 @@ export interface DeleteUserByIdQueryParams {
|
|
|
595
595
|
* the deletion. */
|
|
596
596
|
readonly notify?: boolean;
|
|
597
597
|
/**
|
|
598
|
-
*
|
|
599
|
-
*
|
|
598
|
+
* Specifies whether to delete the user even if they still own files,
|
|
599
|
+
* were recently active, or recently joined the enterprise from a free account. */
|
|
600
600
|
readonly force?: boolean;
|
|
601
601
|
}
|
|
602
602
|
export class DeleteUserByIdHeaders {
|
|
@@ -933,9 +933,9 @@ export class UsersManager {
|
|
|
933
933
|
};
|
|
934
934
|
}
|
|
935
935
|
/**
|
|
936
|
-
* Deletes a user. By default this
|
|
937
|
-
* still owns any content
|
|
938
|
-
*
|
|
936
|
+
* Deletes a user. By default, this operation fails if the user
|
|
937
|
+
* still owns any content, was recently active, or recently joined the enterprise from a free account.
|
|
938
|
+
* To proceed, move their owned content first, or use the `force` parameter to delete
|
|
939
939
|
* the user and their files.
|
|
940
940
|
* @param {string} userId The ID of the user.
|
|
941
941
|
Example: "12345"
|
|
@@ -178,8 +178,9 @@ export class BoxNetworkClient implements NetworkClient {
|
|
|
178
178
|
: void 0;
|
|
179
179
|
|
|
180
180
|
let isExceptionCase: boolean = false;
|
|
181
|
-
let fetchResponse: FetchResponse;
|
|
181
|
+
let fetchResponse: FetchResponse | undefined;
|
|
182
182
|
let responseBytesBuffer;
|
|
183
|
+
let caughtError: Error | undefined;
|
|
183
184
|
const { params = {} } = fetchOptions;
|
|
184
185
|
|
|
185
186
|
const requestInit = await createRequestInit({
|
|
@@ -243,10 +244,8 @@ export class BoxNetworkClient implements NetworkClient {
|
|
|
243
244
|
} catch (error) {
|
|
244
245
|
isExceptionCase = true;
|
|
245
246
|
numberOfRetriesOnException++;
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
headers: {},
|
|
249
|
-
};
|
|
247
|
+
caughtError = error instanceof Error ? error : new Error(String(error));
|
|
248
|
+
fetchResponse = fetchResponse ?? { status: 0, headers: {} };
|
|
250
249
|
}
|
|
251
250
|
const attemptForRetry = isExceptionCase
|
|
252
251
|
? numberOfRetriesOnException
|
|
@@ -317,6 +316,14 @@ export class BoxNetworkClient implements NetworkClient {
|
|
|
317
316
|
]
|
|
318
317
|
: [];
|
|
319
318
|
|
|
319
|
+
if (fetchResponse.status === 0) {
|
|
320
|
+
throw new BoxSdkError({
|
|
321
|
+
message: `Unexpected Error occurred`,
|
|
322
|
+
timestamp: `${Date.now()}`,
|
|
323
|
+
error: caughtError,
|
|
324
|
+
});
|
|
325
|
+
}
|
|
326
|
+
|
|
320
327
|
throw new BoxApiError({
|
|
321
328
|
message: `${fetchResponse.status} ${message}; Request ID: ${requestId}`,
|
|
322
329
|
timestamp: `${Date.now()}`,
|
|
@@ -80,7 +80,9 @@ export class BoxRetryStrategy implements RetryStrategy {
|
|
|
80
80
|
const isSuccessful: boolean =
|
|
81
81
|
fetchResponse.status >= 200 && fetchResponse.status < 400;
|
|
82
82
|
const retryAfterHeader: undefined | string =
|
|
83
|
-
|
|
83
|
+
'Retry-After' in fetchResponse.headers
|
|
84
|
+
? fetchResponse.headers['Retry-After']
|
|
85
|
+
: void 0;
|
|
84
86
|
const isAcceptedWithRetryAfter: boolean =
|
|
85
87
|
fetchResponse.status == 202 && !(retryAfterHeader == void 0);
|
|
86
88
|
if (attemptNumber >= this.maxAttempts) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export const sdkVersion = '10.0
|
|
1
|
+
export const sdkVersion = '10.1.0';
|
|
@@ -7,12 +7,21 @@ import { sdIsString } from '../../serialization/json';
|
|
|
7
7
|
import { sdIsList } from '../../serialization/json';
|
|
8
8
|
import { sdIsMap } from '../../serialization/json';
|
|
9
9
|
export type ArchiveV2025R0TypeField = 'archive';
|
|
10
|
+
export interface ArchiveV2025R0OwnedByField {
|
|
11
|
+
/**
|
|
12
|
+
* The unique identifier that represents a user who owns the archive. */
|
|
13
|
+
readonly id: string;
|
|
14
|
+
/**
|
|
15
|
+
* The value is always `user`. */
|
|
16
|
+
readonly type: string;
|
|
17
|
+
readonly rawData?: SerializedData;
|
|
18
|
+
}
|
|
10
19
|
export class ArchiveV2025R0 {
|
|
11
20
|
/**
|
|
12
21
|
* The unique identifier that represents an archive. */
|
|
13
22
|
readonly id!: string;
|
|
14
23
|
/**
|
|
15
|
-
* The value
|
|
24
|
+
* The value is always `archive`. */
|
|
16
25
|
readonly type: ArchiveV2025R0TypeField = 'archive' as ArchiveV2025R0TypeField;
|
|
17
26
|
/**
|
|
18
27
|
* The name of the archive.
|
|
@@ -25,6 +34,12 @@ export class ArchiveV2025R0 {
|
|
|
25
34
|
/**
|
|
26
35
|
* The size of the archive in bytes. */
|
|
27
36
|
readonly size!: number;
|
|
37
|
+
/**
|
|
38
|
+
* The description of the archive. */
|
|
39
|
+
readonly description?: string | null;
|
|
40
|
+
/**
|
|
41
|
+
* The part of an archive API response that describes the user who owns the archive. */
|
|
42
|
+
readonly ownedBy?: ArchiveV2025R0OwnedByField;
|
|
28
43
|
readonly rawData?: SerializedData;
|
|
29
44
|
constructor(
|
|
30
45
|
fields: Omit<ArchiveV2025R0, 'type'> &
|
|
@@ -42,6 +57,12 @@ export class ArchiveV2025R0 {
|
|
|
42
57
|
if (fields.size !== undefined) {
|
|
43
58
|
this.size = fields.size;
|
|
44
59
|
}
|
|
60
|
+
if (fields.description !== undefined) {
|
|
61
|
+
this.description = fields.description;
|
|
62
|
+
}
|
|
63
|
+
if (fields.ownedBy !== undefined) {
|
|
64
|
+
this.ownedBy = fields.ownedBy;
|
|
65
|
+
}
|
|
45
66
|
if (fields.rawData !== undefined) {
|
|
46
67
|
this.rawData = fields.rawData;
|
|
47
68
|
}
|
|
@@ -52,7 +73,7 @@ export interface ArchiveV2025R0Input {
|
|
|
52
73
|
* The unique identifier that represents an archive. */
|
|
53
74
|
readonly id: string;
|
|
54
75
|
/**
|
|
55
|
-
* The value
|
|
76
|
+
* The value is always `archive`. */
|
|
56
77
|
readonly type?: ArchiveV2025R0TypeField;
|
|
57
78
|
/**
|
|
58
79
|
* The name of the archive.
|
|
@@ -65,6 +86,12 @@ export interface ArchiveV2025R0Input {
|
|
|
65
86
|
/**
|
|
66
87
|
* The size of the archive in bytes. */
|
|
67
88
|
readonly size: number;
|
|
89
|
+
/**
|
|
90
|
+
* The description of the archive. */
|
|
91
|
+
readonly description?: string | null;
|
|
92
|
+
/**
|
|
93
|
+
* The part of an archive API response that describes the user who owns the archive. */
|
|
94
|
+
readonly ownedBy?: ArchiveV2025R0OwnedByField;
|
|
68
95
|
readonly rawData?: SerializedData;
|
|
69
96
|
}
|
|
70
97
|
export function serializeArchiveV2025R0TypeField(
|
|
@@ -82,12 +109,57 @@ export function deserializeArchiveV2025R0TypeField(
|
|
|
82
109
|
message: "Can't deserialize ArchiveV2025R0TypeField",
|
|
83
110
|
});
|
|
84
111
|
}
|
|
112
|
+
export function serializeArchiveV2025R0OwnedByField(
|
|
113
|
+
val: ArchiveV2025R0OwnedByField,
|
|
114
|
+
): SerializedData {
|
|
115
|
+
return { ['id']: val.id, ['type']: val.type };
|
|
116
|
+
}
|
|
117
|
+
export function deserializeArchiveV2025R0OwnedByField(
|
|
118
|
+
val: SerializedData,
|
|
119
|
+
): ArchiveV2025R0OwnedByField {
|
|
120
|
+
if (!sdIsMap(val)) {
|
|
121
|
+
throw new BoxSdkError({
|
|
122
|
+
message: 'Expecting a map for "ArchiveV2025R0OwnedByField"',
|
|
123
|
+
});
|
|
124
|
+
}
|
|
125
|
+
if (val.id == void 0) {
|
|
126
|
+
throw new BoxSdkError({
|
|
127
|
+
message:
|
|
128
|
+
'Expecting "id" of type "ArchiveV2025R0OwnedByField" to be defined',
|
|
129
|
+
});
|
|
130
|
+
}
|
|
131
|
+
if (!sdIsString(val.id)) {
|
|
132
|
+
throw new BoxSdkError({
|
|
133
|
+
message: 'Expecting string for "id" of type "ArchiveV2025R0OwnedByField"',
|
|
134
|
+
});
|
|
135
|
+
}
|
|
136
|
+
const id: string = val.id;
|
|
137
|
+
if (val.type == void 0) {
|
|
138
|
+
throw new BoxSdkError({
|
|
139
|
+
message:
|
|
140
|
+
'Expecting "type" of type "ArchiveV2025R0OwnedByField" to be defined',
|
|
141
|
+
});
|
|
142
|
+
}
|
|
143
|
+
if (!sdIsString(val.type)) {
|
|
144
|
+
throw new BoxSdkError({
|
|
145
|
+
message:
|
|
146
|
+
'Expecting string for "type" of type "ArchiveV2025R0OwnedByField"',
|
|
147
|
+
});
|
|
148
|
+
}
|
|
149
|
+
const type: string = val.type;
|
|
150
|
+
return { id: id, type: type } satisfies ArchiveV2025R0OwnedByField;
|
|
151
|
+
}
|
|
85
152
|
export function serializeArchiveV2025R0(val: ArchiveV2025R0): SerializedData {
|
|
86
153
|
return {
|
|
87
154
|
['id']: val.id,
|
|
88
155
|
['type']: serializeArchiveV2025R0TypeField(val.type),
|
|
89
156
|
['name']: val.name,
|
|
90
157
|
['size']: val.size,
|
|
158
|
+
['description']: val.description,
|
|
159
|
+
['owned_by']:
|
|
160
|
+
val.ownedBy == void 0
|
|
161
|
+
? val.ownedBy
|
|
162
|
+
: serializeArchiveV2025R0OwnedByField(val.ownedBy),
|
|
91
163
|
};
|
|
92
164
|
}
|
|
93
165
|
export function deserializeArchiveV2025R0(val: SerializedData): ArchiveV2025R0 {
|
|
@@ -135,11 +207,24 @@ export function deserializeArchiveV2025R0(val: SerializedData): ArchiveV2025R0 {
|
|
|
135
207
|
});
|
|
136
208
|
}
|
|
137
209
|
const size: number = val.size;
|
|
210
|
+
if (!(val.description == void 0) && !sdIsString(val.description)) {
|
|
211
|
+
throw new BoxSdkError({
|
|
212
|
+
message: 'Expecting string for "description" of type "ArchiveV2025R0"',
|
|
213
|
+
});
|
|
214
|
+
}
|
|
215
|
+
const description: undefined | string =
|
|
216
|
+
val.description == void 0 ? void 0 : val.description;
|
|
217
|
+
const ownedBy: undefined | ArchiveV2025R0OwnedByField =
|
|
218
|
+
val.owned_by == void 0
|
|
219
|
+
? void 0
|
|
220
|
+
: deserializeArchiveV2025R0OwnedByField(val.owned_by);
|
|
138
221
|
return {
|
|
139
222
|
id: id,
|
|
140
223
|
type: type,
|
|
141
224
|
name: name,
|
|
142
225
|
size: size,
|
|
226
|
+
description: description,
|
|
227
|
+
ownedBy: ownedBy,
|
|
143
228
|
} satisfies ArchiveV2025R0;
|
|
144
229
|
}
|
|
145
230
|
export function serializeArchiveV2025R0Input(
|
|
@@ -153,6 +238,11 @@ export function serializeArchiveV2025R0Input(
|
|
|
153
238
|
: serializeArchiveV2025R0TypeField(val.type),
|
|
154
239
|
['name']: val.name,
|
|
155
240
|
['size']: val.size,
|
|
241
|
+
['description']: val.description,
|
|
242
|
+
['owned_by']:
|
|
243
|
+
val.ownedBy == void 0
|
|
244
|
+
? val.ownedBy
|
|
245
|
+
: serializeArchiveV2025R0OwnedByField(val.ownedBy),
|
|
156
246
|
};
|
|
157
247
|
}
|
|
158
248
|
export function deserializeArchiveV2025R0Input(
|
|
@@ -198,10 +288,24 @@ export function deserializeArchiveV2025R0Input(
|
|
|
198
288
|
});
|
|
199
289
|
}
|
|
200
290
|
const size: number = val.size;
|
|
291
|
+
if (!(val.description == void 0) && !sdIsString(val.description)) {
|
|
292
|
+
throw new BoxSdkError({
|
|
293
|
+
message:
|
|
294
|
+
'Expecting string for "description" of type "ArchiveV2025R0Input"',
|
|
295
|
+
});
|
|
296
|
+
}
|
|
297
|
+
const description: undefined | string =
|
|
298
|
+
val.description == void 0 ? void 0 : val.description;
|
|
299
|
+
const ownedBy: undefined | ArchiveV2025R0OwnedByField =
|
|
300
|
+
val.owned_by == void 0
|
|
301
|
+
? void 0
|
|
302
|
+
: deserializeArchiveV2025R0OwnedByField(val.owned_by);
|
|
201
303
|
return {
|
|
202
304
|
id: id,
|
|
203
305
|
type: type,
|
|
204
306
|
name: name,
|
|
205
307
|
size: size,
|
|
308
|
+
description: description,
|
|
309
|
+
ownedBy: ownedBy,
|
|
206
310
|
} satisfies ArchiveV2025R0Input;
|
|
207
311
|
}
|
|
@@ -0,0 +1,150 @@
|
|
|
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 CollaborationPermissionsV2025R0 {
|
|
10
|
+
/**
|
|
11
|
+
* The co-owner role is enabled for collaboration. */
|
|
12
|
+
readonly isCoOwnerRoleEnabled?: boolean;
|
|
13
|
+
/**
|
|
14
|
+
* The editor role is enabled for collaboration. */
|
|
15
|
+
readonly isEditorRoleEnabled?: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* The previewer role is enabled for collaboration. */
|
|
18
|
+
readonly isPreviewerRoleEnabled?: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* The previewer uploader role is enabled for collaboration. */
|
|
21
|
+
readonly isPreviewerUploaderRoleEnabled?: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* The uploader role is enabled for collaboration. */
|
|
24
|
+
readonly isUploaderRoleEnabled?: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* The viewer role is enabled for collaboration. */
|
|
27
|
+
readonly isViewerRoleEnabled?: boolean;
|
|
28
|
+
/**
|
|
29
|
+
* The viewer uploader role is enabled for collaboration. */
|
|
30
|
+
readonly isViewerUploaderRoleEnabled?: boolean;
|
|
31
|
+
readonly rawData?: SerializedData;
|
|
32
|
+
}
|
|
33
|
+
export function serializeCollaborationPermissionsV2025R0(
|
|
34
|
+
val: CollaborationPermissionsV2025R0,
|
|
35
|
+
): SerializedData {
|
|
36
|
+
return {
|
|
37
|
+
['is_co_owner_role_enabled']: val.isCoOwnerRoleEnabled,
|
|
38
|
+
['is_editor_role_enabled']: val.isEditorRoleEnabled,
|
|
39
|
+
['is_previewer_role_enabled']: val.isPreviewerRoleEnabled,
|
|
40
|
+
['is_previewer_uploader_role_enabled']: val.isPreviewerUploaderRoleEnabled,
|
|
41
|
+
['is_uploader_role_enabled']: val.isUploaderRoleEnabled,
|
|
42
|
+
['is_viewer_role_enabled']: val.isViewerRoleEnabled,
|
|
43
|
+
['is_viewer_uploader_role_enabled']: val.isViewerUploaderRoleEnabled,
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
export function deserializeCollaborationPermissionsV2025R0(
|
|
47
|
+
val: SerializedData,
|
|
48
|
+
): CollaborationPermissionsV2025R0 {
|
|
49
|
+
if (!sdIsMap(val)) {
|
|
50
|
+
throw new BoxSdkError({
|
|
51
|
+
message: 'Expecting a map for "CollaborationPermissionsV2025R0"',
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
if (
|
|
55
|
+
!(val.is_co_owner_role_enabled == void 0) &&
|
|
56
|
+
!sdIsBoolean(val.is_co_owner_role_enabled)
|
|
57
|
+
) {
|
|
58
|
+
throw new BoxSdkError({
|
|
59
|
+
message:
|
|
60
|
+
'Expecting boolean for "is_co_owner_role_enabled" of type "CollaborationPermissionsV2025R0"',
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
const isCoOwnerRoleEnabled: undefined | boolean =
|
|
64
|
+
val.is_co_owner_role_enabled == void 0
|
|
65
|
+
? void 0
|
|
66
|
+
: val.is_co_owner_role_enabled;
|
|
67
|
+
if (
|
|
68
|
+
!(val.is_editor_role_enabled == void 0) &&
|
|
69
|
+
!sdIsBoolean(val.is_editor_role_enabled)
|
|
70
|
+
) {
|
|
71
|
+
throw new BoxSdkError({
|
|
72
|
+
message:
|
|
73
|
+
'Expecting boolean for "is_editor_role_enabled" of type "CollaborationPermissionsV2025R0"',
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
const isEditorRoleEnabled: undefined | boolean =
|
|
77
|
+
val.is_editor_role_enabled == void 0 ? void 0 : val.is_editor_role_enabled;
|
|
78
|
+
if (
|
|
79
|
+
!(val.is_previewer_role_enabled == void 0) &&
|
|
80
|
+
!sdIsBoolean(val.is_previewer_role_enabled)
|
|
81
|
+
) {
|
|
82
|
+
throw new BoxSdkError({
|
|
83
|
+
message:
|
|
84
|
+
'Expecting boolean for "is_previewer_role_enabled" of type "CollaborationPermissionsV2025R0"',
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
const isPreviewerRoleEnabled: undefined | boolean =
|
|
88
|
+
val.is_previewer_role_enabled == void 0
|
|
89
|
+
? void 0
|
|
90
|
+
: val.is_previewer_role_enabled;
|
|
91
|
+
if (
|
|
92
|
+
!(val.is_previewer_uploader_role_enabled == void 0) &&
|
|
93
|
+
!sdIsBoolean(val.is_previewer_uploader_role_enabled)
|
|
94
|
+
) {
|
|
95
|
+
throw new BoxSdkError({
|
|
96
|
+
message:
|
|
97
|
+
'Expecting boolean for "is_previewer_uploader_role_enabled" of type "CollaborationPermissionsV2025R0"',
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
const isPreviewerUploaderRoleEnabled: undefined | boolean =
|
|
101
|
+
val.is_previewer_uploader_role_enabled == void 0
|
|
102
|
+
? void 0
|
|
103
|
+
: val.is_previewer_uploader_role_enabled;
|
|
104
|
+
if (
|
|
105
|
+
!(val.is_uploader_role_enabled == void 0) &&
|
|
106
|
+
!sdIsBoolean(val.is_uploader_role_enabled)
|
|
107
|
+
) {
|
|
108
|
+
throw new BoxSdkError({
|
|
109
|
+
message:
|
|
110
|
+
'Expecting boolean for "is_uploader_role_enabled" of type "CollaborationPermissionsV2025R0"',
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
const isUploaderRoleEnabled: undefined | boolean =
|
|
114
|
+
val.is_uploader_role_enabled == void 0
|
|
115
|
+
? void 0
|
|
116
|
+
: val.is_uploader_role_enabled;
|
|
117
|
+
if (
|
|
118
|
+
!(val.is_viewer_role_enabled == void 0) &&
|
|
119
|
+
!sdIsBoolean(val.is_viewer_role_enabled)
|
|
120
|
+
) {
|
|
121
|
+
throw new BoxSdkError({
|
|
122
|
+
message:
|
|
123
|
+
'Expecting boolean for "is_viewer_role_enabled" of type "CollaborationPermissionsV2025R0"',
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
const isViewerRoleEnabled: undefined | boolean =
|
|
127
|
+
val.is_viewer_role_enabled == void 0 ? void 0 : val.is_viewer_role_enabled;
|
|
128
|
+
if (
|
|
129
|
+
!(val.is_viewer_uploader_role_enabled == void 0) &&
|
|
130
|
+
!sdIsBoolean(val.is_viewer_uploader_role_enabled)
|
|
131
|
+
) {
|
|
132
|
+
throw new BoxSdkError({
|
|
133
|
+
message:
|
|
134
|
+
'Expecting boolean for "is_viewer_uploader_role_enabled" of type "CollaborationPermissionsV2025R0"',
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
const isViewerUploaderRoleEnabled: undefined | boolean =
|
|
138
|
+
val.is_viewer_uploader_role_enabled == void 0
|
|
139
|
+
? void 0
|
|
140
|
+
: val.is_viewer_uploader_role_enabled;
|
|
141
|
+
return {
|
|
142
|
+
isCoOwnerRoleEnabled: isCoOwnerRoleEnabled,
|
|
143
|
+
isEditorRoleEnabled: isEditorRoleEnabled,
|
|
144
|
+
isPreviewerRoleEnabled: isPreviewerRoleEnabled,
|
|
145
|
+
isPreviewerUploaderRoleEnabled: isPreviewerUploaderRoleEnabled,
|
|
146
|
+
isUploaderRoleEnabled: isUploaderRoleEnabled,
|
|
147
|
+
isViewerRoleEnabled: isViewerRoleEnabled,
|
|
148
|
+
isViewerUploaderRoleEnabled: isViewerUploaderRoleEnabled,
|
|
149
|
+
} satisfies CollaborationPermissionsV2025R0;
|
|
150
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
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 CustomSessionDurationGroupItemV2025R0 {
|
|
10
|
+
/**
|
|
11
|
+
* Group ID (numerical). */
|
|
12
|
+
readonly id?: string;
|
|
13
|
+
/**
|
|
14
|
+
* Group Name. */
|
|
15
|
+
readonly name?: string;
|
|
16
|
+
readonly rawData?: SerializedData;
|
|
17
|
+
}
|
|
18
|
+
export function serializeCustomSessionDurationGroupItemV2025R0(
|
|
19
|
+
val: CustomSessionDurationGroupItemV2025R0,
|
|
20
|
+
): SerializedData {
|
|
21
|
+
return { ['id']: val.id, ['name']: val.name };
|
|
22
|
+
}
|
|
23
|
+
export function deserializeCustomSessionDurationGroupItemV2025R0(
|
|
24
|
+
val: SerializedData,
|
|
25
|
+
): CustomSessionDurationGroupItemV2025R0 {
|
|
26
|
+
if (!sdIsMap(val)) {
|
|
27
|
+
throw new BoxSdkError({
|
|
28
|
+
message: 'Expecting a map for "CustomSessionDurationGroupItemV2025R0"',
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
if (!(val.id == void 0) && !sdIsString(val.id)) {
|
|
32
|
+
throw new BoxSdkError({
|
|
33
|
+
message:
|
|
34
|
+
'Expecting string for "id" of type "CustomSessionDurationGroupItemV2025R0"',
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
const id: undefined | string = val.id == void 0 ? void 0 : val.id;
|
|
38
|
+
if (!(val.name == void 0) && !sdIsString(val.name)) {
|
|
39
|
+
throw new BoxSdkError({
|
|
40
|
+
message:
|
|
41
|
+
'Expecting string for "name" of type "CustomSessionDurationGroupItemV2025R0"',
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
const name: undefined | string = val.name == void 0 ? void 0 : val.name;
|
|
45
|
+
return { id: id, name: name } satisfies CustomSessionDurationGroupItemV2025R0;
|
|
46
|
+
}
|