wapi-client 0.12.0-beta.0 → 0.12.0-beta.1

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.
@@ -76,7 +76,7 @@ var import_base_client = require('./base-client.cjs');
76
76
  var import_connection = require('./connection/connection.enums.cjs');
77
77
  var import__ = require('../index.cjs');
78
78
  var _a;
79
- var CLIENT_VERSION = (_a = '0.12.0-beta.0') != null ? _a : "";
79
+ var CLIENT_VERSION = (_a = '0.12.0-beta.1') != null ? _a : "";
80
80
  function createWsClient(opts, config) {
81
81
  const initialConnection = createConnection(opts, {
82
82
  timeout: config == null ? void 0 : config.connectingTimeout
@@ -48,7 +48,7 @@ import {
48
48
  } from "./connection/connection.enums";
49
49
  import { WapiClientType } from "../index";
50
50
  var _a;
51
- var CLIENT_VERSION = (_a = '0.12.0-beta.0') != null ? _a : "";
51
+ var CLIENT_VERSION = (_a = '0.12.0-beta.1') != null ? _a : "";
52
52
  function createWsClient(opts, config) {
53
53
  const initialConnection = createConnection(opts, {
54
54
  timeout: config == null ? void 0 : config.connectingTimeout
package/dist/client.cjs CHANGED
@@ -63,7 +63,7 @@ var import_api = require('./api/index.cjs');
63
63
  var import_errors = require('./lib/errors.cjs');
64
64
  var import_fns = require('./fns/index.cjs');
65
65
  var _a;
66
- var CLIENT_VERSION = (_a = '0.12.0-beta.0') != null ? _a : "";
66
+ var CLIENT_VERSION = (_a = '0.12.0-beta.1') != null ? _a : "";
67
67
  var Client = class {
68
68
  /**
69
69
  * @internal
package/dist/client.js CHANGED
@@ -44,7 +44,7 @@ import {
44
44
  import { ConfigError } from "./lib/errors";
45
45
  import { ClientFunctions } from "./fns";
46
46
  var _a;
47
- var CLIENT_VERSION = (_a = '0.12.0-beta.0') != null ? _a : "";
47
+ var CLIENT_VERSION = (_a = '0.12.0-beta.1') != null ? _a : "";
48
48
  var Client = class {
49
49
  /**
50
50
  * @internal
@@ -4077,7 +4077,14 @@ var MetadataSchema = z.record(
4077
4077
  z.boolean(),
4078
4078
  z.number(),
4079
4079
  z.null(),
4080
- z.lazy(() => MetadataSchema)
4080
+ z.lazy(() => MetadataSchema),
4081
+ z.union([
4082
+ z.string(),
4083
+ z.boolean(),
4084
+ z.number(),
4085
+ z.null(),
4086
+ z.lazy(() => MetadataSchema)
4087
+ ]).array()
4081
4088
  ])
4082
4089
  ).nullable().describe("Custom key/value object");
4083
4090
  var DatetimeSchema = z.union([
@@ -4005,7 +4005,14 @@ var MetadataSchema = z.record(
4005
4005
  z.boolean(),
4006
4006
  z.number(),
4007
4007
  z.null(),
4008
- z.lazy(() => MetadataSchema)
4008
+ z.lazy(() => MetadataSchema),
4009
+ z.union([
4010
+ z.string(),
4011
+ z.boolean(),
4012
+ z.number(),
4013
+ z.null(),
4014
+ z.lazy(() => MetadataSchema)
4015
+ ]).array()
4009
4016
  ])
4010
4017
  ).nullable().describe("Custom key/value object");
4011
4018
  var DatetimeSchema = z.union([
@@ -107,7 +107,14 @@ var MetadataSchema = import_zod.default.record(
107
107
  import_zod.default.boolean(),
108
108
  import_zod.default.number(),
109
109
  import_zod.default.null(),
110
- import_zod.default.lazy(() => MetadataSchema)
110
+ import_zod.default.lazy(() => MetadataSchema),
111
+ import_zod.default.union([
112
+ import_zod.default.string(),
113
+ import_zod.default.boolean(),
114
+ import_zod.default.number(),
115
+ import_zod.default.null(),
116
+ import_zod.default.lazy(() => MetadataSchema)
117
+ ]).array()
111
118
  ])
112
119
  ).nullable().describe("Custom key/value object");
113
120
  var DatetimeSchema = import_zod.default.union([
@@ -1,6 +1,6 @@
1
1
  import z from 'zod';
2
2
  export type Metadata = {
3
- [key: string]: string | boolean | number | null | Metadata;
3
+ [key: string]: string | boolean | number | null | Metadata | (string | boolean | number | null | Metadata)[];
4
4
  } | null;
5
5
  export declare const MetadataSchema: z.ZodType<Metadata>;
6
6
  export declare const DatetimeSchema: z.ZodUnion<[z.ZodString, z.ZodString, z.ZodString]>;
package/dist/db/consts.js CHANGED
@@ -25,7 +25,14 @@ var MetadataSchema = z.record(
25
25
  z.boolean(),
26
26
  z.number(),
27
27
  z.null(),
28
- z.lazy(() => MetadataSchema)
28
+ z.lazy(() => MetadataSchema),
29
+ z.union([
30
+ z.string(),
31
+ z.boolean(),
32
+ z.number(),
33
+ z.null(),
34
+ z.lazy(() => MetadataSchema)
35
+ ]).array()
29
36
  ])
30
37
  ).nullable().describe("Custom key/value object");
31
38
  var DatetimeSchema = z.union([
@@ -37,17 +37,20 @@ export declare const healthcheckFnOutputSchema: z.ZodObject<{
37
37
  database_size: z.ZodOptional<z.ZodString>;
38
38
  indexes_size: z.ZodOptional<z.ZodString>;
39
39
  connection_count: z.ZodOptional<z.ZodNumber>;
40
+ version: z.ZodOptional<z.ZodString>;
40
41
  }, "strip", z.ZodTypeAny, {
41
42
  status: "green" | "yellow" | "red";
42
43
  message?: string | undefined;
43
44
  database_size?: string | undefined;
44
45
  indexes_size?: string | undefined;
45
46
  connection_count?: number | undefined;
47
+ version?: string | undefined;
46
48
  }, {
47
49
  status: "green" | "yellow" | "red";
48
50
  message?: string | undefined;
49
51
  database_size?: string | undefined;
50
52
  indexes_size?: string | undefined;
51
53
  connection_count?: number | undefined;
54
+ version?: string | undefined;
52
55
  }>;
53
56
  export declare const config: {};
@@ -4053,10 +4053,10 @@ var z = /* @__PURE__ */ Object.freeze({
4053
4053
 
4054
4054
  // src/txs/consts.ts
4055
4055
  var iTxTrackingOptions = z.object({
4056
- tracking_id: z.string().max(32).describe("User provided id added to logs for debugging")
4056
+ tracking_id: z.string().max(64).describe("User provided id added to logs for debugging")
4057
4057
  }).describe("Tracking flags for input");
4058
4058
  var iTxGeneralOptions = iTxTrackingOptions.extend({
4059
- transaction_id: z.string().max(32).describe("Id of the transaction context to run the query in")
4059
+ transaction_id: z.string().max(64).describe("Id of the transaction context to run the query in")
4060
4060
  }).describe("Generic flags for input");
4061
4061
  var iTxLimitingOptions = z.object({
4062
4062
  limit: z.number().int().nonnegative().default(20).describe("Number of records to return"),
@@ -4000,10 +4000,10 @@ var z = /* @__PURE__ */ Object.freeze({
4000
4000
 
4001
4001
  // src/txs/consts.ts
4002
4002
  var iTxTrackingOptions = z.object({
4003
- tracking_id: z.string().max(32).describe("User provided id added to logs for debugging")
4003
+ tracking_id: z.string().max(64).describe("User provided id added to logs for debugging")
4004
4004
  }).describe("Tracking flags for input");
4005
4005
  var iTxGeneralOptions = iTxTrackingOptions.extend({
4006
- transaction_id: z.string().max(32).describe("Id of the transaction context to run the query in")
4006
+ transaction_id: z.string().max(64).describe("Id of the transaction context to run the query in")
4007
4007
  }).describe("Generic flags for input");
4008
4008
  var iTxLimitingOptions = z.object({
4009
4009
  limit: z.number().int().nonnegative().default(20).describe("Number of records to return"),
@@ -69,10 +69,10 @@ var import_consts = require('../db/consts.cjs');
69
69
  var import_ts_utils = require('../lib/ts-utils.cjs');
70
70
  var import_zod = __toESM(require("zod"), 1);
71
71
  var iTxTrackingOptions = import_zod.default.object({
72
- tracking_id: import_zod.default.string().max(32).describe("User provided id added to logs for debugging")
72
+ tracking_id: import_zod.default.string().max(64).describe("User provided id added to logs for debugging")
73
73
  }).describe("Tracking flags for input");
74
74
  var iTxGeneralOptions = iTxTrackingOptions.extend({
75
- transaction_id: import_zod.default.string().max(32).describe("Id of the transaction context to run the query in")
75
+ transaction_id: import_zod.default.string().max(64).describe("Id of the transaction context to run the query in")
76
76
  }).describe("Generic flags for input");
77
77
  var iTxLimitingOptions = import_zod.default.object({
78
78
  limit: import_zod.default.number().int().nonnegative().default(20).describe("Number of records to return"),
@@ -3,10 +3,10 @@ import { DatetimeSchema, DbFilterAllowedKeySchema } from "../db/consts";
3
3
  import { createEnumFromTuple } from "../lib/ts-utils";
4
4
  import z from "zod";
5
5
  var iTxTrackingOptions = z.object({
6
- tracking_id: z.string().max(32).describe("User provided id added to logs for debugging")
6
+ tracking_id: z.string().max(64).describe("User provided id added to logs for debugging")
7
7
  }).describe("Tracking flags for input");
8
8
  var iTxGeneralOptions = iTxTrackingOptions.extend({
9
- transaction_id: z.string().max(32).describe("Id of the transaction context to run the query in")
9
+ transaction_id: z.string().max(64).describe("Id of the transaction context to run the query in")
10
10
  }).describe("Generic flags for input");
11
11
  var iTxLimitingOptions = z.object({
12
12
  limit: z.number().int().nonnegative().default(20).describe("Number of records to return"),
@@ -4029,7 +4029,8 @@ var healthcheckTxOutputSchema = z.object({
4029
4029
  message: z.string().describe("Error message if some error occurred"),
4030
4030
  database_size: z.string().describe("Size of the database in MB"),
4031
4031
  indexes_size: z.string().describe("Size of all indexes of database in MB"),
4032
- connection_count: z.number().describe("Number of external connections to this database")
4032
+ connection_count: z.number().describe("Number of external connections to this database"),
4033
+ version: z.string().describe("Version the server is running")
4033
4034
  }).partial().required({
4034
4035
  status: true
4035
4036
  }).describe("Output of healthcheck");
@@ -4005,7 +4005,8 @@ var healthcheckTxOutputSchema = z.object({
4005
4005
  message: z.string().describe("Error message if some error occurred"),
4006
4006
  database_size: z.string().describe("Size of the database in MB"),
4007
4007
  indexes_size: z.string().describe("Size of all indexes of database in MB"),
4008
- connection_count: z.number().describe("Number of external connections to this database")
4008
+ connection_count: z.number().describe("Number of external connections to this database"),
4009
+ version: z.string().describe("Version the server is running")
4009
4010
  }).partial().required({
4010
4011
  status: true
4011
4012
  }).describe("Output of healthcheck");
@@ -45,7 +45,8 @@ var healthcheckTxOutputSchema = import_zod.default.object({
45
45
  message: import_zod.default.string().describe("Error message if some error occurred"),
46
46
  database_size: import_zod.default.string().describe("Size of the database in MB"),
47
47
  indexes_size: import_zod.default.string().describe("Size of all indexes of database in MB"),
48
- connection_count: import_zod.default.number().describe("Number of external connections to this database")
48
+ connection_count: import_zod.default.number().describe("Number of external connections to this database"),
49
+ version: import_zod.default.string().describe("Version the server is running")
49
50
  }).partial().required({
50
51
  status: true
51
52
  }).describe("Output of healthcheck");
@@ -37,16 +37,19 @@ export declare const healthcheckTxOutputSchema: z.ZodObject<{
37
37
  database_size: z.ZodOptional<z.ZodString>;
38
38
  indexes_size: z.ZodOptional<z.ZodString>;
39
39
  connection_count: z.ZodOptional<z.ZodNumber>;
40
+ version: z.ZodOptional<z.ZodString>;
40
41
  }, "strip", z.ZodTypeAny, {
41
42
  status: "green" | "yellow" | "red";
42
43
  message?: string | undefined;
43
44
  database_size?: string | undefined;
44
45
  indexes_size?: string | undefined;
45
46
  connection_count?: number | undefined;
47
+ version?: string | undefined;
46
48
  }, {
47
49
  status: "green" | "yellow" | "red";
48
50
  message?: string | undefined;
49
51
  database_size?: string | undefined;
50
52
  indexes_size?: string | undefined;
51
53
  connection_count?: number | undefined;
54
+ version?: string | undefined;
52
55
  }>;
@@ -10,7 +10,8 @@ var healthcheckTxOutputSchema = z.object({
10
10
  message: z.string().describe("Error message if some error occurred"),
11
11
  database_size: z.string().describe("Size of the database in MB"),
12
12
  indexes_size: z.string().describe("Size of all indexes of database in MB"),
13
- connection_count: z.number().describe("Number of external connections to this database")
13
+ connection_count: z.number().describe("Number of external connections to this database"),
14
+ version: z.string().describe("Version the server is running")
14
15
  }).partial().required({
15
16
  status: true
16
17
  }).describe("Output of healthcheck");
@@ -2589,8 +2589,8 @@ export declare const APIValidators: {
2589
2589
  tracking_id?: string | undefined;
2590
2590
  transaction_id?: string | undefined;
2591
2591
  } | undefined;
2592
- confirmation?: string | undefined;
2593
2592
  version?: string | undefined;
2593
+ confirmation?: string | undefined;
2594
2594
  }>;
2595
2595
  reverseTransfer: (input: unknown, options?: unknown, log?: import("../lib/validation").Logger) => import("../lib/validation").WithRequiredOptions<{
2596
2596
  transfer: {
@@ -27,15 +27,15 @@ export declare const resetDatabaseTxInputSchema: z.ZodObject<{
27
27
  tracking_id?: string | undefined;
28
28
  transaction_id?: string | undefined;
29
29
  } | undefined;
30
- confirmation?: string | undefined;
31
30
  version?: string | undefined;
31
+ confirmation?: string | undefined;
32
32
  }, {
33
33
  options?: {
34
34
  tracking_id?: string | undefined;
35
35
  transaction_id?: string | undefined;
36
36
  } | undefined;
37
- confirmation?: string | undefined;
38
37
  version?: string | undefined;
38
+ confirmation?: string | undefined;
39
39
  }>;
40
40
  export declare const resetDatabaseTxOutputSchema: z.ZodObject<{
41
41
  message: z.ZodOptional<z.ZodString>;
@@ -1843,7 +1843,7 @@ declare module 'wapi-client/lib/ts-utils' {
1843
1843
  declare module 'wapi-client/db/consts' {
1844
1844
  import z from 'zod';
1845
1845
  export type Metadata = {
1846
- [key: string]: string | boolean | number | null | Metadata;
1846
+ [key: string]: string | boolean | number | null | Metadata | (string | boolean | number | null | Metadata)[];
1847
1847
  } | null;
1848
1848
  export const MetadataSchema: z.ZodType<Metadata>;
1849
1849
  export const DatetimeSchema: z.ZodUnion<[z.ZodString, z.ZodString, z.ZodString]>;
@@ -37019,18 +37019,21 @@ declare module 'wapi-client/txs/healthcheck/healthcheck.schema.zod' {
37019
37019
  database_size: z.ZodOptional<z.ZodString>;
37020
37020
  indexes_size: z.ZodOptional<z.ZodString>;
37021
37021
  connection_count: z.ZodOptional<z.ZodNumber>;
37022
+ version: z.ZodOptional<z.ZodString>;
37022
37023
  }, 'strip', z.ZodTypeAny, {
37023
37024
  status: 'green' | 'yellow' | 'red';
37024
37025
  message?: string | undefined;
37025
37026
  database_size?: string | undefined;
37026
37027
  indexes_size?: string | undefined;
37027
37028
  connection_count?: number | undefined;
37029
+ version?: string | undefined;
37028
37030
  }, {
37029
37031
  status: 'green' | 'yellow' | 'red';
37030
37032
  message?: string | undefined;
37031
37033
  database_size?: string | undefined;
37032
37034
  indexes_size?: string | undefined;
37033
37035
  connection_count?: number | undefined;
37036
+ version?: string | undefined;
37034
37037
  }>;
37035
37038
  }
37036
37039
  declare module 'wapi-client/fns/healthcheck/healthcheck.schema.zod' {
@@ -37073,18 +37076,21 @@ declare module 'wapi-client/fns/healthcheck/healthcheck.schema.zod' {
37073
37076
  database_size: z.ZodOptional<z.ZodString>;
37074
37077
  indexes_size: z.ZodOptional<z.ZodString>;
37075
37078
  connection_count: z.ZodOptional<z.ZodNumber>;
37079
+ version: z.ZodOptional<z.ZodString>;
37076
37080
  }, 'strip', z.ZodTypeAny, {
37077
37081
  status: 'green' | 'yellow' | 'red';
37078
37082
  message?: string | undefined;
37079
37083
  database_size?: string | undefined;
37080
37084
  indexes_size?: string | undefined;
37081
37085
  connection_count?: number | undefined;
37086
+ version?: string | undefined;
37082
37087
  }, {
37083
37088
  status: 'green' | 'yellow' | 'red';
37084
37089
  message?: string | undefined;
37085
37090
  database_size?: string | undefined;
37086
37091
  indexes_size?: string | undefined;
37087
37092
  connection_count?: number | undefined;
37093
+ version?: string | undefined;
37088
37094
  }>;
37089
37095
  export const config: {};
37090
37096
  }
@@ -58003,15 +58009,15 @@ declare module 'wapi-client/txs/reset-database/reset-database.schema.zod' {
58003
58009
  tracking_id?: string | undefined;
58004
58010
  transaction_id?: string | undefined;
58005
58011
  } | undefined;
58006
- confirmation?: string | undefined;
58007
58012
  version?: string | undefined;
58013
+ confirmation?: string | undefined;
58008
58014
  }, {
58009
58015
  options?: {
58010
58016
  tracking_id?: string | undefined;
58011
58017
  transaction_id?: string | undefined;
58012
58018
  } | undefined;
58013
- confirmation?: string | undefined;
58014
58019
  version?: string | undefined;
58020
+ confirmation?: string | undefined;
58015
58021
  }>;
58016
58022
  export const resetDatabaseTxOutputSchema: z.ZodObject<{
58017
58023
  message: z.ZodOptional<z.ZodString>;
@@ -68065,8 +68071,8 @@ declare module 'wapi-client/txs/index' {
68065
68071
  tracking_id?: string | undefined;
68066
68072
  transaction_id?: string | undefined;
68067
68073
  } | undefined;
68068
- confirmation?: string | undefined;
68069
68074
  version?: string | undefined;
68075
+ confirmation?: string | undefined;
68070
68076
  }>;
68071
68077
  reverseTransfer: (input: unknown, options?: unknown, log?: import("wapi-client/lib/validation").Logger) => import("wapi-client/lib/validation").WithRequiredOptions<{
68072
68078
  transfer: {