@8ms/helpers 3.2.3 → 3.2.4
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/lambda/server/AwsLambda.cjs +1 -1
- package/dist/aws/lambda/server/AwsLambda.mjs +1 -1
- package/dist/brightData/serpApi/server/getAsyncRequestId.cjs +1 -1
- package/dist/brightData/serpApi/server/getAsyncRequestId.mjs +1 -1
- package/dist/brightData/serpApi/server/getAsyncResults.cjs +1 -1
- package/dist/brightData/serpApi/server/getAsyncResults.mjs +1 -1
- package/dist/googleCloud/bigquery/_shared/field/bqNullableString.cjs +11 -0
- package/dist/googleCloud/bigquery/_shared/field/bqNullableString.d.cts +9 -0
- package/dist/googleCloud/bigquery/_shared/field/bqNullableString.d.mts +9 -0
- package/dist/googleCloud/bigquery/_shared/field/bqNullableString.mjs +10 -0
- package/dist/googleCloud/bigquery/_shared/lookup/country.cjs +3 -2
- package/dist/googleCloud/bigquery/_shared/lookup/country.d.cts +2 -2
- package/dist/googleCloud/bigquery/_shared/lookup/country.d.mts +2 -2
- package/dist/googleCloud/bigquery/_shared/lookup/country.mjs +3 -2
- package/dist/googleCloud/bigquery/_shared/lookup/language.cjs +3 -2
- package/dist/googleCloud/bigquery/_shared/lookup/language.d.cts +2 -2
- package/dist/googleCloud/bigquery/_shared/lookup/language.d.mts +2 -2
- package/dist/googleCloud/bigquery/_shared/lookup/language.mjs +3 -2
- package/package.json +5 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require__class__shared_BaseNamespace = require("../../../_class/_shared/BaseNamespace.cjs");
|
|
3
3
|
const require_api__shared_ApiResponseClass = require("../../../api/_shared/ApiResponseClass.cjs");
|
|
4
|
-
require("../../../api/_shared/index.cjs");
|
|
5
4
|
const require_aws_server_isResponse200 = require("../../server/isResponse200.cjs");
|
|
5
|
+
require("../../../api/_shared/index.cjs");
|
|
6
6
|
//#region src/aws/lambda/server/AwsLambda.ts
|
|
7
7
|
var AwsLambda = class extends require__class__shared_BaseNamespace.BaseNamespace {
|
|
8
8
|
init = async (config, region) => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { BaseNamespace } from "../../../_class/_shared/BaseNamespace.mjs";
|
|
2
2
|
import { ApiResponseClass } from "../../../api/_shared/ApiResponseClass.mjs";
|
|
3
|
-
import "../../../api/_shared/index.mjs";
|
|
4
3
|
import { isResponse200 } from "../../server/isResponse200.mjs";
|
|
4
|
+
import "../../../api/_shared/index.mjs";
|
|
5
5
|
//#region src/aws/lambda/server/AwsLambda.ts
|
|
6
6
|
var AwsLambda = class extends BaseNamespace {
|
|
7
7
|
init = async (config, region) => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_api__shared_post = require("../../../api/_shared/post.cjs");
|
|
3
2
|
const require_brightData_server_brightData = require("../../server/brightData.cjs");
|
|
3
|
+
const require_api__shared_post = require("../../../api/_shared/post.cjs");
|
|
4
4
|
const require_brightData_serpApi_server_brightDataSerpApi = require("./brightDataSerpApi.cjs");
|
|
5
5
|
require("./index.cjs");
|
|
6
6
|
//#region src/brightData/serpApi/server/getAsyncRequestId.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { post } from "../../../api/_shared/post.mjs";
|
|
2
1
|
import { getCustomerId, getZone } from "../../server/brightData.mjs";
|
|
2
|
+
import { post } from "../../../api/_shared/post.mjs";
|
|
3
3
|
import { brightDataSerpApiType } from "./brightDataSerpApi.mjs";
|
|
4
4
|
import "./index.mjs";
|
|
5
5
|
//#region src/brightData/serpApi/server/getAsyncRequestId.ts
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_api__shared_ApiResponseClass = require("../../../api/_shared/ApiResponseClass.cjs");
|
|
3
3
|
const require_api__shared_get = require("../../../api/_shared/get.cjs");
|
|
4
|
-
require("../../../api/_shared/index.cjs");
|
|
5
4
|
const require_brightData_server_brightData = require("../../server/brightData.cjs");
|
|
5
|
+
require("../../../api/_shared/index.cjs");
|
|
6
6
|
//#region src/brightData/serpApi/server/getAsyncResults.ts
|
|
7
7
|
/**
|
|
8
8
|
* Using the request ID from getAsyncRequestId fetch to see if the data is available.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ApiResponseClass } from "../../../api/_shared/ApiResponseClass.mjs";
|
|
2
2
|
import { get } from "../../../api/_shared/get.mjs";
|
|
3
|
-
import "../../../api/_shared/index.mjs";
|
|
4
3
|
import { getCustomerId, getZone } from "../../server/brightData.mjs";
|
|
4
|
+
import "../../../api/_shared/index.mjs";
|
|
5
5
|
//#region src/brightData/serpApi/server/getAsyncResults.ts
|
|
6
6
|
/**
|
|
7
7
|
* Using the request ID from getAsyncRequestId fetch to see if the data is available.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
let zod = require("zod");
|
|
3
|
+
//#region src/googleCloud/bigquery/_shared/field/bqNullableString.ts
|
|
4
|
+
/**
|
|
5
|
+
* BigQuery's Node client returns small INT64 values as a native `number` and only falls back to
|
|
6
|
+
* `string` once precision would be lost - so an INT64/NUMERIC column stored as an id (e.g.
|
|
7
|
+
* google_ads_id) can't be trusted to always arrive as a string. Coerce defensively instead.
|
|
8
|
+
*/
|
|
9
|
+
const BQNullableStringCoerce = zod.z.preprocess((value) => null === value || void 0 === value ? null : String(value), zod.z.string().nullable());
|
|
10
|
+
//#endregion
|
|
11
|
+
exports.BQNullableStringCoerce = BQNullableStringCoerce;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
//#region src/googleCloud/bigquery/_shared/field/bqNullableString.d.ts
|
|
3
|
+
/**
|
|
4
|
+
* BigQuery's Node client returns small INT64 values as a native `number` and only falls back to
|
|
5
|
+
* `string` once precision would be lost - so an INT64/NUMERIC column stored as an id (e.g.
|
|
6
|
+
* google_ads_id) can't be trusted to always arrive as a string. Coerce defensively instead.
|
|
7
|
+
*/
|
|
8
|
+
export declare const BQNullableStringCoerce: z.ZodPreprocess<z.ZodNullable<z.ZodString>, unknown>;
|
|
9
|
+
//#endregion
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
//#region src/googleCloud/bigquery/_shared/field/bqNullableString.d.ts
|
|
3
|
+
/**
|
|
4
|
+
* BigQuery's Node client returns small INT64 values as a native `number` and only falls back to
|
|
5
|
+
* `string` once precision would be lost - so an INT64/NUMERIC column stored as an id (e.g.
|
|
6
|
+
* google_ads_id) can't be trusted to always arrive as a string. Coerce defensively instead.
|
|
7
|
+
*/
|
|
8
|
+
export declare const BQNullableStringCoerce: z.ZodPreprocess<z.ZodNullable<z.ZodString>, unknown>;
|
|
9
|
+
//#endregion
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
//#region src/googleCloud/bigquery/_shared/field/bqNullableString.ts
|
|
3
|
+
/**
|
|
4
|
+
* BigQuery's Node client returns small INT64 values as a native `number` and only falls back to
|
|
5
|
+
* `string` once precision would be lost - so an INT64/NUMERIC column stored as an id (e.g.
|
|
6
|
+
* google_ads_id) can't be trusted to always arrive as a string. Coerce defensively instead.
|
|
7
|
+
*/
|
|
8
|
+
const BQNullableStringCoerce = z.preprocess((value) => null === value || void 0 === value ? null : String(value), z.string().nullable());
|
|
9
|
+
//#endregion
|
|
10
|
+
export { BQNullableStringCoerce };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_googleCloud_bigquery__shared_field_bqDateTime = require("../field/bqDateTime.cjs");
|
|
3
|
+
const require_googleCloud_bigquery__shared_field_bqNullableString = require("../field/bqNullableString.cjs");
|
|
3
4
|
let zod = require("zod");
|
|
4
5
|
//#region src/googleCloud/bigquery/_shared/lookup/country.ts
|
|
5
6
|
/**
|
|
@@ -11,8 +12,8 @@ const countryBQRow = zod.z.object({
|
|
|
11
12
|
country: zod.z.string(),
|
|
12
13
|
alpha2: zod.z.string().nullable(),
|
|
13
14
|
alpha3: zod.z.string().nullable(),
|
|
14
|
-
google_ads_id:
|
|
15
|
-
meta_id:
|
|
15
|
+
google_ads_id: require_googleCloud_bigquery__shared_field_bqNullableString.BQNullableStringCoerce,
|
|
16
|
+
meta_id: require_googleCloud_bigquery__shared_field_bqNullableString.BQNullableStringCoerce,
|
|
16
17
|
inserted_at: require_googleCloud_bigquery__shared_field_bqDateTime.BQDateTime.transform(require_googleCloud_bigquery__shared_field_bqDateTime.decodeBQDateTime)
|
|
17
18
|
});
|
|
18
19
|
//#endregion
|
|
@@ -9,8 +9,8 @@ export declare const countryBQRow: z.ZodObject<{
|
|
|
9
9
|
country: z.ZodString;
|
|
10
10
|
alpha2: z.ZodNullable<z.ZodString>;
|
|
11
11
|
alpha3: z.ZodNullable<z.ZodString>;
|
|
12
|
-
google_ads_id: z.ZodNullable<z.ZodString>;
|
|
13
|
-
meta_id: z.ZodNullable<z.ZodString>;
|
|
12
|
+
google_ads_id: z.ZodPreprocess<z.ZodNullable<z.ZodString>, unknown>;
|
|
13
|
+
meta_id: z.ZodPreprocess<z.ZodNullable<z.ZodString>, unknown>;
|
|
14
14
|
inserted_at: z.ZodPipe<z.ZodObject<{
|
|
15
15
|
value: z.ZodISODateTime;
|
|
16
16
|
}, z.core.$strip>, z.ZodTransform<import("luxon").DateTime<boolean>, {
|
|
@@ -9,8 +9,8 @@ export declare const countryBQRow: z.ZodObject<{
|
|
|
9
9
|
country: z.ZodString;
|
|
10
10
|
alpha2: z.ZodNullable<z.ZodString>;
|
|
11
11
|
alpha3: z.ZodNullable<z.ZodString>;
|
|
12
|
-
google_ads_id: z.ZodNullable<z.ZodString>;
|
|
13
|
-
meta_id: z.ZodNullable<z.ZodString>;
|
|
12
|
+
google_ads_id: z.ZodPreprocess<z.ZodNullable<z.ZodString>, unknown>;
|
|
13
|
+
meta_id: z.ZodPreprocess<z.ZodNullable<z.ZodString>, unknown>;
|
|
14
14
|
inserted_at: z.ZodPipe<z.ZodObject<{
|
|
15
15
|
value: z.ZodISODateTime;
|
|
16
16
|
}, z.core.$strip>, z.ZodTransform<import("luxon").DateTime<boolean>, {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { BQDateTime, decodeBQDateTime } from "../field/bqDateTime.mjs";
|
|
2
|
+
import { BQNullableStringCoerce } from "../field/bqNullableString.mjs";
|
|
2
3
|
import { z } from "zod";
|
|
3
4
|
//#region src/googleCloud/bigquery/_shared/lookup/country.ts
|
|
4
5
|
/**
|
|
@@ -10,8 +11,8 @@ const countryBQRow = z.object({
|
|
|
10
11
|
country: z.string(),
|
|
11
12
|
alpha2: z.string().nullable(),
|
|
12
13
|
alpha3: z.string().nullable(),
|
|
13
|
-
google_ads_id:
|
|
14
|
-
meta_id:
|
|
14
|
+
google_ads_id: BQNullableStringCoerce,
|
|
15
|
+
meta_id: BQNullableStringCoerce,
|
|
15
16
|
inserted_at: BQDateTime.transform(decodeBQDateTime)
|
|
16
17
|
});
|
|
17
18
|
//#endregion
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_googleCloud_bigquery__shared_field_bqDateTime = require("../field/bqDateTime.cjs");
|
|
3
|
+
const require_googleCloud_bigquery__shared_field_bqNullableString = require("../field/bqNullableString.cjs");
|
|
3
4
|
let zod = require("zod");
|
|
4
5
|
//#region src/googleCloud/bigquery/_shared/lookup/language.ts
|
|
5
6
|
/**
|
|
@@ -10,8 +11,8 @@ let zod = require("zod");
|
|
|
10
11
|
const languageBQRow = zod.z.object({
|
|
11
12
|
language: zod.z.string(),
|
|
12
13
|
iso2: zod.z.string().nullable(),
|
|
13
|
-
google_ads_id:
|
|
14
|
-
meta_id:
|
|
14
|
+
google_ads_id: require_googleCloud_bigquery__shared_field_bqNullableString.BQNullableStringCoerce,
|
|
15
|
+
meta_id: require_googleCloud_bigquery__shared_field_bqNullableString.BQNullableStringCoerce,
|
|
15
16
|
inserted_at: require_googleCloud_bigquery__shared_field_bqDateTime.BQDateTime.transform(require_googleCloud_bigquery__shared_field_bqDateTime.decodeBQDateTime)
|
|
16
17
|
});
|
|
17
18
|
//#endregion
|
|
@@ -8,8 +8,8 @@ import { z } from "zod";
|
|
|
8
8
|
export declare const languageBQRow: z.ZodObject<{
|
|
9
9
|
language: z.ZodString;
|
|
10
10
|
iso2: z.ZodNullable<z.ZodString>;
|
|
11
|
-
google_ads_id: z.ZodNullable<z.ZodString>;
|
|
12
|
-
meta_id: z.ZodNullable<z.ZodString>;
|
|
11
|
+
google_ads_id: z.ZodPreprocess<z.ZodNullable<z.ZodString>, unknown>;
|
|
12
|
+
meta_id: z.ZodPreprocess<z.ZodNullable<z.ZodString>, unknown>;
|
|
13
13
|
inserted_at: z.ZodPipe<z.ZodObject<{
|
|
14
14
|
value: z.ZodISODateTime;
|
|
15
15
|
}, z.core.$strip>, z.ZodTransform<import("luxon").DateTime<boolean>, {
|
|
@@ -8,8 +8,8 @@ import { z } from "zod";
|
|
|
8
8
|
export declare const languageBQRow: z.ZodObject<{
|
|
9
9
|
language: z.ZodString;
|
|
10
10
|
iso2: z.ZodNullable<z.ZodString>;
|
|
11
|
-
google_ads_id: z.ZodNullable<z.ZodString>;
|
|
12
|
-
meta_id: z.ZodNullable<z.ZodString>;
|
|
11
|
+
google_ads_id: z.ZodPreprocess<z.ZodNullable<z.ZodString>, unknown>;
|
|
12
|
+
meta_id: z.ZodPreprocess<z.ZodNullable<z.ZodString>, unknown>;
|
|
13
13
|
inserted_at: z.ZodPipe<z.ZodObject<{
|
|
14
14
|
value: z.ZodISODateTime;
|
|
15
15
|
}, z.core.$strip>, z.ZodTransform<import("luxon").DateTime<boolean>, {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { BQDateTime, decodeBQDateTime } from "../field/bqDateTime.mjs";
|
|
2
|
+
import { BQNullableStringCoerce } from "../field/bqNullableString.mjs";
|
|
2
3
|
import { z } from "zod";
|
|
3
4
|
//#region src/googleCloud/bigquery/_shared/lookup/language.ts
|
|
4
5
|
/**
|
|
@@ -9,8 +10,8 @@ import { z } from "zod";
|
|
|
9
10
|
const languageBQRow = z.object({
|
|
10
11
|
language: z.string(),
|
|
11
12
|
iso2: z.string().nullable(),
|
|
12
|
-
google_ads_id:
|
|
13
|
-
meta_id:
|
|
13
|
+
google_ads_id: BQNullableStringCoerce,
|
|
14
|
+
meta_id: BQNullableStringCoerce,
|
|
14
15
|
inserted_at: BQDateTime.transform(decodeBQDateTime)
|
|
15
16
|
});
|
|
16
17
|
//#endregion
|
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.4",
|
|
5
5
|
"packageManager": "yarn@4.18.0",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -991,6 +991,10 @@
|
|
|
991
991
|
"import": "./dist/googleCloud/bigquery/_shared/field/bqInt64.mjs",
|
|
992
992
|
"require": "./dist/googleCloud/bigquery/_shared/field/bqInt64.cjs"
|
|
993
993
|
},
|
|
994
|
+
"./googleCloud/bigquery/_shared/field/bqNullableString": {
|
|
995
|
+
"import": "./dist/googleCloud/bigquery/_shared/field/bqNullableString.mjs",
|
|
996
|
+
"require": "./dist/googleCloud/bigquery/_shared/field/bqNullableString.cjs"
|
|
997
|
+
},
|
|
994
998
|
"./googleCloud/bigquery/_shared/field/bqNumeric": {
|
|
995
999
|
"import": "./dist/googleCloud/bigquery/_shared/field/bqNumeric.mjs",
|
|
996
1000
|
"require": "./dist/googleCloud/bigquery/_shared/field/bqNumeric.cjs"
|