@uniformdev/mesh-edgehancer-sdk 20.34.2-alpha.67 → 20.35.0
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/index.d.mts +2 -3
- package/dist/index.d.ts +2 -3
- package/dist/index.esm.js +3 -3
- package/dist/index.js +81 -71
- package/dist/index.mjs +3 -3
- package/package.json +4 -4
package/dist/index.d.mts
CHANGED
@@ -1,5 +1,4 @@
|
|
1
|
-
import * as
|
2
|
-
import { z } from 'zod';
|
1
|
+
import * as z from 'zod';
|
3
2
|
import { DataType, DataSource, DataSourceVariantsKeys, DataSourceVariantData } from '@uniformdev/canvas';
|
4
3
|
|
5
4
|
/**
|
@@ -709,7 +708,7 @@ declare function convertBatchResultsToEdgehancerResult<TID, TResultItem extends
|
|
709
708
|
deepLink?: string | undefined;
|
710
709
|
})[] | undefined;
|
711
710
|
surrogateKeys?: string[] | undefined;
|
712
|
-
result?: string | number | boolean | unknown[] |
|
711
|
+
result?: string | number | boolean | unknown[] | z.objectOutputType<{}, z.ZodUnknown, "strip"> | undefined;
|
713
712
|
}[];
|
714
713
|
type ResolveBatchIdsResult<TID> = {
|
715
714
|
/** The IDs that are valid that should be fetched */
|
package/dist/index.d.ts
CHANGED
@@ -1,5 +1,4 @@
|
|
1
|
-
import * as
|
2
|
-
import { z } from 'zod';
|
1
|
+
import * as z from 'zod';
|
3
2
|
import { DataType, DataSource, DataSourceVariantsKeys, DataSourceVariantData } from '@uniformdev/canvas';
|
4
3
|
|
5
4
|
/**
|
@@ -709,7 +708,7 @@ declare function convertBatchResultsToEdgehancerResult<TID, TResultItem extends
|
|
709
708
|
deepLink?: string | undefined;
|
710
709
|
})[] | undefined;
|
711
710
|
surrogateKeys?: string[] | undefined;
|
712
|
-
result?: string | number | boolean | unknown[] |
|
711
|
+
result?: string | number | boolean | unknown[] | z.objectOutputType<{}, z.ZodUnknown, "strip"> | undefined;
|
713
712
|
}[];
|
714
713
|
type ResolveBatchIdsResult<TID> = {
|
715
714
|
/** The IDs that are valid that should be fetched */
|
package/dist/index.esm.js
CHANGED
@@ -96,11 +96,11 @@ function copyKeyValuePairs(source, target) {
|
|
96
96
|
}
|
97
97
|
|
98
98
|
// src/preRequest.ts
|
99
|
-
import
|
99
|
+
import * as z2 from "zod";
|
100
100
|
|
101
101
|
// src/shared.ts
|
102
102
|
import { assert } from "tsafe";
|
103
|
-
import
|
103
|
+
import * as z from "zod";
|
104
104
|
var parameterDefinitionSchema = z.object({
|
105
105
|
key: z.string(),
|
106
106
|
value: z.string(),
|
@@ -191,7 +191,7 @@ var preRequestEdgehancerResultSchema = z2.strictObject({
|
|
191
191
|
});
|
192
192
|
|
193
193
|
// src/request.ts
|
194
|
-
import
|
194
|
+
import * as z3 from "zod";
|
195
195
|
var requestEdgehancerDataResourceResolutionResultSchema = z3.strictObject({
|
196
196
|
errors: z3.array(resolvingIssueSchema).optional().describe(
|
197
197
|
"Errors that occurred while running your code to return with the API response, if any. Unhandled exceptions will be captured automatically."
|
package/dist/index.js
CHANGED
@@ -1,7 +1,9 @@
|
|
1
1
|
"use strict";
|
2
|
+
var __create = Object.create;
|
2
3
|
var __defProp = Object.defineProperty;
|
3
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
4
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
5
7
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
6
8
|
var __export = (target, all) => {
|
7
9
|
for (var name in all)
|
@@ -15,6 +17,14 @@ var __copyProps = (to, from, except, desc) => {
|
|
15
17
|
}
|
16
18
|
return to;
|
17
19
|
};
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
26
|
+
mod
|
27
|
+
));
|
18
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
19
29
|
|
20
30
|
// src/index.ts
|
@@ -138,78 +148,78 @@ function copyKeyValuePairs(source, target) {
|
|
138
148
|
}
|
139
149
|
|
140
150
|
// src/preRequest.ts
|
141
|
-
var
|
151
|
+
var z2 = __toESM(require("zod"));
|
142
152
|
|
143
153
|
// src/shared.ts
|
144
154
|
var import_tsafe = require("tsafe");
|
145
|
-
var
|
146
|
-
var parameterDefinitionSchema =
|
147
|
-
key:
|
148
|
-
value:
|
149
|
-
omitIfEmpty:
|
155
|
+
var z = __toESM(require("zod"));
|
156
|
+
var parameterDefinitionSchema = z.object({
|
157
|
+
key: z.string(),
|
158
|
+
value: z.string(),
|
159
|
+
omitIfEmpty: z.boolean().optional()
|
150
160
|
});
|
151
|
-
var resolvingIssueSchema =
|
152
|
-
|
153
|
-
|
154
|
-
message:
|
155
|
-
subType:
|
156
|
-
issueReference:
|
157
|
-
deepLink:
|
161
|
+
var resolvingIssueSchema = z.union([
|
162
|
+
z.string(),
|
163
|
+
z.object({
|
164
|
+
message: z.string(),
|
165
|
+
subType: z.enum(["unpublishedData", "configuration"]).optional(),
|
166
|
+
issueReference: z.string().optional(),
|
167
|
+
deepLink: z.string().optional()
|
158
168
|
})
|
159
169
|
]);
|
160
|
-
var variableDefinitionSchema =
|
161
|
-
displayName:
|
162
|
-
type:
|
163
|
-
default:
|
164
|
-
helpText:
|
165
|
-
order:
|
166
|
-
source:
|
170
|
+
var variableDefinitionSchema = z.object({
|
171
|
+
displayName: z.string().optional(),
|
172
|
+
type: z.string().optional(),
|
173
|
+
default: z.string(),
|
174
|
+
helpText: z.string().optional(),
|
175
|
+
order: z.number().optional(),
|
176
|
+
source: z.string().optional()
|
167
177
|
});
|
168
|
-
var customEdgehancerDefinitionSchema =
|
169
|
-
preRequest:
|
170
|
-
request:
|
178
|
+
var customEdgehancerDefinitionSchema = z.object({
|
179
|
+
preRequest: z.string().optional(),
|
180
|
+
request: z.string().optional()
|
171
181
|
});
|
172
|
-
var dataSourceVariantSchema =
|
173
|
-
|
174
|
-
headers:
|
175
|
-
parameters:
|
176
|
-
variables:
|
182
|
+
var dataSourceVariantSchema = z.intersection(
|
183
|
+
z.object({
|
184
|
+
headers: z.array(parameterDefinitionSchema).optional(),
|
185
|
+
parameters: z.array(parameterDefinitionSchema).optional(),
|
186
|
+
variables: z.record(variableDefinitionSchema).optional()
|
177
187
|
}),
|
178
|
-
|
188
|
+
z.object({ url: z.string() })
|
179
189
|
);
|
180
|
-
var mergedDataTypeSchema =
|
181
|
-
id:
|
182
|
-
displayName:
|
183
|
-
archetype:
|
184
|
-
allowedOnComponents:
|
185
|
-
badgeIconUrl:
|
186
|
-
connectorType:
|
187
|
-
url:
|
188
|
-
headers:
|
189
|
-
parameters:
|
190
|
-
body:
|
191
|
-
method:
|
192
|
-
variables:
|
193
|
-
custom:
|
194
|
-
customPublic:
|
195
|
-
ttl:
|
196
|
-
purgeKey:
|
197
|
-
localeMapping:
|
190
|
+
var mergedDataTypeSchema = z.object({
|
191
|
+
id: z.string(),
|
192
|
+
displayName: z.string(),
|
193
|
+
archetype: z.string().optional(),
|
194
|
+
allowedOnComponents: z.array(z.string()).optional(),
|
195
|
+
badgeIconUrl: z.string().optional(),
|
196
|
+
connectorType: z.string(),
|
197
|
+
url: z.string(),
|
198
|
+
headers: z.array(parameterDefinitionSchema).optional(),
|
199
|
+
parameters: z.array(parameterDefinitionSchema).optional(),
|
200
|
+
body: z.string().optional(),
|
201
|
+
method: z.enum(["GET", "POST", "HEAD"]),
|
202
|
+
variables: z.record(variableDefinitionSchema).optional(),
|
203
|
+
custom: z.record(z.unknown()).optional(),
|
204
|
+
customPublic: z.record(z.unknown()).optional(),
|
205
|
+
ttl: z.number().optional(),
|
206
|
+
purgeKey: z.string().optional(),
|
207
|
+
localeMapping: z.record(z.string()).optional(),
|
198
208
|
edgehancer: customEdgehancerDefinitionSchema.optional(),
|
199
|
-
uiBadgeText:
|
200
|
-
variants:
|
209
|
+
uiBadgeText: z.string().max(12).optional(),
|
210
|
+
variants: z.object({
|
201
211
|
unpublished: dataSourceVariantSchema.optional()
|
202
212
|
}).optional(),
|
203
|
-
enableUnpublishedMode:
|
213
|
+
enableUnpublishedMode: z.boolean().optional()
|
204
214
|
});
|
205
215
|
(0, import_tsafe.assert)();
|
206
|
-
var dataResourceSchema =
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
216
|
+
var dataResourceSchema = z.union([
|
217
|
+
z.string(),
|
218
|
+
z.object({}).catchall(z.unknown()),
|
219
|
+
z.number(),
|
220
|
+
z.boolean(),
|
221
|
+
z.array(z.unknown()),
|
222
|
+
z.undefined()
|
213
223
|
]);
|
214
224
|
|
215
225
|
// src/preRequest.ts
|
@@ -222,33 +232,33 @@ var edgehancerMergedDataTypeSchema = mergedDataTypeSchema.omit({
|
|
222
232
|
purgeKey: true,
|
223
233
|
variables: true
|
224
234
|
});
|
225
|
-
var preRequestEdgehancerDataResourceResultSchema =
|
226
|
-
errors:
|
227
|
-
warnings:
|
228
|
-
infos:
|
235
|
+
var preRequestEdgehancerDataResourceResultSchema = z2.strictObject({
|
236
|
+
errors: z2.array(resolvingIssueSchema).optional(),
|
237
|
+
warnings: z2.array(resolvingIssueSchema).optional(),
|
238
|
+
infos: z2.array(resolvingIssueSchema).optional(),
|
229
239
|
dataResource: edgehancerMergedDataTypeSchema
|
230
240
|
});
|
231
|
-
var preRequestEdgehancerResultSchema =
|
232
|
-
dataResources:
|
241
|
+
var preRequestEdgehancerResultSchema = z2.strictObject({
|
242
|
+
dataResources: z2.array(preRequestEdgehancerDataResourceResultSchema)
|
233
243
|
});
|
234
244
|
|
235
245
|
// src/request.ts
|
236
|
-
var
|
237
|
-
var requestEdgehancerDataResourceResolutionResultSchema =
|
238
|
-
errors:
|
246
|
+
var z3 = __toESM(require("zod"));
|
247
|
+
var requestEdgehancerDataResourceResolutionResultSchema = z3.strictObject({
|
248
|
+
errors: z3.array(resolvingIssueSchema).optional().describe(
|
239
249
|
"Errors that occurred while running your code to return with the API response, if any. Unhandled exceptions will be captured automatically."
|
240
250
|
),
|
241
|
-
warnings:
|
242
|
-
infos:
|
251
|
+
warnings: z3.array(resolvingIssueSchema).optional().describe("Warnings that occurred while running your code to return with the API response, if any."),
|
252
|
+
infos: z3.array(resolvingIssueSchema).optional().describe(
|
243
253
|
"Informational messages that occurred while running your code to return with the API response, if any."
|
244
254
|
),
|
245
|
-
surrogateKeys:
|
255
|
+
surrogateKeys: z3.array(z3.string()).optional().describe(
|
246
256
|
"Extra surrogate keys for the data that was fetched. These act as auxiliary cache keys that can allow granular purging of cached data."
|
247
257
|
),
|
248
258
|
result: dataResourceSchema.describe("The result of fetching the data resource")
|
249
259
|
});
|
250
|
-
var requestEdgehancerResultSchema =
|
251
|
-
results:
|
260
|
+
var requestEdgehancerResultSchema = z3.strictObject({
|
261
|
+
results: z3.array(requestEdgehancerDataResourceResolutionResultSchema)
|
252
262
|
});
|
253
263
|
// Annotate the CommonJS export names for ESM import in node:
|
254
264
|
0 && (module.exports = {
|
package/dist/index.mjs
CHANGED
@@ -96,11 +96,11 @@ function copyKeyValuePairs(source, target) {
|
|
96
96
|
}
|
97
97
|
|
98
98
|
// src/preRequest.ts
|
99
|
-
import
|
99
|
+
import * as z2 from "zod";
|
100
100
|
|
101
101
|
// src/shared.ts
|
102
102
|
import { assert } from "tsafe";
|
103
|
-
import
|
103
|
+
import * as z from "zod";
|
104
104
|
var parameterDefinitionSchema = z.object({
|
105
105
|
key: z.string(),
|
106
106
|
value: z.string(),
|
@@ -191,7 +191,7 @@ var preRequestEdgehancerResultSchema = z2.strictObject({
|
|
191
191
|
});
|
192
192
|
|
193
193
|
// src/request.ts
|
194
|
-
import
|
194
|
+
import * as z3 from "zod";
|
195
195
|
var requestEdgehancerDataResourceResolutionResultSchema = z3.strictObject({
|
196
196
|
errors: z3.array(resolvingIssueSchema).optional().describe(
|
197
197
|
"Errors that occurred while running your code to return with the API response, if any. Unhandled exceptions will be captured automatically."
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@uniformdev/mesh-edgehancer-sdk",
|
3
|
-
"version": "20.
|
3
|
+
"version": "20.35.0",
|
4
4
|
"description": "Uniform Mesh Edgehancer SDK",
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
6
6
|
"main": "./dist/index.js",
|
@@ -48,12 +48,12 @@
|
|
48
48
|
"/dist"
|
49
49
|
],
|
50
50
|
"dependencies": {
|
51
|
-
"@uniformdev/canvas": "20.
|
51
|
+
"@uniformdev/canvas": "20.35.0",
|
52
52
|
"tsafe": "1.6.6",
|
53
53
|
"zod": "3.23.8"
|
54
54
|
},
|
55
55
|
"devDependencies": {
|
56
|
-
"next": "14.2.
|
56
|
+
"next": "14.2.32"
|
57
57
|
},
|
58
58
|
"peerDependencies": {
|
59
59
|
"next": ">13"
|
@@ -61,5 +61,5 @@
|
|
61
61
|
"publishConfig": {
|
62
62
|
"access": "public"
|
63
63
|
},
|
64
|
-
"gitHead": "
|
64
|
+
"gitHead": "f228361828ef49a596ca3841e5b79768c64418cf"
|
65
65
|
}
|