@8ms/helpers 2.2.26 → 2.3.3
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/.yarn/install-state.gz +0 -0
- package/_class/index.d.ts +2 -2
- package/_class/index.js +2 -2
- package/adverity/adverity.d.ts +112 -0
- package/adverity/adverity.js +58 -0
- package/adverity/index.d.ts +1 -112
- package/adverity/index.js +1 -58
- package/adverity/server/index.d.ts +1 -1
- package/adverity/server/index.js +1 -1
- package/api/ApiResponseClass.d.ts +1 -1
- package/api/ApiResponseClass.js +12 -12
- package/api/{types.d.ts → api.d.ts} +2 -2
- package/api/{types.js → api.js} +2 -2
- package/api/functions.d.ts +1 -1
- package/api/functions.js +7 -7
- package/api/index.d.ts +1 -1
- package/api/index.js +1 -1
- package/array/array.d.ts +8 -0
- package/array/array.js +9 -0
- package/array/index.d.ts +1 -8
- package/array/index.js +1 -9
- package/atInternet/atInternet.d.ts +16 -0
- package/atInternet/atInternet.js +15 -0
- package/atInternet/index.d.ts +1 -16
- package/atInternet/index.js +1 -15
- package/aws/ec2/server/awsEc2.d.ts +3 -0
- package/aws/ec2/server/awsEc2.js +12 -0
- package/aws/ec2/server/index.d.ts +2 -3
- package/aws/ec2/server/index.js +2 -12
- package/aws/ecs/server/awsEcs.d.ts +3 -0
- package/aws/ecs/server/awsEcs.js +12 -0
- package/aws/ecs/server/index.d.ts +2 -3
- package/aws/ecs/server/index.js +2 -12
- package/aws/glue/server/awsGlue.d.ts +3 -0
- package/aws/glue/server/awsGlue.js +12 -0
- package/aws/glue/server/index.d.ts +2 -3
- package/aws/glue/server/index.js +2 -12
- package/aws/lambda/server/awsLambda.d.ts +4 -0
- package/aws/lambda/server/awsLambda.js +16 -0
- package/aws/lambda/server/index.d.ts +2 -4
- package/aws/lambda/server/index.js +2 -16
- package/aws/s3/server/awsS3.d.ts +13 -0
- package/aws/s3/server/awsS3.js +20 -0
- package/aws/s3/server/index.d.ts +3 -13
- package/aws/s3/server/index.js +3 -20
- package/aws/server/aws.d.ts +9 -0
- package/aws/server/aws.js +29 -0
- package/aws/server/index.d.ts +2 -9
- package/aws/server/index.js +2 -29
- package/aws/ses/server/awsSes.d.ts +4 -0
- package/aws/ses/server/awsSes.js +13 -0
- package/aws/ses/server/index.d.ts +3 -4
- package/aws/ses/server/index.js +3 -13
- package/aws/sqs/server/awsSqs.d.ts +3 -0
- package/aws/sqs/server/awsSqs.js +12 -0
- package/aws/sqs/server/index.d.ts +2 -3
- package/aws/sqs/server/index.js +2 -12
- package/aws/ssm/server/awsSsm.d.ts +3 -0
- package/aws/ssm/server/awsSsm.js +12 -0
- package/aws/ssm/server/index.d.ts +2 -3
- package/aws/ssm/server/index.js +2 -12
- package/axios/index.d.ts +3 -3
- package/axios/index.js +3 -3
- package/boolean/boolean.d.ts +4 -0
- package/boolean/boolean.js +16 -0
- package/boolean/index.d.ts +1 -4
- package/boolean/index.js +1 -16
- package/brightData/serpApi/server/brightDataSerpApi.d.ts +10 -0
- package/brightData/serpApi/server/brightDataSerpApi.js +9 -0
- package/brightData/serpApi/server/getAsyncRequestId.js +2 -2
- package/brightData/serpApi/server/index.d.ts +6 -15
- package/brightData/serpApi/server/index.js +6 -14
- package/brightData/server/brightData.d.ts +15 -0
- package/brightData/server/brightData.js +15 -0
- package/brightData/server/index.d.ts +1 -15
- package/brightData/server/index.js +1 -15
- package/brightData/webScraperIde/server/getRealtime.js +5 -5
- package/brightData/webScraperIde/server/index.d.ts +2 -2
- package/brightData/webScraperIde/server/index.js +2 -2
- package/cache/server/cache.d.ts +7 -0
- package/cache/server/cache.js +43 -0
- package/cache/server/index.d.ts +1 -7
- package/cache/server/index.js +1 -43
- package/crud/crud.d.ts +7 -0
- package/crud/crud.js +6 -0
- package/crud/index.d.ts +1 -7
- package/crud/index.js +1 -6
- package/crypto/index.d.ts +4 -4
- package/crypto/index.js +4 -4
- package/date/calculation.d.ts +4 -1
- package/date/calculation.js +3 -0
- package/date/{type.d.ts → date.d.ts} +2 -2
- package/date/{type.js → date.js} +1 -1
- package/date/financialYear.d.ts +2 -2
- package/date/financialYear.js +1 -1
- package/date/format.d.ts +1 -1
- package/date/index.d.ts +1 -1
- package/date/index.js +1 -1
- package/environment/environment.d.ts +34 -0
- package/environment/environment.js +79 -0
- package/environment/index.d.ts +1 -34
- package/environment/index.js +1 -79
- package/eskimi/eskimi.d.ts +49 -0
- package/eskimi/eskimi.js +93 -0
- package/eskimi/index.d.ts +1 -49
- package/eskimi/index.js +1 -93
- package/file/getFileKey.js +2 -2
- package/googleAds/keywordPlanner/server/googleAdsKeywordPlanner.d.ts +41 -0
- package/googleAds/keywordPlanner/server/googleAdsKeywordPlanner.js +55 -0
- package/googleAds/keywordPlanner/server/index.d.ts +1 -41
- package/googleAds/keywordPlanner/server/index.js +1 -55
- package/googleAds/server/GoogleAdsNamespace.js +1 -2
- package/googleAds/server/googleAds.d.ts +11 -0
- package/googleAds/server/googleAds.js +26 -0
- package/googleAds/server/index.d.ts +2 -11
- package/googleAds/server/index.js +2 -26
- package/{google/bigquery/server/GoogleBigqueryNamespace.d.ts → googleCloud/bigquery/server/GoogleCloudBigqueryNamespace.d.ts} +1 -1
- package/{google/bigquery/server/GoogleBigqueryNamespace.js → googleCloud/bigquery/server/GoogleCloudBigqueryNamespace.js} +1 -1
- package/googleCloud/bigquery/server/googleCloudBigquery.d.ts +5 -0
- package/{google/bigquery/server/index.js → googleCloud/bigquery/server/googleCloudBigquery.js} +7 -8
- package/googleCloud/bigquery/server/index.d.ts +3 -0
- package/googleCloud/bigquery/server/index.js +3 -0
- package/{google → googleCloud}/bigquery/server/loadData.d.ts +3 -3
- package/{google → googleCloud}/bigquery/server/loadData.js +3 -3
- package/googleCloud/server/index.d.ts +1 -0
- package/googleCloud/server/index.js +1 -0
- package/{google/sheets/server/GoogleSheetsNamespace.d.ts → googleCloud/sheets/server/GoogleCloudSheetsNamespace.d.ts} +1 -1
- package/{google/sheets/server/GoogleSheetsNamespace.js → googleCloud/sheets/server/GoogleCloudSheetsNamespace.js} +1 -1
- package/googleCloud/sheets/server/index.d.ts +1 -0
- package/googleCloud/sheets/server/index.js +1 -0
- package/googleCloud/storage/server/index.d.ts +2 -0
- package/googleCloud/storage/server/index.js +2 -0
- package/googlePageSpeed/server/GooglePageSpeedNamespace.d.ts +1 -1
- package/googlePageSpeed/server/GooglePageSpeedNamespace.js +3 -3
- package/googlePageSpeed/server/googlePageSpeed.d.ts +19 -0
- package/googlePageSpeed/server/googlePageSpeed.js +38 -0
- package/googlePageSpeed/server/index.d.ts +2 -19
- package/googlePageSpeed/server/index.js +2 -38
- package/googleSearchIncidents/server/googleSearchIncidents.d.ts +69 -0
- package/googleSearchIncidents/server/googleSearchIncidents.js +42 -0
- package/googleSearchIncidents/server/index.d.ts +1 -69
- package/googleSearchIncidents/server/index.js +1 -42
- package/greenDomain/server/greenDomain.d.ts +21 -0
- package/greenDomain/server/greenDomain.js +37 -0
- package/greenDomain/server/index.d.ts +1 -21
- package/greenDomain/server/index.js +1 -37
- package/inngest/index.d.ts +1 -7
- package/inngest/index.js +1 -6
- package/inngest/inngest.d.ts +7 -0
- package/inngest/inngest.js +6 -0
- package/littleWarden/server/index.d.ts +2 -30
- package/littleWarden/server/index.js +2 -65
- package/littleWarden/server/littleWarden.d.ts +30 -0
- package/littleWarden/server/littleWarden.js +65 -0
- package/lumar/api/server/buildRequest.d.ts +3 -3
- package/lumar/api/server/buildRequest.js +15 -15
- package/lumar/api/server/index.d.ts +1 -33
- package/lumar/api/server/index.js +1 -24
- package/lumar/api/server/lumarApi.d.ts +36 -0
- package/lumar/api/server/lumarApi.js +24 -0
- package/lumar/graphql/server/columns.d.ts +28 -27
- package/lumar/graphql/server/columns.js +1 -1
- package/lumar/graphql/server/getData.js +1 -2
- package/lumar/graphql/server/index.d.ts +11 -29
- package/lumar/graphql/server/index.js +11 -31
- package/lumar/graphql/server/lumarGraphql.d.ts +27 -0
- package/lumar/graphql/server/lumarGraphql.js +27 -0
- package/lumar/graphql/server/queries/getReportDifferences.d.ts +1 -1
- package/lumar/graphql/server/queries/getReportDifferences.js +2 -2
- package/lumar/graphql/server/reportTemplates.d.ts +67 -66
- package/lumar/graphql/server/reportTemplates.js +1 -1
- package/myTarget/server/index.d.ts +1 -5
- package/myTarget/server/index.js +1 -13
- package/myTarget/server/myTarget.d.ts +5 -0
- package/myTarget/server/myTarget.js +13 -0
- package/nextAuth/index.d.ts +2 -7
- package/nextAuth/index.js +2 -6
- package/nextAuth/nextAuth.d.ts +7 -0
- package/nextAuth/nextAuth.js +6 -0
- package/nextJs/index.d.ts +1 -12
- package/nextJs/index.js +1 -14
- package/nextJs/nextJs.d.ts +12 -0
- package/nextJs/nextJs.js +8 -0
- package/onePassword/server/index.d.ts +2 -7
- package/onePassword/server/index.js +2 -21
- package/onePassword/server/onePassword.d.ts +8 -0
- package/onePassword/server/onePassword.js +21 -0
- package/openAi/server/index.d.ts +2 -5
- package/openAi/server/index.js +2 -26
- package/openAi/server/openAi.d.ts +6 -0
- package/openAi/server/openAi.js +26 -0
- package/package.json +65 -65
- package/prisma/server/index.d.ts +2 -20
- package/prisma/server/index.js +2 -26
- package/prisma/server/prisma.d.ts +20 -0
- package/prisma/server/prisma.js +26 -0
- package/snapchat/server/index.d.ts +2 -7
- package/snapchat/server/index.js +2 -26
- package/snapchat/server/snapchat.d.ts +7 -0
- package/snapchat/server/snapchat.js +26 -0
- package/sorting/index.d.ts +1 -4
- package/sorting/index.js +1 -4
- package/sorting/sorting.d.ts +4 -0
- package/sorting/sorting.js +4 -0
- package/stream/server/index.d.ts +1 -1
- package/stream/server/index.js +1 -1
- package/string/index.d.ts +13 -12
- package/string/index.js +13 -12
- package/swr/client/index.d.ts +1 -42
- package/swr/client/index.js +1 -50
- package/swr/client/swr.d.ts +42 -0
- package/swr/client/swr.js +50 -0
- package/upTimeRobot/server/index.d.ts +2 -38
- package/upTimeRobot/server/index.js +2 -59
- package/upTimeRobot/server/upTimeRobot.d.ts +38 -0
- package/upTimeRobot/server/upTimeRobot.js +59 -0
- package/url/index.d.ts +1 -26
- package/url/index.js +1 -59
- package/url/server/index.d.ts +1 -1
- package/url/server/index.js +1 -1
- package/url/url.d.ts +26 -0
- package/url/url.js +59 -0
- package/util/index.d.ts +7 -7
- package/util/index.js +7 -7
- package/util/isUndefined.js +2 -2
- package/util/server/index.d.ts +4 -4
- package/util/server/index.js +4 -4
- package/webWorker/index.d.ts +1 -8
- package/webWorker/index.js +1 -7
- package/webWorker/webWorker.d.ts +8 -0
- package/webWorker/webWorker.js +7 -0
- package/google/bigquery/server/index.d.ts +0 -6
- package/google/sheets/server/index.d.ts +0 -8
- package/google/sheets/server/index.js +0 -42
- /package/{google/server/index.d.ts → googleCloud/server/googleCloud.d.ts} +0 -0
- /package/{google/server/index.js → googleCloud/server/googleCloud.js} +0 -0
- /package/{google → googleCloud}/sheets/server/getAssociatedData.d.ts +0 -0
- /package/{google → googleCloud}/sheets/server/getAssociatedData.js +0 -0
- /package/{google → googleCloud}/storage/server/GoogleCloudStorageNamespace.d.ts +0 -0
- /package/{google → googleCloud}/storage/server/GoogleCloudStorageNamespace.js +0 -0
- /package/{google/storage/server/index.d.ts → googleCloud/storage/server/googleCloudStorage.d.ts} +0 -0
- /package/{google/storage/server/index.js → googleCloud/storage/server/googleCloudStorage.js} +0 -0
|
@@ -1,67 +1,68 @@
|
|
|
1
|
-
export declare const
|
|
2
|
-
"200_PAGES":
|
|
3
|
-
"301_REDIRECTS":
|
|
4
|
-
"4XX_ERRORS":
|
|
5
|
-
"5XX_ERRORS":
|
|
6
|
-
ALL_PAGES:
|
|
7
|
-
BROKEN_EXTERNAL_LINKS:
|
|
8
|
-
BROKEN_INTERNAL_LINKS:
|
|
9
|
-
BROKEN_SITEMAP_PAGES:
|
|
10
|
-
CANONICAL_CONFLICTING:
|
|
11
|
-
CANONICAL_NON_200:
|
|
12
|
-
CANONICAL_NON_INDEXABLE:
|
|
13
|
-
CANONICAL_ORPHANED:
|
|
14
|
-
CUSTOM_EXTRACTION_1:
|
|
15
|
-
CUSTOM_EXTRACTION_2:
|
|
16
|
-
DUPLICATE_CONTENT:
|
|
17
|
-
DUPLICATE_DESCRIPTIONS:
|
|
18
|
-
DUPLICATE_TITLES:
|
|
19
|
-
EMPTY_PAGES:
|
|
20
|
-
INDEXABLE_PAGES:
|
|
21
|
-
LINKED_DOMAINS:
|
|
22
|
-
MAX_DESCRIPTIONS:
|
|
23
|
-
MAX_MOBILE_DESCRIPTIONS:
|
|
24
|
-
MAX_TITLES:
|
|
25
|
-
MISSING_DESCRIPTIONS:
|
|
26
|
-
MISSING_TITLES:
|
|
27
|
-
NON_301_REDIRECTS:
|
|
28
|
-
NON_INDEXABLE_PAGES:
|
|
29
|
-
NON_INDEXABLE_SITEMAP_PAGES:
|
|
30
|
-
ORPHANED_CANONICAL:
|
|
31
|
-
ORPHANED_ANALYTICS_PAGES:
|
|
32
|
-
ORPHANED_SEARCH_CONSOLE_PAGES:
|
|
33
|
-
ORPHANED_SITEMAP_PAGES:
|
|
34
|
-
PAGES_WITH_HIGH_EXTERNAL_LINKS:
|
|
35
|
-
PERFORMANCE_MAX_FETCH_TIME:
|
|
36
|
-
PERFORMANCE_POOR_CLS:
|
|
37
|
-
PERFORMANCE_SLOW_DCL:
|
|
38
|
-
PERFORMANCE_SLOW_FCP:
|
|
39
|
-
PERFORMANCE_SLOW_LCP:
|
|
40
|
-
PERFORMANCE_SLOW_TTFB:
|
|
41
|
-
PERFORMANCE_SLOW_TTI:
|
|
42
|
-
PRIMARY_PAGES:
|
|
43
|
-
REDIRECTS_BROKEN:
|
|
44
|
-
REDIRECTS_CHAIN:
|
|
45
|
-
REDIRECTS_LOOP:
|
|
46
|
-
SCHEMA_BREADCRUMB:
|
|
47
|
-
SCHEMA_EVENT:
|
|
48
|
-
SCHEMA_FAQ:
|
|
49
|
-
SCHEMA_HOW_TO:
|
|
50
|
-
SCHEMA_NEWS_ARTICLE:
|
|
51
|
-
SCHEMA_PRODUCT:
|
|
52
|
-
SCHEMA_QA:
|
|
53
|
-
SCHEMA_RECIPE:
|
|
54
|
-
SCHEMA_REVIEW:
|
|
55
|
-
SCHEMA_VIDEO:
|
|
56
|
-
SHORT_DESCRIPTIONS:
|
|
57
|
-
SHORT_TITLES:
|
|
58
|
-
SITEMAP_PAGES:
|
|
59
|
-
SITEMAPS_NON_INDEXABLE_PAGES:
|
|
60
|
-
SITEMAPS_ORPHANED_PAGES:
|
|
61
|
-
SITEMAPS_MISSING_PAGES:
|
|
62
|
-
THIN_PAGES:
|
|
63
|
-
TRUE_UNIQUE_PAGES:
|
|
64
|
-
UNIQUE_EXTERNAL_LINKS:
|
|
65
|
-
UNIQUE_INTERNAL_LINKS:
|
|
66
|
-
XML_SITEMAPS:
|
|
1
|
+
export declare const reportTemplate: {
|
|
2
|
+
readonly "200_PAGES": "200_pages";
|
|
3
|
+
readonly "301_REDIRECTS": "301_redirects";
|
|
4
|
+
readonly "4XX_ERRORS": "4xx_errors";
|
|
5
|
+
readonly "5XX_ERRORS": "5xx_errors";
|
|
6
|
+
readonly ALL_PAGES: "all_pages";
|
|
7
|
+
readonly BROKEN_EXTERNAL_LINKS: "broken_links_external";
|
|
8
|
+
readonly BROKEN_INTERNAL_LINKS: "all_broken_links";
|
|
9
|
+
readonly BROKEN_SITEMAP_PAGES: "broken_sitemap_links";
|
|
10
|
+
readonly CANONICAL_CONFLICTING: "conflicting_canonical_tags";
|
|
11
|
+
readonly CANONICAL_NON_200: "canonical_to_non_200";
|
|
12
|
+
readonly CANONICAL_NON_INDEXABLE: "non_indexable_canonical_links_in";
|
|
13
|
+
readonly CANONICAL_ORPHANED: "unlinked_canonical_pages";
|
|
14
|
+
readonly CUSTOM_EXTRACTION_1: "custom_extraction_1";
|
|
15
|
+
readonly CUSTOM_EXTRACTION_2: "custom_extraction_2";
|
|
16
|
+
readonly DUPLICATE_CONTENT: "duplicate_body_content";
|
|
17
|
+
readonly DUPLICATE_DESCRIPTIONS: "pages_with_duplicate_descriptions";
|
|
18
|
+
readonly DUPLICATE_TITLES: "pages_with_duplicate_titles";
|
|
19
|
+
readonly EMPTY_PAGES: "empty_pages";
|
|
20
|
+
readonly INDEXABLE_PAGES: "indexable_pages";
|
|
21
|
+
readonly LINKED_DOMAINS: "linked_domains";
|
|
22
|
+
readonly MAX_DESCRIPTIONS: "max_description_length";
|
|
23
|
+
readonly MAX_MOBILE_DESCRIPTIONS: "max_mobile_description_length";
|
|
24
|
+
readonly MAX_TITLES: "max_title_length";
|
|
25
|
+
readonly MISSING_DESCRIPTIONS: "missing_descriptions";
|
|
26
|
+
readonly MISSING_TITLES: "missing_titles";
|
|
27
|
+
readonly NON_301_REDIRECTS: "non_301_redirects";
|
|
28
|
+
readonly NON_INDEXABLE_PAGES: "non_indexable_pages";
|
|
29
|
+
readonly NON_INDEXABLE_SITEMAP_PAGES: "sitemaps_non_indexable_links";
|
|
30
|
+
readonly ORPHANED_CANONICAL: "unlinked_canonical_pages";
|
|
31
|
+
readonly ORPHANED_ANALYTICS_PAGES: "orphaned_organic_landing_pages";
|
|
32
|
+
readonly ORPHANED_SEARCH_CONSOLE_PAGES: "orphaned_google_search_console_pages";
|
|
33
|
+
readonly ORPHANED_SITEMAP_PAGES: "orphaned_sitemaps_pages";
|
|
34
|
+
readonly PAGES_WITH_HIGH_EXTERNAL_LINKS: "max_external_links";
|
|
35
|
+
readonly PERFORMANCE_MAX_FETCH_TIME: "max_load_time";
|
|
36
|
+
readonly PERFORMANCE_POOR_CLS: "poor_cls";
|
|
37
|
+
readonly PERFORMANCE_SLOW_DCL: "slow_dcl";
|
|
38
|
+
readonly PERFORMANCE_SLOW_FCP: "slow_fcp";
|
|
39
|
+
readonly PERFORMANCE_SLOW_LCP: "slow_lcp";
|
|
40
|
+
readonly PERFORMANCE_SLOW_TTFB: "slow_server_response";
|
|
41
|
+
readonly PERFORMANCE_SLOW_TTI: "slow_tti";
|
|
42
|
+
readonly PRIMARY_PAGES: "unique_pages";
|
|
43
|
+
readonly REDIRECTS_BROKEN: "all_broken_redirects";
|
|
44
|
+
readonly REDIRECTS_CHAIN: "redirect_chains";
|
|
45
|
+
readonly REDIRECTS_LOOP: "redirection_loop";
|
|
46
|
+
readonly SCHEMA_BREADCRUMB: "pages_with_breadcrumb_schema";
|
|
47
|
+
readonly SCHEMA_EVENT: "pages_with_event_schema";
|
|
48
|
+
readonly SCHEMA_FAQ: "pages_with_faqpage_schema";
|
|
49
|
+
readonly SCHEMA_HOW_TO: "pages_with_howto_schema";
|
|
50
|
+
readonly SCHEMA_NEWS_ARTICLE: "pages_with_news_article_schema";
|
|
51
|
+
readonly SCHEMA_PRODUCT: "pages_with_product_schema";
|
|
52
|
+
readonly SCHEMA_QA: "pages_with_qapage_schema";
|
|
53
|
+
readonly SCHEMA_RECIPE: "pages_with_recipe_schema";
|
|
54
|
+
readonly SCHEMA_REVIEW: "pages_with_review_schema";
|
|
55
|
+
readonly SCHEMA_VIDEO: "pages_with_videoobject_schema";
|
|
56
|
+
readonly SHORT_DESCRIPTIONS: "short_descriptions";
|
|
57
|
+
readonly SHORT_TITLES: "short_titles";
|
|
58
|
+
readonly SITEMAP_PAGES: "all_sitemaps_links";
|
|
59
|
+
readonly SITEMAPS_NON_INDEXABLE_PAGES: "sitemaps_non_indexable_links";
|
|
60
|
+
readonly SITEMAPS_ORPHANED_PAGES: "orphaned_sitemaps_pages";
|
|
61
|
+
readonly SITEMAPS_MISSING_PAGES: "not_in_sitemaps_primary_indexable";
|
|
62
|
+
readonly THIN_PAGES: "thin_pages";
|
|
63
|
+
readonly TRUE_UNIQUE_PAGES: "true_uniques";
|
|
64
|
+
readonly UNIQUE_EXTERNAL_LINKS: "unique_external_links";
|
|
65
|
+
readonly UNIQUE_INTERNAL_LINKS: "unique_internal_links";
|
|
66
|
+
readonly XML_SITEMAPS: "xml_sitemaps";
|
|
67
67
|
};
|
|
68
|
+
export type ReportTemplate = typeof reportTemplate[keyof typeof reportTemplate];
|
package/myTarget/server/index.js
CHANGED
|
@@ -1,13 +1 @@
|
|
|
1
|
-
|
|
2
|
-
/**
|
|
3
|
-
* Make the request to MyTarget API using the access token.
|
|
4
|
-
*/
|
|
5
|
-
export const request = async (data, url, accessToken) => {
|
|
6
|
-
const response = await post(url, data, {
|
|
7
|
-
headers: {
|
|
8
|
-
Authorization: `Bearer ${accessToken}`,
|
|
9
|
-
"Content-Type": "application/json",
|
|
10
|
-
},
|
|
11
|
-
});
|
|
12
|
-
return response;
|
|
13
|
-
};
|
|
1
|
+
export * from "./myTarget";
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { post } from "../../axios";
|
|
2
|
+
/**
|
|
3
|
+
* Make the request to MyTarget API using the access token.
|
|
4
|
+
*/
|
|
5
|
+
export const request = async (data, url, accessToken) => {
|
|
6
|
+
const response = await post(url, data, {
|
|
7
|
+
headers: {
|
|
8
|
+
Authorization: `Bearer ${accessToken}`,
|
|
9
|
+
"Content-Type": "application/json",
|
|
10
|
+
},
|
|
11
|
+
});
|
|
12
|
+
return response;
|
|
13
|
+
};
|
package/nextAuth/index.d.ts
CHANGED
|
@@ -1,7 +1,2 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
3
|
-
AUTHENTICATED: string;
|
|
4
|
-
PENDING: string;
|
|
5
|
-
UNAUTHENTICATED: string;
|
|
6
|
-
};
|
|
7
|
-
export type NextAuthState = typeof NextAuthState[keyof typeof NextAuthState];
|
|
1
|
+
export * from "./nextAuth";
|
|
2
|
+
export * from "./isSessionReady";
|
package/nextAuth/index.js
CHANGED
|
@@ -1,6 +1,2 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
3
|
-
AUTHENTICATED: "authenticated",
|
|
4
|
-
PENDING: "loading", // Defined by NextAuth
|
|
5
|
-
UNAUTHENTICATED: "unauthenticated",
|
|
6
|
-
};
|
|
1
|
+
export * from "./nextAuth";
|
|
2
|
+
export * from "./isSessionReady";
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { isSessionReady } from "./isSessionReady";
|
|
2
|
+
export declare const NextAuthState: {
|
|
3
|
+
readonly AUTHENTICATED: "authenticated";
|
|
4
|
+
readonly PENDING: "loading";
|
|
5
|
+
readonly UNAUTHENTICATED: "unauthenticated";
|
|
6
|
+
};
|
|
7
|
+
export type NextAuthState = typeof NextAuthState[keyof typeof NextAuthState];
|
package/nextJs/index.d.ts
CHANGED
|
@@ -1,12 +1 @@
|
|
|
1
|
-
|
|
2
|
-
* Get the user's remote IP Address
|
|
3
|
-
*/
|
|
4
|
-
export declare const getIp: ({ req }: {
|
|
5
|
-
req: any;
|
|
6
|
-
}) => string;
|
|
7
|
-
/**
|
|
8
|
-
* Get the user's User Agent
|
|
9
|
-
*/
|
|
10
|
-
export declare const getUserAgent: ({ req }: {
|
|
11
|
-
req: any;
|
|
12
|
-
}) => string;
|
|
1
|
+
export * from "./nextJs";
|
package/nextJs/index.js
CHANGED
|
@@ -1,14 +1 @@
|
|
|
1
|
-
|
|
2
|
-
* Get the user's remote IP Address
|
|
3
|
-
*/
|
|
4
|
-
export const getIp = ({ req }) => {
|
|
5
|
-
let response = 'unset';
|
|
6
|
-
if (undefined !== req.headers['x-real-ip']) {
|
|
7
|
-
response = String(req.headers['x-real-ip']);
|
|
8
|
-
}
|
|
9
|
-
return response;
|
|
10
|
-
};
|
|
11
|
-
/**
|
|
12
|
-
* Get the user's User Agent
|
|
13
|
-
*/
|
|
14
|
-
export const getUserAgent = ({ req }) => req.headers['user-agent'] || 'unset';
|
|
1
|
+
export * from "./nextJs";
|
package/nextJs/nextJs.js
ADDED
|
@@ -1,7 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
export
|
|
3
|
-
serviceAccountToken: string;
|
|
4
|
-
integrationName?: string;
|
|
5
|
-
integrationVersion?: string;
|
|
6
|
-
};
|
|
7
|
-
export declare const onePasswordClient: (key?: string, config?: OnePasswordConfig) => Promise<OnePasswordNamespace>;
|
|
1
|
+
export * from "./onePassword";
|
|
2
|
+
export * from "./OnePasswordNamespace";
|
|
@@ -1,21 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
// Main client that is used by system
|
|
4
|
-
export const onePasswordClient = async (key = "default", config) => {
|
|
5
|
-
if (onePasswordNamespaces.has(key)) {
|
|
6
|
-
return onePasswordNamespaces.get(key);
|
|
7
|
-
}
|
|
8
|
-
if (!config) {
|
|
9
|
-
if (key === "default") {
|
|
10
|
-
config = {
|
|
11
|
-
serviceAccountToken: process.env.ONEPASSWORD_SERVICE_TOKEN
|
|
12
|
-
};
|
|
13
|
-
}
|
|
14
|
-
else {
|
|
15
|
-
throw new Error(`Config required for namespace '${key}'`);
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
const namespace = new OnePasswordNamespace(key, config);
|
|
19
|
-
onePasswordNamespaces.set(key, namespace);
|
|
20
|
-
return namespace;
|
|
21
|
-
};
|
|
1
|
+
export * from "./onePassword";
|
|
2
|
+
export * from "./OnePasswordNamespace";
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export type { OnePasswordNamespace } from "./OnePasswordNamespace";
|
|
2
|
+
import { OnePasswordNamespace } from "./OnePasswordNamespace";
|
|
3
|
+
export type OnePasswordConfig = {
|
|
4
|
+
serviceAccountToken: string;
|
|
5
|
+
integrationName?: string;
|
|
6
|
+
integrationVersion?: string;
|
|
7
|
+
};
|
|
8
|
+
export declare const onePasswordClient: (key?: string, config?: OnePasswordConfig) => Promise<OnePasswordNamespace>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { OnePasswordNamespace } from "./OnePasswordNamespace";
|
|
2
|
+
const onePasswordNamespaces = new Map();
|
|
3
|
+
// Main client that is used by system
|
|
4
|
+
export const onePasswordClient = async (key = "default", config) => {
|
|
5
|
+
if (onePasswordNamespaces.has(key)) {
|
|
6
|
+
return onePasswordNamespaces.get(key);
|
|
7
|
+
}
|
|
8
|
+
if (!config) {
|
|
9
|
+
if (key === "default") {
|
|
10
|
+
config = {
|
|
11
|
+
serviceAccountToken: process.env.ONEPASSWORD_SERVICE_TOKEN
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
else {
|
|
15
|
+
throw new Error(`Config required for namespace '${key}'`);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
const namespace = new OnePasswordNamespace(key, config);
|
|
19
|
+
onePasswordNamespaces.set(key, namespace);
|
|
20
|
+
return namespace;
|
|
21
|
+
};
|
package/openAi/server/index.d.ts
CHANGED
|
@@ -1,5 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
export
|
|
3
|
-
apiKey: string;
|
|
4
|
-
};
|
|
5
|
-
export declare const openAiClient: (key?: string, config?: OpenAiConfig, vaultId?: string, itemId?: string) => Promise<OpenAiNamespace>;
|
|
1
|
+
export * from "./openAi";
|
|
2
|
+
export * from "./OpenAiNamespace";
|
package/openAi/server/index.js
CHANGED
|
@@ -1,26 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
const openAiNamespaces = new Map();
|
|
4
|
-
export const openAiClient = async (key = "default", config, vaultId, itemId) => {
|
|
5
|
-
if (openAiNamespaces.has(key)) {
|
|
6
|
-
return openAiNamespaces.get(key);
|
|
7
|
-
}
|
|
8
|
-
let instanceConfig;
|
|
9
|
-
if (config) {
|
|
10
|
-
instanceConfig = config;
|
|
11
|
-
}
|
|
12
|
-
else if (vaultId && itemId) {
|
|
13
|
-
instanceConfig = await (await onePasswordClient())
|
|
14
|
-
.getJsonNote(vaultId, itemId);
|
|
15
|
-
}
|
|
16
|
-
else if (process.env.OPEN_AI_VAULT_ID && process.env.OPEN_AI_ITEM_ID) {
|
|
17
|
-
instanceConfig = await (await onePasswordClient())
|
|
18
|
-
.getJsonNote(process.env.OPEN_AI_VAULT_ID, process.env.OPEN_AI_ITEM_ID);
|
|
19
|
-
}
|
|
20
|
-
else {
|
|
21
|
-
throw new Error(`Config required for namespace '${key}'`);
|
|
22
|
-
}
|
|
23
|
-
const namespace = new OpenAiNamespace(key, instanceConfig);
|
|
24
|
-
openAiNamespaces.set(key, namespace);
|
|
25
|
-
return namespace;
|
|
26
|
-
};
|
|
1
|
+
export * from "./openAi";
|
|
2
|
+
export * from "./OpenAiNamespace";
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export type { OpenAiNamespace } from "./OpenAiNamespace";
|
|
2
|
+
import { OpenAiNamespace } from "./OpenAiNamespace";
|
|
3
|
+
export type OpenAiConfig = {
|
|
4
|
+
apiKey: string;
|
|
5
|
+
};
|
|
6
|
+
export declare const openAiClient: (key?: string, config?: OpenAiConfig, vaultId?: string, itemId?: string) => Promise<OpenAiNamespace>;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { OpenAiNamespace } from "./OpenAiNamespace";
|
|
2
|
+
import { onePasswordClient } from "../../onePassword/server";
|
|
3
|
+
const openAiNamespaces = new Map();
|
|
4
|
+
export const openAiClient = async (key = "default", config, vaultId, itemId) => {
|
|
5
|
+
if (openAiNamespaces.has(key)) {
|
|
6
|
+
return openAiNamespaces.get(key);
|
|
7
|
+
}
|
|
8
|
+
let instanceConfig;
|
|
9
|
+
if (config) {
|
|
10
|
+
instanceConfig = config;
|
|
11
|
+
}
|
|
12
|
+
else if (vaultId && itemId) {
|
|
13
|
+
instanceConfig = await (await onePasswordClient())
|
|
14
|
+
.getJsonNote(vaultId, itemId);
|
|
15
|
+
}
|
|
16
|
+
else if (process.env.OPEN_AI_VAULT_ID && process.env.OPEN_AI_ITEM_ID) {
|
|
17
|
+
instanceConfig = await (await onePasswordClient())
|
|
18
|
+
.getJsonNote(process.env.OPEN_AI_VAULT_ID, process.env.OPEN_AI_ITEM_ID);
|
|
19
|
+
}
|
|
20
|
+
else {
|
|
21
|
+
throw new Error(`Config required for namespace '${key}'`);
|
|
22
|
+
}
|
|
23
|
+
const namespace = new OpenAiNamespace(key, instanceConfig);
|
|
24
|
+
openAiNamespaces.set(key, namespace);
|
|
25
|
+
return namespace;
|
|
26
|
+
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@8ms/helpers",
|
|
3
3
|
"license": "UNLICENSED",
|
|
4
|
-
"version": "2.
|
|
4
|
+
"version": "2.3.3",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "git+https://github.com/8millionstories-organisation/8ms-helpers-ts.git"
|
|
@@ -681,70 +681,6 @@
|
|
|
681
681
|
"types": "./geo/index.d.ts",
|
|
682
682
|
"default": "./geo/index.d.ts"
|
|
683
683
|
},
|
|
684
|
-
"./google/bigquery/server": {
|
|
685
|
-
"types": "./google/bigquery/server/index.d.ts",
|
|
686
|
-
"import": "./google/bigquery/server/index.js",
|
|
687
|
-
"require": "./google/bigquery/server/index.js",
|
|
688
|
-
"default": "./google/bigquery/server/index.js"
|
|
689
|
-
},
|
|
690
|
-
"./google/bigquery/server/index.js": {
|
|
691
|
-
"types": "./google/bigquery/server/index.d.ts",
|
|
692
|
-
"import": "./google/bigquery/server/index.js",
|
|
693
|
-
"require": "./google/bigquery/server/index.js",
|
|
694
|
-
"default": "./google/bigquery/server/index.js"
|
|
695
|
-
},
|
|
696
|
-
"./google/bigquery/server/index.d.ts": {
|
|
697
|
-
"types": "./google/bigquery/server/index.d.ts",
|
|
698
|
-
"default": "./google/bigquery/server/index.d.ts"
|
|
699
|
-
},
|
|
700
|
-
"./google/server": {
|
|
701
|
-
"types": "./google/server/index.d.ts",
|
|
702
|
-
"import": "./google/server/index.js",
|
|
703
|
-
"require": "./google/server/index.js",
|
|
704
|
-
"default": "./google/server/index.js"
|
|
705
|
-
},
|
|
706
|
-
"./google/server/index.js": {
|
|
707
|
-
"types": "./google/server/index.d.ts",
|
|
708
|
-
"import": "./google/server/index.js",
|
|
709
|
-
"require": "./google/server/index.js",
|
|
710
|
-
"default": "./google/server/index.js"
|
|
711
|
-
},
|
|
712
|
-
"./google/server/index.d.ts": {
|
|
713
|
-
"types": "./google/server/index.d.ts",
|
|
714
|
-
"default": "./google/server/index.d.ts"
|
|
715
|
-
},
|
|
716
|
-
"./google/sheets/server": {
|
|
717
|
-
"types": "./google/sheets/server/index.d.ts",
|
|
718
|
-
"import": "./google/sheets/server/index.js",
|
|
719
|
-
"require": "./google/sheets/server/index.js",
|
|
720
|
-
"default": "./google/sheets/server/index.js"
|
|
721
|
-
},
|
|
722
|
-
"./google/sheets/server/index.js": {
|
|
723
|
-
"types": "./google/sheets/server/index.d.ts",
|
|
724
|
-
"import": "./google/sheets/server/index.js",
|
|
725
|
-
"require": "./google/sheets/server/index.js",
|
|
726
|
-
"default": "./google/sheets/server/index.js"
|
|
727
|
-
},
|
|
728
|
-
"./google/sheets/server/index.d.ts": {
|
|
729
|
-
"types": "./google/sheets/server/index.d.ts",
|
|
730
|
-
"default": "./google/sheets/server/index.d.ts"
|
|
731
|
-
},
|
|
732
|
-
"./google/storage/server": {
|
|
733
|
-
"types": "./google/storage/server/index.d.ts",
|
|
734
|
-
"import": "./google/storage/server/index.js",
|
|
735
|
-
"require": "./google/storage/server/index.js",
|
|
736
|
-
"default": "./google/storage/server/index.js"
|
|
737
|
-
},
|
|
738
|
-
"./google/storage/server/index.js": {
|
|
739
|
-
"types": "./google/storage/server/index.d.ts",
|
|
740
|
-
"import": "./google/storage/server/index.js",
|
|
741
|
-
"require": "./google/storage/server/index.js",
|
|
742
|
-
"default": "./google/storage/server/index.js"
|
|
743
|
-
},
|
|
744
|
-
"./google/storage/server/index.d.ts": {
|
|
745
|
-
"types": "./google/storage/server/index.d.ts",
|
|
746
|
-
"default": "./google/storage/server/index.d.ts"
|
|
747
|
-
},
|
|
748
684
|
"./googleAds/keywordPlanner/server": {
|
|
749
685
|
"types": "./googleAds/keywordPlanner/server/index.d.ts",
|
|
750
686
|
"import": "./googleAds/keywordPlanner/server/index.js",
|
|
@@ -777,6 +713,70 @@
|
|
|
777
713
|
"types": "./googleAds/server/index.d.ts",
|
|
778
714
|
"default": "./googleAds/server/index.d.ts"
|
|
779
715
|
},
|
|
716
|
+
"./googleCloud/bigquery/server": {
|
|
717
|
+
"types": "./googleCloud/bigquery/server/index.d.ts",
|
|
718
|
+
"import": "./googleCloud/bigquery/server/index.js",
|
|
719
|
+
"require": "./googleCloud/bigquery/server/index.js",
|
|
720
|
+
"default": "./googleCloud/bigquery/server/index.js"
|
|
721
|
+
},
|
|
722
|
+
"./googleCloud/bigquery/server/index.js": {
|
|
723
|
+
"types": "./googleCloud/bigquery/server/index.d.ts",
|
|
724
|
+
"import": "./googleCloud/bigquery/server/index.js",
|
|
725
|
+
"require": "./googleCloud/bigquery/server/index.js",
|
|
726
|
+
"default": "./googleCloud/bigquery/server/index.js"
|
|
727
|
+
},
|
|
728
|
+
"./googleCloud/bigquery/server/index.d.ts": {
|
|
729
|
+
"types": "./googleCloud/bigquery/server/index.d.ts",
|
|
730
|
+
"default": "./googleCloud/bigquery/server/index.d.ts"
|
|
731
|
+
},
|
|
732
|
+
"./googleCloud/server": {
|
|
733
|
+
"types": "./googleCloud/server/index.d.ts",
|
|
734
|
+
"import": "./googleCloud/server/index.js",
|
|
735
|
+
"require": "./googleCloud/server/index.js",
|
|
736
|
+
"default": "./googleCloud/server/index.js"
|
|
737
|
+
},
|
|
738
|
+
"./googleCloud/server/index.js": {
|
|
739
|
+
"types": "./googleCloud/server/index.d.ts",
|
|
740
|
+
"import": "./googleCloud/server/index.js",
|
|
741
|
+
"require": "./googleCloud/server/index.js",
|
|
742
|
+
"default": "./googleCloud/server/index.js"
|
|
743
|
+
},
|
|
744
|
+
"./googleCloud/server/index.d.ts": {
|
|
745
|
+
"types": "./googleCloud/server/index.d.ts",
|
|
746
|
+
"default": "./googleCloud/server/index.d.ts"
|
|
747
|
+
},
|
|
748
|
+
"./googleCloud/sheets/server": {
|
|
749
|
+
"types": "./googleCloud/sheets/server/index.d.ts",
|
|
750
|
+
"import": "./googleCloud/sheets/server/index.js",
|
|
751
|
+
"require": "./googleCloud/sheets/server/index.js",
|
|
752
|
+
"default": "./googleCloud/sheets/server/index.js"
|
|
753
|
+
},
|
|
754
|
+
"./googleCloud/sheets/server/index.js": {
|
|
755
|
+
"types": "./googleCloud/sheets/server/index.d.ts",
|
|
756
|
+
"import": "./googleCloud/sheets/server/index.js",
|
|
757
|
+
"require": "./googleCloud/sheets/server/index.js",
|
|
758
|
+
"default": "./googleCloud/sheets/server/index.js"
|
|
759
|
+
},
|
|
760
|
+
"./googleCloud/sheets/server/index.d.ts": {
|
|
761
|
+
"types": "./googleCloud/sheets/server/index.d.ts",
|
|
762
|
+
"default": "./googleCloud/sheets/server/index.d.ts"
|
|
763
|
+
},
|
|
764
|
+
"./googleCloud/storage/server": {
|
|
765
|
+
"types": "./googleCloud/storage/server/index.d.ts",
|
|
766
|
+
"import": "./googleCloud/storage/server/index.js",
|
|
767
|
+
"require": "./googleCloud/storage/server/index.js",
|
|
768
|
+
"default": "./googleCloud/storage/server/index.js"
|
|
769
|
+
},
|
|
770
|
+
"./googleCloud/storage/server/index.js": {
|
|
771
|
+
"types": "./googleCloud/storage/server/index.d.ts",
|
|
772
|
+
"import": "./googleCloud/storage/server/index.js",
|
|
773
|
+
"require": "./googleCloud/storage/server/index.js",
|
|
774
|
+
"default": "./googleCloud/storage/server/index.js"
|
|
775
|
+
},
|
|
776
|
+
"./googleCloud/storage/server/index.d.ts": {
|
|
777
|
+
"types": "./googleCloud/storage/server/index.d.ts",
|
|
778
|
+
"default": "./googleCloud/storage/server/index.d.ts"
|
|
779
|
+
},
|
|
780
780
|
"./googlePageSpeed/server": {
|
|
781
781
|
"types": "./googlePageSpeed/server/index.d.ts",
|
|
782
782
|
"import": "./googlePageSpeed/server/index.js",
|
package/prisma/server/index.d.ts
CHANGED
|
@@ -1,20 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
export
|
|
3
|
-
url: string;
|
|
4
|
-
isDebug: boolean;
|
|
5
|
-
isPlanetScale: boolean;
|
|
6
|
-
isMysql: boolean;
|
|
7
|
-
isPostgres: boolean;
|
|
8
|
-
};
|
|
9
|
-
/**
|
|
10
|
-
* Minimal interface representing a Prisma Client instance.
|
|
11
|
-
* Consumers of this library will have their own generated PrismaClient
|
|
12
|
-
* that satisfies this interface.
|
|
13
|
-
*/
|
|
14
|
-
export interface PrismaClientLike {
|
|
15
|
-
$connect(): Promise<void>;
|
|
16
|
-
$disconnect(): Promise<void>;
|
|
17
|
-
$transaction(...args: any[]): Promise<any>;
|
|
18
|
-
[key: string]: any;
|
|
19
|
-
}
|
|
20
|
-
export declare const prismaClient: (key?: string, config?: PrismaConfig) => Promise<PrismaNamespace>;
|
|
1
|
+
export * from "./prisma";
|
|
2
|
+
export * from "./PrismaNamespace";
|
package/prisma/server/index.js
CHANGED
|
@@ -1,26 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
// Main client that is used by system
|
|
4
|
-
export const prismaClient = async (key = "default", config) => {
|
|
5
|
-
if (prismaNamespaces.has(key)) {
|
|
6
|
-
return prismaNamespaces.get(key);
|
|
7
|
-
}
|
|
8
|
-
if (!config) {
|
|
9
|
-
if (key === "default") {
|
|
10
|
-
config = {
|
|
11
|
-
url: process.env.DATABASE_URL,
|
|
12
|
-
isDebug: 'true' === process.env.DATABASE_IS_DEBUG,
|
|
13
|
-
isPlanetScale: 'true' === process.env.DATABASE_IS_PLANETSCALE,
|
|
14
|
-
isMysql: 'true' === process.env.DATABASE_IS_MYSQL,
|
|
15
|
-
isPostgres: 'true' === process.env.DATABASE_IS_POSTGRES,
|
|
16
|
-
};
|
|
17
|
-
}
|
|
18
|
-
else {
|
|
19
|
-
throw new Error(`Config required for namespace '${key}'`);
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
const namespace = new PrismaNamespace(key, config);
|
|
23
|
-
await namespace.ensureInit();
|
|
24
|
-
prismaNamespaces.set(key, namespace);
|
|
25
|
-
return namespace;
|
|
26
|
-
};
|
|
1
|
+
export * from "./prisma";
|
|
2
|
+
export * from "./PrismaNamespace";
|