@powerhousedao/powerhouse-vetra-packages 6.2.3-dev.10 → 6.2.3-dev.12
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/browser/assets/{entry-DvpdFGdw.js → entry-4ObkElbc.js} +2 -2
- package/dist/browser/assets/{projection-entry-QU4xTPM_.js → projection-entry-DRGRQCSu.js} +8 -8
- package/dist/browser/{button-CuO8Gh3v.js → button-sZQCXeCo.js} +131 -24
- package/dist/browser/button-sZQCXeCo.js.map +1 -0
- package/dist/browser/chunk-BVTlhY3a.js +24 -0
- package/dist/browser/{dist-BAJ5nRDl.js → dist-D3_ER0Dn.js} +2 -399
- package/dist/browser/dist-D3_ER0Dn.js.map +1 -0
- package/dist/browser/document-models/index.js +2 -1
- package/dist/browser/{documents-J_l59mSV.js → documents-C-lAnv6o.js} +604 -735
- package/dist/browser/documents-C-lAnv6o.js.map +1 -0
- package/dist/browser/editor-CQ4wUFK5.js +3679 -0
- package/dist/browser/editor-CQ4wUFK5.js.map +1 -0
- package/dist/browser/{editor-D_gIraSB.js → editor-DNV-46lY.js} +5 -5
- package/dist/browser/{editor-D_gIraSB.js.map → editor-DNV-46lY.js.map} +1 -1
- package/dist/browser/editors/document-model-editor/module.js +1 -1
- package/dist/browser/editors/generic-drive-explorer/index.js +13 -8
- package/dist/browser/editors/generic-drive-explorer/index.js.map +1 -1
- package/dist/browser/editors/generic-drive-explorer/module.js +1 -1
- package/dist/browser/folder-view-CzItU0hn.js +957 -0
- package/dist/browser/folder-view-CzItU0hn.js.map +1 -0
- package/dist/browser/{graphql-editor-C9wxFf0b.js → graphql-editor-DoXZvdNr.js} +7 -9
- package/dist/browser/{graphql-editor-C9wxFf0b.js.map → graphql-editor-DoXZvdNr.js.map} +1 -1
- package/dist/{node/hooks-D0DcS3MV.mjs → browser/hooks-Bh1JCohS.js} +2 -2
- package/dist/browser/{hooks-KKcNp2X0.js.map → hooks-Bh1JCohS.js.map} +1 -1
- package/dist/browser/index.js +120 -20
- package/dist/browser/index.js.map +1 -1
- package/dist/browser/{json-editor-BIGVi54h.js → json-editor-DBhkG5TF.js} +3 -4
- package/dist/browser/{json-editor-BIGVi54h.js.map → json-editor-DBhkG5TF.js.map} +1 -1
- package/dist/browser/{parser-CkF6Qt8V.js → parser-BBzK7bLd.js} +1 -1
- package/dist/browser/{parser-CkF6Qt8V.js.map → parser-BBzK7bLd.js.map} +1 -1
- package/dist/browser/{schema-context-ZyeclQwy.js → schema-context-p2bhyog_.js} +3 -3
- package/dist/browser/{schema-context-ZyeclQwy.js.map → schema-context-p2bhyog_.js.map} +1 -1
- package/dist/browser/src-CVV6HzQZ-D-OQvEkh.js +5151 -0
- package/dist/browser/src-CVV6HzQZ-D-OQvEkh.js.map +1 -0
- package/dist/browser/state-schemas-B47wHvDV.js +694 -0
- package/dist/browser/state-schemas-B47wHvDV.js.map +1 -0
- package/dist/browser/tslib.es6-CeIASJ2O.js +32 -0
- package/dist/browser/tslib.es6-CeIASJ2O.js.map +1 -0
- package/dist/node/{button-Da7CxMn7.mjs → button-5bnYEAVq.mjs} +130 -23
- package/dist/node/button-5bnYEAVq.mjs.map +1 -0
- package/dist/node/chunk-17FXJ3dL.mjs +31 -0
- package/dist/node/{dist-CzYOpeXN.mjs → dist-Bf_PIbO7.mjs} +2 -399
- package/dist/node/dist-Bf_PIbO7.mjs.map +1 -0
- package/dist/node/document-models/index.mjs +2 -1
- package/dist/node/documents-XAQfHX5Q.mjs +17 -0
- package/dist/node/documents-XAQfHX5Q.mjs.map +1 -0
- package/dist/node/editor-BiiLqEe9.mjs +3679 -0
- package/dist/node/editor-BiiLqEe9.mjs.map +1 -0
- package/dist/node/{editor-CJSAZpIG.mjs → editor-Cp2TC5MJ.mjs} +5 -5
- package/dist/node/{editor-CJSAZpIG.mjs.map → editor-Cp2TC5MJ.mjs.map} +1 -1
- package/dist/node/editors/document-model-editor/module.mjs +1 -1
- package/dist/node/editors/generic-drive-explorer/index.mjs +4 -5
- package/dist/node/editors/generic-drive-explorer/index.mjs.map +1 -1
- package/dist/node/editors/generic-drive-explorer/module.mjs +1 -1
- package/dist/node/folder-view-m_rH84Nz.mjs +962 -0
- package/dist/node/folder-view-m_rH84Nz.mjs.map +1 -0
- package/dist/node/{graphql-BfAoPeWM.mjs → graphql-BvV3tC1U.mjs} +2 -2
- package/dist/node/{graphql-BfAoPeWM.mjs.map → graphql-BvV3tC1U.mjs.map} +1 -1
- package/dist/node/{graphql-editor-CnK5kIk9.mjs → graphql-editor-BhF6KN6y.mjs} +6 -7
- package/dist/node/{graphql-editor-CnK5kIk9.mjs.map → graphql-editor-BhF6KN6y.mjs.map} +1 -1
- package/dist/{browser/hooks-KKcNp2X0.js → node/hooks-Di3FASx-.mjs} +2 -2
- package/dist/node/{hooks-D0DcS3MV.mjs.map → hooks-Di3FASx-.mjs.map} +1 -1
- package/dist/node/index.mjs +142 -21
- package/dist/node/index.mjs.map +1 -1
- package/dist/node/{json-editor-j8_JGfcP.mjs → json-editor-Cqc0zuz0.mjs} +3 -4
- package/dist/node/{json-editor-j8_JGfcP.mjs.map → json-editor-Cqc0zuz0.mjs.map} +1 -1
- package/dist/node/{schema-context-DL8jhi_d.mjs → schema-context-mHmP3Cl6.mjs} +3 -3
- package/dist/node/{schema-context-DL8jhi_d.mjs.map → schema-context-mHmP3Cl6.mjs.map} +1 -1
- package/dist/node/{connect-D3-HufsW.mjs → src-CVV6HzQZ-CvqjXbXk.mjs} +1829 -11022
- package/dist/node/src-CVV6HzQZ-CvqjXbXk.mjs.map +1 -0
- package/dist/node/state-schemas-DXG02fMh.mjs +695 -0
- package/dist/node/state-schemas-DXG02fMh.mjs.map +1 -0
- package/dist/node/{main-7sul-YJl.mjs → tslib.es6-DdiHgz9e.mjs} +3 -203
- package/dist/node/tslib.es6-DdiHgz9e.mjs.map +1 -0
- package/package.json +7 -7
- package/dist/browser/button-CuO8Gh3v.js.map +0 -1
- package/dist/browser/connect-kwnl2v6o.js +0 -14328
- package/dist/browser/connect-kwnl2v6o.js.map +0 -1
- package/dist/browser/dist-B4FWbuEM.js +0 -4148
- package/dist/browser/dist-B4FWbuEM.js.map +0 -1
- package/dist/browser/dist-BAJ5nRDl.js.map +0 -1
- package/dist/browser/dist-D0tSbK8B.js +0 -4721
- package/dist/browser/dist-D0tSbK8B.js.map +0 -1
- package/dist/browser/document-drive-fcQ4o8i3.js +0 -8320
- package/dist/browser/document-drive-fcQ4o8i3.js.map +0 -1
- package/dist/browser/documents-J_l59mSV.js.map +0 -1
- package/dist/browser/editor-CbJkIqg_.js +0 -1809
- package/dist/browser/editor-CbJkIqg_.js.map +0 -1
- package/dist/browser/folder-view-CGcqEbak.js +0 -232
- package/dist/browser/folder-view-CGcqEbak.js.map +0 -1
- package/dist/browser/lib-BWPfFpyy.js +0 -209
- package/dist/browser/lib-BWPfFpyy.js.map +0 -1
- package/dist/browser/printer-CEYr4JOg.js +0 -604
- package/dist/browser/printer-CEYr4JOg.js.map +0 -1
- package/dist/browser/state-schemas-C9Nb7S5z.js +0 -298
- package/dist/browser/state-schemas-C9Nb7S5z.js.map +0 -1
- package/dist/node/button-Da7CxMn7.mjs.map +0 -1
- package/dist/node/connect-D3-HufsW.mjs.map +0 -1
- package/dist/node/dist-CzYOpeXN.mjs.map +0 -1
- package/dist/node/dist-D5Xp9PwJ.mjs +0 -4729
- package/dist/node/dist-D5Xp9PwJ.mjs.map +0 -1
- package/dist/node/dist-DT7jI9ol.mjs +0 -4148
- package/dist/node/dist-DT7jI9ol.mjs.map +0 -1
- package/dist/node/document-drive-DuGBBYw5.mjs +0 -8337
- package/dist/node/document-drive-DuGBBYw5.mjs.map +0 -1
- package/dist/node/documents-DCf53bzO.mjs +0 -747
- package/dist/node/documents-DCf53bzO.mjs.map +0 -1
- package/dist/node/editor-D8SL0ydm.mjs +0 -1809
- package/dist/node/editor-D8SL0ydm.mjs.map +0 -1
- package/dist/node/folder-view-ChtWc33j.mjs +0 -232
- package/dist/node/folder-view-ChtWc33j.mjs.map +0 -1
- package/dist/node/main-7sul-YJl.mjs.map +0 -1
- package/dist/node/state-schemas-DURvYjxG.mjs +0 -299
- package/dist/node/state-schemas-DURvYjxG.mjs.map +0 -1
|
@@ -1,747 +0,0 @@
|
|
|
1
|
-
import { C as datetime, d as email, h as object, k as __exportAll, m as number, v as string, x as url } from "./dist-DT7jI9ol.mjs";
|
|
2
|
-
import { t as require_graphql } from "./graphql-BfAoPeWM.mjs";
|
|
3
|
-
//#region ../../node_modules/.pnpm/@powerhousedao+document-engineering@1.40.5_@types+express@4.17.25_@types+react-dom@19.2_75e28b6ec666f63b132a491ff3a6fdf7/node_modules/@powerhousedao/document-engineering/dist/src/scalars/graphql/Amount.js
|
|
4
|
-
var Amount_exports = /* @__PURE__ */ __exportAll({
|
|
5
|
-
config: () => config$16,
|
|
6
|
-
scalar: () => scalar$16,
|
|
7
|
-
schema: () => schema$15,
|
|
8
|
-
stringSchema: () => stringSchema$16,
|
|
9
|
-
type: () => type$16,
|
|
10
|
-
typedef: () => typedef$16
|
|
11
|
-
});
|
|
12
|
-
var import_graphql = require_graphql();
|
|
13
|
-
const type$16 = "{ unit?: string, value?: number }";
|
|
14
|
-
const typedef$16 = "scalar Amount";
|
|
15
|
-
const schema$15 = object({
|
|
16
|
-
unit: string().optional(),
|
|
17
|
-
value: number().finite()
|
|
18
|
-
});
|
|
19
|
-
const stringSchema$16 = "z.object({ unit: z.string().optional(), value: z.number().finite() })";
|
|
20
|
-
const amountValidation = (value) => {
|
|
21
|
-
if (typeof value !== "object" || !value) throw new import_graphql.GraphQLError(`Invalid Amount value: ${JSON.stringify(value)}`);
|
|
22
|
-
const result = schema$15.safeParse(value);
|
|
23
|
-
if (result.success) return result.data;
|
|
24
|
-
throw new import_graphql.GraphQLError(result.error.message);
|
|
25
|
-
};
|
|
26
|
-
const config$16 = {
|
|
27
|
-
name: "Amount",
|
|
28
|
-
description: "A custom scalar that represents a currency amount with its currency type",
|
|
29
|
-
serialize: amountValidation,
|
|
30
|
-
parseValue: amountValidation,
|
|
31
|
-
parseLiteral: (ast) => {
|
|
32
|
-
if (ast.kind !== import_graphql.Kind.OBJECT) throw new import_graphql.GraphQLError("Value must be an object", { nodes: ast });
|
|
33
|
-
const unitField = ast.fields.find((f) => f.name.value === "unit");
|
|
34
|
-
const valueField = ast.fields.find((f) => f.name.value === "value");
|
|
35
|
-
if (unitField && unitField.value.kind !== import_graphql.Kind.STRING) throw new import_graphql.GraphQLError("unit must be a valid string value", { nodes: ast });
|
|
36
|
-
if (!valueField || valueField.value.kind !== import_graphql.Kind.FLOAT) throw new import_graphql.GraphQLError("value must be a valid float value", { nodes: ast });
|
|
37
|
-
return amountValidation({
|
|
38
|
-
unit: unitField?.value?.value,
|
|
39
|
-
value: parseFloat(valueField.value.value)
|
|
40
|
-
});
|
|
41
|
-
}
|
|
42
|
-
};
|
|
43
|
-
const scalar$16 = new import_graphql.GraphQLScalarType(config$16);
|
|
44
|
-
//#endregion
|
|
45
|
-
//#region ../../node_modules/.pnpm/@powerhousedao+document-engineering@1.40.5_@types+express@4.17.25_@types+react-dom@19.2_75e28b6ec666f63b132a491ff3a6fdf7/node_modules/@powerhousedao/document-engineering/dist/src/scalars/graphql/AmountCrypto.js
|
|
46
|
-
var AmountCrypto_exports = /* @__PURE__ */ __exportAll({
|
|
47
|
-
NUMERIC_VALUE_REGEX: () => NUMERIC_VALUE_REGEX$1,
|
|
48
|
-
config: () => config$15,
|
|
49
|
-
scalar: () => scalar$15,
|
|
50
|
-
schema: () => schema$14,
|
|
51
|
-
stringSchema: () => stringSchema$15,
|
|
52
|
-
type: () => type$15,
|
|
53
|
-
typedef: () => typedef$15
|
|
54
|
-
});
|
|
55
|
-
const NUMERIC_VALUE_REGEX$1 = /^\d+(\.\d+)?$/;
|
|
56
|
-
const type$15 = "{ unit: string, value: string }";
|
|
57
|
-
const typedef$15 = "scalar Amount_Crypto";
|
|
58
|
-
const schema$14 = object({
|
|
59
|
-
unit: string(),
|
|
60
|
-
value: string()
|
|
61
|
-
});
|
|
62
|
-
const stringSchema$15 = "z.object({ unit: z.string(), value: z.string() })";
|
|
63
|
-
const amountCryptoValidation = (value) => {
|
|
64
|
-
if (typeof value !== "object" || !value) throw new import_graphql.GraphQLError(`Invalid Amount Crypto value: ${JSON.stringify(value)}`);
|
|
65
|
-
const result = schema$14.safeParse(value);
|
|
66
|
-
if (result.success) return result.data;
|
|
67
|
-
throw new import_graphql.GraphQLError(result.error.message);
|
|
68
|
-
};
|
|
69
|
-
const config$15 = {
|
|
70
|
-
name: "Amount_Crypto",
|
|
71
|
-
description: "A custom scalar that represents a cryptocurrency amount with its currency type",
|
|
72
|
-
serialize: amountCryptoValidation,
|
|
73
|
-
parseValue: amountCryptoValidation,
|
|
74
|
-
parseLiteral: (ast) => {
|
|
75
|
-
if (ast.kind !== import_graphql.Kind.OBJECT) throw new import_graphql.GraphQLError("Value must be an object", { nodes: ast });
|
|
76
|
-
const unitField = ast.fields.find((f) => f.name.value === "unit");
|
|
77
|
-
const valueField = ast.fields.find((f) => f.name.value === "value");
|
|
78
|
-
if (!unitField || unitField.value.kind !== import_graphql.Kind.STRING) throw new import_graphql.GraphQLError("unit must be a valid string value", { nodes: ast });
|
|
79
|
-
if (!valueField || valueField.value.kind !== import_graphql.Kind.STRING) throw new import_graphql.GraphQLError("value must be a valid string value", { nodes: ast });
|
|
80
|
-
if (!NUMERIC_VALUE_REGEX$1.test(valueField.value.value)) throw new import_graphql.GraphQLError("value must be a valid numeric string (e.g., \"123\" or \"123.45\")", { nodes: ast });
|
|
81
|
-
return amountCryptoValidation({
|
|
82
|
-
unit: unitField.value.value,
|
|
83
|
-
value: valueField.value.value
|
|
84
|
-
});
|
|
85
|
-
}
|
|
86
|
-
};
|
|
87
|
-
const scalar$15 = new import_graphql.GraphQLScalarType(config$15);
|
|
88
|
-
//#endregion
|
|
89
|
-
//#region ../../node_modules/.pnpm/@powerhousedao+document-engineering@1.40.5_@types+express@4.17.25_@types+react-dom@19.2_75e28b6ec666f63b132a491ff3a6fdf7/node_modules/@powerhousedao/document-engineering/dist/src/scalars/graphql/AmountCurrency.js
|
|
90
|
-
var AmountCurrency_exports = /* @__PURE__ */ __exportAll({
|
|
91
|
-
NUMERIC_VALUE_REGEX: () => NUMERIC_VALUE_REGEX,
|
|
92
|
-
config: () => config$14,
|
|
93
|
-
scalar: () => scalar$14,
|
|
94
|
-
schema: () => schema$13,
|
|
95
|
-
stringSchema: () => stringSchema$14,
|
|
96
|
-
type: () => type$14,
|
|
97
|
-
typedef: () => typedef$14
|
|
98
|
-
});
|
|
99
|
-
const NUMERIC_VALUE_REGEX = /^\d+(\.\d+)?$/;
|
|
100
|
-
const type$14 = "{ unit: string, value: string }";
|
|
101
|
-
const typedef$14 = "scalar Amount_Currency";
|
|
102
|
-
const schema$13 = object({
|
|
103
|
-
unit: string(),
|
|
104
|
-
value: string()
|
|
105
|
-
});
|
|
106
|
-
const stringSchema$14 = "z.object({ unit: z.string(), value: z.string()})";
|
|
107
|
-
const amountCurrencyValidation = (value) => {
|
|
108
|
-
if (typeof value !== "object" || !value) throw new import_graphql.GraphQLError(`Invalid Amount Currency value: ${JSON.stringify(value)}`);
|
|
109
|
-
const result = schema$13.safeParse(value);
|
|
110
|
-
if (result.success) return result.data;
|
|
111
|
-
throw new import_graphql.GraphQLError(result.error.message);
|
|
112
|
-
};
|
|
113
|
-
const config$14 = {
|
|
114
|
-
name: "Amount_Currency",
|
|
115
|
-
description: "A custom scalar that represents a currency amount with its currency type",
|
|
116
|
-
serialize: amountCurrencyValidation,
|
|
117
|
-
parseValue: amountCurrencyValidation,
|
|
118
|
-
parseLiteral: (ast) => {
|
|
119
|
-
if (ast.kind !== import_graphql.Kind.OBJECT) throw new import_graphql.GraphQLError("Value must be an object", { nodes: ast });
|
|
120
|
-
const unitField = ast.fields.find((f) => f.name.value === "unit");
|
|
121
|
-
const valueField = ast.fields.find((f) => f.name.value === "value");
|
|
122
|
-
if (!unitField || unitField.value.kind !== import_graphql.Kind.STRING) throw new import_graphql.GraphQLError("unit must be a valid string value", { nodes: ast });
|
|
123
|
-
if (!valueField || valueField.value.kind !== import_graphql.Kind.STRING) throw new import_graphql.GraphQLError("value must be a valid string value", { nodes: ast });
|
|
124
|
-
if (!NUMERIC_VALUE_REGEX.test(valueField.value.value)) throw new import_graphql.GraphQLError("value must be a valid numeric string (e.g., \"123\" or \"123.45\")", { nodes: ast });
|
|
125
|
-
return amountCurrencyValidation({
|
|
126
|
-
unit: unitField.value.value,
|
|
127
|
-
value: valueField.value.value
|
|
128
|
-
});
|
|
129
|
-
}
|
|
130
|
-
};
|
|
131
|
-
const scalar$14 = new import_graphql.GraphQLScalarType(config$14);
|
|
132
|
-
//#endregion
|
|
133
|
-
//#region ../../node_modules/.pnpm/@powerhousedao+document-engineering@1.40.5_@types+express@4.17.25_@types+react-dom@19.2_75e28b6ec666f63b132a491ff3a6fdf7/node_modules/@powerhousedao/document-engineering/dist/src/scalars/graphql/AmountFiat.js
|
|
134
|
-
var AmountFiat_exports = /* @__PURE__ */ __exportAll({
|
|
135
|
-
config: () => config$13,
|
|
136
|
-
scalar: () => scalar$13,
|
|
137
|
-
schema: () => schema$12,
|
|
138
|
-
stringSchema: () => stringSchema$13,
|
|
139
|
-
type: () => type$13,
|
|
140
|
-
typedef: () => typedef$13
|
|
141
|
-
});
|
|
142
|
-
const type$13 = "{ unit: string, value: number }";
|
|
143
|
-
const typedef$13 = "scalar Amount_Fiat";
|
|
144
|
-
const schema$12 = object({
|
|
145
|
-
unit: string(),
|
|
146
|
-
value: number().finite()
|
|
147
|
-
});
|
|
148
|
-
const stringSchema$13 = "z.object({ unit: z.string(), value: z.number().finite() })";
|
|
149
|
-
const amountFiatValidation = (value) => {
|
|
150
|
-
if (typeof value !== "object" || !value) throw new import_graphql.GraphQLError(`Invalid Amount Fiat value: ${JSON.stringify(value)}`);
|
|
151
|
-
const result = schema$12.safeParse(value);
|
|
152
|
-
if (result.success) return result.data;
|
|
153
|
-
throw new import_graphql.GraphQLError(result.error.message);
|
|
154
|
-
};
|
|
155
|
-
const config$13 = {
|
|
156
|
-
name: "Amount_Fiat",
|
|
157
|
-
description: "A custom scalar that represents a currency amount with its currency type",
|
|
158
|
-
serialize: amountFiatValidation,
|
|
159
|
-
parseValue: amountFiatValidation,
|
|
160
|
-
parseLiteral: (ast) => {
|
|
161
|
-
if (ast.kind !== import_graphql.Kind.OBJECT) throw new import_graphql.GraphQLError("Value must be an object", { nodes: ast });
|
|
162
|
-
const unitField = ast.fields.find((f) => f.name.value === "unit");
|
|
163
|
-
const valueField = ast.fields.find((f) => f.name.value === "value");
|
|
164
|
-
if (!unitField || unitField.value.kind !== import_graphql.Kind.STRING) throw new import_graphql.GraphQLError("unit must be a valid string value", { nodes: ast });
|
|
165
|
-
if (!valueField || valueField.value.kind !== import_graphql.Kind.FLOAT) throw new import_graphql.GraphQLError("value must be a valid float value", { nodes: ast });
|
|
166
|
-
return amountFiatValidation({
|
|
167
|
-
unit: unitField.value.value,
|
|
168
|
-
value: parseFloat(valueField.value.value)
|
|
169
|
-
});
|
|
170
|
-
}
|
|
171
|
-
};
|
|
172
|
-
const scalar$13 = new import_graphql.GraphQLScalarType(config$13);
|
|
173
|
-
//#endregion
|
|
174
|
-
//#region ../../node_modules/.pnpm/@powerhousedao+document-engineering@1.40.5_@types+express@4.17.25_@types+react-dom@19.2_75e28b6ec666f63b132a491ff3a6fdf7/node_modules/@powerhousedao/document-engineering/dist/src/scalars/graphql/AmountMoney.js
|
|
175
|
-
var AmountMoney_exports = /* @__PURE__ */ __exportAll({
|
|
176
|
-
config: () => config$12,
|
|
177
|
-
scalar: () => scalar$12,
|
|
178
|
-
schema: () => schema$11,
|
|
179
|
-
stringSchema: () => stringSchema$12,
|
|
180
|
-
type: () => type$12,
|
|
181
|
-
typedef: () => typedef$12
|
|
182
|
-
});
|
|
183
|
-
const type$12 = "number";
|
|
184
|
-
const typedef$12 = "scalar Amount_Money";
|
|
185
|
-
const schema$11 = number();
|
|
186
|
-
const stringSchema$12 = "z.number()";
|
|
187
|
-
const amountMoneyValidation = (value) => {
|
|
188
|
-
if (typeof value !== "number") throw new import_graphql.GraphQLError(`Value is not number: ${JSON.stringify(value)}`);
|
|
189
|
-
if (!Number.isFinite(value)) throw new import_graphql.GraphQLError(`Value is not a finite number: ${value}`);
|
|
190
|
-
const result = schema$11.safeParse(value);
|
|
191
|
-
if (result.success) return result.data;
|
|
192
|
-
throw new import_graphql.GraphQLError(result.error.message);
|
|
193
|
-
};
|
|
194
|
-
const config$12 = {
|
|
195
|
-
name: "Amount_Money",
|
|
196
|
-
description: "A custom scalar that represents a monetary amount in a currency",
|
|
197
|
-
serialize: amountMoneyValidation,
|
|
198
|
-
parseValue: amountMoneyValidation,
|
|
199
|
-
parseLiteral: (value) => {
|
|
200
|
-
if (value.kind !== import_graphql.Kind.FLOAT) throw new import_graphql.GraphQLError("Value is not a float type", { nodes: value });
|
|
201
|
-
return amountMoneyValidation(parseFloat(value.value));
|
|
202
|
-
}
|
|
203
|
-
};
|
|
204
|
-
const scalar$12 = new import_graphql.GraphQLScalarType(config$12);
|
|
205
|
-
//#endregion
|
|
206
|
-
//#region ../../node_modules/.pnpm/@powerhousedao+document-engineering@1.40.5_@types+express@4.17.25_@types+react-dom@19.2_75e28b6ec666f63b132a491ff3a6fdf7/node_modules/@powerhousedao/document-engineering/dist/src/scalars/graphql/AmountPercentage.js
|
|
207
|
-
var AmountPercentage_exports = /* @__PURE__ */ __exportAll({
|
|
208
|
-
config: () => config$11,
|
|
209
|
-
scalar: () => scalar$11,
|
|
210
|
-
schema: () => schema$10,
|
|
211
|
-
stringSchema: () => stringSchema$11,
|
|
212
|
-
type: () => type$11,
|
|
213
|
-
typedef: () => typedef$11
|
|
214
|
-
});
|
|
215
|
-
const type$11 = "number";
|
|
216
|
-
const typedef$11 = "scalar Amount_Percentage";
|
|
217
|
-
const schema$10 = number();
|
|
218
|
-
const stringSchema$11 = "z.number()";
|
|
219
|
-
const amountPercentageValidation = (value) => {
|
|
220
|
-
if (typeof value !== "number") throw new import_graphql.GraphQLError(`Value is not number: ${JSON.stringify(value)}`);
|
|
221
|
-
if (!Number.isFinite(value)) throw new import_graphql.GraphQLError(`Value is not a finite number: ${value}`);
|
|
222
|
-
const result = schema$10.safeParse(value);
|
|
223
|
-
if (result.success) return result.data;
|
|
224
|
-
throw new import_graphql.GraphQLError(result.error.message);
|
|
225
|
-
};
|
|
226
|
-
const config$11 = {
|
|
227
|
-
name: "Amount_Percentage",
|
|
228
|
-
description: "",
|
|
229
|
-
serialize: amountPercentageValidation,
|
|
230
|
-
parseValue: amountPercentageValidation,
|
|
231
|
-
parseLiteral: (value) => {
|
|
232
|
-
if (value.kind !== import_graphql.Kind.FLOAT) throw new import_graphql.GraphQLError("some error message", { nodes: value });
|
|
233
|
-
return amountPercentageValidation(parseFloat(value.value));
|
|
234
|
-
}
|
|
235
|
-
};
|
|
236
|
-
const scalar$11 = new import_graphql.GraphQLScalarType(config$11);
|
|
237
|
-
//#endregion
|
|
238
|
-
//#region ../../node_modules/.pnpm/@powerhousedao+document-engineering@1.40.5_@types+express@4.17.25_@types+react-dom@19.2_75e28b6ec666f63b132a491ff3a6fdf7/node_modules/@powerhousedao/document-engineering/dist/src/scalars/graphql/AmountTokens.js
|
|
239
|
-
var AmountTokens_exports = /* @__PURE__ */ __exportAll({
|
|
240
|
-
config: () => config$10,
|
|
241
|
-
scalar: () => scalar$10,
|
|
242
|
-
schema: () => schema$9,
|
|
243
|
-
stringSchema: () => stringSchema$10,
|
|
244
|
-
type: () => type$10,
|
|
245
|
-
typedef: () => typedef$10
|
|
246
|
-
});
|
|
247
|
-
const type$10 = "number";
|
|
248
|
-
const typedef$10 = "scalar Amount_Tokens";
|
|
249
|
-
const schema$9 = number();
|
|
250
|
-
const stringSchema$10 = "z.number()";
|
|
251
|
-
const amountTokensValidation = (value) => {
|
|
252
|
-
if (typeof value !== "number") throw new import_graphql.GraphQLError(`Value is not number: ${JSON.stringify(value)}`);
|
|
253
|
-
if (!Number.isFinite(value)) throw new import_graphql.GraphQLError(`Value is not a finite number: ${value}`);
|
|
254
|
-
const result = schema$9.safeParse(value);
|
|
255
|
-
if (result.success) return result.data;
|
|
256
|
-
throw new import_graphql.GraphQLError(result.error.message);
|
|
257
|
-
};
|
|
258
|
-
const config$10 = {
|
|
259
|
-
name: "Amount_Tokens",
|
|
260
|
-
description: "A custom scalar that represents an amount of tokens",
|
|
261
|
-
serialize: amountTokensValidation,
|
|
262
|
-
parseValue: amountTokensValidation,
|
|
263
|
-
parseLiteral: (value) => {
|
|
264
|
-
if (value.kind !== import_graphql.Kind.FLOAT) throw new import_graphql.GraphQLError("some error message", { nodes: value });
|
|
265
|
-
return amountTokensValidation(parseFloat(value.value));
|
|
266
|
-
}
|
|
267
|
-
};
|
|
268
|
-
const scalar$10 = new import_graphql.GraphQLScalarType(config$10);
|
|
269
|
-
//#endregion
|
|
270
|
-
//#region ../../node_modules/.pnpm/@powerhousedao+document-engineering@1.40.5_@types+express@4.17.25_@types+react-dom@19.2_75e28b6ec666f63b132a491ff3a6fdf7/node_modules/@powerhousedao/document-engineering/dist/src/scalars/graphql/Currency.js
|
|
271
|
-
var Currency_exports = /* @__PURE__ */ __exportAll({
|
|
272
|
-
config: () => config$9,
|
|
273
|
-
scalar: () => scalar$9,
|
|
274
|
-
schema: () => schema$8,
|
|
275
|
-
stringSchema: () => stringSchema$9,
|
|
276
|
-
type: () => type$9,
|
|
277
|
-
typedef: () => typedef$9
|
|
278
|
-
});
|
|
279
|
-
const type$9 = "string";
|
|
280
|
-
const typedef$9 = "scalar Currency";
|
|
281
|
-
const schema$8 = string();
|
|
282
|
-
const stringSchema$9 = "z.string()";
|
|
283
|
-
const currencyValidation = (value) => {
|
|
284
|
-
if (typeof value !== "string") throw new import_graphql.GraphQLError(`Value is not string: ${JSON.stringify(value)}`);
|
|
285
|
-
const result = schema$8.safeParse(value);
|
|
286
|
-
if (result.success) return result.data;
|
|
287
|
-
throw new import_graphql.GraphQLError(result.error.message);
|
|
288
|
-
};
|
|
289
|
-
const config$9 = {
|
|
290
|
-
name: "Currency",
|
|
291
|
-
description: "A custom scalar that represents a Currency Code string",
|
|
292
|
-
serialize: currencyValidation,
|
|
293
|
-
parseValue: currencyValidation,
|
|
294
|
-
parseLiteral: (value) => {
|
|
295
|
-
if (value.kind !== import_graphql.Kind.STRING) throw new import_graphql.GraphQLError(`Value is not a valid string: ${value.kind}`, { nodes: value });
|
|
296
|
-
return currencyValidation(value.value);
|
|
297
|
-
}
|
|
298
|
-
};
|
|
299
|
-
const scalar$9 = new import_graphql.GraphQLScalarType(config$9);
|
|
300
|
-
//#endregion
|
|
301
|
-
//#region ../../node_modules/.pnpm/@powerhousedao+document-engineering@1.40.5_@types+express@4.17.25_@types+react-dom@19.2_75e28b6ec666f63b132a491ff3a6fdf7/node_modules/@powerhousedao/document-engineering/dist/src/scalars/graphql/Date.js
|
|
302
|
-
var Date_exports = /* @__PURE__ */ __exportAll({
|
|
303
|
-
config: () => config$8,
|
|
304
|
-
scalar: () => scalar$8,
|
|
305
|
-
schema: () => schema$7,
|
|
306
|
-
stringSchema: () => stringSchema$8,
|
|
307
|
-
type: () => type$8,
|
|
308
|
-
typedef: () => typedef$8
|
|
309
|
-
});
|
|
310
|
-
const type$8 = "string";
|
|
311
|
-
const typedef$8 = "scalar Date";
|
|
312
|
-
const schema$7 = datetime();
|
|
313
|
-
const stringSchema$8 = "z.iso.datetime()";
|
|
314
|
-
const datetimeValidation$1 = (value) => {
|
|
315
|
-
if (typeof value !== "string") throw new import_graphql.GraphQLError(`Value is not iso string: ${JSON.stringify(value)}`);
|
|
316
|
-
const result = schema$7.safeParse(value);
|
|
317
|
-
if (result.success) return result.data;
|
|
318
|
-
throw new import_graphql.GraphQLError(result.error.message);
|
|
319
|
-
};
|
|
320
|
-
const config$8 = {
|
|
321
|
-
name: "Date",
|
|
322
|
-
description: "A custom scalar that represents a datetime in ISO 8601 format (Time: 00:00:00)",
|
|
323
|
-
serialize: datetimeValidation$1,
|
|
324
|
-
parseValue: datetimeValidation$1,
|
|
325
|
-
parseLiteral: (value) => {
|
|
326
|
-
if (value.kind !== import_graphql.Kind.STRING) throw new import_graphql.GraphQLError("Value is not an string", { nodes: value });
|
|
327
|
-
return datetimeValidation$1(value.value);
|
|
328
|
-
}
|
|
329
|
-
};
|
|
330
|
-
const scalar$8 = new import_graphql.GraphQLScalarType(config$8);
|
|
331
|
-
//#endregion
|
|
332
|
-
//#region ../../node_modules/.pnpm/@powerhousedao+document-engineering@1.40.5_@types+express@4.17.25_@types+react-dom@19.2_75e28b6ec666f63b132a491ff3a6fdf7/node_modules/@powerhousedao/document-engineering/dist/src/scalars/graphql/DateTime.js
|
|
333
|
-
var DateTime_exports = /* @__PURE__ */ __exportAll({
|
|
334
|
-
config: () => config$7,
|
|
335
|
-
scalar: () => scalar$7,
|
|
336
|
-
schema: () => schema$6,
|
|
337
|
-
stringSchema: () => stringSchema$7,
|
|
338
|
-
type: () => type$7,
|
|
339
|
-
typedef: () => typedef$7
|
|
340
|
-
});
|
|
341
|
-
const type$7 = "string";
|
|
342
|
-
const typedef$7 = "scalar DateTime";
|
|
343
|
-
const schema$6 = datetime();
|
|
344
|
-
const stringSchema$7 = "z.iso.datetime()";
|
|
345
|
-
const datetimeValidation = (value) => {
|
|
346
|
-
if (typeof value !== "string") throw new import_graphql.GraphQLError(`Value is not iso string: ${JSON.stringify(value)}`);
|
|
347
|
-
const result = schema$6.safeParse(value);
|
|
348
|
-
if (result.success) return result.data;
|
|
349
|
-
throw new import_graphql.GraphQLError(result.error.message);
|
|
350
|
-
};
|
|
351
|
-
const config$7 = {
|
|
352
|
-
name: "DateTime",
|
|
353
|
-
description: "A custom scalar that represents a datetime in ISO 8601 format",
|
|
354
|
-
serialize: datetimeValidation,
|
|
355
|
-
parseValue: datetimeValidation,
|
|
356
|
-
parseLiteral: (value) => {
|
|
357
|
-
if (value.kind !== import_graphql.Kind.STRING) throw new import_graphql.GraphQLError("Value is not an string", { nodes: value });
|
|
358
|
-
return datetimeValidation(value.value);
|
|
359
|
-
}
|
|
360
|
-
};
|
|
361
|
-
const scalar$7 = new import_graphql.GraphQLScalarType(config$7);
|
|
362
|
-
//#endregion
|
|
363
|
-
//#region ../../node_modules/.pnpm/@powerhousedao+document-engineering@1.40.5_@types+express@4.17.25_@types+react-dom@19.2_75e28b6ec666f63b132a491ff3a6fdf7/node_modules/@powerhousedao/document-engineering/dist/src/scalars/graphql/EmailAddress.js
|
|
364
|
-
var EmailAddress_exports = /* @__PURE__ */ __exportAll({
|
|
365
|
-
config: () => config$6,
|
|
366
|
-
scalar: () => scalar$6,
|
|
367
|
-
schema: () => schema$5,
|
|
368
|
-
stringSchema: () => stringSchema$6,
|
|
369
|
-
type: () => type$6,
|
|
370
|
-
typedef: () => typedef$6
|
|
371
|
-
});
|
|
372
|
-
const type$6 = "string";
|
|
373
|
-
const typedef$6 = "scalar EmailAddress";
|
|
374
|
-
const schema$5 = email();
|
|
375
|
-
const stringSchema$6 = "z.email()";
|
|
376
|
-
const emailValidation = (value) => {
|
|
377
|
-
if (typeof value !== "string") throw new import_graphql.GraphQLError(`Value is not string: ${JSON.stringify(value)}`);
|
|
378
|
-
const result = schema$5.safeParse(value);
|
|
379
|
-
if (result.success) return result.data;
|
|
380
|
-
throw new import_graphql.GraphQLError(result.error.message);
|
|
381
|
-
};
|
|
382
|
-
const config$6 = {
|
|
383
|
-
name: "EmailAddress",
|
|
384
|
-
description: "A field whose value conforms to the standard internet email address format as specified in RFC822: https://www.w3.org/Protocols/rfc822/.",
|
|
385
|
-
serialize: emailValidation,
|
|
386
|
-
parseValue: emailValidation,
|
|
387
|
-
parseLiteral: (value) => {
|
|
388
|
-
if (value.kind !== import_graphql.Kind.STRING) throw new import_graphql.GraphQLError(`Can only validate strings as email addresses but got a: ${value.kind}`, { nodes: value });
|
|
389
|
-
return emailValidation(value.value);
|
|
390
|
-
}
|
|
391
|
-
};
|
|
392
|
-
const scalar$6 = new import_graphql.GraphQLScalarType(config$6);
|
|
393
|
-
//#endregion
|
|
394
|
-
//#region ../../node_modules/.pnpm/@powerhousedao+document-engineering@1.40.5_@types+express@4.17.25_@types+react-dom@19.2_75e28b6ec666f63b132a491ff3a6fdf7/node_modules/@powerhousedao/document-engineering/dist/src/scalars/graphql/EthereumAddress.js
|
|
395
|
-
var EthereumAddress_exports = /* @__PURE__ */ __exportAll({
|
|
396
|
-
config: () => config$5,
|
|
397
|
-
scalar: () => scalar$5,
|
|
398
|
-
schema: () => schema$4,
|
|
399
|
-
stringSchema: () => stringSchema$5,
|
|
400
|
-
type: () => type$5,
|
|
401
|
-
typedef: () => typedef$5
|
|
402
|
-
});
|
|
403
|
-
const type$5 = "string";
|
|
404
|
-
const typedef$5 = "scalar EthereumAddress";
|
|
405
|
-
const schema$4 = string().regex(/^0x[a-fA-F0-9]{40}$/, { message: "Invalid Ethereum address format" });
|
|
406
|
-
const stringSchema$5 = "z.string().regex(/^0x[a-fA-F0-9]{40}$/, { message: 'Invalid Ethereum address format' })";
|
|
407
|
-
const addressValidation = (value) => {
|
|
408
|
-
if (typeof value !== "string") throw new import_graphql.GraphQLError(`Value is not string: ${JSON.stringify(value)}`);
|
|
409
|
-
const result = schema$4.safeParse(value);
|
|
410
|
-
if (result.success) return result.data;
|
|
411
|
-
throw new import_graphql.GraphQLError(result.error.message);
|
|
412
|
-
};
|
|
413
|
-
const config$5 = {
|
|
414
|
-
name: "EthereumAddress",
|
|
415
|
-
description: "A custom scalar representing an Ethereum address, validated as a 42-character hexadecimal string prefixed with \"0x\"",
|
|
416
|
-
serialize: addressValidation,
|
|
417
|
-
parseValue: addressValidation,
|
|
418
|
-
parseLiteral: (value) => {
|
|
419
|
-
if (value.kind !== import_graphql.Kind.STRING) throw new import_graphql.GraphQLError("some error message", { nodes: value });
|
|
420
|
-
return addressValidation(value.value);
|
|
421
|
-
}
|
|
422
|
-
};
|
|
423
|
-
const scalar$5 = new import_graphql.GraphQLScalarType(config$5);
|
|
424
|
-
//#endregion
|
|
425
|
-
//#region ../../node_modules/.pnpm/@powerhousedao+document-engineering@1.40.5_@types+express@4.17.25_@types+react-dom@19.2_75e28b6ec666f63b132a491ff3a6fdf7/node_modules/@powerhousedao/document-engineering/dist/src/scalars/graphql/OID.js
|
|
426
|
-
var OID_exports = /* @__PURE__ */ __exportAll({
|
|
427
|
-
config: () => config$4,
|
|
428
|
-
scalar: () => scalar$4,
|
|
429
|
-
schema: () => schema$3,
|
|
430
|
-
stringSchema: () => stringSchema$4,
|
|
431
|
-
type: () => type$4,
|
|
432
|
-
typedef: () => typedef$4
|
|
433
|
-
});
|
|
434
|
-
const type$4 = "string";
|
|
435
|
-
const typedef$4 = "scalar OID";
|
|
436
|
-
const schema$3 = string();
|
|
437
|
-
const stringSchema$4 = "z.string()";
|
|
438
|
-
const oIdValidation = (value) => {
|
|
439
|
-
if (typeof value !== "string") throw new import_graphql.GraphQLError(`Value is not string: ${JSON.stringify(value)}`);
|
|
440
|
-
const result = schema$3.safeParse(value);
|
|
441
|
-
if (result.success) return result.data;
|
|
442
|
-
throw new import_graphql.GraphQLError(result.error.message);
|
|
443
|
-
};
|
|
444
|
-
const config$4 = {
|
|
445
|
-
name: "OID",
|
|
446
|
-
description: "A custom scalar that represents a OID string",
|
|
447
|
-
serialize: oIdValidation,
|
|
448
|
-
parseValue: oIdValidation,
|
|
449
|
-
parseLiteral: (value) => {
|
|
450
|
-
if (value.kind !== import_graphql.Kind.STRING) throw new import_graphql.GraphQLError(`Value is not a valid string: ${value.kind}`, { nodes: value });
|
|
451
|
-
return oIdValidation(value.value);
|
|
452
|
-
}
|
|
453
|
-
};
|
|
454
|
-
const scalar$4 = new import_graphql.GraphQLScalarType(config$4);
|
|
455
|
-
//#endregion
|
|
456
|
-
//#region ../../node_modules/.pnpm/@powerhousedao+document-engineering@1.40.5_@types+express@4.17.25_@types+react-dom@19.2_75e28b6ec666f63b132a491ff3a6fdf7/node_modules/@powerhousedao/document-engineering/dist/src/scalars/graphql/OLabel.js
|
|
457
|
-
var OLabel_exports = /* @__PURE__ */ __exportAll({
|
|
458
|
-
config: () => config$3,
|
|
459
|
-
scalar: () => scalar$3,
|
|
460
|
-
schema: () => schema$2,
|
|
461
|
-
stringSchema: () => stringSchema$3,
|
|
462
|
-
type: () => type$3,
|
|
463
|
-
typedef: () => typedef$3
|
|
464
|
-
});
|
|
465
|
-
const type$3 = "string";
|
|
466
|
-
const typedef$3 = "scalar OLabel";
|
|
467
|
-
const schema$2 = string();
|
|
468
|
-
const stringSchema$3 = "z.string()";
|
|
469
|
-
const oLabelValidation = (value) => {
|
|
470
|
-
if (typeof value !== "string") throw new import_graphql.GraphQLError(`Value is not string: ${JSON.stringify(value)}`);
|
|
471
|
-
const result = schema$2.safeParse(value);
|
|
472
|
-
if (result.success) return result.data;
|
|
473
|
-
throw new import_graphql.GraphQLError(result.error.message);
|
|
474
|
-
};
|
|
475
|
-
const config$3 = {
|
|
476
|
-
name: "OLabel",
|
|
477
|
-
description: "A custom scalar that represents a OLabel string",
|
|
478
|
-
serialize: oLabelValidation,
|
|
479
|
-
parseValue: oLabelValidation,
|
|
480
|
-
parseLiteral: (value) => {
|
|
481
|
-
if (value.kind !== import_graphql.Kind.STRING) throw new import_graphql.GraphQLError(`Value is not a valid string: ${value.kind}`, { nodes: value });
|
|
482
|
-
return oLabelValidation(value.value);
|
|
483
|
-
}
|
|
484
|
-
};
|
|
485
|
-
const scalar$3 = new import_graphql.GraphQLScalarType(config$3);
|
|
486
|
-
//#endregion
|
|
487
|
-
//#region ../../node_modules/.pnpm/@powerhousedao+document-engineering@1.40.5_@types+express@4.17.25_@types+react-dom@19.2_75e28b6ec666f63b132a491ff3a6fdf7/node_modules/@powerhousedao/document-engineering/dist/src/scalars/graphql/PHID.js
|
|
488
|
-
var PHID_exports = /* @__PURE__ */ __exportAll({
|
|
489
|
-
config: () => config$2,
|
|
490
|
-
scalar: () => scalar$2,
|
|
491
|
-
schema: () => schema$1,
|
|
492
|
-
stringSchema: () => stringSchema$2,
|
|
493
|
-
type: () => type$2,
|
|
494
|
-
typedef: () => typedef$2
|
|
495
|
-
});
|
|
496
|
-
const type$2 = "string";
|
|
497
|
-
const typedef$2 = "scalar PHID";
|
|
498
|
-
const schema$1 = string();
|
|
499
|
-
const stringSchema$2 = "z.string()";
|
|
500
|
-
const phidlValidation = (value) => {
|
|
501
|
-
if (typeof value !== "string") throw new import_graphql.GraphQLError(`Value is not string: ${JSON.stringify(value)}`);
|
|
502
|
-
const result = schema$1.safeParse(value);
|
|
503
|
-
if (result.success) return result.data;
|
|
504
|
-
throw new import_graphql.GraphQLError(result.error.message);
|
|
505
|
-
};
|
|
506
|
-
const config$2 = {
|
|
507
|
-
name: "PHID",
|
|
508
|
-
description: "A custom scalar that represents a PowerhouseID string",
|
|
509
|
-
serialize: phidlValidation,
|
|
510
|
-
parseValue: phidlValidation,
|
|
511
|
-
parseLiteral: (value) => {
|
|
512
|
-
if (value.kind !== import_graphql.Kind.STRING) throw new import_graphql.GraphQLError(`Value is not a valid string: ${value.kind}`, { nodes: value });
|
|
513
|
-
return phidlValidation(value.value);
|
|
514
|
-
}
|
|
515
|
-
};
|
|
516
|
-
const scalar$2 = new import_graphql.GraphQLScalarType(config$2);
|
|
517
|
-
//#endregion
|
|
518
|
-
//#region ../../node_modules/.pnpm/@powerhousedao+document-engineering@1.40.5_@types+express@4.17.25_@types+react-dom@19.2_75e28b6ec666f63b132a491ff3a6fdf7/node_modules/@powerhousedao/document-engineering/dist/src/scalars/graphql/URL.js
|
|
519
|
-
var URL_exports = /* @__PURE__ */ __exportAll({
|
|
520
|
-
config: () => config$1,
|
|
521
|
-
scalar: () => scalar$1,
|
|
522
|
-
schema: () => schema,
|
|
523
|
-
stringSchema: () => stringSchema$1,
|
|
524
|
-
type: () => type$1,
|
|
525
|
-
typedef: () => typedef$1
|
|
526
|
-
});
|
|
527
|
-
const type$1 = "string";
|
|
528
|
-
const typedef$1 = "scalar URL";
|
|
529
|
-
const schema = url();
|
|
530
|
-
const stringSchema$1 = "z.url()";
|
|
531
|
-
const urlValidation = (value) => {
|
|
532
|
-
if (typeof value !== "string") throw new import_graphql.GraphQLError(`Value is not iso string: ${JSON.stringify(value)}`);
|
|
533
|
-
const result = schema.safeParse(value);
|
|
534
|
-
if (result.success) return result.data;
|
|
535
|
-
throw new import_graphql.GraphQLError(result.error.message);
|
|
536
|
-
};
|
|
537
|
-
const config$1 = {
|
|
538
|
-
name: "URL",
|
|
539
|
-
description: "A custom scalar that represents a URL string",
|
|
540
|
-
serialize: urlValidation,
|
|
541
|
-
parseValue: urlValidation,
|
|
542
|
-
parseLiteral: (value) => {
|
|
543
|
-
if (value.kind !== import_graphql.Kind.STRING) throw new import_graphql.GraphQLError("Value is not an string", { nodes: value });
|
|
544
|
-
return urlValidation(value.value);
|
|
545
|
-
}
|
|
546
|
-
};
|
|
547
|
-
const scalar$1 = new import_graphql.GraphQLScalarType(config$1);
|
|
548
|
-
//#endregion
|
|
549
|
-
//#region ../../node_modules/.pnpm/graphql-upload@17.0.0_@types+express@4.17.25_graphql@16.12.0/node_modules/graphql-upload/Upload.mjs
|
|
550
|
-
/**
|
|
551
|
-
* @import GraphQLUpload from "./GraphQLUpload.mjs"
|
|
552
|
-
* @import processRequest, { FileUpload } from "./processRequest.mjs"
|
|
553
|
-
*/
|
|
554
|
-
/**
|
|
555
|
-
* A file expected to be uploaded as it was declared in the `map` field of a
|
|
556
|
-
* [GraphQL multipart request](https://github.com/jaydenseric/graphql-multipart-request-spec).
|
|
557
|
-
* The {@linkcode processRequest} function places references to an instance of
|
|
558
|
-
* this class wherever the file is expected in the GraphQL operation. The scalar
|
|
559
|
-
* {@linkcode GraphQLUpload} derives it’s value from {@linkcode Upload.promise}.
|
|
560
|
-
*/
|
|
561
|
-
var Upload = class {
|
|
562
|
-
constructor() {
|
|
563
|
-
/**
|
|
564
|
-
* Promise that resolves file upload details. This should only be utilized
|
|
565
|
-
* by {@linkcode GraphQLUpload}.
|
|
566
|
-
* @type {Promise<FileUpload>}
|
|
567
|
-
*/
|
|
568
|
-
this.promise = new Promise((resolve, reject) => {
|
|
569
|
-
/**
|
|
570
|
-
* Resolves the upload promise with the file upload details. This should
|
|
571
|
-
* only be utilized by {@linkcode processRequest}.
|
|
572
|
-
* @param {FileUpload} file File upload details.
|
|
573
|
-
*/
|
|
574
|
-
this.resolve = (file) => {
|
|
575
|
-
/**
|
|
576
|
-
* The file upload details, available when the
|
|
577
|
-
* {@linkcode Upload.promise} resolves. This should only be utilized by
|
|
578
|
-
* {@linkcode processRequest}.
|
|
579
|
-
* @type {FileUpload | undefined}
|
|
580
|
-
*/
|
|
581
|
-
this.file = file;
|
|
582
|
-
resolve(file);
|
|
583
|
-
};
|
|
584
|
-
/**
|
|
585
|
-
* Rejects the upload promise with an error. This should only be
|
|
586
|
-
* utilized by {@linkcode processRequest}.
|
|
587
|
-
* @param {Error} error Error instance.
|
|
588
|
-
*/
|
|
589
|
-
this.reject = reject;
|
|
590
|
-
});
|
|
591
|
-
this.promise.catch(() => {});
|
|
592
|
-
}
|
|
593
|
-
};
|
|
594
|
-
//#endregion
|
|
595
|
-
//#region ../../node_modules/.pnpm/graphql-upload@17.0.0_@types+express@4.17.25_graphql@16.12.0/node_modules/graphql-upload/GraphQLUpload.mjs
|
|
596
|
-
/** @typedef {import("./processRequest.mjs").FileUpload} FileUpload */
|
|
597
|
-
/**
|
|
598
|
-
* A GraphQL scalar `Upload` that can be used in a
|
|
599
|
-
* [`GraphQLSchema`](https://graphql.org/graphql-js/type/#graphqlschema). It’s
|
|
600
|
-
* value in resolvers is a promise that resolves
|
|
601
|
-
* {@link FileUpload file upload details} for processing and storage.
|
|
602
|
-
* @example
|
|
603
|
-
* A schema built using the function
|
|
604
|
-
* [`makeExecutableSchema`](https://www.graphql-tools.com/docs/api/modules/schema_src#makeexecutableschema)
|
|
605
|
-
* from [`@graphql-tools/schema`](https://npm.im/@graphql-tools/schema):
|
|
606
|
-
*
|
|
607
|
-
* ```js
|
|
608
|
-
* import { makeExecutableSchema } from "@graphql-tools/schema/makeExecutableSchema";
|
|
609
|
-
* import GraphQLUpload from "graphql-upload/GraphQLUpload.mjs";
|
|
610
|
-
*
|
|
611
|
-
* const schema = makeExecutableSchema({
|
|
612
|
-
* typeDefs: `
|
|
613
|
-
* scalar Upload
|
|
614
|
-
* `,
|
|
615
|
-
* resolvers: {
|
|
616
|
-
* Upload: GraphQLUpload,
|
|
617
|
-
* },
|
|
618
|
-
* });
|
|
619
|
-
* ```
|
|
620
|
-
* @example
|
|
621
|
-
* A manually constructed schema with an image upload mutation:
|
|
622
|
-
*
|
|
623
|
-
* ```js
|
|
624
|
-
* import { GraphQLBoolean, GraphQLObjectType, GraphQLSchema } from "graphql";
|
|
625
|
-
* import GraphQLUpload from "graphql-upload/GraphQLUpload.mjs";
|
|
626
|
-
*
|
|
627
|
-
* const schema = new GraphQLSchema({
|
|
628
|
-
* mutation: new GraphQLObjectType({
|
|
629
|
-
* name: "Mutation",
|
|
630
|
-
* fields: {
|
|
631
|
-
* uploadImage: {
|
|
632
|
-
* description: "Uploads an image.",
|
|
633
|
-
* type: GraphQLBoolean,
|
|
634
|
-
* args: {
|
|
635
|
-
* image: {
|
|
636
|
-
* description: "Image file.",
|
|
637
|
-
* type: GraphQLUpload,
|
|
638
|
-
* },
|
|
639
|
-
* },
|
|
640
|
-
* async resolve(parent, { image }) {
|
|
641
|
-
* const { filename, mimetype, createReadStream } = await image;
|
|
642
|
-
* const stream = createReadStream();
|
|
643
|
-
* // Promisify the stream and store the file, then…
|
|
644
|
-
* return true;
|
|
645
|
-
* },
|
|
646
|
-
* },
|
|
647
|
-
* },
|
|
648
|
-
* }),
|
|
649
|
-
* });
|
|
650
|
-
* ```
|
|
651
|
-
* @example
|
|
652
|
-
* In a [TypeScript](https://typescriptlang.org) module, how to import the type
|
|
653
|
-
* for the {@link FileUpload file upload details} that the
|
|
654
|
-
* {@linkcode GraphQLUpload} scalar resolver value promise resolves:
|
|
655
|
-
*
|
|
656
|
-
* ```ts
|
|
657
|
-
* import type { FileUpload } from "graphql-upload/processRequest.mjs";
|
|
658
|
-
* ```
|
|
659
|
-
*/
|
|
660
|
-
const GraphQLUpload = new import_graphql.GraphQLScalarType({
|
|
661
|
-
name: "Upload",
|
|
662
|
-
description: "The `Upload` scalar type represents a file upload.",
|
|
663
|
-
parseValue(value) {
|
|
664
|
-
if (value instanceof Upload) return value.promise;
|
|
665
|
-
throw new import_graphql.GraphQLError("Upload value invalid.");
|
|
666
|
-
},
|
|
667
|
-
parseLiteral(node) {
|
|
668
|
-
throw new import_graphql.GraphQLError("Upload literal unsupported.", { nodes: node });
|
|
669
|
-
},
|
|
670
|
-
serialize() {
|
|
671
|
-
throw new import_graphql.GraphQLError("Upload serialization unsupported.");
|
|
672
|
-
}
|
|
673
|
-
});
|
|
674
|
-
//#endregion
|
|
675
|
-
//#region ../../node_modules/.pnpm/@powerhousedao+document-engineering@1.40.5_@types+express@4.17.25_@types+react-dom@19.2_75e28b6ec666f63b132a491ff3a6fdf7/node_modules/@powerhousedao/document-engineering/dist/src/scalars/graphql/File.js
|
|
676
|
-
var File_exports = /* @__PURE__ */ __exportAll({
|
|
677
|
-
config: () => config,
|
|
678
|
-
scalar: () => scalar,
|
|
679
|
-
stringSchema: () => stringSchema,
|
|
680
|
-
type: () => type,
|
|
681
|
-
typedef: () => typedef
|
|
682
|
-
});
|
|
683
|
-
const type = "File";
|
|
684
|
-
const typedef = "scalar Upload";
|
|
685
|
-
const config = {
|
|
686
|
-
name: "Upload",
|
|
687
|
-
description: "A custom scalar that represents a file upload"
|
|
688
|
-
};
|
|
689
|
-
const stringSchema = "z.any()";
|
|
690
|
-
const scalar = GraphQLUpload;
|
|
691
|
-
//#endregion
|
|
692
|
-
//#region ../../node_modules/.pnpm/@powerhousedao+document-engineering@1.40.5_@types+express@4.17.25_@types+react-dom@19.2_75e28b6ec666f63b132a491ff3a6fdf7/node_modules/@powerhousedao/document-engineering/dist/src/scalars/graphql/scalars.js
|
|
693
|
-
const customScalars = {
|
|
694
|
-
Amount: Amount_exports,
|
|
695
|
-
AmountCrypto: AmountCrypto_exports,
|
|
696
|
-
AmountCurrency: AmountCurrency_exports,
|
|
697
|
-
AmountFiat: AmountFiat_exports,
|
|
698
|
-
AmountMoney: AmountMoney_exports,
|
|
699
|
-
AmountPercentage: AmountPercentage_exports,
|
|
700
|
-
AmountTokens: AmountTokens_exports,
|
|
701
|
-
Currency: Currency_exports,
|
|
702
|
-
DateScalar: Date_exports,
|
|
703
|
-
DateTime: DateTime_exports,
|
|
704
|
-
EmailAddress: EmailAddress_exports,
|
|
705
|
-
EthereumAddress: EthereumAddress_exports,
|
|
706
|
-
File: File_exports,
|
|
707
|
-
OID: OID_exports,
|
|
708
|
-
OLabel: OLabel_exports,
|
|
709
|
-
PHID: PHID_exports,
|
|
710
|
-
URLScalar: URL_exports
|
|
711
|
-
};
|
|
712
|
-
const typeDefs = [
|
|
713
|
-
typedef$10,
|
|
714
|
-
typedef$5,
|
|
715
|
-
typedef$11,
|
|
716
|
-
typedef$6,
|
|
717
|
-
typedef$8,
|
|
718
|
-
typedef$7,
|
|
719
|
-
typedef$1,
|
|
720
|
-
typedef$12,
|
|
721
|
-
typedef$3,
|
|
722
|
-
typedef$9,
|
|
723
|
-
typedef$2,
|
|
724
|
-
typedef$4,
|
|
725
|
-
typedef$13,
|
|
726
|
-
typedef$14,
|
|
727
|
-
typedef$15,
|
|
728
|
-
typedef$16,
|
|
729
|
-
typedef
|
|
730
|
-
];
|
|
731
|
-
config$10.name, config$5.name, config$6.name, config$11.name, config$8.name, config$7.name, config$1.name, config$12.name, config$3.name, config$9.name, config$2.name, config$4.name, config$13.name, config$14.name, config$15.name, config$16.name, config.name;
|
|
732
|
-
config$10.name, config$5.name, config$6.name, config$11.name, config$8.name, config$7.name, config$1.name, config$12.name, config$3.name, config$9.name, config$2.name, config$4.name, config$13.name, config$14.name, config$15.name, config$16.name, config.name;
|
|
733
|
-
//#endregion
|
|
734
|
-
//#region editors/document-model-editor/constants/documents.ts
|
|
735
|
-
const hiddenQueryTypeDefDoc = `type Query {
|
|
736
|
-
_hidden: String
|
|
737
|
-
}
|
|
738
|
-
`;
|
|
739
|
-
const typeDefsDoc = typeDefs.join("\n");
|
|
740
|
-
const initialSchemaDoc = `${hiddenQueryTypeDefDoc}\n${typeDefsDoc}`;
|
|
741
|
-
const initialSchema = (0, import_graphql.buildSchema)(initialSchemaDoc);
|
|
742
|
-
const initialSchemaStr = (0, import_graphql.printSchema)(initialSchema);
|
|
743
|
-
const updateTimeout = 5e3;
|
|
744
|
-
//#endregion
|
|
745
|
-
export { customScalars as a, updateTimeout as i, initialSchemaStr as n, typeDefsDoc as r, hiddenQueryTypeDefDoc as t };
|
|
746
|
-
|
|
747
|
-
//# sourceMappingURL=documents-DCf53bzO.mjs.map
|