@8ms/helpers 2.2.19 → 2.2.22
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/.github/generate-exports.js +31 -17
- package/.yarn/install-state.gz +0 -0
- package/adverity/{getJobs.d.ts → server/getJobs.d.ts} +2 -2
- package/adverity/{getJobs.js → server/getJobs.js} +2 -2
- package/aws/ec2/{AwsEc2Namespace.d.ts → server/AwsEc2Namespace.d.ts} +4 -4
- package/aws/ec2/{AwsEc2Namespace.js → server/AwsEc2Namespace.js} +3 -3
- package/aws/ec2/{server.d.ts → server/index.d.ts} +1 -1
- package/aws/ec2/{server.js → server/index.js} +1 -1
- package/aws/ecs/{AwsEcsNamespace.d.ts → server/AwsEcsNamespace.d.ts} +3 -3
- package/aws/ecs/{AwsEcsNamespace.js → server/AwsEcsNamespace.js} +5 -5
- package/aws/ecs/{server.d.ts → server/index.d.ts} +1 -1
- package/aws/ecs/{server.js → server/index.js} +1 -1
- package/aws/glue/{AwsGlueNamespace.d.ts → server/AwsGlueNamespace.d.ts} +2 -2
- package/aws/glue/{AwsGlueNamespace.js → server/AwsGlueNamespace.js} +2 -2
- package/aws/glue/{server.d.ts → server/index.d.ts} +1 -1
- package/aws/glue/{server.js → server/index.js} +1 -1
- package/aws/lambda/{AwsLambdaNamespace.d.ts → server/AwsLambdaNamespace.d.ts} +2 -2
- package/aws/lambda/{AwsLambdaNamespace.js → server/AwsLambdaNamespace.js} +3 -3
- package/aws/lambda/{server.d.ts → server/index.d.ts} +1 -1
- package/aws/lambda/{server.js → server/index.js} +1 -1
- package/aws/s3/{AwsS3Namespace.d.ts → server/AwsS3Namespace.d.ts} +3 -3
- package/aws/s3/{AwsS3Namespace.js → server/AwsS3Namespace.js} +6 -6
- package/aws/s3/{server.d.ts → server/index.d.ts} +1 -1
- package/aws/s3/{server.js → server/index.js} +2 -2
- package/aws/{server.js → server/index.js} +1 -1
- package/aws/{isResponse200.js → server/isResponse200.js} +1 -1
- package/aws/ses/{AwsSesNamespace.d.ts → server/AwsSesNamespace.d.ts} +2 -2
- package/aws/ses/{AwsSesNamespace.js → server/AwsSesNamespace.js} +1 -1
- package/aws/ses/{SimpleEmail.d.ts → server/SimpleEmail.d.ts} +1 -1
- package/aws/ses/{SimpleEmail.js → server/SimpleEmail.js} +1 -1
- package/aws/ses/{server.d.ts → server/index.d.ts} +1 -1
- package/aws/ses/{server.js → server/index.js} +1 -1
- package/aws/sqs/{AwsSqsNamespace.d.ts → server/AwsSqsNamespace.d.ts} +2 -2
- package/aws/sqs/{AwsSqsNamespace.js → server/AwsSqsNamespace.js} +1 -1
- package/aws/sqs/{server.d.ts → server/index.d.ts} +1 -1
- package/aws/sqs/{server.js → server/index.js} +1 -1
- package/aws/ssm/{AwsSsmNamespace.d.ts → server/AwsSsmNamespace.d.ts} +2 -2
- package/aws/ssm/{AwsSsmNamespace.js → server/AwsSsmNamespace.js} +1 -1
- package/aws/ssm/{server.d.ts → server/index.d.ts} +1 -1
- package/aws/ssm/{server.js → server/index.js} +1 -1
- package/brightData/serpApi/{getAsyncRequestId.d.ts → server/getAsyncRequestId.d.ts} +2 -2
- package/brightData/serpApi/{getAsyncRequestId.js → server/getAsyncRequestId.js} +3 -3
- package/brightData/serpApi/{getAsyncResults.d.ts → server/getAsyncResults.d.ts} +2 -2
- package/brightData/serpApi/{getAsyncResults.js → server/getAsyncResults.js} +3 -3
- package/brightData/serpApi/{getRealtime.d.ts → server/getRealtime.d.ts} +1 -1
- package/brightData/serpApi/{getRealtime.js → server/getRealtime.js} +1 -1
- package/brightData/webScraperIde/{getBatch.d.ts → server/getBatch.d.ts} +1 -1
- package/brightData/webScraperIde/{getBatch.js → server/getBatch.js} +1 -1
- package/brightData/webScraperIde/{getRealtime.d.ts → server/getRealtime.d.ts} +1 -1
- package/brightData/webScraperIde/{getRealtime.js → server/getRealtime.js} +3 -3
- package/cache/{test → server/test}/cache.test.js +1 -1
- package/environment/index.js +7 -8
- package/eskimi/{getAgeGroup.js → server/getAgeGroup.js} +1 -1
- package/eskimi/{getData.js → server/getData.js} +1 -1
- package/eskimi/{getDevice.js → server/getDevice.js} +1 -1
- package/eskimi/{getGender.js → server/getGender.js} +1 -1
- package/eskimi/server/index.d.ts +4 -0
- package/eskimi/server/index.js +4 -0
- package/file/getFileKey.d.ts +4 -0
- package/file/getFileKey.js +23 -0
- package/file/index.d.ts +1 -9
- package/file/index.js +1 -36
- package/file/server/createDirectory.d.ts +5 -0
- package/file/server/createDirectory.js +13 -0
- package/file/server/index.d.ts +1 -0
- package/file/server/index.js +1 -0
- package/geo/index.d.ts +2 -2
- package/geo/index.js +2 -2
- package/google/bigQuery/{GoogleBigQueryNamespace.d.ts → server/GoogleBigQueryNamespace.d.ts} +2 -2
- package/google/bigQuery/{GoogleBigQueryNamespace.js → server/GoogleBigQueryNamespace.js} +2 -2
- package/google/bigQuery/{server.js → server/index.js} +1 -1
- package/google/sheets/{GoogleSheetsNamespace.d.ts → server/GoogleSheetsNamespace.d.ts} +2 -2
- package/google/sheets/{GoogleSheetsNamespace.js → server/GoogleSheetsNamespace.js} +2 -2
- package/google/sheets/{server.js → server/index.js} +1 -1
- package/google/storage/{GoogleCloudStorageNamespace.d.ts → server/GoogleCloudStorageNamespace.d.ts} +2 -2
- package/google/storage/{GoogleCloudStorageNamespace.js → server/GoogleCloudStorageNamespace.js} +2 -2
- package/google/storage/{server.js → server/index.js} +1 -1
- package/googleAds/{GoogleAdsNamespace.d.ts → server/GoogleAdsNamespace.d.ts} +2 -2
- package/googleAds/{GoogleAdsNamespace.js → server/GoogleAdsNamespace.js} +3 -3
- package/googleAds/{server.js → server/index.js} +1 -1
- package/googlePageSpeed/{GooglePageSpeedNamespace.d.ts → server/GooglePageSpeedNamespace.d.ts} +2 -2
- package/googlePageSpeed/{GooglePageSpeedNamespace.js → server/GooglePageSpeedNamespace.js} +3 -3
- package/googlePageSpeed/{server.js → server/index.js} +1 -1
- package/googleSearchIncidents/{server.js → server/index.js} +1 -1
- package/greenDomain/{server.js → server/index.js} +1 -1
- package/json/index.d.ts +2 -2
- package/json/index.js +2 -2
- package/littleWarden/{LittleWardenNamespace.d.ts → server/LittleWardenNamespace.d.ts} +2 -2
- package/littleWarden/{LittleWardenNamespace.js → server/LittleWardenNamespace.js} +2 -2
- package/littleWarden/{getUrlStatus.js → server/getUrlStatus.js} +1 -1
- package/littleWarden/{server.d.ts → server/index.d.ts} +1 -1
- package/littleWarden/{server.js → server/index.js} +2 -2
- package/lumar/api/{buildRequest.d.ts → server/buildRequest.d.ts} +1 -1
- package/lumar/api/{buildRequest.js → server/buildRequest.js} +1 -1
- package/lumar/api/server/getData.d.ts +1 -0
- package/lumar/api/server/getData.js +9 -0
- package/lumar/api/{server.d.ts → server/index.d.ts} +3 -3
- package/lumar/api/{server.js → server/index.js} +3 -3
- package/lumar/api/{initClient.js → server/initClient.js} +1 -1
- package/lumar/graphql/server/getData.d.ts +1 -0
- package/lumar/graphql/{getData.js → server/getData.js} +3 -3
- package/lumar/graphql/{initClient.js → server/initClient.js} +1 -1
- package/lumar/graphql/{queries → server/queries}/getReportDifferences.js +1 -1
- package/myTarget/server/index.d.ts +5 -0
- package/myTarget/{server.js → server/index.js} +3 -3
- package/nextAuth/isSessionReady.js +1 -7
- package/nextJs/client/index.d.ts +1 -0
- package/nextJs/client/index.js +1 -0
- package/number/index.d.ts +6 -6
- package/number/index.js +6 -6
- package/object/index.d.ts +1 -1
- package/object/index.js +1 -1
- package/onePassword/{OnePasswordNamespace.d.ts → server/OnePasswordNamespace.d.ts} +2 -2
- package/onePassword/{OnePasswordNamespace.js → server/OnePasswordNamespace.js} +1 -1
- package/openAi/{OpenAiNamespace.d.ts → server/OpenAiNamespace.d.ts} +2 -2
- package/openAi/{OpenAiNamespace.js → server/OpenAiNamespace.js} +2 -2
- package/openAi/{server.js → server/index.js} +1 -1
- package/package.json +688 -16
- package/prisma/index.d.ts +1 -0
- package/prisma/index.js +1 -0
- package/prisma/{PrismaNamespace.d.ts → server/PrismaNamespace.d.ts} +2 -3
- package/prisma/{PrismaNamespace.js → server/PrismaNamespace.js} +2 -2
- package/prisma/{server.d.ts → server/index.d.ts} +0 -1
- package/prisma/{server.js → server/index.js} +0 -1
- package/snapchat/{SnapchatNamespace.d.ts → server/SnapchatNamespace.d.ts} +2 -2
- package/snapchat/{SnapchatNamespace.js → server/SnapchatNamespace.js} +2 -2
- package/snapchat/{server.js → server/index.js} +1 -1
- package/swr/{index.d.ts → client/index.d.ts} +1 -1
- package/upTimeRobot/{UpTimeRobotNamespace.d.ts → server/UpTimeRobotNamespace.d.ts} +2 -2
- package/upTimeRobot/{UpTimeRobotNamespace.js → server/UpTimeRobotNamespace.js} +2 -2
- package/upTimeRobot/{server.js → server/index.js} +1 -1
- package/url/{writeUrlContents.js → server/writeUrlContents.js} +1 -1
- package/xml/{getXml.js → server/getXml.js} +1 -1
- package/xml/server/index.d.ts +1 -0
- package/xml/server/index.js +1 -0
- package/lumar/api/getData.d.ts +0 -5
- package/lumar/api/getData.js +0 -9
- package/lumar/graphql/getData.d.ts +0 -1
- package/myTarget/server.d.ts +0 -5
- package/nextJs/client.d.ts +0 -1
- package/nextJs/client.js +0 -1
- /package/adverity/{server.d.ts → server/index.d.ts} +0 -0
- /package/adverity/{server.js → server/index.js} +0 -0
- /package/aws/s3/{payload.d.ts → server/payload.d.ts} +0 -0
- /package/aws/s3/{payload.js → server/payload.js} +0 -0
- /package/aws/{server.d.ts → server/index.d.ts} +0 -0
- /package/aws/{isResponse200.d.ts → server/isResponse200.d.ts} +0 -0
- /package/brightData/serpApi/{buildGoogleSerpUrl.d.ts → server/buildGoogleSerpUrl.d.ts} +0 -0
- /package/brightData/serpApi/{buildGoogleSerpUrl.js → server/buildGoogleSerpUrl.js} +0 -0
- /package/brightData/serpApi/{buildGoogleTrendsUrl.d.ts → server/buildGoogleTrendsUrl.d.ts} +0 -0
- /package/brightData/serpApi/{buildGoogleTrendsUrl.js → server/buildGoogleTrendsUrl.js} +0 -0
- /package/brightData/serpApi/{server.d.ts → server/index.d.ts} +0 -0
- /package/brightData/serpApi/{server.js → server/index.js} +0 -0
- /package/brightData/{server.d.ts → server/index.d.ts} +0 -0
- /package/brightData/{server.js → server/index.js} +0 -0
- /package/brightData/webScraperIde/{server.d.ts → server/index.d.ts} +0 -0
- /package/brightData/webScraperIde/{server.js → server/index.js} +0 -0
- /package/cache/{server.d.ts → server/index.d.ts} +0 -0
- /package/cache/{server.js → server/index.js} +0 -0
- /package/cache/{test → server/test}/cache.test.d.ts +0 -0
- /package/eskimi/{server.d.ts → index.d.ts} +0 -0
- /package/eskimi/{server.js → index.js} +0 -0
- /package/eskimi/{getAgeGroup.d.ts → server/getAgeGroup.d.ts} +0 -0
- /package/eskimi/{getData.d.ts → server/getData.d.ts} +0 -0
- /package/eskimi/{getDevice.d.ts → server/getDevice.d.ts} +0 -0
- /package/eskimi/{getGender.d.ts → server/getGender.d.ts} +0 -0
- /package/google/bigQuery/{server.d.ts → server/index.d.ts} +0 -0
- /package/google/bigQuery/{loadData.d.ts → server/loadData.d.ts} +0 -0
- /package/google/bigQuery/{loadData.js → server/loadData.js} +0 -0
- /package/google/{server.d.ts → server/index.d.ts} +0 -0
- /package/google/{server.js → server/index.js} +0 -0
- /package/google/sheets/{getAssociatedData.d.ts → server/getAssociatedData.d.ts} +0 -0
- /package/google/sheets/{getAssociatedData.js → server/getAssociatedData.js} +0 -0
- /package/google/sheets/{server.d.ts → server/index.d.ts} +0 -0
- /package/google/storage/{server.d.ts → server/index.d.ts} +0 -0
- /package/googleAds/keywordPlanner/{server.d.ts → server/index.d.ts} +0 -0
- /package/googleAds/keywordPlanner/{server.js → server/index.js} +0 -0
- /package/googleAds/{server.d.ts → server/index.d.ts} +0 -0
- /package/googlePageSpeed/{server.d.ts → server/index.d.ts} +0 -0
- /package/googleSearchIncidents/{server.d.ts → server/index.d.ts} +0 -0
- /package/greenDomain/{server.d.ts → server/index.d.ts} +0 -0
- /package/inngest/{server.d.ts → index.d.ts} +0 -0
- /package/inngest/{server.js → index.js} +0 -0
- /package/littleWarden/{getUrlStatus.d.ts → server/getUrlStatus.d.ts} +0 -0
- /package/lumar/api/{initClient.d.ts → server/initClient.d.ts} +0 -0
- /package/lumar/graphql/{columns.d.ts → server/columns.d.ts} +0 -0
- /package/lumar/graphql/{columns.js → server/columns.js} +0 -0
- /package/lumar/graphql/{server.d.ts → server/index.d.ts} +0 -0
- /package/lumar/graphql/{server.js → server/index.js} +0 -0
- /package/lumar/graphql/{initClient.d.ts → server/initClient.d.ts} +0 -0
- /package/lumar/graphql/{queries → server/queries}/crawl.d.ts +0 -0
- /package/lumar/graphql/{queries → server/queries}/crawl.js +0 -0
- /package/lumar/graphql/{queries → server/queries}/getCrawls.d.ts +0 -0
- /package/lumar/graphql/{queries → server/queries}/getCrawls.js +0 -0
- /package/lumar/graphql/{queries → server/queries}/getReportDifferences.d.ts +0 -0
- /package/lumar/graphql/{queries → server/queries}/getRows.d.ts +0 -0
- /package/lumar/graphql/{queries → server/queries}/getRows.js +0 -0
- /package/lumar/graphql/{queries → server/queries}/getTotals.d.ts +0 -0
- /package/lumar/graphql/{queries → server/queries}/getTotals.js +0 -0
- /package/lumar/graphql/{queries → server/queries}/row.d.ts +0 -0
- /package/lumar/graphql/{queries → server/queries}/row.js +0 -0
- /package/lumar/graphql/{reportTemplates.d.ts → server/reportTemplates.d.ts} +0 -0
- /package/lumar/graphql/{reportTemplates.js → server/reportTemplates.js} +0 -0
- /package/onePassword/{server.d.ts → server/index.d.ts} +0 -0
- /package/onePassword/{server.js → server/index.js} +0 -0
- /package/openAi/{server.d.ts → server/index.d.ts} +0 -0
- /package/snapchat/{server.d.ts → server/index.d.ts} +0 -0
- /package/stream/{server.d.ts → server/index.d.ts} +0 -0
- /package/stream/{server.js → server/index.js} +0 -0
- /package/stream/{sort.d.ts → server/sort.d.ts} +0 -0
- /package/stream/{sort.js → server/sort.js} +0 -0
- /package/swr/{index.js → client/index.js} +0 -0
- /package/upTimeRobot/{server.d.ts → server/index.d.ts} +0 -0
- /package/url/{server.d.ts → server/index.d.ts} +0 -0
- /package/url/{server.js → server/index.js} +0 -0
- /package/url/{writeUrlContents.d.ts → server/writeUrlContents.d.ts} +0 -0
- /package/util/{getBrotliCompressed.d.ts → server/getBrotliCompressed.d.ts} +0 -0
- /package/util/{getBrotliCompressed.js → server/getBrotliCompressed.js} +0 -0
- /package/util/{getBrotliDecompressed.d.ts → server/getBrotliDecompressed.d.ts} +0 -0
- /package/util/{getBrotliDecompressed.js → server/getBrotliDecompressed.js} +0 -0
- /package/util/{getGzipCompressed.d.ts → server/getGzipCompressed.d.ts} +0 -0
- /package/util/{getGzipCompressed.js → server/getGzipCompressed.js} +0 -0
- /package/util/{getGzipDecompressed.d.ts → server/getGzipDecompressed.d.ts} +0 -0
- /package/util/{getGzipDecompressed.js → server/getGzipDecompressed.js} +0 -0
- /package/util/{server.d.ts → server/index.d.ts} +0 -0
- /package/util/{server.js → server/index.js} +0 -0
- /package/xml/{getXml.d.ts → server/getXml.d.ts} +0 -0
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { DateTime } from "luxon";
|
|
2
|
+
import { format } from "../date";
|
|
3
|
+
/**
|
|
4
|
+
* Create a file key from the inputs so it can handle objects/number/etc.
|
|
5
|
+
*/
|
|
6
|
+
export const getFileKey = (inputs) => {
|
|
7
|
+
let response = "";
|
|
8
|
+
for (let i = 0; i < inputs.length; i++) {
|
|
9
|
+
if (i > 0) {
|
|
10
|
+
response += "/";
|
|
11
|
+
}
|
|
12
|
+
if ("string" === typeof inputs[i]) {
|
|
13
|
+
response += inputs[i];
|
|
14
|
+
}
|
|
15
|
+
else if (inputs[i] instanceof Date || inputs[i] instanceof DateTime) {
|
|
16
|
+
response += format(inputs[i], "YYYY-MM-DD");
|
|
17
|
+
}
|
|
18
|
+
else {
|
|
19
|
+
response += JSON.stringify(inputs[i]);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
return response;
|
|
23
|
+
};
|
package/file/index.d.ts
CHANGED
|
@@ -1,9 +1 @@
|
|
|
1
|
-
|
|
2
|
-
* Create a directory recursively.
|
|
3
|
-
* Requires fs-extra
|
|
4
|
-
*/
|
|
5
|
-
export declare const createDirectory: (filePath: string) => Promise<unknown>;
|
|
6
|
-
/**
|
|
7
|
-
* Create a file key from the inputs so it can handle objects/number/etc.
|
|
8
|
-
*/
|
|
9
|
-
export declare const getFileKey: (inputs: any[]) => string;
|
|
1
|
+
export * from "./getFileKey";
|
package/file/index.js
CHANGED
|
@@ -1,36 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import { DateTime } from "luxon";
|
|
3
|
-
/**
|
|
4
|
-
* Create a directory recursively.
|
|
5
|
-
* Requires fs-extra
|
|
6
|
-
*/
|
|
7
|
-
export const createDirectory = (filePath) => {
|
|
8
|
-
return new Promise(async (resolve, reject) => {
|
|
9
|
-
const fs = await import("fs-extra");
|
|
10
|
-
const path = await import("path");
|
|
11
|
-
const fileDir = path.parse(filePath).dir;
|
|
12
|
-
fs.ensureDirSync(fileDir);
|
|
13
|
-
resolve(true);
|
|
14
|
-
});
|
|
15
|
-
};
|
|
16
|
-
/**
|
|
17
|
-
* Create a file key from the inputs so it can handle objects/number/etc.
|
|
18
|
-
*/
|
|
19
|
-
export const getFileKey = (inputs) => {
|
|
20
|
-
let response = "";
|
|
21
|
-
for (let i = 0; i < inputs.length; i++) {
|
|
22
|
-
if (i > 0) {
|
|
23
|
-
response += "/";
|
|
24
|
-
}
|
|
25
|
-
if ("string" === typeof inputs[i]) {
|
|
26
|
-
response += inputs[i];
|
|
27
|
-
}
|
|
28
|
-
else if (inputs[i] instanceof Date || inputs[i] instanceof DateTime) {
|
|
29
|
-
response += format(inputs[i], "YYYY-MM-DD");
|
|
30
|
-
}
|
|
31
|
-
else {
|
|
32
|
-
response += JSON.stringify(inputs[i]);
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
return response;
|
|
36
|
-
};
|
|
1
|
+
export * from "./getFileKey";
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Create a directory recursively.
|
|
3
|
+
* Requires fs-extra
|
|
4
|
+
*/
|
|
5
|
+
export const createDirectory = (filePath) => {
|
|
6
|
+
return new Promise(async (resolve, reject) => {
|
|
7
|
+
const fs = await import("fs-extra");
|
|
8
|
+
const path = await import("path");
|
|
9
|
+
const fileDir = path.parse(filePath).dir;
|
|
10
|
+
fs.ensureDirSync(fileDir);
|
|
11
|
+
resolve(true);
|
|
12
|
+
});
|
|
13
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./createDirectory";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./createDirectory";
|
package/geo/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
1
|
+
export * from "./countries";
|
|
2
|
+
export * from "./languages";
|
package/geo/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
1
|
+
export * from "./countries";
|
|
2
|
+
export * from "./languages";
|
package/google/bigQuery/{GoogleBigQueryNamespace.d.ts → server/GoogleBigQueryNamespace.d.ts}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { BaseNamespace } from "
|
|
1
|
+
import { BaseNamespace } from "../../../_class";
|
|
2
2
|
import type { BigQuery, DatasetResource, QueryOptions } from "@google-cloud/bigquery";
|
|
3
|
-
import { GoogleCloudConfig } from "
|
|
3
|
+
import { GoogleCloudConfig } from "../../server";
|
|
4
4
|
export type QueryInput = string | {
|
|
5
5
|
query: string;
|
|
6
6
|
location?: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { BaseNamespace } from "
|
|
2
|
-
import { getConfig } from "
|
|
1
|
+
import { BaseNamespace } from "../../../_class";
|
|
2
|
+
import { getConfig } from "../../server";
|
|
3
3
|
export class GoogleBigQueryNamespace extends BaseNamespace {
|
|
4
4
|
ensureInit = async () => {
|
|
5
5
|
if (!this.client) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { GoogleBigQueryNamespace } from "./GoogleBigQueryNamespace";
|
|
2
|
-
import { onePasswordClient } from "
|
|
2
|
+
import { onePasswordClient } from "../../../onePassword/server";
|
|
3
3
|
const googleBigQueryNamespaces = new Map();
|
|
4
4
|
export const googleBigQueryClient = async (key = "default", projectId, config, vaultId, itemId) => {
|
|
5
5
|
if (googleBigQueryNamespaces.has(key)) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { BaseNamespace } from "
|
|
2
|
-
import { GoogleCloudConfig } from "
|
|
1
|
+
import { BaseNamespace } from "../../../_class";
|
|
2
|
+
import { GoogleCloudConfig } from "../../server";
|
|
3
3
|
import type { GoogleAuth } from "googleapis-common";
|
|
4
4
|
type GetBatchDataProps = {
|
|
5
5
|
spreadsheetId: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { BaseNamespace } from "
|
|
2
|
-
import { getConfig } from "
|
|
1
|
+
import { BaseNamespace } from "../../../_class";
|
|
2
|
+
import { getConfig } from "../../server";
|
|
3
3
|
export class GoogleSheetsNamespace extends BaseNamespace {
|
|
4
4
|
ensureInit = async () => {
|
|
5
5
|
if (!this.client) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { GoogleSheetsNamespace } from "./GoogleSheetsNamespace";
|
|
2
|
-
import { onePasswordClient } from "
|
|
2
|
+
import { onePasswordClient } from "../../../onePassword/server";
|
|
3
3
|
const googleSheetsNamespaces = new Map();
|
|
4
4
|
export const googleSheetsAuths = async (key = "default", projectId, config, vaultId, itemId) => {
|
|
5
5
|
if (googleSheetsNamespaces.has(key)) {
|
package/google/storage/{GoogleCloudStorageNamespace.d.ts → server/GoogleCloudStorageNamespace.d.ts}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { BaseNamespace } from "
|
|
1
|
+
import { BaseNamespace } from "../../../_class";
|
|
2
2
|
import type { Storage } from "@google-cloud/storage";
|
|
3
|
-
import { GoogleCloudConfig } from "
|
|
3
|
+
import { GoogleCloudConfig } from "../../server";
|
|
4
4
|
export declare class GoogleCloudStorageNamespace extends BaseNamespace {
|
|
5
5
|
client: Storage;
|
|
6
6
|
config: GoogleCloudConfig & {
|
package/google/storage/{GoogleCloudStorageNamespace.js → server/GoogleCloudStorageNamespace.js}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { BaseNamespace } from "
|
|
2
|
-
import { getConfig } from "
|
|
1
|
+
import { BaseNamespace } from "../../../_class";
|
|
2
|
+
import { getConfig } from "../../server";
|
|
3
3
|
export class GoogleCloudStorageNamespace extends BaseNamespace {
|
|
4
4
|
ensureInit = async () => {
|
|
5
5
|
if (!this.client) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { GoogleCloudStorageNamespace } from "./GoogleCloudStorageNamespace";
|
|
2
|
-
import { onePasswordClient } from "
|
|
2
|
+
import { onePasswordClient } from "../../../onePassword/server";
|
|
3
3
|
const googleCloudStorageNamespaces = new Map();
|
|
4
4
|
export const googleCloudStorageClient = async (key = "default", projectId, config, vaultId, itemId) => {
|
|
5
5
|
if (googleCloudStorageNamespaces.has(key)) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { BaseNamespace } from "
|
|
1
|
+
import { BaseNamespace } from "../../_class";
|
|
2
2
|
import type { GoogleAdsApi } from "google-ads-api";
|
|
3
|
-
import { Config } from "./
|
|
3
|
+
import { Config } from "./";
|
|
4
4
|
export declare class GoogleAdsNamespace extends BaseNamespace {
|
|
5
5
|
client: GoogleAdsApi;
|
|
6
6
|
config: Config;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BaseNamespace } from "
|
|
1
|
+
import { BaseNamespace } from "../../_class";
|
|
2
2
|
export class GoogleAdsNamespace extends BaseNamespace {
|
|
3
3
|
mccAccountId = "";
|
|
4
4
|
refreshToken = "";
|
|
@@ -23,8 +23,8 @@ export class GoogleAdsNamespace extends BaseNamespace {
|
|
|
23
23
|
await this.ensureInit();
|
|
24
24
|
const customer = this.client.Customer({
|
|
25
25
|
customer_id: customerId,
|
|
26
|
-
login_customer_id:
|
|
27
|
-
refresh_token:
|
|
26
|
+
login_customer_id: this.mccAccountId,
|
|
27
|
+
refresh_token: this.refreshToken,
|
|
28
28
|
});
|
|
29
29
|
return customer;
|
|
30
30
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { GoogleAdsNamespace } from "./GoogleAdsNamespace";
|
|
2
|
-
import { onePasswordClient } from "
|
|
2
|
+
import { onePasswordClient } from "../../onePassword/server";
|
|
3
3
|
const googleAdsNamespaces = new Map();
|
|
4
4
|
export const googleAdsClient = async (key = "default", config, vaultId, itemId) => {
|
|
5
5
|
if (googleAdsNamespaces.has(key)) {
|
package/googlePageSpeed/{GooglePageSpeedNamespace.d.ts → server/GooglePageSpeedNamespace.d.ts}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { BaseNamespace } from "
|
|
2
|
-
import { Category, GooglePageSpeedConfig, Strategy } from "./
|
|
1
|
+
import { BaseNamespace } from "../../_class";
|
|
2
|
+
import { Category, GooglePageSpeedConfig, Strategy } from "./";
|
|
3
3
|
/**
|
|
4
4
|
* Based on https://developers.google.com/speed/docs/insights/rest/v5/pagespeedapi/runpagespeed
|
|
5
5
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { BaseNamespace } from "
|
|
2
|
-
import { Category, Strategy } from "./
|
|
3
|
-
import { get } from "
|
|
1
|
+
import { BaseNamespace } from "../../_class";
|
|
2
|
+
import { Category, Strategy } from "./";
|
|
3
|
+
import { get } from "../../axios";
|
|
4
4
|
/**
|
|
5
5
|
* Based on https://developers.google.com/speed/docs/insights/rest/v5/pagespeedapi/runpagespeed
|
|
6
6
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { GooglePageSpeedNamespace } from "./GooglePageSpeedNamespace";
|
|
2
|
-
import { onePasswordClient } from "
|
|
2
|
+
import { onePasswordClient } from "../../onePassword/server";
|
|
3
3
|
const googlePageSpeedNamespaces = new Map();
|
|
4
4
|
export const googlePageSpeedClient = async (key = "default", config, vaultId, itemId) => {
|
|
5
5
|
if (googlePageSpeedNamespaces.has(key)) {
|
package/json/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
1
|
+
export * from "./getJsonNewline";
|
|
2
|
+
export * from "./isJson";
|
package/json/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
1
|
+
export * from "./getJsonNewline";
|
|
2
|
+
export * from "./isJson";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { BaseNamespace } from "
|
|
2
|
-
import { LittleWardenConfig } from "./
|
|
1
|
+
import { BaseNamespace } from "../../_class";
|
|
2
|
+
import { LittleWardenConfig } from "./";
|
|
3
3
|
/**
|
|
4
4
|
* Based on https://developers.google.com/speed/docs/insights/rest/v5/pagespeedapi/runpagespeed
|
|
5
5
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { BaseNamespace } from "
|
|
2
|
-
import { get } from "
|
|
1
|
+
import { BaseNamespace } from "../../_class";
|
|
2
|
+
import { get } from "../../axios";
|
|
3
3
|
/**
|
|
4
4
|
* Based on https://developers.google.com/speed/docs/insights/rest/v5/pagespeedapi/runpagespeed
|
|
5
5
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { LittleWardenNamespace } from "./LittleWardenNamespace";
|
|
2
|
-
import { onePasswordClient } from "
|
|
2
|
+
import { onePasswordClient } from "../../onePassword/server";
|
|
3
3
|
const littleWardenNamespaces = new Map();
|
|
4
4
|
export const littleWardenClient = async (key = "default", config, vaultId, itemId) => {
|
|
5
5
|
if (littleWardenNamespaces.has(key)) {
|
|
@@ -62,4 +62,4 @@ export const isDanger = ({ field }) => {
|
|
|
62
62
|
}
|
|
63
63
|
return response;
|
|
64
64
|
};
|
|
65
|
-
export
|
|
65
|
+
export * from "./getUrlStatus";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const getData: (url: string, accessToken: string) => Promise<import("../../../api").ApiResponseClass<any, any>>;
|
|
@@ -31,6 +31,6 @@ export declare const reports: {
|
|
|
31
31
|
REPORT_STATISTICS: string;
|
|
32
32
|
REPORT_SUMMARY: string;
|
|
33
33
|
};
|
|
34
|
-
export
|
|
35
|
-
export
|
|
36
|
-
export
|
|
34
|
+
export * from "./buildRequest";
|
|
35
|
+
export * from "./getData";
|
|
36
|
+
export * from "./initClient";
|
|
@@ -22,6 +22,6 @@ export const reports = {
|
|
|
22
22
|
REPORT_STATISTICS: 'report_statistics',
|
|
23
23
|
REPORT_SUMMARY: 'report_summary',
|
|
24
24
|
};
|
|
25
|
-
export
|
|
26
|
-
export
|
|
27
|
-
export
|
|
25
|
+
export * from "./buildRequest";
|
|
26
|
+
export * from "./getData";
|
|
27
|
+
export * from "./initClient";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const getData: (query: string, variables: object, accessToken: string) => Promise<import("../../../api").ApiResponseClass<any, any>>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { post } from "
|
|
2
|
-
export const getData = async (query, variables
|
|
1
|
+
import { post } from "../../../axios";
|
|
2
|
+
export const getData = async (query, variables, accessToken) => {
|
|
3
3
|
let queryClean = query.trim();
|
|
4
4
|
queryClean = queryClean.replace(/\n/g, " ");
|
|
5
5
|
queryClean = queryClean.replace(/\t/g, " ");
|
|
@@ -9,7 +9,7 @@ export const getData = async (query, variables = {}) => {
|
|
|
9
9
|
variables,
|
|
10
10
|
}, {
|
|
11
11
|
headers: {
|
|
12
|
-
"x-auth-token":
|
|
12
|
+
"x-auth-token": accessToken,
|
|
13
13
|
},
|
|
14
14
|
});
|
|
15
15
|
return apiResponse;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { post } from "
|
|
1
|
+
import { post } from "../../axios";
|
|
2
2
|
/**
|
|
3
3
|
* Make the request to MyTarget API using the access token.
|
|
4
4
|
*/
|
|
5
|
-
export const request = async (data, url) => {
|
|
5
|
+
export const request = async (data, url, accessToken) => {
|
|
6
6
|
const response = await post(url, data, {
|
|
7
7
|
headers: {
|
|
8
|
-
Authorization: `Bearer ${
|
|
8
|
+
Authorization: `Bearer ${accessToken}`,
|
|
9
9
|
"Content-Type": "application/json",
|
|
10
10
|
},
|
|
11
11
|
});
|
|
@@ -1,9 +1,3 @@
|
|
|
1
1
|
export const isSessionReady = (session) => {
|
|
2
|
-
|
|
3
|
-
if (undefined !== session && null !== session) {
|
|
4
|
-
if (undefined !== session.user && null !== session.user) {
|
|
5
|
-
response = true;
|
|
6
|
-
}
|
|
7
|
-
}
|
|
8
|
-
return response;
|
|
2
|
+
return null !== session?.user;
|
|
9
3
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./LazyLoad";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./LazyLoad";
|
package/number/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
export
|
|
6
|
-
export
|
|
1
|
+
export * from "./format";
|
|
2
|
+
export * from "./formatCurrency";
|
|
3
|
+
export * from "./getDecimal";
|
|
4
|
+
export * from "./getSafeDivide";
|
|
5
|
+
export * from "./getNumber";
|
|
6
|
+
export * from "./getPercentIncrease";
|
package/number/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
export
|
|
6
|
-
export
|
|
1
|
+
export * from "./format";
|
|
2
|
+
export * from "./formatCurrency";
|
|
3
|
+
export * from "./getDecimal";
|
|
4
|
+
export * from "./getSafeDivide";
|
|
5
|
+
export * from "./getNumber";
|
|
6
|
+
export * from "./getPercentIncrease";
|
package/object/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export * from "./replaceKeys";
|
package/object/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export * from "./replaceKeys";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { OnePasswordConfig } from "./
|
|
2
|
-
import { BaseNamespace } from "
|
|
1
|
+
import { OnePasswordConfig } from "./";
|
|
2
|
+
import { BaseNamespace } from "../../_class";
|
|
3
3
|
import type { Client } from "@1password/sdk";
|
|
4
4
|
export declare class OnePasswordNamespace extends BaseNamespace {
|
|
5
5
|
client: Client;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { OpenAiConfig } from "./
|
|
2
|
-
import { BaseNamespace } from "
|
|
1
|
+
import { OpenAiConfig } from "./";
|
|
2
|
+
import { BaseNamespace } from "../../_class";
|
|
3
3
|
export declare class OpenAiNamespace extends BaseNamespace {
|
|
4
4
|
client: boolean;
|
|
5
5
|
config: OpenAiConfig;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { BaseNamespace } from "
|
|
2
|
-
import { post } from "
|
|
1
|
+
import { BaseNamespace } from "../../_class";
|
|
2
|
+
import { post } from "../../axios";
|
|
3
3
|
export class OpenAiNamespace extends BaseNamespace {
|
|
4
4
|
/**
|
|
5
5
|
* Renew the access token as it expires every 3 hours.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { OpenAiNamespace } from "./OpenAiNamespace";
|
|
2
|
-
import { onePasswordClient } from "
|
|
2
|
+
import { onePasswordClient } from "../../onePassword/server";
|
|
3
3
|
const openAiNamespaces = new Map();
|
|
4
4
|
export const openAiClient = async (key = "default", config, vaultId, itemId) => {
|
|
5
5
|
if (openAiNamespaces.has(key)) {
|