bereach 0.1.1
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/FUNCTIONS.md +90 -0
- package/README.md +530 -0
- package/RUNTIMES.md +48 -0
- package/esm/core.d.ts +10 -0
- package/esm/core.d.ts.map +1 -0
- package/esm/core.js +13 -0
- package/esm/core.js.map +1 -0
- package/esm/funcs/campaigns-filter.d.ts +20 -0
- package/esm/funcs/campaigns-filter.d.ts.map +1 -0
- package/esm/funcs/campaigns-filter.js +106 -0
- package/esm/funcs/campaigns-filter.js.map +1 -0
- package/esm/funcs/campaigns-get-stats.d.ts +18 -0
- package/esm/funcs/campaigns-get-stats.d.ts.map +1 -0
- package/esm/funcs/campaigns-get-stats.js +101 -0
- package/esm/funcs/campaigns-get-stats.js.map +1 -0
- package/esm/funcs/campaigns-get-status.d.ts +18 -0
- package/esm/funcs/campaigns-get-status.d.ts.map +1 -0
- package/esm/funcs/campaigns-get-status.js +101 -0
- package/esm/funcs/campaigns-get-status.js.map +1 -0
- package/esm/funcs/campaigns-sync-actions.d.ts +18 -0
- package/esm/funcs/campaigns-sync-actions.d.ts.map +1 -0
- package/esm/funcs/campaigns-sync-actions.js +101 -0
- package/esm/funcs/campaigns-sync-actions.js.map +1 -0
- package/esm/funcs/linkedin-actions-accept-invitation.d.ts +18 -0
- package/esm/funcs/linkedin-actions-accept-invitation.d.ts.map +1 -0
- package/esm/funcs/linkedin-actions-accept-invitation.js +95 -0
- package/esm/funcs/linkedin-actions-accept-invitation.js.map +1 -0
- package/esm/funcs/linkedin-actions-connect-profile.d.ts +18 -0
- package/esm/funcs/linkedin-actions-connect-profile.d.ts.map +1 -0
- package/esm/funcs/linkedin-actions-connect-profile.js +95 -0
- package/esm/funcs/linkedin-actions-connect-profile.js.map +1 -0
- package/esm/funcs/linkedin-actions-like-comment.d.ts +18 -0
- package/esm/funcs/linkedin-actions-like-comment.d.ts.map +1 -0
- package/esm/funcs/linkedin-actions-like-comment.js +95 -0
- package/esm/funcs/linkedin-actions-like-comment.js.map +1 -0
- package/esm/funcs/linkedin-actions-list-invitations.d.ts +18 -0
- package/esm/funcs/linkedin-actions-list-invitations.d.ts.map +1 -0
- package/esm/funcs/linkedin-actions-list-invitations.js +97 -0
- package/esm/funcs/linkedin-actions-list-invitations.js.map +1 -0
- package/esm/funcs/linkedin-actions-publish-post.d.ts +18 -0
- package/esm/funcs/linkedin-actions-publish-post.d.ts.map +1 -0
- package/esm/funcs/linkedin-actions-publish-post.js +95 -0
- package/esm/funcs/linkedin-actions-publish-post.js.map +1 -0
- package/esm/funcs/linkedin-actions-reply-to-comment.d.ts +18 -0
- package/esm/funcs/linkedin-actions-reply-to-comment.d.ts.map +1 -0
- package/esm/funcs/linkedin-actions-reply-to-comment.js +95 -0
- package/esm/funcs/linkedin-actions-reply-to-comment.js.map +1 -0
- package/esm/funcs/linkedin-actions-send-message.d.ts +18 -0
- package/esm/funcs/linkedin-actions-send-message.d.ts.map +1 -0
- package/esm/funcs/linkedin-actions-send-message.js +95 -0
- package/esm/funcs/linkedin-actions-send-message.js.map +1 -0
- package/esm/funcs/linkedin-chat-find-conversation.d.ts +25 -0
- package/esm/funcs/linkedin-chat-find-conversation.d.ts.map +1 -0
- package/esm/funcs/linkedin-chat-find-conversation.js +102 -0
- package/esm/funcs/linkedin-chat-find-conversation.js.map +1 -0
- package/esm/funcs/linkedin-chat-get-messages.d.ts +22 -0
- package/esm/funcs/linkedin-chat-get-messages.d.ts.map +1 -0
- package/esm/funcs/linkedin-chat-get-messages.js +99 -0
- package/esm/funcs/linkedin-chat-get-messages.js.map +1 -0
- package/esm/funcs/linkedin-chat-list-conversations.d.ts +18 -0
- package/esm/funcs/linkedin-chat-list-conversations.d.ts.map +1 -0
- package/esm/funcs/linkedin-chat-list-conversations.js +95 -0
- package/esm/funcs/linkedin-chat-list-conversations.js.map +1 -0
- package/esm/funcs/linkedin-chat-search-conversations.d.ts +18 -0
- package/esm/funcs/linkedin-chat-search-conversations.d.ts.map +1 -0
- package/esm/funcs/linkedin-chat-search-conversations.js +95 -0
- package/esm/funcs/linkedin-chat-search-conversations.js.map +1 -0
- package/esm/funcs/linkedin-scrapers-collect-comment-replies.d.ts +18 -0
- package/esm/funcs/linkedin-scrapers-collect-comment-replies.d.ts.map +1 -0
- package/esm/funcs/linkedin-scrapers-collect-comment-replies.js +95 -0
- package/esm/funcs/linkedin-scrapers-collect-comment-replies.js.map +1 -0
- package/esm/funcs/linkedin-scrapers-collect-comments.d.ts +18 -0
- package/esm/funcs/linkedin-scrapers-collect-comments.d.ts.map +1 -0
- package/esm/funcs/linkedin-scrapers-collect-comments.js +95 -0
- package/esm/funcs/linkedin-scrapers-collect-comments.js.map +1 -0
- package/esm/funcs/linkedin-scrapers-collect-likes.d.ts +18 -0
- package/esm/funcs/linkedin-scrapers-collect-likes.d.ts.map +1 -0
- package/esm/funcs/linkedin-scrapers-collect-likes.js +95 -0
- package/esm/funcs/linkedin-scrapers-collect-likes.js.map +1 -0
- package/esm/funcs/linkedin-scrapers-collect-posts.d.ts +18 -0
- package/esm/funcs/linkedin-scrapers-collect-posts.d.ts.map +1 -0
- package/esm/funcs/linkedin-scrapers-collect-posts.js +95 -0
- package/esm/funcs/linkedin-scrapers-collect-posts.js.map +1 -0
- package/esm/funcs/linkedin-scrapers-visit-company.d.ts +18 -0
- package/esm/funcs/linkedin-scrapers-visit-company.d.ts.map +1 -0
- package/esm/funcs/linkedin-scrapers-visit-company.js +95 -0
- package/esm/funcs/linkedin-scrapers-visit-company.js.map +1 -0
- package/esm/funcs/linkedin-scrapers-visit-profile.d.ts +18 -0
- package/esm/funcs/linkedin-scrapers-visit-profile.d.ts.map +1 -0
- package/esm/funcs/linkedin-scrapers-visit-profile.js +95 -0
- package/esm/funcs/linkedin-scrapers-visit-profile.js.map +1 -0
- package/esm/funcs/linkedin-search-resolve-parameters.d.ts +47 -0
- package/esm/funcs/linkedin-search-resolve-parameters.d.ts.map +1 -0
- package/esm/funcs/linkedin-search-resolve-parameters.js +124 -0
- package/esm/funcs/linkedin-search-resolve-parameters.js.map +1 -0
- package/esm/funcs/linkedin-search-search-by-url.d.ts +69 -0
- package/esm/funcs/linkedin-search-search-by-url.d.ts.map +1 -0
- package/esm/funcs/linkedin-search-search-by-url.js +146 -0
- package/esm/funcs/linkedin-search-search-by-url.js.map +1 -0
- package/esm/funcs/linkedin-search-search-companies.d.ts +75 -0
- package/esm/funcs/linkedin-search-search-companies.d.ts.map +1 -0
- package/esm/funcs/linkedin-search-search-companies.js +152 -0
- package/esm/funcs/linkedin-search-search-companies.js.map +1 -0
- package/esm/funcs/linkedin-search-search-jobs.d.ts +96 -0
- package/esm/funcs/linkedin-search-search-jobs.d.ts.map +1 -0
- package/esm/funcs/linkedin-search-search-jobs.js +173 -0
- package/esm/funcs/linkedin-search-search-jobs.js.map +1 -0
- package/esm/funcs/linkedin-search-search-people.d.ts +83 -0
- package/esm/funcs/linkedin-search-search-people.d.ts.map +1 -0
- package/esm/funcs/linkedin-search-search-people.js +160 -0
- package/esm/funcs/linkedin-search-search-people.js.map +1 -0
- package/esm/funcs/linkedin-search-search-posts.d.ts +71 -0
- package/esm/funcs/linkedin-search-search-posts.d.ts.map +1 -0
- package/esm/funcs/linkedin-search-search-posts.js +148 -0
- package/esm/funcs/linkedin-search-search-posts.js.map +1 -0
- package/esm/funcs/linkedin-search-unified-search.d.ts +55 -0
- package/esm/funcs/linkedin-search-unified-search.d.ts.map +1 -0
- package/esm/funcs/linkedin-search-unified-search.js +132 -0
- package/esm/funcs/linkedin-search-unified-search.js.map +1 -0
- package/esm/funcs/profile-get-credits.d.ts +18 -0
- package/esm/funcs/profile-get-credits.d.ts.map +1 -0
- package/esm/funcs/profile-get-credits.js +84 -0
- package/esm/funcs/profile-get-credits.js.map +1 -0
- package/esm/funcs/profile-get-followers.d.ts +18 -0
- package/esm/funcs/profile-get-followers.d.ts.map +1 -0
- package/esm/funcs/profile-get-followers.js +97 -0
- package/esm/funcs/profile-get-followers.js.map +1 -0
- package/esm/funcs/profile-get-limits.d.ts +18 -0
- package/esm/funcs/profile-get-limits.d.ts.map +1 -0
- package/esm/funcs/profile-get-limits.js +84 -0
- package/esm/funcs/profile-get-limits.js.map +1 -0
- package/esm/funcs/profile-get-linked-in-profile.d.ts +18 -0
- package/esm/funcs/profile-get-linked-in-profile.d.ts.map +1 -0
- package/esm/funcs/profile-get-linked-in-profile.js +84 -0
- package/esm/funcs/profile-get-linked-in-profile.js.map +1 -0
- package/esm/funcs/profile-get-posts.d.ts +18 -0
- package/esm/funcs/profile-get-posts.d.ts.map +1 -0
- package/esm/funcs/profile-get-posts.js +97 -0
- package/esm/funcs/profile-get-posts.js.map +1 -0
- package/esm/funcs/profile-refresh.d.ts +18 -0
- package/esm/funcs/profile-refresh.d.ts.map +1 -0
- package/esm/funcs/profile-refresh.js +84 -0
- package/esm/funcs/profile-refresh.js.map +1 -0
- package/esm/hooks/hooks.d.ts +25 -0
- package/esm/hooks/hooks.d.ts.map +1 -0
- package/esm/hooks/hooks.js +82 -0
- package/esm/hooks/hooks.js.map +1 -0
- package/esm/hooks/index.d.ts +3 -0
- package/esm/hooks/index.d.ts.map +1 -0
- package/esm/hooks/index.js +6 -0
- package/esm/hooks/index.js.map +1 -0
- package/esm/hooks/registration.d.ts +3 -0
- package/esm/hooks/registration.d.ts.map +1 -0
- package/esm/hooks/registration.js +12 -0
- package/esm/hooks/registration.js.map +1 -0
- package/esm/hooks/types.d.ts +76 -0
- package/esm/hooks/types.d.ts.map +1 -0
- package/esm/hooks/types.js +5 -0
- package/esm/hooks/types.js.map +1 -0
- package/esm/index.d.ts +6 -0
- package/esm/index.d.ts.map +1 -0
- package/esm/index.js +8 -0
- package/esm/index.js.map +1 -0
- package/esm/lib/base64.d.ts +10 -0
- package/esm/lib/base64.d.ts.map +1 -0
- package/esm/lib/base64.js +31 -0
- package/esm/lib/base64.js.map +1 -0
- package/esm/lib/config.d.ts +38 -0
- package/esm/lib/config.d.ts.map +1 -0
- package/esm/lib/config.js +34 -0
- package/esm/lib/config.js.map +1 -0
- package/esm/lib/dlv.d.ts +14 -0
- package/esm/lib/dlv.d.ts.map +1 -0
- package/esm/lib/dlv.js +46 -0
- package/esm/lib/dlv.js.map +1 -0
- package/esm/lib/encodings.d.ts +53 -0
- package/esm/lib/encodings.d.ts.map +1 -0
- package/esm/lib/encodings.js +370 -0
- package/esm/lib/encodings.js.map +1 -0
- package/esm/lib/env.d.ts +15 -0
- package/esm/lib/env.d.ts.map +1 -0
- package/esm/lib/env.js +44 -0
- package/esm/lib/env.js.map +1 -0
- package/esm/lib/files.d.ts +13 -0
- package/esm/lib/files.d.ts.map +1 -0
- package/esm/lib/files.js +73 -0
- package/esm/lib/files.js.map +1 -0
- package/esm/lib/http.d.ts +67 -0
- package/esm/lib/http.d.ts.map +1 -0
- package/esm/lib/http.js +209 -0
- package/esm/lib/http.js.map +1 -0
- package/esm/lib/is-plain-object.d.ts +2 -0
- package/esm/lib/is-plain-object.d.ts.map +1 -0
- package/esm/lib/is-plain-object.js +38 -0
- package/esm/lib/is-plain-object.js.map +1 -0
- package/esm/lib/logger.d.ts +6 -0
- package/esm/lib/logger.d.ts.map +1 -0
- package/esm/lib/logger.js +5 -0
- package/esm/lib/logger.js.map +1 -0
- package/esm/lib/matchers.d.ts +59 -0
- package/esm/lib/matchers.d.ts.map +1 -0
- package/esm/lib/matchers.js +202 -0
- package/esm/lib/matchers.js.map +1 -0
- package/esm/lib/primitives.d.ts +26 -0
- package/esm/lib/primitives.d.ts.map +1 -0
- package/esm/lib/primitives.js +103 -0
- package/esm/lib/primitives.js.map +1 -0
- package/esm/lib/retries.d.ts +38 -0
- package/esm/lib/retries.d.ts.map +1 -0
- package/esm/lib/retries.js +150 -0
- package/esm/lib/retries.js.map +1 -0
- package/esm/lib/schemas.d.ts +21 -0
- package/esm/lib/schemas.d.ts.map +1 -0
- package/esm/lib/schemas.js +57 -0
- package/esm/lib/schemas.js.map +1 -0
- package/esm/lib/sdks.d.ts +63 -0
- package/esm/lib/sdks.d.ts.map +1 -0
- package/esm/lib/sdks.js +258 -0
- package/esm/lib/sdks.js.map +1 -0
- package/esm/lib/security.d.ts +83 -0
- package/esm/lib/security.d.ts.map +1 -0
- package/esm/lib/security.js +138 -0
- package/esm/lib/security.js.map +1 -0
- package/esm/lib/url.d.ts +5 -0
- package/esm/lib/url.d.ts.map +1 -0
- package/esm/lib/url.js +22 -0
- package/esm/lib/url.js.map +1 -0
- package/esm/models/errors/bereach-default-error.d.ts +10 -0
- package/esm/models/errors/bereach-default-error.d.ts.map +1 -0
- package/esm/models/errors/bereach-default-error.js +30 -0
- package/esm/models/errors/bereach-default-error.js.map +1 -0
- package/esm/models/errors/bereach-error.d.ts +19 -0
- package/esm/models/errors/bereach-error.d.ts.map +1 -0
- package/esm/models/errors/bereach-error.js +26 -0
- package/esm/models/errors/bereach-error.js.map +1 -0
- package/esm/models/errors/collect-linked-in-likes.d.ts +211 -0
- package/esm/models/errors/collect-linked-in-likes.d.ts.map +1 -0
- package/esm/models/errors/collect-linked-in-likes.js +306 -0
- package/esm/models/errors/collect-linked-in-likes.js.map +1 -0
- package/esm/models/errors/http-client-errors.d.ts +44 -0
- package/esm/models/errors/http-client-errors.d.ts.map +1 -0
- package/esm/models/errors/http-client-errors.js +56 -0
- package/esm/models/errors/http-client-errors.js.map +1 -0
- package/esm/models/errors/index.d.ts +7 -0
- package/esm/models/errors/index.d.ts.map +1 -0
- package/esm/models/errors/index.js +10 -0
- package/esm/models/errors/index.js.map +1 -0
- package/esm/models/errors/response-validation-error.d.ts +26 -0
- package/esm/models/errors/response-validation-error.d.ts.map +1 -0
- package/esm/models/errors/response-validation-error.js +37 -0
- package/esm/models/errors/response-validation-error.js.map +1 -0
- package/esm/models/errors/sdk-validation-error.d.ts +21 -0
- package/esm/models/errors/sdk-validation-error.d.ts.map +1 -0
- package/esm/models/errors/sdk-validation-error.js +52 -0
- package/esm/models/errors/sdk-validation-error.js.map +1 -0
- package/esm/models/index.d.ts +2 -0
- package/esm/models/index.d.ts.map +1 -0
- package/esm/models/index.js +5 -0
- package/esm/models/index.js.map +1 -0
- package/esm/models/operations/get-campaign-stats-response.d.ts +1627 -0
- package/esm/models/operations/get-campaign-stats-response.d.ts.map +1 -0
- package/esm/models/operations/get-campaign-stats-response.js +1002 -0
- package/esm/models/operations/get-campaign-stats-response.js.map +1 -0
- package/esm/models/operations/index.d.ts +3 -0
- package/esm/models/operations/index.d.ts.map +1 -0
- package/esm/models/operations/index.js +6 -0
- package/esm/models/operations/index.js.map +1 -0
- package/esm/models/operations/send-linked-in-message-response.d.ts +2350 -0
- package/esm/models/operations/send-linked-in-message-response.d.ts.map +1 -0
- package/esm/models/operations/send-linked-in-message-response.js +1585 -0
- package/esm/models/operations/send-linked-in-message-response.js.map +1 -0
- package/esm/models/security.d.ts +12 -0
- package/esm/models/security.d.ts.map +1 -0
- package/esm/models/security.js +12 -0
- package/esm/models/security.js.map +1 -0
- package/esm/sdk/campaigns.d.ts +35 -0
- package/esm/sdk/campaigns.d.ts.map +1 -0
- package/esm/sdk/campaigns.js +50 -0
- package/esm/sdk/campaigns.js.map +1 -0
- package/esm/sdk/index.d.ts +2 -0
- package/esm/sdk/index.d.ts.map +1 -0
- package/esm/sdk/index.js +5 -0
- package/esm/sdk/index.js.map +1 -0
- package/esm/sdk/linkedin-actions.d.ts +54 -0
- package/esm/sdk/linkedin-actions.d.ts.map +1 -0
- package/esm/sdk/linkedin-actions.js +78 -0
- package/esm/sdk/linkedin-actions.js.map +1 -0
- package/esm/sdk/linkedin-chat.d.ts +44 -0
- package/esm/sdk/linkedin-chat.d.ts.map +1 -0
- package/esm/sdk/linkedin-chat.js +59 -0
- package/esm/sdk/linkedin-chat.js.map +1 -0
- package/esm/sdk/linkedin-scrapers.d.ts +47 -0
- package/esm/sdk/linkedin-scrapers.d.ts.map +1 -0
- package/esm/sdk/linkedin-scrapers.js +68 -0
- package/esm/sdk/linkedin-scrapers.js.map +1 -0
- package/esm/sdk/linkedin-search.d.ts +424 -0
- package/esm/sdk/linkedin-search.d.ts.map +1 -0
- package/esm/sdk/linkedin-search.js +448 -0
- package/esm/sdk/linkedin-search.js.map +1 -0
- package/esm/sdk/profile.d.ts +47 -0
- package/esm/sdk/profile.d.ts.map +1 -0
- package/esm/sdk/profile.js +68 -0
- package/esm/sdk/profile.js.map +1 -0
- package/esm/sdk/sdk.d.ts +22 -0
- package/esm/sdk/sdk.d.ts.map +1 -0
- package/esm/sdk/sdk.js +37 -0
- package/esm/sdk/sdk.js.map +1 -0
- package/esm/types/async.d.ts +23 -0
- package/esm/types/async.d.ts.map +1 -0
- package/esm/types/async.js +28 -0
- package/esm/types/async.js.map +1 -0
- package/esm/types/blobs.d.ts +4 -0
- package/esm/types/blobs.d.ts.map +1 -0
- package/esm/types/blobs.js +25 -0
- package/esm/types/blobs.js.map +1 -0
- package/esm/types/const-date-time.d.ts +3 -0
- package/esm/types/const-date-time.d.ts.map +1 -0
- package/esm/types/const-date-time.js +10 -0
- package/esm/types/const-date-time.js.map +1 -0
- package/esm/types/default-to-zero-value.d.ts +12 -0
- package/esm/types/default-to-zero-value.d.ts.map +1 -0
- package/esm/types/default-to-zero-value.js +31 -0
- package/esm/types/default-to-zero-value.js.map +1 -0
- package/esm/types/enums.d.ts +9 -0
- package/esm/types/enums.d.ts.map +1 -0
- package/esm/types/enums.js +27 -0
- package/esm/types/enums.js.map +1 -0
- package/esm/types/fp.d.ts +31 -0
- package/esm/types/fp.d.ts.map +1 -0
- package/esm/types/fp.js +31 -0
- package/esm/types/fp.js.map +1 -0
- package/esm/types/index.d.ts +10 -0
- package/esm/types/index.d.ts.map +1 -0
- package/esm/types/index.js +10 -0
- package/esm/types/index.js.map +1 -0
- package/esm/types/operations.d.ts +27 -0
- package/esm/types/operations.d.ts.map +1 -0
- package/esm/types/operations.js +77 -0
- package/esm/types/operations.js.map +1 -0
- package/esm/types/primitives.d.ts +11 -0
- package/esm/types/primitives.d.ts.map +1 -0
- package/esm/types/primitives.js +132 -0
- package/esm/types/primitives.js.map +1 -0
- package/esm/types/rfcdate.d.ts +21 -0
- package/esm/types/rfcdate.d.ts.map +1 -0
- package/esm/types/rfcdate.js +43 -0
- package/esm/types/rfcdate.js.map +1 -0
- package/esm/types/smart-union.d.ts +7 -0
- package/esm/types/smart-union.d.ts.map +1 -0
- package/esm/types/smart-union.js +117 -0
- package/esm/types/smart-union.js.map +1 -0
- package/esm/types/streams.d.ts +2 -0
- package/esm/types/streams.d.ts.map +1 -0
- package/esm/types/streams.js +15 -0
- package/esm/types/streams.js.map +1 -0
- package/esm/types/unrecognized.d.ts +16 -0
- package/esm/types/unrecognized.d.ts.map +1 -0
- package/esm/types/unrecognized.js +31 -0
- package/esm/types/unrecognized.js.map +1 -0
- package/examples/linkedinScrapersCollectLikes.example.ts +30 -0
- package/jsr.json +27 -0
- package/package.json +62 -0
- package/src/core.ts +13 -0
- package/src/funcs/campaigns-filter.ts +227 -0
- package/src/funcs/campaigns-get-stats.ts +222 -0
- package/src/funcs/campaigns-get-status.ts +222 -0
- package/src/funcs/campaigns-sync-actions.ts +222 -0
- package/src/funcs/linkedin-actions-accept-invitation.ts +215 -0
- package/src/funcs/linkedin-actions-connect-profile.ts +215 -0
- package/src/funcs/linkedin-actions-like-comment.ts +215 -0
- package/src/funcs/linkedin-actions-list-invitations.ts +220 -0
- package/src/funcs/linkedin-actions-publish-post.ts +215 -0
- package/src/funcs/linkedin-actions-reply-to-comment.ts +215 -0
- package/src/funcs/linkedin-actions-send-message.ts +215 -0
- package/src/funcs/linkedin-chat-find-conversation.ts +222 -0
- package/src/funcs/linkedin-chat-get-messages.ts +219 -0
- package/src/funcs/linkedin-chat-list-conversations.ts +215 -0
- package/src/funcs/linkedin-chat-search-conversations.ts +218 -0
- package/src/funcs/linkedin-scrapers-collect-comment-replies.ts +218 -0
- package/src/funcs/linkedin-scrapers-collect-comments.ts +215 -0
- package/src/funcs/linkedin-scrapers-collect-likes.ts +215 -0
- package/src/funcs/linkedin-scrapers-collect-posts.ts +215 -0
- package/src/funcs/linkedin-scrapers-visit-company.ts +215 -0
- package/src/funcs/linkedin-scrapers-visit-profile.ts +215 -0
- package/src/funcs/linkedin-search-resolve-parameters.ts +250 -0
- package/src/funcs/linkedin-search-search-by-url.ts +266 -0
- package/src/funcs/linkedin-search-search-companies.ts +272 -0
- package/src/funcs/linkedin-search-search-jobs.ts +293 -0
- package/src/funcs/linkedin-search-search-people.ts +280 -0
- package/src/funcs/linkedin-search-search-posts.ts +268 -0
- package/src/funcs/linkedin-search-unified-search.ts +251 -0
- package/src/funcs/profile-get-credits.ts +195 -0
- package/src/funcs/profile-get-followers.ts +220 -0
- package/src/funcs/profile-get-limits.ts +195 -0
- package/src/funcs/profile-get-linked-in-profile.ts +195 -0
- package/src/funcs/profile-get-posts.ts +220 -0
- package/src/funcs/profile-refresh.ts +195 -0
- package/src/hooks/hooks.ts +132 -0
- package/src/hooks/index.ts +6 -0
- package/src/hooks/registration.ts +14 -0
- package/src/hooks/types.ts +107 -0
- package/src/index.ts +9 -0
- package/src/lib/base64.ts +39 -0
- package/src/lib/config.ts +67 -0
- package/src/lib/dlv.ts +53 -0
- package/src/lib/encodings.ts +501 -0
- package/src/lib/env.ts +57 -0
- package/src/lib/files.ts +82 -0
- package/src/lib/http.ts +323 -0
- package/src/lib/is-plain-object.ts +43 -0
- package/src/lib/logger.ts +9 -0
- package/src/lib/matchers.ts +353 -0
- package/src/lib/primitives.ts +150 -0
- package/src/lib/retries.ts +218 -0
- package/src/lib/schemas.ts +94 -0
- package/src/lib/sdks.ts +406 -0
- package/src/lib/security.ts +263 -0
- package/src/lib/url.ts +33 -0
- package/src/models/errors/bereach-default-error.ts +40 -0
- package/src/models/errors/bereach-error.ts +35 -0
- package/src/models/errors/collect-linked-in-likes.ts +494 -0
- package/src/models/errors/http-client-errors.ts +62 -0
- package/src/models/errors/index.ts +10 -0
- package/src/models/errors/response-validation-error.ts +50 -0
- package/src/models/errors/sdk-validation-error.ts +54 -0
- package/src/models/index.ts +5 -0
- package/src/models/operations/get-campaign-stats-response.ts +3409 -0
- package/src/models/operations/index.ts +6 -0
- package/src/models/operations/send-linked-in-message-response.ts +4903 -0
- package/src/models/security.ts +26 -0
- package/src/sdk/campaigns.ts +83 -0
- package/src/sdk/index.ts +5 -0
- package/src/sdk/linkedin-actions.ts +135 -0
- package/src/sdk/linkedin-chat.ts +92 -0
- package/src/sdk/linkedin-scrapers.ts +117 -0
- package/src/sdk/linkedin-search.ts +505 -0
- package/src/sdk/profile.ts +109 -0
- package/src/sdk/sdk.ts +43 -0
- package/src/types/async.ts +68 -0
- package/src/types/blobs.ts +33 -0
- package/src/types/const-date-time.ts +15 -0
- package/src/types/default-to-zero-value.ts +33 -0
- package/src/types/enums.ts +45 -0
- package/src/types/fp.ts +50 -0
- package/src/types/index.ts +13 -0
- package/src/types/operations.ts +105 -0
- package/src/types/primitives.ts +168 -0
- package/src/types/rfcdate.ts +54 -0
- package/src/types/smart-union.ts +153 -0
- package/src/types/streams.ts +21 -0
- package/src/types/unrecognized.ts +35 -0
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
const dateRE = /^\d{4}-\d{2}-\d{2}$/;
|
|
5
|
+
export class RFCDate {
|
|
6
|
+
serialized;
|
|
7
|
+
/**
|
|
8
|
+
* Creates a new RFCDate instance using today's date.
|
|
9
|
+
*/
|
|
10
|
+
static today() {
|
|
11
|
+
return new RFCDate(new Date());
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Creates a new RFCDate instance using the provided input.
|
|
15
|
+
* If a string is used then in must be in the format YYYY-MM-DD.
|
|
16
|
+
*
|
|
17
|
+
* @param date A Date object or a date string in YYYY-MM-DD format
|
|
18
|
+
* @example
|
|
19
|
+
* new RFCDate("2022-01-01")
|
|
20
|
+
* @example
|
|
21
|
+
* new RFCDate(new Date())
|
|
22
|
+
*/
|
|
23
|
+
constructor(date) {
|
|
24
|
+
if (typeof date === "string" && !dateRE.test(date)) {
|
|
25
|
+
throw new RangeError("RFCDate: date strings must be in the format YYYY-MM-DD: " + date);
|
|
26
|
+
}
|
|
27
|
+
const value = new Date(date);
|
|
28
|
+
if (isNaN(+value)) {
|
|
29
|
+
throw new RangeError("RFCDate: invalid date provided: " + date);
|
|
30
|
+
}
|
|
31
|
+
this.serialized = value.toISOString().slice(0, "YYYY-MM-DD".length);
|
|
32
|
+
if (!dateRE.test(this.serialized)) {
|
|
33
|
+
throw new TypeError(`RFCDate: failed to build valid date with given value: ${date} serialized to ${this.serialized}`);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
toJSON() {
|
|
37
|
+
return this.toString();
|
|
38
|
+
}
|
|
39
|
+
toString() {
|
|
40
|
+
return this.serialized;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
//# sourceMappingURL=rfcdate.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rfcdate.js","sourceRoot":"","sources":["../../src/types/rfcdate.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,MAAM,GAAG,qBAAqB,CAAC;AAErC,MAAM,OAAO,OAAO;IACV,UAAU,CAAS;IAE3B;;OAEG;IACH,MAAM,CAAC,KAAK,GAAY;QACtB,OAAO,IAAI,OAAO,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC;IAAA,CAChC;IAED;;;;;;;;;OASG;IACH,YAAY,IAAmB,EAAE;QAC/B,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;YACnD,MAAM,IAAI,UAAU,CAClB,0DAA0D,GAAG,IAAI,CAClE,CAAC;QACJ,CAAC;QAED,MAAM,KAAK,GAAG,IAAI,IAAI,CAAC,IAAI,CAAC,CAAC;QAC7B,IAAI,KAAK,CAAC,CAAC,KAAK,CAAC,EAAE,CAAC;YAClB,MAAM,IAAI,UAAU,CAAC,kCAAkC,GAAG,IAAI,CAAC,CAAC;QAClE,CAAC;QAED,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC,WAAW,EAAE,CAAC,KAAK,CAAC,CAAC,EAAE,YAAY,CAAC,MAAM,CAAC,CAAC;QACpE,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,EAAE,CAAC;YAClC,MAAM,IAAI,SAAS,CACjB,yDAAyD,IAAI,kBAAkB,IAAI,CAAC,UAAU,EAAE,CACjG,CAAC;QACJ,CAAC;IAAA,CACF;IAED,MAAM,GAAW;QACf,OAAO,IAAI,CAAC,QAAQ,EAAE,CAAC;IAAA,CACxB;IAED,QAAQ,GAAW;QACjB,OAAO,IAAI,CAAC,UAAU,CAAC;IAAA,CACxB;CACF"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as z from "zod/v4-mini";
|
|
2
|
+
/**
|
|
3
|
+
* Smart union parser that tries all schemas and returns the best match
|
|
4
|
+
* based on the number of populated fields.
|
|
5
|
+
*/
|
|
6
|
+
export declare function smartUnion<Options extends readonly [z.ZodMiniType, z.ZodMiniType, ...z.ZodMiniType[]]>(options: Options): z.ZodMiniType<z.output<Options[number]>, z.input<Options[number]>>;
|
|
7
|
+
//# sourceMappingURL=smart-union.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"smart-union.d.ts","sourceRoot":"","sources":["../../src/types/smart-union.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,CAAC,MAAM,aAAa,CAAC;AAejC;;;GAGG;AACH,wBAAgB,UAAU,CACxB,OAAO,SAAS,SAAS,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC,WAAW,EAAE,GAAG,CAAC,CAAC,WAAW,EAAE,CAAC,EAE3E,OAAO,EAAE,OAAO,GACf,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,CA2DpE"}
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
// Not needed if lax mode
|
|
5
|
+
import * as z from "zod/v4-mini";
|
|
6
|
+
import { startCountingDefaultToZeroValue } from "./default-to-zero-value.js";
|
|
7
|
+
import { RFCDate } from "./rfcdate.js";
|
|
8
|
+
import { startCountingUnrecognized } from "./unrecognized.js";
|
|
9
|
+
/**
|
|
10
|
+
* Smart union parser that tries all schemas and returns the best match
|
|
11
|
+
* based on the number of populated fields.
|
|
12
|
+
*/
|
|
13
|
+
export function smartUnion(options) {
|
|
14
|
+
return z.pipe(z.unknown(), z.transform((input, ctx) => {
|
|
15
|
+
const candidates = [];
|
|
16
|
+
const errors = options.map(() => []);
|
|
17
|
+
const parentUnrecognizedCtr = startCountingUnrecognized();
|
|
18
|
+
const parentZeroDefaultCtr = startCountingDefaultToZeroValue();
|
|
19
|
+
// Filter out invalid options
|
|
20
|
+
for (const [i, option] of options.entries()) {
|
|
21
|
+
const unrecognizedCtr = startCountingUnrecognized();
|
|
22
|
+
const zeroDefaultCtr = startCountingDefaultToZeroValue();
|
|
23
|
+
const result = option.safeParse(input);
|
|
24
|
+
const inexactCount = unrecognizedCtr.end();
|
|
25
|
+
const zeroDefaultCount = zeroDefaultCtr.end();
|
|
26
|
+
if (result.success) {
|
|
27
|
+
candidates.push({
|
|
28
|
+
data: result.data,
|
|
29
|
+
inexactCount,
|
|
30
|
+
zeroDefaultCount,
|
|
31
|
+
fieldCount: -1, // We'll count this later if needed
|
|
32
|
+
});
|
|
33
|
+
continue;
|
|
34
|
+
}
|
|
35
|
+
errors[i].push(...result.error.issues);
|
|
36
|
+
}
|
|
37
|
+
// No valid options
|
|
38
|
+
if (candidates.length === 0) {
|
|
39
|
+
parentUnrecognizedCtr.end(0);
|
|
40
|
+
parentZeroDefaultCtr.end(0);
|
|
41
|
+
ctx.issues.push({
|
|
42
|
+
input: input,
|
|
43
|
+
code: "invalid_union",
|
|
44
|
+
errors: errors,
|
|
45
|
+
});
|
|
46
|
+
return z.NEVER;
|
|
47
|
+
}
|
|
48
|
+
let best = candidates[0];
|
|
49
|
+
// Find the best option
|
|
50
|
+
for (const candidate of candidates) {
|
|
51
|
+
// Minor optimization to avoid counting fields if there's only one candidate
|
|
52
|
+
if (candidates.length > 1) {
|
|
53
|
+
candidate.fieldCount = countFieldsRecursive(candidate.data);
|
|
54
|
+
}
|
|
55
|
+
best = better(candidate, best);
|
|
56
|
+
}
|
|
57
|
+
// The cost of this union should be the cost of the best candidate not all the candidates
|
|
58
|
+
parentUnrecognizedCtr.end(best.inexactCount);
|
|
59
|
+
parentZeroDefaultCtr.end(best.zeroDefaultCount);
|
|
60
|
+
return best.data;
|
|
61
|
+
}));
|
|
62
|
+
}
|
|
63
|
+
function better(a, b) {
|
|
64
|
+
// First prefer exact matches over inexact ones
|
|
65
|
+
const aIsExact = a.inexactCount === 0;
|
|
66
|
+
const bIsExact = b.inexactCount === 0;
|
|
67
|
+
if (aIsExact !== bIsExact) {
|
|
68
|
+
return aIsExact ? a : b;
|
|
69
|
+
}
|
|
70
|
+
// Then compare field counts
|
|
71
|
+
const actualFieldCountA = a.fieldCount - a.zeroDefaultCount;
|
|
72
|
+
const actualFieldCountB = b.fieldCount - b.zeroDefaultCount;
|
|
73
|
+
if (actualFieldCountA !== actualFieldCountB) {
|
|
74
|
+
return actualFieldCountA > actualFieldCountB ? a : b;
|
|
75
|
+
}
|
|
76
|
+
return a.inexactCount < b.inexactCount ? a : b;
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Counts the number of fields in a parsed value recursively.
|
|
80
|
+
* @param `parsed` assumed to *not* contain cycles
|
|
81
|
+
* fieldCount: total number of fields found
|
|
82
|
+
* inexactCount: number of primitive values that are not unrecognized enum values
|
|
83
|
+
*/
|
|
84
|
+
function countFieldsRecursive(parsed) {
|
|
85
|
+
let fieldCount = 0;
|
|
86
|
+
const queue = [parsed];
|
|
87
|
+
let index = 0;
|
|
88
|
+
while (index < queue.length) {
|
|
89
|
+
const value = queue[index++];
|
|
90
|
+
if (value === undefined) {
|
|
91
|
+
continue;
|
|
92
|
+
}
|
|
93
|
+
// Check if it's a primitive value
|
|
94
|
+
const type = typeof value;
|
|
95
|
+
if (value === null
|
|
96
|
+
|| type === "number"
|
|
97
|
+
|| type === "string"
|
|
98
|
+
|| type === "boolean"
|
|
99
|
+
|| type === "bigint"
|
|
100
|
+
|| value instanceof Date
|
|
101
|
+
|| value instanceof RFCDate) {
|
|
102
|
+
fieldCount++;
|
|
103
|
+
continue;
|
|
104
|
+
}
|
|
105
|
+
// Handle arrays
|
|
106
|
+
if (Array.isArray(value)) {
|
|
107
|
+
queue.push(...value);
|
|
108
|
+
continue;
|
|
109
|
+
}
|
|
110
|
+
// Handle objects
|
|
111
|
+
if (type === "object") {
|
|
112
|
+
queue.push(...Object.values(value));
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
return fieldCount;
|
|
116
|
+
}
|
|
117
|
+
//# sourceMappingURL=smart-union.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"smart-union.js","sourceRoot":"","sources":["../../src/types/smart-union.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"streams.d.ts","sourceRoot":"","sources":["../../src/types/streams.ts"],"names":[],"mappings":"AAIA,wBAAgB,gBAAgB,CAAC,CAAC,GAAG,UAAU,EAC7C,GAAG,EAAE,OAAO,GACX,GAAG,IAAI,cAAc,CAAC,CAAC,CAAC,CAc1B"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
export function isReadableStream(val) {
|
|
5
|
+
if (typeof val !== "object" || val === null) {
|
|
6
|
+
return false;
|
|
7
|
+
}
|
|
8
|
+
// Check for the presence of methods specific to ReadableStream
|
|
9
|
+
const stream = val;
|
|
10
|
+
// ReadableStream has methods like getReader, cancel, and tee
|
|
11
|
+
return (typeof stream.getReader === "function" &&
|
|
12
|
+
typeof stream.cancel === "function" &&
|
|
13
|
+
typeof stream.tee === "function");
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=streams.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"streams.js","sourceRoot":"","sources":["../../src/types/streams.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,UAAU,gBAAgB,CAC9B,GAAY,EACc;IAC1B,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,GAAG,KAAK,IAAI,EAAE,CAAC;QAC5C,OAAO,KAAK,CAAC;IACf,CAAC;IAED,+DAA+D;IAC/D,MAAM,MAAM,GAAG,GAAiC,CAAC;IAEjD,6DAA6D;IAC7D,OAAO,CACL,OAAO,MAAM,CAAC,SAAS,KAAK,UAAU;QACtC,OAAO,MAAM,CAAC,MAAM,KAAK,UAAU;QACnC,OAAO,MAAM,CAAC,GAAG,KAAK,UAAU,CACjC,CAAC;AAAA,CACH"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
declare const __brand: unique symbol;
|
|
2
|
+
export type Unrecognized<T> = T & {
|
|
3
|
+
[__brand]: "unrecognized";
|
|
4
|
+
};
|
|
5
|
+
declare function unrecognized<T>(value: T): Unrecognized<T>;
|
|
6
|
+
export declare function startCountingUnrecognized(): {
|
|
7
|
+
/**
|
|
8
|
+
* Ends counting and returns the delta.
|
|
9
|
+
* @param delta - If provided, only this amount is added to the parent counter
|
|
10
|
+
* (used for nested unions where we only want to record the winning option's count).
|
|
11
|
+
* If not provided, records all counts since start().
|
|
12
|
+
*/
|
|
13
|
+
end: (delta?: number | undefined) => number;
|
|
14
|
+
};
|
|
15
|
+
export { unrecognized };
|
|
16
|
+
//# sourceMappingURL=unrecognized.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"unrecognized.d.ts","sourceRoot":"","sources":["../../src/types/unrecognized.ts"],"names":[],"mappings":"AAIA,OAAO,CAAC,MAAM,OAAO,EAAE,OAAO,MAAM,CAAC;AACrC,MAAM,MAAM,YAAY,CAAC,CAAC,IAAI,CAAC,GAAG;IAAE,CAAC,OAAO,CAAC,EAAE,cAAc,CAAA;CAAE,CAAC;AAEhE,iBAAS,YAAY,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG,YAAY,CAAC,CAAC,CAAC,CAGlD;AAID,wBAAgB,yBAAyB;IAIrC;;;;;OAKG;;EASN;AAED,OAAO,EAAE,YAAY,EAAE,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
function unrecognized(value) {
|
|
5
|
+
globalCount++;
|
|
6
|
+
return value;
|
|
7
|
+
}
|
|
8
|
+
let globalCount = 0;
|
|
9
|
+
let refCount = 0;
|
|
10
|
+
export function startCountingUnrecognized() {
|
|
11
|
+
refCount++;
|
|
12
|
+
const start = globalCount;
|
|
13
|
+
return {
|
|
14
|
+
/**
|
|
15
|
+
* Ends counting and returns the delta.
|
|
16
|
+
* @param delta - If provided, only this amount is added to the parent counter
|
|
17
|
+
* (used for nested unions where we only want to record the winning option's count).
|
|
18
|
+
* If not provided, records all counts since start().
|
|
19
|
+
*/
|
|
20
|
+
end: (delta) => {
|
|
21
|
+
const count = globalCount - start;
|
|
22
|
+
// Reset globalCount back to start, then add only the specified delta
|
|
23
|
+
globalCount = start + (delta ?? count);
|
|
24
|
+
if (--refCount === 0)
|
|
25
|
+
globalCount = 0;
|
|
26
|
+
return count;
|
|
27
|
+
},
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
export { unrecognized };
|
|
31
|
+
//# sourceMappingURL=unrecognized.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"unrecognized.js","sourceRoot":"","sources":["../../src/types/unrecognized.ts"],"names":[],"mappings":"AAAA;;GAEG;AAKH,SAAS,YAAY,CAAI,KAAQ,EAAmB;IAClD,WAAW,EAAE,CAAC;IACd,OAAO,KAAwB,CAAC;AAAA,CACjC;AAED,IAAI,WAAW,GAAG,CAAC,CAAC;AACpB,IAAI,QAAQ,GAAG,CAAC,CAAC;AACjB,MAAM,UAAU,yBAAyB,GAAG;IAC1C,QAAQ,EAAE,CAAC;IACX,MAAM,KAAK,GAAG,WAAW,CAAC;IAC1B,OAAO;QACL;;;;;WAKG;QACH,GAAG,EAAE,CAAC,KAAc,EAAE,EAAE,CAAC;YACvB,MAAM,KAAK,GAAG,WAAW,GAAG,KAAK,CAAC;YAClC,qEAAqE;YACrE,WAAW,GAAG,KAAK,GAAG,CAAC,KAAK,IAAI,KAAK,CAAC,CAAC;YACvC,IAAI,EAAE,QAAQ,KAAK,CAAC;gBAAE,WAAW,GAAG,CAAC,CAAC;YACtC,OAAO,KAAK,CAAC;QAAA,CACd;KACF,CAAC;AAAA,CACH;AAED,OAAO,EAAE,YAAY,EAAE,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import dotenv from "dotenv";
|
|
6
|
+
dotenv.config();
|
|
7
|
+
/**
|
|
8
|
+
* Example usage of the bereach SDK
|
|
9
|
+
*
|
|
10
|
+
* To run this example from the examples directory:
|
|
11
|
+
* npm run build && npx tsx linkedinScrapersCollectLikes.example.ts
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
import { Bereach } from "bereach";
|
|
15
|
+
|
|
16
|
+
const bereach = new Bereach({
|
|
17
|
+
token: "BEREACH_API_KEY",
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
async function main() {
|
|
21
|
+
const result = await bereach.linkedinScrapers.collectLikes({
|
|
22
|
+
postUrl:
|
|
23
|
+
"https://www.linkedin.com/feed/update/urn:li:activity:1234567890123456789/",
|
|
24
|
+
start: 0,
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
console.log(result);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
main().catch(console.error);
|
package/jsr.json
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
{
|
|
4
|
+
"name": "bereach",
|
|
5
|
+
"version": "0.1.1",
|
|
6
|
+
"exports": {
|
|
7
|
+
".": "./src/index.ts",
|
|
8
|
+
"./models/errors": "./src/models/errors/index.ts",
|
|
9
|
+
"./models": "./src/models/index.ts",
|
|
10
|
+
"./models/operations": "./src/models/operations/index.ts",
|
|
11
|
+
"./lib/config": "./src/lib/config.ts",
|
|
12
|
+
"./lib/http": "./src/lib/http.ts",
|
|
13
|
+
"./lib/retries": "./src/lib/retries.ts",
|
|
14
|
+
"./lib/sdks": "./src/lib/sdks.ts",
|
|
15
|
+
"./types": "./src/types/index.ts"
|
|
16
|
+
},
|
|
17
|
+
"publish": {
|
|
18
|
+
"include": [
|
|
19
|
+
"LICENSE",
|
|
20
|
+
"README.md",
|
|
21
|
+
"RUNTIMES.md",
|
|
22
|
+
"USAGE.md",
|
|
23
|
+
"jsr.json",
|
|
24
|
+
"src/**/*.ts"
|
|
25
|
+
]
|
|
26
|
+
}
|
|
27
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "bereach",
|
|
3
|
+
"version": "0.1.1",
|
|
4
|
+
"author": "Speakeasy",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./esm/index.js",
|
|
7
|
+
"exports": {
|
|
8
|
+
".": {
|
|
9
|
+
"source": "./src/index.ts",
|
|
10
|
+
"types": "./esm/index.d.ts",
|
|
11
|
+
"default": "./esm/index.js"
|
|
12
|
+
},
|
|
13
|
+
"./package.json": "./package.json",
|
|
14
|
+
"./types": {
|
|
15
|
+
"source": "./src/types/index.ts",
|
|
16
|
+
"types": "./esm/types/index.d.ts",
|
|
17
|
+
"default": "./esm/types/index.js"
|
|
18
|
+
},
|
|
19
|
+
"./models/errors": {
|
|
20
|
+
"source": "./src/models/errors/index.ts",
|
|
21
|
+
"types": "./esm/models/errors/index.d.ts",
|
|
22
|
+
"default": "./esm/models/errors/index.js"
|
|
23
|
+
},
|
|
24
|
+
"./models": {
|
|
25
|
+
"source": "./src/models/index.ts",
|
|
26
|
+
"types": "./esm/models/index.d.ts",
|
|
27
|
+
"default": "./esm/models/index.js"
|
|
28
|
+
},
|
|
29
|
+
"./models/operations": {
|
|
30
|
+
"source": "./src/models/operations/index.ts",
|
|
31
|
+
"types": "./esm/models/operations/index.d.ts",
|
|
32
|
+
"default": "./esm/models/operations/index.js"
|
|
33
|
+
},
|
|
34
|
+
"./*.js": {
|
|
35
|
+
"source": "./src/*.ts",
|
|
36
|
+
"types": "./esm/*.d.ts",
|
|
37
|
+
"default": "./esm/*.js"
|
|
38
|
+
},
|
|
39
|
+
"./*": {
|
|
40
|
+
"source": "./src/*.ts",
|
|
41
|
+
"types": "./esm/*.d.ts",
|
|
42
|
+
"default": "./esm/*.js"
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
"sideEffects": false,
|
|
46
|
+
"scripts": {
|
|
47
|
+
"lint": "oxlint --max-warnings=0 --deny-warnings 'src/**/*.{ts,tsx}'",
|
|
48
|
+
"build": "tsgo",
|
|
49
|
+
"prepublishOnly": "npm run build"
|
|
50
|
+
},
|
|
51
|
+
"peerDependencies": {
|
|
52
|
+
|
|
53
|
+
},
|
|
54
|
+
"devDependencies": {
|
|
55
|
+
"@typescript/native-preview": "7.0.0-dev.20260302.1",
|
|
56
|
+
"oxlint": "^1.50.0",
|
|
57
|
+
"typescript": "~5.8.3"
|
|
58
|
+
},
|
|
59
|
+
"dependencies": {
|
|
60
|
+
"zod": "^3.25.65 || ^4.0.0"
|
|
61
|
+
}
|
|
62
|
+
}
|
package/src/core.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { ClientSDK } from "./lib/sdks.js";
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* A minimal client to use when calling standalone SDK functions. Typically, an
|
|
9
|
+
* instance of this class would be instantiated once at the start of an
|
|
10
|
+
* application and passed around through some dependency injection mechanism to
|
|
11
|
+
* parts of an application that need to make SDK calls.
|
|
12
|
+
*/
|
|
13
|
+
export class BereachCore extends ClientSDK {}
|
|
@@ -0,0 +1,227 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v4-mini";
|
|
6
|
+
import { BereachCore } from "../core.js";
|
|
7
|
+
import { encodeFormQuery, encodeSimple } from "../lib/encodings.js";
|
|
8
|
+
import * as M from "../lib/matchers.js";
|
|
9
|
+
import { compactMap } from "../lib/primitives.js";
|
|
10
|
+
import { safeParse } from "../lib/schemas.js";
|
|
11
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
12
|
+
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
13
|
+
import { pathToFunc } from "../lib/url.js";
|
|
14
|
+
import { BereachError } from "../models/errors/bereach-error.js";
|
|
15
|
+
import {
|
|
16
|
+
ConnectionError,
|
|
17
|
+
InvalidRequestError,
|
|
18
|
+
RequestAbortedError,
|
|
19
|
+
RequestTimeoutError,
|
|
20
|
+
UnexpectedClientError,
|
|
21
|
+
} from "../models/errors/http-client-errors.js";
|
|
22
|
+
import * as errors from "../models/errors/index.js";
|
|
23
|
+
import { ResponseValidationError } from "../models/errors/response-validation-error.js";
|
|
24
|
+
import { SDKValidationError } from "../models/errors/sdk-validation-error.js";
|
|
25
|
+
import * as operations from "../models/operations/index.js";
|
|
26
|
+
import { APICall, APIPromise } from "../types/async.js";
|
|
27
|
+
import { Result } from "../types/fp.js";
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Check if campaign actions are completed
|
|
31
|
+
*
|
|
32
|
+
* @remarks
|
|
33
|
+
* Check if all provided actionSlugs are completed for a given campaignSlug. Used by n8n workflows to determine if a flow should be skipped.
|
|
34
|
+
*
|
|
35
|
+
* @deprecated method: This will be removed in a future release, please migrate away from it as soon as possible.
|
|
36
|
+
*/
|
|
37
|
+
export function campaignsFilter(
|
|
38
|
+
client: BereachCore,
|
|
39
|
+
request: operations.FilterCampaignRequest,
|
|
40
|
+
options?: RequestOptions,
|
|
41
|
+
): APIPromise<
|
|
42
|
+
Result<
|
|
43
|
+
operations.FilterCampaignResponse,
|
|
44
|
+
| errors.BadRequestError
|
|
45
|
+
| errors.UnauthorizedError
|
|
46
|
+
| errors.ForbiddenError
|
|
47
|
+
| errors.NotFoundError
|
|
48
|
+
| errors.ConflictError
|
|
49
|
+
| errors.GoneError
|
|
50
|
+
| errors.UnprocessableEntityError
|
|
51
|
+
| errors.TooManyRequestsError
|
|
52
|
+
| errors.InternalServerError
|
|
53
|
+
| BereachError
|
|
54
|
+
| ResponseValidationError
|
|
55
|
+
| ConnectionError
|
|
56
|
+
| RequestAbortedError
|
|
57
|
+
| RequestTimeoutError
|
|
58
|
+
| InvalidRequestError
|
|
59
|
+
| UnexpectedClientError
|
|
60
|
+
| SDKValidationError
|
|
61
|
+
>
|
|
62
|
+
> {
|
|
63
|
+
return new APIPromise($do(
|
|
64
|
+
client,
|
|
65
|
+
request,
|
|
66
|
+
options,
|
|
67
|
+
));
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
async function $do(
|
|
71
|
+
client: BereachCore,
|
|
72
|
+
request: operations.FilterCampaignRequest,
|
|
73
|
+
options?: RequestOptions,
|
|
74
|
+
): Promise<
|
|
75
|
+
[
|
|
76
|
+
Result<
|
|
77
|
+
operations.FilterCampaignResponse,
|
|
78
|
+
| errors.BadRequestError
|
|
79
|
+
| errors.UnauthorizedError
|
|
80
|
+
| errors.ForbiddenError
|
|
81
|
+
| errors.NotFoundError
|
|
82
|
+
| errors.ConflictError
|
|
83
|
+
| errors.GoneError
|
|
84
|
+
| errors.UnprocessableEntityError
|
|
85
|
+
| errors.TooManyRequestsError
|
|
86
|
+
| errors.InternalServerError
|
|
87
|
+
| BereachError
|
|
88
|
+
| ResponseValidationError
|
|
89
|
+
| ConnectionError
|
|
90
|
+
| RequestAbortedError
|
|
91
|
+
| RequestTimeoutError
|
|
92
|
+
| InvalidRequestError
|
|
93
|
+
| UnexpectedClientError
|
|
94
|
+
| SDKValidationError
|
|
95
|
+
>,
|
|
96
|
+
APICall,
|
|
97
|
+
]
|
|
98
|
+
> {
|
|
99
|
+
const parsed = safeParse(
|
|
100
|
+
request,
|
|
101
|
+
(value) => z.parse(operations.FilterCampaignRequest$outboundSchema, value),
|
|
102
|
+
"Input validation failed",
|
|
103
|
+
);
|
|
104
|
+
if (!parsed.ok) {
|
|
105
|
+
return [parsed, { status: "invalid" }];
|
|
106
|
+
}
|
|
107
|
+
const payload = parsed.value;
|
|
108
|
+
const body = null;
|
|
109
|
+
|
|
110
|
+
const pathParams = {
|
|
111
|
+
campaignSlug: encodeSimple("campaignSlug", payload.campaignSlug, {
|
|
112
|
+
explode: false,
|
|
113
|
+
charEncoding: "percent",
|
|
114
|
+
}),
|
|
115
|
+
};
|
|
116
|
+
|
|
117
|
+
const path = pathToFunc("/campaigns/{campaignSlug}/filter")(pathParams);
|
|
118
|
+
|
|
119
|
+
const query = encodeFormQuery({
|
|
120
|
+
"actionSlugs": payload.actionSlugs,
|
|
121
|
+
});
|
|
122
|
+
|
|
123
|
+
const headers = new Headers(compactMap({
|
|
124
|
+
Accept: "application/json",
|
|
125
|
+
}));
|
|
126
|
+
|
|
127
|
+
const secConfig = await extractSecurity(client._options.token);
|
|
128
|
+
const securityInput = secConfig == null ? {} : { token: secConfig };
|
|
129
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
130
|
+
|
|
131
|
+
const context = {
|
|
132
|
+
options: client._options,
|
|
133
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
134
|
+
operationID: "filterCampaign",
|
|
135
|
+
oAuth2Scopes: null,
|
|
136
|
+
|
|
137
|
+
resolvedSecurity: requestSecurity,
|
|
138
|
+
|
|
139
|
+
securitySource: client._options.token,
|
|
140
|
+
retryConfig: options?.retries
|
|
141
|
+
|| client._options.retryConfig
|
|
142
|
+
|| { strategy: "none" },
|
|
143
|
+
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
144
|
+
};
|
|
145
|
+
|
|
146
|
+
const requestRes = client._createRequest(context, {
|
|
147
|
+
security: requestSecurity,
|
|
148
|
+
method: "GET",
|
|
149
|
+
baseURL: options?.serverURL,
|
|
150
|
+
path: path,
|
|
151
|
+
headers: headers,
|
|
152
|
+
query: query,
|
|
153
|
+
body: body,
|
|
154
|
+
userAgent: client._options.userAgent,
|
|
155
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
156
|
+
}, options);
|
|
157
|
+
if (!requestRes.ok) {
|
|
158
|
+
return [requestRes, { status: "invalid" }];
|
|
159
|
+
}
|
|
160
|
+
const req = requestRes.value;
|
|
161
|
+
|
|
162
|
+
const doResult = await client._do(req, {
|
|
163
|
+
context,
|
|
164
|
+
errorCodes: [
|
|
165
|
+
"400",
|
|
166
|
+
"401",
|
|
167
|
+
"403",
|
|
168
|
+
"404",
|
|
169
|
+
"409",
|
|
170
|
+
"410",
|
|
171
|
+
"422",
|
|
172
|
+
"429",
|
|
173
|
+
"4XX",
|
|
174
|
+
"500",
|
|
175
|
+
"5XX",
|
|
176
|
+
],
|
|
177
|
+
retryConfig: context.retryConfig,
|
|
178
|
+
retryCodes: context.retryCodes,
|
|
179
|
+
});
|
|
180
|
+
if (!doResult.ok) {
|
|
181
|
+
return [doResult, { status: "request-error", request: req }];
|
|
182
|
+
}
|
|
183
|
+
const response = doResult.value;
|
|
184
|
+
|
|
185
|
+
const responseFields = {
|
|
186
|
+
HttpMeta: { Response: response, Request: req },
|
|
187
|
+
};
|
|
188
|
+
|
|
189
|
+
const [result] = await M.match<
|
|
190
|
+
operations.FilterCampaignResponse,
|
|
191
|
+
| errors.BadRequestError
|
|
192
|
+
| errors.UnauthorizedError
|
|
193
|
+
| errors.ForbiddenError
|
|
194
|
+
| errors.NotFoundError
|
|
195
|
+
| errors.ConflictError
|
|
196
|
+
| errors.GoneError
|
|
197
|
+
| errors.UnprocessableEntityError
|
|
198
|
+
| errors.TooManyRequestsError
|
|
199
|
+
| errors.InternalServerError
|
|
200
|
+
| BereachError
|
|
201
|
+
| ResponseValidationError
|
|
202
|
+
| ConnectionError
|
|
203
|
+
| RequestAbortedError
|
|
204
|
+
| RequestTimeoutError
|
|
205
|
+
| InvalidRequestError
|
|
206
|
+
| UnexpectedClientError
|
|
207
|
+
| SDKValidationError
|
|
208
|
+
>(
|
|
209
|
+
M.json(200, operations.FilterCampaignResponse$inboundSchema),
|
|
210
|
+
M.jsonErr(400, errors.BadRequestError$inboundSchema),
|
|
211
|
+
M.jsonErr(401, errors.UnauthorizedError$inboundSchema),
|
|
212
|
+
M.jsonErr(403, errors.ForbiddenError$inboundSchema),
|
|
213
|
+
M.jsonErr(404, errors.NotFoundError$inboundSchema),
|
|
214
|
+
M.jsonErr(409, errors.ConflictError$inboundSchema),
|
|
215
|
+
M.jsonErr(410, errors.GoneError$inboundSchema),
|
|
216
|
+
M.jsonErr(422, errors.UnprocessableEntityError$inboundSchema),
|
|
217
|
+
M.jsonErr(429, errors.TooManyRequestsError$inboundSchema),
|
|
218
|
+
M.jsonErr(500, errors.InternalServerError$inboundSchema),
|
|
219
|
+
M.fail("4XX"),
|
|
220
|
+
M.fail("5XX"),
|
|
221
|
+
)(response, req, { extraFields: responseFields });
|
|
222
|
+
if (!result.ok) {
|
|
223
|
+
return [result, { status: "complete", request: req, response }];
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
return [result, { status: "complete", request: req, response }];
|
|
227
|
+
}
|