@schedulin/sdk 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +303 -0
- package/cjs/BaseClient.d.ts +42 -0
- package/cjs/BaseClient.js +74 -0
- package/cjs/Client.d.ts +35 -0
- package/cjs/Client.js +98 -0
- package/cjs/api/errors/InternalServerError.d.ts +6 -0
- package/cjs/api/errors/InternalServerError.js +54 -0
- package/cjs/api/errors/UnauthorizedError.d.ts +6 -0
- package/cjs/api/errors/UnauthorizedError.js +54 -0
- package/cjs/api/errors/index.d.ts +2 -0
- package/cjs/api/errors/index.js +18 -0
- package/cjs/api/index.d.ts +3 -0
- package/cjs/api/index.js +19 -0
- package/cjs/api/resources/index.d.ts +12 -0
- package/cjs/api/resources/index.js +51 -0
- package/cjs/api/resources/media/client/Client.d.ts +107 -0
- package/cjs/api/resources/media/client/Client.js +411 -0
- package/cjs/api/resources/media/client/index.d.ts +1 -0
- package/cjs/api/resources/media/client/index.js +17 -0
- package/cjs/api/resources/media/client/requests/CreatePresignedPost.d.ts +21 -0
- package/cjs/api/resources/media/client/requests/CreatePresignedPost.js +12 -0
- package/cjs/api/resources/media/client/requests/ListMediaRequest.d.ts +13 -0
- package/cjs/api/resources/media/client/requests/ListMediaRequest.js +3 -0
- package/cjs/api/resources/media/client/requests/RetrieveMediaRequest.d.ts +9 -0
- package/cjs/api/resources/media/client/requests/RetrieveMediaRequest.js +3 -0
- package/cjs/api/resources/media/client/requests/SetTagsMediaRequest.d.ts +11 -0
- package/cjs/api/resources/media/client/requests/SetTagsMediaRequest.js +3 -0
- package/cjs/api/resources/media/client/requests/UpdateMediaRequest.d.ts +16 -0
- package/cjs/api/resources/media/client/requests/UpdateMediaRequest.js +3 -0
- package/cjs/api/resources/media/client/requests/index.d.ts +5 -0
- package/cjs/api/resources/media/client/requests/index.js +5 -0
- package/cjs/api/resources/media/exports.d.ts +2 -0
- package/cjs/api/resources/media/exports.js +21 -0
- package/cjs/api/resources/media/index.d.ts +2 -0
- package/cjs/api/resources/media/index.js +18 -0
- package/cjs/api/resources/media/types/CountByTagMediaResponse.d.ts +12 -0
- package/cjs/api/resources/media/types/CountByTagMediaResponse.js +3 -0
- package/cjs/api/resources/media/types/ListMediaRequestCursor.d.ts +4 -0
- package/cjs/api/resources/media/types/ListMediaRequestCursor.js +3 -0
- package/cjs/api/resources/media/types/ListMediaRequestTagMode.d.ts +5 -0
- package/cjs/api/resources/media/types/ListMediaRequestTagMode.js +8 -0
- package/cjs/api/resources/media/types/ListMediaRequestType.d.ts +6 -0
- package/cjs/api/resources/media/types/ListMediaRequestType.js +9 -0
- package/cjs/api/resources/media/types/index.d.ts +4 -0
- package/cjs/api/resources/media/types/index.js +20 -0
- package/cjs/api/resources/posts/client/Client.d.ts +187 -0
- package/cjs/api/resources/posts/client/Client.js +710 -0
- package/cjs/api/resources/posts/client/index.d.ts +1 -0
- package/cjs/api/resources/posts/client/index.js +17 -0
- package/cjs/api/resources/posts/client/requests/AnalyticsSeriesPostsRequest.d.ts +10 -0
- package/cjs/api/resources/posts/client/requests/AnalyticsSeriesPostsRequest.js +3 -0
- package/cjs/api/resources/posts/client/requests/AnalyticsSummaryPostsRequest.d.ts +9 -0
- package/cjs/api/resources/posts/client/requests/AnalyticsSummaryPostsRequest.js +3 -0
- package/cjs/api/resources/posts/client/requests/DeletePostsRequest.d.ts +9 -0
- package/cjs/api/resources/posts/client/requests/DeletePostsRequest.js +3 -0
- package/cjs/api/resources/posts/client/requests/GetJobStatusPostsRequest.d.ts +9 -0
- package/cjs/api/resources/posts/client/requests/GetJobStatusPostsRequest.js +3 -0
- package/cjs/api/resources/posts/client/requests/ListPostsRequest.d.ts +15 -0
- package/cjs/api/resources/posts/client/requests/ListPostsRequest.js +3 -0
- package/cjs/api/resources/posts/client/requests/PostCreate.d.ts +183 -0
- package/cjs/api/resources/posts/client/requests/PostCreate.js +103 -0
- package/cjs/api/resources/posts/client/requests/PublishDraftPostsRequest.d.ts +10 -0
- package/cjs/api/resources/posts/client/requests/PublishDraftPostsRequest.js +3 -0
- package/cjs/api/resources/posts/client/requests/RetrievePostsRequest.d.ts +9 -0
- package/cjs/api/resources/posts/client/requests/RetrievePostsRequest.js +3 -0
- package/cjs/api/resources/posts/client/requests/UpdatePostsRequest.d.ts +36 -0
- package/cjs/api/resources/posts/client/requests/UpdatePostsRequest.js +14 -0
- package/cjs/api/resources/posts/client/requests/UpdateTagsPostsRequest.d.ts +11 -0
- package/cjs/api/resources/posts/client/requests/UpdateTagsPostsRequest.js +3 -0
- package/cjs/api/resources/posts/client/requests/V0PostCountByTabRequest.d.ts +7 -0
- package/cjs/api/resources/posts/client/requests/V0PostCountByTabRequest.js +3 -0
- package/cjs/api/resources/posts/client/requests/index.d.ts +11 -0
- package/cjs/api/resources/posts/client/requests/index.js +7 -0
- package/cjs/api/resources/posts/exports.d.ts +2 -0
- package/cjs/api/resources/posts/exports.js +21 -0
- package/cjs/api/resources/posts/index.d.ts +2 -0
- package/cjs/api/resources/posts/index.js +18 -0
- package/cjs/api/resources/posts/types/AnalyticsSeriesPostsResponse.d.ts +15 -0
- package/cjs/api/resources/posts/types/AnalyticsSeriesPostsResponse.js +3 -0
- package/cjs/api/resources/posts/types/AnalyticsSummaryPostsResponse.d.ts +6 -0
- package/cjs/api/resources/posts/types/AnalyticsSummaryPostsResponse.js +3 -0
- package/cjs/api/resources/posts/types/CreatePostsResponse.d.ts +59 -0
- package/cjs/api/resources/posts/types/CreatePostsResponse.js +36 -0
- package/cjs/api/resources/posts/types/ListPostsRequestApprovalStatus.d.ts +7 -0
- package/cjs/api/resources/posts/types/ListPostsRequestApprovalStatus.js +10 -0
- package/cjs/api/resources/posts/types/ListPostsRequestStatus.d.ts +8 -0
- package/cjs/api/resources/posts/types/ListPostsRequestStatus.js +11 -0
- package/cjs/api/resources/posts/types/ListPostsRequestTagMode.d.ts +5 -0
- package/cjs/api/resources/posts/types/ListPostsRequestTagMode.js +8 -0
- package/cjs/api/resources/posts/types/ListPostsResponse.d.ts +7 -0
- package/cjs/api/resources/posts/types/ListPostsResponse.js +3 -0
- package/cjs/api/resources/posts/types/index.d.ts +7 -0
- package/cjs/api/resources/posts/types/index.js +23 -0
- package/cjs/api/resources/socialAccounts/client/Client.d.ts +107 -0
- package/cjs/api/resources/socialAccounts/client/Client.js +415 -0
- package/cjs/api/resources/socialAccounts/client/index.d.ts +1 -0
- package/cjs/api/resources/socialAccounts/client/index.js +17 -0
- package/cjs/api/resources/socialAccounts/client/requests/DeleteSocialAccountsRequest.d.ts +9 -0
- package/cjs/api/resources/socialAccounts/client/requests/DeleteSocialAccountsRequest.js +3 -0
- package/cjs/api/resources/socialAccounts/client/requests/PinterestBoardsSocialAccountsRequest.d.ts +9 -0
- package/cjs/api/resources/socialAccounts/client/requests/PinterestBoardsSocialAccountsRequest.js +3 -0
- package/cjs/api/resources/socialAccounts/client/requests/TiktokCreatorInfoSocialAccountsRequest.d.ts +9 -0
- package/cjs/api/resources/socialAccounts/client/requests/TiktokCreatorInfoSocialAccountsRequest.js +3 -0
- package/cjs/api/resources/socialAccounts/client/requests/UpdateSocialAccountsRequest.d.ts +17 -0
- package/cjs/api/resources/socialAccounts/client/requests/UpdateSocialAccountsRequest.js +11 -0
- package/cjs/api/resources/socialAccounts/client/requests/UpdateTimezoneSocialAccountsRequest.d.ts +11 -0
- package/cjs/api/resources/socialAccounts/client/requests/UpdateTimezoneSocialAccountsRequest.js +3 -0
- package/cjs/api/resources/socialAccounts/client/requests/index.d.ts +5 -0
- package/cjs/api/resources/socialAccounts/client/requests/index.js +5 -0
- package/cjs/api/resources/socialAccounts/exports.d.ts +2 -0
- package/cjs/api/resources/socialAccounts/exports.js +21 -0
- package/cjs/api/resources/socialAccounts/index.d.ts +2 -0
- package/cjs/api/resources/socialAccounts/index.js +18 -0
- package/cjs/api/resources/socialAccounts/types/DeleteSocialAccountsResponse.d.ts +3 -0
- package/cjs/api/resources/socialAccounts/types/DeleteSocialAccountsResponse.js +3 -0
- package/cjs/api/resources/socialAccounts/types/ListSocialAccountsResponse.d.ts +41 -0
- package/cjs/api/resources/socialAccounts/types/ListSocialAccountsResponse.js +30 -0
- package/cjs/api/resources/socialAccounts/types/PinterestBoardsSocialAccountsResponse.d.ts +21 -0
- package/cjs/api/resources/socialAccounts/types/PinterestBoardsSocialAccountsResponse.js +18 -0
- package/cjs/api/resources/socialAccounts/types/TiktokCreatorInfoSocialAccountsResponse.d.ts +21 -0
- package/cjs/api/resources/socialAccounts/types/TiktokCreatorInfoSocialAccountsResponse.js +3 -0
- package/cjs/api/resources/socialAccounts/types/UpdateSocialAccountsResponse.d.ts +3 -0
- package/cjs/api/resources/socialAccounts/types/UpdateSocialAccountsResponse.js +3 -0
- package/cjs/api/resources/socialAccounts/types/UpdateTimezoneSocialAccountsResponse.d.ts +3 -0
- package/cjs/api/resources/socialAccounts/types/UpdateTimezoneSocialAccountsResponse.js +3 -0
- package/cjs/api/resources/socialAccounts/types/index.d.ts +6 -0
- package/cjs/api/resources/socialAccounts/types/index.js +22 -0
- package/cjs/api/resources/tags/client/Client.d.ts +78 -0
- package/cjs/api/resources/tags/client/Client.js +303 -0
- package/cjs/api/resources/tags/client/index.d.ts +1 -0
- package/cjs/api/resources/tags/client/index.js +17 -0
- package/cjs/api/resources/tags/client/requests/CreateTagsRequest.d.ts +11 -0
- package/cjs/api/resources/tags/client/requests/CreateTagsRequest.js +3 -0
- package/cjs/api/resources/tags/client/requests/DeleteTagsRequest.d.ts +9 -0
- package/cjs/api/resources/tags/client/requests/DeleteTagsRequest.js +3 -0
- package/cjs/api/resources/tags/client/requests/ListTagsRequest.d.ts +8 -0
- package/cjs/api/resources/tags/client/requests/ListTagsRequest.js +3 -0
- package/cjs/api/resources/tags/client/requests/UpdateTagsRequest.d.ts +13 -0
- package/cjs/api/resources/tags/client/requests/UpdateTagsRequest.js +3 -0
- package/cjs/api/resources/tags/client/requests/index.d.ts +4 -0
- package/cjs/api/resources/tags/client/requests/index.js +2 -0
- package/cjs/api/resources/tags/exports.d.ts +2 -0
- package/cjs/api/resources/tags/exports.js +21 -0
- package/cjs/api/resources/tags/index.d.ts +2 -0
- package/cjs/api/resources/tags/index.js +18 -0
- package/cjs/api/resources/tags/types/ListTagsResponse.d.ts +4 -0
- package/cjs/api/resources/tags/types/ListTagsResponse.js +3 -0
- package/cjs/api/resources/tags/types/index.d.ts +1 -0
- package/cjs/api/resources/tags/types/index.js +17 -0
- package/cjs/api/types/AnalyticsStatus.d.ts +6 -0
- package/cjs/api/types/AnalyticsStatus.js +9 -0
- package/cjs/api/types/ErrorResponse.d.ts +10 -0
- package/cjs/api/types/ErrorResponse.js +3 -0
- package/cjs/api/types/ImageProcessingStatus.d.ts +7 -0
- package/cjs/api/types/ImageProcessingStatus.js +10 -0
- package/cjs/api/types/ListPostsRequestScheduledAt.d.ts +4 -0
- package/cjs/api/types/ListPostsRequestScheduledAt.js +3 -0
- package/cjs/api/types/Media.d.ts +14 -0
- package/cjs/api/types/Media.js +3 -0
- package/cjs/api/types/MediaSearch.d.ts +25 -0
- package/cjs/api/types/MediaSearch.js +16 -0
- package/cjs/api/types/MediaSetTags.d.ts +4 -0
- package/cjs/api/types/MediaSetTags.js +3 -0
- package/cjs/api/types/MediaUpdate.d.ts +9 -0
- package/cjs/api/types/MediaUpdate.js +3 -0
- package/cjs/api/types/OauthScope.d.ts +36 -0
- package/cjs/api/types/OauthScope.js +39 -0
- package/cjs/api/types/Post.d.ts +19 -0
- package/cjs/api/types/Post.js +3 -0
- package/cjs/api/types/PostApprovalStatus.d.ts +7 -0
- package/cjs/api/types/PostApprovalStatus.js +10 -0
- package/cjs/api/types/PostPublishDraft.d.ts +4 -0
- package/cjs/api/types/PostPublishDraft.js +3 -0
- package/cjs/api/types/PostSearch.d.ts +36 -0
- package/cjs/api/types/PostSearch.js +24 -0
- package/cjs/api/types/PostStatus.d.ts +8 -0
- package/cjs/api/types/PostStatus.js +11 -0
- package/cjs/api/types/PostWithRelations.d.ts +68 -0
- package/cjs/api/types/PostWithRelations.js +36 -0
- package/cjs/api/types/PresignedPost.d.ts +11 -0
- package/cjs/api/types/PresignedPost.js +10 -0
- package/cjs/api/types/SocialAccount.d.ts +20 -0
- package/cjs/api/types/SocialAccount.js +11 -0
- package/cjs/api/types/SocialAccountDisconnectedReason.d.ts +9 -0
- package/cjs/api/types/SocialAccountDisconnectedReason.js +12 -0
- package/cjs/api/types/SocialAccountPublic.d.ts +17 -0
- package/cjs/api/types/SocialAccountPublic.js +11 -0
- package/cjs/api/types/SocialAccountUpdate.d.ts +11 -0
- package/cjs/api/types/SocialAccountUpdate.js +11 -0
- package/cjs/api/types/SocialPlatform.d.ts +14 -0
- package/cjs/api/types/SocialPlatform.js +17 -0
- package/cjs/api/types/Tag.d.ts +7 -0
- package/cjs/api/types/Tag.js +3 -0
- package/cjs/api/types/TagSearch.d.ts +4 -0
- package/cjs/api/types/TagSearch.js +3 -0
- package/cjs/api/types/TagUpsert.d.ts +5 -0
- package/cjs/api/types/TagUpsert.js +3 -0
- package/cjs/api/types/index.d.ts +24 -0
- package/cjs/api/types/index.js +40 -0
- package/cjs/auth/HeaderAuthProvider.d.ts +20 -0
- package/cjs/auth/HeaderAuthProvider.js +80 -0
- package/cjs/auth/index.d.ts +1 -0
- package/cjs/auth/index.js +5 -0
- package/cjs/core/auth/AuthProvider.d.ts +8 -0
- package/cjs/core/auth/AuthProvider.js +9 -0
- package/cjs/core/auth/AuthRequest.d.ts +9 -0
- package/cjs/core/auth/AuthRequest.js +2 -0
- package/cjs/core/auth/BasicAuth.d.ts +8 -0
- package/cjs/core/auth/BasicAuth.js +33 -0
- package/cjs/core/auth/BearerToken.d.ts +7 -0
- package/cjs/core/auth/BearerToken.js +16 -0
- package/cjs/core/auth/NoOpAuthProvider.d.ts +5 -0
- package/cjs/core/auth/NoOpAuthProvider.js +9 -0
- package/cjs/core/auth/index.d.ts +5 -0
- package/cjs/core/auth/index.js +11 -0
- package/cjs/core/base64.d.ts +2 -0
- package/cjs/core/base64.js +26 -0
- package/cjs/core/exports.d.ts +1 -0
- package/cjs/core/exports.js +17 -0
- package/cjs/core/fetcher/APIResponse.d.ts +20 -0
- package/cjs/core/fetcher/APIResponse.js +2 -0
- package/cjs/core/fetcher/BinaryResponse.d.ts +19 -0
- package/cjs/core/fetcher/BinaryResponse.js +17 -0
- package/cjs/core/fetcher/EndpointMetadata.d.ts +13 -0
- package/cjs/core/fetcher/EndpointMetadata.js +2 -0
- package/cjs/core/fetcher/EndpointSupplier.d.ts +12 -0
- package/cjs/core/fetcher/EndpointSupplier.js +22 -0
- package/cjs/core/fetcher/Fetcher.d.ts +56 -0
- package/cjs/core/fetcher/Fetcher.js +327 -0
- package/cjs/core/fetcher/Headers.d.ts +2 -0
- package/cjs/core/fetcher/Headers.js +84 -0
- package/cjs/core/fetcher/HttpResponsePromise.d.ts +58 -0
- package/cjs/core/fetcher/HttpResponsePromise.js +103 -0
- package/cjs/core/fetcher/RawResponse.d.ts +29 -0
- package/cjs/core/fetcher/RawResponse.js +44 -0
- package/cjs/core/fetcher/Supplier.d.ts +4 -0
- package/cjs/core/fetcher/Supplier.js +22 -0
- package/cjs/core/fetcher/createRequestUrl.d.ts +1 -0
- package/cjs/core/fetcher/createRequestUrl.js +8 -0
- package/cjs/core/fetcher/getErrorResponseBody.d.ts +1 -0
- package/cjs/core/fetcher/getErrorResponseBody.js +45 -0
- package/cjs/core/fetcher/getFetchFn.d.ts +1 -0
- package/cjs/core/fetcher/getFetchFn.js +17 -0
- package/cjs/core/fetcher/getHeader.d.ts +1 -0
- package/cjs/core/fetcher/getHeader.js +11 -0
- package/cjs/core/fetcher/getRequestBody.d.ts +7 -0
- package/cjs/core/fetcher/getRequestBody.js +27 -0
- package/cjs/core/fetcher/getResponseBody.d.ts +1 -0
- package/cjs/core/fetcher/getResponseBody.js +80 -0
- package/cjs/core/fetcher/index.d.ts +13 -0
- package/cjs/core/fetcher/index.js +19 -0
- package/cjs/core/fetcher/makePassthroughRequest.d.ts +49 -0
- package/cjs/core/fetcher/makePassthroughRequest.js +135 -0
- package/cjs/core/fetcher/makeRequest.d.ts +6 -0
- package/cjs/core/fetcher/makeRequest.js +61 -0
- package/cjs/core/fetcher/requestWithRetries.d.ts +1 -0
- package/cjs/core/fetcher/requestWithRetries.js +70 -0
- package/cjs/core/fetcher/signals.d.ts +5 -0
- package/cjs/core/fetcher/signals.js +32 -0
- package/cjs/core/headers.d.ts +2 -0
- package/cjs/core/headers.js +31 -0
- package/cjs/core/index.d.ts +6 -0
- package/cjs/core/index.js +45 -0
- package/cjs/core/json.d.ts +15 -0
- package/cjs/core/json.js +24 -0
- package/cjs/core/logging/exports.d.ts +18 -0
- package/cjs/core/logging/exports.js +45 -0
- package/cjs/core/logging/index.d.ts +1 -0
- package/cjs/core/logging/index.js +17 -0
- package/cjs/core/logging/logger.d.ts +126 -0
- package/cjs/core/logging/logger.js +144 -0
- package/cjs/core/runtime/index.d.ts +1 -0
- package/cjs/core/runtime/index.js +5 -0
- package/cjs/core/runtime/runtime.d.ts +9 -0
- package/cjs/core/runtime/runtime.js +104 -0
- package/cjs/core/url/QueryStringBuilder.d.ts +47 -0
- package/cjs/core/url/QueryStringBuilder.js +83 -0
- package/cjs/core/url/encodePathParam.d.ts +1 -0
- package/cjs/core/url/encodePathParam.js +21 -0
- package/cjs/core/url/index.d.ts +4 -0
- package/cjs/core/url/index.js +11 -0
- package/cjs/core/url/join.d.ts +1 -0
- package/cjs/core/url/join.js +68 -0
- package/cjs/core/url/qs.d.ts +7 -0
- package/cjs/core/url/qs.js +76 -0
- package/cjs/environments.d.ts +4 -0
- package/cjs/environments.js +7 -0
- package/cjs/errors/SchedulinError.d.ts +14 -0
- package/cjs/errors/SchedulinError.js +35 -0
- package/cjs/errors/SchedulinTimeoutError.d.ts +6 -0
- package/cjs/errors/SchedulinTimeoutError.js +18 -0
- package/cjs/errors/handleNonStatusCodeError.d.ts +2 -0
- package/cjs/errors/handleNonStatusCodeError.js +68 -0
- package/cjs/errors/index.d.ts +2 -0
- package/cjs/errors/index.js +7 -0
- package/cjs/exports.d.ts +1 -0
- package/cjs/exports.js +17 -0
- package/cjs/index.d.ts +6 -0
- package/cjs/index.js +48 -0
- package/esm/BaseClient.d.mts +42 -0
- package/esm/BaseClient.mjs +37 -0
- package/esm/Client.d.mts +35 -0
- package/esm/Client.mjs +61 -0
- package/esm/api/errors/InternalServerError.d.mts +6 -0
- package/esm/api/errors/InternalServerError.mjs +17 -0
- package/esm/api/errors/UnauthorizedError.d.mts +6 -0
- package/esm/api/errors/UnauthorizedError.mjs +17 -0
- package/esm/api/errors/index.d.mts +2 -0
- package/esm/api/errors/index.mjs +2 -0
- package/esm/api/index.d.mts +3 -0
- package/esm/api/index.mjs +3 -0
- package/esm/api/resources/index.d.mts +12 -0
- package/esm/api/resources/index.mjs +12 -0
- package/esm/api/resources/media/client/Client.d.mts +107 -0
- package/esm/api/resources/media/client/Client.mjs +374 -0
- package/esm/api/resources/media/client/index.d.mts +1 -0
- package/esm/api/resources/media/client/index.mjs +1 -0
- package/esm/api/resources/media/client/requests/CreatePresignedPost.d.mts +21 -0
- package/esm/api/resources/media/client/requests/CreatePresignedPost.mjs +9 -0
- package/esm/api/resources/media/client/requests/ListMediaRequest.d.mts +13 -0
- package/esm/api/resources/media/client/requests/ListMediaRequest.mjs +2 -0
- package/esm/api/resources/media/client/requests/RetrieveMediaRequest.d.mts +9 -0
- package/esm/api/resources/media/client/requests/RetrieveMediaRequest.mjs +2 -0
- package/esm/api/resources/media/client/requests/SetTagsMediaRequest.d.mts +11 -0
- package/esm/api/resources/media/client/requests/SetTagsMediaRequest.mjs +2 -0
- package/esm/api/resources/media/client/requests/UpdateMediaRequest.d.mts +16 -0
- package/esm/api/resources/media/client/requests/UpdateMediaRequest.mjs +2 -0
- package/esm/api/resources/media/client/requests/index.d.mts +5 -0
- package/esm/api/resources/media/client/requests/index.mjs +1 -0
- package/esm/api/resources/media/exports.d.mts +2 -0
- package/esm/api/resources/media/exports.mjs +3 -0
- package/esm/api/resources/media/index.d.mts +2 -0
- package/esm/api/resources/media/index.mjs +2 -0
- package/esm/api/resources/media/types/CountByTagMediaResponse.d.mts +12 -0
- package/esm/api/resources/media/types/CountByTagMediaResponse.mjs +2 -0
- package/esm/api/resources/media/types/ListMediaRequestCursor.d.mts +4 -0
- package/esm/api/resources/media/types/ListMediaRequestCursor.mjs +2 -0
- package/esm/api/resources/media/types/ListMediaRequestTagMode.d.mts +5 -0
- package/esm/api/resources/media/types/ListMediaRequestTagMode.mjs +5 -0
- package/esm/api/resources/media/types/ListMediaRequestType.d.mts +6 -0
- package/esm/api/resources/media/types/ListMediaRequestType.mjs +6 -0
- package/esm/api/resources/media/types/index.d.mts +4 -0
- package/esm/api/resources/media/types/index.mjs +4 -0
- package/esm/api/resources/posts/client/Client.d.mts +187 -0
- package/esm/api/resources/posts/client/Client.mjs +673 -0
- package/esm/api/resources/posts/client/index.d.mts +1 -0
- package/esm/api/resources/posts/client/index.mjs +1 -0
- package/esm/api/resources/posts/client/requests/AnalyticsSeriesPostsRequest.d.mts +10 -0
- package/esm/api/resources/posts/client/requests/AnalyticsSeriesPostsRequest.mjs +2 -0
- package/esm/api/resources/posts/client/requests/AnalyticsSummaryPostsRequest.d.mts +9 -0
- package/esm/api/resources/posts/client/requests/AnalyticsSummaryPostsRequest.mjs +2 -0
- package/esm/api/resources/posts/client/requests/DeletePostsRequest.d.mts +9 -0
- package/esm/api/resources/posts/client/requests/DeletePostsRequest.mjs +2 -0
- package/esm/api/resources/posts/client/requests/GetJobStatusPostsRequest.d.mts +9 -0
- package/esm/api/resources/posts/client/requests/GetJobStatusPostsRequest.mjs +2 -0
- package/esm/api/resources/posts/client/requests/ListPostsRequest.d.mts +15 -0
- package/esm/api/resources/posts/client/requests/ListPostsRequest.mjs +2 -0
- package/esm/api/resources/posts/client/requests/PostCreate.d.mts +183 -0
- package/esm/api/resources/posts/client/requests/PostCreate.mjs +100 -0
- package/esm/api/resources/posts/client/requests/PublishDraftPostsRequest.d.mts +10 -0
- package/esm/api/resources/posts/client/requests/PublishDraftPostsRequest.mjs +2 -0
- package/esm/api/resources/posts/client/requests/RetrievePostsRequest.d.mts +9 -0
- package/esm/api/resources/posts/client/requests/RetrievePostsRequest.mjs +2 -0
- package/esm/api/resources/posts/client/requests/UpdatePostsRequest.d.mts +36 -0
- package/esm/api/resources/posts/client/requests/UpdatePostsRequest.mjs +11 -0
- package/esm/api/resources/posts/client/requests/UpdateTagsPostsRequest.d.mts +11 -0
- package/esm/api/resources/posts/client/requests/UpdateTagsPostsRequest.mjs +2 -0
- package/esm/api/resources/posts/client/requests/V0PostCountByTabRequest.d.mts +7 -0
- package/esm/api/resources/posts/client/requests/V0PostCountByTabRequest.mjs +2 -0
- package/esm/api/resources/posts/client/requests/index.d.mts +11 -0
- package/esm/api/resources/posts/client/requests/index.mjs +2 -0
- package/esm/api/resources/posts/exports.d.mts +2 -0
- package/esm/api/resources/posts/exports.mjs +3 -0
- package/esm/api/resources/posts/index.d.mts +2 -0
- package/esm/api/resources/posts/index.mjs +2 -0
- package/esm/api/resources/posts/types/AnalyticsSeriesPostsResponse.d.mts +15 -0
- package/esm/api/resources/posts/types/AnalyticsSeriesPostsResponse.mjs +2 -0
- package/esm/api/resources/posts/types/AnalyticsSummaryPostsResponse.d.mts +6 -0
- package/esm/api/resources/posts/types/AnalyticsSummaryPostsResponse.mjs +2 -0
- package/esm/api/resources/posts/types/CreatePostsResponse.d.mts +59 -0
- package/esm/api/resources/posts/types/CreatePostsResponse.mjs +33 -0
- package/esm/api/resources/posts/types/ListPostsRequestApprovalStatus.d.mts +7 -0
- package/esm/api/resources/posts/types/ListPostsRequestApprovalStatus.mjs +7 -0
- package/esm/api/resources/posts/types/ListPostsRequestStatus.d.mts +8 -0
- package/esm/api/resources/posts/types/ListPostsRequestStatus.mjs +8 -0
- package/esm/api/resources/posts/types/ListPostsRequestTagMode.d.mts +5 -0
- package/esm/api/resources/posts/types/ListPostsRequestTagMode.mjs +5 -0
- package/esm/api/resources/posts/types/ListPostsResponse.d.mts +7 -0
- package/esm/api/resources/posts/types/ListPostsResponse.mjs +2 -0
- package/esm/api/resources/posts/types/index.d.mts +7 -0
- package/esm/api/resources/posts/types/index.mjs +7 -0
- package/esm/api/resources/socialAccounts/client/Client.d.mts +107 -0
- package/esm/api/resources/socialAccounts/client/Client.mjs +378 -0
- package/esm/api/resources/socialAccounts/client/index.d.mts +1 -0
- package/esm/api/resources/socialAccounts/client/index.mjs +1 -0
- package/esm/api/resources/socialAccounts/client/requests/DeleteSocialAccountsRequest.d.mts +9 -0
- package/esm/api/resources/socialAccounts/client/requests/DeleteSocialAccountsRequest.mjs +2 -0
- package/esm/api/resources/socialAccounts/client/requests/PinterestBoardsSocialAccountsRequest.d.mts +9 -0
- package/esm/api/resources/socialAccounts/client/requests/PinterestBoardsSocialAccountsRequest.mjs +2 -0
- package/esm/api/resources/socialAccounts/client/requests/TiktokCreatorInfoSocialAccountsRequest.d.mts +9 -0
- package/esm/api/resources/socialAccounts/client/requests/TiktokCreatorInfoSocialAccountsRequest.mjs +2 -0
- package/esm/api/resources/socialAccounts/client/requests/UpdateSocialAccountsRequest.d.mts +17 -0
- package/esm/api/resources/socialAccounts/client/requests/UpdateSocialAccountsRequest.mjs +8 -0
- package/esm/api/resources/socialAccounts/client/requests/UpdateTimezoneSocialAccountsRequest.d.mts +11 -0
- package/esm/api/resources/socialAccounts/client/requests/UpdateTimezoneSocialAccountsRequest.mjs +2 -0
- package/esm/api/resources/socialAccounts/client/requests/index.d.mts +5 -0
- package/esm/api/resources/socialAccounts/client/requests/index.mjs +1 -0
- package/esm/api/resources/socialAccounts/exports.d.mts +2 -0
- package/esm/api/resources/socialAccounts/exports.mjs +3 -0
- package/esm/api/resources/socialAccounts/index.d.mts +2 -0
- package/esm/api/resources/socialAccounts/index.mjs +2 -0
- package/esm/api/resources/socialAccounts/types/DeleteSocialAccountsResponse.d.mts +3 -0
- package/esm/api/resources/socialAccounts/types/DeleteSocialAccountsResponse.mjs +2 -0
- package/esm/api/resources/socialAccounts/types/ListSocialAccountsResponse.d.mts +41 -0
- package/esm/api/resources/socialAccounts/types/ListSocialAccountsResponse.mjs +27 -0
- package/esm/api/resources/socialAccounts/types/PinterestBoardsSocialAccountsResponse.d.mts +21 -0
- package/esm/api/resources/socialAccounts/types/PinterestBoardsSocialAccountsResponse.mjs +15 -0
- package/esm/api/resources/socialAccounts/types/TiktokCreatorInfoSocialAccountsResponse.d.mts +21 -0
- package/esm/api/resources/socialAccounts/types/TiktokCreatorInfoSocialAccountsResponse.mjs +2 -0
- package/esm/api/resources/socialAccounts/types/UpdateSocialAccountsResponse.d.mts +3 -0
- package/esm/api/resources/socialAccounts/types/UpdateSocialAccountsResponse.mjs +2 -0
- package/esm/api/resources/socialAccounts/types/UpdateTimezoneSocialAccountsResponse.d.mts +3 -0
- package/esm/api/resources/socialAccounts/types/UpdateTimezoneSocialAccountsResponse.mjs +2 -0
- package/esm/api/resources/socialAccounts/types/index.d.mts +6 -0
- package/esm/api/resources/socialAccounts/types/index.mjs +6 -0
- package/esm/api/resources/tags/client/Client.d.mts +78 -0
- package/esm/api/resources/tags/client/Client.mjs +266 -0
- package/esm/api/resources/tags/client/index.d.mts +1 -0
- package/esm/api/resources/tags/client/index.mjs +1 -0
- package/esm/api/resources/tags/client/requests/CreateTagsRequest.d.mts +11 -0
- package/esm/api/resources/tags/client/requests/CreateTagsRequest.mjs +2 -0
- package/esm/api/resources/tags/client/requests/DeleteTagsRequest.d.mts +9 -0
- package/esm/api/resources/tags/client/requests/DeleteTagsRequest.mjs +2 -0
- package/esm/api/resources/tags/client/requests/ListTagsRequest.d.mts +8 -0
- package/esm/api/resources/tags/client/requests/ListTagsRequest.mjs +2 -0
- package/esm/api/resources/tags/client/requests/UpdateTagsRequest.d.mts +13 -0
- package/esm/api/resources/tags/client/requests/UpdateTagsRequest.mjs +2 -0
- package/esm/api/resources/tags/client/requests/index.d.mts +4 -0
- package/esm/api/resources/tags/client/requests/index.mjs +1 -0
- package/esm/api/resources/tags/exports.d.mts +2 -0
- package/esm/api/resources/tags/exports.mjs +3 -0
- package/esm/api/resources/tags/index.d.mts +2 -0
- package/esm/api/resources/tags/index.mjs +2 -0
- package/esm/api/resources/tags/types/ListTagsResponse.d.mts +4 -0
- package/esm/api/resources/tags/types/ListTagsResponse.mjs +2 -0
- package/esm/api/resources/tags/types/index.d.mts +1 -0
- package/esm/api/resources/tags/types/index.mjs +1 -0
- package/esm/api/types/AnalyticsStatus.d.mts +6 -0
- package/esm/api/types/AnalyticsStatus.mjs +6 -0
- package/esm/api/types/ErrorResponse.d.mts +10 -0
- package/esm/api/types/ErrorResponse.mjs +2 -0
- package/esm/api/types/ImageProcessingStatus.d.mts +7 -0
- package/esm/api/types/ImageProcessingStatus.mjs +7 -0
- package/esm/api/types/ListPostsRequestScheduledAt.d.mts +4 -0
- package/esm/api/types/ListPostsRequestScheduledAt.mjs +2 -0
- package/esm/api/types/Media.d.mts +14 -0
- package/esm/api/types/Media.mjs +2 -0
- package/esm/api/types/MediaSearch.d.mts +25 -0
- package/esm/api/types/MediaSearch.mjs +13 -0
- package/esm/api/types/MediaSetTags.d.mts +4 -0
- package/esm/api/types/MediaSetTags.mjs +2 -0
- package/esm/api/types/MediaUpdate.d.mts +9 -0
- package/esm/api/types/MediaUpdate.mjs +2 -0
- package/esm/api/types/OauthScope.d.mts +36 -0
- package/esm/api/types/OauthScope.mjs +36 -0
- package/esm/api/types/Post.d.mts +19 -0
- package/esm/api/types/Post.mjs +2 -0
- package/esm/api/types/PostApprovalStatus.d.mts +7 -0
- package/esm/api/types/PostApprovalStatus.mjs +7 -0
- package/esm/api/types/PostPublishDraft.d.mts +4 -0
- package/esm/api/types/PostPublishDraft.mjs +2 -0
- package/esm/api/types/PostSearch.d.mts +36 -0
- package/esm/api/types/PostSearch.mjs +21 -0
- package/esm/api/types/PostStatus.d.mts +8 -0
- package/esm/api/types/PostStatus.mjs +8 -0
- package/esm/api/types/PostWithRelations.d.mts +68 -0
- package/esm/api/types/PostWithRelations.mjs +33 -0
- package/esm/api/types/PresignedPost.d.mts +11 -0
- package/esm/api/types/PresignedPost.mjs +7 -0
- package/esm/api/types/SocialAccount.d.mts +20 -0
- package/esm/api/types/SocialAccount.mjs +8 -0
- package/esm/api/types/SocialAccountDisconnectedReason.d.mts +9 -0
- package/esm/api/types/SocialAccountDisconnectedReason.mjs +9 -0
- package/esm/api/types/SocialAccountPublic.d.mts +17 -0
- package/esm/api/types/SocialAccountPublic.mjs +8 -0
- package/esm/api/types/SocialAccountUpdate.d.mts +11 -0
- package/esm/api/types/SocialAccountUpdate.mjs +8 -0
- package/esm/api/types/SocialPlatform.d.mts +14 -0
- package/esm/api/types/SocialPlatform.mjs +14 -0
- package/esm/api/types/Tag.d.mts +7 -0
- package/esm/api/types/Tag.mjs +2 -0
- package/esm/api/types/TagSearch.d.mts +4 -0
- package/esm/api/types/TagSearch.mjs +2 -0
- package/esm/api/types/TagUpsert.d.mts +5 -0
- package/esm/api/types/TagUpsert.mjs +2 -0
- package/esm/api/types/index.d.mts +24 -0
- package/esm/api/types/index.mjs +24 -0
- package/esm/auth/HeaderAuthProvider.d.mts +20 -0
- package/esm/auth/HeaderAuthProvider.mjs +43 -0
- package/esm/auth/index.d.mts +1 -0
- package/esm/auth/index.mjs +1 -0
- package/esm/core/auth/AuthProvider.d.mts +8 -0
- package/esm/core/auth/AuthProvider.mjs +6 -0
- package/esm/core/auth/AuthRequest.d.mts +9 -0
- package/esm/core/auth/AuthRequest.mjs +1 -0
- package/esm/core/auth/BasicAuth.d.mts +8 -0
- package/esm/core/auth/BasicAuth.mjs +30 -0
- package/esm/core/auth/BearerToken.d.mts +7 -0
- package/esm/core/auth/BearerToken.mjs +13 -0
- package/esm/core/auth/NoOpAuthProvider.d.mts +5 -0
- package/esm/core/auth/NoOpAuthProvider.mjs +5 -0
- package/esm/core/auth/index.d.mts +5 -0
- package/esm/core/auth/index.mjs +4 -0
- package/esm/core/base64.d.mts +2 -0
- package/esm/core/base64.mjs +22 -0
- package/esm/core/exports.d.mts +1 -0
- package/esm/core/exports.mjs +1 -0
- package/esm/core/fetcher/APIResponse.d.mts +20 -0
- package/esm/core/fetcher/APIResponse.mjs +1 -0
- package/esm/core/fetcher/BinaryResponse.d.mts +19 -0
- package/esm/core/fetcher/BinaryResponse.mjs +14 -0
- package/esm/core/fetcher/EndpointMetadata.d.mts +13 -0
- package/esm/core/fetcher/EndpointMetadata.mjs +1 -0
- package/esm/core/fetcher/EndpointSupplier.d.mts +12 -0
- package/esm/core/fetcher/EndpointSupplier.mjs +19 -0
- package/esm/core/fetcher/Fetcher.d.mts +56 -0
- package/esm/core/fetcher/Fetcher.mjs +323 -0
- package/esm/core/fetcher/Headers.d.mts +2 -0
- package/esm/core/fetcher/Headers.mjs +82 -0
- package/esm/core/fetcher/HttpResponsePromise.d.mts +58 -0
- package/esm/core/fetcher/HttpResponsePromise.mjs +99 -0
- package/esm/core/fetcher/RawResponse.d.mts +29 -0
- package/esm/core/fetcher/RawResponse.mjs +40 -0
- package/esm/core/fetcher/Supplier.d.mts +4 -0
- package/esm/core/fetcher/Supplier.mjs +19 -0
- package/esm/core/fetcher/createRequestUrl.d.mts +1 -0
- package/esm/core/fetcher/createRequestUrl.mjs +5 -0
- package/esm/core/fetcher/getErrorResponseBody.d.mts +1 -0
- package/esm/core/fetcher/getErrorResponseBody.mjs +42 -0
- package/esm/core/fetcher/getFetchFn.d.mts +1 -0
- package/esm/core/fetcher/getFetchFn.mjs +14 -0
- package/esm/core/fetcher/getHeader.d.mts +1 -0
- package/esm/core/fetcher/getHeader.mjs +8 -0
- package/esm/core/fetcher/getRequestBody.d.mts +7 -0
- package/esm/core/fetcher/getRequestBody.mjs +24 -0
- package/esm/core/fetcher/getResponseBody.d.mts +1 -0
- package/esm/core/fetcher/getResponseBody.mjs +77 -0
- package/esm/core/fetcher/index.d.mts +13 -0
- package/esm/core/fetcher/index.mjs +7 -0
- package/esm/core/fetcher/makePassthroughRequest.d.mts +49 -0
- package/esm/core/fetcher/makePassthroughRequest.mjs +132 -0
- package/esm/core/fetcher/makeRequest.d.mts +6 -0
- package/esm/core/fetcher/makeRequest.mjs +55 -0
- package/esm/core/fetcher/requestWithRetries.d.mts +1 -0
- package/esm/core/fetcher/requestWithRetries.mjs +67 -0
- package/esm/core/fetcher/signals.d.mts +5 -0
- package/esm/core/fetcher/signals.mjs +28 -0
- package/esm/core/headers.d.mts +2 -0
- package/esm/core/headers.mjs +27 -0
- package/esm/core/index.d.mts +6 -0
- package/esm/core/index.mjs +6 -0
- package/esm/core/json.d.mts +15 -0
- package/esm/core/json.mjs +19 -0
- package/esm/core/logging/exports.d.mts +18 -0
- package/esm/core/logging/exports.mjs +9 -0
- package/esm/core/logging/index.d.mts +1 -0
- package/esm/core/logging/index.mjs +1 -0
- package/esm/core/logging/logger.d.mts +126 -0
- package/esm/core/logging/logger.mjs +138 -0
- package/esm/core/runtime/index.d.mts +1 -0
- package/esm/core/runtime/index.mjs +1 -0
- package/esm/core/runtime/runtime.d.mts +9 -0
- package/esm/core/runtime/runtime.mjs +101 -0
- package/esm/core/url/QueryStringBuilder.d.mts +47 -0
- package/esm/core/url/QueryStringBuilder.mjs +80 -0
- package/esm/core/url/encodePathParam.d.mts +1 -0
- package/esm/core/url/encodePathParam.mjs +18 -0
- package/esm/core/url/index.d.mts +4 -0
- package/esm/core/url/index.mjs +4 -0
- package/esm/core/url/join.d.mts +1 -0
- package/esm/core/url/join.mjs +65 -0
- package/esm/core/url/qs.d.mts +7 -0
- package/esm/core/url/qs.mjs +73 -0
- package/esm/environments.d.mts +4 -0
- package/esm/environments.mjs +4 -0
- package/esm/errors/SchedulinError.d.mts +14 -0
- package/esm/errors/SchedulinError.mjs +31 -0
- package/esm/errors/SchedulinTimeoutError.d.mts +6 -0
- package/esm/errors/SchedulinTimeoutError.mjs +14 -0
- package/esm/errors/handleNonStatusCodeError.d.mts +2 -0
- package/esm/errors/handleNonStatusCodeError.mjs +32 -0
- package/esm/errors/index.d.mts +2 -0
- package/esm/errors/index.mjs +2 -0
- package/esm/exports.d.mts +1 -0
- package/esm/exports.mjs +1 -0
- package/esm/index.d.mts +6 -0
- package/esm/index.mjs +5 -0
- package/package.json +44 -0
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type * as Schedulin from "../index.js";
|
|
2
|
+
export interface SocialAccountPublic {
|
|
3
|
+
id: string;
|
|
4
|
+
platform: Schedulin.SocialPlatform;
|
|
5
|
+
username: string | null;
|
|
6
|
+
userId: string;
|
|
7
|
+
profilePhotoUrl: string | null;
|
|
8
|
+
status: SocialAccountPublic.Status;
|
|
9
|
+
externalId: string | null;
|
|
10
|
+
}
|
|
11
|
+
export declare namespace SocialAccountPublic {
|
|
12
|
+
const Status: {
|
|
13
|
+
readonly Connected: "connected";
|
|
14
|
+
readonly Disconnected: "disconnected";
|
|
15
|
+
};
|
|
16
|
+
type Status = (typeof Status)[keyof typeof Status];
|
|
17
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.SocialAccountPublic = void 0;
|
|
5
|
+
var SocialAccountPublic;
|
|
6
|
+
(function (SocialAccountPublic) {
|
|
7
|
+
SocialAccountPublic.Status = {
|
|
8
|
+
Connected: "connected",
|
|
9
|
+
Disconnected: "disconnected",
|
|
10
|
+
};
|
|
11
|
+
})(SocialAccountPublic || (exports.SocialAccountPublic = SocialAccountPublic = {}));
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export interface SocialAccountUpdate {
|
|
2
|
+
id: string;
|
|
3
|
+
status?: SocialAccountUpdate.Status | undefined;
|
|
4
|
+
}
|
|
5
|
+
export declare namespace SocialAccountUpdate {
|
|
6
|
+
const Status: {
|
|
7
|
+
readonly Connected: "connected";
|
|
8
|
+
readonly Disconnected: "disconnected";
|
|
9
|
+
};
|
|
10
|
+
type Status = (typeof Status)[keyof typeof Status];
|
|
11
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.SocialAccountUpdate = void 0;
|
|
5
|
+
var SocialAccountUpdate;
|
|
6
|
+
(function (SocialAccountUpdate) {
|
|
7
|
+
SocialAccountUpdate.Status = {
|
|
8
|
+
Connected: "connected",
|
|
9
|
+
Disconnected: "disconnected",
|
|
10
|
+
};
|
|
11
|
+
})(SocialAccountUpdate || (exports.SocialAccountUpdate = SocialAccountUpdate = {}));
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export declare const SocialPlatform: {
|
|
2
|
+
readonly Bluesky: "bluesky";
|
|
3
|
+
readonly Facebook: "facebook";
|
|
4
|
+
readonly GoogleBusinessProfile: "google_business_profile";
|
|
5
|
+
readonly Instagram: "instagram";
|
|
6
|
+
readonly Linkedin: "linkedin";
|
|
7
|
+
readonly Pinterest: "pinterest";
|
|
8
|
+
readonly Reddit: "reddit";
|
|
9
|
+
readonly Threads: "threads";
|
|
10
|
+
readonly Tiktok: "tiktok";
|
|
11
|
+
readonly Twitter: "twitter";
|
|
12
|
+
readonly Youtube: "youtube";
|
|
13
|
+
};
|
|
14
|
+
export type SocialPlatform = (typeof SocialPlatform)[keyof typeof SocialPlatform];
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.SocialPlatform = void 0;
|
|
5
|
+
exports.SocialPlatform = {
|
|
6
|
+
Bluesky: "bluesky",
|
|
7
|
+
Facebook: "facebook",
|
|
8
|
+
GoogleBusinessProfile: "google_business_profile",
|
|
9
|
+
Instagram: "instagram",
|
|
10
|
+
Linkedin: "linkedin",
|
|
11
|
+
Pinterest: "pinterest",
|
|
12
|
+
Reddit: "reddit",
|
|
13
|
+
Threads: "threads",
|
|
14
|
+
Tiktok: "tiktok",
|
|
15
|
+
Twitter: "twitter",
|
|
16
|
+
Youtube: "youtube",
|
|
17
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export * from "./AnalyticsStatus.js";
|
|
2
|
+
export * from "./ErrorResponse.js";
|
|
3
|
+
export * from "./ImageProcessingStatus.js";
|
|
4
|
+
export * from "./ListPostsRequestScheduledAt.js";
|
|
5
|
+
export * from "./Media.js";
|
|
6
|
+
export * from "./MediaSearch.js";
|
|
7
|
+
export * from "./MediaSetTags.js";
|
|
8
|
+
export * from "./MediaUpdate.js";
|
|
9
|
+
export * from "./OauthScope.js";
|
|
10
|
+
export * from "./Post.js";
|
|
11
|
+
export * from "./PostApprovalStatus.js";
|
|
12
|
+
export * from "./PostPublishDraft.js";
|
|
13
|
+
export * from "./PostSearch.js";
|
|
14
|
+
export * from "./PostStatus.js";
|
|
15
|
+
export * from "./PostWithRelations.js";
|
|
16
|
+
export * from "./PresignedPost.js";
|
|
17
|
+
export * from "./SocialAccount.js";
|
|
18
|
+
export * from "./SocialAccountDisconnectedReason.js";
|
|
19
|
+
export * from "./SocialAccountPublic.js";
|
|
20
|
+
export * from "./SocialAccountUpdate.js";
|
|
21
|
+
export * from "./SocialPlatform.js";
|
|
22
|
+
export * from "./Tag.js";
|
|
23
|
+
export * from "./TagSearch.js";
|
|
24
|
+
export * from "./TagUpsert.js";
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./AnalyticsStatus.js"), exports);
|
|
18
|
+
__exportStar(require("./ErrorResponse.js"), exports);
|
|
19
|
+
__exportStar(require("./ImageProcessingStatus.js"), exports);
|
|
20
|
+
__exportStar(require("./ListPostsRequestScheduledAt.js"), exports);
|
|
21
|
+
__exportStar(require("./Media.js"), exports);
|
|
22
|
+
__exportStar(require("./MediaSearch.js"), exports);
|
|
23
|
+
__exportStar(require("./MediaSetTags.js"), exports);
|
|
24
|
+
__exportStar(require("./MediaUpdate.js"), exports);
|
|
25
|
+
__exportStar(require("./OauthScope.js"), exports);
|
|
26
|
+
__exportStar(require("./Post.js"), exports);
|
|
27
|
+
__exportStar(require("./PostApprovalStatus.js"), exports);
|
|
28
|
+
__exportStar(require("./PostPublishDraft.js"), exports);
|
|
29
|
+
__exportStar(require("./PostSearch.js"), exports);
|
|
30
|
+
__exportStar(require("./PostStatus.js"), exports);
|
|
31
|
+
__exportStar(require("./PostWithRelations.js"), exports);
|
|
32
|
+
__exportStar(require("./PresignedPost.js"), exports);
|
|
33
|
+
__exportStar(require("./SocialAccount.js"), exports);
|
|
34
|
+
__exportStar(require("./SocialAccountDisconnectedReason.js"), exports);
|
|
35
|
+
__exportStar(require("./SocialAccountPublic.js"), exports);
|
|
36
|
+
__exportStar(require("./SocialAccountUpdate.js"), exports);
|
|
37
|
+
__exportStar(require("./SocialPlatform.js"), exports);
|
|
38
|
+
__exportStar(require("./Tag.js"), exports);
|
|
39
|
+
__exportStar(require("./TagSearch.js"), exports);
|
|
40
|
+
__exportStar(require("./TagUpsert.js"), exports);
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import * as core from "../core/index.js";
|
|
2
|
+
declare const PARAM_KEY: "apiKey";
|
|
3
|
+
export declare class HeaderAuthProvider implements core.AuthProvider {
|
|
4
|
+
private readonly options;
|
|
5
|
+
constructor(options: HeaderAuthProvider.Options);
|
|
6
|
+
static canCreate(options: Partial<HeaderAuthProvider.Options>): boolean;
|
|
7
|
+
getAuthRequest({ endpointMetadata, }?: {
|
|
8
|
+
endpointMetadata?: core.EndpointMetadata;
|
|
9
|
+
}): Promise<core.AuthRequest>;
|
|
10
|
+
}
|
|
11
|
+
export declare namespace HeaderAuthProvider {
|
|
12
|
+
const AUTH_SCHEME: "apiKey";
|
|
13
|
+
const AUTH_CONFIG_ERROR_MESSAGE: string;
|
|
14
|
+
type Options = AuthOptions;
|
|
15
|
+
type AuthOptions = {
|
|
16
|
+
[PARAM_KEY]: core.Supplier<string>;
|
|
17
|
+
};
|
|
18
|
+
function createInstance(options: Options): core.AuthProvider;
|
|
19
|
+
}
|
|
20
|
+
export {};
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4
|
+
if (k2 === undefined) k2 = k;
|
|
5
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
8
|
+
}
|
|
9
|
+
Object.defineProperty(o, k2, desc);
|
|
10
|
+
}) : (function(o, m, k, k2) {
|
|
11
|
+
if (k2 === undefined) k2 = k;
|
|
12
|
+
o[k2] = m[k];
|
|
13
|
+
}));
|
|
14
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
15
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
16
|
+
}) : function(o, v) {
|
|
17
|
+
o["default"] = v;
|
|
18
|
+
});
|
|
19
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
20
|
+
var ownKeys = function(o) {
|
|
21
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
22
|
+
var ar = [];
|
|
23
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
24
|
+
return ar;
|
|
25
|
+
};
|
|
26
|
+
return ownKeys(o);
|
|
27
|
+
};
|
|
28
|
+
return function (mod) {
|
|
29
|
+
if (mod && mod.__esModule) return mod;
|
|
30
|
+
var result = {};
|
|
31
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
32
|
+
__setModuleDefault(result, mod);
|
|
33
|
+
return result;
|
|
34
|
+
};
|
|
35
|
+
})();
|
|
36
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
37
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
38
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
39
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
40
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
41
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
42
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
43
|
+
});
|
|
44
|
+
};
|
|
45
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
46
|
+
exports.HeaderAuthProvider = void 0;
|
|
47
|
+
const core = __importStar(require("../core/index.js"));
|
|
48
|
+
const errors = __importStar(require("../errors/index.js"));
|
|
49
|
+
const PARAM_KEY = "apiKey";
|
|
50
|
+
const HEADER_NAME = "x-api-key";
|
|
51
|
+
class HeaderAuthProvider {
|
|
52
|
+
constructor(options) {
|
|
53
|
+
this.options = options;
|
|
54
|
+
}
|
|
55
|
+
static canCreate(options) {
|
|
56
|
+
return (options === null || options === void 0 ? void 0 : options[PARAM_KEY]) != null;
|
|
57
|
+
}
|
|
58
|
+
getAuthRequest() {
|
|
59
|
+
return __awaiter(this, arguments, void 0, function* ({ endpointMetadata, } = {}) {
|
|
60
|
+
const headerValue = yield core.Supplier.get(this.options[PARAM_KEY]);
|
|
61
|
+
if (headerValue == null) {
|
|
62
|
+
throw new errors.SchedulinError({
|
|
63
|
+
message: HeaderAuthProvider.AUTH_CONFIG_ERROR_MESSAGE,
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
return {
|
|
67
|
+
headers: { [HEADER_NAME]: headerValue },
|
|
68
|
+
};
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
exports.HeaderAuthProvider = HeaderAuthProvider;
|
|
73
|
+
(function (HeaderAuthProvider) {
|
|
74
|
+
HeaderAuthProvider.AUTH_SCHEME = "apiKey";
|
|
75
|
+
HeaderAuthProvider.AUTH_CONFIG_ERROR_MESSAGE = `Please provide '${PARAM_KEY}' when initializing the client`;
|
|
76
|
+
function createInstance(options) {
|
|
77
|
+
return new HeaderAuthProvider(options);
|
|
78
|
+
}
|
|
79
|
+
HeaderAuthProvider.createInstance = createInstance;
|
|
80
|
+
})(HeaderAuthProvider || (exports.HeaderAuthProvider = HeaderAuthProvider = {}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { HeaderAuthProvider } from "./HeaderAuthProvider.js";
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.HeaderAuthProvider = void 0;
|
|
4
|
+
var HeaderAuthProvider_js_1 = require("./HeaderAuthProvider.js");
|
|
5
|
+
Object.defineProperty(exports, "HeaderAuthProvider", { enumerable: true, get: function () { return HeaderAuthProvider_js_1.HeaderAuthProvider; } });
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { EndpointMetadata } from "../fetcher/EndpointMetadata.js";
|
|
2
|
+
import type { AuthRequest } from "./AuthRequest.js";
|
|
3
|
+
export interface AuthProvider {
|
|
4
|
+
getAuthRequest(arg?: {
|
|
5
|
+
endpointMetadata?: EndpointMetadata;
|
|
6
|
+
}): Promise<AuthRequest>;
|
|
7
|
+
}
|
|
8
|
+
export declare function isAuthProvider(value: unknown): value is AuthProvider;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isAuthProvider = isAuthProvider;
|
|
4
|
+
function isAuthProvider(value) {
|
|
5
|
+
return (typeof value === "object" &&
|
|
6
|
+
value !== null &&
|
|
7
|
+
"getAuthRequest" in value &&
|
|
8
|
+
typeof value.getAuthRequest === "function");
|
|
9
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BasicAuth = void 0;
|
|
4
|
+
const base64_js_1 = require("../base64.js");
|
|
5
|
+
const BASIC_AUTH_HEADER_PREFIX = /^Basic /i;
|
|
6
|
+
exports.BasicAuth = {
|
|
7
|
+
toAuthorizationHeader: (basicAuth) => {
|
|
8
|
+
var _a, _b;
|
|
9
|
+
if (basicAuth == null) {
|
|
10
|
+
return undefined;
|
|
11
|
+
}
|
|
12
|
+
const username = (_a = basicAuth.username) !== null && _a !== void 0 ? _a : "";
|
|
13
|
+
const password = (_b = basicAuth.password) !== null && _b !== void 0 ? _b : "";
|
|
14
|
+
if (username === "" && password === "") {
|
|
15
|
+
return undefined;
|
|
16
|
+
}
|
|
17
|
+
const token = (0, base64_js_1.base64Encode)(`${username}:${password}`);
|
|
18
|
+
return `Basic ${token}`;
|
|
19
|
+
},
|
|
20
|
+
fromAuthorizationHeader: (header) => {
|
|
21
|
+
const credentials = header.replace(BASIC_AUTH_HEADER_PREFIX, "");
|
|
22
|
+
const decoded = (0, base64_js_1.base64Decode)(credentials);
|
|
23
|
+
const [username, ...passwordParts] = decoded.split(":");
|
|
24
|
+
const password = passwordParts.length > 0 ? passwordParts.join(":") : undefined;
|
|
25
|
+
if (username == null || password == null) {
|
|
26
|
+
throw new Error("Invalid basic auth");
|
|
27
|
+
}
|
|
28
|
+
return {
|
|
29
|
+
username,
|
|
30
|
+
password,
|
|
31
|
+
};
|
|
32
|
+
},
|
|
33
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export type BearerToken = string;
|
|
2
|
+
declare function toAuthorizationHeader(token: string | undefined): string | undefined;
|
|
3
|
+
export declare const BearerToken: {
|
|
4
|
+
toAuthorizationHeader: typeof toAuthorizationHeader;
|
|
5
|
+
fromAuthorizationHeader: (header: string) => BearerToken;
|
|
6
|
+
};
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BearerToken = void 0;
|
|
4
|
+
const BEARER_AUTH_HEADER_PREFIX = /^Bearer /i;
|
|
5
|
+
function toAuthorizationHeader(token) {
|
|
6
|
+
if (token == null) {
|
|
7
|
+
return undefined;
|
|
8
|
+
}
|
|
9
|
+
return `Bearer ${token}`;
|
|
10
|
+
}
|
|
11
|
+
exports.BearerToken = {
|
|
12
|
+
toAuthorizationHeader: toAuthorizationHeader,
|
|
13
|
+
fromAuthorizationHeader: (header) => {
|
|
14
|
+
return header.replace(BEARER_AUTH_HEADER_PREFIX, "").trim();
|
|
15
|
+
},
|
|
16
|
+
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { type AuthProvider, isAuthProvider } from "./AuthProvider.js";
|
|
2
|
+
export type { AuthRequest } from "./AuthRequest.js";
|
|
3
|
+
export { BasicAuth } from "./BasicAuth.js";
|
|
4
|
+
export { BearerToken } from "./BearerToken.js";
|
|
5
|
+
export { NoOpAuthProvider } from "./NoOpAuthProvider.js";
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NoOpAuthProvider = exports.BearerToken = exports.BasicAuth = exports.isAuthProvider = void 0;
|
|
4
|
+
var AuthProvider_js_1 = require("./AuthProvider.js");
|
|
5
|
+
Object.defineProperty(exports, "isAuthProvider", { enumerable: true, get: function () { return AuthProvider_js_1.isAuthProvider; } });
|
|
6
|
+
var BasicAuth_js_1 = require("./BasicAuth.js");
|
|
7
|
+
Object.defineProperty(exports, "BasicAuth", { enumerable: true, get: function () { return BasicAuth_js_1.BasicAuth; } });
|
|
8
|
+
var BearerToken_js_1 = require("./BearerToken.js");
|
|
9
|
+
Object.defineProperty(exports, "BearerToken", { enumerable: true, get: function () { return BearerToken_js_1.BearerToken; } });
|
|
10
|
+
var NoOpAuthProvider_js_1 = require("./NoOpAuthProvider.js");
|
|
11
|
+
Object.defineProperty(exports, "NoOpAuthProvider", { enumerable: true, get: function () { return NoOpAuthProvider_js_1.NoOpAuthProvider; } });
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.base64Encode = base64Encode;
|
|
4
|
+
exports.base64Decode = base64Decode;
|
|
5
|
+
function base64ToBytes(base64) {
|
|
6
|
+
const binString = atob(base64);
|
|
7
|
+
return Uint8Array.from(binString, (m) => m.codePointAt(0));
|
|
8
|
+
}
|
|
9
|
+
function bytesToBase64(bytes) {
|
|
10
|
+
const binString = String.fromCodePoint(...bytes);
|
|
11
|
+
return btoa(binString);
|
|
12
|
+
}
|
|
13
|
+
function base64Encode(input) {
|
|
14
|
+
if (typeof Buffer !== "undefined") {
|
|
15
|
+
return Buffer.from(input, "utf8").toString("base64");
|
|
16
|
+
}
|
|
17
|
+
const bytes = new TextEncoder().encode(input);
|
|
18
|
+
return bytesToBase64(bytes);
|
|
19
|
+
}
|
|
20
|
+
function base64Decode(input) {
|
|
21
|
+
if (typeof Buffer !== "undefined") {
|
|
22
|
+
return Buffer.from(input, "base64").toString("utf8");
|
|
23
|
+
}
|
|
24
|
+
const bytes = base64ToBytes(input);
|
|
25
|
+
return new TextDecoder().decode(bytes);
|
|
26
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./logging/exports.js";
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./logging/exports.js"), exports);
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { RawResponse } from "./RawResponse.js";
|
|
2
|
+
/**
|
|
3
|
+
* The response of an API call.
|
|
4
|
+
* It is a successful response or a failed response.
|
|
5
|
+
*/
|
|
6
|
+
export type APIResponse<Success, Failure> = SuccessfulResponse<Success> | FailedResponse<Failure>;
|
|
7
|
+
export interface SuccessfulResponse<T> {
|
|
8
|
+
ok: true;
|
|
9
|
+
body: T;
|
|
10
|
+
/**
|
|
11
|
+
* @deprecated Use `rawResponse` instead
|
|
12
|
+
*/
|
|
13
|
+
headers?: Record<string, any>;
|
|
14
|
+
rawResponse: RawResponse;
|
|
15
|
+
}
|
|
16
|
+
export interface FailedResponse<T> {
|
|
17
|
+
ok: false;
|
|
18
|
+
error: T;
|
|
19
|
+
rawResponse: RawResponse;
|
|
20
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export type BinaryResponse = {
|
|
2
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/bodyUsed) */
|
|
3
|
+
bodyUsed: Response["bodyUsed"];
|
|
4
|
+
/**
|
|
5
|
+
* Returns a ReadableStream of the response body.
|
|
6
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/body)
|
|
7
|
+
*/
|
|
8
|
+
stream: () => Response["body"];
|
|
9
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/arrayBuffer) */
|
|
10
|
+
arrayBuffer: () => ReturnType<Response["arrayBuffer"]>;
|
|
11
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/blob) */
|
|
12
|
+
blob: () => ReturnType<Response["blob"]>;
|
|
13
|
+
/**
|
|
14
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/bytes)
|
|
15
|
+
* Some versions of the Fetch API may not support this method.
|
|
16
|
+
*/
|
|
17
|
+
bytes?(): Promise<Uint8Array>;
|
|
18
|
+
};
|
|
19
|
+
export declare function getBinaryResponse(response: Response): BinaryResponse;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getBinaryResponse = getBinaryResponse;
|
|
4
|
+
function getBinaryResponse(response) {
|
|
5
|
+
const binaryResponse = {
|
|
6
|
+
get bodyUsed() {
|
|
7
|
+
return response.bodyUsed;
|
|
8
|
+
},
|
|
9
|
+
stream: () => response.body,
|
|
10
|
+
arrayBuffer: response.arrayBuffer.bind(response),
|
|
11
|
+
blob: response.blob.bind(response),
|
|
12
|
+
};
|
|
13
|
+
if ("bytes" in response && typeof response.bytes === "function") {
|
|
14
|
+
binaryResponse.bytes = response.bytes.bind(response);
|
|
15
|
+
}
|
|
16
|
+
return binaryResponse;
|
|
17
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export type SecuritySchemeKey = string;
|
|
2
|
+
/**
|
|
3
|
+
* A collection of security schemes, where the key is the name of the security scheme and the value is the list of scopes required for that scheme.
|
|
4
|
+
* All schemes in the collection must be satisfied for authentication to be successful.
|
|
5
|
+
*/
|
|
6
|
+
export type SecuritySchemeCollection = Record<SecuritySchemeKey, AuthScope[]>;
|
|
7
|
+
export type AuthScope = string;
|
|
8
|
+
export type EndpointMetadata = {
|
|
9
|
+
/**
|
|
10
|
+
* An array of security scheme collections. Each collection represents an alternative way to authenticate.
|
|
11
|
+
*/
|
|
12
|
+
security?: SecuritySchemeCollection[];
|
|
13
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { EndpointMetadata } from "./EndpointMetadata.js";
|
|
2
|
+
import type { Supplier } from "./Supplier.js";
|
|
3
|
+
type EndpointSupplierFn<T> = (arg: {
|
|
4
|
+
endpointMetadata?: EndpointMetadata;
|
|
5
|
+
}) => T | Promise<T>;
|
|
6
|
+
export type EndpointSupplier<T> = Supplier<T> | EndpointSupplierFn<T>;
|
|
7
|
+
export declare const EndpointSupplier: {
|
|
8
|
+
get: <T>(supplier: EndpointSupplier<T>, arg: {
|
|
9
|
+
endpointMetadata?: EndpointMetadata;
|
|
10
|
+
}) => Promise<T>;
|
|
11
|
+
};
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.EndpointSupplier = void 0;
|
|
13
|
+
exports.EndpointSupplier = {
|
|
14
|
+
get: (supplier, arg) => __awaiter(void 0, void 0, void 0, function* () {
|
|
15
|
+
if (typeof supplier === "function") {
|
|
16
|
+
return supplier(arg);
|
|
17
|
+
}
|
|
18
|
+
else {
|
|
19
|
+
return supplier;
|
|
20
|
+
}
|
|
21
|
+
}),
|
|
22
|
+
};
|