@fastpix/fastpix-node 2.0.6 → 2.0.7
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/commonjs/funcs/aiFeaturesGenerateNamedEntities.d.ts +3 -1
- package/dist/commonjs/funcs/aiFeaturesGenerateNamedEntities.d.ts.map +1 -1
- package/dist/commonjs/funcs/aiFeaturesGenerateNamedEntities.js +0 -22
- package/dist/commonjs/funcs/aiFeaturesGenerateNamedEntities.js.map +1 -1
- package/dist/commonjs/funcs/aiFeaturesUpdateSummary.d.ts +3 -1
- package/dist/commonjs/funcs/aiFeaturesUpdateSummary.d.ts.map +1 -1
- package/dist/commonjs/funcs/aiFeaturesUpdateSummary.js +0 -18
- package/dist/commonjs/funcs/aiFeaturesUpdateSummary.js.map +1 -1
- package/dist/commonjs/funcs/dimensionsList.d.ts +3 -1
- package/dist/commonjs/funcs/dimensionsList.d.ts.map +1 -1
- package/dist/commonjs/funcs/dimensionsList.js +0 -10
- package/dist/commonjs/funcs/dimensionsList.js.map +1 -1
- package/dist/commonjs/funcs/dimensionsListFilterValues.d.ts +3 -1
- package/dist/commonjs/funcs/dimensionsListFilterValues.d.ts.map +1 -1
- package/dist/commonjs/funcs/dimensionsListFilterValues.js +0 -14
- package/dist/commonjs/funcs/dimensionsListFilterValues.js.map +1 -1
- package/dist/commonjs/funcs/drmConfigurationsGet.d.ts +3 -1
- package/dist/commonjs/funcs/drmConfigurationsGet.d.ts.map +1 -1
- package/dist/commonjs/funcs/drmConfigurationsGet.js +0 -13
- package/dist/commonjs/funcs/drmConfigurationsGet.js.map +1 -1
- package/dist/commonjs/funcs/drmConfigurationsList.d.ts +3 -1
- package/dist/commonjs/funcs/drmConfigurationsList.d.ts.map +1 -1
- package/dist/commonjs/funcs/drmConfigurationsList.js +0 -17
- package/dist/commonjs/funcs/drmConfigurationsList.js.map +1 -1
- package/dist/commonjs/funcs/errorsList.d.ts +3 -1
- package/dist/commonjs/funcs/errorsList.d.ts.map +1 -1
- package/dist/commonjs/funcs/errorsList.js +0 -20
- package/dist/commonjs/funcs/errorsList.js.map +1 -1
- package/dist/commonjs/funcs/inVideoAIUpdateModeration.d.ts +3 -1
- package/dist/commonjs/funcs/inVideoAIUpdateModeration.d.ts.map +1 -1
- package/dist/commonjs/funcs/inVideoAIUpdateModeration.js +0 -17
- package/dist/commonjs/funcs/inVideoAIUpdateModeration.js.map +1 -1
- package/dist/commonjs/funcs/inVideoAIfeaturesGenerateChapters.d.ts +3 -1
- package/dist/commonjs/funcs/inVideoAIfeaturesGenerateChapters.d.ts.map +1 -1
- package/dist/commonjs/funcs/inVideoAIfeaturesGenerateChapters.js +0 -17
- package/dist/commonjs/funcs/inVideoAIfeaturesGenerateChapters.js.map +1 -1
- package/dist/commonjs/funcs/inputVideoCreate.d.ts +3 -1
- package/dist/commonjs/funcs/inputVideoCreate.d.ts.map +1 -1
- package/dist/commonjs/funcs/inputVideoCreate.js +0 -40
- package/dist/commonjs/funcs/inputVideoCreate.js.map +1 -1
- package/dist/commonjs/funcs/inputVideoUpload.d.ts +3 -1
- package/dist/commonjs/funcs/inputVideoUpload.d.ts.map +1 -1
- package/dist/commonjs/funcs/inputVideoUpload.js +0 -30
- package/dist/commonjs/funcs/inputVideoUpload.js.map +1 -1
- package/dist/commonjs/funcs/livePlaybackCreateId.d.ts +3 -1
- package/dist/commonjs/funcs/livePlaybackCreateId.d.ts.map +1 -1
- package/dist/commonjs/funcs/livePlaybackCreateId.js +0 -12
- package/dist/commonjs/funcs/livePlaybackCreateId.js.map +1 -1
- package/dist/commonjs/funcs/livePlaybackDelete.d.ts +3 -1
- package/dist/commonjs/funcs/livePlaybackDelete.d.ts.map +1 -1
- package/dist/commonjs/funcs/livePlaybackDelete.js +0 -9
- package/dist/commonjs/funcs/livePlaybackDelete.js.map +1 -1
- package/dist/commonjs/funcs/livePlaybackGet.d.ts +3 -1
- package/dist/commonjs/funcs/livePlaybackGet.d.ts.map +1 -1
- package/dist/commonjs/funcs/livePlaybackGet.js +0 -9
- package/dist/commonjs/funcs/livePlaybackGet.js.map +1 -1
- package/dist/commonjs/funcs/liveStreamsCreate.d.ts +3 -1
- package/dist/commonjs/funcs/liveStreamsCreate.d.ts.map +1 -1
- package/dist/commonjs/funcs/liveStreamsCreate.js +0 -22
- package/dist/commonjs/funcs/liveStreamsCreate.js.map +1 -1
- package/dist/commonjs/funcs/liveStreamsDelete.d.ts +3 -1
- package/dist/commonjs/funcs/liveStreamsDelete.d.ts.map +1 -1
- package/dist/commonjs/funcs/liveStreamsDelete.js +0 -14
- package/dist/commonjs/funcs/liveStreamsDelete.js.map +1 -1
- package/dist/commonjs/funcs/liveStreamsEnable.d.ts +3 -1
- package/dist/commonjs/funcs/liveStreamsEnable.d.ts.map +1 -1
- package/dist/commonjs/funcs/liveStreamsEnable.js +0 -16
- package/dist/commonjs/funcs/liveStreamsEnable.js.map +1 -1
- package/dist/commonjs/funcs/liveStreamsList.d.ts +3 -1
- package/dist/commonjs/funcs/liveStreamsList.d.ts.map +1 -1
- package/dist/commonjs/funcs/liveStreamsList.js +0 -10
- package/dist/commonjs/funcs/liveStreamsList.js.map +1 -1
- package/dist/commonjs/funcs/liveStreamsListClips.d.ts +3 -1
- package/dist/commonjs/funcs/liveStreamsListClips.d.ts.map +1 -1
- package/dist/commonjs/funcs/liveStreamsListClips.js +0 -17
- package/dist/commonjs/funcs/liveStreamsListClips.js.map +1 -1
- package/dist/commonjs/funcs/manageLiveStreamComplete.d.ts +3 -1
- package/dist/commonjs/funcs/manageLiveStreamComplete.d.ts.map +1 -1
- package/dist/commonjs/funcs/manageLiveStreamComplete.js +0 -16
- package/dist/commonjs/funcs/manageLiveStreamComplete.js.map +1 -1
- package/dist/commonjs/funcs/manageLiveStreamDisable.d.ts +3 -1
- package/dist/commonjs/funcs/manageLiveStreamDisable.d.ts.map +1 -1
- package/dist/commonjs/funcs/manageLiveStreamDisable.js +0 -14
- package/dist/commonjs/funcs/manageLiveStreamDisable.js.map +1 -1
- package/dist/commonjs/funcs/manageLiveStreamGet.d.ts +3 -1
- package/dist/commonjs/funcs/manageLiveStreamGet.d.ts.map +1 -1
- package/dist/commonjs/funcs/manageLiveStreamGet.js +0 -11
- package/dist/commonjs/funcs/manageLiveStreamGet.js.map +1 -1
- package/dist/commonjs/funcs/manageLiveStreamGetViewerCount.d.ts +3 -1
- package/dist/commonjs/funcs/manageLiveStreamGetViewerCount.d.ts.map +1 -1
- package/dist/commonjs/funcs/manageLiveStreamGetViewerCount.js +0 -14
- package/dist/commonjs/funcs/manageLiveStreamGetViewerCount.js.map +1 -1
- package/dist/commonjs/funcs/manageLiveStreamUpdate.d.ts +3 -1
- package/dist/commonjs/funcs/manageLiveStreamUpdate.d.ts.map +1 -1
- package/dist/commonjs/funcs/manageLiveStreamUpdate.js +0 -14
- package/dist/commonjs/funcs/manageLiveStreamUpdate.js.map +1 -1
- package/dist/commonjs/funcs/manageVideosAddTrack.d.ts +3 -1
- package/dist/commonjs/funcs/manageVideosAddTrack.d.ts.map +1 -1
- package/dist/commonjs/funcs/manageVideosAddTrack.js +0 -27
- package/dist/commonjs/funcs/manageVideosAddTrack.js.map +1 -1
- package/dist/commonjs/funcs/manageVideosCancelUpload.d.ts +3 -1
- package/dist/commonjs/funcs/manageVideosCancelUpload.d.ts.map +1 -1
- package/dist/commonjs/funcs/manageVideosCancelUpload.js +0 -19
- package/dist/commonjs/funcs/manageVideosCancelUpload.js.map +1 -1
- package/dist/commonjs/funcs/manageVideosDelete.d.ts +3 -1
- package/dist/commonjs/funcs/manageVideosDelete.d.ts.map +1 -1
- package/dist/commonjs/funcs/manageVideosDelete.js +0 -17
- package/dist/commonjs/funcs/manageVideosDelete.js.map +1 -1
- package/dist/commonjs/funcs/manageVideosGenerateSubtitleTrack.d.ts +3 -1
- package/dist/commonjs/funcs/manageVideosGenerateSubtitleTrack.d.ts.map +1 -1
- package/dist/commonjs/funcs/manageVideosGenerateSubtitleTrack.js +0 -22
- package/dist/commonjs/funcs/manageVideosGenerateSubtitleTrack.js.map +1 -1
- package/dist/commonjs/funcs/manageVideosGet.d.ts +3 -1
- package/dist/commonjs/funcs/manageVideosGet.d.ts.map +1 -1
- package/dist/commonjs/funcs/manageVideosGet.js +0 -20
- package/dist/commonjs/funcs/manageVideosGet.js.map +1 -1
- package/dist/commonjs/funcs/manageVideosGetSummary.d.ts +3 -2
- package/dist/commonjs/funcs/manageVideosGetSummary.d.ts.map +1 -1
- package/dist/commonjs/funcs/manageVideosGetSummary.js +0 -17
- package/dist/commonjs/funcs/manageVideosGetSummary.js.map +1 -1
- package/dist/commonjs/funcs/manageVideosListUploads.d.ts +3 -1
- package/dist/commonjs/funcs/manageVideosListUploads.d.ts.map +1 -1
- package/dist/commonjs/funcs/manageVideosListUploads.js +0 -19
- package/dist/commonjs/funcs/manageVideosListUploads.js.map +1 -1
- package/dist/commonjs/funcs/manageVideosRetrieveMediaInputInfo.d.ts +3 -1
- package/dist/commonjs/funcs/manageVideosRetrieveMediaInputInfo.d.ts.map +1 -1
- package/dist/commonjs/funcs/manageVideosRetrieveMediaInputInfo.js +0 -18
- package/dist/commonjs/funcs/manageVideosRetrieveMediaInputInfo.js.map +1 -1
- package/dist/commonjs/funcs/manageVideosUpdate.d.ts +3 -1
- package/dist/commonjs/funcs/manageVideosUpdate.d.ts.map +1 -1
- package/dist/commonjs/funcs/manageVideosUpdate.js +0 -19
- package/dist/commonjs/funcs/manageVideosUpdate.js.map +1 -1
- package/dist/commonjs/funcs/manageVideosUpdateMp4Support.d.ts +3 -1
- package/dist/commonjs/funcs/manageVideosUpdateMp4Support.d.ts.map +1 -1
- package/dist/commonjs/funcs/manageVideosUpdateMp4Support.js +0 -33
- package/dist/commonjs/funcs/manageVideosUpdateMp4Support.js.map +1 -1
- package/dist/commonjs/funcs/manageVideosUpdateTrack.d.ts +3 -1
- package/dist/commonjs/funcs/manageVideosUpdateTrack.d.ts.map +1 -1
- package/dist/commonjs/funcs/manageVideosUpdateTrack.js +0 -32
- package/dist/commonjs/funcs/manageVideosUpdateTrack.js.map +1 -1
- package/dist/commonjs/funcs/mediaDeleteTrack.d.ts +3 -1
- package/dist/commonjs/funcs/mediaDeleteTrack.d.ts.map +1 -1
- package/dist/commonjs/funcs/mediaDeleteTrack.js +0 -27
- package/dist/commonjs/funcs/mediaDeleteTrack.js.map +1 -1
- package/dist/commonjs/funcs/mediaGetClips.d.ts +3 -1
- package/dist/commonjs/funcs/mediaGetClips.d.ts.map +1 -1
- package/dist/commonjs/funcs/mediaGetClips.js +0 -21
- package/dist/commonjs/funcs/mediaGetClips.js.map +1 -1
- package/dist/commonjs/funcs/mediaList.d.ts +3 -1
- package/dist/commonjs/funcs/mediaList.d.ts.map +1 -1
- package/dist/commonjs/funcs/mediaList.js +0 -13
- package/dist/commonjs/funcs/mediaList.js.map +1 -1
- package/dist/commonjs/funcs/mediaUpdateSourceAccess.d.ts +3 -1
- package/dist/commonjs/funcs/mediaUpdateSourceAccess.d.ts.map +1 -1
- package/dist/commonjs/funcs/mediaUpdateSourceAccess.js +0 -15
- package/dist/commonjs/funcs/mediaUpdateSourceAccess.js.map +1 -1
- package/dist/commonjs/funcs/metricsGetTimeseriesData.d.ts +3 -1
- package/dist/commonjs/funcs/metricsGetTimeseriesData.d.ts.map +1 -1
- package/dist/commonjs/funcs/metricsGetTimeseriesData.js +0 -12
- package/dist/commonjs/funcs/metricsGetTimeseriesData.js.map +1 -1
- package/dist/commonjs/funcs/metricsListBreakdownValues.d.ts +3 -1
- package/dist/commonjs/funcs/metricsListBreakdownValues.d.ts.map +1 -1
- package/dist/commonjs/funcs/metricsListBreakdownValues.js +0 -32
- package/dist/commonjs/funcs/metricsListBreakdownValues.js.map +1 -1
- package/dist/commonjs/funcs/metricsListCompares.d.ts +3 -1
- package/dist/commonjs/funcs/metricsListCompares.d.ts.map +1 -1
- package/dist/commonjs/funcs/metricsListCompares.js +0 -25
- package/dist/commonjs/funcs/metricsListCompares.js.map +1 -1
- package/dist/commonjs/funcs/metricsListOverallValues.d.ts +3 -1
- package/dist/commonjs/funcs/metricsListOverallValues.d.ts.map +1 -1
- package/dist/commonjs/funcs/metricsListOverallValues.js +0 -25
- package/dist/commonjs/funcs/metricsListOverallValues.js.map +1 -1
- package/dist/commonjs/funcs/playbackCreate.d.ts +3 -1
- package/dist/commonjs/funcs/playbackCreate.d.ts.map +1 -1
- package/dist/commonjs/funcs/playbackCreate.js +0 -19
- package/dist/commonjs/funcs/playbackCreate.js.map +1 -1
- package/dist/commonjs/funcs/playbackDelete.d.ts +3 -1
- package/dist/commonjs/funcs/playbackDelete.d.ts.map +1 -1
- package/dist/commonjs/funcs/playbackDelete.js +0 -16
- package/dist/commonjs/funcs/playbackDelete.js.map +1 -1
- package/dist/commonjs/funcs/playbackGet.d.ts +3 -1
- package/dist/commonjs/funcs/playbackGet.d.ts.map +1 -1
- package/dist/commonjs/funcs/playbackGet.js +0 -13
- package/dist/commonjs/funcs/playbackGet.js.map +1 -1
- package/dist/commonjs/funcs/playbackListIds.d.ts +3 -1
- package/dist/commonjs/funcs/playbackListIds.d.ts.map +1 -1
- package/dist/commonjs/funcs/playbackListIds.js +0 -13
- package/dist/commonjs/funcs/playbackListIds.js.map +1 -1
- package/dist/commonjs/funcs/playbackUpdateDomainRestrictions.d.ts +3 -1
- package/dist/commonjs/funcs/playbackUpdateDomainRestrictions.d.ts.map +1 -1
- package/dist/commonjs/funcs/playbackUpdateDomainRestrictions.js +0 -15
- package/dist/commonjs/funcs/playbackUpdateDomainRestrictions.js.map +1 -1
- package/dist/commonjs/funcs/playbackUpdateUserAgentRestrictions.d.ts +3 -1
- package/dist/commonjs/funcs/playbackUpdateUserAgentRestrictions.d.ts.map +1 -1
- package/dist/commonjs/funcs/playbackUpdateUserAgentRestrictions.js +0 -15
- package/dist/commonjs/funcs/playbackUpdateUserAgentRestrictions.js.map +1 -1
- package/dist/commonjs/funcs/playlistCreate.d.ts +3 -1
- package/dist/commonjs/funcs/playlistCreate.d.ts.map +1 -1
- package/dist/commonjs/funcs/playlistCreate.js +0 -19
- package/dist/commonjs/funcs/playlistCreate.js.map +1 -1
- package/dist/commonjs/funcs/playlistDelete.d.ts +3 -1
- package/dist/commonjs/funcs/playlistDelete.d.ts.map +1 -1
- package/dist/commonjs/funcs/playlistDelete.js +0 -11
- package/dist/commonjs/funcs/playlistDelete.js.map +1 -1
- package/dist/commonjs/funcs/playlistGet.d.ts +3 -1
- package/dist/commonjs/funcs/playlistGet.d.ts.map +1 -1
- package/dist/commonjs/funcs/playlistGet.js +0 -9
- package/dist/commonjs/funcs/playlistGet.js.map +1 -1
- package/dist/commonjs/funcs/playlistList.d.ts +3 -1
- package/dist/commonjs/funcs/playlistList.d.ts.map +1 -1
- package/dist/commonjs/funcs/playlistList.js +0 -13
- package/dist/commonjs/funcs/playlistList.js.map +1 -1
- package/dist/commonjs/funcs/playlistUpdate.d.ts +3 -1
- package/dist/commonjs/funcs/playlistUpdate.d.ts.map +1 -1
- package/dist/commonjs/funcs/playlistUpdate.js +0 -12
- package/dist/commonjs/funcs/playlistUpdate.js.map +1 -1
- package/dist/commonjs/funcs/playlistUpdateMediaOrder.d.ts +3 -1
- package/dist/commonjs/funcs/playlistUpdateMediaOrder.d.ts.map +1 -1
- package/dist/commonjs/funcs/playlistUpdateMediaOrder.js +0 -12
- package/dist/commonjs/funcs/playlistUpdateMediaOrder.js.map +1 -1
- package/dist/commonjs/funcs/playlistsAddMedia.d.ts +3 -1
- package/dist/commonjs/funcs/playlistsAddMedia.d.ts.map +1 -1
- package/dist/commonjs/funcs/playlistsAddMedia.js +0 -12
- package/dist/commonjs/funcs/playlistsAddMedia.js.map +1 -1
- package/dist/commonjs/funcs/playlistsDeleteMedia.d.ts +3 -1
- package/dist/commonjs/funcs/playlistsDeleteMedia.d.ts.map +1 -1
- package/dist/commonjs/funcs/playlistsDeleteMedia.js +0 -12
- package/dist/commonjs/funcs/playlistsDeleteMedia.js.map +1 -1
- package/dist/commonjs/funcs/signingKeysCreate.d.ts +3 -1
- package/dist/commonjs/funcs/signingKeysCreate.d.ts.map +1 -1
- package/dist/commonjs/funcs/signingKeysCreate.js +0 -21
- package/dist/commonjs/funcs/signingKeysCreate.js.map +1 -1
- package/dist/commonjs/funcs/signingKeysDelete.d.ts +3 -1
- package/dist/commonjs/funcs/signingKeysDelete.d.ts.map +1 -1
- package/dist/commonjs/funcs/signingKeysDelete.js +0 -18
- package/dist/commonjs/funcs/signingKeysDelete.js.map +1 -1
- package/dist/commonjs/funcs/signingKeysGetById.d.ts +3 -1
- package/dist/commonjs/funcs/signingKeysGetById.d.ts.map +1 -1
- package/dist/commonjs/funcs/signingKeysGetById.js +0 -38
- package/dist/commonjs/funcs/signingKeysGetById.js.map +1 -1
- package/dist/commonjs/funcs/signingKeysList.d.ts +3 -1
- package/dist/commonjs/funcs/signingKeysList.d.ts.map +1 -1
- package/dist/commonjs/funcs/signingKeysList.js +0 -16
- package/dist/commonjs/funcs/signingKeysList.js.map +1 -1
- package/dist/commonjs/funcs/simulcastStreamsDelete.d.ts +3 -1
- package/dist/commonjs/funcs/simulcastStreamsDelete.d.ts.map +1 -1
- package/dist/commonjs/funcs/simulcastStreamsDelete.js +0 -11
- package/dist/commonjs/funcs/simulcastStreamsDelete.js.map +1 -1
- package/dist/commonjs/funcs/simulcastsCreate.d.ts +3 -1
- package/dist/commonjs/funcs/simulcastsCreate.d.ts.map +1 -1
- package/dist/commonjs/funcs/simulcastsCreate.js +0 -16
- package/dist/commonjs/funcs/simulcastsCreate.js.map +1 -1
- package/dist/commonjs/funcs/simulcastsGet.d.ts +3 -1
- package/dist/commonjs/funcs/simulcastsGet.d.ts.map +1 -1
- package/dist/commonjs/funcs/simulcastsGet.js +0 -9
- package/dist/commonjs/funcs/simulcastsGet.js.map +1 -1
- package/dist/commonjs/funcs/simulcastsUpdate.d.ts +3 -1
- package/dist/commonjs/funcs/simulcastsUpdate.d.ts.map +1 -1
- package/dist/commonjs/funcs/simulcastsUpdate.js +0 -11
- package/dist/commonjs/funcs/simulcastsUpdate.js.map +1 -1
- package/dist/commonjs/funcs/viewsGetDetails.d.ts +3 -1
- package/dist/commonjs/funcs/viewsGetDetails.d.ts.map +1 -1
- package/dist/commonjs/funcs/viewsGetDetails.js +0 -14
- package/dist/commonjs/funcs/viewsGetDetails.js.map +1 -1
- package/dist/commonjs/funcs/viewsList.d.ts +3 -1
- package/dist/commonjs/funcs/viewsList.d.ts.map +1 -1
- package/dist/commonjs/funcs/viewsList.js +0 -28
- package/dist/commonjs/funcs/viewsList.js.map +1 -1
- package/dist/commonjs/funcs/viewsListTopContent.d.ts +3 -1
- package/dist/commonjs/funcs/viewsListTopContent.d.ts.map +1 -1
- package/dist/commonjs/funcs/viewsListTopContent.js +0 -20
- package/dist/commonjs/funcs/viewsListTopContent.js.map +1 -1
- package/dist/commonjs/hooks/hooks.d.ts.map +1 -1
- package/dist/commonjs/hooks/hooks.js +30 -23
- package/dist/commonjs/hooks/hooks.js.map +1 -1
- package/dist/commonjs/hooks/types.d.ts +9 -5
- package/dist/commonjs/hooks/types.d.ts.map +1 -1
- package/dist/commonjs/lib/base64.js +1 -1
- package/dist/commonjs/lib/base64.js.map +1 -1
- package/dist/commonjs/lib/config.d.ts +2 -2
- package/dist/commonjs/lib/config.js +2 -2
- package/dist/commonjs/lib/dlv.d.ts +1 -1
- package/dist/commonjs/lib/dlv.d.ts.map +1 -1
- package/dist/commonjs/lib/dlv.js +2 -3
- package/dist/commonjs/lib/dlv.js.map +1 -1
- package/dist/commonjs/lib/encodings.d.ts.map +1 -1
- package/dist/commonjs/lib/encodings.js +17 -5
- package/dist/commonjs/lib/encodings.js.map +1 -1
- package/dist/commonjs/lib/files.js.map +1 -1
- package/dist/commonjs/lib/http.d.ts +2 -2
- package/dist/commonjs/lib/http.d.ts.map +1 -1
- package/dist/commonjs/lib/http.js +41 -11
- package/dist/commonjs/lib/http.js.map +1 -1
- package/dist/commonjs/lib/matchers.d.ts.map +1 -1
- package/dist/commonjs/lib/matchers.js +79 -81
- package/dist/commonjs/lib/matchers.js.map +1 -1
- package/dist/commonjs/lib/primitives.js +1 -1
- package/dist/commonjs/lib/primitives.js.map +1 -1
- package/dist/commonjs/lib/retries.d.ts.map +1 -1
- package/dist/commonjs/lib/retries.js +55 -33
- package/dist/commonjs/lib/retries.js.map +1 -1
- package/dist/commonjs/lib/schemas.js +1 -1
- package/dist/commonjs/lib/schemas.js.map +1 -1
- package/dist/commonjs/lib/sdks.d.ts.map +1 -1
- package/dist/commonjs/lib/sdks.js +83 -44
- package/dist/commonjs/lib/sdks.js.map +1 -1
- package/dist/commonjs/lib/security.d.ts +1 -1
- package/dist/commonjs/lib/security.d.ts.map +1 -1
- package/dist/commonjs/lib/security.js +7 -2
- package/dist/commonjs/lib/security.js.map +1 -1
- package/dist/commonjs/lib/url.js +2 -2
- package/dist/commonjs/lib/url.js.map +1 -1
- package/dist/commonjs/models/errordetails.d.ts +3 -7
- package/dist/commonjs/models/errordetails.d.ts.map +1 -1
- package/dist/commonjs/models/errordetails.js.map +1 -1
- package/dist/commonjs/models/errors/fastpixerror.js +35 -0
- package/dist/commonjs/models/errors/fastpixerror.js.map +1 -1
- package/dist/commonjs/models/errors/httpclienterrors.d.ts.map +1 -1
- package/dist/commonjs/models/errors/httpclienterrors.js +47 -9
- package/dist/commonjs/models/errors/httpclienterrors.js.map +1 -1
- package/dist/commonjs/models/errors/responsevalidationerror.js +18 -0
- package/dist/commonjs/models/errors/responsevalidationerror.js.map +1 -1
- package/dist/commonjs/models/errors/sdkvalidationerror.js +18 -0
- package/dist/commonjs/models/errors/sdkvalidationerror.js.map +1 -1
- package/dist/commonjs/models/toperrordetails.d.ts +6 -14
- package/dist/commonjs/models/toperrordetails.d.ts.map +1 -1
- package/dist/commonjs/models/toperrordetails.js.map +1 -1
- package/dist/commonjs/models/updatetrackrequest.d.ts.map +1 -1
- package/dist/commonjs/models/updatetrackrequest.js +5 -1
- package/dist/commonjs/models/updatetrackrequest.js.map +1 -1
- package/dist/commonjs/sdk/sdk.d.ts.map +1 -1
- package/dist/commonjs/sdk/sdk.js +163 -20
- package/dist/commonjs/sdk/sdk.js.map +1 -1
- package/dist/commonjs/types/async.d.ts +5 -7
- package/dist/commonjs/types/async.d.ts.map +1 -1
- package/dist/commonjs/types/async.js +34 -25
- package/dist/commonjs/types/async.js.map +1 -1
- package/dist/commonjs/types/primitives.d.ts.map +1 -1
- package/dist/commonjs/types/primitives.js +8 -4
- package/dist/commonjs/types/primitives.js.map +1 -1
- package/dist/commonjs/types/rfcdate.d.ts +1 -1
- package/dist/commonjs/types/rfcdate.d.ts.map +1 -1
- package/dist/commonjs/types/rfcdate.js +7 -1
- package/dist/commonjs/types/rfcdate.js.map +1 -1
- package/dist/esm/funcs/aiFeaturesGenerateNamedEntities.d.ts +3 -1
- package/dist/esm/funcs/aiFeaturesGenerateNamedEntities.d.ts.map +1 -1
- package/dist/esm/funcs/aiFeaturesGenerateNamedEntities.js +0 -22
- package/dist/esm/funcs/aiFeaturesGenerateNamedEntities.js.map +1 -1
- package/dist/esm/funcs/aiFeaturesUpdateSummary.d.ts +3 -1
- package/dist/esm/funcs/aiFeaturesUpdateSummary.d.ts.map +1 -1
- package/dist/esm/funcs/aiFeaturesUpdateSummary.js +0 -18
- package/dist/esm/funcs/aiFeaturesUpdateSummary.js.map +1 -1
- package/dist/esm/funcs/dimensionsList.d.ts +3 -1
- package/dist/esm/funcs/dimensionsList.d.ts.map +1 -1
- package/dist/esm/funcs/dimensionsList.js +0 -10
- package/dist/esm/funcs/dimensionsList.js.map +1 -1
- package/dist/esm/funcs/dimensionsListFilterValues.d.ts +3 -1
- package/dist/esm/funcs/dimensionsListFilterValues.d.ts.map +1 -1
- package/dist/esm/funcs/dimensionsListFilterValues.js +0 -14
- package/dist/esm/funcs/dimensionsListFilterValues.js.map +1 -1
- package/dist/esm/funcs/drmConfigurationsGet.d.ts +3 -1
- package/dist/esm/funcs/drmConfigurationsGet.d.ts.map +1 -1
- package/dist/esm/funcs/drmConfigurationsGet.js +0 -13
- package/dist/esm/funcs/drmConfigurationsGet.js.map +1 -1
- package/dist/esm/funcs/drmConfigurationsList.d.ts +3 -1
- package/dist/esm/funcs/drmConfigurationsList.d.ts.map +1 -1
- package/dist/esm/funcs/drmConfigurationsList.js +0 -17
- package/dist/esm/funcs/drmConfigurationsList.js.map +1 -1
- package/dist/esm/funcs/errorsList.d.ts +3 -1
- package/dist/esm/funcs/errorsList.d.ts.map +1 -1
- package/dist/esm/funcs/errorsList.js +0 -20
- package/dist/esm/funcs/errorsList.js.map +1 -1
- package/dist/esm/funcs/inVideoAIUpdateModeration.d.ts +3 -1
- package/dist/esm/funcs/inVideoAIUpdateModeration.d.ts.map +1 -1
- package/dist/esm/funcs/inVideoAIUpdateModeration.js +0 -17
- package/dist/esm/funcs/inVideoAIUpdateModeration.js.map +1 -1
- package/dist/esm/funcs/inVideoAIfeaturesGenerateChapters.d.ts +3 -1
- package/dist/esm/funcs/inVideoAIfeaturesGenerateChapters.d.ts.map +1 -1
- package/dist/esm/funcs/inVideoAIfeaturesGenerateChapters.js +0 -17
- package/dist/esm/funcs/inVideoAIfeaturesGenerateChapters.js.map +1 -1
- package/dist/esm/funcs/inputVideoCreate.d.ts +3 -1
- package/dist/esm/funcs/inputVideoCreate.d.ts.map +1 -1
- package/dist/esm/funcs/inputVideoCreate.js +0 -40
- package/dist/esm/funcs/inputVideoCreate.js.map +1 -1
- package/dist/esm/funcs/inputVideoUpload.d.ts +3 -1
- package/dist/esm/funcs/inputVideoUpload.d.ts.map +1 -1
- package/dist/esm/funcs/inputVideoUpload.js +0 -30
- package/dist/esm/funcs/inputVideoUpload.js.map +1 -1
- package/dist/esm/funcs/livePlaybackCreateId.d.ts +3 -1
- package/dist/esm/funcs/livePlaybackCreateId.d.ts.map +1 -1
- package/dist/esm/funcs/livePlaybackCreateId.js +0 -12
- package/dist/esm/funcs/livePlaybackCreateId.js.map +1 -1
- package/dist/esm/funcs/livePlaybackDelete.d.ts +3 -1
- package/dist/esm/funcs/livePlaybackDelete.d.ts.map +1 -1
- package/dist/esm/funcs/livePlaybackDelete.js +0 -9
- package/dist/esm/funcs/livePlaybackDelete.js.map +1 -1
- package/dist/esm/funcs/livePlaybackGet.d.ts +3 -1
- package/dist/esm/funcs/livePlaybackGet.d.ts.map +1 -1
- package/dist/esm/funcs/livePlaybackGet.js +0 -9
- package/dist/esm/funcs/livePlaybackGet.js.map +1 -1
- package/dist/esm/funcs/liveStreamsCreate.d.ts +3 -1
- package/dist/esm/funcs/liveStreamsCreate.d.ts.map +1 -1
- package/dist/esm/funcs/liveStreamsCreate.js +0 -22
- package/dist/esm/funcs/liveStreamsCreate.js.map +1 -1
- package/dist/esm/funcs/liveStreamsDelete.d.ts +3 -1
- package/dist/esm/funcs/liveStreamsDelete.d.ts.map +1 -1
- package/dist/esm/funcs/liveStreamsDelete.js +0 -14
- package/dist/esm/funcs/liveStreamsDelete.js.map +1 -1
- package/dist/esm/funcs/liveStreamsEnable.d.ts +3 -1
- package/dist/esm/funcs/liveStreamsEnable.d.ts.map +1 -1
- package/dist/esm/funcs/liveStreamsEnable.js +0 -16
- package/dist/esm/funcs/liveStreamsEnable.js.map +1 -1
- package/dist/esm/funcs/liveStreamsList.d.ts +3 -1
- package/dist/esm/funcs/liveStreamsList.d.ts.map +1 -1
- package/dist/esm/funcs/liveStreamsList.js +0 -10
- package/dist/esm/funcs/liveStreamsList.js.map +1 -1
- package/dist/esm/funcs/liveStreamsListClips.d.ts +3 -1
- package/dist/esm/funcs/liveStreamsListClips.d.ts.map +1 -1
- package/dist/esm/funcs/liveStreamsListClips.js +0 -17
- package/dist/esm/funcs/liveStreamsListClips.js.map +1 -1
- package/dist/esm/funcs/manageLiveStreamComplete.d.ts +3 -1
- package/dist/esm/funcs/manageLiveStreamComplete.d.ts.map +1 -1
- package/dist/esm/funcs/manageLiveStreamComplete.js +0 -16
- package/dist/esm/funcs/manageLiveStreamComplete.js.map +1 -1
- package/dist/esm/funcs/manageLiveStreamDisable.d.ts +3 -1
- package/dist/esm/funcs/manageLiveStreamDisable.d.ts.map +1 -1
- package/dist/esm/funcs/manageLiveStreamDisable.js +0 -14
- package/dist/esm/funcs/manageLiveStreamDisable.js.map +1 -1
- package/dist/esm/funcs/manageLiveStreamGet.d.ts +3 -1
- package/dist/esm/funcs/manageLiveStreamGet.d.ts.map +1 -1
- package/dist/esm/funcs/manageLiveStreamGet.js +0 -11
- package/dist/esm/funcs/manageLiveStreamGet.js.map +1 -1
- package/dist/esm/funcs/manageLiveStreamGetViewerCount.d.ts +3 -1
- package/dist/esm/funcs/manageLiveStreamGetViewerCount.d.ts.map +1 -1
- package/dist/esm/funcs/manageLiveStreamGetViewerCount.js +0 -14
- package/dist/esm/funcs/manageLiveStreamGetViewerCount.js.map +1 -1
- package/dist/esm/funcs/manageLiveStreamUpdate.d.ts +3 -1
- package/dist/esm/funcs/manageLiveStreamUpdate.d.ts.map +1 -1
- package/dist/esm/funcs/manageLiveStreamUpdate.js +0 -14
- package/dist/esm/funcs/manageLiveStreamUpdate.js.map +1 -1
- package/dist/esm/funcs/manageVideosAddTrack.d.ts +3 -1
- package/dist/esm/funcs/manageVideosAddTrack.d.ts.map +1 -1
- package/dist/esm/funcs/manageVideosAddTrack.js +0 -27
- package/dist/esm/funcs/manageVideosAddTrack.js.map +1 -1
- package/dist/esm/funcs/manageVideosCancelUpload.d.ts +3 -1
- package/dist/esm/funcs/manageVideosCancelUpload.d.ts.map +1 -1
- package/dist/esm/funcs/manageVideosCancelUpload.js +0 -19
- package/dist/esm/funcs/manageVideosCancelUpload.js.map +1 -1
- package/dist/esm/funcs/manageVideosDelete.d.ts +3 -1
- package/dist/esm/funcs/manageVideosDelete.d.ts.map +1 -1
- package/dist/esm/funcs/manageVideosDelete.js +0 -17
- package/dist/esm/funcs/manageVideosDelete.js.map +1 -1
- package/dist/esm/funcs/manageVideosGenerateSubtitleTrack.d.ts +3 -1
- package/dist/esm/funcs/manageVideosGenerateSubtitleTrack.d.ts.map +1 -1
- package/dist/esm/funcs/manageVideosGenerateSubtitleTrack.js +0 -22
- package/dist/esm/funcs/manageVideosGenerateSubtitleTrack.js.map +1 -1
- package/dist/esm/funcs/manageVideosGet.d.ts +3 -1
- package/dist/esm/funcs/manageVideosGet.d.ts.map +1 -1
- package/dist/esm/funcs/manageVideosGet.js +0 -20
- package/dist/esm/funcs/manageVideosGet.js.map +1 -1
- package/dist/esm/funcs/manageVideosGetSummary.d.ts +3 -2
- package/dist/esm/funcs/manageVideosGetSummary.d.ts.map +1 -1
- package/dist/esm/funcs/manageVideosGetSummary.js +0 -17
- package/dist/esm/funcs/manageVideosGetSummary.js.map +1 -1
- package/dist/esm/funcs/manageVideosListUploads.d.ts +3 -1
- package/dist/esm/funcs/manageVideosListUploads.d.ts.map +1 -1
- package/dist/esm/funcs/manageVideosListUploads.js +0 -19
- package/dist/esm/funcs/manageVideosListUploads.js.map +1 -1
- package/dist/esm/funcs/manageVideosRetrieveMediaInputInfo.d.ts +3 -1
- package/dist/esm/funcs/manageVideosRetrieveMediaInputInfo.d.ts.map +1 -1
- package/dist/esm/funcs/manageVideosRetrieveMediaInputInfo.js +0 -18
- package/dist/esm/funcs/manageVideosRetrieveMediaInputInfo.js.map +1 -1
- package/dist/esm/funcs/manageVideosUpdate.d.ts +3 -1
- package/dist/esm/funcs/manageVideosUpdate.d.ts.map +1 -1
- package/dist/esm/funcs/manageVideosUpdate.js +0 -19
- package/dist/esm/funcs/manageVideosUpdate.js.map +1 -1
- package/dist/esm/funcs/manageVideosUpdateMp4Support.d.ts +3 -1
- package/dist/esm/funcs/manageVideosUpdateMp4Support.d.ts.map +1 -1
- package/dist/esm/funcs/manageVideosUpdateMp4Support.js +0 -33
- package/dist/esm/funcs/manageVideosUpdateMp4Support.js.map +1 -1
- package/dist/esm/funcs/manageVideosUpdateTrack.d.ts +3 -1
- package/dist/esm/funcs/manageVideosUpdateTrack.d.ts.map +1 -1
- package/dist/esm/funcs/manageVideosUpdateTrack.js +0 -32
- package/dist/esm/funcs/manageVideosUpdateTrack.js.map +1 -1
- package/dist/esm/funcs/mediaDeleteTrack.d.ts +3 -1
- package/dist/esm/funcs/mediaDeleteTrack.d.ts.map +1 -1
- package/dist/esm/funcs/mediaDeleteTrack.js +0 -27
- package/dist/esm/funcs/mediaDeleteTrack.js.map +1 -1
- package/dist/esm/funcs/mediaGetClips.d.ts +3 -1
- package/dist/esm/funcs/mediaGetClips.d.ts.map +1 -1
- package/dist/esm/funcs/mediaGetClips.js +0 -21
- package/dist/esm/funcs/mediaGetClips.js.map +1 -1
- package/dist/esm/funcs/mediaList.d.ts +3 -1
- package/dist/esm/funcs/mediaList.d.ts.map +1 -1
- package/dist/esm/funcs/mediaList.js +0 -13
- package/dist/esm/funcs/mediaList.js.map +1 -1
- package/dist/esm/funcs/mediaUpdateSourceAccess.d.ts +3 -1
- package/dist/esm/funcs/mediaUpdateSourceAccess.d.ts.map +1 -1
- package/dist/esm/funcs/mediaUpdateSourceAccess.js +0 -15
- package/dist/esm/funcs/mediaUpdateSourceAccess.js.map +1 -1
- package/dist/esm/funcs/metricsGetTimeseriesData.d.ts +3 -1
- package/dist/esm/funcs/metricsGetTimeseriesData.d.ts.map +1 -1
- package/dist/esm/funcs/metricsGetTimeseriesData.js +0 -12
- package/dist/esm/funcs/metricsGetTimeseriesData.js.map +1 -1
- package/dist/esm/funcs/metricsListBreakdownValues.d.ts +3 -1
- package/dist/esm/funcs/metricsListBreakdownValues.d.ts.map +1 -1
- package/dist/esm/funcs/metricsListBreakdownValues.js +0 -32
- package/dist/esm/funcs/metricsListBreakdownValues.js.map +1 -1
- package/dist/esm/funcs/metricsListCompares.d.ts +3 -1
- package/dist/esm/funcs/metricsListCompares.d.ts.map +1 -1
- package/dist/esm/funcs/metricsListCompares.js +0 -25
- package/dist/esm/funcs/metricsListCompares.js.map +1 -1
- package/dist/esm/funcs/metricsListOverallValues.d.ts +3 -1
- package/dist/esm/funcs/metricsListOverallValues.d.ts.map +1 -1
- package/dist/esm/funcs/metricsListOverallValues.js +0 -25
- package/dist/esm/funcs/metricsListOverallValues.js.map +1 -1
- package/dist/esm/funcs/playbackCreate.d.ts +3 -1
- package/dist/esm/funcs/playbackCreate.d.ts.map +1 -1
- package/dist/esm/funcs/playbackCreate.js +0 -19
- package/dist/esm/funcs/playbackCreate.js.map +1 -1
- package/dist/esm/funcs/playbackDelete.d.ts +3 -1
- package/dist/esm/funcs/playbackDelete.d.ts.map +1 -1
- package/dist/esm/funcs/playbackDelete.js +0 -16
- package/dist/esm/funcs/playbackDelete.js.map +1 -1
- package/dist/esm/funcs/playbackGet.d.ts +3 -1
- package/dist/esm/funcs/playbackGet.d.ts.map +1 -1
- package/dist/esm/funcs/playbackGet.js +0 -13
- package/dist/esm/funcs/playbackGet.js.map +1 -1
- package/dist/esm/funcs/playbackListIds.d.ts +3 -1
- package/dist/esm/funcs/playbackListIds.d.ts.map +1 -1
- package/dist/esm/funcs/playbackListIds.js +0 -13
- package/dist/esm/funcs/playbackListIds.js.map +1 -1
- package/dist/esm/funcs/playbackUpdateDomainRestrictions.d.ts +3 -1
- package/dist/esm/funcs/playbackUpdateDomainRestrictions.d.ts.map +1 -1
- package/dist/esm/funcs/playbackUpdateDomainRestrictions.js +0 -15
- package/dist/esm/funcs/playbackUpdateDomainRestrictions.js.map +1 -1
- package/dist/esm/funcs/playbackUpdateUserAgentRestrictions.d.ts +3 -1
- package/dist/esm/funcs/playbackUpdateUserAgentRestrictions.d.ts.map +1 -1
- package/dist/esm/funcs/playbackUpdateUserAgentRestrictions.js +0 -15
- package/dist/esm/funcs/playbackUpdateUserAgentRestrictions.js.map +1 -1
- package/dist/esm/funcs/playlistCreate.d.ts +3 -1
- package/dist/esm/funcs/playlistCreate.d.ts.map +1 -1
- package/dist/esm/funcs/playlistCreate.js +0 -19
- package/dist/esm/funcs/playlistCreate.js.map +1 -1
- package/dist/esm/funcs/playlistDelete.d.ts +3 -1
- package/dist/esm/funcs/playlistDelete.d.ts.map +1 -1
- package/dist/esm/funcs/playlistDelete.js +0 -11
- package/dist/esm/funcs/playlistDelete.js.map +1 -1
- package/dist/esm/funcs/playlistGet.d.ts +3 -1
- package/dist/esm/funcs/playlistGet.d.ts.map +1 -1
- package/dist/esm/funcs/playlistGet.js +0 -9
- package/dist/esm/funcs/playlistGet.js.map +1 -1
- package/dist/esm/funcs/playlistList.d.ts +3 -1
- package/dist/esm/funcs/playlistList.d.ts.map +1 -1
- package/dist/esm/funcs/playlistList.js +0 -13
- package/dist/esm/funcs/playlistList.js.map +1 -1
- package/dist/esm/funcs/playlistUpdate.d.ts +3 -1
- package/dist/esm/funcs/playlistUpdate.d.ts.map +1 -1
- package/dist/esm/funcs/playlistUpdate.js +0 -12
- package/dist/esm/funcs/playlistUpdate.js.map +1 -1
- package/dist/esm/funcs/playlistUpdateMediaOrder.d.ts +3 -1
- package/dist/esm/funcs/playlistUpdateMediaOrder.d.ts.map +1 -1
- package/dist/esm/funcs/playlistUpdateMediaOrder.js +0 -12
- package/dist/esm/funcs/playlistUpdateMediaOrder.js.map +1 -1
- package/dist/esm/funcs/playlistsAddMedia.d.ts +3 -1
- package/dist/esm/funcs/playlistsAddMedia.d.ts.map +1 -1
- package/dist/esm/funcs/playlistsAddMedia.js +0 -12
- package/dist/esm/funcs/playlistsAddMedia.js.map +1 -1
- package/dist/esm/funcs/playlistsDeleteMedia.d.ts +3 -1
- package/dist/esm/funcs/playlistsDeleteMedia.d.ts.map +1 -1
- package/dist/esm/funcs/playlistsDeleteMedia.js +0 -12
- package/dist/esm/funcs/playlistsDeleteMedia.js.map +1 -1
- package/dist/esm/funcs/signingKeysCreate.d.ts +3 -1
- package/dist/esm/funcs/signingKeysCreate.d.ts.map +1 -1
- package/dist/esm/funcs/signingKeysCreate.js +0 -21
- package/dist/esm/funcs/signingKeysCreate.js.map +1 -1
- package/dist/esm/funcs/signingKeysDelete.d.ts +3 -1
- package/dist/esm/funcs/signingKeysDelete.d.ts.map +1 -1
- package/dist/esm/funcs/signingKeysDelete.js +0 -18
- package/dist/esm/funcs/signingKeysDelete.js.map +1 -1
- package/dist/esm/funcs/signingKeysGetById.d.ts +3 -1
- package/dist/esm/funcs/signingKeysGetById.d.ts.map +1 -1
- package/dist/esm/funcs/signingKeysGetById.js +0 -38
- package/dist/esm/funcs/signingKeysGetById.js.map +1 -1
- package/dist/esm/funcs/signingKeysList.d.ts +3 -1
- package/dist/esm/funcs/signingKeysList.d.ts.map +1 -1
- package/dist/esm/funcs/signingKeysList.js +0 -16
- package/dist/esm/funcs/signingKeysList.js.map +1 -1
- package/dist/esm/funcs/simulcastStreamsDelete.d.ts +3 -1
- package/dist/esm/funcs/simulcastStreamsDelete.d.ts.map +1 -1
- package/dist/esm/funcs/simulcastStreamsDelete.js +0 -11
- package/dist/esm/funcs/simulcastStreamsDelete.js.map +1 -1
- package/dist/esm/funcs/simulcastsCreate.d.ts +3 -1
- package/dist/esm/funcs/simulcastsCreate.d.ts.map +1 -1
- package/dist/esm/funcs/simulcastsCreate.js +0 -16
- package/dist/esm/funcs/simulcastsCreate.js.map +1 -1
- package/dist/esm/funcs/simulcastsGet.d.ts +3 -1
- package/dist/esm/funcs/simulcastsGet.d.ts.map +1 -1
- package/dist/esm/funcs/simulcastsGet.js +0 -9
- package/dist/esm/funcs/simulcastsGet.js.map +1 -1
- package/dist/esm/funcs/simulcastsUpdate.d.ts +3 -1
- package/dist/esm/funcs/simulcastsUpdate.d.ts.map +1 -1
- package/dist/esm/funcs/simulcastsUpdate.js +0 -11
- package/dist/esm/funcs/simulcastsUpdate.js.map +1 -1
- package/dist/esm/funcs/viewsGetDetails.d.ts +3 -1
- package/dist/esm/funcs/viewsGetDetails.d.ts.map +1 -1
- package/dist/esm/funcs/viewsGetDetails.js +0 -14
- package/dist/esm/funcs/viewsGetDetails.js.map +1 -1
- package/dist/esm/funcs/viewsList.d.ts +3 -1
- package/dist/esm/funcs/viewsList.d.ts.map +1 -1
- package/dist/esm/funcs/viewsList.js +0 -28
- package/dist/esm/funcs/viewsList.js.map +1 -1
- package/dist/esm/funcs/viewsListTopContent.d.ts +3 -1
- package/dist/esm/funcs/viewsListTopContent.d.ts.map +1 -1
- package/dist/esm/funcs/viewsListTopContent.js +0 -20
- package/dist/esm/funcs/viewsListTopContent.js.map +1 -1
- package/dist/esm/hooks/hooks.d.ts.map +1 -1
- package/dist/esm/hooks/hooks.js +30 -23
- package/dist/esm/hooks/hooks.js.map +1 -1
- package/dist/esm/hooks/types.d.ts +9 -5
- package/dist/esm/hooks/types.d.ts.map +1 -1
- package/dist/esm/lib/base64.js +1 -1
- package/dist/esm/lib/base64.js.map +1 -1
- package/dist/esm/lib/config.d.ts +2 -2
- package/dist/esm/lib/config.js +2 -2
- package/dist/esm/lib/dlv.d.ts +1 -1
- package/dist/esm/lib/dlv.d.ts.map +1 -1
- package/dist/esm/lib/dlv.js +2 -3
- package/dist/esm/lib/dlv.js.map +1 -1
- package/dist/esm/lib/encodings.d.ts.map +1 -1
- package/dist/esm/lib/encodings.js +17 -5
- package/dist/esm/lib/encodings.js.map +1 -1
- package/dist/esm/lib/files.js.map +1 -1
- package/dist/esm/lib/http.d.ts +2 -2
- package/dist/esm/lib/http.d.ts.map +1 -1
- package/dist/esm/lib/http.js +41 -11
- package/dist/esm/lib/http.js.map +1 -1
- package/dist/esm/lib/matchers.d.ts.map +1 -1
- package/dist/esm/lib/matchers.js +79 -81
- package/dist/esm/lib/matchers.js.map +1 -1
- package/dist/esm/lib/primitives.js +1 -1
- package/dist/esm/lib/primitives.js.map +1 -1
- package/dist/esm/lib/retries.d.ts.map +1 -1
- package/dist/esm/lib/retries.js +55 -33
- package/dist/esm/lib/retries.js.map +1 -1
- package/dist/esm/lib/schemas.js +1 -1
- package/dist/esm/lib/schemas.js.map +1 -1
- package/dist/esm/lib/sdks.d.ts.map +1 -1
- package/dist/esm/lib/sdks.js +83 -44
- package/dist/esm/lib/sdks.js.map +1 -1
- package/dist/esm/lib/security.d.ts +1 -1
- package/dist/esm/lib/security.d.ts.map +1 -1
- package/dist/esm/lib/security.js +7 -2
- package/dist/esm/lib/security.js.map +1 -1
- package/dist/esm/lib/url.js +2 -2
- package/dist/esm/lib/url.js.map +1 -1
- package/dist/esm/models/errordetails.d.ts +3 -7
- package/dist/esm/models/errordetails.d.ts.map +1 -1
- package/dist/esm/models/errordetails.js.map +1 -1
- package/dist/esm/models/errors/fastpixerror.js +35 -0
- package/dist/esm/models/errors/fastpixerror.js.map +1 -1
- package/dist/esm/models/errors/httpclienterrors.d.ts.map +1 -1
- package/dist/esm/models/errors/httpclienterrors.js +47 -9
- package/dist/esm/models/errors/httpclienterrors.js.map +1 -1
- package/dist/esm/models/errors/responsevalidationerror.js +18 -0
- package/dist/esm/models/errors/responsevalidationerror.js.map +1 -1
- package/dist/esm/models/errors/sdkvalidationerror.js +18 -0
- package/dist/esm/models/errors/sdkvalidationerror.js.map +1 -1
- package/dist/esm/models/toperrordetails.d.ts +6 -14
- package/dist/esm/models/toperrordetails.d.ts.map +1 -1
- package/dist/esm/models/toperrordetails.js.map +1 -1
- package/dist/esm/models/updatetrackrequest.d.ts.map +1 -1
- package/dist/esm/models/updatetrackrequest.js +5 -1
- package/dist/esm/models/updatetrackrequest.js.map +1 -1
- package/dist/esm/sdk/sdk.d.ts.map +1 -1
- package/dist/esm/sdk/sdk.js +163 -20
- package/dist/esm/sdk/sdk.js.map +1 -1
- package/dist/esm/types/async.d.ts +5 -7
- package/dist/esm/types/async.d.ts.map +1 -1
- package/dist/esm/types/async.js +34 -25
- package/dist/esm/types/async.js.map +1 -1
- package/dist/esm/types/primitives.d.ts.map +1 -1
- package/dist/esm/types/primitives.js +8 -4
- package/dist/esm/types/primitives.js.map +1 -1
- package/dist/esm/types/rfcdate.d.ts +1 -1
- package/dist/esm/types/rfcdate.d.ts.map +1 -1
- package/dist/esm/types/rfcdate.js +7 -1
- package/dist/esm/types/rfcdate.js.map +1 -1
- package/examples/inputVideoCreate.example.ts +2 -2
- package/jsr.json +1 -1
- package/package.json +3 -1
- package/src/funcs/aiFeaturesGenerateNamedEntities.ts +12 -18
- package/src/funcs/aiFeaturesUpdateSummary.ts +12 -27
- package/src/funcs/dimensionsList.ts +10 -25
- package/src/funcs/dimensionsListFilterValues.ts +16 -27
- package/src/funcs/drmConfigurationsGet.ts +13 -27
- package/src/funcs/drmConfigurationsList.ts +15 -27
- package/src/funcs/errorsList.ts +13 -27
- package/src/funcs/inVideoAIUpdateModeration.ts +13 -26
- package/src/funcs/inVideoAIfeaturesGenerateChapters.ts +12 -27
- package/src/funcs/inputVideoCreate.ts +13 -27
- package/src/funcs/inputVideoUpload.ts +12 -27
- package/src/funcs/livePlaybackCreateId.ts +12 -18
- package/src/funcs/livePlaybackDelete.ts +12 -9
- package/src/funcs/livePlaybackGet.ts +11 -9
- package/src/funcs/liveStreamsCreate.ts +11 -9
- package/src/funcs/liveStreamsDelete.ts +13 -27
- package/src/funcs/liveStreamsEnable.ts +13 -27
- package/src/funcs/liveStreamsList.ts +13 -27
- package/src/funcs/liveStreamsListClips.ts +11 -18
- package/src/funcs/manageLiveStreamComplete.ts +11 -9
- package/src/funcs/manageLiveStreamDisable.ts +13 -27
- package/src/funcs/manageLiveStreamGet.ts +11 -18
- package/src/funcs/manageLiveStreamGetViewerCount.ts +13 -27
- package/src/funcs/manageLiveStreamUpdate.ts +11 -27
- package/src/funcs/manageVideosAddTrack.ts +12 -18
- package/src/funcs/manageVideosCancelUpload.ts +12 -18
- package/src/funcs/manageVideosDelete.ts +13 -27
- package/src/funcs/manageVideosGenerateSubtitleTrack.ts +12 -27
- package/src/funcs/manageVideosGet.ts +11 -18
- package/src/funcs/manageVideosGetSummary.ts +12 -28
- package/src/funcs/manageVideosListUploads.ts +13 -27
- package/src/funcs/manageVideosRetrieveMediaInputInfo.ts +12 -27
- package/src/funcs/manageVideosUpdate.ts +12 -27
- package/src/funcs/manageVideosUpdateMp4Support.ts +12 -27
- package/src/funcs/manageVideosUpdateTrack.ts +13 -27
- package/src/funcs/mediaDeleteTrack.ts +11 -18
- package/src/funcs/mediaGetClips.ts +13 -27
- package/src/funcs/mediaList.ts +12 -27
- package/src/funcs/mediaUpdateSourceAccess.ts +12 -27
- package/src/funcs/metricsGetTimeseriesData.ts +13 -27
- package/src/funcs/metricsListBreakdownValues.ts +12 -18
- package/src/funcs/metricsListCompares.ts +13 -27
- package/src/funcs/metricsListOverallValues.ts +13 -27
- package/src/funcs/playbackCreate.ts +13 -27
- package/src/funcs/playbackDelete.ts +13 -27
- package/src/funcs/playbackGet.ts +12 -27
- package/src/funcs/playbackListIds.ts +13 -27
- package/src/funcs/playbackUpdateDomainRestrictions.ts +12 -18
- package/src/funcs/playbackUpdateUserAgentRestrictions.ts +12 -27
- package/src/funcs/playlistCreate.ts +12 -27
- package/src/funcs/playlistDelete.ts +13 -27
- package/src/funcs/playlistGet.ts +13 -27
- package/src/funcs/playlistList.ts +12 -27
- package/src/funcs/playlistUpdate.ts +11 -18
- package/src/funcs/playlistUpdateMediaOrder.ts +12 -27
- package/src/funcs/playlistsAddMedia.ts +13 -27
- package/src/funcs/playlistsDeleteMedia.ts +12 -27
- package/src/funcs/signingKeysCreate.ts +11 -26
- package/src/funcs/signingKeysDelete.ts +13 -27
- package/src/funcs/signingKeysGetById.ts +12 -27
- package/src/funcs/signingKeysList.ts +13 -27
- package/src/funcs/simulcastStreamsDelete.ts +12 -27
- package/src/funcs/simulcastsCreate.ts +13 -27
- package/src/funcs/simulcastsGet.ts +11 -9
- package/src/funcs/simulcastsUpdate.ts +13 -27
- package/src/funcs/viewsGetDetails.ts +12 -27
- package/src/funcs/viewsList.ts +12 -27
- package/src/funcs/viewsListTopContent.ts +13 -27
- package/src/hooks/hooks.ts +0 -20
- package/src/hooks/types.ts +5 -5
- package/src/lib/base64.ts +1 -1
- package/src/lib/config.ts +2 -2
- package/src/lib/dlv.ts +1 -3
- package/src/lib/encodings.ts +18 -5
- package/src/lib/files.ts +1 -1
- package/src/lib/http.ts +13 -9
- package/src/lib/matchers.ts +99 -78
- package/src/lib/primitives.ts +1 -1
- package/src/lib/retries.ts +61 -41
- package/src/lib/schemas.ts +1 -1
- package/src/lib/sdks.ts +100 -58
- package/src/lib/security.ts +2 -2
- package/src/lib/url.ts +2 -2
- package/src/models/errordetails.ts +3 -8
- package/src/models/errors/httpclienterrors.ts +4 -3
- package/src/models/toperrordetails.ts +6 -16
- package/src/models/updatetrackrequest.ts +4 -1
- package/src/sdk/sdk.ts +40 -20
- package/src/types/async.ts +29 -37
- package/src/types/primitives.ts +12 -4
- package/src/types/rfcdate.ts +2 -2
- package/temp/example.ts +3 -1
- package/tsconfig.json +2 -0
- package/tests/artifacts/get-all-playlists.api.json +0 -26
- package/tests/artifacts/get-all-playlists.sdk.json +0 -26
- package/tests/artifacts/get-all-streams.api.json +0 -76
- package/tests/artifacts/get-all-streams.sdk.json +0 -76
- package/tests/artifacts/get-live-stream-by-id.api.json +0 -43
- package/tests/artifacts/get-live-stream-by-id.sdk.json +0 -43
- package/tests/artifacts/get-live-stream-playback-id.api.json +0 -7
- package/tests/artifacts/get-live-stream-playback-id.sdk.json +0 -7
- package/tests/artifacts/get-live-stream-viewer-count-by-id.api.json +0 -6
- package/tests/artifacts/get-live-stream-viewer-count-by-id.sdk.json +0 -6
- package/tests/artifacts/get-media-clips.api.json +0 -9
- package/tests/artifacts/get-media-clips.sdk.json +0 -9
- package/tests/artifacts/get-media-summary.api.json +0 -8
- package/tests/artifacts/get-media-summary.sdk.json +0 -26
- package/tests/artifacts/get-media.api.json +0 -57
- package/tests/artifacts/get-media.sdk.json +0 -57
- package/tests/artifacts/get-playback-id.api.json +0 -19
- package/tests/artifacts/get-playback-id.sdk.json +0 -19
- package/tests/artifacts/get-playlist-by-id.api.json +0 -15
- package/tests/artifacts/get-playlist-by-id.sdk.json +0 -15
- package/tests/artifacts/get-signing_key_by_id.api.json +0 -8
- package/tests/artifacts/get-signing_key_by_id.sdk.json +0 -8
- package/tests/artifacts/get-specific-simulcast-of-stream.api.json +0 -12
- package/tests/artifacts/get-specific-simulcast-of-stream.sdk.json +0 -12
- package/tests/artifacts/getDrmConfiguration.api.json +0 -8
- package/tests/artifacts/getDrmConfiguration.sdk.json +0 -26
- package/tests/artifacts/getDrmConfigurationById.api.json +0 -13
- package/tests/artifacts/getDrmConfigurationById.sdk.json +0 -31
- package/tests/artifacts/get_timeseries_data.api.json +0 -18
- package/tests/artifacts/get_timeseries_data.sdk.json +0 -18
- package/tests/artifacts/get_video_view_details.api.json +0 -213
- package/tests/artifacts/get_video_view_details.sdk.json +0 -213
- package/tests/artifacts/list-live-clips.api.json +0 -9
- package/tests/artifacts/list-live-clips.sdk.json +0 -9
- package/tests/artifacts/list-media.api.json +0 -65
- package/tests/artifacts/list-media.sdk.json +0 -65
- package/tests/artifacts/list-playback-ids.api.json +0 -21
- package/tests/artifacts/list-playback-ids.sdk.json +0 -21
- package/tests/artifacts/list-uploads.api.json +0 -43
- package/tests/artifacts/list-uploads.sdk.json +0 -43
- package/tests/artifacts/list_breakdown_values.api.json +0 -24
- package/tests/artifacts/list_breakdown_values.sdk.json +0 -24
- package/tests/artifacts/list_by_top_content.api.json +0 -19
- package/tests/artifacts/list_by_top_content.sdk.json +0 -19
- package/tests/artifacts/list_comparison_values.api.json +0 -350
- package/tests/artifacts/list_comparison_values.sdk.json +0 -350
- package/tests/artifacts/list_dimensions.api.json +0 -61
- package/tests/artifacts/list_dimensions.sdk.json +0 -61
- package/tests/artifacts/list_errors.api.json +0 -51
- package/tests/artifacts/list_errors.sdk.json +0 -51
- package/tests/artifacts/list_filter_values_for_dimension.api.json +0 -14
- package/tests/artifacts/list_filter_values_for_dimension.sdk.json +0 -14
- package/tests/artifacts/list_overall_values.api.json +0 -18
- package/tests/artifacts/list_overall_values.sdk.json +0 -18
- package/tests/artifacts/list_signing_keys.api.json +0 -22
- package/tests/artifacts/list_signing_keys.sdk.json +0 -22
- package/tests/artifacts/list_video_views.api.json +0 -84
- package/tests/artifacts/list_video_views.sdk.json +0 -84
- package/tests/artifacts/retrieveMediaInputInfo.api.json +0 -28
- package/tests/artifacts/retrieveMediaInputInfo.sdk.json +0 -28
- package/tests/artifacts-non-get/Add-media-track.raw.json +0 -10
- package/tests/artifacts-non-get/Add-media-track.sdk.json +0 -10
- package/tests/artifacts-non-get/Generate-subtitle-track.raw.json +0 -9
- package/tests/artifacts-non-get/Generate-subtitle-track.sdk.json +0 -9
- package/tests/artifacts-non-get/add-media-to-playlist.raw.json +0 -24
- package/tests/artifacts-non-get/add-media-to-playlist.sdk.json +0 -24
- package/tests/artifacts-non-get/cancel-upload.raw.json +0 -15
- package/tests/artifacts-non-get/cancel-upload.sdk.json +0 -15
- package/tests/artifacts-non-get/change-media-order-in-playlist.raw.json +0 -24
- package/tests/artifacts-non-get/change-media-order-in-playlist.sdk.json +0 -24
- package/tests/artifacts-non-get/complete-live-stream.raw.json +0 -8
- package/tests/artifacts-non-get/complete-live-stream.sdk.json +0 -13
- package/tests/artifacts-non-get/create-a-playlist.raw.json +0 -15
- package/tests/artifacts-non-get/create-a-playlist.sdk.json +0 -15
- package/tests/artifacts-non-get/create-media-playback-id.raw.json +0 -20
- package/tests/artifacts-non-get/create-media-playback-id.sdk.json +0 -19
- package/tests/artifacts-non-get/create-media.raw.json +0 -41
- package/tests/artifacts-non-get/create-media.sdk.json +0 -41
- package/tests/artifacts-non-get/create-new-stream.raw.json +0 -32
- package/tests/artifacts-non-get/create-new-stream.sdk.json +0 -32
- package/tests/artifacts-non-get/create-playbackId-of-stream.raw.json +0 -7
- package/tests/artifacts-non-get/create-playbackId-of-stream.sdk.json +0 -7
- package/tests/artifacts-non-get/create-simulcast-of-stream.raw.json +0 -9
- package/tests/artifacts-non-get/create-simulcast-of-stream.sdk.json +0 -9
- package/tests/artifacts-non-get/create_signing_key.raw.json +0 -8
- package/tests/artifacts-non-get/create_signing_key.sdk.json +0 -8
- package/tests/artifacts-non-get/delete-a-playlist.raw.json +0 -3
- package/tests/artifacts-non-get/delete-a-playlist.sdk.json +0 -3
- package/tests/artifacts-non-get/delete-live-stream.raw.json +0 -3
- package/tests/artifacts-non-get/delete-live-stream.sdk.json +0 -3
- package/tests/artifacts-non-get/delete-media-from-playlist.raw.json +0 -15
- package/tests/artifacts-non-get/delete-media-from-playlist.sdk.json +0 -15
- package/tests/artifacts-non-get/delete-media-playback-id.raw.json +0 -3
- package/tests/artifacts-non-get/delete-media-playback-id.sdk.json +0 -3
- package/tests/artifacts-non-get/delete-media-track.raw.json +0 -3
- package/tests/artifacts-non-get/delete-media-track.sdk.json +0 -3
- package/tests/artifacts-non-get/delete-media.raw.json +0 -3
- package/tests/artifacts-non-get/delete-media.sdk.json +0 -3
- package/tests/artifacts-non-get/delete-playbackId-of-stream.raw.json +0 -3
- package/tests/artifacts-non-get/delete-playbackId-of-stream.sdk.json +0 -3
- package/tests/artifacts-non-get/delete-simulcast-of-stream.raw.json +0 -3
- package/tests/artifacts-non-get/delete-simulcast-of-stream.sdk.json +0 -3
- package/tests/artifacts-non-get/delete_signing_key.raw.json +0 -6
- package/tests/artifacts-non-get/delete_signing_key.sdk.json +0 -6
- package/tests/artifacts-non-get/direct-upload-video-media.raw.json +0 -36
- package/tests/artifacts-non-get/direct-upload-video-media.sdk.json +0 -36
- package/tests/artifacts-non-get/disable-live-stream.raw.json +0 -3
- package/tests/artifacts-non-get/disable-live-stream.sdk.json +0 -3
- package/tests/artifacts-non-get/enable-live-stream.raw.json +0 -3
- package/tests/artifacts-non-get/enable-live-stream.sdk.json +0 -3
- package/tests/artifacts-non-get/update-a-playlist.raw.json +0 -15
- package/tests/artifacts-non-get/update-a-playlist.sdk.json +0 -15
- package/tests/artifacts-non-get/update-domain-restrictions.raw.json +0 -10
- package/tests/artifacts-non-get/update-domain-restrictions.sdk.json +0 -10
- package/tests/artifacts-non-get/update-live-stream.raw.json +0 -36
- package/tests/artifacts-non-get/update-live-stream.sdk.json +0 -36
- package/tests/artifacts-non-get/update-media-chapters.raw.json +0 -7
- package/tests/artifacts-non-get/update-media-chapters.sdk.json +0 -7
- package/tests/artifacts-non-get/update-media-moderation.raw.json +0 -7
- package/tests/artifacts-non-get/update-media-moderation.sdk.json +0 -7
- package/tests/artifacts-non-get/update-media-named-entities.raw.json +0 -7
- package/tests/artifacts-non-get/update-media-named-entities.sdk.json +0 -7
- package/tests/artifacts-non-get/update-media-summary.raw.json +0 -7
- package/tests/artifacts-non-get/update-media-summary.sdk.json +0 -7
- package/tests/artifacts-non-get/update-media-track.raw.json +0 -10
- package/tests/artifacts-non-get/update-media-track.sdk.json +0 -10
- package/tests/artifacts-non-get/update-specific-simulcast-of-stream.raw.json +0 -9
- package/tests/artifacts-non-get/update-specific-simulcast-of-stream.sdk.json +0 -9
- package/tests/artifacts-non-get/update-user-agent-restrictions.raw.json +0 -10
- package/tests/artifacts-non-get/update-user-agent-restrictions.sdk.json +0 -10
- package/tests/artifacts-non-get/updated-media.raw.json +0 -94
- package/tests/artifacts-non-get/updated-media.sdk.json +0 -94
- package/tests/artifacts-non-get/updated-mp4Support.raw.json +0 -95
- package/tests/artifacts-non-get/updated-mp4Support.sdk.json +0 -95
- package/tests/artifacts-non-get/updated-source-access.raw.json +0 -94
- package/tests/artifacts-non-get/updated-source-access.sdk.json +0 -94
- package/tests/build-url-mapping-pass2.mjs +0 -77
- package/tests/build-url-mapping.mjs +0 -101
- package/tests/check-broken-links.mjs +0 -89
- package/tests/diff-api-vs-sdk.mjs +0 -94
- package/tests/diff-passed.mjs +0 -99
- package/tests/diff-strict.mjs +0 -81
- package/tests/get-endpoints-fixtures.json +0 -179
- package/tests/non-get-endpoints-fixtures.json +0 -328
- package/tests/validate-get-endpoints.ts +0 -1180
- package/tests/validate-non-get-endpoints.ts +0 -477
- package/tests/validate-non-get-lifecycle.ts +0 -1093
|
@@ -1,1180 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env tsx
|
|
2
|
-
/*
|
|
3
|
-
* GET endpoints validator using `openapi-response-validator`
|
|
4
|
-
*
|
|
5
|
-
* Per GET endpoint in `fixed.yaml`:
|
|
6
|
-
* - Calls the API to get the raw JSON response
|
|
7
|
-
* - Validates the raw response against the OpenAPI response schema using `openapi-response-validator`
|
|
8
|
-
* - Parses the same raw response through the SDK's Zod inbound schema (this is what the SDK returns)
|
|
9
|
-
* - Compares JSON paths:
|
|
10
|
-
* - missingInSDK: present in API raw JSON but missing after SDK parsing
|
|
11
|
-
* - missingInAPI: present after SDK parsing but missing in API raw JSON
|
|
12
|
-
* - Generates a consolidated markdown report.
|
|
13
|
-
*
|
|
14
|
-
* Requirements:
|
|
15
|
-
* - FASTPIX_USERNAME / FASTPIX_PASSWORD env vars (Basic Auth)
|
|
16
|
-
* - `tests/get-endpoints-fixtures.json` for endpoints with required path params (optional but recommended)
|
|
17
|
-
*/
|
|
18
|
-
|
|
19
|
-
/// <reference types="node" />
|
|
20
|
-
|
|
21
|
-
import { readFileSync, writeFileSync, existsSync, mkdirSync } from "node:fs";
|
|
22
|
-
import { join, dirname } from "node:path";
|
|
23
|
-
import { fileURLToPath } from "node:url";
|
|
24
|
-
import { createRequire } from "node:module";
|
|
25
|
-
import yaml from "js-yaml";
|
|
26
|
-
import * as operations from "../src/models/operations/index.js";
|
|
27
|
-
import { Fastpix } from "../src/sdk/sdk.js";
|
|
28
|
-
|
|
29
|
-
const require = createRequire(import.meta.url);
|
|
30
|
-
const openapiResponseValidatorMod = require("openapi-response-validator");
|
|
31
|
-
const OpenAPIResponseValidator =
|
|
32
|
-
openapiResponseValidatorMod?.default ?? openapiResponseValidatorMod;
|
|
33
|
-
|
|
34
|
-
const __filename = fileURLToPath(import.meta.url);
|
|
35
|
-
const __dirname = dirname(__filename);
|
|
36
|
-
|
|
37
|
-
type Fixture = {
|
|
38
|
-
operations: Record<
|
|
39
|
-
string,
|
|
40
|
-
{
|
|
41
|
-
pathParams?: Record<string, string>;
|
|
42
|
-
query?: Record<string, string | number | boolean | Array<string | number | boolean>>;
|
|
43
|
-
}
|
|
44
|
-
>;
|
|
45
|
-
};
|
|
46
|
-
|
|
47
|
-
type EndpointInfo = {
|
|
48
|
-
path: string;
|
|
49
|
-
method: "GET";
|
|
50
|
-
operationId: string;
|
|
51
|
-
responses: any;
|
|
52
|
-
parameters: Array<any>;
|
|
53
|
-
};
|
|
54
|
-
|
|
55
|
-
type FixSuggestion = {
|
|
56
|
-
title: string;
|
|
57
|
-
why: string;
|
|
58
|
-
where?: string;
|
|
59
|
-
pasteYaml?: string;
|
|
60
|
-
};
|
|
61
|
-
|
|
62
|
-
type EndpointResult = {
|
|
63
|
-
endpoint: string;
|
|
64
|
-
operationId: string;
|
|
65
|
-
method: "GET";
|
|
66
|
-
openapiValid: boolean;
|
|
67
|
-
openapiErrors: Array<{ path?: string; message?: string; errorCode?: string }>;
|
|
68
|
-
sdkParseOk: boolean;
|
|
69
|
-
sdkParseError?: string;
|
|
70
|
-
missingInSDK: string[];
|
|
71
|
-
missingInAPI: string[];
|
|
72
|
-
emptyArraysOmittedInSDK: string[];
|
|
73
|
-
emptyArraysOmittedInAPI: string[];
|
|
74
|
-
apiResponseFile?: string;
|
|
75
|
-
sdkResponseFile?: string;
|
|
76
|
-
apiResponsePreview?: string;
|
|
77
|
-
sdkResponsePreview?: string;
|
|
78
|
-
status: "PASS" | "FAIL";
|
|
79
|
-
note?: string;
|
|
80
|
-
fixSuggestions?: FixSuggestion[];
|
|
81
|
-
};
|
|
82
|
-
|
|
83
|
-
const ARTIFACTS_DIRNAME = "artifacts";
|
|
84
|
-
const MAX_PREVIEW_CHARS = 4000;
|
|
85
|
-
const PLACEHOLDER_UUID = "00000000-0000-0000-0000-000000000000";
|
|
86
|
-
const FIX_SUGGESTIONS_MD = "GET_ENDPOINTS_OPENAPI_RESPONSE_FIX_SUGGESTIONS.md";
|
|
87
|
-
|
|
88
|
-
function safeFileSlug(input: string): string {
|
|
89
|
-
return input.replace(/[^a-zA-Z0-9._-]+/g, "_");
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
function toPrettyJson(value: unknown): string {
|
|
93
|
-
return JSON.stringify(value, null, 2);
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
// FastPix asset hosts have migrated to the .com TLD. Some legacy media
|
|
97
|
-
// records still have pre-migration CDN thumbnails persisted on them, and
|
|
98
|
-
// the API echoes those URLs back verbatim. Both hosts continue to serve
|
|
99
|
-
// the same content during the deprecation window, so we normalize before
|
|
100
|
-
// writing artifacts to disk — this keeps committed snapshots consistent
|
|
101
|
-
// with the post-migration host without changing API behavior. Runs after
|
|
102
|
-
// validation, so any real shape/schema issues are still surfaced.
|
|
103
|
-
function normalizeLegacyFastpixHosts(text: string): string {
|
|
104
|
-
return text.replace(/fastpix\.io/g, "fastpix.com");
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
function preview(text: string): string {
|
|
108
|
-
if (text.length <= MAX_PREVIEW_CHARS) return text;
|
|
109
|
-
return text.slice(0, MAX_PREVIEW_CHARS) + "\n... (truncated)";
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
function writeArtifactFiles(
|
|
113
|
-
operationId: string,
|
|
114
|
-
rawBody: unknown,
|
|
115
|
-
sdkBody: unknown,
|
|
116
|
-
): {
|
|
117
|
-
apiPath: string;
|
|
118
|
-
sdkPath: string;
|
|
119
|
-
apiPreview: string;
|
|
120
|
-
sdkPreview: string;
|
|
121
|
-
} {
|
|
122
|
-
const artifactsDir = join(__dirname, ARTIFACTS_DIRNAME);
|
|
123
|
-
mkdirSync(artifactsDir, { recursive: true });
|
|
124
|
-
|
|
125
|
-
const slug = safeFileSlug(operationId);
|
|
126
|
-
const apiFilename = `${slug}.api.json`;
|
|
127
|
-
const sdkFilename = `${slug}.sdk.json`;
|
|
128
|
-
|
|
129
|
-
const apiText = normalizeLegacyFastpixHosts(toPrettyJson(rawBody));
|
|
130
|
-
const sdkText = normalizeLegacyFastpixHosts(toPrettyJson(sdkBody));
|
|
131
|
-
|
|
132
|
-
const apiPath = join(artifactsDir, apiFilename);
|
|
133
|
-
const sdkPath = join(artifactsDir, sdkFilename);
|
|
134
|
-
|
|
135
|
-
writeFileSync(apiPath, apiText);
|
|
136
|
-
writeFileSync(sdkPath, sdkText);
|
|
137
|
-
|
|
138
|
-
return {
|
|
139
|
-
apiPath: `tests/${ARTIFACTS_DIRNAME}/${apiFilename}`,
|
|
140
|
-
sdkPath: `tests/${ARTIFACTS_DIRNAME}/${sdkFilename}`,
|
|
141
|
-
apiPreview: preview(apiText),
|
|
142
|
-
sdkPreview: preview(sdkText),
|
|
143
|
-
};
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
type SDKInvoker = (client: Fastpix, request: any) => Promise<any>;
|
|
147
|
-
|
|
148
|
-
function getSDKInvoker(operationId: string): SDKInvoker | null {
|
|
149
|
-
const map: Record<string, SDKInvoker> = {
|
|
150
|
-
// On-demand media
|
|
151
|
-
"list-media": (c, req) => c.media.list(req),
|
|
152
|
-
"get-media": (c, req) => c.manageVideos.get(req),
|
|
153
|
-
"get-media-summary": (c, req) => c.manageVideos.getSummary(req),
|
|
154
|
-
retrieveMediaInputInfo: (c, req) => c.manageVideos.retrieveMediaInputInfo(req),
|
|
155
|
-
"list-uploads": (c, req) => c.manageVideos.listUploads(req),
|
|
156
|
-
"get-media-clips": (c, req) => c.media.getClips(req),
|
|
157
|
-
|
|
158
|
-
// Live clips / streams
|
|
159
|
-
"list-live-clips": (c, req) => c.liveStreams.listClips(req),
|
|
160
|
-
"get-all-streams": (c, req) => c.liveStreams.list(req),
|
|
161
|
-
"get-live-stream-by-id": (c, req) => c.manageLiveStream.get(req),
|
|
162
|
-
"get-live-stream-viewer-count-by-id": (c, req) => c.manageLiveStream.getViewerCount(req),
|
|
163
|
-
"get-live-stream-playback-id": (c, req) => c.livePlayback.get(req),
|
|
164
|
-
"get-specific-simulcast-of-stream": (c, req) => c.simulcasts.get(req),
|
|
165
|
-
|
|
166
|
-
// Playlists
|
|
167
|
-
"get-all-playlists": (c, req) => c.playlist.list(req),
|
|
168
|
-
"get-playlist-by-id": (c, req) => c.playlist.get(req),
|
|
169
|
-
|
|
170
|
-
// Playback / DRM
|
|
171
|
-
"list-playback-ids": (c, req) => c.playback.listIds(req),
|
|
172
|
-
"get-playback-id": (c, req) => c.playback.get(req),
|
|
173
|
-
getDrmConfiguration: (c, req) => c.drmConfigurations.list(req),
|
|
174
|
-
getDrmConfigurationById: (c, req) => c.drmConfigurations.get(req),
|
|
175
|
-
|
|
176
|
-
// IAM
|
|
177
|
-
list_signing_keys: (c, req) => c.signingKeys.list(req),
|
|
178
|
-
"get-signing_key_by_id": (c, req) => c.signingKeys.getById(req),
|
|
179
|
-
|
|
180
|
-
// Data APIs
|
|
181
|
-
list_video_views: (c, req) => c.views.list(req),
|
|
182
|
-
get_video_view_details: (c, req) => c.views.getDetails(req),
|
|
183
|
-
list_by_top_content: (c, req) => c.views.listTopContent(req),
|
|
184
|
-
|
|
185
|
-
list_dimensions: (c, req) => c.dimensions.list(req),
|
|
186
|
-
list_filter_values_for_dimension: (c, req) => c.dimensions.listFilterValues(req),
|
|
187
|
-
|
|
188
|
-
list_breakdown_values: (c, req) => c.metrics.listBreakdownValues(req),
|
|
189
|
-
list_overall_values: (c, req) => c.metrics.listOverallValues(req),
|
|
190
|
-
get_timeseries_data: (c, req) => c.metrics.getTimeseriesData(req),
|
|
191
|
-
list_comparison_values: (c, req) => c.metrics.listCompares(req),
|
|
192
|
-
|
|
193
|
-
list_errors: (c, req) => c.errors.list(req),
|
|
194
|
-
};
|
|
195
|
-
return map[operationId] ?? null;
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
function defaultSDKRequest(operationId: string): any | undefined {
|
|
199
|
-
// Ensure SDK input validation passes so we reach the HTTP call and get server errors on failures.
|
|
200
|
-
switch (operationId) {
|
|
201
|
-
case "get-media":
|
|
202
|
-
case "get-media-summary":
|
|
203
|
-
case "retrieveMediaInputInfo":
|
|
204
|
-
case "list-playback-ids":
|
|
205
|
-
case "get-media-clips":
|
|
206
|
-
return { mediaId: PLACEHOLDER_UUID };
|
|
207
|
-
case "get-playback-id":
|
|
208
|
-
return { mediaId: PLACEHOLDER_UUID, playbackId: PLACEHOLDER_UUID };
|
|
209
|
-
case "list-live-clips":
|
|
210
|
-
return { livestreamId: PLACEHOLDER_UUID };
|
|
211
|
-
case "get-playlist-by-id":
|
|
212
|
-
return { playlistId: PLACEHOLDER_UUID };
|
|
213
|
-
case "getDrmConfigurationById":
|
|
214
|
-
return { drmConfigurationId: PLACEHOLDER_UUID };
|
|
215
|
-
case "get-live-stream-by-id":
|
|
216
|
-
case "get-live-stream-viewer-count-by-id":
|
|
217
|
-
return { streamId: PLACEHOLDER_UUID };
|
|
218
|
-
case "get-live-stream-playback-id":
|
|
219
|
-
return { streamId: PLACEHOLDER_UUID, playbackId: PLACEHOLDER_UUID };
|
|
220
|
-
case "get-specific-simulcast-of-stream":
|
|
221
|
-
return { streamId: PLACEHOLDER_UUID, simulcastId: PLACEHOLDER_UUID };
|
|
222
|
-
case "get-signing_key_by_id":
|
|
223
|
-
return { signingKeyId: PLACEHOLDER_UUID };
|
|
224
|
-
case "get_video_view_details":
|
|
225
|
-
return { viewId: PLACEHOLDER_UUID };
|
|
226
|
-
case "list_filter_values_for_dimension":
|
|
227
|
-
return { dimensionsId: "browser_name" };
|
|
228
|
-
case "list_breakdown_values":
|
|
229
|
-
return {
|
|
230
|
-
metricId: "quality_of_experience_score",
|
|
231
|
-
timespan: "24:hours",
|
|
232
|
-
groupBy: "browser_name",
|
|
233
|
-
};
|
|
234
|
-
case "list_overall_values":
|
|
235
|
-
return { metricId: "quality_of_experience_score", timespan: "24:hours" };
|
|
236
|
-
case "get_timeseries_data":
|
|
237
|
-
return {
|
|
238
|
-
metricId: "quality_of_experience_score",
|
|
239
|
-
timespan: "24:hours",
|
|
240
|
-
groupBy: "hour",
|
|
241
|
-
};
|
|
242
|
-
case "list_comparison_values":
|
|
243
|
-
return { timespan: "24:hours", dimension: "browser_name", value: "Chrome" };
|
|
244
|
-
case "list_errors":
|
|
245
|
-
return { timespan: "24:hours", limit: 5 };
|
|
246
|
-
case "list_video_views":
|
|
247
|
-
return { timespan: "24:hours", limit: 5, offset: 1 };
|
|
248
|
-
case "list_by_top_content":
|
|
249
|
-
return { timespan: "24:hours", limit: 5 };
|
|
250
|
-
case "list-media":
|
|
251
|
-
return { limit: 5, offset: 1, orderBy: "desc" };
|
|
252
|
-
case "list-uploads":
|
|
253
|
-
return { limit: 5, offset: 1, orderBy: "desc" };
|
|
254
|
-
case "get-all-streams":
|
|
255
|
-
return { limit: 5, offset: 1, orderBy: "desc" };
|
|
256
|
-
case "getDrmConfiguration":
|
|
257
|
-
return { limit: 10, offset: 1 };
|
|
258
|
-
case "get-all-playlists":
|
|
259
|
-
return { limit: 5, offset: 1 };
|
|
260
|
-
case "list_signing_keys":
|
|
261
|
-
return { limit: 5, offset: 1 };
|
|
262
|
-
case "list_dimensions":
|
|
263
|
-
return undefined;
|
|
264
|
-
default:
|
|
265
|
-
return undefined;
|
|
266
|
-
}
|
|
267
|
-
}
|
|
268
|
-
|
|
269
|
-
function buildSDKRequest(endpoint: EndpointInfo, fixtures: Fixture | null): any | undefined {
|
|
270
|
-
const opFixture = fixtures?.operations?.[endpoint.operationId];
|
|
271
|
-
const fromFixture = opFixture
|
|
272
|
-
? { ...(opFixture.pathParams || {}), ...(opFixture.query || {}) }
|
|
273
|
-
: undefined;
|
|
274
|
-
|
|
275
|
-
// If fixtures exist, use them as-is (they match SDK request shapes).
|
|
276
|
-
if (fromFixture) return fromFixture;
|
|
277
|
-
|
|
278
|
-
// Prefer operation-specific defaults (handles required query params too).
|
|
279
|
-
const def = defaultSDKRequest(endpoint.operationId);
|
|
280
|
-
if (def !== undefined) return def;
|
|
281
|
-
|
|
282
|
-
// Otherwise: auto-generate a placeholder request object for required path params.
|
|
283
|
-
const requiredPathParams = endpoint.parameters
|
|
284
|
-
.filter((p) => p?.in === "path" && p?.required)
|
|
285
|
-
.map((p) => p.name);
|
|
286
|
-
|
|
287
|
-
if (requiredPathParams.length === 0) return undefined;
|
|
288
|
-
|
|
289
|
-
const req: Record<string, string> = {};
|
|
290
|
-
for (const name of requiredPathParams) req[name] = PLACEHOLDER_UUID;
|
|
291
|
-
return req;
|
|
292
|
-
}
|
|
293
|
-
|
|
294
|
-
function headersToObject(headers: any): Record<string, string> | undefined {
|
|
295
|
-
try {
|
|
296
|
-
if (!headers) return undefined;
|
|
297
|
-
if (typeof headers.entries === "function") {
|
|
298
|
-
return Object.fromEntries(Array.from(headers.entries()));
|
|
299
|
-
}
|
|
300
|
-
} catch {
|
|
301
|
-
// ignore
|
|
302
|
-
}
|
|
303
|
-
return undefined;
|
|
304
|
-
}
|
|
305
|
-
|
|
306
|
-
function normalizeSdkError(err: any): any {
|
|
307
|
-
const base: any = {
|
|
308
|
-
name: err?.name,
|
|
309
|
-
message: err?.message,
|
|
310
|
-
stack: err?.stack,
|
|
311
|
-
};
|
|
312
|
-
|
|
313
|
-
if (typeof err?.statusCode !== "undefined") base.statusCode = err.statusCode;
|
|
314
|
-
if (typeof err?.contentType !== "undefined") base.contentType = err.contentType;
|
|
315
|
-
if (typeof err?.body !== "undefined") {
|
|
316
|
-
base.body = err.body;
|
|
317
|
-
if (typeof err.body === "string") {
|
|
318
|
-
try {
|
|
319
|
-
base.bodyJson = JSON.parse(err.body);
|
|
320
|
-
} catch {
|
|
321
|
-
// ignore
|
|
322
|
-
}
|
|
323
|
-
}
|
|
324
|
-
}
|
|
325
|
-
base.headers = headersToObject(err?.headers) ?? headersToObject(err?.rawResponse?.headers);
|
|
326
|
-
if (err?.rawResponse?.url) base.url = err.rawResponse.url;
|
|
327
|
-
|
|
328
|
-
if (err?.cause) base.cause = err.cause;
|
|
329
|
-
if (typeof err?.rawMessage !== "undefined") base.rawMessage = err.rawMessage;
|
|
330
|
-
if (typeof err?.rawValue !== "undefined") base.rawValue = err.rawValue;
|
|
331
|
-
|
|
332
|
-
return base;
|
|
333
|
-
}
|
|
334
|
-
|
|
335
|
-
function readFixtures(): Fixture | null {
|
|
336
|
-
const p = join(__dirname, "get-endpoints-fixtures.json");
|
|
337
|
-
if (!existsSync(p)) return null;
|
|
338
|
-
return JSON.parse(readFileSync(p, "utf-8")) as Fixture;
|
|
339
|
-
}
|
|
340
|
-
|
|
341
|
-
function resolveSpecPath(): string {
|
|
342
|
-
// Deterministic search order (mirrors reference repo’s "../../fastpix.yaml" pattern).
|
|
343
|
-
const candidates = [
|
|
344
|
-
join(__dirname, "../fixed.yaml"), // tests/../fixed.yaml (repo root)
|
|
345
|
-
join(__dirname, "../../fixed.yaml"), // tests/../../fixed.yaml (workspace new sdk/fixed.yaml)
|
|
346
|
-
];
|
|
347
|
-
for (const p of candidates) {
|
|
348
|
-
if (existsSync(p)) return p;
|
|
349
|
-
}
|
|
350
|
-
throw new Error(
|
|
351
|
-
`OpenAPI spec not found. Tried: ${candidates.map((c) => JSON.stringify(c)).join(", ")}`,
|
|
352
|
-
);
|
|
353
|
-
}
|
|
354
|
-
|
|
355
|
-
function loadOpenAPISpec(): any {
|
|
356
|
-
const specPath = resolveSpecPath();
|
|
357
|
-
return yaml.load(readFileSync(specPath, "utf-8"));
|
|
358
|
-
}
|
|
359
|
-
|
|
360
|
-
function extractGetEndpoints(spec: any): EndpointInfo[] {
|
|
361
|
-
const out: EndpointInfo[] = [];
|
|
362
|
-
for (const [path, methods] of Object.entries(spec.paths || {})) {
|
|
363
|
-
const m = methods as any;
|
|
364
|
-
if (!m.get) continue;
|
|
365
|
-
out.push({
|
|
366
|
-
path,
|
|
367
|
-
method: "GET",
|
|
368
|
-
operationId: m.get.operationId,
|
|
369
|
-
responses: m.get.responses || {},
|
|
370
|
-
parameters: [...(m.get.parameters || []), ...(m.parameters || [])],
|
|
371
|
-
});
|
|
372
|
-
}
|
|
373
|
-
return out;
|
|
374
|
-
}
|
|
375
|
-
|
|
376
|
-
// Convert OpenAPI 3 schema refs (#/components/schemas/X) to the format used by openapi-response-validator (#/definitions/X)
|
|
377
|
-
function convertRefsToDefinitions(node: any): any {
|
|
378
|
-
if (node == null || typeof node !== "object") return node;
|
|
379
|
-
if (Array.isArray(node)) return node.map(convertRefsToDefinitions);
|
|
380
|
-
const out: any = {};
|
|
381
|
-
for (const [k, v] of Object.entries(node)) {
|
|
382
|
-
if (k === "$ref" && typeof v === "string") {
|
|
383
|
-
out[k] = v.replace("#/components/schemas/", "#/definitions/");
|
|
384
|
-
} else {
|
|
385
|
-
out[k] = convertRefsToDefinitions(v);
|
|
386
|
-
}
|
|
387
|
-
}
|
|
388
|
-
return out;
|
|
389
|
-
}
|
|
390
|
-
|
|
391
|
-
function makeOpenAPIResponseValidator(spec: any, endpoint: EndpointInfo) {
|
|
392
|
-
const definitions = convertRefsToDefinitions(spec.components?.schemas || {});
|
|
393
|
-
const responses: any = {};
|
|
394
|
-
|
|
395
|
-
for (const [status, def] of Object.entries(endpoint.responses || {})) {
|
|
396
|
-
const d = def as any;
|
|
397
|
-
const schema = d?.content?.["application/json"]?.schema;
|
|
398
|
-
if (!schema) continue;
|
|
399
|
-
responses[status] = {
|
|
400
|
-
description: d.description || "",
|
|
401
|
-
schema: convertRefsToDefinitions(schema),
|
|
402
|
-
};
|
|
403
|
-
}
|
|
404
|
-
|
|
405
|
-
if (Object.keys(responses).length === 0) return null;
|
|
406
|
-
|
|
407
|
-
return new OpenAPIResponseValidator({
|
|
408
|
-
responses,
|
|
409
|
-
definitions,
|
|
410
|
-
});
|
|
411
|
-
}
|
|
412
|
-
|
|
413
|
-
function hasOpenapiError(r: EndpointResult, includes: string): boolean {
|
|
414
|
-
return (r.openapiErrors || []).some((e) => (e?.message ?? "").includes(includes));
|
|
415
|
-
}
|
|
416
|
-
|
|
417
|
-
function openapiErrorPaths(r: EndpointResult): string[] {
|
|
418
|
-
return (r.openapiErrors || [])
|
|
419
|
-
.map((e) => e?.path)
|
|
420
|
-
.filter((p): p is string => typeof p === "string" && p.length > 0);
|
|
421
|
-
}
|
|
422
|
-
|
|
423
|
-
function generateFixSuggestions(r: EndpointResult): FixSuggestion[] {
|
|
424
|
-
const out: FixSuggestion[] = [];
|
|
425
|
-
const paths = openapiErrorPaths(r);
|
|
426
|
-
|
|
427
|
-
// 1) Generic: oneOf overlap on tracks
|
|
428
|
-
const hasTracksOneOf =
|
|
429
|
-
hasOpenapiError(r, "must match exactly one schema in oneOf") &&
|
|
430
|
-
paths.some((p) => p.includes("tracks"));
|
|
431
|
-
if (hasTracksOneOf) {
|
|
432
|
-
out.push({
|
|
433
|
-
title: "Fix `tracks[].oneOf` overlap by constraining `type` per track schema",
|
|
434
|
-
why:
|
|
435
|
-
"The current track schemas overlap (e.g. `type` is a free string and distinguishing fields are not required), so a single track object can match multiple branches. `oneOf` requires exactly one match.",
|
|
436
|
-
where:
|
|
437
|
-
"In `fixed.yaml`: `components/schemas/{VideoTrack,VideoTrackForGetAll,AudioTrack,SubtitleTrack}.properties.type`",
|
|
438
|
-
pasteYaml: [
|
|
439
|
-
"# Apply these changes inside each schema’s `properties:` block:",
|
|
440
|
-
"",
|
|
441
|
-
"# VideoTrack (and VideoTrackForGetAll)",
|
|
442
|
-
"type:",
|
|
443
|
-
" type: string",
|
|
444
|
-
" enum: [video]",
|
|
445
|
-
" example: video",
|
|
446
|
-
"",
|
|
447
|
-
"# AudioTrack",
|
|
448
|
-
"type:",
|
|
449
|
-
" type: string",
|
|
450
|
-
" enum: [audio]",
|
|
451
|
-
" example: audio",
|
|
452
|
-
"",
|
|
453
|
-
"# SubtitleTrack",
|
|
454
|
-
"type:",
|
|
455
|
-
" type: string",
|
|
456
|
-
" enum: [subtitle]",
|
|
457
|
-
" example: subtitle",
|
|
458
|
-
].join("\n"),
|
|
459
|
-
});
|
|
460
|
-
}
|
|
461
|
-
|
|
462
|
-
// 2) Enum mismatch: sourceResolution
|
|
463
|
-
const hasSourceResolutionEnum =
|
|
464
|
-
hasOpenapiError(r, "must be equal to one of the allowed values") &&
|
|
465
|
-
paths.some((p) => p.includes("sourceResolution"));
|
|
466
|
-
if (hasSourceResolutionEnum) {
|
|
467
|
-
out.push({
|
|
468
|
-
title: "Fix `sourceResolution` enum mismatch (API may return values without `p`)",
|
|
469
|
-
why:
|
|
470
|
-
"The API can return values like `\"1080\"` but the spec constrains the enum to `\"1080p\"`-style values.",
|
|
471
|
-
where:
|
|
472
|
-
"In `fixed.yaml`: under the relevant media response schema(s) `sourceResolution:` field definition",
|
|
473
|
-
});
|
|
474
|
-
}
|
|
475
|
-
|
|
476
|
-
// 3) Redundant oneOf for /data/dimensions
|
|
477
|
-
const hasDimensionsOneOf =
|
|
478
|
-
hasOpenapiError(r, "must match exactly one schema in oneOf") &&
|
|
479
|
-
(r.endpoint === "/data/dimensions" || paths.some((p) => p.includes("dimensions")));
|
|
480
|
-
if (hasDimensionsOneOf) {
|
|
481
|
-
out.push({
|
|
482
|
-
title: "Remove redundant `oneOf` on `/data/dimensions` response schema",
|
|
483
|
-
why:
|
|
484
|
-
"`data` is defined as `oneOf: [array<string>, $ref: Dimensions]` and `Dimensions` itself is also `array<string>`, so valid responses can match multiple branches.",
|
|
485
|
-
where:
|
|
486
|
-
"In `fixed.yaml`: `paths./data/dimensions.get.responses.200.content.application/json.schema.properties.data.oneOf`",
|
|
487
|
-
});
|
|
488
|
-
}
|
|
489
|
-
|
|
490
|
-
// 4) Overlapping numeric oneOf: integer vs number
|
|
491
|
-
const hasIntegerVsNumber =
|
|
492
|
-
hasOpenapiError(r, "must match exactly one schema in oneOf") &&
|
|
493
|
-
paths.some((p) => p.includes("value"));
|
|
494
|
-
if (hasIntegerVsNumber) {
|
|
495
|
-
out.push({
|
|
496
|
-
title: "Avoid `oneOf: [integer, number]` overlaps (integers are also numbers)",
|
|
497
|
-
why:
|
|
498
|
-
"In JSON Schema, `integer` is a subset of `number`. A value like `0` matches both, causing oneOf validation errors.",
|
|
499
|
-
where:
|
|
500
|
-
"In `fixed.yaml`: metrics schemas that use `oneOf: [integer, number]`",
|
|
501
|
-
});
|
|
502
|
-
}
|
|
503
|
-
|
|
504
|
-
// 5) Nullable mismatch: fpApiVersion
|
|
505
|
-
const hasFpApiVersionNull =
|
|
506
|
-
hasOpenapiError(r, "must be string") &&
|
|
507
|
-
paths.some((p) => p.includes("fpApiVersion"));
|
|
508
|
-
if (hasFpApiVersionNull) {
|
|
509
|
-
out.push({
|
|
510
|
-
title: "Make `fpApiVersion` nullable in the spec",
|
|
511
|
-
why: "The API can return `null` for fpApiVersion but the schema declares `string` only.",
|
|
512
|
-
where: "In `fixed.yaml`: `components/schemas/Views.properties.fpApiVersion`",
|
|
513
|
-
});
|
|
514
|
-
}
|
|
515
|
-
|
|
516
|
-
// 6) Placeholder fixture guidance (common 404)
|
|
517
|
-
const placeholderUsed = (r.note || "").includes("Placeholder used");
|
|
518
|
-
const likely404 =
|
|
519
|
-
r.sdkParseOk === false &&
|
|
520
|
-
/404|not found/i.test(r.sdkParseError || "") &&
|
|
521
|
-
placeholderUsed;
|
|
522
|
-
if (likely404) {
|
|
523
|
-
out.push({
|
|
524
|
-
title: "Provide real fixture IDs for this operationId",
|
|
525
|
-
why:
|
|
526
|
-
"A placeholder UUID was used for required path params; the API likely returned 404 because the resource doesn't exist. Add a real ID under `tests/get-endpoints-fixtures.json` for this operationId.",
|
|
527
|
-
});
|
|
528
|
-
}
|
|
529
|
-
|
|
530
|
-
// 7) Playlist playOrder default / missing
|
|
531
|
-
const playOrderMissing = r.missingInAPI.some((p) => p.includes("playOrder")) ||
|
|
532
|
-
r.missingInSDK.some((p) => p.includes("playOrder"));
|
|
533
|
-
if (playOrderMissing) {
|
|
534
|
-
out.push({
|
|
535
|
-
title: "Ensure `playOrder` is correctly modeled for smart playlists only",
|
|
536
|
-
why:
|
|
537
|
-
"If `playOrder` is present/required only for `type: smart`, the response schemas should reflect that (e.g. discriminator split).",
|
|
538
|
-
where:
|
|
539
|
-
"In `fixed.yaml`: playlist response schemas for create/update/get-by-id",
|
|
540
|
-
});
|
|
541
|
-
}
|
|
542
|
-
|
|
543
|
-
// 8) simulcastResponses missing
|
|
544
|
-
const hasSimulcastResponses = r.missingInSDK.some((p) => p.includes("simulcastResponses"));
|
|
545
|
-
if (hasSimulcastResponses) {
|
|
546
|
-
out.push({
|
|
547
|
-
title: "Add `simulcastResponses` to the live stream response schema",
|
|
548
|
-
why:
|
|
549
|
-
"The API response includes simulcastResponses but the OpenAPI schema (and generated SDK inbound schema) does not, causing the SDK to drop the field.",
|
|
550
|
-
where:
|
|
551
|
-
"In `fixed.yaml`: live stream response schema(s) for get/list streams",
|
|
552
|
-
});
|
|
553
|
-
}
|
|
554
|
-
|
|
555
|
-
return out;
|
|
556
|
-
}
|
|
557
|
-
|
|
558
|
-
function writeFixSuggestions(results: EndpointResult[]) {
|
|
559
|
-
const failing = results.filter((r) => r.status === "FAIL");
|
|
560
|
-
const outPath = join(__dirname, FIX_SUGGESTIONS_MD);
|
|
561
|
-
const lines: string[] = [];
|
|
562
|
-
|
|
563
|
-
lines.push("# GET Endpoints — OpenAPI Response Fix Suggestions");
|
|
564
|
-
lines.push("");
|
|
565
|
-
lines.push(`Generated: ${new Date().toISOString()}`);
|
|
566
|
-
lines.push("");
|
|
567
|
-
lines.push(`Total failing endpoints: ${failing.length}`);
|
|
568
|
-
lines.push("");
|
|
569
|
-
|
|
570
|
-
for (const r of failing) {
|
|
571
|
-
const suggestions = r.fixSuggestions ?? [];
|
|
572
|
-
lines.push(`## ${r.operationId} (\`${r.endpoint}\`)`);
|
|
573
|
-
lines.push("");
|
|
574
|
-
lines.push(`- **Status**: ${r.status}`);
|
|
575
|
-
lines.push(`- **OpenAPI valid**: ${r.openapiValid ? "yes" : "no"}`);
|
|
576
|
-
lines.push(`- **SDK parse**: ${r.sdkParseOk ? "ok" : "failed"}`);
|
|
577
|
-
if (r.apiResponseFile) lines.push(`- **API artifact**: \`${r.apiResponseFile}\``);
|
|
578
|
-
if (r.sdkResponseFile) lines.push(`- **SDK artifact**: \`${r.sdkResponseFile}\``);
|
|
579
|
-
lines.push("");
|
|
580
|
-
|
|
581
|
-
if (!r.openapiValid && (r.openapiErrors?.length ?? 0) > 0) {
|
|
582
|
-
lines.push("### Observed OpenAPI errors");
|
|
583
|
-
lines.push("");
|
|
584
|
-
for (const e of r.openapiErrors) {
|
|
585
|
-
const loc = e.path ? `\`${e.path}\`` : "";
|
|
586
|
-
const msg = e.message ?? "";
|
|
587
|
-
lines.push(`- ${loc} ${msg}`.trim());
|
|
588
|
-
}
|
|
589
|
-
lines.push("");
|
|
590
|
-
}
|
|
591
|
-
|
|
592
|
-
if (suggestions.length === 0) {
|
|
593
|
-
lines.push("### Suggested fixes");
|
|
594
|
-
lines.push("");
|
|
595
|
-
lines.push("- No heuristic suggestions available for this failure yet.");
|
|
596
|
-
lines.push("");
|
|
597
|
-
continue;
|
|
598
|
-
}
|
|
599
|
-
|
|
600
|
-
lines.push("### Suggested fixes");
|
|
601
|
-
lines.push("");
|
|
602
|
-
for (const s of suggestions) {
|
|
603
|
-
lines.push(`- **${s.title}**`);
|
|
604
|
-
lines.push(` - **why**: ${s.why}`);
|
|
605
|
-
if (s.where) lines.push(` - **where**: ${s.where}`);
|
|
606
|
-
if (s.pasteYaml) {
|
|
607
|
-
lines.push(" - **paste**:");
|
|
608
|
-
lines.push("");
|
|
609
|
-
lines.push("```yaml");
|
|
610
|
-
lines.push(s.pasteYaml);
|
|
611
|
-
lines.push("```");
|
|
612
|
-
}
|
|
613
|
-
lines.push("");
|
|
614
|
-
}
|
|
615
|
-
}
|
|
616
|
-
|
|
617
|
-
writeFileSync(outPath, lines.join("\n"));
|
|
618
|
-
}
|
|
619
|
-
|
|
620
|
-
function collectEmptyArrayFieldPaths(value: any, prefix = ""): Set<string> {
|
|
621
|
-
const out = new Set<string>();
|
|
622
|
-
if (value === null || value === undefined) return out;
|
|
623
|
-
if (typeof value !== "object") return out;
|
|
624
|
-
|
|
625
|
-
if (Array.isArray(value)) {
|
|
626
|
-
const arrayPrefix = prefix ? `${prefix}[]` : "[]";
|
|
627
|
-
for (const item of value) {
|
|
628
|
-
for (const p of collectEmptyArrayFieldPaths(item, arrayPrefix)) out.add(p);
|
|
629
|
-
}
|
|
630
|
-
return out;
|
|
631
|
-
}
|
|
632
|
-
|
|
633
|
-
for (const [k, v] of Object.entries(value)) {
|
|
634
|
-
const p = prefix ? `${prefix}.${k}` : k;
|
|
635
|
-
if (Array.isArray(v) && v.length === 0) out.add(p);
|
|
636
|
-
for (const child of collectEmptyArrayFieldPaths(v, p)) out.add(child);
|
|
637
|
-
}
|
|
638
|
-
return out;
|
|
639
|
-
}
|
|
640
|
-
|
|
641
|
-
function collectJsonPaths(
|
|
642
|
-
value: any,
|
|
643
|
-
prefix = "",
|
|
644
|
-
opts: { includeEmptyArrays?: boolean } = {},
|
|
645
|
-
): Set<string> {
|
|
646
|
-
const out = new Set<string>();
|
|
647
|
-
const add = (p: string) => out.add(p);
|
|
648
|
-
const includeEmptyArrays = opts.includeEmptyArrays ?? true;
|
|
649
|
-
|
|
650
|
-
if (value === null || value === undefined) return out;
|
|
651
|
-
if (typeof value !== "object") {
|
|
652
|
-
if (prefix) add(prefix);
|
|
653
|
-
return out;
|
|
654
|
-
}
|
|
655
|
-
|
|
656
|
-
if (Array.isArray(value)) {
|
|
657
|
-
if (!includeEmptyArrays && value.length === 0) return out;
|
|
658
|
-
const arrayPrefix = prefix ? `${prefix}[]` : "[]";
|
|
659
|
-
add(arrayPrefix);
|
|
660
|
-
for (const item of value) {
|
|
661
|
-
for (const p of collectJsonPaths(item, arrayPrefix, opts)) out.add(p);
|
|
662
|
-
}
|
|
663
|
-
return out;
|
|
664
|
-
}
|
|
665
|
-
|
|
666
|
-
for (const [k, v] of Object.entries(value)) {
|
|
667
|
-
if (!includeEmptyArrays && Array.isArray(v) && v.length === 0) {
|
|
668
|
-
continue;
|
|
669
|
-
}
|
|
670
|
-
const p = prefix ? `${prefix}.${k}` : k;
|
|
671
|
-
add(p);
|
|
672
|
-
for (const child of collectJsonPaths(v, p, opts)) out.add(child);
|
|
673
|
-
}
|
|
674
|
-
return out;
|
|
675
|
-
}
|
|
676
|
-
|
|
677
|
-
function sortUnique(arr: string[]) {
|
|
678
|
-
return Array.from(new Set(arr)).sort((a, b) => a.localeCompare(b));
|
|
679
|
-
}
|
|
680
|
-
|
|
681
|
-
function canonicalizeKey(key: string): string {
|
|
682
|
-
// 1) snake_case -> camelCase
|
|
683
|
-
const camel = key.includes("_")
|
|
684
|
-
? key
|
|
685
|
-
.toLowerCase()
|
|
686
|
-
.replace(/_([a-z0-9])/g, (_, c) => String(c).toUpperCase())
|
|
687
|
-
: key;
|
|
688
|
-
|
|
689
|
-
// 2) normalize acronyms casing
|
|
690
|
-
return camel.replaceAll("SDK", "Sdk").replaceAll("API", "Api");
|
|
691
|
-
}
|
|
692
|
-
|
|
693
|
-
function normalizeJsonForComparison(value: any): any {
|
|
694
|
-
if (value === null || value === undefined) return value;
|
|
695
|
-
if (Array.isArray(value)) return value.map(normalizeJsonForComparison);
|
|
696
|
-
if (typeof value !== "object") return value;
|
|
697
|
-
const out: any = {};
|
|
698
|
-
for (const [k, v] of Object.entries(value)) {
|
|
699
|
-
out[canonicalizeKey(k)] = normalizeJsonForComparison(v);
|
|
700
|
-
}
|
|
701
|
-
return out;
|
|
702
|
-
}
|
|
703
|
-
|
|
704
|
-
function jsonRoundTrip(value: any): any {
|
|
705
|
-
return JSON.parse(JSON.stringify(value));
|
|
706
|
-
}
|
|
707
|
-
|
|
708
|
-
function buildUrl(
|
|
709
|
-
baseUrl: string,
|
|
710
|
-
endpoint: EndpointInfo,
|
|
711
|
-
fixture: Fixture | null,
|
|
712
|
-
): { url: string; note?: string } {
|
|
713
|
-
const opFixture = fixture?.operations?.[endpoint.operationId];
|
|
714
|
-
let path = endpoint.path;
|
|
715
|
-
|
|
716
|
-
const requiredPathParams = endpoint.parameters
|
|
717
|
-
.filter((p) => p?.in === "path" && p?.required)
|
|
718
|
-
.map((p) => p.name);
|
|
719
|
-
|
|
720
|
-
const defaults = defaultSDKRequest(endpoint.operationId) ?? {};
|
|
721
|
-
const fromFixture = opFixture
|
|
722
|
-
? { ...(opFixture.pathParams || {}), ...(opFixture.query || {}) }
|
|
723
|
-
: {};
|
|
724
|
-
const effectiveReq: Record<string, any> = { ...defaults, ...fromFixture };
|
|
725
|
-
|
|
726
|
-
let note: string | undefined;
|
|
727
|
-
if (requiredPathParams.length > 0) {
|
|
728
|
-
for (const name of requiredPathParams) {
|
|
729
|
-
const val = effectiveReq[name] ?? PLACEHOLDER_UUID;
|
|
730
|
-
if (effectiveReq[name] == null) {
|
|
731
|
-
note = note ? `${note}; placeholder used for ${name}` : `Placeholder used for ${name}`;
|
|
732
|
-
}
|
|
733
|
-
path = path.replaceAll(`{${name}}`, encodeURIComponent(val));
|
|
734
|
-
}
|
|
735
|
-
}
|
|
736
|
-
|
|
737
|
-
const base = baseUrl.endsWith("/") ? baseUrl : baseUrl + "/";
|
|
738
|
-
const url = new URL(path.replace(/^\//, ""), base);
|
|
739
|
-
|
|
740
|
-
const queryParams = endpoint.parameters.filter((p) => p?.in === "query");
|
|
741
|
-
for (const p of queryParams) {
|
|
742
|
-
const name: string = p.name;
|
|
743
|
-
const baseName = name.endsWith("[]") ? name.slice(0, -2) : name;
|
|
744
|
-
const val = effectiveReq[name] ?? effectiveReq[baseName];
|
|
745
|
-
if (val == null) continue;
|
|
746
|
-
|
|
747
|
-
if (Array.isArray(val)) {
|
|
748
|
-
for (const item of val) url.searchParams.append(name, String(item));
|
|
749
|
-
} else {
|
|
750
|
-
if (name.endsWith("[]")) url.searchParams.append(name, String(val));
|
|
751
|
-
else url.searchParams.set(name, String(val));
|
|
752
|
-
}
|
|
753
|
-
}
|
|
754
|
-
|
|
755
|
-
return { url: url.toString(), note };
|
|
756
|
-
}
|
|
757
|
-
|
|
758
|
-
function basicAuthHeader(username: string, password: string): string {
|
|
759
|
-
const token = Buffer.from(`${username}:${password}`).toString("base64");
|
|
760
|
-
return `Basic ${token}`;
|
|
761
|
-
}
|
|
762
|
-
|
|
763
|
-
function getSDKInboundSchemaForOperation(operationId: string): any | null {
|
|
764
|
-
// Use union response schemas where possible (Response$inboundSchema) so DefaultError fields are preserved.
|
|
765
|
-
const map: Record<string, any> = {
|
|
766
|
-
"list-media": operations.ListMediaResponse$inboundSchema,
|
|
767
|
-
"get-media": operations.GetMediaResponse$inboundSchema,
|
|
768
|
-
"get-media-summary": operations.GetMediaSummaryResponse$inboundSchema,
|
|
769
|
-
retrieveMediaInputInfo: operations.RetrieveMediaInputInfoResponse$inboundSchema,
|
|
770
|
-
"list-live-clips": operations.ListLiveClipsResponse$inboundSchema,
|
|
771
|
-
"list-playback-ids": operations.ListPlaybackIdsResponse$inboundSchema,
|
|
772
|
-
"get-playback-id": operations.GetPlaybackIdResponse$inboundSchema,
|
|
773
|
-
"list-uploads": operations.ListUploadsResponse$inboundSchema,
|
|
774
|
-
"get-media-clips": operations.GetMediaClipsResponse$inboundSchema,
|
|
775
|
-
"get-all-playlists": operations.GetAllPlaylistsResponse$inboundSchema,
|
|
776
|
-
"get-playlist-by-id": operations.GetPlaylistByIdResponse$inboundSchema,
|
|
777
|
-
getDrmConfiguration: operations.GetDrmConfigurationResponse$inboundSchema,
|
|
778
|
-
getDrmConfigurationById: operations.GetDrmConfigurationByIdResponse$inboundSchema,
|
|
779
|
-
"get-all-streams": operations.GetAllStreamsResponse$inboundSchema,
|
|
780
|
-
"get-live-stream-viewer-count-by-id": operations.GetLiveStreamViewerCountByIdResponse$inboundSchema,
|
|
781
|
-
"get-live-stream-by-id": operations.GetLiveStreamByIdResponse$inboundSchema,
|
|
782
|
-
"get-live-stream-playback-id": operations.GetLiveStreamPlaybackIdResponse$inboundSchema,
|
|
783
|
-
"get-specific-simulcast-of-stream": operations.GetSpecificSimulcastOfStreamResponse$inboundSchema,
|
|
784
|
-
list_signing_keys: operations.ListSigningKeysResponse$inboundSchema,
|
|
785
|
-
"get-signing_key_by_id": operations.GetSigningKeyByIdResponse$inboundSchema,
|
|
786
|
-
list_video_views: operations.ListVideoViewsResponse$inboundSchema,
|
|
787
|
-
get_video_view_details: operations.GetVideoViewDetailsResponse$inboundSchema,
|
|
788
|
-
list_by_top_content: operations.ListByTopContentResponse$inboundSchema,
|
|
789
|
-
list_dimensions: operations.ListDimensionsResponse$inboundSchema,
|
|
790
|
-
list_filter_values_for_dimension: operations.ListFilterValuesForDimensionResponse$inboundSchema,
|
|
791
|
-
list_breakdown_values: operations.ListBreakdownValuesResponse$inboundSchema,
|
|
792
|
-
list_overall_values: operations.ListOverallValuesResponse$inboundSchema,
|
|
793
|
-
get_timeseries_data: operations.GetTimeseriesDataResponse$inboundSchema,
|
|
794
|
-
list_comparison_values: operations.ListComparisonValuesResponse$inboundSchema,
|
|
795
|
-
list_errors: operations.ListErrorsResponse$inboundSchema,
|
|
796
|
-
};
|
|
797
|
-
return map[operationId] || null;
|
|
798
|
-
}
|
|
799
|
-
|
|
800
|
-
function writeReport(results: EndpointResult[]) {
|
|
801
|
-
const total = results.length;
|
|
802
|
-
const passed = results.filter((r) => r.status === "PASS").length;
|
|
803
|
-
const failed = results.filter((r) => r.status === "FAIL").length;
|
|
804
|
-
const skipped = 0;
|
|
805
|
-
|
|
806
|
-
const reportPath = join(__dirname, "GET_ENDPOINTS_OPENAPI_RESPONSE_VALIDATION_REPORT.md");
|
|
807
|
-
const readmePath = join(__dirname, "README.md");
|
|
808
|
-
const generatedAt = new Date().toISOString();
|
|
809
|
-
|
|
810
|
-
const lines: string[] = [];
|
|
811
|
-
lines.push("# GET Endpoints — OpenAPI Response Validation Report");
|
|
812
|
-
lines.push("");
|
|
813
|
-
lines.push(`Generated: ${generatedAt}`);
|
|
814
|
-
lines.push("");
|
|
815
|
-
lines.push("## Summary");
|
|
816
|
-
lines.push("");
|
|
817
|
-
lines.push(`- **Total GET endpoints**: ${total}`);
|
|
818
|
-
lines.push(`- **PASS**: ${passed}`);
|
|
819
|
-
lines.push(`- **FAIL**: ${failed}`);
|
|
820
|
-
lines.push(`- **SKIP**: ${skipped}`);
|
|
821
|
-
lines.push("");
|
|
822
|
-
lines.push("## Consolidated report");
|
|
823
|
-
lines.push("");
|
|
824
|
-
lines.push("| Endpoint | OperationId | OpenAPI valid | SDK parse | Missing in SDK (present in API) | Missing in API (present in SDK) | Empty arrays omitted by SDK | Status |");
|
|
825
|
-
lines.push("|---|---|---:|---:|---|---|---|---|");
|
|
826
|
-
|
|
827
|
-
for (const r of results) {
|
|
828
|
-
const openapiCol = r.openapiValid ? "✅" : "❌";
|
|
829
|
-
const sdkCol = r.sdkParseOk ? "✅" : "❌";
|
|
830
|
-
const missSdk = r.missingInSDK.length ? r.missingInSDK.map((p) => `\`${p}\``).join(", ") : "None";
|
|
831
|
-
const missApi = r.missingInAPI.length ? r.missingInAPI.map((p) => `\`${p}\``).join(", ") : "None";
|
|
832
|
-
const emptyOmitted = r.emptyArraysOmittedInSDK.length ? r.emptyArraysOmittedInSDK.map((p) => `\`${p}\``).join(", ") : "None";
|
|
833
|
-
const status = r.status === "PASS" ? "✅ PASS" : "❌ FAIL";
|
|
834
|
-
lines.push(`| \`${r.endpoint}\` | \`${r.operationId}\` | ${openapiCol} | ${sdkCol} | ${missSdk} | ${missApi} | ${emptyOmitted} | ${status} |`);
|
|
835
|
-
}
|
|
836
|
-
|
|
837
|
-
lines.push("");
|
|
838
|
-
lines.push("## Per-endpoint details (full missing parameter lists)");
|
|
839
|
-
lines.push("");
|
|
840
|
-
|
|
841
|
-
for (const r of results) {
|
|
842
|
-
lines.push(`### ${r.operationId} (\`${r.endpoint}\`)`);
|
|
843
|
-
lines.push("");
|
|
844
|
-
lines.push(`- **Status**: ${r.status}`);
|
|
845
|
-
if (r.note) lines.push(`- **Note**: ${r.note}`);
|
|
846
|
-
lines.push(`- **OpenAPI valid**: ${r.openapiValid ? "yes" : "no"}`);
|
|
847
|
-
if (!r.openapiValid && r.openapiErrors.length) {
|
|
848
|
-
lines.push("- **OpenAPI errors**:");
|
|
849
|
-
for (const e of r.openapiErrors) {
|
|
850
|
-
const loc = e.path ? `\`${e.path}\`` : "";
|
|
851
|
-
const msg = e.message ?? "";
|
|
852
|
-
lines.push(` - ${loc} ${msg}`.trim());
|
|
853
|
-
}
|
|
854
|
-
}
|
|
855
|
-
lines.push(`- **SDK parse**: ${r.sdkParseOk ? "ok" : "failed"}`);
|
|
856
|
-
if (!r.sdkParseOk && r.sdkParseError) lines.push(`- **SDK parse error**: ${r.sdkParseError}`);
|
|
857
|
-
if (r.apiResponseFile) lines.push(`- **API response file**: \`${r.apiResponseFile}\``);
|
|
858
|
-
if (r.sdkResponseFile) lines.push(`- **SDK response file**: \`${r.sdkResponseFile}\``);
|
|
859
|
-
lines.push("");
|
|
860
|
-
|
|
861
|
-
if (r.apiResponsePreview) {
|
|
862
|
-
lines.push("**API response (preview)**");
|
|
863
|
-
lines.push("");
|
|
864
|
-
lines.push("```json");
|
|
865
|
-
lines.push(r.apiResponsePreview);
|
|
866
|
-
lines.push("```");
|
|
867
|
-
lines.push("");
|
|
868
|
-
}
|
|
869
|
-
|
|
870
|
-
if (r.sdkResponsePreview) {
|
|
871
|
-
lines.push("**SDK response (preview)**");
|
|
872
|
-
lines.push("");
|
|
873
|
-
lines.push("```json");
|
|
874
|
-
lines.push(r.sdkResponsePreview);
|
|
875
|
-
lines.push("```");
|
|
876
|
-
lines.push("");
|
|
877
|
-
}
|
|
878
|
-
|
|
879
|
-
lines.push(`**Missing in SDK (present in API) — ${r.missingInSDK.length}**`);
|
|
880
|
-
lines.push("");
|
|
881
|
-
if (r.missingInSDK.length === 0) lines.push("- None");
|
|
882
|
-
else for (const p of r.missingInSDK) lines.push(`- \`${p}\``);
|
|
883
|
-
lines.push("");
|
|
884
|
-
|
|
885
|
-
lines.push(`**Missing in API (present in SDK) — ${r.missingInAPI.length}**`);
|
|
886
|
-
lines.push("");
|
|
887
|
-
if (r.missingInAPI.length === 0) lines.push("- None");
|
|
888
|
-
else for (const p of r.missingInAPI) lines.push(`- \`${p}\``);
|
|
889
|
-
lines.push("");
|
|
890
|
-
|
|
891
|
-
lines.push(`**Empty arrays omitted by SDK — ${r.emptyArraysOmittedInSDK.length}**`);
|
|
892
|
-
lines.push("");
|
|
893
|
-
if (r.emptyArraysOmittedInSDK.length === 0) lines.push("- None");
|
|
894
|
-
else for (const p of r.emptyArraysOmittedInSDK) lines.push(`- \`${p}\``);
|
|
895
|
-
lines.push("");
|
|
896
|
-
|
|
897
|
-
lines.push(`**Empty arrays omitted by API — ${r.emptyArraysOmittedInAPI.length}**`);
|
|
898
|
-
lines.push("");
|
|
899
|
-
if (r.emptyArraysOmittedInAPI.length === 0) lines.push("- None");
|
|
900
|
-
else for (const p of r.emptyArraysOmittedInAPI) lines.push(`- \`${p}\``);
|
|
901
|
-
lines.push("");
|
|
902
|
-
}
|
|
903
|
-
|
|
904
|
-
writeFileSync(reportPath, lines.join("\n"));
|
|
905
|
-
writeFixSuggestions(results);
|
|
906
|
-
|
|
907
|
-
// Also update tests/README.md with the consolidated report section so it always stays in sync.
|
|
908
|
-
try {
|
|
909
|
-
if (existsSync(readmePath)) {
|
|
910
|
-
const begin = "<!-- BEGIN GET_ENDPOINTS_CONSOLIDATED -->";
|
|
911
|
-
const end = "<!-- END GET_ENDPOINTS_CONSOLIDATED -->";
|
|
912
|
-
|
|
913
|
-
const consolidated: string[] = [];
|
|
914
|
-
consolidated.push(`Last generated: ${generatedAt}`);
|
|
915
|
-
consolidated.push("");
|
|
916
|
-
consolidated.push(`- **Total GET endpoints**: ${total}`);
|
|
917
|
-
consolidated.push(`- **PASS**: ${passed}`);
|
|
918
|
-
consolidated.push(`- **FAIL**: ${failed}`);
|
|
919
|
-
consolidated.push(`- **SKIP**: ${skipped}`);
|
|
920
|
-
consolidated.push("");
|
|
921
|
-
consolidated.push("| Endpoint | OperationId | OpenAPI valid | SDK parse | Missing in SDK (present in API) | Missing in API (present in SDK) | Empty arrays omitted by SDK | Status |");
|
|
922
|
-
consolidated.push("|---|---|---:|---:|---|---|---|---|");
|
|
923
|
-
for (const r of results) {
|
|
924
|
-
const openapiCol = r.openapiValid ? "✅" : "❌";
|
|
925
|
-
const sdkCol = r.sdkParseOk ? "✅" : "❌";
|
|
926
|
-
const missSdk = r.missingInSDK.length ? r.missingInSDK.map((p) => `\`${p}\``).join(", ") : "None";
|
|
927
|
-
const missApi = r.missingInAPI.length ? r.missingInAPI.map((p) => `\`${p}\``).join(", ") : "None";
|
|
928
|
-
const emptyOmitted = r.emptyArraysOmittedInSDK.length ? r.emptyArraysOmittedInSDK.map((p) => `\`${p}\``).join(", ") : "None";
|
|
929
|
-
const status = r.status === "PASS" ? "✅ PASS" : "❌ FAIL";
|
|
930
|
-
consolidated.push(`| \`${r.endpoint}\` | \`${r.operationId}\` | ${openapiCol} | ${sdkCol} | ${missSdk} | ${missApi} | ${emptyOmitted} | ${status} |`);
|
|
931
|
-
}
|
|
932
|
-
consolidated.push("");
|
|
933
|
-
consolidated.push("#### Missing fields (full lists)");
|
|
934
|
-
consolidated.push("");
|
|
935
|
-
for (const r of results) {
|
|
936
|
-
consolidated.push(`- **${r.operationId}** (\`${r.endpoint}\`)`);
|
|
937
|
-
consolidated.push(` - **Missing in SDK (present in API)**: ${r.missingInSDK.length ? r.missingInSDK.map((p) => `\`${p}\``).join(", ") : "None"}`);
|
|
938
|
-
consolidated.push(` - **Missing in API (present in SDK)**: ${r.missingInAPI.length ? r.missingInAPI.map((p) => `\`${p}\``).join(", ") : "None"}`);
|
|
939
|
-
consolidated.push(` - **Empty arrays omitted by SDK**: ${r.emptyArraysOmittedInSDK.length ? r.emptyArraysOmittedInSDK.map((p) => `\`${p}\``).join(", ") : "None"}`);
|
|
940
|
-
consolidated.push(` - **Empty arrays omitted by API**: ${r.emptyArraysOmittedInAPI.length ? r.emptyArraysOmittedInAPI.map((p) => `\`${p}\``).join(", ") : "None"}`);
|
|
941
|
-
}
|
|
942
|
-
consolidated.push("");
|
|
943
|
-
consolidated.push(`Full details: \`tests/GET_ENDPOINTS_OPENAPI_RESPONSE_VALIDATION_REPORT.md\``);
|
|
944
|
-
|
|
945
|
-
const readme = readFileSync(readmePath, "utf-8");
|
|
946
|
-
if (readme.includes(begin) && readme.includes(end)) {
|
|
947
|
-
const block = `${begin}\n${consolidated.join("\n")}\n${end}`;
|
|
948
|
-
const updated = readme.replace(new RegExp(`${begin}[\\s\\S]*?${end}`), block);
|
|
949
|
-
writeFileSync(readmePath, updated);
|
|
950
|
-
}
|
|
951
|
-
}
|
|
952
|
-
} catch {
|
|
953
|
-
// ignore README update failures
|
|
954
|
-
}
|
|
955
|
-
|
|
956
|
-
// eslint-disable-next-line no-console
|
|
957
|
-
console.log(`Report generated: ${reportPath}`);
|
|
958
|
-
// eslint-disable-next-line no-console
|
|
959
|
-
console.log(`Fix suggestions generated: ${join(__dirname, FIX_SUGGESTIONS_MD)}`);
|
|
960
|
-
// eslint-disable-next-line no-console
|
|
961
|
-
console.log(`Summary: total=${total} pass=${passed} fail=${failed} skip=${skipped}`);
|
|
962
|
-
}
|
|
963
|
-
|
|
964
|
-
async function main(): Promise<void> {
|
|
965
|
-
const spec = loadOpenAPISpec();
|
|
966
|
-
const endpoints = extractGetEndpoints(spec);
|
|
967
|
-
const fixtures = readFixtures();
|
|
968
|
-
|
|
969
|
-
const baseUrl: string =
|
|
970
|
-
process.env.FASTPIX_BASE_URL
|
|
971
|
-
?? ((spec.servers?.[0]?.url as string | undefined) ?? "https://api.fastpix.com/v1/");
|
|
972
|
-
|
|
973
|
-
const username = "1b92c0d6-5548-4642-b13e-4bb7d77dbaf4";
|
|
974
|
-
const password = "ff32012b-ec02-40ca-b0d4-711d81537e73";
|
|
975
|
-
|
|
976
|
-
if (!username || !password) {
|
|
977
|
-
throw new Error("Missing FASTPIX_USERNAME / FASTPIX_PASSWORD env vars (BasicAuth)");
|
|
978
|
-
}
|
|
979
|
-
|
|
980
|
-
const sdkClient = new Fastpix({
|
|
981
|
-
security: { username, password },
|
|
982
|
-
serverURL: baseUrl,
|
|
983
|
-
});
|
|
984
|
-
|
|
985
|
-
const results: EndpointResult[] = [];
|
|
986
|
-
const totalEndpoints = endpoints.length;
|
|
987
|
-
|
|
988
|
-
for (let i = 0; i < endpoints.length; i++) {
|
|
989
|
-
const ep = endpoints[i];
|
|
990
|
-
// eslint-disable-next-line no-console
|
|
991
|
-
console.log(`[${i + 1}/${totalEndpoints}] Processing: ${ep.operationId} (${ep.path})`);
|
|
992
|
-
|
|
993
|
-
try {
|
|
994
|
-
const { url, note } = buildUrl(baseUrl, ep, fixtures);
|
|
995
|
-
|
|
996
|
-
let httpStatus = 0;
|
|
997
|
-
let rawBody: any = null;
|
|
998
|
-
let requestError: string | undefined;
|
|
999
|
-
try {
|
|
1000
|
-
// Add timeout to prevent hanging
|
|
1001
|
-
const controller = new AbortController();
|
|
1002
|
-
const timeoutId = setTimeout(() => controller.abort(), 30000); // 30 second timeout
|
|
1003
|
-
|
|
1004
|
-
const res = await fetch(url, {
|
|
1005
|
-
method: "GET",
|
|
1006
|
-
headers: {
|
|
1007
|
-
Accept: "application/json",
|
|
1008
|
-
Authorization: basicAuthHeader(username, password),
|
|
1009
|
-
},
|
|
1010
|
-
signal: controller.signal,
|
|
1011
|
-
});
|
|
1012
|
-
|
|
1013
|
-
clearTimeout(timeoutId);
|
|
1014
|
-
|
|
1015
|
-
httpStatus = res.status;
|
|
1016
|
-
const bodyText = await res.text();
|
|
1017
|
-
try {
|
|
1018
|
-
rawBody = bodyText ? JSON.parse(bodyText) : null;
|
|
1019
|
-
} catch {
|
|
1020
|
-
rawBody = bodyText;
|
|
1021
|
-
}
|
|
1022
|
-
} catch (e: any) {
|
|
1023
|
-
if (e.name === 'AbortError') {
|
|
1024
|
-
requestError = "Request timeout (30s)";
|
|
1025
|
-
} else {
|
|
1026
|
-
requestError = e?.message ?? String(e);
|
|
1027
|
-
}
|
|
1028
|
-
// eslint-disable-next-line no-console
|
|
1029
|
-
console.error(` ⚠️ API request failed: ${requestError}`);
|
|
1030
|
-
}
|
|
1031
|
-
|
|
1032
|
-
const validator = makeOpenAPIResponseValidator(spec, ep);
|
|
1033
|
-
let openapiValid = true;
|
|
1034
|
-
let openapiErrors: any[] = [];
|
|
1035
|
-
if (requestError) {
|
|
1036
|
-
openapiValid = false;
|
|
1037
|
-
openapiErrors = [{ message: `Request failed: ${requestError}` }];
|
|
1038
|
-
} else if (validator) {
|
|
1039
|
-
const err = validator.validateResponse(String(httpStatus), rawBody);
|
|
1040
|
-
if (err) {
|
|
1041
|
-
openapiValid = false;
|
|
1042
|
-
openapiErrors = err.errors || [];
|
|
1043
|
-
}
|
|
1044
|
-
}
|
|
1045
|
-
|
|
1046
|
-
// SDK output: call SDK and capture success result or thrown error (normalized).
|
|
1047
|
-
const invoker = getSDKInvoker(ep.operationId);
|
|
1048
|
-
const sdkReq = buildSDKRequest(ep, fixtures);
|
|
1049
|
-
let sdkParseOk = true;
|
|
1050
|
-
let sdkParseError: string | undefined;
|
|
1051
|
-
let sdkPrinted: any = null;
|
|
1052
|
-
let sdkValueForDiff: any = null;
|
|
1053
|
-
|
|
1054
|
-
if (!invoker) {
|
|
1055
|
-
sdkParseOk = false;
|
|
1056
|
-
sdkParseError = "No SDK method mapping for this operationId";
|
|
1057
|
-
sdkPrinted = { name: "SDKMappingError", message: sdkParseError };
|
|
1058
|
-
} else {
|
|
1059
|
-
try {
|
|
1060
|
-
// Add timeout wrapper for SDK calls
|
|
1061
|
-
const sdkCallPromise = invoker(sdkClient, sdkReq);
|
|
1062
|
-
const timeoutPromise = new Promise((_, reject) =>
|
|
1063
|
-
setTimeout(() => reject(new Error("SDK call timeout (30s)")), 30000)
|
|
1064
|
-
);
|
|
1065
|
-
|
|
1066
|
-
const sdkRes = await Promise.race([sdkCallPromise, timeoutPromise]);
|
|
1067
|
-
sdkValueForDiff = sdkRes;
|
|
1068
|
-
sdkPrinted = sdkRes;
|
|
1069
|
-
} catch (e: any) {
|
|
1070
|
-
sdkParseOk = false;
|
|
1071
|
-
sdkParseError = e?.message ?? String(e);
|
|
1072
|
-
sdkPrinted = normalizeSdkError(e);
|
|
1073
|
-
// eslint-disable-next-line no-console
|
|
1074
|
-
console.error(` ⚠️ SDK call failed: ${sdkParseError}`);
|
|
1075
|
-
}
|
|
1076
|
-
}
|
|
1077
|
-
|
|
1078
|
-
// Parse raw API JSON through SDK inbound schema (when available) for diff comparisons.
|
|
1079
|
-
const inboundSchema = getSDKInboundSchemaForOperation(ep.operationId);
|
|
1080
|
-
let sdkParsedFromRaw: any | null = null;
|
|
1081
|
-
if (inboundSchema && rawBody && typeof rawBody === "object") {
|
|
1082
|
-
try {
|
|
1083
|
-
sdkParsedFromRaw = inboundSchema.parse(rawBody);
|
|
1084
|
-
} catch {
|
|
1085
|
-
// If inbound parsing fails, we still proceed with diffing the actual SDK call result.
|
|
1086
|
-
}
|
|
1087
|
-
}
|
|
1088
|
-
|
|
1089
|
-
const apiNormalized = normalizeJsonForComparison(rawBody);
|
|
1090
|
-
const sdkJsonLike =
|
|
1091
|
-
(sdkParsedFromRaw && typeof sdkParsedFromRaw === "object")
|
|
1092
|
-
? jsonRoundTrip(sdkParsedFromRaw)
|
|
1093
|
-
: (sdkValueForDiff && typeof sdkValueForDiff === "object")
|
|
1094
|
-
? jsonRoundTrip(sdkValueForDiff)
|
|
1095
|
-
: null;
|
|
1096
|
-
const sdkNormalized = sdkJsonLike ? normalizeJsonForComparison(sdkJsonLike) : null;
|
|
1097
|
-
|
|
1098
|
-
// Treat `[]` the same as "missing" for comparison.
|
|
1099
|
-
const apiPaths = collectJsonPaths(apiNormalized, "", { includeEmptyArrays: false });
|
|
1100
|
-
const sdkPaths = sdkNormalized ? collectJsonPaths(sdkNormalized, "", { includeEmptyArrays: false }) : new Set<string>();
|
|
1101
|
-
|
|
1102
|
-
const missingInSDK = sdkPaths.size
|
|
1103
|
-
? sortUnique([...apiPaths].filter((p) => !sdkPaths.has(p)))
|
|
1104
|
-
: [];
|
|
1105
|
-
const missingInAPI = sdkPaths.size
|
|
1106
|
-
? sortUnique([...sdkPaths].filter((p) => !apiPaths.has(p)))
|
|
1107
|
-
: [];
|
|
1108
|
-
|
|
1109
|
-
const apiStrictPaths = collectJsonPaths(apiNormalized, "", { includeEmptyArrays: true });
|
|
1110
|
-
const sdkStrictPaths = sdkNormalized ? collectJsonPaths(sdkNormalized, "", { includeEmptyArrays: true }) : new Set<string>();
|
|
1111
|
-
const apiEmptyArrayFields = collectEmptyArrayFieldPaths(apiNormalized);
|
|
1112
|
-
const sdkEmptyArrayFields = sdkNormalized ? collectEmptyArrayFieldPaths(sdkNormalized) : new Set<string>();
|
|
1113
|
-
|
|
1114
|
-
const emptyArraysOmittedInSDK = sortUnique([...apiEmptyArrayFields].filter((p) => !sdkStrictPaths.has(p)));
|
|
1115
|
-
const emptyArraysOmittedInAPI = sortUnique([...sdkEmptyArrayFields].filter((p) => !apiStrictPaths.has(p)));
|
|
1116
|
-
|
|
1117
|
-
const pass = openapiValid && sdkParseOk && missingInSDK.length === 0 && missingInAPI.length === 0;
|
|
1118
|
-
|
|
1119
|
-
const artifacts = writeArtifactFiles(
|
|
1120
|
-
ep.operationId,
|
|
1121
|
-
rawBody,
|
|
1122
|
-
sdkPrinted,
|
|
1123
|
-
);
|
|
1124
|
-
|
|
1125
|
-
results.push({
|
|
1126
|
-
endpoint: ep.path,
|
|
1127
|
-
operationId: ep.operationId,
|
|
1128
|
-
method: "GET",
|
|
1129
|
-
openapiValid,
|
|
1130
|
-
openapiErrors,
|
|
1131
|
-
sdkParseOk,
|
|
1132
|
-
sdkParseError,
|
|
1133
|
-
missingInSDK,
|
|
1134
|
-
missingInAPI,
|
|
1135
|
-
emptyArraysOmittedInSDK,
|
|
1136
|
-
emptyArraysOmittedInAPI,
|
|
1137
|
-
apiResponseFile: artifacts.apiPath,
|
|
1138
|
-
sdkResponseFile: artifacts.sdkPath,
|
|
1139
|
-
apiResponsePreview: artifacts.apiPreview,
|
|
1140
|
-
sdkResponsePreview: artifacts.sdkPreview,
|
|
1141
|
-
status: pass ? "PASS" : "FAIL",
|
|
1142
|
-
note,
|
|
1143
|
-
fixSuggestions: undefined,
|
|
1144
|
-
});
|
|
1145
|
-
|
|
1146
|
-
// eslint-disable-next-line no-console
|
|
1147
|
-
console.log(` ✓ Completed: ${ep.operationId} - ${results[results.length - 1].status}`);
|
|
1148
|
-
} catch (error: any) {
|
|
1149
|
-
// Catch any unexpected errors and continue with next endpoint
|
|
1150
|
-
// eslint-disable-next-line no-console
|
|
1151
|
-
console.error(` ✗ Unexpected error processing ${ep.operationId}:`, error?.message ?? String(error));
|
|
1152
|
-
results.push({
|
|
1153
|
-
endpoint: ep.path,
|
|
1154
|
-
operationId: ep.operationId,
|
|
1155
|
-
method: "GET",
|
|
1156
|
-
openapiValid: false,
|
|
1157
|
-
openapiErrors: [{ message: `Unexpected error: ${error?.message ?? String(error)}` }],
|
|
1158
|
-
sdkParseOk: false,
|
|
1159
|
-
sdkParseError: error?.message ?? String(error),
|
|
1160
|
-
missingInSDK: [],
|
|
1161
|
-
missingInAPI: [],
|
|
1162
|
-
emptyArraysOmittedInSDK: [],
|
|
1163
|
-
emptyArraysOmittedInAPI: [],
|
|
1164
|
-
status: "FAIL",
|
|
1165
|
-
note: "Unexpected error during processing",
|
|
1166
|
-
fixSuggestions: undefined,
|
|
1167
|
-
});
|
|
1168
|
-
}
|
|
1169
|
-
}
|
|
1170
|
-
|
|
1171
|
-
for (const r of results) {
|
|
1172
|
-
if (r.status !== "FAIL") continue;
|
|
1173
|
-
r.fixSuggestions = generateFixSuggestions(r);
|
|
1174
|
-
}
|
|
1175
|
-
|
|
1176
|
-
writeReport(results);
|
|
1177
|
-
}
|
|
1178
|
-
|
|
1179
|
-
await main();
|
|
1180
|
-
|