@8ms/helpers 2.0.0 → 2.0.2
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/workflows/deploy_npmjs.yml +7 -0
- package/.yarn/install-state.gz +0 -0
- package/_class/BaseClass.d.ts +18 -0
- package/_class/BaseClass.js +53 -0
- package/_class/BaseNamespace.d.ts +9 -0
- package/_class/BaseNamespace.js +27 -0
- package/_class/index.d.ts +2 -0
- package/_class/index.js +7 -0
- package/adverity/getJobs.d.ts +15 -0
- package/adverity/getJobs.js +30 -0
- package/adverity/index.d.ts +112 -0
- package/adverity/index.js +61 -0
- package/api/ApiResponseClass.d.ts +35 -0
- package/api/ApiResponseClass.js +97 -0
- package/api/index.d.ts +22 -0
- package/api/index.js +44 -0
- package/array/index.d.ts +8 -0
- package/array/index.js +17 -0
- package/atInternet/index.d.ts +16 -0
- package/atInternet/index.js +18 -0
- package/aws/athenaExpress/AwsAthenaNamespace.d.ts +8 -0
- package/aws/athenaExpress/AwsAthenaNamespace.js +82 -0
- package/aws/athenaExpress/index.d.ts +10 -0
- package/aws/athenaExpress/index.js +40 -0
- package/aws/ec2/AwsEc2Namespace.d.ts +10 -0
- package/aws/ec2/AwsEc2Namespace.js +78 -0
- package/aws/ec2/index.d.ts +3 -0
- package/aws/ec2/index.js +16 -0
- package/aws/ecs/AwsEcsNamespace.d.ts +53 -0
- package/aws/ecs/AwsEcsNamespace.js +159 -0
- package/aws/ecs/index.d.ts +3 -0
- package/aws/ecs/index.js +16 -0
- package/aws/glue/AwsGlueNamespace.d.ts +12 -0
- package/aws/glue/AwsGlueNamespace.js +70 -0
- package/aws/glue/index.d.ts +3 -0
- package/aws/glue/index.js +16 -0
- package/aws/index.d.ts +9 -0
- package/aws/index.js +34 -0
- package/aws/isResponse200.d.ts +4 -0
- package/aws/isResponse200.js +16 -0
- package/aws/lambda/AwsLambdaNamespace.d.ts +21 -0
- package/aws/lambda/AwsLambdaNamespace.js +110 -0
- package/aws/lambda/index.d.ts +4 -0
- package/aws/lambda/index.js +21 -0
- package/aws/s3/AwsS3Namespace.d.ts +60 -0
- package/aws/s3/AwsS3Namespace.js +401 -0
- package/aws/s3/index.d.ts +25 -0
- package/aws/s3/index.js +36 -0
- package/aws/s3/payload.d.ts +42 -0
- package/aws/s3/payload.js +46 -0
- package/aws/ses/AwsSesNamespace.d.ts +18 -0
- package/aws/ses/AwsSesNamespace.js +69 -0
- package/aws/ses/SimpleEmail.d.ts +56 -0
- package/aws/ses/SimpleEmail.js +106 -0
- package/aws/ses/index.d.ts +4 -0
- package/aws/ses/index.js +18 -0
- package/aws/sqs/AwsSqsNamespace.d.ts +34 -0
- package/aws/sqs/AwsSqsNamespace.js +96 -0
- package/aws/sqs/index.d.ts +3 -0
- package/aws/sqs/index.js +16 -0
- package/aws/ssm/AwsSsmNamespace.d.ts +11 -0
- package/aws/ssm/AwsSsmNamespace.js +89 -0
- package/aws/ssm/index.d.ts +3 -0
- package/aws/ssm/index.js +16 -0
- package/axios/deleteRequest.d.ts +6 -0
- package/axios/deleteRequest.js +33 -0
- package/axios/get.d.ts +5 -0
- package/axios/get.js +31 -0
- package/axios/index.d.ts +3 -0
- package/axios/index.js +9 -0
- package/axios/post.d.ts +5 -0
- package/axios/post.js +32 -0
- package/boolean/getBoolean.d.ts +4 -0
- package/boolean/getBoolean.js +23 -0
- package/boolean/index.d.ts +1 -0
- package/boolean/index.js +5 -0
- package/brightData/index.d.ts +15 -0
- package/brightData/index.js +20 -0
- package/brightData/serpApi/buildGoogleSerpUrl.d.ts +32 -0
- package/brightData/serpApi/buildGoogleSerpUrl.js +116 -0
- package/brightData/serpApi/buildGoogleTrendsUrl.d.ts +22 -0
- package/brightData/serpApi/buildGoogleTrendsUrl.js +61 -0
- package/brightData/serpApi/getAsyncRequestId.d.ts +8 -0
- package/brightData/serpApi/getAsyncRequestId.js +36 -0
- package/brightData/serpApi/getAsyncResults.d.ts +7 -0
- package/brightData/serpApi/getAsyncResults.js +35 -0
- package/brightData/serpApi/getRealtime.d.ts +5 -0
- package/brightData/serpApi/getRealtime.js +30 -0
- package/brightData/serpApi/index.d.ts +14 -0
- package/brightData/serpApi/index.js +23 -0
- package/brightData/webScraperIde/getBatch.d.ts +7 -0
- package/brightData/webScraperIde/getBatch.js +28 -0
- package/brightData/webScraperIde/getRealtime.d.ts +7 -0
- package/brightData/webScraperIde/getRealtime.js +49 -0
- package/brightData/webScraperIde/index.d.ts +2 -0
- package/brightData/webScraperIde/index.js +7 -0
- package/cache/index.d.ts +2 -0
- package/cache/index.js +48 -0
- package/cache/test/cache.test.d.ts +1 -0
- package/cache/test/cache.test.js +10 -0
- package/crud/index.d.ts +6 -0
- package/crud/index.js +10 -0
- package/crypto/getDecrypt.d.ts +5 -0
- package/crypto/getDecrypt.js +47 -0
- package/crypto/getEncrypt.d.ts +5 -0
- package/crypto/getEncrypt.js +47 -0
- package/crypto/getRandom.d.ts +4 -0
- package/crypto/getRandom.js +12 -0
- package/crypto/getSha256.d.ts +5 -0
- package/crypto/getSha256.js +48 -0
- package/crypto/index.d.ts +4 -0
- package/crypto/index.js +11 -0
- package/date/calculation.d.ts +75 -0
- package/date/calculation.js +207 -0
- package/date/financialYear.d.ts +19 -0
- package/date/financialYear.js +85 -0
- package/date/format.d.ts +68 -0
- package/date/format.js +150 -0
- package/date/index.d.ts +35 -0
- package/date/index.js +57 -0
- package/environment/index.d.ts +32 -0
- package/environment/index.js +92 -0
- package/eskimi/getAgeGroup.d.ts +4 -0
- package/eskimi/getAgeGroup.js +15 -0
- package/eskimi/getData.d.ts +4 -0
- package/eskimi/getData.js +17 -0
- package/eskimi/getDevice.d.ts +4 -0
- package/eskimi/getDevice.js +15 -0
- package/eskimi/getGender.d.ts +4 -0
- package/eskimi/getGender.js +15 -0
- package/eskimi/index.d.ts +49 -0
- package/eskimi/index.js +96 -0
- package/file/createDirectory.d.ts +5 -0
- package/file/createDirectory.js +50 -0
- package/file/index.d.ts +1 -0
- package/file/index.js +5 -0
- package/geo/countries.d.ts +12 -0
- package/geo/countries.js +222 -0
- package/geo/index.d.ts +2 -0
- package/geo/index.js +7 -0
- package/geo/languages.d.ts +9 -0
- package/geo/languages.js +58 -0
- package/google/bigQuery/GoogleBigQueryNamespace.d.ts +51 -0
- package/google/bigQuery/GoogleBigQueryNamespace.js +165 -0
- package/google/bigQuery/index.d.ts +5 -0
- package/google/bigQuery/index.js +37 -0
- package/google/bigQuery/loadData.d.ts +19 -0
- package/google/bigQuery/loadData.js +18 -0
- package/google/index.d.ts +27 -0
- package/google/index.js +24 -0
- package/google/sheets/GoogleSheetsNamespace.d.ts +16 -0
- package/google/sheets/GoogleSheetsNamespace.js +81 -0
- package/google/sheets/getAssociatedData.d.ts +10 -0
- package/google/sheets/getAssociatedData.js +43 -0
- package/google/sheets/index.d.ts +8 -0
- package/google/sheets/index.js +37 -0
- package/google/storage/GoogleCloudStorageNamespace.d.ts +20 -0
- package/google/storage/GoogleCloudStorageNamespace.js +108 -0
- package/google/storage/index.d.ts +3 -0
- package/google/storage/index.js +30 -0
- package/googleAds/GoogleAdsNamespace.d.ts +11 -0
- package/googleAds/GoogleAdsNamespace.js +73 -0
- package/googleAds/index.d.ts +11 -0
- package/googleAds/index.js +30 -0
- package/googleAds/keywordPlanner/index.d.ts +40 -0
- package/googleAds/keywordPlanner/index.js +59 -0
- package/googlePageSpeed/GooglePageSpeedNamespace.d.ts +11 -0
- package/googlePageSpeed/GooglePageSpeedNamespace.js +35 -0
- package/googlePageSpeed/index.d.ts +17 -0
- package/googlePageSpeed/index.js +44 -0
- package/googleSearchIncidents/index.d.ts +69 -0
- package/googleSearchIncidents/index.js +46 -0
- package/greenDomain/index.d.ts +21 -0
- package/greenDomain/index.js +41 -0
- package/inngest/index.d.ts +6 -0
- package/inngest/index.js +10 -0
- package/json/getJsonNewline.d.ts +1 -0
- package/json/getJsonNewline.js +13 -0
- package/json/index.d.ts +2 -0
- package/json/index.js +7 -0
- package/json/isJson.d.ts +1 -0
- package/json/isJson.js +26 -0
- package/littleWarden/LittleWardenNamespace.d.ts +11 -0
- package/littleWarden/LittleWardenNamespace.js +38 -0
- package/littleWarden/getUrlStatus.d.ts +4 -0
- package/littleWarden/getUrlStatus.js +16 -0
- package/littleWarden/index.d.ts +29 -0
- package/littleWarden/index.js +74 -0
- package/lumar/api/buildRequest.d.ts +13 -0
- package/lumar/api/buildRequest.js +80 -0
- package/lumar/api/getData.d.ts +5 -0
- package/lumar/api/getData.js +13 -0
- package/lumar/api/index.d.ts +36 -0
- package/lumar/api/index.js +33 -0
- package/lumar/api/initClient.d.ts +6 -0
- package/lumar/api/initClient.js +26 -0
- package/lumar/graphql/columns.d.ts +28 -0
- package/lumar/graphql/columns.js +31 -0
- package/lumar/graphql/getData.d.ts +1 -0
- package/lumar/graphql/getData.js +20 -0
- package/lumar/graphql/index.d.ts +29 -0
- package/lumar/graphql/index.js +39 -0
- package/lumar/graphql/initClient.d.ts +5 -0
- package/lumar/graphql/initClient.js +25 -0
- package/lumar/graphql/queries/crawl.d.ts +5 -0
- package/lumar/graphql/queries/crawl.js +2 -0
- package/lumar/graphql/queries/getCrawls.d.ts +18 -0
- package/lumar/graphql/queries/getCrawls.js +33 -0
- package/lumar/graphql/queries/getReportDifferences.d.ts +24 -0
- package/lumar/graphql/queries/getReportDifferences.js +37 -0
- package/lumar/graphql/queries/getRows.d.ts +38 -0
- package/lumar/graphql/queries/getRows.js +57 -0
- package/lumar/graphql/queries/getTotals.d.ts +25 -0
- package/lumar/graphql/queries/getTotals.js +40 -0
- package/lumar/graphql/queries/row.d.ts +157 -0
- package/lumar/graphql/queries/row.js +2 -0
- package/lumar/graphql/reportTemplates.d.ts +67 -0
- package/lumar/graphql/reportTemplates.js +70 -0
- package/myTarget/request.d.ts +5 -0
- package/myTarget/request.js +17 -0
- package/nextAuth/index.d.ts +6 -0
- package/nextAuth/index.js +11 -0
- package/nextAuth/isSessionReady.d.ts +1 -0
- package/nextAuth/isSessionReady.js +13 -0
- package/nextJs/getIp.d.ts +6 -0
- package/nextJs/getIp.js +14 -0
- package/nextJs/getUserAgent.d.ts +6 -0
- package/nextJs/getUserAgent.js +8 -0
- package/nextJs/index.d.ts +2 -0
- package/nextJs/index.js +7 -0
- package/number/format.d.ts +12 -0
- package/number/format.js +20 -0
- package/number/formatCurrency.d.ts +5 -0
- package/number/formatCurrency.js +21 -0
- package/number/getDecimal.d.ts +4 -0
- package/number/getDecimal.js +12 -0
- package/number/getNumber.d.ts +4 -0
- package/number/getNumber.js +48 -0
- package/number/getPercentIncrease.d.ts +4 -0
- package/number/getPercentIncrease.js +16 -0
- package/number/getSafeDivide.d.ts +11 -0
- package/number/getSafeDivide.js +20 -0
- package/number/index.d.ts +6 -0
- package/number/index.js +15 -0
- package/object/index.d.ts +1 -0
- package/object/index.js +5 -0
- package/object/replaceKeys.d.ts +5 -0
- package/object/replaceKeys.js +25 -0
- package/onePassword/OnePasswordNamespace.d.ts +13 -0
- package/onePassword/OnePasswordNamespace.js +81 -0
- package/onePassword/index.d.ts +7 -0
- package/onePassword/index.js +25 -0
- package/openAi/OpenAiNamespace.d.ts +11 -0
- package/openAi/OpenAiNamespace.js +44 -0
- package/openAi/index.d.ts +5 -0
- package/openAi/index.js +30 -0
- package/package.json +2 -2
- package/prisma/PrismaNamespace.d.ts +8 -0
- package/prisma/PrismaNamespace.js +79 -0
- package/prisma/getDecimal.d.ts +4 -0
- package/prisma/getDecimal.js +23 -0
- package/prisma/index.d.ts +8 -0
- package/prisma/index.js +29 -0
- package/snapchat/SnapchatNamespace.d.ts +15 -0
- package/snapchat/SnapchatNamespace.js +30 -0
- package/snapchat/index.d.ts +7 -0
- package/snapchat/index.js +30 -0
- package/sorting/byNumberAscending.d.ts +4 -0
- package/sorting/byNumberAscending.js +19 -0
- package/sorting/byNumberDescending.d.ts +4 -0
- package/sorting/byNumberDescending.js +22 -0
- package/sorting/byStringAscending.d.ts +4 -0
- package/sorting/byStringAscending.js +16 -0
- package/sorting/byStringDescending.d.ts +4 -0
- package/sorting/byStringDescending.js +16 -0
- package/sorting/index.d.ts +4 -0
- package/sorting/index.js +11 -0
- package/stream/index.d.ts +1 -0
- package/stream/index.js +5 -0
- package/stream/sort.d.ts +13 -0
- package/stream/sort.js +51 -0
- package/string/getCapitalised.d.ts +5 -0
- package/string/getCapitalised.js +18 -0
- package/string/getClean.d.ts +18 -0
- package/string/getClean.js +51 -0
- package/string/getFolder.d.ts +4 -0
- package/string/getFolder.js +15 -0
- package/string/getProperCase.d.ts +11 -0
- package/string/getProperCase.js +25 -0
- package/string/getString.d.ts +4 -0
- package/string/getString.js +34 -0
- package/string/getStringFromStream.d.ts +5 -0
- package/string/getStringFromStream.js +17 -0
- package/string/getUnescaped.d.ts +6 -0
- package/string/getUnescaped.js +26 -0
- package/string/getWithoutAccents.d.ts +5 -0
- package/string/getWithoutAccents.js +13 -0
- package/string/getWithoutHtmlTags.d.ts +5 -0
- package/string/getWithoutHtmlTags.js +12 -0
- package/string/getWithoutPunctuation.d.ts +5 -0
- package/string/getWithoutPunctuation.js +13 -0
- package/string/getWithoutUnderscores.d.ts +4 -0
- package/string/getWithoutUnderscores.js +11 -0
- package/string/getWithoutWhitespaces.d.ts +5 -0
- package/string/getWithoutWhitespaces.js +13 -0
- package/string/index.d.ts +12 -0
- package/string/index.js +27 -0
- package/swr/index.d.ts +42 -0
- package/swr/index.js +59 -0
- package/upTimeRobot/UpTimeRobotNamespace.d.ts +31 -0
- package/upTimeRobot/UpTimeRobotNamespace.js +52 -0
- package/upTimeRobot/index.d.ts +38 -0
- package/upTimeRobot/index.js +63 -0
- package/url/index.d.ts +30 -0
- package/url/index.js +72 -0
- package/url/writeUrlContents.d.ts +6 -0
- package/url/writeUrlContents.js +75 -0
- package/util/defaultTo.d.ts +4 -0
- package/util/defaultTo.js +44 -0
- package/util/getBrotliCompressed.d.ts +5 -0
- package/util/getBrotliCompressed.js +23 -0
- package/util/getBrotliDecompressed.d.ts +5 -0
- package/util/getBrotliDecompressed.js +24 -0
- package/util/getClean.d.ts +11 -0
- package/util/getClean.js +23 -0
- package/util/getGzipCompressed.d.ts +5 -0
- package/util/getGzipCompressed.js +23 -0
- package/util/getGzipDecompressed.d.ts +5 -0
- package/util/getGzipDecompressed.js +24 -0
- package/util/getWithoutHash.d.ts +4 -0
- package/util/getWithoutHash.js +18 -0
- package/util/getWithoutParameter.d.ts +4 -0
- package/util/getWithoutParameter.js +18 -0
- package/util/index.d.ts +11 -0
- package/util/index.js +25 -0
- package/util/isUndefined.d.ts +4 -0
- package/util/isUndefined.js +13 -0
- package/util/promiseChunks.d.ts +5 -0
- package/util/promiseChunks.js +19 -0
- package/util/sleep.d.ts +1 -0
- package/util/sleep.js +7 -0
- package/webWorker/index.d.ts +5 -0
- package/webWorker/index.js +9 -0
- package/xml/getXml.d.ts +1 -0
- package/xml/getXml.js +18 -0
package/eskimi/index.js
ADDED
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.genders = exports.devices = exports.ageGroups = exports.endpoints = void 0;
|
|
4
|
+
const v4_1 = require("zod/v4");
|
|
5
|
+
/**
|
|
6
|
+
* https://dsp-api.eskimi.com/docs/api/v1/#api-Report-GetCampaignReportByAgeGroups
|
|
7
|
+
*/
|
|
8
|
+
exports.endpoints = {
|
|
9
|
+
campaign: {
|
|
10
|
+
age: "https://dsp-api.eskimi.com/api/v1/report/ageGroups/get",
|
|
11
|
+
gender: "https://dsp-api.eskimi.com/api/v1/report/genders/get",
|
|
12
|
+
list: "https://dsp-api.eskimi.com/api/v1/campaign/get",
|
|
13
|
+
performance: "https://dsp-api.eskimi.com/api/v1/report/campaigns/get",
|
|
14
|
+
video: "https://dsp-api.eskimi.com/api/v1/report/videoCampaigns/get",
|
|
15
|
+
},
|
|
16
|
+
site: {
|
|
17
|
+
list: "https://dsp-api.eskimi.com/api/v1/report/sites/get",
|
|
18
|
+
},
|
|
19
|
+
};
|
|
20
|
+
const campaignSchema = v4_1.z.object({
|
|
21
|
+
id: v4_1.z.number(),
|
|
22
|
+
name: v4_1.z.string(),
|
|
23
|
+
type: v4_1.z.number(),
|
|
24
|
+
user_id: v4_1.z.number(),
|
|
25
|
+
ad_domain: v4_1.z.string(),
|
|
26
|
+
click_url: v4_1.z.string(),
|
|
27
|
+
bid: v4_1.z.string(),
|
|
28
|
+
budget: v4_1.z.any(),
|
|
29
|
+
dates: v4_1.z.any(),
|
|
30
|
+
creative_set_ids: v4_1.z.any(),
|
|
31
|
+
audience_ids: v4_1.z.any(),
|
|
32
|
+
ad_placement_type_ids: v4_1.z.any(),
|
|
33
|
+
ad_placement_position_ids: v4_1.z.any(),
|
|
34
|
+
operator_ids: v4_1.z.any(),
|
|
35
|
+
devices: v4_1.z.any(),
|
|
36
|
+
auto_start: v4_1.z.number(),
|
|
37
|
+
created_at: v4_1.z.string(),
|
|
38
|
+
});
|
|
39
|
+
exports.ageGroups = [
|
|
40
|
+
{
|
|
41
|
+
"id": 0,
|
|
42
|
+
"name": "0-17",
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"id": 1,
|
|
46
|
+
"name": "18-24",
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
"id": 2,
|
|
50
|
+
"name": "25-29",
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"id": 3,
|
|
54
|
+
"name": "30-34",
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"id": 4,
|
|
58
|
+
"name": "35-39",
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
"id": 5,
|
|
62
|
+
"name": "40-44",
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"id": 6,
|
|
66
|
+
"name": "45-54",
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
"id": 7,
|
|
70
|
+
"name": "55-64",
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
"id": 8,
|
|
74
|
+
"name": "65+",
|
|
75
|
+
},
|
|
76
|
+
];
|
|
77
|
+
exports.devices = [
|
|
78
|
+
{
|
|
79
|
+
"id": 2,
|
|
80
|
+
"name": "Personal Computer",
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
"id": 3,
|
|
84
|
+
"name": "Connected TV",
|
|
85
|
+
},
|
|
86
|
+
];
|
|
87
|
+
exports.genders = [
|
|
88
|
+
{
|
|
89
|
+
"id": 1,
|
|
90
|
+
"name": "Male",
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
"id": 2,
|
|
94
|
+
"name": "Female",
|
|
95
|
+
},
|
|
96
|
+
];
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.createDirectory = void 0;
|
|
37
|
+
/**
|
|
38
|
+
* Create a directory recursively.
|
|
39
|
+
* Requires fs-extra
|
|
40
|
+
*/
|
|
41
|
+
const createDirectory = (filePath) => {
|
|
42
|
+
return new Promise(async (resolve, reject) => {
|
|
43
|
+
const fs = await Promise.resolve().then(() => __importStar(require("fs-extra")));
|
|
44
|
+
const path = await Promise.resolve().then(() => __importStar(require("path")));
|
|
45
|
+
const fileDir = path.parse(filePath).dir;
|
|
46
|
+
fs.ensureDirSync(fileDir);
|
|
47
|
+
resolve(true);
|
|
48
|
+
});
|
|
49
|
+
};
|
|
50
|
+
exports.createDirectory = createDirectory;
|
package/file/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { createDirectory } from "./createDirectory";
|
package/file/index.js
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createDirectory = void 0;
|
|
4
|
+
var createDirectory_1 = require("./createDirectory");
|
|
5
|
+
Object.defineProperty(exports, "createDirectory", { enumerable: true, get: function () { return createDirectory_1.createDirectory; } });
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export type Country = {
|
|
2
|
+
name: string;
|
|
3
|
+
population: number;
|
|
4
|
+
iso2: string;
|
|
5
|
+
iso3: string;
|
|
6
|
+
googleAdsId: number | null;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Countries - excluded non-Google Ads supported ones
|
|
10
|
+
* https://docs.google.com/spreadsheets/d/1nrQ9h1n9p0Mab81_FKGqIw4fTOMOOjpcFrf0oSQvHIw/edit?gid=0#gid=0
|
|
11
|
+
*/
|
|
12
|
+
export declare const countries: Country[];
|
package/geo/countries.js
ADDED
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.countries = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Countries - excluded non-Google Ads supported ones
|
|
6
|
+
* https://docs.google.com/spreadsheets/d/1nrQ9h1n9p0Mab81_FKGqIw4fTOMOOjpcFrf0oSQvHIw/edit?gid=0#gid=0
|
|
7
|
+
*/
|
|
8
|
+
exports.countries = [
|
|
9
|
+
{ name: 'Afghanistan', population: 42647492, iso2: 'AF', iso3: 'AFG', googleAdsId: 2004 },
|
|
10
|
+
{ name: 'Albania', population: 2791765, iso2: 'AL', iso3: 'ALB', googleAdsId: 2008 },
|
|
11
|
+
{ name: 'Algeria', population: 46814308, iso2: 'DZ', iso3: 'DZA', googleAdsId: 2012 },
|
|
12
|
+
{ name: 'American Samoa', population: 46765, iso2: 'AS', iso3: 'ASM', googleAdsId: 2016 },
|
|
13
|
+
{ name: 'Andorra', population: 81938, iso2: 'AD', iso3: 'AND', googleAdsId: 2020 },
|
|
14
|
+
{ name: 'Angola', population: 37885849, iso2: 'AO', iso3: 'AGO', googleAdsId: 2024 },
|
|
15
|
+
// {name:'Anguilla',population:14598,iso2:'AI',iso3:'AIA',googleAdsId:null},
|
|
16
|
+
{ name: 'Antigua and Barbuda', population: 93772, iso2: 'AG', iso3: 'ATG', googleAdsId: 2028 },
|
|
17
|
+
{ name: 'Argentina', population: 45696159, iso2: 'AR', iso3: 'ARG', googleAdsId: 2032 },
|
|
18
|
+
{ name: 'Armenia', population: 2973840, iso2: 'AM', iso3: 'ARM', googleAdsId: 2051 },
|
|
19
|
+
// {name:'Aruba',population:108066,iso2:'AW',iso3:'ABW',googleAdsId:null},
|
|
20
|
+
{ name: 'Australia', population: 26713205, iso2: 'AU', iso3: 'AUS', googleAdsId: 2036 },
|
|
21
|
+
{ name: 'Austria', population: 9120813, iso2: 'AT', iso3: 'AUT', googleAdsId: 2040 },
|
|
22
|
+
{ name: 'Azerbaijan', population: 10336577, iso2: 'AZ', iso3: 'AZE', googleAdsId: 2031 },
|
|
23
|
+
{ name: 'Bahamas', population: 401283, iso2: 'BS', iso3: 'BHS', googleAdsId: 2044 },
|
|
24
|
+
{ name: 'Bahrain', population: 1607049, iso2: 'BH', iso3: 'BHR', googleAdsId: 2048 },
|
|
25
|
+
{ name: 'Bangladesh', population: 173562364, iso2: 'BD', iso3: 'BGD', googleAdsId: 2050 },
|
|
26
|
+
{ name: 'Barbados', population: 282467, iso2: 'BB', iso3: 'BRB', googleAdsId: 2052 },
|
|
27
|
+
{ name: 'Belarus', population: 9056696, iso2: 'BY', iso3: 'BLR', googleAdsId: 2112 },
|
|
28
|
+
{ name: 'Belgium', population: 11738763, iso2: 'BE', iso3: 'BEL', googleAdsId: 2056 },
|
|
29
|
+
{ name: 'Belize', population: 417072, iso2: 'BZ', iso3: 'BLZ', googleAdsId: 2084 },
|
|
30
|
+
{ name: 'Benin', population: 14462724, iso2: 'BJ', iso3: 'BEN', googleAdsId: 2204 },
|
|
31
|
+
// {name:'Bermuda',population:64636,iso2:'BM',iso3:'BMU',googleAdsId:null},
|
|
32
|
+
{ name: 'Bhutan', population: 791524, iso2: 'BT', iso3: 'BTN', googleAdsId: 2064 },
|
|
33
|
+
{ name: 'Bolivia', population: 12413315, iso2: 'BO', iso3: 'BOL', googleAdsId: 2068 },
|
|
34
|
+
{ name: 'Bosnia and Herzegovina', population: 3164253, iso2: 'BA', iso3: 'BIH', googleAdsId: 2070 },
|
|
35
|
+
{ name: 'Botswana', population: 2521139, iso2: 'BW', iso3: 'BWA', googleAdsId: 2072 },
|
|
36
|
+
{ name: 'Brazil', population: 211998573, iso2: 'BR', iso3: 'BRA', googleAdsId: 2076 },
|
|
37
|
+
{ name: 'Brunei', population: 462721, iso2: 'BN', iso3: 'BRN', googleAdsId: 2096 },
|
|
38
|
+
{ name: 'Bulgaria', population: 6757689, iso2: 'BG', iso3: 'BGR', googleAdsId: 2100 },
|
|
39
|
+
{ name: 'Burkina Faso', population: 23548781, iso2: 'BF', iso3: 'BFA', googleAdsId: 2854 },
|
|
40
|
+
{ name: 'Burundi', population: 14047786, iso2: 'BI', iso3: 'BDI', googleAdsId: 2108 },
|
|
41
|
+
{ name: 'Cambodia', population: 17638801, iso2: 'KH', iso3: 'KHM', googleAdsId: 2116 },
|
|
42
|
+
{ name: 'Cameroon', population: 29123744, iso2: 'CM', iso3: 'CMR', googleAdsId: 2120 },
|
|
43
|
+
{ name: 'Canada', population: 39742430, iso2: 'CA', iso3: 'CAN', googleAdsId: 2124 },
|
|
44
|
+
{ name: 'Cape Verde', population: 524877, iso2: 'CV', iso3: 'CPV', googleAdsId: 2132 },
|
|
45
|
+
// {name:'Cayman Islands',population:74457,iso2:'KY',iso3:'CYM',googleAdsId:null},
|
|
46
|
+
{ name: 'Central African Republic', population: 5330690, iso2: 'CF', iso3: 'CAF', googleAdsId: 2140 },
|
|
47
|
+
{ name: 'Chad', population: 20299123, iso2: 'TD', iso3: 'TCD', googleAdsId: 2148 },
|
|
48
|
+
{ name: 'Chile', population: 19764771, iso2: 'CL', iso3: 'CHL', googleAdsId: 2152 },
|
|
49
|
+
{ name: 'China', population: 1419321278, iso2: 'CN', iso3: 'CHN', googleAdsId: 2156 },
|
|
50
|
+
{ name: 'Colombia', population: 52886363, iso2: 'CO', iso3: 'COL', googleAdsId: 2170 },
|
|
51
|
+
{ name: 'Comoros', population: 866628, iso2: 'KM', iso3: 'COM', googleAdsId: 2174 },
|
|
52
|
+
{ name: 'Congo', population: 6332961, iso2: 'CG', iso3: 'COG', googleAdsId: 2178 },
|
|
53
|
+
{ name: 'DR Congo', population: 109276265, iso2: 'CD', iso3: 'COD', googleAdsId: 2180 },
|
|
54
|
+
{ name: 'Costa Rica', population: 5129910, iso2: 'CR', iso3: 'CRI', googleAdsId: 2188 },
|
|
55
|
+
{ name: 'Ivory Coast', population: 31934230, iso2: 'CI', iso3: 'CIV', googleAdsId: 2384 },
|
|
56
|
+
{ name: 'Croatia', population: 3875325, iso2: 'HR', iso3: 'HRV', googleAdsId: 2191 },
|
|
57
|
+
// {name:'Cuba',population:10979783,iso2:'CU',iso3:'CUB',googleAdsId:null},
|
|
58
|
+
{ name: 'Cyprus', population: 1358282, iso2: 'CY', iso3: 'CYP', googleAdsId: 2196 },
|
|
59
|
+
{ name: 'Czech Republic', population: 10735859, iso2: 'CZ', iso3: 'CZE', googleAdsId: 2203 },
|
|
60
|
+
{ name: 'Denmark', population: 5977412, iso2: 'DK', iso3: 'DNK', googleAdsId: 2208 },
|
|
61
|
+
{ name: 'Djibouti', population: 1168722, iso2: 'DJ', iso3: 'DJI', googleAdsId: 2262 },
|
|
62
|
+
{ name: 'Dominica', population: 66205, iso2: 'DM', iso3: 'DMA', googleAdsId: 2212 },
|
|
63
|
+
{ name: 'Dominican Republic', population: 11427557, iso2: 'DO', iso3: 'DOM', googleAdsId: 2214 },
|
|
64
|
+
{ name: 'Ecuador', population: 18135478, iso2: 'EC', iso3: 'ECU', googleAdsId: 2218 },
|
|
65
|
+
{ name: 'Egypt', population: 116538258, iso2: 'EG', iso3: 'EGY', googleAdsId: 2818 },
|
|
66
|
+
{ name: 'El Salvador', population: 6338193, iso2: 'SV', iso3: 'SLV', googleAdsId: 2222 },
|
|
67
|
+
{ name: 'Equatorial Guinea', population: 1892516, iso2: 'GQ', iso3: 'GNQ', googleAdsId: 2226 },
|
|
68
|
+
{ name: 'Eritrea', population: 3535603, iso2: 'ER', iso3: 'ERI', googleAdsId: 2232 },
|
|
69
|
+
{ name: 'Estonia', population: 1360546, iso2: 'EE', iso3: 'EST', googleAdsId: 2233 },
|
|
70
|
+
{ name: 'Ethiopia', population: 132059767, iso2: 'ET', iso3: 'ETH', googleAdsId: 2231 },
|
|
71
|
+
{ name: 'Fiji', population: 928784, iso2: 'FJ', iso3: 'FJI', googleAdsId: 2242 },
|
|
72
|
+
{ name: 'Finland', population: 5617310, iso2: 'FI', iso3: 'FIN', googleAdsId: 2246 },
|
|
73
|
+
{ name: 'France', population: 66548530, iso2: 'FR', iso3: 'FRA', googleAdsId: 2250 },
|
|
74
|
+
// {name:'French Guiana',population:308522,iso2:'GF',iso3:'GUF',googleAdsId:null},
|
|
75
|
+
{ name: 'French Polynesia', population: 281807, iso2: 'PF', iso3: 'PYF', googleAdsId: 2258 },
|
|
76
|
+
{ name: 'Gabon', population: 2538952, iso2: 'GA', iso3: 'GAB', googleAdsId: 2266 },
|
|
77
|
+
{ name: 'Gambia', population: 2759988, iso2: 'GM', iso3: 'GMB', googleAdsId: 2270 },
|
|
78
|
+
{ name: 'Georgia', population: 3807670, iso2: 'GE', iso3: 'GEO', googleAdsId: 2268 },
|
|
79
|
+
{ name: 'Germany', population: 84552242, iso2: 'DE', iso3: 'DEU', googleAdsId: 2276 },
|
|
80
|
+
{ name: 'Ghana', population: 34427414, iso2: 'GH', iso3: 'GHA', googleAdsId: 2288 },
|
|
81
|
+
// {name:'Gibraltar',population:39329,iso2:'GI',iso3:'GIB',googleAdsId:null},
|
|
82
|
+
{ name: 'Greece', population: 10047817, iso2: 'GR', iso3: 'GRC', googleAdsId: 2300 },
|
|
83
|
+
// {name:'Greenland',population:55840,iso2:'GL',iso3:'GRL',googleAdsId:null},
|
|
84
|
+
{ name: 'Grenada', population: 117207, iso2: 'GD', iso3: 'GRD', googleAdsId: 2308 },
|
|
85
|
+
// {name:'Guadeloupe',population:375106,iso2:'GP',iso3:'GLP',googleAdsId:null},
|
|
86
|
+
{ name: 'Guam', population: 167777, iso2: 'GU', iso3: 'GUM', googleAdsId: 2316 },
|
|
87
|
+
{ name: 'Guatemala', population: 18406359, iso2: 'GT', iso3: 'GTM', googleAdsId: 2320 },
|
|
88
|
+
{ name: 'Guinea', population: 14754785, iso2: 'GN', iso3: 'GIN', googleAdsId: 2324 },
|
|
89
|
+
{ name: 'Guinea-Bissau', population: 2201352, iso2: 'GW', iso3: 'GNB', googleAdsId: 2624 },
|
|
90
|
+
{ name: 'Guyana', population: 831087, iso2: 'GY', iso3: 'GUY', googleAdsId: 2328 },
|
|
91
|
+
{ name: 'Haiti', population: 11772557, iso2: 'HT', iso3: 'HTI', googleAdsId: 2332 },
|
|
92
|
+
{ name: 'Honduras', population: 10825703, iso2: 'HN', iso3: 'HND', googleAdsId: 2340 },
|
|
93
|
+
// {name:'Hong Kong',population:7414909,iso2:'HK',iso3:'HKG',googleAdsId:null},
|
|
94
|
+
{ name: 'Hungary', population: 9676135, iso2: 'HU', iso3: 'HUN', googleAdsId: 2348 },
|
|
95
|
+
{ name: 'Iceland', population: 393396, iso2: 'IS', iso3: 'ISL', googleAdsId: 2352 },
|
|
96
|
+
{ name: 'India', population: 1450935791, iso2: 'IN', iso3: 'IND', googleAdsId: 2356 },
|
|
97
|
+
{ name: 'Indonesia', population: 283487931, iso2: 'ID', iso3: 'IDN', googleAdsId: 2360 },
|
|
98
|
+
// {name:'Iran',population:91567738,iso2:'IR',iso3:'IRN',googleAdsId:null},
|
|
99
|
+
{ name: 'Iraq', population: 46042015, iso2: 'IQ', iso3: 'IRQ', googleAdsId: 2368 },
|
|
100
|
+
{ name: 'Ireland', population: 5255017, iso2: 'IE', iso3: 'IRL', googleAdsId: 2372 },
|
|
101
|
+
// {name:'Isle of Man',population:84160,iso2:'IM',iso3:'IMN',googleAdsId:null},
|
|
102
|
+
{ name: 'Israel', population: 9387021, iso2: 'IL', iso3: 'ISR', googleAdsId: 2376 },
|
|
103
|
+
{ name: 'Italy', population: 59342867, iso2: 'IT', iso3: 'ITA', googleAdsId: 2380 },
|
|
104
|
+
{ name: 'Jamaica', population: 2839175, iso2: 'JM', iso3: 'JAM', googleAdsId: 2388 },
|
|
105
|
+
{ name: 'Japan', population: 123753041, iso2: 'JP', iso3: 'JPN', googleAdsId: 2392 },
|
|
106
|
+
{ name: 'Jersey', population: 103200, iso2: 'JE', iso3: 'JEY', googleAdsId: 2832 },
|
|
107
|
+
{ name: 'Jordan', population: 11552876, iso2: 'JO', iso3: 'JOR', googleAdsId: 2400 },
|
|
108
|
+
{ name: 'Kazakhstan', population: 20592571, iso2: 'KZ', iso3: 'KAZ', googleAdsId: 2398 },
|
|
109
|
+
{ name: 'Kenya', population: 56432944, iso2: 'KE', iso3: 'KEN', googleAdsId: 2404 },
|
|
110
|
+
{ name: 'Kiribati', population: 134518, iso2: 'KI', iso3: 'KIR', googleAdsId: 2296 },
|
|
111
|
+
// {name:'North Korea',population:26498823,iso2:'KP',iso3:'PRK',googleAdsId:null},
|
|
112
|
+
{ name: 'South Korea', population: 51717590, iso2: 'KR', iso3: 'KOR', googleAdsId: 2410 },
|
|
113
|
+
{ name: 'Kuwait', population: 4934507, iso2: 'KW', iso3: 'KWT', googleAdsId: 2414 },
|
|
114
|
+
{ name: 'Kyrgyzstan', population: 7186009, iso2: 'KG', iso3: 'KGZ', googleAdsId: 2417 },
|
|
115
|
+
{ name: 'Laos', population: 7769819, iso2: 'LA', iso3: 'LAO', googleAdsId: 2418 },
|
|
116
|
+
{ name: 'Latvia', population: 1871871, iso2: 'LV', iso3: 'LVA', googleAdsId: 2428 },
|
|
117
|
+
{ name: 'Lebanon', population: 5805962, iso2: 'LB', iso3: 'LBN', googleAdsId: 2422 },
|
|
118
|
+
{ name: 'Lesotho', population: 2337423, iso2: 'LS', iso3: 'LSO', googleAdsId: 2426 },
|
|
119
|
+
{ name: 'Liberia', population: 5612817, iso2: 'LR', iso3: 'LBR', googleAdsId: 2430 },
|
|
120
|
+
{ name: 'Libya', population: 7381023, iso2: 'LY', iso3: 'LBY', googleAdsId: 2434 },
|
|
121
|
+
{ name: 'Liechtenstein', population: 39870, iso2: 'LI', iso3: 'LIE', googleAdsId: 2438 },
|
|
122
|
+
{ name: 'Lithuania', population: 2859110, iso2: 'LT', iso3: 'LTU', googleAdsId: 2440 },
|
|
123
|
+
{ name: 'Luxembourg', population: 673036, iso2: 'LU', iso3: 'LUX', googleAdsId: 2442 },
|
|
124
|
+
// {name:'Macao',population:720262,iso2:'MO',iso3:'MAC',googleAdsId:null},
|
|
125
|
+
{ name: 'Macedonia', population: 1823009, iso2: 'MK', iso3: 'MKD', googleAdsId: 2807 },
|
|
126
|
+
{ name: 'Madagascar', population: 31964956, iso2: 'MG', iso3: 'MDG', googleAdsId: 2450 },
|
|
127
|
+
{ name: 'Malawi', population: 21655286, iso2: 'MW', iso3: 'MWI', googleAdsId: 2454 },
|
|
128
|
+
{ name: 'Malaysia', population: 35557673, iso2: 'MY', iso3: 'MYS', googleAdsId: 2458 },
|
|
129
|
+
{ name: 'Maldives', population: 527799, iso2: 'MV', iso3: 'MDV', googleAdsId: 2462 },
|
|
130
|
+
{ name: 'Mali', population: 24478595, iso2: 'ML', iso3: 'MLI', googleAdsId: 2466 },
|
|
131
|
+
{ name: 'Malta', population: 539607, iso2: 'MT', iso3: 'MLT', googleAdsId: 2470 },
|
|
132
|
+
{ name: 'Marshall Islands', population: 37548, iso2: 'MH', iso3: 'MHL', googleAdsId: 2584 },
|
|
133
|
+
// {name:'Martinique',population:343195,iso2:'MQ',iso3:'MTQ',googleAdsId:null},
|
|
134
|
+
{ name: 'Mauritania', population: 5169395, iso2: 'MR', iso3: 'MRT', googleAdsId: 2478 },
|
|
135
|
+
{ name: 'Mauritius', population: 1271169, iso2: 'MU', iso3: 'MUS', googleAdsId: 2480 },
|
|
136
|
+
// {name:'Mayotte',population:326505,iso2:'YT',iso3:'MYT',googleAdsId:null},
|
|
137
|
+
{ name: 'Mexico', population: 130861007, iso2: 'MX', iso3: 'MEX', googleAdsId: 2484 },
|
|
138
|
+
{ name: 'Micronesia', population: 526923, iso2: 'FM', iso3: 'FSM', googleAdsId: 2583 },
|
|
139
|
+
{ name: 'Moldova', population: 3034961, iso2: 'MD', iso3: 'MDA', googleAdsId: 2498 },
|
|
140
|
+
{ name: 'Monaco', population: 38631, iso2: 'MC', iso3: 'MCO', googleAdsId: 2492 },
|
|
141
|
+
{ name: 'Mongolia', population: 3475540, iso2: 'MN', iso3: 'MNG', googleAdsId: 2496 },
|
|
142
|
+
{ name: 'Montenegro', population: 638479, iso2: 'ME', iso3: 'MNE', googleAdsId: 2499 },
|
|
143
|
+
// {name:'Montserrat',population:4389,iso2:'MS',iso3:'MSR',googleAdsId:null},
|
|
144
|
+
{ name: 'Morocco', population: 38081173, iso2: 'MA', iso3: 'MAR', googleAdsId: 2504 },
|
|
145
|
+
{ name: 'Mozambique', population: 34631766, iso2: 'MZ', iso3: 'MOZ', googleAdsId: 2508 },
|
|
146
|
+
{ name: 'Myanmar', population: 54500091, iso2: 'MM', iso3: 'MMR', googleAdsId: 2104 },
|
|
147
|
+
{ name: 'Namibia', population: 3030131, iso2: 'NA', iso3: 'NAM', googleAdsId: 2516 },
|
|
148
|
+
{ name: 'Nauru', population: 11947, iso2: 'NR', iso3: 'NRU', googleAdsId: 2520 },
|
|
149
|
+
{ name: 'Nepal', population: 29651054, iso2: 'NP', iso3: 'NPL', googleAdsId: 2524 },
|
|
150
|
+
{ name: 'Netherlands', population: 18228742, iso2: 'NL', iso3: 'NLD', googleAdsId: 2528 },
|
|
151
|
+
{ name: 'New Caledonia', population: 292639, iso2: 'NC', iso3: 'NCL', googleAdsId: 2540 },
|
|
152
|
+
{ name: 'New Zealand', population: 5213944, iso2: 'NZ', iso3: 'NZL', googleAdsId: 2554 },
|
|
153
|
+
{ name: 'Nicaragua', population: 6916140, iso2: 'NI', iso3: 'NIC', googleAdsId: 2558 },
|
|
154
|
+
{ name: 'Niger', population: 27032412, iso2: 'NE', iso3: 'NER', googleAdsId: 2562 },
|
|
155
|
+
{ name: 'Nigeria', population: 232679478, iso2: 'NG', iso3: 'NGA', googleAdsId: 2566 },
|
|
156
|
+
{ name: 'Northern Mariana Islands', population: 44278, iso2: 'MP', iso3: 'MNP', googleAdsId: 2580 },
|
|
157
|
+
{ name: 'Norway', population: 5576660, iso2: 'NO', iso3: 'NOR', googleAdsId: 2578 },
|
|
158
|
+
{ name: 'Oman', population: 5281538, iso2: 'OM', iso3: 'OMN', googleAdsId: 2512 },
|
|
159
|
+
{ name: 'Pakistan', population: 251269164, iso2: 'PK', iso3: 'PAK', googleAdsId: 2586 },
|
|
160
|
+
// {name:'Palestine',population:5495443,iso2:'PS',iso3:'PSE',googleAdsId:null},
|
|
161
|
+
{ name: 'Panama', population: 4515577, iso2: 'PA', iso3: 'PAN', googleAdsId: 2591 },
|
|
162
|
+
{ name: 'Papua New Guinea', population: 10576502, iso2: 'PG', iso3: 'PNG', googleAdsId: 2598 },
|
|
163
|
+
{ name: 'Paraguay', population: 6929153, iso2: 'PY', iso3: 'PRY', googleAdsId: 2600 },
|
|
164
|
+
{ name: 'Peru', population: 34217848, iso2: 'PE', iso3: 'PER', googleAdsId: 2604 },
|
|
165
|
+
{ name: 'Philippines', population: 115843670, iso2: 'PH', iso3: 'PHL', googleAdsId: 2608 },
|
|
166
|
+
{ name: 'Poland', population: 38539201, iso2: 'PL', iso3: 'POL', googleAdsId: 2616 },
|
|
167
|
+
{ name: 'Portugal', population: 10425292, iso2: 'PT', iso3: 'PRT', googleAdsId: 2620 },
|
|
168
|
+
// {name:'Puerto Rico',population:3242204,iso2:'PR',iso3:'PRI',googleAdsId:null},
|
|
169
|
+
{ name: 'Qatar', population: 3048423, iso2: 'QA', iso3: 'QAT', googleAdsId: 2634 },
|
|
170
|
+
// {name:'Réunion',population:878591,iso2:'RE',iso3:'REU',googleAdsId:null},
|
|
171
|
+
{ name: 'Romania', population: 19015088, iso2: 'RO', iso3: 'ROU', googleAdsId: 2642 },
|
|
172
|
+
{ name: 'Russia', population: 144820423, iso2: 'RU', iso3: 'RUS', googleAdsId: 2643 },
|
|
173
|
+
{ name: 'Rwanda', population: 14256567, iso2: 'RW', iso3: 'RWA', googleAdsId: 2646 },
|
|
174
|
+
{ name: 'Saint Lucia', population: 179744, iso2: 'LC', iso3: 'LCA', googleAdsId: 2662 },
|
|
175
|
+
{ name: 'Samoa', population: 218019, iso2: 'WS', iso3: 'WSM', googleAdsId: 2882 },
|
|
176
|
+
{ name: 'San Marino', population: 33581, iso2: 'SM', iso3: 'SMR', googleAdsId: 2674 },
|
|
177
|
+
{ name: 'Saudi Arabia', population: 33962757, iso2: 'SA', iso3: 'SAU', googleAdsId: 2682 },
|
|
178
|
+
{ name: 'Senegal', population: 18501984, iso2: 'SN', iso3: 'SEN', googleAdsId: 2686 },
|
|
179
|
+
{ name: 'Serbia', population: 6736216, iso2: 'RS', iso3: 'SRB', googleAdsId: 2688 },
|
|
180
|
+
{ name: 'Seychelles', population: 130418, iso2: 'SC', iso3: 'SYC', googleAdsId: 2690 },
|
|
181
|
+
{ name: 'Sierra Leone', population: 8642022, iso2: 'SL', iso3: 'SLE', googleAdsId: 2694 },
|
|
182
|
+
{ name: 'Singapore', population: 5832387, iso2: 'SG', iso3: 'SGP', googleAdsId: 2702 },
|
|
183
|
+
{ name: 'Slovakia', population: 5506760, iso2: 'SK', iso3: 'SVK', googleAdsId: 2703 },
|
|
184
|
+
{ name: 'Slovenia', population: 2118697, iso2: 'SI', iso3: 'SVN', googleAdsId: 2705 },
|
|
185
|
+
{ name: 'Solomon Islands', population: 819198, iso2: 'SB', iso3: 'SLB', googleAdsId: 2090 },
|
|
186
|
+
{ name: 'Somalia', population: 19009151, iso2: 'SO', iso3: 'SOM', googleAdsId: 2706 },
|
|
187
|
+
{ name: 'South Africa', population: 64007187, iso2: 'ZA', iso3: 'ZAF', googleAdsId: 2710 },
|
|
188
|
+
// {name:'South Sudan',population:11943408,iso2:'SS',iso3:'SSD',googleAdsId:null},
|
|
189
|
+
{ name: 'Spain', population: 47910526, iso2: 'ES', iso3: 'ESP', googleAdsId: 2724 },
|
|
190
|
+
{ name: 'Sri Lanka', population: 23103565, iso2: 'LK', iso3: 'LKA', googleAdsId: 2144 },
|
|
191
|
+
{ name: 'Sudan', population: 50448963, iso2: 'SD', iso3: 'SDN', googleAdsId: 2736 },
|
|
192
|
+
{ name: 'Suriname', population: 634431, iso2: 'SR', iso3: 'SUR', googleAdsId: 2740 },
|
|
193
|
+
{ name: 'Swaziland', population: 1202000, iso2: 'SZ', iso3: 'SWZ', googleAdsId: 2748 },
|
|
194
|
+
{ name: 'Sweden', population: 10606999, iso2: 'SE', iso3: 'SWE', googleAdsId: 2752 },
|
|
195
|
+
{ name: 'Switzerland', population: 8921981, iso2: 'CH', iso3: 'CHE', googleAdsId: 2756 },
|
|
196
|
+
// {name:'Syria',population:24672760,iso2:'SY',iso3:'SYR',googleAdsId:null},
|
|
197
|
+
// {name:'Taiwan',population:23213962,iso2:'TW',iso3:'TWN',googleAdsId:null},
|
|
198
|
+
{ name: 'Tajikistan', population: 10590927, iso2: 'TJ', iso3: 'TJK', googleAdsId: 2762 },
|
|
199
|
+
{ name: 'Tanzania', population: 68560157, iso2: 'TZ', iso3: 'TZA', googleAdsId: 2834 },
|
|
200
|
+
{ name: 'Thailand', population: 71668011, iso2: 'TH', iso3: 'THA', googleAdsId: 2764 },
|
|
201
|
+
{ name: 'Timor-Leste', population: 1400638, iso2: 'TL', iso3: 'TLS', googleAdsId: 2626 },
|
|
202
|
+
{ name: 'Togo', population: 9515236, iso2: 'TG', iso3: 'TGO', googleAdsId: 2768 },
|
|
203
|
+
{ name: 'Tonga', population: 104175, iso2: 'TO', iso3: 'TON', googleAdsId: 2776 },
|
|
204
|
+
{ name: 'Trinidad and Tobago', population: 1507782, iso2: 'TT', iso3: 'TTO', googleAdsId: 2780 },
|
|
205
|
+
{ name: 'Tunisia', population: 12277109, iso2: 'TN', iso3: 'TUN', googleAdsId: 2788 },
|
|
206
|
+
{ name: 'Turkey', population: 87473805, iso2: 'TR', iso3: 'TUR', googleAdsId: 2792 },
|
|
207
|
+
{ name: 'Turkmenistan', population: 7494498, iso2: 'TM', iso3: 'TKM', googleAdsId: 2795 },
|
|
208
|
+
{ name: 'Uganda', population: 50015092, iso2: 'UG', iso3: 'UGA', googleAdsId: 2800 },
|
|
209
|
+
{ name: 'Ukraine', population: 37860221, iso2: 'UA', iso3: 'UKR', googleAdsId: 2804 },
|
|
210
|
+
{ name: 'United Arab Emirates', population: 11027129, iso2: 'AE', iso3: 'ARE', googleAdsId: 2784 },
|
|
211
|
+
{ name: 'United Kingdom', population: 69138192, iso2: 'GB', iso3: 'GBR', googleAdsId: 2826 },
|
|
212
|
+
{ name: 'United States', population: 345426571, iso2: 'US', iso3: 'USA', googleAdsId: 2840 },
|
|
213
|
+
{ name: 'Uruguay', population: 3386588, iso2: 'UY', iso3: 'URY', googleAdsId: 2858 },
|
|
214
|
+
{ name: 'Uzbekistan', population: 36361859, iso2: 'UZ', iso3: 'UZB', googleAdsId: 2860 },
|
|
215
|
+
{ name: 'Vanuatu', population: 327777, iso2: 'VU', iso3: 'VUT', googleAdsId: 2548 },
|
|
216
|
+
{ name: 'Venezuela', population: 28405543, iso2: 'VE', iso3: 'VEN', googleAdsId: 2862 },
|
|
217
|
+
{ name: 'Vietnam', population: 100987686, iso2: 'VN', iso3: 'VNM', googleAdsId: 2704 },
|
|
218
|
+
// {name:'Western Sahara',population:590506,iso2:'EH',iso3:'ESH',googleAdsId:null},
|
|
219
|
+
{ name: 'Yemen', population: 40583164, iso2: 'YE', iso3: 'YEM', googleAdsId: 2887 },
|
|
220
|
+
{ name: 'Zambia', population: 21314956, iso2: 'ZM', iso3: 'ZMB', googleAdsId: 2894 },
|
|
221
|
+
{ name: 'Zimbabwe', population: 16634373, iso2: 'ZW', iso3: 'ZWE', googleAdsId: 2716 },
|
|
222
|
+
];
|
package/geo/index.d.ts
ADDED
package/geo/index.js
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.languages = exports.countries = void 0;
|
|
4
|
+
var countries_1 = require("./countries");
|
|
5
|
+
Object.defineProperty(exports, "countries", { enumerable: true, get: function () { return countries_1.countries; } });
|
|
6
|
+
var languages_1 = require("./languages");
|
|
7
|
+
Object.defineProperty(exports, "languages", { enumerable: true, get: function () { return languages_1.languages; } });
|
package/geo/languages.js
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.languages = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* https://docs.google.com/spreadsheets/d/1nrQ9h1n9p0Mab81_FKGqIw4fTOMOOjpcFrf0oSQvHIw/edit?gid=0#gid=0
|
|
6
|
+
*/
|
|
7
|
+
exports.languages = [
|
|
8
|
+
{ name: 'Arabic', iso2: 'ar', googleAdsId: 1019 },
|
|
9
|
+
{ name: 'Bengali', iso2: 'bn', googleAdsId: 1056 },
|
|
10
|
+
{ name: 'Bulgarian', iso2: 'bg', googleAdsId: 1020 },
|
|
11
|
+
{ name: 'Catalan', iso2: 'ca', googleAdsId: 1038 },
|
|
12
|
+
{ name: 'Chinese (simplified)', iso2: 'zh', googleAdsId: 1017 },
|
|
13
|
+
{ name: 'Chinese (traditional)', iso2: 'tw', googleAdsId: 1018 },
|
|
14
|
+
{ name: 'Croatian', iso2: 'hr', googleAdsId: 1039 },
|
|
15
|
+
{ name: 'Czech', iso2: 'cs', googleAdsId: 1021 },
|
|
16
|
+
{ name: 'Danish', iso2: 'da', googleAdsId: 1009 },
|
|
17
|
+
{ name: 'Dutch', iso2: 'nl', googleAdsId: 1010 },
|
|
18
|
+
{ name: 'English', iso2: 'en', googleAdsId: 1000 },
|
|
19
|
+
{ name: 'Estonian', iso2: 'et', googleAdsId: 1043 },
|
|
20
|
+
{ name: 'Filipino', iso2: 'tl', googleAdsId: 1042 },
|
|
21
|
+
{ name: 'Finnish', iso2: 'fi', googleAdsId: 1011 },
|
|
22
|
+
{ name: 'French', iso2: 'fr', googleAdsId: 1002 },
|
|
23
|
+
{ name: 'German', iso2: 'de', googleAdsId: 1001 },
|
|
24
|
+
{ name: 'Greek', iso2: 'el', googleAdsId: 1022 },
|
|
25
|
+
{ name: 'Gujarati', iso2: 'gu', googleAdsId: 1072 },
|
|
26
|
+
{ name: 'Hebrew', iso2: 'iw', googleAdsId: 1027 },
|
|
27
|
+
{ name: 'Hindi', iso2: 'hi', googleAdsId: 1023 },
|
|
28
|
+
{ name: 'Hungarian', iso2: 'hu', googleAdsId: 1024 },
|
|
29
|
+
{ name: 'Icelandic', iso2: 'is', googleAdsId: 1026 },
|
|
30
|
+
{ name: 'Indonesian', iso2: 'id', googleAdsId: 1025 },
|
|
31
|
+
{ name: 'Italian', iso2: 'it', googleAdsId: 1004 },
|
|
32
|
+
{ name: 'Japanese', iso2: 'ja', googleAdsId: 1005 },
|
|
33
|
+
{ name: 'Kannada', iso2: 'kn', googleAdsId: 1086 },
|
|
34
|
+
{ name: 'Korean', iso2: 'ko', googleAdsId: 1012 },
|
|
35
|
+
{ name: 'Latvian', iso2: 'lv', googleAdsId: 1028 },
|
|
36
|
+
{ name: 'Lithuanian', iso2: 'lt', googleAdsId: 1029 },
|
|
37
|
+
{ name: 'Malay', iso2: 'ms', googleAdsId: 1102 },
|
|
38
|
+
{ name: 'Malayalam', iso2: 'ml', googleAdsId: 1098 },
|
|
39
|
+
{ name: 'Marathi', iso2: 'mr', googleAdsId: 1101 },
|
|
40
|
+
{ name: 'Norwegian', iso2: 'no', googleAdsId: 1013 },
|
|
41
|
+
{ name: 'Persian', iso2: 'fa', googleAdsId: 1064 },
|
|
42
|
+
{ name: 'Polish', iso2: 'pl', googleAdsId: 1030 },
|
|
43
|
+
{ name: 'Portuguese', iso2: 'pt', googleAdsId: 1014 },
|
|
44
|
+
{ name: 'Romanian', iso2: 'ro', googleAdsId: 1032 },
|
|
45
|
+
{ name: 'Russian', iso2: 'ru', googleAdsId: 1031 },
|
|
46
|
+
{ name: 'Serbian', iso2: 'sr', googleAdsId: 1035 },
|
|
47
|
+
{ name: 'Slovak', iso2: 'sk', googleAdsId: 1033 },
|
|
48
|
+
{ name: 'Slovenian', iso2: 'sl', googleAdsId: 1034 },
|
|
49
|
+
{ name: 'Spanish', iso2: 'es', googleAdsId: 1003 },
|
|
50
|
+
{ name: 'Swedish', iso2: 'sv', googleAdsId: 1015 },
|
|
51
|
+
{ name: 'Tamil', iso2: 'ta', googleAdsId: 1130 },
|
|
52
|
+
{ name: 'Telugu', iso2: 'te', googleAdsId: 1131 },
|
|
53
|
+
{ name: 'Thai', iso2: 'th', googleAdsId: 1044 },
|
|
54
|
+
{ name: 'Turkish', iso2: 'tr', googleAdsId: 1037 },
|
|
55
|
+
{ name: 'Ukrainian', iso2: 'uk', googleAdsId: 1036 },
|
|
56
|
+
{ name: 'Urdu', iso2: 'ur', googleAdsId: 1041 },
|
|
57
|
+
{ name: 'Vietnamese', iso2: 'vi', googleAdsId: 1040 },
|
|
58
|
+
];
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { BaseNamespace } from "../../_class";
|
|
2
|
+
import type { BigQuery, QueryOptions } from "@google-cloud/bigquery";
|
|
3
|
+
import { GoogleCloudConfig } from "../index";
|
|
4
|
+
type Query = string | {
|
|
5
|
+
query: string;
|
|
6
|
+
location?: string;
|
|
7
|
+
params: QueryOptions;
|
|
8
|
+
};
|
|
9
|
+
type Datasets = {
|
|
10
|
+
id: string;
|
|
11
|
+
location: string;
|
|
12
|
+
projectId: string;
|
|
13
|
+
};
|
|
14
|
+
type Tables = {
|
|
15
|
+
id: string;
|
|
16
|
+
};
|
|
17
|
+
export declare class GoogleBigQueryNamespace extends BaseNamespace {
|
|
18
|
+
client: BigQuery | null;
|
|
19
|
+
config: GoogleCloudConfig;
|
|
20
|
+
ensureInit: () => Promise<void>;
|
|
21
|
+
/**
|
|
22
|
+
* Create a Dataset if it doesn't already exist.
|
|
23
|
+
* Returns table instance.
|
|
24
|
+
*/
|
|
25
|
+
createDataset: (datasetId: string, options?: object) => Promise<void>;
|
|
26
|
+
/**
|
|
27
|
+
* Check to see whether a given BigQuery dataset exists.
|
|
28
|
+
* Based off:
|
|
29
|
+
* https://github.com/googleapis/nodejs-bigquery/blob/main/samples/getDataset.js
|
|
30
|
+
*/
|
|
31
|
+
datasetExists: (datasetId: string) => Promise<any>;
|
|
32
|
+
/**
|
|
33
|
+
* Retrieve all the Datasets
|
|
34
|
+
*/
|
|
35
|
+
getDataset: () => Promise<Datasets[]>;
|
|
36
|
+
query: (props: Query) => Promise<any>;
|
|
37
|
+
/**
|
|
38
|
+
* Create a Table if it doesn't already exist.
|
|
39
|
+
*/
|
|
40
|
+
createTable: (datasetId: string, datasetOptions: object, tableId: string, options?: object) => Promise<void>;
|
|
41
|
+
/**
|
|
42
|
+
* Check to see whether a given BigQuery table exists.
|
|
43
|
+
* https://cloud.google.com/bigquery/docs/samples/bigquery-table-exists
|
|
44
|
+
*/
|
|
45
|
+
tableExists: (datasetId: string, tableId: string) => Promise<any>;
|
|
46
|
+
/**
|
|
47
|
+
* Retrieve all the Tables from a given Project/Dataset.
|
|
48
|
+
*/
|
|
49
|
+
getTable: (datasetId: string) => Promise<Tables[]>;
|
|
50
|
+
}
|
|
51
|
+
export {};
|