@8ms/helpers 3.2.5 → 3.2.6
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/dist/aws/s3/server/AwsS3.cjs +1 -0
- package/dist/aws/s3/server/AwsS3.mjs +1 -0
- package/dist/googleAds/keywordPlanner/_shared/index.cjs +2 -1
- package/dist/googleAds/keywordPlanner/_shared/index.d.cts +2 -2
- package/dist/googleAds/keywordPlanner/_shared/index.d.mts +2 -2
- package/dist/googleAds/keywordPlanner/_shared/index.mjs +2 -2
- package/dist/googleAds/keywordPlanner/_shared/network.cjs +18 -8
- package/dist/googleAds/keywordPlanner/_shared/network.d.cts +12 -6
- package/dist/googleAds/keywordPlanner/_shared/network.d.mts +12 -6
- package/dist/googleAds/keywordPlanner/_shared/network.mjs +17 -8
- package/dist/googleAds/keywordPlanner/client/index.cjs +2 -1
- package/dist/googleAds/keywordPlanner/client/index.d.cts +2 -2
- package/dist/googleAds/keywordPlanner/client/index.d.mts +2 -2
- package/dist/googleAds/keywordPlanner/client/index.mjs +2 -2
- package/dist/googleAds/keywordPlanner/server/index.cjs +2 -3
- package/dist/googleAds/keywordPlanner/server/index.d.cts +2 -3
- package/dist/googleAds/keywordPlanner/server/index.d.mts +2 -3
- package/dist/googleAds/keywordPlanner/server/index.mjs +2 -3
- package/dist/googleCloud/bigquery/_shared/field/bqFieldMode.cjs +2 -1
- package/dist/googleCloud/bigquery/_shared/field/bqFieldMode.d.cts +2 -0
- package/dist/googleCloud/bigquery/_shared/field/bqFieldMode.d.mts +2 -0
- package/dist/googleCloud/bigquery/_shared/field/bqFieldMode.mjs +2 -1
- package/dist/googleCloud/bigquery/_shared/zodToBQDefinition.cjs +3 -2
- package/dist/googleCloud/bigquery/_shared/zodToBQDefinition.d.cts +1 -1
- package/dist/googleCloud/bigquery/_shared/zodToBQDefinition.d.mts +1 -1
- package/dist/googleCloud/bigquery/_shared/zodToBQDefinition.mjs +3 -2
- package/dist/googleCloud/drive/server/GoogleCloudDrive.cjs +1 -0
- package/dist/googleCloud/drive/server/GoogleCloudDrive.mjs +1 -0
- package/dist/util/server/buildId.cjs +13 -0
- package/dist/util/server/buildId.d.cts +7 -0
- package/dist/util/server/buildId.d.mts +7 -0
- package/dist/util/server/buildId.mjs +12 -0
- package/dist/util/server/index.cjs +2 -0
- package/dist/util/server/index.d.cts +2 -1
- package/dist/util/server/index.d.mts +2 -1
- package/dist/util/server/index.mjs +2 -1
- package/package.json +5 -5
- package/dist/googleAds/keywordPlanner/server/buildRowId.cjs +0 -14
- package/dist/googleAds/keywordPlanner/server/buildRowId.d.cts +0 -8
- package/dist/googleAds/keywordPlanner/server/buildRowId.d.mts +0 -8
- package/dist/googleAds/keywordPlanner/server/buildRowId.mjs +0 -13
|
@@ -15,6 +15,7 @@ const require_string_server_isEmpty = require("../../../string/server/isEmpty.cj
|
|
|
15
15
|
require("../../../string/server/index.cjs");
|
|
16
16
|
const require_util_server_getBrotliCompressed = require("../../../util/server/getBrotliCompressed.cjs");
|
|
17
17
|
const require_util_server_getGzipCompressed = require("../../../util/server/getGzipCompressed.cjs");
|
|
18
|
+
require("../../../util/server/index.cjs");
|
|
18
19
|
const require_aws_s3_server_awsS3File = require("./awsS3File.cjs");
|
|
19
20
|
require("./index.cjs");
|
|
20
21
|
let ky = require("ky");
|
|
@@ -13,6 +13,7 @@ import { isEmpty } from "../../../string/server/isEmpty.mjs";
|
|
|
13
13
|
import "../../../string/server/index.mjs";
|
|
14
14
|
import { getBrotliCompressed } from "../../../util/server/getBrotliCompressed.mjs";
|
|
15
15
|
import { getGzipCompressed } from "../../../util/server/getGzipCompressed.mjs";
|
|
16
|
+
import "../../../util/server/index.mjs";
|
|
16
17
|
import { readFileDefault } from "./awsS3File.mjs";
|
|
17
18
|
import "./index.mjs";
|
|
18
19
|
import ky from "ky";
|
|
@@ -27,7 +27,7 @@ exports.keywordPlannerBQRowSchema = require_googleAds_keywordPlanner__shared_big
|
|
|
27
27
|
exports.keywordPlannerDefinition = require_googleAds_keywordPlanner__shared_bigquery.keywordPlannerDefinition;
|
|
28
28
|
exports.keywordPlannerTableId = require_googleAds_keywordPlanner__shared_bigquery.keywordPlannerTableId;
|
|
29
29
|
exports.kwpMaxQueries = require_googleAds_keywordPlanner__shared_maxRequests.kwpMaxQueries;
|
|
30
|
-
exports.
|
|
30
|
+
exports.networkId = require_googleAds_keywordPlanner__shared_network.networkId;
|
|
31
31
|
exports.phpConfigSchema = require_googleAds_keywordPlanner__shared_zodPHP.phpConfigSchema;
|
|
32
32
|
exports.phpPayloadRequestDetailsSchema = require_googleAds_keywordPlanner__shared_zodPHPPayload.phpPayloadRequestDetailsSchema;
|
|
33
33
|
exports.phpPayloadSchema = require_googleAds_keywordPlanner__shared_zodPHPPayload.phpPayloadSchema;
|
|
@@ -35,4 +35,5 @@ exports.phpResponseMonthSchema = require_googleAds_keywordPlanner__shared_zodPHP
|
|
|
35
35
|
exports.phpResponseRowSchema = require_googleAds_keywordPlanner__shared_zodPHPResponse.phpResponseRowSchema;
|
|
36
36
|
exports.phpResponseSchema = require_googleAds_keywordPlanner__shared_zodPHPResponse.phpResponseSchema;
|
|
37
37
|
exports.phpRowDetailsSchema = require_googleAds_keywordPlanner__shared_zodPHP.phpRowDetailsSchema;
|
|
38
|
+
exports.requestNetworkName = require_googleAds_keywordPlanner__shared_network.requestNetworkName;
|
|
38
39
|
exports.requestNetworkNameSchema = require_googleAds_keywordPlanner__shared_network.requestNetworkNameSchema;
|
|
@@ -7,8 +7,8 @@ import { KwpTimeframe, getKwpTimeframe } from "./getKwpTimeframe.cjs";
|
|
|
7
7
|
import { getLambdaFunctionName } from "./getLambdaFunctionName.cjs";
|
|
8
8
|
import { getRequestLanguage } from "./language.cjs";
|
|
9
9
|
import { kwpMaxQueries } from "./maxRequests.cjs";
|
|
10
|
-
import {
|
|
10
|
+
import { NetworkId, RequestNetworkName, getRequestNetwork, getRequestNetworkValue, networkId, requestNetworkName, requestNetworkNameSchema } from "./network.cjs";
|
|
11
11
|
import { getNormalizeQuery } from "./normalizeQuery.cjs";
|
|
12
12
|
import { PHPPayload, PHPPayloadRequestDetails, phpPayloadRequestDetailsSchema, phpPayloadSchema } from "./zodPHPPayload.cjs";
|
|
13
13
|
import { PHPResponse, PHPResponseMonth, PHPResponseRow, phpResponseMonthSchema, phpResponseRowSchema, phpResponseSchema } from "./zodPHPResponse.cjs";
|
|
14
|
-
export { Endpoint, KeywordPlannerBQInsertRow, KeywordPlannerBQReadRow, KeywordPlannerBQRow, KwpTimeframe,
|
|
14
|
+
export { Endpoint, KeywordPlannerBQInsertRow, KeywordPlannerBQReadRow, KeywordPlannerBQRow, KwpTimeframe, NetworkId, PHPConfig, PHPPayload, PHPPayloadRequestDetails, PHPResponse, PHPResponseMonth, PHPResponseRow, PHPRowDetails, RequestNetworkName, endpoint, getKwpTimeframe, getLambdaFunctionName, getNormalizeQuery, getRequestCountries, getRequestCustomerId, getRequestLanguage, getRequestNetwork, getRequestNetworkValue, keywordPlannerBQInsertRowSchema, keywordPlannerBQReadRowSchema, keywordPlannerBQRowSchema, keywordPlannerDefinition, keywordPlannerTableId, kwpMaxQueries, networkId, phpConfigSchema, phpPayloadRequestDetailsSchema, phpPayloadSchema, phpResponseMonthSchema, phpResponseRowSchema, phpResponseSchema, phpRowDetailsSchema, requestNetworkName, requestNetworkNameSchema };
|
|
@@ -7,8 +7,8 @@ import { KwpTimeframe, getKwpTimeframe } from "./getKwpTimeframe.mjs";
|
|
|
7
7
|
import { getLambdaFunctionName } from "./getLambdaFunctionName.mjs";
|
|
8
8
|
import { getRequestLanguage } from "./language.mjs";
|
|
9
9
|
import { kwpMaxQueries } from "./maxRequests.mjs";
|
|
10
|
-
import {
|
|
10
|
+
import { NetworkId, RequestNetworkName, getRequestNetwork, getRequestNetworkValue, networkId, requestNetworkName, requestNetworkNameSchema } from "./network.mjs";
|
|
11
11
|
import { getNormalizeQuery } from "./normalizeQuery.mjs";
|
|
12
12
|
import { PHPPayload, PHPPayloadRequestDetails, phpPayloadRequestDetailsSchema, phpPayloadSchema } from "./zodPHPPayload.mjs";
|
|
13
13
|
import { PHPResponse, PHPResponseMonth, PHPResponseRow, phpResponseMonthSchema, phpResponseRowSchema, phpResponseSchema } from "./zodPHPResponse.mjs";
|
|
14
|
-
export { Endpoint, KeywordPlannerBQInsertRow, KeywordPlannerBQReadRow, KeywordPlannerBQRow, KwpTimeframe,
|
|
14
|
+
export { Endpoint, KeywordPlannerBQInsertRow, KeywordPlannerBQReadRow, KeywordPlannerBQRow, KwpTimeframe, NetworkId, PHPConfig, PHPPayload, PHPPayloadRequestDetails, PHPResponse, PHPResponseMonth, PHPResponseRow, PHPRowDetails, RequestNetworkName, endpoint, getKwpTimeframe, getLambdaFunctionName, getNormalizeQuery, getRequestCountries, getRequestCustomerId, getRequestLanguage, getRequestNetwork, getRequestNetworkValue, keywordPlannerBQInsertRowSchema, keywordPlannerBQReadRowSchema, keywordPlannerBQRowSchema, keywordPlannerDefinition, keywordPlannerTableId, kwpMaxQueries, networkId, phpConfigSchema, phpPayloadRequestDetailsSchema, phpPayloadSchema, phpResponseMonthSchema, phpResponseRowSchema, phpResponseSchema, phpRowDetailsSchema, requestNetworkName, requestNetworkNameSchema };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { getRequestNetwork, getRequestNetworkValue,
|
|
1
|
+
import { getRequestNetwork, getRequestNetworkValue, networkId, requestNetworkName, requestNetworkNameSchema } from "./network.mjs";
|
|
2
2
|
import { keywordPlannerBQInsertRowSchema, keywordPlannerBQReadRowSchema, keywordPlannerBQRowSchema, keywordPlannerDefinition, keywordPlannerTableId } from "./bigquery.mjs";
|
|
3
3
|
import { getRequestCountries } from "./countries.mjs";
|
|
4
4
|
import { getRequestCustomerId } from "./customerId.mjs";
|
|
@@ -11,4 +11,4 @@ import { getNormalizeQuery } from "./normalizeQuery.mjs";
|
|
|
11
11
|
import { phpConfigSchema, phpRowDetailsSchema } from "./zodPHP.mjs";
|
|
12
12
|
import { phpPayloadRequestDetailsSchema, phpPayloadSchema } from "./zodPHPPayload.mjs";
|
|
13
13
|
import { phpResponseMonthSchema, phpResponseRowSchema, phpResponseSchema } from "./zodPHPResponse.mjs";
|
|
14
|
-
export { endpoint, getKwpTimeframe, getLambdaFunctionName, getNormalizeQuery, getRequestCountries, getRequestCustomerId, getRequestLanguage, getRequestNetwork, getRequestNetworkValue, keywordPlannerBQInsertRowSchema, keywordPlannerBQReadRowSchema, keywordPlannerBQRowSchema, keywordPlannerDefinition, keywordPlannerTableId, kwpMaxQueries,
|
|
14
|
+
export { endpoint, getKwpTimeframe, getLambdaFunctionName, getNormalizeQuery, getRequestCountries, getRequestCustomerId, getRequestLanguage, getRequestNetwork, getRequestNetworkValue, keywordPlannerBQInsertRowSchema, keywordPlannerBQReadRowSchema, keywordPlannerBQRowSchema, keywordPlannerDefinition, keywordPlannerTableId, kwpMaxQueries, networkId, phpConfigSchema, phpPayloadRequestDetailsSchema, phpPayloadSchema, phpResponseMonthSchema, phpResponseRowSchema, phpResponseSchema, phpRowDetailsSchema, requestNetworkName, requestNetworkNameSchema };
|
|
@@ -2,32 +2,42 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
|
2
2
|
let zod = require("zod");
|
|
3
3
|
//#region src/googleAds/keywordPlanner/_shared/network.ts
|
|
4
4
|
/**
|
|
5
|
+
* Convenience for referencing a `RequestNetworkName` value by name (e.g.
|
|
6
|
+
* `requestNetworkName.GOOGLE_SEARCH_ONLY`) rather than a bare string literal - `@8ms/helpers`
|
|
7
|
+
* only exports the `RequestNetworkName` type, not this value form.
|
|
8
|
+
*/
|
|
9
|
+
const requestNetworkName = {
|
|
10
|
+
GOOGLE_SEARCH_ONLY: "GOOGLE_SEARCH_ONLY",
|
|
11
|
+
GOOGLE_SEARCH_AND_PARTNERS: "GOOGLE_SEARCH_AND_PARTNERS"
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
5
14
|
* api_network is stored in BigQuery as the readable key below (e.g. "GOOGLE_SEARCH_ONLY") rather
|
|
6
|
-
* than this raw Keyword Planner
|
|
15
|
+
* than this raw Keyword Planner networkId int, so the table stays self-explanatory without a lookup.
|
|
7
16
|
*/
|
|
8
|
-
const
|
|
17
|
+
const networkId = {
|
|
9
18
|
GOOGLE_SEARCH_ONLY: 2,
|
|
10
19
|
GOOGLE_SEARCH_AND_PARTNERS: 3
|
|
11
20
|
};
|
|
12
|
-
const requestNetworkNameSchema = zod.z.enum(Object.keys(
|
|
13
|
-
const nameByNetwork = Object.fromEntries(Object.entries(
|
|
21
|
+
const requestNetworkNameSchema = zod.z.enum(Object.keys(networkId));
|
|
22
|
+
const nameByNetwork = Object.fromEntries(Object.entries(networkId).map(([name, value]) => [value, name]));
|
|
14
23
|
/**
|
|
15
|
-
* Converts a Keyword Planner
|
|
24
|
+
* Converts a Keyword Planner networkId int (from `networkId`) into the name stored in
|
|
16
25
|
* api_network. Returns null for an unrecognised value.
|
|
17
26
|
*/
|
|
18
27
|
const getRequestNetwork = (value) => {
|
|
19
28
|
return nameByNetwork[value] ?? null;
|
|
20
29
|
};
|
|
21
30
|
/**
|
|
22
|
-
* Converts the readable request network name back into the Keyword Planner
|
|
31
|
+
* Converts the readable request network name back into the Keyword Planner networkId int Google
|
|
23
32
|
* Ads/PHP expects on the wire - the inverse of getRequestNetwork. TypeScript code should only ever
|
|
24
33
|
* deal with the string name; this conversion belongs at the point a Lambda payload is built.
|
|
25
34
|
*/
|
|
26
35
|
const getRequestNetworkValue = (name) => {
|
|
27
|
-
return
|
|
36
|
+
return networkId[name];
|
|
28
37
|
};
|
|
29
38
|
//#endregion
|
|
30
39
|
exports.getRequestNetwork = getRequestNetwork;
|
|
31
40
|
exports.getRequestNetworkValue = getRequestNetworkValue;
|
|
32
|
-
exports.
|
|
41
|
+
exports.networkId = networkId;
|
|
42
|
+
exports.requestNetworkName = requestNetworkName;
|
|
33
43
|
exports.requestNetworkNameSchema = requestNetworkNameSchema;
|
|
@@ -1,26 +1,32 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
//#region src/googleAds/keywordPlanner/_shared/network.d.ts
|
|
3
|
+
/**
|
|
4
|
+
* Convenience for referencing a `RequestNetworkName` value by name (e.g.
|
|
5
|
+
* `requestNetworkName.GOOGLE_SEARCH_ONLY`) rather than a bare string literal - `@8ms/helpers`
|
|
6
|
+
* only exports the `RequestNetworkName` type, not this value form.
|
|
7
|
+
*/
|
|
8
|
+
export declare const requestNetworkName: Record<RequestNetworkName, RequestNetworkName>;
|
|
3
9
|
/**
|
|
4
10
|
* api_network is stored in BigQuery as the readable key below (e.g. "GOOGLE_SEARCH_ONLY") rather
|
|
5
|
-
* than this raw Keyword Planner
|
|
11
|
+
* than this raw Keyword Planner networkId int, so the table stays self-explanatory without a lookup.
|
|
6
12
|
*/
|
|
7
|
-
export declare const
|
|
13
|
+
export declare const networkId: {
|
|
8
14
|
readonly GOOGLE_SEARCH_ONLY: 2;
|
|
9
15
|
readonly GOOGLE_SEARCH_AND_PARTNERS: 3;
|
|
10
16
|
};
|
|
11
|
-
export type
|
|
12
|
-
export type RequestNetworkName = keyof typeof
|
|
17
|
+
export type NetworkId = typeof networkId[keyof typeof networkId];
|
|
18
|
+
export type RequestNetworkName = keyof typeof networkId;
|
|
13
19
|
export declare const requestNetworkNameSchema: z.ZodEnum<{
|
|
14
20
|
GOOGLE_SEARCH_AND_PARTNERS: "GOOGLE_SEARCH_AND_PARTNERS";
|
|
15
21
|
GOOGLE_SEARCH_ONLY: "GOOGLE_SEARCH_ONLY";
|
|
16
22
|
}>;
|
|
17
23
|
/**
|
|
18
|
-
* Converts a Keyword Planner
|
|
24
|
+
* Converts a Keyword Planner networkId int (from `networkId`) into the name stored in
|
|
19
25
|
* api_network. Returns null for an unrecognised value.
|
|
20
26
|
*/
|
|
21
27
|
export declare const getRequestNetwork: (value: number) => RequestNetworkName | null;
|
|
22
28
|
/**
|
|
23
|
-
* Converts the readable request network name back into the Keyword Planner
|
|
29
|
+
* Converts the readable request network name back into the Keyword Planner networkId int Google
|
|
24
30
|
* Ads/PHP expects on the wire - the inverse of getRequestNetwork. TypeScript code should only ever
|
|
25
31
|
* deal with the string name; this conversion belongs at the point a Lambda payload is built.
|
|
26
32
|
*/
|
|
@@ -1,26 +1,32 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
//#region src/googleAds/keywordPlanner/_shared/network.d.ts
|
|
3
|
+
/**
|
|
4
|
+
* Convenience for referencing a `RequestNetworkName` value by name (e.g.
|
|
5
|
+
* `requestNetworkName.GOOGLE_SEARCH_ONLY`) rather than a bare string literal - `@8ms/helpers`
|
|
6
|
+
* only exports the `RequestNetworkName` type, not this value form.
|
|
7
|
+
*/
|
|
8
|
+
export declare const requestNetworkName: Record<RequestNetworkName, RequestNetworkName>;
|
|
3
9
|
/**
|
|
4
10
|
* api_network is stored in BigQuery as the readable key below (e.g. "GOOGLE_SEARCH_ONLY") rather
|
|
5
|
-
* than this raw Keyword Planner
|
|
11
|
+
* than this raw Keyword Planner networkId int, so the table stays self-explanatory without a lookup.
|
|
6
12
|
*/
|
|
7
|
-
export declare const
|
|
13
|
+
export declare const networkId: {
|
|
8
14
|
readonly GOOGLE_SEARCH_ONLY: 2;
|
|
9
15
|
readonly GOOGLE_SEARCH_AND_PARTNERS: 3;
|
|
10
16
|
};
|
|
11
|
-
export type
|
|
12
|
-
export type RequestNetworkName = keyof typeof
|
|
17
|
+
export type NetworkId = typeof networkId[keyof typeof networkId];
|
|
18
|
+
export type RequestNetworkName = keyof typeof networkId;
|
|
13
19
|
export declare const requestNetworkNameSchema: z.ZodEnum<{
|
|
14
20
|
GOOGLE_SEARCH_AND_PARTNERS: "GOOGLE_SEARCH_AND_PARTNERS";
|
|
15
21
|
GOOGLE_SEARCH_ONLY: "GOOGLE_SEARCH_ONLY";
|
|
16
22
|
}>;
|
|
17
23
|
/**
|
|
18
|
-
* Converts a Keyword Planner
|
|
24
|
+
* Converts a Keyword Planner networkId int (from `networkId`) into the name stored in
|
|
19
25
|
* api_network. Returns null for an unrecognised value.
|
|
20
26
|
*/
|
|
21
27
|
export declare const getRequestNetwork: (value: number) => RequestNetworkName | null;
|
|
22
28
|
/**
|
|
23
|
-
* Converts the readable request network name back into the Keyword Planner
|
|
29
|
+
* Converts the readable request network name back into the Keyword Planner networkId int Google
|
|
24
30
|
* Ads/PHP expects on the wire - the inverse of getRequestNetwork. TypeScript code should only ever
|
|
25
31
|
* deal with the string name; this conversion belongs at the point a Lambda payload is built.
|
|
26
32
|
*/
|
|
@@ -1,29 +1,38 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
//#region src/googleAds/keywordPlanner/_shared/network.ts
|
|
3
3
|
/**
|
|
4
|
+
* Convenience for referencing a `RequestNetworkName` value by name (e.g.
|
|
5
|
+
* `requestNetworkName.GOOGLE_SEARCH_ONLY`) rather than a bare string literal - `@8ms/helpers`
|
|
6
|
+
* only exports the `RequestNetworkName` type, not this value form.
|
|
7
|
+
*/
|
|
8
|
+
const requestNetworkName = {
|
|
9
|
+
GOOGLE_SEARCH_ONLY: "GOOGLE_SEARCH_ONLY",
|
|
10
|
+
GOOGLE_SEARCH_AND_PARTNERS: "GOOGLE_SEARCH_AND_PARTNERS"
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
4
13
|
* api_network is stored in BigQuery as the readable key below (e.g. "GOOGLE_SEARCH_ONLY") rather
|
|
5
|
-
* than this raw Keyword Planner
|
|
14
|
+
* than this raw Keyword Planner networkId int, so the table stays self-explanatory without a lookup.
|
|
6
15
|
*/
|
|
7
|
-
const
|
|
16
|
+
const networkId = {
|
|
8
17
|
GOOGLE_SEARCH_ONLY: 2,
|
|
9
18
|
GOOGLE_SEARCH_AND_PARTNERS: 3
|
|
10
19
|
};
|
|
11
|
-
const requestNetworkNameSchema = z.enum(Object.keys(
|
|
12
|
-
const nameByNetwork = Object.fromEntries(Object.entries(
|
|
20
|
+
const requestNetworkNameSchema = z.enum(Object.keys(networkId));
|
|
21
|
+
const nameByNetwork = Object.fromEntries(Object.entries(networkId).map(([name, value]) => [value, name]));
|
|
13
22
|
/**
|
|
14
|
-
* Converts a Keyword Planner
|
|
23
|
+
* Converts a Keyword Planner networkId int (from `networkId`) into the name stored in
|
|
15
24
|
* api_network. Returns null for an unrecognised value.
|
|
16
25
|
*/
|
|
17
26
|
const getRequestNetwork = (value) => {
|
|
18
27
|
return nameByNetwork[value] ?? null;
|
|
19
28
|
};
|
|
20
29
|
/**
|
|
21
|
-
* Converts the readable request network name back into the Keyword Planner
|
|
30
|
+
* Converts the readable request network name back into the Keyword Planner networkId int Google
|
|
22
31
|
* Ads/PHP expects on the wire - the inverse of getRequestNetwork. TypeScript code should only ever
|
|
23
32
|
* deal with the string name; this conversion belongs at the point a Lambda payload is built.
|
|
24
33
|
*/
|
|
25
34
|
const getRequestNetworkValue = (name) => {
|
|
26
|
-
return
|
|
35
|
+
return networkId[name];
|
|
27
36
|
};
|
|
28
37
|
//#endregion
|
|
29
|
-
export { getRequestNetwork, getRequestNetworkValue,
|
|
38
|
+
export { getRequestNetwork, getRequestNetworkValue, networkId, requestNetworkName, requestNetworkNameSchema };
|
|
@@ -28,7 +28,7 @@ exports.keywordPlannerBQRowSchema = require_googleAds_keywordPlanner__shared_big
|
|
|
28
28
|
exports.keywordPlannerDefinition = require_googleAds_keywordPlanner__shared_bigquery.keywordPlannerDefinition;
|
|
29
29
|
exports.keywordPlannerTableId = require_googleAds_keywordPlanner__shared_bigquery.keywordPlannerTableId;
|
|
30
30
|
exports.kwpMaxQueries = require_googleAds_keywordPlanner__shared_maxRequests.kwpMaxQueries;
|
|
31
|
-
exports.
|
|
31
|
+
exports.networkId = require_googleAds_keywordPlanner__shared_network.networkId;
|
|
32
32
|
exports.phpConfigSchema = require_googleAds_keywordPlanner__shared_zodPHP.phpConfigSchema;
|
|
33
33
|
exports.phpPayloadRequestDetailsSchema = require_googleAds_keywordPlanner__shared_zodPHPPayload.phpPayloadRequestDetailsSchema;
|
|
34
34
|
exports.phpPayloadSchema = require_googleAds_keywordPlanner__shared_zodPHPPayload.phpPayloadSchema;
|
|
@@ -36,4 +36,5 @@ exports.phpResponseMonthSchema = require_googleAds_keywordPlanner__shared_zodPHP
|
|
|
36
36
|
exports.phpResponseRowSchema = require_googleAds_keywordPlanner__shared_zodPHPResponse.phpResponseRowSchema;
|
|
37
37
|
exports.phpResponseSchema = require_googleAds_keywordPlanner__shared_zodPHPResponse.phpResponseSchema;
|
|
38
38
|
exports.phpRowDetailsSchema = require_googleAds_keywordPlanner__shared_zodPHP.phpRowDetailsSchema;
|
|
39
|
+
exports.requestNetworkName = require_googleAds_keywordPlanner__shared_network.requestNetworkName;
|
|
39
40
|
exports.requestNetworkNameSchema = require_googleAds_keywordPlanner__shared_network.requestNetworkNameSchema;
|
|
@@ -7,9 +7,9 @@ import { KwpTimeframe, getKwpTimeframe } from "../_shared/getKwpTimeframe.cjs";
|
|
|
7
7
|
import { getLambdaFunctionName } from "../_shared/getLambdaFunctionName.cjs";
|
|
8
8
|
import { getRequestLanguage } from "../_shared/language.cjs";
|
|
9
9
|
import { kwpMaxQueries } from "../_shared/maxRequests.cjs";
|
|
10
|
-
import {
|
|
10
|
+
import { NetworkId, RequestNetworkName, getRequestNetwork, getRequestNetworkValue, networkId, requestNetworkName, requestNetworkNameSchema } from "../_shared/network.cjs";
|
|
11
11
|
import { getNormalizeQuery } from "../_shared/normalizeQuery.cjs";
|
|
12
12
|
import { PHPPayload, PHPPayloadRequestDetails, phpPayloadRequestDetailsSchema, phpPayloadSchema } from "../_shared/zodPHPPayload.cjs";
|
|
13
13
|
import { PHPResponse, PHPResponseMonth, PHPResponseRow, phpResponseMonthSchema, phpResponseRowSchema, phpResponseSchema } from "../_shared/zodPHPResponse.cjs";
|
|
14
14
|
import "../_shared/index.cjs";
|
|
15
|
-
export { Endpoint, KeywordPlannerBQInsertRow, KeywordPlannerBQReadRow, KeywordPlannerBQRow, KwpTimeframe,
|
|
15
|
+
export { Endpoint, KeywordPlannerBQInsertRow, KeywordPlannerBQReadRow, KeywordPlannerBQRow, KwpTimeframe, NetworkId, PHPConfig, PHPPayload, PHPPayloadRequestDetails, PHPResponse, PHPResponseMonth, PHPResponseRow, PHPRowDetails, RequestNetworkName, endpoint, getKwpTimeframe, getLambdaFunctionName, getNormalizeQuery, getRequestCountries, getRequestCustomerId, getRequestLanguage, getRequestNetwork, getRequestNetworkValue, keywordPlannerBQInsertRowSchema, keywordPlannerBQReadRowSchema, keywordPlannerBQRowSchema, keywordPlannerDefinition, keywordPlannerTableId, kwpMaxQueries, networkId, phpConfigSchema, phpPayloadRequestDetailsSchema, phpPayloadSchema, phpResponseMonthSchema, phpResponseRowSchema, phpResponseSchema, phpRowDetailsSchema, requestNetworkName, requestNetworkNameSchema };
|
|
@@ -7,9 +7,9 @@ import { KwpTimeframe, getKwpTimeframe } from "../_shared/getKwpTimeframe.mjs";
|
|
|
7
7
|
import { getLambdaFunctionName } from "../_shared/getLambdaFunctionName.mjs";
|
|
8
8
|
import { getRequestLanguage } from "../_shared/language.mjs";
|
|
9
9
|
import { kwpMaxQueries } from "../_shared/maxRequests.mjs";
|
|
10
|
-
import {
|
|
10
|
+
import { NetworkId, RequestNetworkName, getRequestNetwork, getRequestNetworkValue, networkId, requestNetworkName, requestNetworkNameSchema } from "../_shared/network.mjs";
|
|
11
11
|
import { getNormalizeQuery } from "../_shared/normalizeQuery.mjs";
|
|
12
12
|
import { PHPPayload, PHPPayloadRequestDetails, phpPayloadRequestDetailsSchema, phpPayloadSchema } from "../_shared/zodPHPPayload.mjs";
|
|
13
13
|
import { PHPResponse, PHPResponseMonth, PHPResponseRow, phpResponseMonthSchema, phpResponseRowSchema, phpResponseSchema } from "../_shared/zodPHPResponse.mjs";
|
|
14
14
|
import "../_shared/index.mjs";
|
|
15
|
-
export { Endpoint, KeywordPlannerBQInsertRow, KeywordPlannerBQReadRow, KeywordPlannerBQRow, KwpTimeframe,
|
|
15
|
+
export { Endpoint, KeywordPlannerBQInsertRow, KeywordPlannerBQReadRow, KeywordPlannerBQRow, KwpTimeframe, NetworkId, PHPConfig, PHPPayload, PHPPayloadRequestDetails, PHPResponse, PHPResponseMonth, PHPResponseRow, PHPRowDetails, RequestNetworkName, endpoint, getKwpTimeframe, getLambdaFunctionName, getNormalizeQuery, getRequestCountries, getRequestCustomerId, getRequestLanguage, getRequestNetwork, getRequestNetworkValue, keywordPlannerBQInsertRowSchema, keywordPlannerBQReadRowSchema, keywordPlannerBQRowSchema, keywordPlannerDefinition, keywordPlannerTableId, kwpMaxQueries, networkId, phpConfigSchema, phpPayloadRequestDetailsSchema, phpPayloadSchema, phpResponseMonthSchema, phpResponseRowSchema, phpResponseSchema, phpRowDetailsSchema, requestNetworkName, requestNetworkNameSchema };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { getRequestNetwork, getRequestNetworkValue,
|
|
1
|
+
import { getRequestNetwork, getRequestNetworkValue, networkId, requestNetworkName, requestNetworkNameSchema } from "../_shared/network.mjs";
|
|
2
2
|
import { keywordPlannerBQInsertRowSchema, keywordPlannerBQReadRowSchema, keywordPlannerBQRowSchema, keywordPlannerDefinition, keywordPlannerTableId } from "../_shared/bigquery.mjs";
|
|
3
3
|
import { getRequestCountries } from "../_shared/countries.mjs";
|
|
4
4
|
import { getRequestCustomerId } from "../_shared/customerId.mjs";
|
|
@@ -12,4 +12,4 @@ import { phpConfigSchema, phpRowDetailsSchema } from "../_shared/zodPHP.mjs";
|
|
|
12
12
|
import { phpPayloadRequestDetailsSchema, phpPayloadSchema } from "../_shared/zodPHPPayload.mjs";
|
|
13
13
|
import { phpResponseMonthSchema, phpResponseRowSchema, phpResponseSchema } from "../_shared/zodPHPResponse.mjs";
|
|
14
14
|
import "../_shared/index.mjs";
|
|
15
|
-
export { endpoint, getKwpTimeframe, getLambdaFunctionName, getNormalizeQuery, getRequestCountries, getRequestCustomerId, getRequestLanguage, getRequestNetwork, getRequestNetworkValue, keywordPlannerBQInsertRowSchema, keywordPlannerBQReadRowSchema, keywordPlannerBQRowSchema, keywordPlannerDefinition, keywordPlannerTableId, kwpMaxQueries,
|
|
15
|
+
export { endpoint, getKwpTimeframe, getLambdaFunctionName, getNormalizeQuery, getRequestCountries, getRequestCustomerId, getRequestLanguage, getRequestNetwork, getRequestNetworkValue, keywordPlannerBQInsertRowSchema, keywordPlannerBQReadRowSchema, keywordPlannerBQRowSchema, keywordPlannerDefinition, keywordPlannerTableId, kwpMaxQueries, networkId, phpConfigSchema, phpPayloadRequestDetailsSchema, phpPayloadSchema, phpResponseMonthSchema, phpResponseRowSchema, phpResponseSchema, phpRowDetailsSchema, requestNetworkName, requestNetworkNameSchema };
|
|
@@ -13,8 +13,6 @@ const require_googleAds_keywordPlanner__shared_zodPHP = require("../_shared/zodP
|
|
|
13
13
|
const require_googleAds_keywordPlanner__shared_zodPHPPayload = require("../_shared/zodPHPPayload.cjs");
|
|
14
14
|
const require_googleAds_keywordPlanner__shared_zodPHPResponse = require("../_shared/zodPHPResponse.cjs");
|
|
15
15
|
require("../_shared/index.cjs");
|
|
16
|
-
const require_googleAds_keywordPlanner_server_buildRowId = require("./buildRowId.cjs");
|
|
17
|
-
exports.buildRowId = require_googleAds_keywordPlanner_server_buildRowId.buildRowId;
|
|
18
16
|
exports.endpoint = require_googleAds_keywordPlanner__shared_endpoint.endpoint;
|
|
19
17
|
exports.getKwpTimeframe = require_googleAds_keywordPlanner__shared_getKwpTimeframe.getKwpTimeframe;
|
|
20
18
|
exports.getLambdaFunctionName = require_googleAds_keywordPlanner__shared_getLambdaFunctionName.getLambdaFunctionName;
|
|
@@ -30,7 +28,7 @@ exports.keywordPlannerBQRowSchema = require_googleAds_keywordPlanner__shared_big
|
|
|
30
28
|
exports.keywordPlannerDefinition = require_googleAds_keywordPlanner__shared_bigquery.keywordPlannerDefinition;
|
|
31
29
|
exports.keywordPlannerTableId = require_googleAds_keywordPlanner__shared_bigquery.keywordPlannerTableId;
|
|
32
30
|
exports.kwpMaxQueries = require_googleAds_keywordPlanner__shared_maxRequests.kwpMaxQueries;
|
|
33
|
-
exports.
|
|
31
|
+
exports.networkId = require_googleAds_keywordPlanner__shared_network.networkId;
|
|
34
32
|
exports.phpConfigSchema = require_googleAds_keywordPlanner__shared_zodPHP.phpConfigSchema;
|
|
35
33
|
exports.phpPayloadRequestDetailsSchema = require_googleAds_keywordPlanner__shared_zodPHPPayload.phpPayloadRequestDetailsSchema;
|
|
36
34
|
exports.phpPayloadSchema = require_googleAds_keywordPlanner__shared_zodPHPPayload.phpPayloadSchema;
|
|
@@ -38,4 +36,5 @@ exports.phpResponseMonthSchema = require_googleAds_keywordPlanner__shared_zodPHP
|
|
|
38
36
|
exports.phpResponseRowSchema = require_googleAds_keywordPlanner__shared_zodPHPResponse.phpResponseRowSchema;
|
|
39
37
|
exports.phpResponseSchema = require_googleAds_keywordPlanner__shared_zodPHPResponse.phpResponseSchema;
|
|
40
38
|
exports.phpRowDetailsSchema = require_googleAds_keywordPlanner__shared_zodPHP.phpRowDetailsSchema;
|
|
39
|
+
exports.requestNetworkName = require_googleAds_keywordPlanner__shared_network.requestNetworkName;
|
|
41
40
|
exports.requestNetworkNameSchema = require_googleAds_keywordPlanner__shared_network.requestNetworkNameSchema;
|
|
@@ -7,10 +7,9 @@ import { KwpTimeframe, getKwpTimeframe } from "../_shared/getKwpTimeframe.cjs";
|
|
|
7
7
|
import { getLambdaFunctionName } from "../_shared/getLambdaFunctionName.cjs";
|
|
8
8
|
import { getRequestLanguage } from "../_shared/language.cjs";
|
|
9
9
|
import { kwpMaxQueries } from "../_shared/maxRequests.cjs";
|
|
10
|
-
import {
|
|
10
|
+
import { NetworkId, RequestNetworkName, getRequestNetwork, getRequestNetworkValue, networkId, requestNetworkName, requestNetworkNameSchema } from "../_shared/network.cjs";
|
|
11
11
|
import { getNormalizeQuery } from "../_shared/normalizeQuery.cjs";
|
|
12
12
|
import { PHPPayload, PHPPayloadRequestDetails, phpPayloadRequestDetailsSchema, phpPayloadSchema } from "../_shared/zodPHPPayload.cjs";
|
|
13
13
|
import { PHPResponse, PHPResponseMonth, PHPResponseRow, phpResponseMonthSchema, phpResponseRowSchema, phpResponseSchema } from "../_shared/zodPHPResponse.cjs";
|
|
14
14
|
import "../_shared/index.cjs";
|
|
15
|
-
|
|
16
|
-
export { Endpoint, KeywordPlannerBQInsertRow, KeywordPlannerBQReadRow, KeywordPlannerBQRow, KwpTimeframe, Network, PHPConfig, PHPPayload, PHPPayloadRequestDetails, PHPResponse, PHPResponseMonth, PHPResponseRow, PHPRowDetails, RequestNetworkName, buildRowId, endpoint, getKwpTimeframe, getLambdaFunctionName, getNormalizeQuery, getRequestCountries, getRequestCustomerId, getRequestLanguage, getRequestNetwork, getRequestNetworkValue, keywordPlannerBQInsertRowSchema, keywordPlannerBQReadRowSchema, keywordPlannerBQRowSchema, keywordPlannerDefinition, keywordPlannerTableId, kwpMaxQueries, network, phpConfigSchema, phpPayloadRequestDetailsSchema, phpPayloadSchema, phpResponseMonthSchema, phpResponseRowSchema, phpResponseSchema, phpRowDetailsSchema, requestNetworkNameSchema };
|
|
15
|
+
export { Endpoint, KeywordPlannerBQInsertRow, KeywordPlannerBQReadRow, KeywordPlannerBQRow, KwpTimeframe, NetworkId, PHPConfig, PHPPayload, PHPPayloadRequestDetails, PHPResponse, PHPResponseMonth, PHPResponseRow, PHPRowDetails, RequestNetworkName, endpoint, getKwpTimeframe, getLambdaFunctionName, getNormalizeQuery, getRequestCountries, getRequestCustomerId, getRequestLanguage, getRequestNetwork, getRequestNetworkValue, keywordPlannerBQInsertRowSchema, keywordPlannerBQReadRowSchema, keywordPlannerBQRowSchema, keywordPlannerDefinition, keywordPlannerTableId, kwpMaxQueries, networkId, phpConfigSchema, phpPayloadRequestDetailsSchema, phpPayloadSchema, phpResponseMonthSchema, phpResponseRowSchema, phpResponseSchema, phpRowDetailsSchema, requestNetworkName, requestNetworkNameSchema };
|
|
@@ -7,10 +7,9 @@ import { KwpTimeframe, getKwpTimeframe } from "../_shared/getKwpTimeframe.mjs";
|
|
|
7
7
|
import { getLambdaFunctionName } from "../_shared/getLambdaFunctionName.mjs";
|
|
8
8
|
import { getRequestLanguage } from "../_shared/language.mjs";
|
|
9
9
|
import { kwpMaxQueries } from "../_shared/maxRequests.mjs";
|
|
10
|
-
import {
|
|
10
|
+
import { NetworkId, RequestNetworkName, getRequestNetwork, getRequestNetworkValue, networkId, requestNetworkName, requestNetworkNameSchema } from "../_shared/network.mjs";
|
|
11
11
|
import { getNormalizeQuery } from "../_shared/normalizeQuery.mjs";
|
|
12
12
|
import { PHPPayload, PHPPayloadRequestDetails, phpPayloadRequestDetailsSchema, phpPayloadSchema } from "../_shared/zodPHPPayload.mjs";
|
|
13
13
|
import { PHPResponse, PHPResponseMonth, PHPResponseRow, phpResponseMonthSchema, phpResponseRowSchema, phpResponseSchema } from "../_shared/zodPHPResponse.mjs";
|
|
14
14
|
import "../_shared/index.mjs";
|
|
15
|
-
|
|
16
|
-
export { Endpoint, KeywordPlannerBQInsertRow, KeywordPlannerBQReadRow, KeywordPlannerBQRow, KwpTimeframe, Network, PHPConfig, PHPPayload, PHPPayloadRequestDetails, PHPResponse, PHPResponseMonth, PHPResponseRow, PHPRowDetails, RequestNetworkName, buildRowId, endpoint, getKwpTimeframe, getLambdaFunctionName, getNormalizeQuery, getRequestCountries, getRequestCustomerId, getRequestLanguage, getRequestNetwork, getRequestNetworkValue, keywordPlannerBQInsertRowSchema, keywordPlannerBQReadRowSchema, keywordPlannerBQRowSchema, keywordPlannerDefinition, keywordPlannerTableId, kwpMaxQueries, network, phpConfigSchema, phpPayloadRequestDetailsSchema, phpPayloadSchema, phpResponseMonthSchema, phpResponseRowSchema, phpResponseSchema, phpRowDetailsSchema, requestNetworkNameSchema };
|
|
15
|
+
export { Endpoint, KeywordPlannerBQInsertRow, KeywordPlannerBQReadRow, KeywordPlannerBQRow, KwpTimeframe, NetworkId, PHPConfig, PHPPayload, PHPPayloadRequestDetails, PHPResponse, PHPResponseMonth, PHPResponseRow, PHPRowDetails, RequestNetworkName, endpoint, getKwpTimeframe, getLambdaFunctionName, getNormalizeQuery, getRequestCountries, getRequestCustomerId, getRequestLanguage, getRequestNetwork, getRequestNetworkValue, keywordPlannerBQInsertRowSchema, keywordPlannerBQReadRowSchema, keywordPlannerBQRowSchema, keywordPlannerDefinition, keywordPlannerTableId, kwpMaxQueries, networkId, phpConfigSchema, phpPayloadRequestDetailsSchema, phpPayloadSchema, phpResponseMonthSchema, phpResponseRowSchema, phpResponseSchema, phpRowDetailsSchema, requestNetworkName, requestNetworkNameSchema };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { getRequestNetwork, getRequestNetworkValue,
|
|
1
|
+
import { getRequestNetwork, getRequestNetworkValue, networkId, requestNetworkName, requestNetworkNameSchema } from "../_shared/network.mjs";
|
|
2
2
|
import { keywordPlannerBQInsertRowSchema, keywordPlannerBQReadRowSchema, keywordPlannerBQRowSchema, keywordPlannerDefinition, keywordPlannerTableId } from "../_shared/bigquery.mjs";
|
|
3
3
|
import { getRequestCountries } from "../_shared/countries.mjs";
|
|
4
4
|
import { getRequestCustomerId } from "../_shared/customerId.mjs";
|
|
@@ -12,5 +12,4 @@ import { phpConfigSchema, phpRowDetailsSchema } from "../_shared/zodPHP.mjs";
|
|
|
12
12
|
import { phpPayloadRequestDetailsSchema, phpPayloadSchema } from "../_shared/zodPHPPayload.mjs";
|
|
13
13
|
import { phpResponseMonthSchema, phpResponseRowSchema, phpResponseSchema } from "../_shared/zodPHPResponse.mjs";
|
|
14
14
|
import "../_shared/index.mjs";
|
|
15
|
-
|
|
16
|
-
export { buildRowId, endpoint, getKwpTimeframe, getLambdaFunctionName, getNormalizeQuery, getRequestCountries, getRequestCustomerId, getRequestLanguage, getRequestNetwork, getRequestNetworkValue, keywordPlannerBQInsertRowSchema, keywordPlannerBQReadRowSchema, keywordPlannerBQRowSchema, keywordPlannerDefinition, keywordPlannerTableId, kwpMaxQueries, network, phpConfigSchema, phpPayloadRequestDetailsSchema, phpPayloadSchema, phpResponseMonthSchema, phpResponseRowSchema, phpResponseSchema, phpRowDetailsSchema, requestNetworkNameSchema };
|
|
15
|
+
export { endpoint, getKwpTimeframe, getLambdaFunctionName, getNormalizeQuery, getRequestCountries, getRequestCustomerId, getRequestLanguage, getRequestNetwork, getRequestNetworkValue, keywordPlannerBQInsertRowSchema, keywordPlannerBQReadRowSchema, keywordPlannerBQRowSchema, keywordPlannerDefinition, keywordPlannerTableId, kwpMaxQueries, networkId, phpConfigSchema, phpPayloadRequestDetailsSchema, phpPayloadSchema, phpResponseMonthSchema, phpResponseRowSchema, phpResponseSchema, phpRowDetailsSchema, requestNetworkName, requestNetworkNameSchema };
|
|
@@ -3,7 +3,8 @@ let zod = require("zod");
|
|
|
3
3
|
//#region src/googleCloud/bigquery/_shared/field/bqFieldMode.ts
|
|
4
4
|
const BQFieldMode = {
|
|
5
5
|
NULLABLE: "NULLABLE",
|
|
6
|
-
REPEATED: "REPEATED"
|
|
6
|
+
REPEATED: "REPEATED",
|
|
7
|
+
REQUIRED: "REQUIRED"
|
|
7
8
|
};
|
|
8
9
|
const BQFieldModeSchema = zod.z.enum(BQFieldMode);
|
|
9
10
|
//#endregion
|
|
@@ -3,10 +3,12 @@ import { z } from "zod";
|
|
|
3
3
|
export declare const BQFieldMode: {
|
|
4
4
|
readonly NULLABLE: "NULLABLE";
|
|
5
5
|
readonly REPEATED: "REPEATED";
|
|
6
|
+
readonly REQUIRED: "REQUIRED";
|
|
6
7
|
};
|
|
7
8
|
export type BQFieldMode = typeof BQFieldMode[keyof typeof BQFieldMode];
|
|
8
9
|
export declare const BQFieldModeSchema: z.ZodEnum<{
|
|
9
10
|
readonly NULLABLE: "NULLABLE";
|
|
10
11
|
readonly REPEATED: "REPEATED";
|
|
12
|
+
readonly REQUIRED: "REQUIRED";
|
|
11
13
|
}>;
|
|
12
14
|
//#endregion
|
|
@@ -3,10 +3,12 @@ import { z } from "zod";
|
|
|
3
3
|
export declare const BQFieldMode: {
|
|
4
4
|
readonly NULLABLE: "NULLABLE";
|
|
5
5
|
readonly REPEATED: "REPEATED";
|
|
6
|
+
readonly REQUIRED: "REQUIRED";
|
|
6
7
|
};
|
|
7
8
|
export type BQFieldMode = typeof BQFieldMode[keyof typeof BQFieldMode];
|
|
8
9
|
export declare const BQFieldModeSchema: z.ZodEnum<{
|
|
9
10
|
readonly NULLABLE: "NULLABLE";
|
|
10
11
|
readonly REPEATED: "REPEATED";
|
|
12
|
+
readonly REQUIRED: "REQUIRED";
|
|
11
13
|
}>;
|
|
12
14
|
//#endregion
|
|
@@ -2,7 +2,8 @@ import { z } from "zod";
|
|
|
2
2
|
//#region src/googleCloud/bigquery/_shared/field/bqFieldMode.ts
|
|
3
3
|
const BQFieldMode = {
|
|
4
4
|
NULLABLE: "NULLABLE",
|
|
5
|
-
REPEATED: "REPEATED"
|
|
5
|
+
REPEATED: "REPEATED",
|
|
6
|
+
REQUIRED: "REQUIRED"
|
|
6
7
|
};
|
|
7
8
|
const BQFieldModeSchema = z.enum(BQFieldMode);
|
|
8
9
|
//#endregion
|
|
@@ -32,16 +32,17 @@ const buildBQField = (name, fieldSchema) => {
|
|
|
32
32
|
mode = "REPEATED";
|
|
33
33
|
inner = inner.element;
|
|
34
34
|
}
|
|
35
|
+
if (!mode) mode = "REQUIRED";
|
|
35
36
|
if (inner instanceof zod.z.ZodObject) return {
|
|
36
37
|
name,
|
|
37
38
|
type: "RECORD",
|
|
38
|
-
|
|
39
|
+
mode,
|
|
39
40
|
fields: zodToBQSchema(inner)
|
|
40
41
|
};
|
|
41
42
|
return {
|
|
42
43
|
name,
|
|
43
44
|
type: getBqType(inner),
|
|
44
|
-
|
|
45
|
+
mode
|
|
45
46
|
};
|
|
46
47
|
};
|
|
47
48
|
/**
|
|
@@ -31,16 +31,17 @@ const buildBQField = (name, fieldSchema) => {
|
|
|
31
31
|
mode = "REPEATED";
|
|
32
32
|
inner = inner.element;
|
|
33
33
|
}
|
|
34
|
+
if (!mode) mode = "REQUIRED";
|
|
34
35
|
if (inner instanceof z.ZodObject) return {
|
|
35
36
|
name,
|
|
36
37
|
type: "RECORD",
|
|
37
|
-
|
|
38
|
+
mode,
|
|
38
39
|
fields: zodToBQSchema(inner)
|
|
39
40
|
};
|
|
40
41
|
return {
|
|
41
42
|
name,
|
|
42
43
|
type: getBqType(inner),
|
|
43
|
-
|
|
44
|
+
mode
|
|
44
45
|
};
|
|
45
46
|
};
|
|
46
47
|
/**
|
|
@@ -2,6 +2,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
|
2
2
|
const require__class__shared_BaseNamespace = require("../../../_class/_shared/BaseNamespace.cjs");
|
|
3
3
|
const require_util_server_getGzipDecompressed = require("../../../util/server/getGzipDecompressed.cjs");
|
|
4
4
|
const require_util_server_getGzipCompressed = require("../../../util/server/getGzipCompressed.cjs");
|
|
5
|
+
require("../../../util/server/index.cjs");
|
|
5
6
|
//#region src/googleCloud/drive/server/GoogleCloudDrive.ts
|
|
6
7
|
var GoogleCloudDrive = class extends require__class__shared_BaseNamespace.BaseNamespace {
|
|
7
8
|
/**
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { BaseNamespace } from "../../../_class/_shared/BaseNamespace.mjs";
|
|
2
2
|
import { getGzipDecompressed } from "../../../util/server/getGzipDecompressed.mjs";
|
|
3
3
|
import { getGzipCompressed } from "../../../util/server/getGzipCompressed.mjs";
|
|
4
|
+
import "../../../util/server/index.mjs";
|
|
4
5
|
//#region src/googleCloud/drive/server/GoogleCloudDrive.ts
|
|
5
6
|
var GoogleCloudDrive = class extends BaseNamespace {
|
|
6
7
|
/**
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
const require_crypto_server_getSha256 = require("../../crypto/server/getSha256.cjs");
|
|
3
|
+
require("../../crypto/server/index.cjs");
|
|
4
|
+
//#region src/util/server/buildId.ts
|
|
5
|
+
/**
|
|
6
|
+
* Joins its arguments with "::" and hashes the result - a general-purpose deterministic id/dedupe
|
|
7
|
+
* key builder for any combination of string/number/null fields.
|
|
8
|
+
*/
|
|
9
|
+
const buildId = (...args) => {
|
|
10
|
+
return require_crypto_server_getSha256.getSha256(args.join("::"));
|
|
11
|
+
};
|
|
12
|
+
//#endregion
|
|
13
|
+
exports.buildId = buildId;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
//#region src/util/server/buildId.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Joins its arguments with "::" and hashes the result - a general-purpose deterministic id/dedupe
|
|
4
|
+
* key builder for any combination of string/number/null fields.
|
|
5
|
+
*/
|
|
6
|
+
export declare const buildId: (...args: (string | number | null)[]) => string;
|
|
7
|
+
//#endregion
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
//#region src/util/server/buildId.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Joins its arguments with "::" and hashes the result - a general-purpose deterministic id/dedupe
|
|
4
|
+
* key builder for any combination of string/number/null fields.
|
|
5
|
+
*/
|
|
6
|
+
export declare const buildId: (...args: (string | number | null)[]) => string;
|
|
7
|
+
//#endregion
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { getSha256 } from "../../crypto/server/getSha256.mjs";
|
|
2
|
+
import "../../crypto/server/index.mjs";
|
|
3
|
+
//#region src/util/server/buildId.ts
|
|
4
|
+
/**
|
|
5
|
+
* Joins its arguments with "::" and hashes the result - a general-purpose deterministic id/dedupe
|
|
6
|
+
* key builder for any combination of string/number/null fields.
|
|
7
|
+
*/
|
|
8
|
+
const buildId = (...args) => {
|
|
9
|
+
return getSha256(args.join("::"));
|
|
10
|
+
};
|
|
11
|
+
//#endregion
|
|
12
|
+
export { buildId };
|
|
@@ -7,8 +7,10 @@ const require_util__shared_isUndefined = require("../_shared/isUndefined.cjs");
|
|
|
7
7
|
const require_util__shared_sleep = require("../_shared/sleep.cjs");
|
|
8
8
|
const require_util__shared_promiseChunks = require("../_shared/promiseChunks.cjs");
|
|
9
9
|
const require_util__shared_sort = require("../_shared/sort.cjs");
|
|
10
|
+
const require_util_server_buildId = require("./buildId.cjs");
|
|
10
11
|
const require_util_server_getBrotliCompressed = require("./getBrotliCompressed.cjs");
|
|
11
12
|
const require_util_server_getGzipCompressed = require("./getGzipCompressed.cjs");
|
|
13
|
+
exports.buildId = require_util_server_buildId.buildId;
|
|
12
14
|
exports.defaultTo = require_util__shared_defaultTo.defaultTo;
|
|
13
15
|
exports.getBrotliCompressed = require_util_server_getBrotliCompressed.getBrotliCompressed;
|
|
14
16
|
exports.getBrotliDecompressed = require_util_server_getBrotliDecompressed.getBrotliDecompressed;
|
|
@@ -4,8 +4,9 @@ import { isUndefined } from "../_shared/isUndefined.cjs";
|
|
|
4
4
|
import { promiseChunks } from "../_shared/promiseChunks.cjs";
|
|
5
5
|
import { sleep } from "../_shared/sleep.cjs";
|
|
6
6
|
import { Sort, sort } from "../_shared/sort.cjs";
|
|
7
|
+
import { buildId } from "./buildId.cjs";
|
|
7
8
|
import { getBrotliCompressed } from "./getBrotliCompressed.cjs";
|
|
8
9
|
import { getBrotliDecompressed } from "./getBrotliDecompressed.cjs";
|
|
9
10
|
import { getGzipCompressed } from "./getGzipCompressed.cjs";
|
|
10
11
|
import { getGzipDecompressed } from "./getGzipDecompressed.cjs";
|
|
11
|
-
export { Sort, defaultTo, getBrotliCompressed, getBrotliDecompressed, getError, getGzipCompressed, getGzipDecompressed, isUndefined, promiseChunks, sleep, sort };
|
|
12
|
+
export { Sort, buildId, defaultTo, getBrotliCompressed, getBrotliDecompressed, getError, getGzipCompressed, getGzipDecompressed, isUndefined, promiseChunks, sleep, sort };
|
|
@@ -4,8 +4,9 @@ import { isUndefined } from "../_shared/isUndefined.mjs";
|
|
|
4
4
|
import { promiseChunks } from "../_shared/promiseChunks.mjs";
|
|
5
5
|
import { sleep } from "../_shared/sleep.mjs";
|
|
6
6
|
import { Sort, sort } from "../_shared/sort.mjs";
|
|
7
|
+
import { buildId } from "./buildId.mjs";
|
|
7
8
|
import { getBrotliCompressed } from "./getBrotliCompressed.mjs";
|
|
8
9
|
import { getBrotliDecompressed } from "./getBrotliDecompressed.mjs";
|
|
9
10
|
import { getGzipCompressed } from "./getGzipCompressed.mjs";
|
|
10
11
|
import { getGzipDecompressed } from "./getGzipDecompressed.mjs";
|
|
11
|
-
export { Sort, defaultTo, getBrotliCompressed, getBrotliDecompressed, getError, getGzipCompressed, getGzipDecompressed, isUndefined, promiseChunks, sleep, sort };
|
|
12
|
+
export { Sort, buildId, defaultTo, getBrotliCompressed, getBrotliDecompressed, getError, getGzipCompressed, getGzipDecompressed, isUndefined, promiseChunks, sleep, sort };
|
|
@@ -6,6 +6,7 @@ import { isUndefined } from "../_shared/isUndefined.mjs";
|
|
|
6
6
|
import { sleep } from "../_shared/sleep.mjs";
|
|
7
7
|
import { promiseChunks } from "../_shared/promiseChunks.mjs";
|
|
8
8
|
import { sort } from "../_shared/sort.mjs";
|
|
9
|
+
import { buildId } from "./buildId.mjs";
|
|
9
10
|
import { getBrotliCompressed } from "./getBrotliCompressed.mjs";
|
|
10
11
|
import { getGzipCompressed } from "./getGzipCompressed.mjs";
|
|
11
|
-
export { defaultTo, getBrotliCompressed, getBrotliDecompressed, getError, getGzipCompressed, getGzipDecompressed, isUndefined, promiseChunks, sleep, sort };
|
|
12
|
+
export { buildId, defaultTo, getBrotliCompressed, getBrotliDecompressed, getError, getGzipCompressed, getGzipDecompressed, isUndefined, promiseChunks, sleep, sort };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@8ms/helpers",
|
|
3
3
|
"license": "UNLICENSED",
|
|
4
|
-
"version": "3.2.
|
|
4
|
+
"version": "3.2.6",
|
|
5
5
|
"packageManager": "yarn@4.18.0",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -939,10 +939,6 @@
|
|
|
939
939
|
"import": "./dist/googleAds/keywordPlanner/server/index.mjs",
|
|
940
940
|
"require": "./dist/googleAds/keywordPlanner/server/index.cjs"
|
|
941
941
|
},
|
|
942
|
-
"./googleAds/keywordPlanner/server/buildRowId": {
|
|
943
|
-
"import": "./dist/googleAds/keywordPlanner/server/buildRowId.mjs",
|
|
944
|
-
"require": "./dist/googleAds/keywordPlanner/server/buildRowId.cjs"
|
|
945
|
-
},
|
|
946
942
|
"./googleAds/server": {
|
|
947
943
|
"import": "./dist/googleAds/server/index.mjs",
|
|
948
944
|
"require": "./dist/googleAds/server/index.cjs"
|
|
@@ -1747,6 +1743,10 @@
|
|
|
1747
1743
|
"import": "./dist/util/server/index.mjs",
|
|
1748
1744
|
"require": "./dist/util/server/index.cjs"
|
|
1749
1745
|
},
|
|
1746
|
+
"./util/server/buildId": {
|
|
1747
|
+
"import": "./dist/util/server/buildId.mjs",
|
|
1748
|
+
"require": "./dist/util/server/buildId.cjs"
|
|
1749
|
+
},
|
|
1750
1750
|
"./util/server/getBrotliCompressed": {
|
|
1751
1751
|
"import": "./dist/util/server/getBrotliCompressed.mjs",
|
|
1752
1752
|
"require": "./dist/util/server/getBrotliCompressed.cjs"
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_crypto_server_getSha256 = require("../../../crypto/server/getSha256.cjs");
|
|
3
|
-
require("../../../crypto/server/index.cjs");
|
|
4
|
-
//#region src/googleAds/keywordPlanner/server/buildRowId.ts
|
|
5
|
-
/**
|
|
6
|
-
* Joins its arguments with "::" and hashes the result - the shared id scheme for both the keyword
|
|
7
|
-
* planner and keyword planner request tables. Exported for reuse by uploadKeywordPlannerCsv.ts,
|
|
8
|
-
* which builds the same dedupe key for a manually uploaded CSV.
|
|
9
|
-
*/
|
|
10
|
-
const buildRowId = (...args) => {
|
|
11
|
-
return require_crypto_server_getSha256.getSha256(args.join("::"));
|
|
12
|
-
};
|
|
13
|
-
//#endregion
|
|
14
|
-
exports.buildRowId = buildRowId;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
//#region src/googleAds/keywordPlanner/server/buildRowId.d.ts
|
|
2
|
-
/**
|
|
3
|
-
* Joins its arguments with "::" and hashes the result - the shared id scheme for both the keyword
|
|
4
|
-
* planner and keyword planner request tables. Exported for reuse by uploadKeywordPlannerCsv.ts,
|
|
5
|
-
* which builds the same dedupe key for a manually uploaded CSV.
|
|
6
|
-
*/
|
|
7
|
-
export declare const buildRowId: (...args: (string | number | null)[]) => string;
|
|
8
|
-
//#endregion
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
//#region src/googleAds/keywordPlanner/server/buildRowId.d.ts
|
|
2
|
-
/**
|
|
3
|
-
* Joins its arguments with "::" and hashes the result - the shared id scheme for both the keyword
|
|
4
|
-
* planner and keyword planner request tables. Exported for reuse by uploadKeywordPlannerCsv.ts,
|
|
5
|
-
* which builds the same dedupe key for a manually uploaded CSV.
|
|
6
|
-
*/
|
|
7
|
-
export declare const buildRowId: (...args: (string | number | null)[]) => string;
|
|
8
|
-
//#endregion
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { getSha256 } from "../../../crypto/server/getSha256.mjs";
|
|
2
|
-
import "../../../crypto/server/index.mjs";
|
|
3
|
-
//#region src/googleAds/keywordPlanner/server/buildRowId.ts
|
|
4
|
-
/**
|
|
5
|
-
* Joins its arguments with "::" and hashes the result - the shared id scheme for both the keyword
|
|
6
|
-
* planner and keyword planner request tables. Exported for reuse by uploadKeywordPlannerCsv.ts,
|
|
7
|
-
* which builds the same dedupe key for a manually uploaded CSV.
|
|
8
|
-
*/
|
|
9
|
-
const buildRowId = (...args) => {
|
|
10
|
-
return getSha256(args.join("::"));
|
|
11
|
-
};
|
|
12
|
-
//#endregion
|
|
13
|
-
export { buildRowId };
|