@contentful/experience-delivery 1.0.0-dev.7 → 1.0.0-dev.8
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/dist/cjs/BaseClient.js +2 -2
- package/dist/cjs/Client.d.ts +3 -0
- package/dist/cjs/Client.js +15 -10
- package/dist/cjs/api/resources/destination/client/Client.d.ts +96 -0
- package/dist/cjs/api/resources/destination/client/Client.js +401 -0
- package/dist/cjs/api/resources/destination/client/index.d.ts +1 -0
- package/dist/cjs/api/resources/destination/client/index.js +17 -0
- package/dist/cjs/api/resources/destination/client/requests/DestinationExperiencesByNodeRequest.d.ts +8 -0
- package/dist/cjs/api/resources/destination/client/requests/DestinationExperiencesByNodeRequest.js +3 -0
- package/dist/cjs/api/resources/destination/client/requests/DestinationExperiencesByPathRequest.d.ts +12 -0
- package/dist/cjs/api/resources/destination/client/requests/DestinationExperiencesByPathRequest.js +3 -0
- package/dist/cjs/api/resources/destination/client/requests/SitemapDestinationRequest.d.ts +16 -0
- package/dist/cjs/api/resources/destination/client/requests/SitemapDestinationRequest.js +3 -0
- package/dist/cjs/api/resources/destination/client/requests/index.d.ts +3 -0
- package/dist/cjs/api/resources/destination/client/requests/index.js +2 -0
- package/dist/cjs/api/resources/destination/exports.d.ts +2 -0
- package/dist/cjs/api/resources/destination/exports.js +21 -0
- package/dist/cjs/api/resources/destination/index.d.ts +1 -0
- package/dist/cjs/api/resources/destination/index.js +17 -0
- package/dist/cjs/api/resources/index.d.ts +2 -0
- package/dist/cjs/api/resources/index.js +3 -1
- package/dist/cjs/api/types/ChildPath.d.ts +6 -0
- package/dist/cjs/api/types/ChildPath.js +3 -0
- package/dist/cjs/api/types/DestinationExperienceResolutionResponse.d.ts +5 -0
- package/dist/cjs/api/types/DestinationExperienceResolutionResponse.js +3 -0
- package/dist/cjs/api/types/DestinationExperiencesExtensions.d.ts +4 -0
- package/dist/cjs/api/types/DestinationExperiencesExtensions.js +3 -0
- package/dist/cjs/api/types/DestinationExperiencesExtensionsPersonalization.d.ts +5 -0
- package/dist/cjs/api/types/DestinationExperiencesExtensionsPersonalization.js +3 -0
- package/dist/cjs/api/types/DestinationExperiencesResponse.d.ts +4 -0
- package/dist/cjs/api/types/DestinationExperiencesResponse.js +3 -0
- package/dist/cjs/api/types/DestinationRedirectResponse.d.ts +4 -0
- package/dist/cjs/api/types/DestinationRedirectResponse.js +3 -0
- package/dist/cjs/api/types/DestinationRedirectResponseRedirect.d.ts +4 -0
- package/dist/cjs/api/types/DestinationRedirectResponseRedirect.js +3 -0
- package/dist/cjs/api/types/DestinationSitemap.d.ts +7 -0
- package/dist/cjs/api/types/DestinationSitemap.js +3 -0
- package/dist/cjs/api/types/DestinationSitemapPaths.d.ts +11 -0
- package/dist/cjs/api/types/DestinationSitemapPaths.js +3 -0
- package/dist/cjs/api/types/DestinationSitemapPathsPages.d.ts +7 -0
- package/dist/cjs/api/types/DestinationSitemapPathsPages.js +3 -0
- package/dist/cjs/api/types/DestinationSitemapPathsSys.d.ts +3 -0
- package/dist/cjs/api/types/DestinationSitemapPathsSys.js +3 -0
- package/dist/cjs/api/types/DestinationSitemapProperty.d.ts +7 -0
- package/dist/cjs/api/types/DestinationSitemapProperty.js +3 -0
- package/dist/cjs/api/types/DestinationSitemapPropertySys.d.ts +3 -0
- package/dist/cjs/api/types/DestinationSitemapPropertySys.js +3 -0
- package/dist/cjs/api/types/ErrorI18NContext.d.ts +5 -0
- package/dist/cjs/api/types/ErrorI18NContext.js +3 -0
- package/dist/cjs/api/types/ErrorSys.d.ts +5 -0
- package/dist/cjs/api/types/ErrorSys.js +3 -0
- package/dist/cjs/api/types/Error_.d.ts +12 -0
- package/dist/cjs/api/types/Error_.js +3 -0
- package/dist/cjs/api/types/HydratedExperience.d.ts +11 -0
- package/dist/cjs/api/types/HydratedExperience.js +3 -0
- package/dist/cjs/api/types/PersonalizationComponentEvent.d.ts +22 -0
- package/dist/cjs/api/types/PersonalizationComponentEvent.js +3 -0
- package/dist/cjs/api/types/PersonalizationEvent.d.ts +5 -0
- package/dist/cjs/api/types/PersonalizationEvent.js +3 -0
- package/dist/cjs/api/types/PersonalizationEventBase.d.ts +25 -0
- package/dist/cjs/api/types/PersonalizationEventBase.js +3 -0
- package/dist/cjs/api/types/PersonalizationEventBaseChannel.d.ts +7 -0
- package/dist/cjs/api/types/PersonalizationEventBaseChannel.js +10 -0
- package/dist/cjs/api/types/PersonalizationEventBaseComponentType.d.ts +5 -0
- package/dist/cjs/api/types/PersonalizationEventBaseComponentType.js +8 -0
- package/dist/cjs/api/types/PersonalizationEventBaseContext.d.ts +9 -0
- package/dist/cjs/api/types/PersonalizationEventBaseContext.js +3 -0
- package/dist/cjs/api/types/PersonalizationEventBaseContextLibrary.d.ts +4 -0
- package/dist/cjs/api/types/PersonalizationEventBaseContextLibrary.js +3 -0
- package/dist/cjs/api/types/PersonalizationEventBaseType.d.ts +8 -0
- package/dist/cjs/api/types/PersonalizationEventBaseType.js +11 -0
- package/dist/cjs/api/types/PersonalizationIdentifyEvent.d.ts +22 -0
- package/dist/cjs/api/types/PersonalizationIdentifyEvent.js +3 -0
- package/dist/cjs/api/types/PersonalizationPageEvent.d.ts +22 -0
- package/dist/cjs/api/types/PersonalizationPageEvent.js +3 -0
- package/dist/cjs/api/types/PersonalizationPageEventProperties.d.ts +9 -0
- package/dist/cjs/api/types/PersonalizationPageEventProperties.js +3 -0
- package/dist/cjs/api/types/PersonalizationScreenEvent.d.ts +22 -0
- package/dist/cjs/api/types/PersonalizationScreenEvent.js +3 -0
- package/dist/cjs/api/types/PersonalizationScreenEventProperties.d.ts +5 -0
- package/dist/cjs/api/types/PersonalizationScreenEventProperties.js +3 -0
- package/dist/cjs/api/types/PersonalizationTrackEvent.d.ts +22 -0
- package/dist/cjs/api/types/PersonalizationTrackEvent.js +3 -0
- package/dist/cjs/api/types/ResolvedDestinationExperience.d.ts +8 -0
- package/dist/cjs/api/types/ResolvedDestinationExperience.js +3 -0
- package/dist/cjs/api/types/SitemapPath.d.ts +11 -0
- package/dist/cjs/api/types/SitemapPath.js +3 -0
- package/dist/cjs/api/types/SitemapPathSys.d.ts +4 -0
- package/dist/cjs/api/types/SitemapPathSys.js +3 -0
- package/dist/cjs/api/types/index.d.ts +34 -0
- package/dist/cjs/api/types/index.js +34 -0
- package/dist/cjs/serialization/resources/destination/client/index.d.ts +1 -0
- package/dist/cjs/serialization/resources/destination/client/index.js +17 -0
- package/dist/cjs/serialization/resources/destination/client/requests/DestinationExperiencesByNodeRequest.d.ts +10 -0
- package/dist/cjs/serialization/resources/destination/client/requests/DestinationExperiencesByNodeRequest.js +42 -0
- package/dist/cjs/serialization/resources/destination/client/requests/DestinationExperiencesByPathRequest.d.ts +11 -0
- package/dist/cjs/serialization/resources/destination/client/requests/DestinationExperiencesByPathRequest.js +43 -0
- package/dist/cjs/serialization/resources/destination/client/requests/index.d.ts +2 -0
- package/dist/cjs/serialization/resources/destination/client/requests/index.js +7 -0
- package/dist/cjs/serialization/resources/destination/index.d.ts +1 -0
- package/dist/cjs/serialization/resources/destination/index.js +17 -0
- package/dist/cjs/serialization/resources/index.d.ts +2 -0
- package/dist/cjs/serialization/resources/index.js +3 -1
- package/dist/cjs/serialization/types/ChildPath.d.ts +9 -0
- package/dist/cjs/serialization/types/ChildPath.js +41 -0
- package/dist/cjs/serialization/types/DestinationExperienceResolutionResponse.d.ts +9 -0
- package/dist/cjs/serialization/types/DestinationExperienceResolutionResponse.js +41 -0
- package/dist/cjs/serialization/types/DestinationExperiencesExtensions.d.ts +10 -0
- package/dist/cjs/serialization/types/DestinationExperiencesExtensions.js +42 -0
- package/dist/cjs/serialization/types/DestinationExperiencesExtensionsPersonalization.d.ts +11 -0
- package/dist/cjs/serialization/types/DestinationExperiencesExtensionsPersonalization.js +43 -0
- package/dist/cjs/serialization/types/DestinationExperiencesResponse.d.ts +10 -0
- package/dist/cjs/serialization/types/DestinationExperiencesResponse.js +42 -0
- package/dist/cjs/serialization/types/DestinationRedirectResponse.d.ts +10 -0
- package/dist/cjs/serialization/types/DestinationRedirectResponse.js +42 -0
- package/dist/cjs/serialization/types/DestinationRedirectResponseRedirect.d.ts +9 -0
- package/dist/cjs/serialization/types/DestinationRedirectResponseRedirect.js +41 -0
- package/dist/cjs/serialization/types/DestinationSitemap.d.ts +12 -0
- package/dist/cjs/serialization/types/DestinationSitemap.js +44 -0
- package/dist/cjs/serialization/types/DestinationSitemapPaths.d.ts +15 -0
- package/dist/cjs/serialization/types/DestinationSitemapPaths.js +47 -0
- package/dist/cjs/serialization/types/DestinationSitemapPathsPages.d.ts +10 -0
- package/dist/cjs/serialization/types/DestinationSitemapPathsPages.js +42 -0
- package/dist/cjs/serialization/types/DestinationSitemapPathsSys.d.ts +9 -0
- package/dist/cjs/serialization/types/DestinationSitemapPathsSys.js +41 -0
- package/dist/cjs/serialization/types/DestinationSitemapProperty.d.ts +10 -0
- package/dist/cjs/serialization/types/DestinationSitemapProperty.js +42 -0
- package/dist/cjs/serialization/types/DestinationSitemapPropertySys.d.ts +9 -0
- package/dist/cjs/serialization/types/DestinationSitemapPropertySys.js +41 -0
- package/dist/cjs/serialization/types/ErrorI18NContext.d.ts +11 -0
- package/dist/cjs/serialization/types/ErrorI18NContext.js +43 -0
- package/dist/cjs/serialization/types/ErrorSys.d.ts +10 -0
- package/dist/cjs/serialization/types/ErrorSys.js +42 -0
- package/dist/cjs/serialization/types/Error_.d.ts +15 -0
- package/dist/cjs/serialization/types/Error_.js +47 -0
- package/dist/cjs/serialization/types/HydratedExperience.d.ts +14 -0
- package/dist/cjs/serialization/types/HydratedExperience.js +46 -0
- package/dist/cjs/serialization/types/PersonalizationComponentEvent.d.ts +29 -0
- package/dist/cjs/serialization/types/PersonalizationComponentEvent.js +61 -0
- package/dist/cjs/serialization/types/PersonalizationEvent.d.ts +12 -0
- package/dist/cjs/serialization/types/PersonalizationEvent.js +50 -0
- package/dist/cjs/serialization/types/PersonalizationEventBase.d.ts +30 -0
- package/dist/cjs/serialization/types/PersonalizationEventBase.js +62 -0
- package/dist/cjs/serialization/types/PersonalizationEventBaseChannel.d.ts +7 -0
- package/dist/cjs/serialization/types/PersonalizationEventBaseChannel.js +39 -0
- package/dist/cjs/serialization/types/PersonalizationEventBaseComponentType.d.ts +7 -0
- package/dist/cjs/serialization/types/PersonalizationEventBaseComponentType.js +39 -0
- package/dist/cjs/serialization/types/PersonalizationEventBaseContext.d.ts +11 -0
- package/dist/cjs/serialization/types/PersonalizationEventBaseContext.js +44 -0
- package/dist/cjs/serialization/types/PersonalizationEventBaseContextLibrary.d.ts +10 -0
- package/dist/cjs/serialization/types/PersonalizationEventBaseContextLibrary.js +42 -0
- package/dist/cjs/serialization/types/PersonalizationEventBaseType.d.ts +7 -0
- package/dist/cjs/serialization/types/PersonalizationEventBaseType.js +39 -0
- package/dist/cjs/serialization/types/PersonalizationIdentifyEvent.d.ts +29 -0
- package/dist/cjs/serialization/types/PersonalizationIdentifyEvent.js +61 -0
- package/dist/cjs/serialization/types/PersonalizationPageEvent.d.ts +30 -0
- package/dist/cjs/serialization/types/PersonalizationPageEvent.js +62 -0
- package/dist/cjs/serialization/types/PersonalizationPageEventProperties.d.ts +14 -0
- package/dist/cjs/serialization/types/PersonalizationPageEventProperties.js +47 -0
- package/dist/cjs/serialization/types/PersonalizationScreenEvent.d.ts +30 -0
- package/dist/cjs/serialization/types/PersonalizationScreenEvent.js +62 -0
- package/dist/cjs/serialization/types/PersonalizationScreenEventProperties.d.ts +10 -0
- package/dist/cjs/serialization/types/PersonalizationScreenEventProperties.js +43 -0
- package/dist/cjs/serialization/types/PersonalizationTrackEvent.d.ts +29 -0
- package/dist/cjs/serialization/types/PersonalizationTrackEvent.js +61 -0
- package/dist/cjs/serialization/types/ResolvedDestinationExperience.d.ts +13 -0
- package/dist/cjs/serialization/types/ResolvedDestinationExperience.js +45 -0
- package/dist/cjs/serialization/types/SitemapPath.d.ts +12 -0
- package/dist/cjs/serialization/types/SitemapPath.js +44 -0
- package/dist/cjs/serialization/types/SitemapPathSys.d.ts +9 -0
- package/dist/cjs/serialization/types/SitemapPathSys.js +41 -0
- package/dist/cjs/serialization/types/index.d.ts +34 -0
- package/dist/cjs/serialization/types/index.js +34 -0
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/BaseClient.mjs +2 -2
- package/dist/esm/Client.d.mts +3 -0
- package/dist/esm/Client.mjs +5 -0
- package/dist/esm/api/resources/destination/client/Client.d.mts +96 -0
- package/dist/esm/api/resources/destination/client/Client.mjs +364 -0
- package/dist/esm/api/resources/destination/client/index.d.mts +1 -0
- package/dist/esm/api/resources/destination/client/index.mjs +1 -0
- package/dist/esm/api/resources/destination/client/requests/DestinationExperiencesByNodeRequest.d.mts +8 -0
- package/dist/esm/api/resources/destination/client/requests/DestinationExperiencesByNodeRequest.mjs +2 -0
- package/dist/esm/api/resources/destination/client/requests/DestinationExperiencesByPathRequest.d.mts +12 -0
- package/dist/esm/api/resources/destination/client/requests/DestinationExperiencesByPathRequest.mjs +2 -0
- package/dist/esm/api/resources/destination/client/requests/SitemapDestinationRequest.d.mts +16 -0
- package/dist/esm/api/resources/destination/client/requests/SitemapDestinationRequest.mjs +2 -0
- package/dist/esm/api/resources/destination/client/requests/index.d.mts +3 -0
- package/dist/esm/api/resources/destination/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/destination/exports.d.mts +2 -0
- package/dist/esm/api/resources/destination/exports.mjs +3 -0
- package/dist/esm/api/resources/destination/index.d.mts +1 -0
- package/dist/esm/api/resources/destination/index.mjs +1 -0
- package/dist/esm/api/resources/index.d.mts +2 -0
- package/dist/esm/api/resources/index.mjs +2 -0
- package/dist/esm/api/types/ChildPath.d.mts +6 -0
- package/dist/esm/api/types/ChildPath.mjs +2 -0
- package/dist/esm/api/types/DestinationExperienceResolutionResponse.d.mts +5 -0
- package/dist/esm/api/types/DestinationExperienceResolutionResponse.mjs +2 -0
- package/dist/esm/api/types/DestinationExperiencesExtensions.d.mts +4 -0
- package/dist/esm/api/types/DestinationExperiencesExtensions.mjs +2 -0
- package/dist/esm/api/types/DestinationExperiencesExtensionsPersonalization.d.mts +5 -0
- package/dist/esm/api/types/DestinationExperiencesExtensionsPersonalization.mjs +2 -0
- package/dist/esm/api/types/DestinationExperiencesResponse.d.mts +4 -0
- package/dist/esm/api/types/DestinationExperiencesResponse.mjs +2 -0
- package/dist/esm/api/types/DestinationRedirectResponse.d.mts +4 -0
- package/dist/esm/api/types/DestinationRedirectResponse.mjs +2 -0
- package/dist/esm/api/types/DestinationRedirectResponseRedirect.d.mts +4 -0
- package/dist/esm/api/types/DestinationRedirectResponseRedirect.mjs +2 -0
- package/dist/esm/api/types/DestinationSitemap.d.mts +7 -0
- package/dist/esm/api/types/DestinationSitemap.mjs +2 -0
- package/dist/esm/api/types/DestinationSitemapPaths.d.mts +11 -0
- package/dist/esm/api/types/DestinationSitemapPaths.mjs +2 -0
- package/dist/esm/api/types/DestinationSitemapPathsPages.d.mts +7 -0
- package/dist/esm/api/types/DestinationSitemapPathsPages.mjs +2 -0
- package/dist/esm/api/types/DestinationSitemapPathsSys.d.mts +3 -0
- package/dist/esm/api/types/DestinationSitemapPathsSys.mjs +2 -0
- package/dist/esm/api/types/DestinationSitemapProperty.d.mts +7 -0
- package/dist/esm/api/types/DestinationSitemapProperty.mjs +2 -0
- package/dist/esm/api/types/DestinationSitemapPropertySys.d.mts +3 -0
- package/dist/esm/api/types/DestinationSitemapPropertySys.mjs +2 -0
- package/dist/esm/api/types/ErrorI18NContext.d.mts +5 -0
- package/dist/esm/api/types/ErrorI18NContext.mjs +2 -0
- package/dist/esm/api/types/ErrorSys.d.mts +5 -0
- package/dist/esm/api/types/ErrorSys.mjs +2 -0
- package/dist/esm/api/types/Error_.d.mts +12 -0
- package/dist/esm/api/types/Error_.mjs +2 -0
- package/dist/esm/api/types/HydratedExperience.d.mts +11 -0
- package/dist/esm/api/types/HydratedExperience.mjs +2 -0
- package/dist/esm/api/types/PersonalizationComponentEvent.d.mts +22 -0
- package/dist/esm/api/types/PersonalizationComponentEvent.mjs +2 -0
- package/dist/esm/api/types/PersonalizationEvent.d.mts +5 -0
- package/dist/esm/api/types/PersonalizationEvent.mjs +2 -0
- package/dist/esm/api/types/PersonalizationEventBase.d.mts +25 -0
- package/dist/esm/api/types/PersonalizationEventBase.mjs +2 -0
- package/dist/esm/api/types/PersonalizationEventBaseChannel.d.mts +7 -0
- package/dist/esm/api/types/PersonalizationEventBaseChannel.mjs +7 -0
- package/dist/esm/api/types/PersonalizationEventBaseComponentType.d.mts +5 -0
- package/dist/esm/api/types/PersonalizationEventBaseComponentType.mjs +5 -0
- package/dist/esm/api/types/PersonalizationEventBaseContext.d.mts +9 -0
- package/dist/esm/api/types/PersonalizationEventBaseContext.mjs +2 -0
- package/dist/esm/api/types/PersonalizationEventBaseContextLibrary.d.mts +4 -0
- package/dist/esm/api/types/PersonalizationEventBaseContextLibrary.mjs +2 -0
- package/dist/esm/api/types/PersonalizationEventBaseType.d.mts +8 -0
- package/dist/esm/api/types/PersonalizationEventBaseType.mjs +8 -0
- package/dist/esm/api/types/PersonalizationIdentifyEvent.d.mts +22 -0
- package/dist/esm/api/types/PersonalizationIdentifyEvent.mjs +2 -0
- package/dist/esm/api/types/PersonalizationPageEvent.d.mts +22 -0
- package/dist/esm/api/types/PersonalizationPageEvent.mjs +2 -0
- package/dist/esm/api/types/PersonalizationPageEventProperties.d.mts +9 -0
- package/dist/esm/api/types/PersonalizationPageEventProperties.mjs +2 -0
- package/dist/esm/api/types/PersonalizationScreenEvent.d.mts +22 -0
- package/dist/esm/api/types/PersonalizationScreenEvent.mjs +2 -0
- package/dist/esm/api/types/PersonalizationScreenEventProperties.d.mts +5 -0
- package/dist/esm/api/types/PersonalizationScreenEventProperties.mjs +2 -0
- package/dist/esm/api/types/PersonalizationTrackEvent.d.mts +22 -0
- package/dist/esm/api/types/PersonalizationTrackEvent.mjs +2 -0
- package/dist/esm/api/types/ResolvedDestinationExperience.d.mts +8 -0
- package/dist/esm/api/types/ResolvedDestinationExperience.mjs +2 -0
- package/dist/esm/api/types/SitemapPath.d.mts +11 -0
- package/dist/esm/api/types/SitemapPath.mjs +2 -0
- package/dist/esm/api/types/SitemapPathSys.d.mts +4 -0
- package/dist/esm/api/types/SitemapPathSys.mjs +2 -0
- package/dist/esm/api/types/index.d.mts +34 -0
- package/dist/esm/api/types/index.mjs +34 -0
- package/dist/esm/serialization/resources/destination/client/index.d.mts +1 -0
- package/dist/esm/serialization/resources/destination/client/index.mjs +1 -0
- package/dist/esm/serialization/resources/destination/client/requests/DestinationExperiencesByNodeRequest.d.mts +10 -0
- package/dist/esm/serialization/resources/destination/client/requests/DestinationExperiencesByNodeRequest.mjs +6 -0
- package/dist/esm/serialization/resources/destination/client/requests/DestinationExperiencesByPathRequest.d.mts +11 -0
- package/dist/esm/serialization/resources/destination/client/requests/DestinationExperiencesByPathRequest.mjs +7 -0
- package/dist/esm/serialization/resources/destination/client/requests/index.d.mts +2 -0
- package/dist/esm/serialization/resources/destination/client/requests/index.mjs +2 -0
- package/dist/esm/serialization/resources/destination/index.d.mts +1 -0
- package/dist/esm/serialization/resources/destination/index.mjs +1 -0
- package/dist/esm/serialization/resources/index.d.mts +2 -0
- package/dist/esm/serialization/resources/index.mjs +2 -0
- package/dist/esm/serialization/types/ChildPath.d.mts +9 -0
- package/dist/esm/serialization/types/ChildPath.mjs +5 -0
- package/dist/esm/serialization/types/DestinationExperienceResolutionResponse.d.mts +9 -0
- package/dist/esm/serialization/types/DestinationExperienceResolutionResponse.mjs +5 -0
- package/dist/esm/serialization/types/DestinationExperiencesExtensions.d.mts +10 -0
- package/dist/esm/serialization/types/DestinationExperiencesExtensions.mjs +6 -0
- package/dist/esm/serialization/types/DestinationExperiencesExtensionsPersonalization.d.mts +11 -0
- package/dist/esm/serialization/types/DestinationExperiencesExtensionsPersonalization.mjs +7 -0
- package/dist/esm/serialization/types/DestinationExperiencesResponse.d.mts +10 -0
- package/dist/esm/serialization/types/DestinationExperiencesResponse.mjs +6 -0
- package/dist/esm/serialization/types/DestinationRedirectResponse.d.mts +10 -0
- package/dist/esm/serialization/types/DestinationRedirectResponse.mjs +6 -0
- package/dist/esm/serialization/types/DestinationRedirectResponseRedirect.d.mts +9 -0
- package/dist/esm/serialization/types/DestinationRedirectResponseRedirect.mjs +5 -0
- package/dist/esm/serialization/types/DestinationSitemap.d.mts +12 -0
- package/dist/esm/serialization/types/DestinationSitemap.mjs +8 -0
- package/dist/esm/serialization/types/DestinationSitemapPaths.d.mts +15 -0
- package/dist/esm/serialization/types/DestinationSitemapPaths.mjs +11 -0
- package/dist/esm/serialization/types/DestinationSitemapPathsPages.d.mts +10 -0
- package/dist/esm/serialization/types/DestinationSitemapPathsPages.mjs +6 -0
- package/dist/esm/serialization/types/DestinationSitemapPathsSys.d.mts +9 -0
- package/dist/esm/serialization/types/DestinationSitemapPathsSys.mjs +5 -0
- package/dist/esm/serialization/types/DestinationSitemapProperty.d.mts +10 -0
- package/dist/esm/serialization/types/DestinationSitemapProperty.mjs +6 -0
- package/dist/esm/serialization/types/DestinationSitemapPropertySys.d.mts +9 -0
- package/dist/esm/serialization/types/DestinationSitemapPropertySys.mjs +5 -0
- package/dist/esm/serialization/types/ErrorI18NContext.d.mts +11 -0
- package/dist/esm/serialization/types/ErrorI18NContext.mjs +7 -0
- package/dist/esm/serialization/types/ErrorSys.d.mts +10 -0
- package/dist/esm/serialization/types/ErrorSys.mjs +6 -0
- package/dist/esm/serialization/types/Error_.d.mts +15 -0
- package/dist/esm/serialization/types/Error_.mjs +11 -0
- package/dist/esm/serialization/types/HydratedExperience.d.mts +14 -0
- package/dist/esm/serialization/types/HydratedExperience.mjs +10 -0
- package/dist/esm/serialization/types/PersonalizationComponentEvent.d.mts +29 -0
- package/dist/esm/serialization/types/PersonalizationComponentEvent.mjs +25 -0
- package/dist/esm/serialization/types/PersonalizationEvent.d.mts +12 -0
- package/dist/esm/serialization/types/PersonalizationEvent.mjs +14 -0
- package/dist/esm/serialization/types/PersonalizationEventBase.d.mts +30 -0
- package/dist/esm/serialization/types/PersonalizationEventBase.mjs +26 -0
- package/dist/esm/serialization/types/PersonalizationEventBaseChannel.d.mts +7 -0
- package/dist/esm/serialization/types/PersonalizationEventBaseChannel.mjs +3 -0
- package/dist/esm/serialization/types/PersonalizationEventBaseComponentType.d.mts +7 -0
- package/dist/esm/serialization/types/PersonalizationEventBaseComponentType.mjs +3 -0
- package/dist/esm/serialization/types/PersonalizationEventBaseContext.d.mts +11 -0
- package/dist/esm/serialization/types/PersonalizationEventBaseContext.mjs +8 -0
- package/dist/esm/serialization/types/PersonalizationEventBaseContextLibrary.d.mts +10 -0
- package/dist/esm/serialization/types/PersonalizationEventBaseContextLibrary.mjs +6 -0
- package/dist/esm/serialization/types/PersonalizationEventBaseType.d.mts +7 -0
- package/dist/esm/serialization/types/PersonalizationEventBaseType.mjs +3 -0
- package/dist/esm/serialization/types/PersonalizationIdentifyEvent.d.mts +29 -0
- package/dist/esm/serialization/types/PersonalizationIdentifyEvent.mjs +25 -0
- package/dist/esm/serialization/types/PersonalizationPageEvent.d.mts +30 -0
- package/dist/esm/serialization/types/PersonalizationPageEvent.mjs +26 -0
- package/dist/esm/serialization/types/PersonalizationPageEventProperties.d.mts +14 -0
- package/dist/esm/serialization/types/PersonalizationPageEventProperties.mjs +11 -0
- package/dist/esm/serialization/types/PersonalizationScreenEvent.d.mts +30 -0
- package/dist/esm/serialization/types/PersonalizationScreenEvent.mjs +26 -0
- package/dist/esm/serialization/types/PersonalizationScreenEventProperties.d.mts +10 -0
- package/dist/esm/serialization/types/PersonalizationScreenEventProperties.mjs +7 -0
- package/dist/esm/serialization/types/PersonalizationTrackEvent.d.mts +29 -0
- package/dist/esm/serialization/types/PersonalizationTrackEvent.mjs +25 -0
- package/dist/esm/serialization/types/ResolvedDestinationExperience.d.mts +13 -0
- package/dist/esm/serialization/types/ResolvedDestinationExperience.mjs +9 -0
- package/dist/esm/serialization/types/SitemapPath.d.mts +12 -0
- package/dist/esm/serialization/types/SitemapPath.mjs +8 -0
- package/dist/esm/serialization/types/SitemapPathSys.d.mts +9 -0
- package/dist/esm/serialization/types/SitemapPathSys.mjs +5 -0
- package/dist/esm/serialization/types/index.d.mts +34 -0
- package/dist/esm/serialization/types/index.mjs +34 -0
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +12 -1
- package/reference.md +275 -0
|
@@ -0,0 +1,364 @@
|
|
|
1
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
import { normalizeClientOptionsWithAuth } from "../../../../BaseClient.mjs";
|
|
12
|
+
import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../core/headers.mjs";
|
|
13
|
+
import * as core from "../../../../core/index.mjs";
|
|
14
|
+
import * as environments from "../../../../environments.mjs";
|
|
15
|
+
import { handleNonStatusCodeError } from "../../../../errors/handleNonStatusCodeError.mjs";
|
|
16
|
+
import * as errors from "../../../../errors/index.mjs";
|
|
17
|
+
import * as serializers from "../../../../serialization/index.mjs";
|
|
18
|
+
import * as ContentfulViewDelivery from "../../../index.mjs";
|
|
19
|
+
export class DestinationClient {
|
|
20
|
+
constructor(options) {
|
|
21
|
+
this._options = normalizeClientOptionsWithAuth(options);
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* @param {string} spaceId - ID of the space.
|
|
25
|
+
* @param {string} destinationId - ID of the published Destination.
|
|
26
|
+
* @param {ContentfulViewDelivery.SitemapDestinationRequest} request
|
|
27
|
+
* @param {DestinationClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
28
|
+
*
|
|
29
|
+
* @throws {@link ContentfulViewDelivery.BadRequestError}
|
|
30
|
+
* @throws {@link ContentfulViewDelivery.UnauthorizedError}
|
|
31
|
+
* @throws {@link ContentfulViewDelivery.ForbiddenError}
|
|
32
|
+
* @throws {@link ContentfulViewDelivery.NotFoundError}
|
|
33
|
+
* @throws {@link ContentfulViewDelivery.ConflictError}
|
|
34
|
+
* @throws {@link ContentfulViewDelivery.UnprocessableEntityError}
|
|
35
|
+
* @throws {@link ContentfulViewDelivery.InternalServerError}
|
|
36
|
+
*
|
|
37
|
+
* @example
|
|
38
|
+
* await client.destination.sitemap("yadj1kx9rmg0", "4RqKkGJqLHpMiomHuILv5N", {
|
|
39
|
+
* limit: 1,
|
|
40
|
+
* pageNext: "pageNext",
|
|
41
|
+
* pagePrev: "pagePrev"
|
|
42
|
+
* })
|
|
43
|
+
*/
|
|
44
|
+
sitemap(spaceId, destinationId, request = {}, requestOptions) {
|
|
45
|
+
return core.HttpResponsePromise.fromPromise(this.__sitemap(spaceId, destinationId, request, requestOptions));
|
|
46
|
+
}
|
|
47
|
+
__sitemap(spaceId_1, destinationId_1) {
|
|
48
|
+
return __awaiter(this, arguments, void 0, function* (spaceId, destinationId, request = {}, requestOptions) {
|
|
49
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
50
|
+
const { limit, pageNext, pagePrev } = request;
|
|
51
|
+
const _queryParams = {
|
|
52
|
+
limit,
|
|
53
|
+
pageNext,
|
|
54
|
+
pagePrev,
|
|
55
|
+
};
|
|
56
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
57
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({
|
|
58
|
+
"x-contentful-enable-alpha-feature": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.xContentfulEnableAlphaFeature) !== null && _b !== void 0 ? _b : "new-exo-entity-types",
|
|
59
|
+
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
60
|
+
const _response = yield core.fetcher({
|
|
61
|
+
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ContentfulViewDeliveryEnvironment.Default, `spaces/${core.url.encodePathParam(spaceId)}/destinations/${core.url.encodePathParam(destinationId)}/sitemap`),
|
|
62
|
+
method: "GET",
|
|
63
|
+
headers: _headers,
|
|
64
|
+
queryString: core.url
|
|
65
|
+
.queryBuilder()
|
|
66
|
+
.addMany(_queryParams)
|
|
67
|
+
.mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams)
|
|
68
|
+
.build(),
|
|
69
|
+
timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
|
|
70
|
+
maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
|
|
71
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
72
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
73
|
+
logging: this._options.logging,
|
|
74
|
+
});
|
|
75
|
+
if (_response.ok) {
|
|
76
|
+
return {
|
|
77
|
+
data: serializers.DestinationSitemap.parseOrThrow(_response.body, {
|
|
78
|
+
unrecognizedObjectKeys: "passthrough",
|
|
79
|
+
allowUnrecognizedUnionMembers: true,
|
|
80
|
+
allowUnrecognizedEnumValues: true,
|
|
81
|
+
skipValidation: true,
|
|
82
|
+
breadcrumbsPrefix: ["response"],
|
|
83
|
+
}),
|
|
84
|
+
rawResponse: _response.rawResponse,
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
if (_response.error.reason === "status-code") {
|
|
88
|
+
switch (_response.error.statusCode) {
|
|
89
|
+
case 400:
|
|
90
|
+
throw new ContentfulViewDelivery.BadRequestError(_response.error.body, _response.rawResponse);
|
|
91
|
+
case 401:
|
|
92
|
+
throw new ContentfulViewDelivery.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
93
|
+
case 403:
|
|
94
|
+
throw new ContentfulViewDelivery.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
95
|
+
case 404:
|
|
96
|
+
throw new ContentfulViewDelivery.NotFoundError(_response.error.body, _response.rawResponse);
|
|
97
|
+
case 409:
|
|
98
|
+
throw new ContentfulViewDelivery.ConflictError(_response.error.body, _response.rawResponse);
|
|
99
|
+
case 422:
|
|
100
|
+
throw new ContentfulViewDelivery.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
101
|
+
case 500:
|
|
102
|
+
throw new ContentfulViewDelivery.InternalServerError(_response.error.body, _response.rawResponse);
|
|
103
|
+
default:
|
|
104
|
+
throw new errors.ContentfulViewDeliveryError({
|
|
105
|
+
statusCode: _response.error.statusCode,
|
|
106
|
+
body: _response.error.body,
|
|
107
|
+
rawResponse: _response.rawResponse,
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/spaces/{spaceId}/destinations/{destinationId}/sitemap");
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* @param {string} spaceId - ID of the space.
|
|
116
|
+
* @param {string} destinationId - ID of the published Destination.
|
|
117
|
+
* @param {string} nodeId - ID of the Destination Node to resolve.
|
|
118
|
+
* @param {DestinationClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
119
|
+
*
|
|
120
|
+
* @throws {@link ContentfulViewDelivery.BadRequestError}
|
|
121
|
+
* @throws {@link ContentfulViewDelivery.UnauthorizedError}
|
|
122
|
+
* @throws {@link ContentfulViewDelivery.ForbiddenError}
|
|
123
|
+
* @throws {@link ContentfulViewDelivery.NotFoundError}
|
|
124
|
+
* @throws {@link ContentfulViewDelivery.ConflictError}
|
|
125
|
+
* @throws {@link ContentfulViewDelivery.UnprocessableEntityError}
|
|
126
|
+
* @throws {@link ContentfulViewDelivery.InternalServerError}
|
|
127
|
+
*
|
|
128
|
+
* @example
|
|
129
|
+
* await client.destination.resolveByNodeId("yadj1kx9rmg0", "4RqKkGJqLHpMiomHuILv5N", "6BslKh9TdKGOK41VmLDjFZ")
|
|
130
|
+
*/
|
|
131
|
+
resolveByNodeId(spaceId, destinationId, nodeId, requestOptions) {
|
|
132
|
+
return core.HttpResponsePromise.fromPromise(this.__resolveByNodeId(spaceId, destinationId, nodeId, requestOptions));
|
|
133
|
+
}
|
|
134
|
+
__resolveByNodeId(spaceId, destinationId, nodeId, requestOptions) {
|
|
135
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
136
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
137
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
138
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({
|
|
139
|
+
"x-contentful-enable-alpha-feature": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.xContentfulEnableAlphaFeature) !== null && _b !== void 0 ? _b : "new-exo-entity-types",
|
|
140
|
+
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
141
|
+
const _response = yield core.fetcher({
|
|
142
|
+
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ContentfulViewDeliveryEnvironment.Default, `spaces/${core.url.encodePathParam(spaceId)}/destinations/${core.url.encodePathParam(destinationId)}/nodes/${core.url.encodePathParam(nodeId)}/experiences`),
|
|
143
|
+
method: "GET",
|
|
144
|
+
headers: _headers,
|
|
145
|
+
queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
|
|
146
|
+
timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
|
|
147
|
+
maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
|
|
148
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
149
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
150
|
+
logging: this._options.logging,
|
|
151
|
+
});
|
|
152
|
+
if (_response.ok) {
|
|
153
|
+
return {
|
|
154
|
+
data: serializers.DestinationExperienceResolutionResponse.parseOrThrow(_response.body, {
|
|
155
|
+
unrecognizedObjectKeys: "passthrough",
|
|
156
|
+
allowUnrecognizedUnionMembers: true,
|
|
157
|
+
allowUnrecognizedEnumValues: true,
|
|
158
|
+
skipValidation: true,
|
|
159
|
+
breadcrumbsPrefix: ["response"],
|
|
160
|
+
}),
|
|
161
|
+
rawResponse: _response.rawResponse,
|
|
162
|
+
};
|
|
163
|
+
}
|
|
164
|
+
if (_response.error.reason === "status-code") {
|
|
165
|
+
switch (_response.error.statusCode) {
|
|
166
|
+
case 400:
|
|
167
|
+
throw new ContentfulViewDelivery.BadRequestError(_response.error.body, _response.rawResponse);
|
|
168
|
+
case 401:
|
|
169
|
+
throw new ContentfulViewDelivery.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
170
|
+
case 403:
|
|
171
|
+
throw new ContentfulViewDelivery.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
172
|
+
case 404:
|
|
173
|
+
throw new ContentfulViewDelivery.NotFoundError(_response.error.body, _response.rawResponse);
|
|
174
|
+
case 409:
|
|
175
|
+
throw new ContentfulViewDelivery.ConflictError(_response.error.body, _response.rawResponse);
|
|
176
|
+
case 422:
|
|
177
|
+
throw new ContentfulViewDelivery.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
178
|
+
case 500:
|
|
179
|
+
throw new ContentfulViewDelivery.InternalServerError(_response.error.body, _response.rawResponse);
|
|
180
|
+
default:
|
|
181
|
+
throw new errors.ContentfulViewDeliveryError({
|
|
182
|
+
statusCode: _response.error.statusCode,
|
|
183
|
+
body: _response.error.body,
|
|
184
|
+
rawResponse: _response.rawResponse,
|
|
185
|
+
});
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/spaces/{spaceId}/destinations/{destinationId}/nodes/{nodeId}/experiences");
|
|
189
|
+
});
|
|
190
|
+
}
|
|
191
|
+
/**
|
|
192
|
+
* @param {string} spaceId - ID of the space.
|
|
193
|
+
* @param {string} destinationId - ID of the published Destination.
|
|
194
|
+
* @param {string} nodeId - ID of the Destination Node to resolve.
|
|
195
|
+
* @param {ContentfulViewDelivery.DestinationExperiencesByNodeRequest} request
|
|
196
|
+
* @param {DestinationClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
197
|
+
*
|
|
198
|
+
* @throws {@link ContentfulViewDelivery.BadRequestError}
|
|
199
|
+
* @throws {@link ContentfulViewDelivery.UnauthorizedError}
|
|
200
|
+
* @throws {@link ContentfulViewDelivery.ForbiddenError}
|
|
201
|
+
* @throws {@link ContentfulViewDelivery.NotFoundError}
|
|
202
|
+
* @throws {@link ContentfulViewDelivery.ConflictError}
|
|
203
|
+
* @throws {@link ContentfulViewDelivery.UnprocessableEntityError}
|
|
204
|
+
* @throws {@link ContentfulViewDelivery.InternalServerError}
|
|
205
|
+
*
|
|
206
|
+
* @example
|
|
207
|
+
* await client.destination.resolveByNodeIdWithOverrides("yadj1kx9rmg0", "4RqKkGJqLHpMiomHuILv5N", "6BslKh9TdKGOK41VmLDjFZ")
|
|
208
|
+
*/
|
|
209
|
+
resolveByNodeIdWithOverrides(spaceId, destinationId, nodeId, request = {}, requestOptions) {
|
|
210
|
+
return core.HttpResponsePromise.fromPromise(this.__resolveByNodeIdWithOverrides(spaceId, destinationId, nodeId, request, requestOptions));
|
|
211
|
+
}
|
|
212
|
+
__resolveByNodeIdWithOverrides(spaceId_1, destinationId_1, nodeId_1) {
|
|
213
|
+
return __awaiter(this, arguments, void 0, function* (spaceId, destinationId, nodeId, request = {}, requestOptions) {
|
|
214
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
215
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
216
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({
|
|
217
|
+
"x-contentful-enable-alpha-feature": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.xContentfulEnableAlphaFeature) !== null && _b !== void 0 ? _b : "new-exo-entity-types",
|
|
218
|
+
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
219
|
+
const _response = yield core.fetcher({
|
|
220
|
+
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ContentfulViewDeliveryEnvironment.Default, `spaces/${core.url.encodePathParam(spaceId)}/destinations/${core.url.encodePathParam(destinationId)}/nodes/${core.url.encodePathParam(nodeId)}/experiences`),
|
|
221
|
+
method: "POST",
|
|
222
|
+
headers: _headers,
|
|
223
|
+
contentType: "application/json",
|
|
224
|
+
queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
|
|
225
|
+
requestType: "json",
|
|
226
|
+
body: serializers.DestinationExperiencesByNodeRequest.jsonOrThrow(request, {
|
|
227
|
+
unrecognizedObjectKeys: "passthrough",
|
|
228
|
+
allowUnrecognizedUnionMembers: true,
|
|
229
|
+
allowUnrecognizedEnumValues: true,
|
|
230
|
+
omitUndefined: true,
|
|
231
|
+
}),
|
|
232
|
+
timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
|
|
233
|
+
maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
|
|
234
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
235
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
236
|
+
logging: this._options.logging,
|
|
237
|
+
});
|
|
238
|
+
if (_response.ok) {
|
|
239
|
+
return {
|
|
240
|
+
data: serializers.DestinationExperienceResolutionResponse.parseOrThrow(_response.body, {
|
|
241
|
+
unrecognizedObjectKeys: "passthrough",
|
|
242
|
+
allowUnrecognizedUnionMembers: true,
|
|
243
|
+
allowUnrecognizedEnumValues: true,
|
|
244
|
+
skipValidation: true,
|
|
245
|
+
breadcrumbsPrefix: ["response"],
|
|
246
|
+
}),
|
|
247
|
+
rawResponse: _response.rawResponse,
|
|
248
|
+
};
|
|
249
|
+
}
|
|
250
|
+
if (_response.error.reason === "status-code") {
|
|
251
|
+
switch (_response.error.statusCode) {
|
|
252
|
+
case 400:
|
|
253
|
+
throw new ContentfulViewDelivery.BadRequestError(_response.error.body, _response.rawResponse);
|
|
254
|
+
case 401:
|
|
255
|
+
throw new ContentfulViewDelivery.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
256
|
+
case 403:
|
|
257
|
+
throw new ContentfulViewDelivery.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
258
|
+
case 404:
|
|
259
|
+
throw new ContentfulViewDelivery.NotFoundError(_response.error.body, _response.rawResponse);
|
|
260
|
+
case 409:
|
|
261
|
+
throw new ContentfulViewDelivery.ConflictError(_response.error.body, _response.rawResponse);
|
|
262
|
+
case 422:
|
|
263
|
+
throw new ContentfulViewDelivery.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
264
|
+
case 500:
|
|
265
|
+
throw new ContentfulViewDelivery.InternalServerError(_response.error.body, _response.rawResponse);
|
|
266
|
+
default:
|
|
267
|
+
throw new errors.ContentfulViewDeliveryError({
|
|
268
|
+
statusCode: _response.error.statusCode,
|
|
269
|
+
body: _response.error.body,
|
|
270
|
+
rawResponse: _response.rawResponse,
|
|
271
|
+
});
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/spaces/{spaceId}/destinations/{destinationId}/nodes/{nodeId}/experiences");
|
|
275
|
+
});
|
|
276
|
+
}
|
|
277
|
+
/**
|
|
278
|
+
* @param {string} spaceId - ID of the space.
|
|
279
|
+
* @param {string} destinationId - ID of the published Destination.
|
|
280
|
+
* @param {ContentfulViewDelivery.DestinationExperiencesByPathRequest} request
|
|
281
|
+
* @param {DestinationClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
282
|
+
*
|
|
283
|
+
* @throws {@link ContentfulViewDelivery.BadRequestError}
|
|
284
|
+
* @throws {@link ContentfulViewDelivery.UnauthorizedError}
|
|
285
|
+
* @throws {@link ContentfulViewDelivery.ForbiddenError}
|
|
286
|
+
* @throws {@link ContentfulViewDelivery.NotFoundError}
|
|
287
|
+
* @throws {@link ContentfulViewDelivery.ConflictError}
|
|
288
|
+
* @throws {@link ContentfulViewDelivery.UnprocessableEntityError}
|
|
289
|
+
* @throws {@link ContentfulViewDelivery.InternalServerError}
|
|
290
|
+
*
|
|
291
|
+
* @example
|
|
292
|
+
* await client.destination.resolveByPath("yadj1kx9rmg0", "4RqKkGJqLHpMiomHuILv5N", {
|
|
293
|
+
* path: "/products"
|
|
294
|
+
* })
|
|
295
|
+
*/
|
|
296
|
+
resolveByPath(spaceId, destinationId, request, requestOptions) {
|
|
297
|
+
return core.HttpResponsePromise.fromPromise(this.__resolveByPath(spaceId, destinationId, request, requestOptions));
|
|
298
|
+
}
|
|
299
|
+
__resolveByPath(spaceId, destinationId, request, requestOptions) {
|
|
300
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
301
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
302
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
303
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({
|
|
304
|
+
"x-contentful-enable-alpha-feature": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.xContentfulEnableAlphaFeature) !== null && _b !== void 0 ? _b : "new-exo-entity-types",
|
|
305
|
+
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
306
|
+
const _response = yield core.fetcher({
|
|
307
|
+
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ContentfulViewDeliveryEnvironment.Default, `spaces/${core.url.encodePathParam(spaceId)}/destinations/${core.url.encodePathParam(destinationId)}/experiences`),
|
|
308
|
+
method: "POST",
|
|
309
|
+
headers: _headers,
|
|
310
|
+
contentType: "application/json",
|
|
311
|
+
queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
|
|
312
|
+
requestType: "json",
|
|
313
|
+
body: serializers.DestinationExperiencesByPathRequest.jsonOrThrow(request, {
|
|
314
|
+
unrecognizedObjectKeys: "passthrough",
|
|
315
|
+
allowUnrecognizedUnionMembers: true,
|
|
316
|
+
allowUnrecognizedEnumValues: true,
|
|
317
|
+
omitUndefined: true,
|
|
318
|
+
}),
|
|
319
|
+
timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
|
|
320
|
+
maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
|
|
321
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
322
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
323
|
+
logging: this._options.logging,
|
|
324
|
+
});
|
|
325
|
+
if (_response.ok) {
|
|
326
|
+
return {
|
|
327
|
+
data: serializers.DestinationExperienceResolutionResponse.parseOrThrow(_response.body, {
|
|
328
|
+
unrecognizedObjectKeys: "passthrough",
|
|
329
|
+
allowUnrecognizedUnionMembers: true,
|
|
330
|
+
allowUnrecognizedEnumValues: true,
|
|
331
|
+
skipValidation: true,
|
|
332
|
+
breadcrumbsPrefix: ["response"],
|
|
333
|
+
}),
|
|
334
|
+
rawResponse: _response.rawResponse,
|
|
335
|
+
};
|
|
336
|
+
}
|
|
337
|
+
if (_response.error.reason === "status-code") {
|
|
338
|
+
switch (_response.error.statusCode) {
|
|
339
|
+
case 400:
|
|
340
|
+
throw new ContentfulViewDelivery.BadRequestError(_response.error.body, _response.rawResponse);
|
|
341
|
+
case 401:
|
|
342
|
+
throw new ContentfulViewDelivery.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
343
|
+
case 403:
|
|
344
|
+
throw new ContentfulViewDelivery.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
345
|
+
case 404:
|
|
346
|
+
throw new ContentfulViewDelivery.NotFoundError(_response.error.body, _response.rawResponse);
|
|
347
|
+
case 409:
|
|
348
|
+
throw new ContentfulViewDelivery.ConflictError(_response.error.body, _response.rawResponse);
|
|
349
|
+
case 422:
|
|
350
|
+
throw new ContentfulViewDelivery.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
351
|
+
case 500:
|
|
352
|
+
throw new ContentfulViewDelivery.InternalServerError(_response.error.body, _response.rawResponse);
|
|
353
|
+
default:
|
|
354
|
+
throw new errors.ContentfulViewDeliveryError({
|
|
355
|
+
statusCode: _response.error.statusCode,
|
|
356
|
+
body: _response.error.body,
|
|
357
|
+
rawResponse: _response.rawResponse,
|
|
358
|
+
});
|
|
359
|
+
}
|
|
360
|
+
}
|
|
361
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/spaces/{spaceId}/destinations/{destinationId}/experiences");
|
|
362
|
+
});
|
|
363
|
+
}
|
|
364
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./requests/index.mjs";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./requests/index.mjs";
|
package/dist/esm/api/resources/destination/client/requests/DestinationExperiencesByPathRequest.d.mts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type * as ContentfulViewDelivery from "../../../../index.mjs";
|
|
2
|
+
/**
|
|
3
|
+
* @example
|
|
4
|
+
* {
|
|
5
|
+
* path: "/products"
|
|
6
|
+
* }
|
|
7
|
+
*/
|
|
8
|
+
export interface DestinationExperiencesByPathRequest {
|
|
9
|
+
/** Absolute path to resolve. Must start with `/`. */
|
|
10
|
+
path: string;
|
|
11
|
+
extensions?: ContentfulViewDelivery.DestinationExperiencesExtensions;
|
|
12
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @example
|
|
3
|
+
* {
|
|
4
|
+
* limit: 1,
|
|
5
|
+
* pageNext: "pageNext",
|
|
6
|
+
* pagePrev: "pagePrev"
|
|
7
|
+
* }
|
|
8
|
+
*/
|
|
9
|
+
export interface SitemapDestinationRequest {
|
|
10
|
+
/** Maximum number of paths to return. Defaults to `100`, maximum `1000`. */
|
|
11
|
+
limit?: number;
|
|
12
|
+
/** Cursor returned as `paths.pages.next` by a previous request. Treat the value as opaque and do not combine it with `pagePrev`. */
|
|
13
|
+
pageNext?: string;
|
|
14
|
+
/** Cursor returned as `paths.pages.prev` by a previous request. Treat the value as opaque and do not combine it with `pageNext`. */
|
|
15
|
+
pagePrev?: string;
|
|
16
|
+
}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export type { DestinationExperiencesByNodeRequest } from "./DestinationExperiencesByNodeRequest.mjs";
|
|
2
|
+
export type { DestinationExperiencesByPathRequest } from "./DestinationExperiencesByPathRequest.mjs";
|
|
3
|
+
export type { SitemapDestinationRequest } from "./SitemapDestinationRequest.mjs";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./client/index.mjs";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./client/index.mjs";
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
export * from "./component/client/requests/index.mjs";
|
|
2
2
|
export * as component from "./component/index.mjs";
|
|
3
3
|
export * from "./component/types/index.mjs";
|
|
4
|
+
export * from "./destination/client/requests/index.mjs";
|
|
5
|
+
export * as destination from "./destination/index.mjs";
|
|
4
6
|
export * from "./experience/client/requests/index.mjs";
|
|
5
7
|
export * as experience from "./experience/index.mjs";
|
|
6
8
|
export * from "./experience/types/index.mjs";
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
export * from "./component/client/requests/index.mjs";
|
|
2
2
|
export * as component from "./component/index.mjs";
|
|
3
3
|
export * from "./component/types/index.mjs";
|
|
4
|
+
export * from "./destination/client/requests/index.mjs";
|
|
5
|
+
export * as destination from "./destination/index.mjs";
|
|
4
6
|
export * from "./experience/client/requests/index.mjs";
|
|
5
7
|
export * as experience from "./experience/index.mjs";
|
|
6
8
|
export * from "./experience/types/index.mjs";
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type * as ContentfulViewDelivery from "../index.mjs";
|
|
2
|
+
/**
|
|
3
|
+
* Resolution returns either hydrated Experiences or a redirect, never both.
|
|
4
|
+
*/
|
|
5
|
+
export type DestinationExperienceResolutionResponse = ContentfulViewDelivery.DestinationExperiencesResponse | ContentfulViewDelivery.DestinationRedirectResponse;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type * as ContentfulViewDelivery from "../index.mjs";
|
|
2
|
+
export interface DestinationSitemap {
|
|
3
|
+
/** The Destination the sitemap belongs to. */
|
|
4
|
+
property: ContentfulViewDelivery.DestinationSitemapProperty;
|
|
5
|
+
/** Flattened, paginated list of every routable path in the Destination. */
|
|
6
|
+
paths: ContentfulViewDelivery.DestinationSitemapPaths;
|
|
7
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type * as ContentfulViewDelivery from "../index.mjs";
|
|
2
|
+
/**
|
|
3
|
+
* Flattened, paginated list of every routable path in the Destination.
|
|
4
|
+
*/
|
|
5
|
+
export interface DestinationSitemapPaths {
|
|
6
|
+
sys: ContentfulViewDelivery.DestinationSitemapPathsSys;
|
|
7
|
+
limit: number;
|
|
8
|
+
items: ContentfulViewDelivery.SitemapPath[];
|
|
9
|
+
/** Cursor tokens for paging. Treat the values as opaque. */
|
|
10
|
+
pages: ContentfulViewDelivery.DestinationSitemapPathsPages;
|
|
11
|
+
}
|