@fern-api/fdr-sdk 1.2.92-bd650af30b → 1.2.93-80ac90df5f
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/js/api-definition/index.js +6 -3
- package/dist/js/api-definition/index.js.map +1 -1
- package/dist/js/api-definition/index.mjs +6 -3
- package/dist/js/api-definition/index.mjs.map +1 -1
- package/dist/js/client/FdrClient.js +156 -9
- package/dist/js/client/FdrClient.js.map +1 -1
- package/dist/js/client/FdrClient.mjs +156 -9
- package/dist/js/client/FdrClient.mjs.map +1 -1
- package/dist/js/client/types.js +6 -3
- package/dist/js/client/types.js.map +1 -1
- package/dist/js/client/types.mjs +6 -3
- package/dist/js/client/types.mjs.map +1 -1
- package/dist/js/converters/index.js +10 -5
- package/dist/js/converters/index.js.map +1 -1
- package/dist/js/converters/index.mjs +10 -5
- package/dist/js/converters/index.mjs.map +1 -1
- package/dist/js/index.js +160 -11
- package/dist/js/index.js.map +1 -1
- package/dist/js/index.mjs +160 -11
- package/dist/js/index.mjs.map +1 -1
- package/dist/js/navigation/index.js +8 -4
- package/dist/js/navigation/index.js.map +1 -1
- package/dist/js/navigation/index.mjs +8 -4
- package/dist/js/navigation/index.mjs.map +1 -1
- package/dist/js/orpc-client.js +166 -11
- package/dist/js/orpc-client.js.map +1 -1
- package/dist/js/orpc-client.mjs +161 -10
- package/dist/js/orpc-client.mjs.map +1 -1
- package/dist/types/api-definition/migrators/v1ToV2.d.ts.map +1 -1
- package/dist/types/converters/__test__/websocket-explorer-round-trip.test.d.ts +2 -0
- package/dist/types/converters/__test__/websocket-explorer-round-trip.test.d.ts.map +1 -0
- package/dist/types/converters/db/convertAPIDefinitionToDb.d.ts.map +1 -1
- package/dist/types/converters/read/convertDbAPIDefinitionToRead.d.ts +2 -0
- package/dist/types/converters/read/convertDbAPIDefinitionToRead.d.ts.map +1 -1
- package/dist/types/navigation/utils/toApis.d.ts +1 -0
- package/dist/types/navigation/utils/toApis.d.ts.map +1 -1
- package/dist/types/orpc-client/api/contract-db.d.ts +24 -0
- package/dist/types/orpc-client/api/contract-db.d.ts.map +1 -1
- package/dist/types/orpc-client/api/contract-latest.d.ts +13 -0
- package/dist/types/orpc-client/api/contract-latest.d.ts.map +1 -1
- package/dist/types/orpc-client/api/contract-read.d.ts +27 -0
- package/dist/types/orpc-client/api/contract-read.d.ts.map +1 -1
- package/dist/types/orpc-client/api/contract-register.d.ts +27 -0
- package/dist/types/orpc-client/api/contract-register.d.ts.map +1 -1
- package/dist/types/orpc-client/dashboard-agent/contract.d.ts +94 -0
- package/dist/types/orpc-client/dashboard-agent/contract.d.ts.map +1 -1
- package/dist/types/orpc-client/docs/v2/library-docs/__test__/doxyfile.test.d.ts +2 -0
- package/dist/types/orpc-client/docs/v2/library-docs/__test__/doxyfile.test.d.ts.map +1 -0
- package/dist/types/orpc-client/docs/v2/library-docs/contract.d.ts +9 -3
- package/dist/types/orpc-client/docs/v2/library-docs/contract.d.ts.map +1 -1
- package/dist/types/orpc-client/docs/v2/library-docs/doxyfile.d.ts +32 -0
- package/dist/types/orpc-client/docs/v2/library-docs/doxyfile.d.ts.map +1 -0
- package/dist/types/orpc-client/docs/v2/library-docs/index.d.ts +1 -0
- package/dist/types/orpc-client/docs/v2/library-docs/index.d.ts.map +1 -1
- package/dist/types/orpc-client/docs-deployment/contract.d.ts +8 -0
- package/dist/types/orpc-client/docs-deployment/contract.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/js/orpc-client.mjs
CHANGED
|
@@ -879,7 +879,8 @@ var RegisterWebSocketChannelSchema = z3.object({
|
|
|
879
879
|
headers: z3.array(HeaderSchema),
|
|
880
880
|
queryParameters: z3.array(QueryParameterSchema),
|
|
881
881
|
messages: z3.array(WebSocketMessageSchema),
|
|
882
|
-
examples: z3.array(ExampleWebSocketSessionSchema)
|
|
882
|
+
examples: z3.array(ExampleWebSocketSessionSchema),
|
|
883
|
+
includeInApiExplorer: z3.boolean().nullish()
|
|
883
884
|
});
|
|
884
885
|
var SourceIdSchema = z3.string();
|
|
885
886
|
function SourceId(value) {
|
|
@@ -1483,7 +1484,8 @@ var LatestWebSocketChannelSchema = z4.object({
|
|
|
1483
1484
|
pathParameters: z4.array(LatestParameterPropertySchema).nullish(),
|
|
1484
1485
|
queryParameters: z4.array(LatestParameterPropertySchema).nullish(),
|
|
1485
1486
|
requestHeaders: z4.array(LatestObjectPropertySchema).nullish(),
|
|
1486
|
-
examples: z4.array(LatestExampleWebSocketSessionSchema).nullish()
|
|
1487
|
+
examples: z4.array(LatestExampleWebSocketSessionSchema).nullish(),
|
|
1488
|
+
includeInApiExplorer: z4.boolean().nullish()
|
|
1487
1489
|
});
|
|
1488
1490
|
var LatestSubpackageMetadataSchema = z4.object({
|
|
1489
1491
|
id: SubpackageIdSchema,
|
|
@@ -1731,7 +1733,8 @@ var ReadWebSocketChannelSchema = z5.object({
|
|
|
1731
1733
|
headers: z5.array(HeaderSchema),
|
|
1732
1734
|
queryParameters: z5.array(QueryParameterSchema),
|
|
1733
1735
|
messages: z5.array(WebSocketMessageSchema),
|
|
1734
|
-
examples: z5.array(ExampleWebSocketSessionSchema)
|
|
1736
|
+
examples: z5.array(ExampleWebSocketSessionSchema),
|
|
1737
|
+
includeInApiExplorer: z5.boolean().nullish()
|
|
1735
1738
|
});
|
|
1736
1739
|
var ReadApiDefinitionPackageSchema = z5.object({
|
|
1737
1740
|
endpoints: z5.array(ReadEndpointDefinitionSchema),
|
|
@@ -2016,7 +2019,9 @@ var GetDocsStatusResponseSchema = z8.object({
|
|
|
2016
2019
|
});
|
|
2017
2020
|
var GetDocsDeploymentsResponseSchema = z8.object({
|
|
2018
2021
|
deployments: z8.array(DocsDeploymentSchema),
|
|
2019
|
-
hasMore: z8.boolean()
|
|
2022
|
+
hasMore: z8.boolean(),
|
|
2023
|
+
/** Pass back as `cursor` to fetch the next page. Absent when `hasMore` is false. */
|
|
2024
|
+
nextCursor: z8.string().optional()
|
|
2020
2025
|
});
|
|
2021
2026
|
var CreateDeploymentResponseSchema = z8.object({
|
|
2022
2027
|
deploymentId: z8.string()
|
|
@@ -2174,7 +2179,9 @@ var DashboardFeedbackInputSchema = z10.object({
|
|
|
2174
2179
|
domain: z10.string().min(1),
|
|
2175
2180
|
dateRange: z10.string().optional(),
|
|
2176
2181
|
feedbackType: z10.enum(["page", "code_block", "all"]).optional(),
|
|
2177
|
-
limit: z10.number().int().min(1).max(50).optional()
|
|
2182
|
+
limit: z10.number().int().min(1).max(50).optional(),
|
|
2183
|
+
/** `nextCursor` from a previous page; continues that page's ordering. */
|
|
2184
|
+
cursor: z10.string().optional()
|
|
2178
2185
|
});
|
|
2179
2186
|
var DashboardListOrgMembersInputSchema = z10.object({
|
|
2180
2187
|
orgId: z10.string(),
|
|
@@ -2233,20 +2240,37 @@ var LlmBotTrafficResponseSchema = z10.object({
|
|
|
2233
2240
|
});
|
|
2234
2241
|
var RecentFeedbackResponseSchema = z10.object({
|
|
2235
2242
|
resolvedDateRange: ResolvedDateRangeSchema,
|
|
2243
|
+
/**
|
|
2244
|
+
* Vote counts over the whole date range, not just the returned page, and over page
|
|
2245
|
+
* feedback only: code-block reports carry no helpful/unhelpful vote and are counted
|
|
2246
|
+
* by `codeBlockCount` instead.
|
|
2247
|
+
*/
|
|
2236
2248
|
helpfulCount: z10.number(),
|
|
2237
2249
|
unhelpfulCount: z10.number(),
|
|
2250
|
+
codeBlockCount: z10.number(),
|
|
2251
|
+
/** Entries matching the filters over the whole date range. */
|
|
2252
|
+
totalCount: z10.number(),
|
|
2238
2253
|
entries: z10.array(
|
|
2239
2254
|
z10.object({
|
|
2240
2255
|
date: z10.string(),
|
|
2241
2256
|
location: z10.string(),
|
|
2257
|
+
/** Always false for code-block reports, which carry no vote. */
|
|
2242
2258
|
wasHelpful: z10.boolean(),
|
|
2243
2259
|
userFeedback: z10.string(),
|
|
2244
2260
|
feedbackType: z10.string().optional(),
|
|
2245
2261
|
/** URL of the docs page the feedback was submitted on. */
|
|
2246
|
-
url: z10.string().optional()
|
|
2262
|
+
url: z10.string().optional(),
|
|
2263
|
+
/** What the reader selected on the page, for page feedback. */
|
|
2264
|
+
selection: z10.string().optional(),
|
|
2265
|
+
/** Language of the code block a code-block report was filed against. */
|
|
2266
|
+
language: z10.string().optional(),
|
|
2267
|
+
/** The reported code block, truncated. */
|
|
2268
|
+
code: z10.string().optional()
|
|
2247
2269
|
})
|
|
2248
2270
|
),
|
|
2249
|
-
hasMore: z10.boolean()
|
|
2271
|
+
hasMore: z10.boolean(),
|
|
2272
|
+
/** Pass back as `cursor` to fetch the next page. Absent when `hasMore` is false. */
|
|
2273
|
+
nextCursor: z10.string().optional()
|
|
2250
2274
|
});
|
|
2251
2275
|
var QueryAnalyticsResponseSchema = z10.object({
|
|
2252
2276
|
resolvedDateRange: ResolvedDateRangeSchema,
|
|
@@ -2261,7 +2285,11 @@ var QueryAnalyticsResponseSchema = z10.object({
|
|
|
2261
2285
|
visitors: z10.number().optional(),
|
|
2262
2286
|
sessions: z10.number().optional()
|
|
2263
2287
|
})
|
|
2264
|
-
)
|
|
2288
|
+
),
|
|
2289
|
+
/** The row cap the query ran with, after clamping. */
|
|
2290
|
+
limit: z10.number(),
|
|
2291
|
+
/** True when the metric had more rows than `limit`, so `rows` is a truncated ranking. */
|
|
2292
|
+
hasMore: z10.boolean()
|
|
2265
2293
|
});
|
|
2266
2294
|
var OrgMembersResponseSchema = z10.object({
|
|
2267
2295
|
members: z10.array(
|
|
@@ -3148,6 +3176,120 @@ import { OpenAPILink as OpenAPILink5 } from "@orpc/openapi-client/fetch";
|
|
|
3148
3176
|
// src/orpc-client/docs/v2/library-docs/contract.ts
|
|
3149
3177
|
import { oc as oc6 } from "@orpc/contract";
|
|
3150
3178
|
import * as z15 from "zod";
|
|
3179
|
+
|
|
3180
|
+
// src/orpc-client/docs/v2/library-docs/doxyfile.ts
|
|
3181
|
+
var MAX_DOXYFILE_CONTENT_LENGTH = 262144;
|
|
3182
|
+
var SETTING_LINE_RE = /^\s*([A-Z][A-Z0-9_]*)\s*(\+?=)(.*)$/;
|
|
3183
|
+
var AT_DIRECTIVE_RE = /^\s*@[A-Z_]+\b/;
|
|
3184
|
+
var BOOL_RE = /^(?:YES|NO)$/i;
|
|
3185
|
+
var FILE_PATTERN_RE = /^[A-Za-z0-9_.*?+-]+$/;
|
|
3186
|
+
var PREDEFINED_RE = /^[A-Za-z_][A-Za-z0-9_]*(?:\([A-Za-z0-9_,. ]*\))?(?::?=.*)?$/;
|
|
3187
|
+
var ALIAS_DEF_RE = /^\w+(?:\{\d+\})?=/;
|
|
3188
|
+
var DOXYFILE_ALLOWED_KEYS = {
|
|
3189
|
+
ALIASES: (value) => ALIAS_DEF_RE.test(value),
|
|
3190
|
+
PREDEFINED: (value) => PREDEFINED_RE.test(value),
|
|
3191
|
+
FILE_PATTERNS: (value) => FILE_PATTERN_RE.test(value),
|
|
3192
|
+
OPTIMIZE_OUTPUT_FOR_C: (value) => BOOL_RE.test(value)
|
|
3193
|
+
};
|
|
3194
|
+
function joinContinuations(text) {
|
|
3195
|
+
const logical = [];
|
|
3196
|
+
let buffer = "";
|
|
3197
|
+
for (const rawLine of text.split(/\r?\n/)) {
|
|
3198
|
+
const line = rawLine.replace(/\s+$/, "");
|
|
3199
|
+
if (line.endsWith("\\") && !line.endsWith("\\\\")) {
|
|
3200
|
+
buffer += `${line.slice(0, -1)} `;
|
|
3201
|
+
continue;
|
|
3202
|
+
}
|
|
3203
|
+
buffer += line;
|
|
3204
|
+
logical.push(buffer);
|
|
3205
|
+
buffer = "";
|
|
3206
|
+
}
|
|
3207
|
+
if (buffer) {
|
|
3208
|
+
logical.push(buffer);
|
|
3209
|
+
}
|
|
3210
|
+
return logical;
|
|
3211
|
+
}
|
|
3212
|
+
function tokenizeValue(value) {
|
|
3213
|
+
const tokens = [];
|
|
3214
|
+
let i = 0;
|
|
3215
|
+
const n = value.length;
|
|
3216
|
+
while (i < n) {
|
|
3217
|
+
const ch = value[i];
|
|
3218
|
+
if (/\s/.test(ch ?? "")) {
|
|
3219
|
+
i++;
|
|
3220
|
+
continue;
|
|
3221
|
+
}
|
|
3222
|
+
if (ch === '"') {
|
|
3223
|
+
i++;
|
|
3224
|
+
let buf = "";
|
|
3225
|
+
while (i < n) {
|
|
3226
|
+
const c = value[i];
|
|
3227
|
+
if (c === "\\" && i + 1 < n && value[i + 1] === '"') {
|
|
3228
|
+
buf += '"';
|
|
3229
|
+
i += 2;
|
|
3230
|
+
continue;
|
|
3231
|
+
}
|
|
3232
|
+
if (c === '"') {
|
|
3233
|
+
i++;
|
|
3234
|
+
break;
|
|
3235
|
+
}
|
|
3236
|
+
buf += c;
|
|
3237
|
+
i++;
|
|
3238
|
+
}
|
|
3239
|
+
tokens.push(buf);
|
|
3240
|
+
} else {
|
|
3241
|
+
let j = i;
|
|
3242
|
+
while (j < n && !/\s/.test(value[j] ?? "")) {
|
|
3243
|
+
j++;
|
|
3244
|
+
}
|
|
3245
|
+
tokens.push(value.slice(i, j));
|
|
3246
|
+
i = j;
|
|
3247
|
+
}
|
|
3248
|
+
}
|
|
3249
|
+
return tokens;
|
|
3250
|
+
}
|
|
3251
|
+
function validateDoxyfileContent(content) {
|
|
3252
|
+
const errors = [];
|
|
3253
|
+
const droppedKeys = [];
|
|
3254
|
+
if (content.length > MAX_DOXYFILE_CONTENT_LENGTH) {
|
|
3255
|
+
errors.push(`doxyfileContent exceeds ${MAX_DOXYFILE_CONTENT_LENGTH} characters`);
|
|
3256
|
+
return { errors, droppedKeys };
|
|
3257
|
+
}
|
|
3258
|
+
for (const line of joinContinuations(content)) {
|
|
3259
|
+
const stripped = line.trim();
|
|
3260
|
+
if (!stripped || stripped.startsWith("#")) {
|
|
3261
|
+
continue;
|
|
3262
|
+
}
|
|
3263
|
+
if (AT_DIRECTIVE_RE.test(stripped)) {
|
|
3264
|
+
const directive = stripped.split(/\s+/)[0] ?? stripped;
|
|
3265
|
+
if (!droppedKeys.includes(directive)) {
|
|
3266
|
+
droppedKeys.push(directive);
|
|
3267
|
+
}
|
|
3268
|
+
continue;
|
|
3269
|
+
}
|
|
3270
|
+
const match = SETTING_LINE_RE.exec(line);
|
|
3271
|
+
if (match == null) {
|
|
3272
|
+
continue;
|
|
3273
|
+
}
|
|
3274
|
+
const key = match[1] ?? "";
|
|
3275
|
+
const rawValue = match[3] ?? "";
|
|
3276
|
+
const validator = DOXYFILE_ALLOWED_KEYS[key];
|
|
3277
|
+
if (validator == null) {
|
|
3278
|
+
if (!droppedKeys.includes(key)) {
|
|
3279
|
+
droppedKeys.push(key);
|
|
3280
|
+
}
|
|
3281
|
+
continue;
|
|
3282
|
+
}
|
|
3283
|
+
for (const token of tokenizeValue(rawValue)) {
|
|
3284
|
+
if (token.endsWith("\\") || token.includes("$(") || !validator(token)) {
|
|
3285
|
+
errors.push(`Invalid value for Doxyfile setting ${key}: ${JSON.stringify(token)}`);
|
|
3286
|
+
}
|
|
3287
|
+
}
|
|
3288
|
+
}
|
|
3289
|
+
return { errors, droppedKeys };
|
|
3290
|
+
}
|
|
3291
|
+
|
|
3292
|
+
// src/orpc-client/docs/v2/library-docs/contract.ts
|
|
3151
3293
|
var ALLOWED_HOSTNAMES = /* @__PURE__ */ new Set(["github.com", "gitlab.com"]);
|
|
3152
3294
|
var GithubUrlSchema = z15.string().url().describe(
|
|
3153
3295
|
"HTTPS URL of a GitHub or GitLab repository. Currently only github.com and gitlab.com are supported. Must match the pattern https://github.com/<owner>/<repo> or https://gitlab.com/<owner>/<repo>."
|
|
@@ -3182,8 +3324,13 @@ var LibraryDocsBaseConfigSchema = z15.object({
|
|
|
3182
3324
|
slug: z15.string().nullish()
|
|
3183
3325
|
});
|
|
3184
3326
|
var PythonLibraryDocsConfigSchema = LibraryDocsBaseConfigSchema;
|
|
3327
|
+
var SafeDoxyfileContentSchema = z15.string().superRefine((content, ctx) => {
|
|
3328
|
+
for (const error of validateDoxyfileContent(content).errors) {
|
|
3329
|
+
ctx.addIssue({ code: z15.ZodIssueCode.custom, message: error });
|
|
3330
|
+
}
|
|
3331
|
+
}).nullish();
|
|
3185
3332
|
var CppLibraryDocsConfigSchema = LibraryDocsBaseConfigSchema.extend({
|
|
3186
|
-
doxyfileContent:
|
|
3333
|
+
doxyfileContent: SafeDoxyfileContentSchema
|
|
3187
3334
|
});
|
|
3188
3335
|
var StartLibraryDocsGenerationInputSchema = z15.discriminatedUnion("language", [
|
|
3189
3336
|
z15.object({
|
|
@@ -6414,6 +6561,7 @@ export {
|
|
|
6414
6561
|
CurrentVersionInputSchema,
|
|
6415
6562
|
CurrentVersionResponseSchema,
|
|
6416
6563
|
CustomSnippetPayloadSchema,
|
|
6564
|
+
DOXYFILE_ALLOWED_KEYS,
|
|
6417
6565
|
DashboardAnalyticsCommonInputSchema,
|
|
6418
6566
|
DashboardDocsSiteSchema,
|
|
6419
6567
|
DashboardFeedbackInputSchema,
|
|
@@ -6708,6 +6856,7 @@ export {
|
|
|
6708
6856
|
LoadDocsForUrlResponseSchema,
|
|
6709
6857
|
LocaleEntrySchema,
|
|
6710
6858
|
LongTypeSchema,
|
|
6859
|
+
MAX_DOXYFILE_CONTENT_LENGTH,
|
|
6711
6860
|
ManifestApiDefSchema,
|
|
6712
6861
|
ManifestBlobRefSchema,
|
|
6713
6862
|
ManifestFileSchema,
|
|
@@ -6846,6 +6995,7 @@ export {
|
|
|
6846
6995
|
RouteContextInputSchema,
|
|
6847
6996
|
RouteContextResponseSchema,
|
|
6848
6997
|
RubyGemSchema,
|
|
6998
|
+
SafeDoxyfileContentSchema,
|
|
6849
6999
|
ScalarTypeSchema,
|
|
6850
7000
|
ScriptSchema,
|
|
6851
7001
|
SdkDynamicIrDownloadSchema,
|
|
@@ -6999,6 +7149,7 @@ export {
|
|
|
6999
7149
|
snippetsFactoryContract,
|
|
7000
7150
|
stableStringify,
|
|
7001
7151
|
templatesContract,
|
|
7002
|
-
tokensContract
|
|
7152
|
+
tokensContract,
|
|
7153
|
+
validateDoxyfileContent
|
|
7003
7154
|
};
|
|
7004
7155
|
//# sourceMappingURL=orpc-client.mjs.map
|