@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
|
@@ -749,7 +749,8 @@ var RegisterWebSocketChannelSchema = z3.object({
|
|
|
749
749
|
headers: z3.array(HeaderSchema),
|
|
750
750
|
queryParameters: z3.array(QueryParameterSchema),
|
|
751
751
|
messages: z3.array(WebSocketMessageSchema),
|
|
752
|
-
examples: z3.array(ExampleWebSocketSessionSchema)
|
|
752
|
+
examples: z3.array(ExampleWebSocketSessionSchema),
|
|
753
|
+
includeInApiExplorer: z3.boolean().nullish()
|
|
753
754
|
});
|
|
754
755
|
var SourceIdSchema = z3.string();
|
|
755
756
|
var SourceSchema = z3.discriminatedUnion("type", [
|
|
@@ -1350,7 +1351,8 @@ var LatestWebSocketChannelSchema = z4.object({
|
|
|
1350
1351
|
pathParameters: z4.array(LatestParameterPropertySchema).nullish(),
|
|
1351
1352
|
queryParameters: z4.array(LatestParameterPropertySchema).nullish(),
|
|
1352
1353
|
requestHeaders: z4.array(LatestObjectPropertySchema).nullish(),
|
|
1353
|
-
examples: z4.array(LatestExampleWebSocketSessionSchema).nullish()
|
|
1354
|
+
examples: z4.array(LatestExampleWebSocketSessionSchema).nullish(),
|
|
1355
|
+
includeInApiExplorer: z4.boolean().nullish()
|
|
1354
1356
|
});
|
|
1355
1357
|
var LatestSubpackageMetadataSchema = z4.object({
|
|
1356
1358
|
id: SubpackageIdSchema,
|
|
@@ -1597,7 +1599,8 @@ var ReadWebSocketChannelSchema = z5.object({
|
|
|
1597
1599
|
headers: z5.array(HeaderSchema),
|
|
1598
1600
|
queryParameters: z5.array(QueryParameterSchema),
|
|
1599
1601
|
messages: z5.array(WebSocketMessageSchema),
|
|
1600
|
-
examples: z5.array(ExampleWebSocketSessionSchema)
|
|
1602
|
+
examples: z5.array(ExampleWebSocketSessionSchema),
|
|
1603
|
+
includeInApiExplorer: z5.boolean().nullish()
|
|
1601
1604
|
});
|
|
1602
1605
|
var ReadApiDefinitionPackageSchema = z5.object({
|
|
1603
1606
|
endpoints: z5.array(ReadEndpointDefinitionSchema),
|
|
@@ -1800,7 +1803,9 @@ var GetDocsStatusResponseSchema = z7.object({
|
|
|
1800
1803
|
});
|
|
1801
1804
|
var GetDocsDeploymentsResponseSchema = z7.object({
|
|
1802
1805
|
deployments: z7.array(DocsDeploymentSchema),
|
|
1803
|
-
hasMore: z7.boolean()
|
|
1806
|
+
hasMore: z7.boolean(),
|
|
1807
|
+
/** Pass back as `cursor` to fetch the next page. Absent when `hasMore` is false. */
|
|
1808
|
+
nextCursor: z7.string().optional()
|
|
1804
1809
|
});
|
|
1805
1810
|
var CreateDeploymentResponseSchema = z7.object({
|
|
1806
1811
|
deploymentId: z7.string()
|
|
@@ -1958,7 +1963,9 @@ var DashboardFeedbackInputSchema = z9.object({
|
|
|
1958
1963
|
domain: z9.string().min(1),
|
|
1959
1964
|
dateRange: z9.string().optional(),
|
|
1960
1965
|
feedbackType: z9.enum(["page", "code_block", "all"]).optional(),
|
|
1961
|
-
limit: z9.number().int().min(1).max(50).optional()
|
|
1966
|
+
limit: z9.number().int().min(1).max(50).optional(),
|
|
1967
|
+
/** `nextCursor` from a previous page; continues that page's ordering. */
|
|
1968
|
+
cursor: z9.string().optional()
|
|
1962
1969
|
});
|
|
1963
1970
|
var DashboardListOrgMembersInputSchema = z9.object({
|
|
1964
1971
|
orgId: z9.string(),
|
|
@@ -2017,20 +2024,37 @@ var LlmBotTrafficResponseSchema = z9.object({
|
|
|
2017
2024
|
});
|
|
2018
2025
|
var RecentFeedbackResponseSchema = z9.object({
|
|
2019
2026
|
resolvedDateRange: ResolvedDateRangeSchema,
|
|
2027
|
+
/**
|
|
2028
|
+
* Vote counts over the whole date range, not just the returned page, and over page
|
|
2029
|
+
* feedback only: code-block reports carry no helpful/unhelpful vote and are counted
|
|
2030
|
+
* by `codeBlockCount` instead.
|
|
2031
|
+
*/
|
|
2020
2032
|
helpfulCount: z9.number(),
|
|
2021
2033
|
unhelpfulCount: z9.number(),
|
|
2034
|
+
codeBlockCount: z9.number(),
|
|
2035
|
+
/** Entries matching the filters over the whole date range. */
|
|
2036
|
+
totalCount: z9.number(),
|
|
2022
2037
|
entries: z9.array(
|
|
2023
2038
|
z9.object({
|
|
2024
2039
|
date: z9.string(),
|
|
2025
2040
|
location: z9.string(),
|
|
2041
|
+
/** Always false for code-block reports, which carry no vote. */
|
|
2026
2042
|
wasHelpful: z9.boolean(),
|
|
2027
2043
|
userFeedback: z9.string(),
|
|
2028
2044
|
feedbackType: z9.string().optional(),
|
|
2029
2045
|
/** URL of the docs page the feedback was submitted on. */
|
|
2030
|
-
url: z9.string().optional()
|
|
2046
|
+
url: z9.string().optional(),
|
|
2047
|
+
/** What the reader selected on the page, for page feedback. */
|
|
2048
|
+
selection: z9.string().optional(),
|
|
2049
|
+
/** Language of the code block a code-block report was filed against. */
|
|
2050
|
+
language: z9.string().optional(),
|
|
2051
|
+
/** The reported code block, truncated. */
|
|
2052
|
+
code: z9.string().optional()
|
|
2031
2053
|
})
|
|
2032
2054
|
),
|
|
2033
|
-
hasMore: z9.boolean()
|
|
2055
|
+
hasMore: z9.boolean(),
|
|
2056
|
+
/** Pass back as `cursor` to fetch the next page. Absent when `hasMore` is false. */
|
|
2057
|
+
nextCursor: z9.string().optional()
|
|
2034
2058
|
});
|
|
2035
2059
|
var QueryAnalyticsResponseSchema = z9.object({
|
|
2036
2060
|
resolvedDateRange: ResolvedDateRangeSchema,
|
|
@@ -2045,7 +2069,11 @@ var QueryAnalyticsResponseSchema = z9.object({
|
|
|
2045
2069
|
visitors: z9.number().optional(),
|
|
2046
2070
|
sessions: z9.number().optional()
|
|
2047
2071
|
})
|
|
2048
|
-
)
|
|
2072
|
+
),
|
|
2073
|
+
/** The row cap the query ran with, after clamping. */
|
|
2074
|
+
limit: z9.number(),
|
|
2075
|
+
/** True when the metric had more rows than `limit`, so `rows` is a truncated ranking. */
|
|
2076
|
+
hasMore: z9.boolean()
|
|
2049
2077
|
});
|
|
2050
2078
|
var OrgMembersResponseSchema = z9.object({
|
|
2051
2079
|
members: z9.array(
|
|
@@ -2932,6 +2960,120 @@ import { OpenAPILink as OpenAPILink5 } from "@orpc/openapi-client/fetch";
|
|
|
2932
2960
|
// src/orpc-client/docs/v2/library-docs/contract.ts
|
|
2933
2961
|
import { oc as oc6 } from "@orpc/contract";
|
|
2934
2962
|
import * as z14 from "zod";
|
|
2963
|
+
|
|
2964
|
+
// src/orpc-client/docs/v2/library-docs/doxyfile.ts
|
|
2965
|
+
var MAX_DOXYFILE_CONTENT_LENGTH = 262144;
|
|
2966
|
+
var SETTING_LINE_RE = /^\s*([A-Z][A-Z0-9_]*)\s*(\+?=)(.*)$/;
|
|
2967
|
+
var AT_DIRECTIVE_RE = /^\s*@[A-Z_]+\b/;
|
|
2968
|
+
var BOOL_RE = /^(?:YES|NO)$/i;
|
|
2969
|
+
var FILE_PATTERN_RE = /^[A-Za-z0-9_.*?+-]+$/;
|
|
2970
|
+
var PREDEFINED_RE = /^[A-Za-z_][A-Za-z0-9_]*(?:\([A-Za-z0-9_,. ]*\))?(?::?=.*)?$/;
|
|
2971
|
+
var ALIAS_DEF_RE = /^\w+(?:\{\d+\})?=/;
|
|
2972
|
+
var DOXYFILE_ALLOWED_KEYS = {
|
|
2973
|
+
ALIASES: (value) => ALIAS_DEF_RE.test(value),
|
|
2974
|
+
PREDEFINED: (value) => PREDEFINED_RE.test(value),
|
|
2975
|
+
FILE_PATTERNS: (value) => FILE_PATTERN_RE.test(value),
|
|
2976
|
+
OPTIMIZE_OUTPUT_FOR_C: (value) => BOOL_RE.test(value)
|
|
2977
|
+
};
|
|
2978
|
+
function joinContinuations(text) {
|
|
2979
|
+
const logical = [];
|
|
2980
|
+
let buffer = "";
|
|
2981
|
+
for (const rawLine of text.split(/\r?\n/)) {
|
|
2982
|
+
const line = rawLine.replace(/\s+$/, "");
|
|
2983
|
+
if (line.endsWith("\\") && !line.endsWith("\\\\")) {
|
|
2984
|
+
buffer += `${line.slice(0, -1)} `;
|
|
2985
|
+
continue;
|
|
2986
|
+
}
|
|
2987
|
+
buffer += line;
|
|
2988
|
+
logical.push(buffer);
|
|
2989
|
+
buffer = "";
|
|
2990
|
+
}
|
|
2991
|
+
if (buffer) {
|
|
2992
|
+
logical.push(buffer);
|
|
2993
|
+
}
|
|
2994
|
+
return logical;
|
|
2995
|
+
}
|
|
2996
|
+
function tokenizeValue(value) {
|
|
2997
|
+
const tokens = [];
|
|
2998
|
+
let i = 0;
|
|
2999
|
+
const n = value.length;
|
|
3000
|
+
while (i < n) {
|
|
3001
|
+
const ch = value[i];
|
|
3002
|
+
if (/\s/.test(ch ?? "")) {
|
|
3003
|
+
i++;
|
|
3004
|
+
continue;
|
|
3005
|
+
}
|
|
3006
|
+
if (ch === '"') {
|
|
3007
|
+
i++;
|
|
3008
|
+
let buf = "";
|
|
3009
|
+
while (i < n) {
|
|
3010
|
+
const c = value[i];
|
|
3011
|
+
if (c === "\\" && i + 1 < n && value[i + 1] === '"') {
|
|
3012
|
+
buf += '"';
|
|
3013
|
+
i += 2;
|
|
3014
|
+
continue;
|
|
3015
|
+
}
|
|
3016
|
+
if (c === '"') {
|
|
3017
|
+
i++;
|
|
3018
|
+
break;
|
|
3019
|
+
}
|
|
3020
|
+
buf += c;
|
|
3021
|
+
i++;
|
|
3022
|
+
}
|
|
3023
|
+
tokens.push(buf);
|
|
3024
|
+
} else {
|
|
3025
|
+
let j = i;
|
|
3026
|
+
while (j < n && !/\s/.test(value[j] ?? "")) {
|
|
3027
|
+
j++;
|
|
3028
|
+
}
|
|
3029
|
+
tokens.push(value.slice(i, j));
|
|
3030
|
+
i = j;
|
|
3031
|
+
}
|
|
3032
|
+
}
|
|
3033
|
+
return tokens;
|
|
3034
|
+
}
|
|
3035
|
+
function validateDoxyfileContent(content) {
|
|
3036
|
+
const errors = [];
|
|
3037
|
+
const droppedKeys = [];
|
|
3038
|
+
if (content.length > MAX_DOXYFILE_CONTENT_LENGTH) {
|
|
3039
|
+
errors.push(`doxyfileContent exceeds ${MAX_DOXYFILE_CONTENT_LENGTH} characters`);
|
|
3040
|
+
return { errors, droppedKeys };
|
|
3041
|
+
}
|
|
3042
|
+
for (const line of joinContinuations(content)) {
|
|
3043
|
+
const stripped = line.trim();
|
|
3044
|
+
if (!stripped || stripped.startsWith("#")) {
|
|
3045
|
+
continue;
|
|
3046
|
+
}
|
|
3047
|
+
if (AT_DIRECTIVE_RE.test(stripped)) {
|
|
3048
|
+
const directive = stripped.split(/\s+/)[0] ?? stripped;
|
|
3049
|
+
if (!droppedKeys.includes(directive)) {
|
|
3050
|
+
droppedKeys.push(directive);
|
|
3051
|
+
}
|
|
3052
|
+
continue;
|
|
3053
|
+
}
|
|
3054
|
+
const match = SETTING_LINE_RE.exec(line);
|
|
3055
|
+
if (match == null) {
|
|
3056
|
+
continue;
|
|
3057
|
+
}
|
|
3058
|
+
const key = match[1] ?? "";
|
|
3059
|
+
const rawValue = match[3] ?? "";
|
|
3060
|
+
const validator = DOXYFILE_ALLOWED_KEYS[key];
|
|
3061
|
+
if (validator == null) {
|
|
3062
|
+
if (!droppedKeys.includes(key)) {
|
|
3063
|
+
droppedKeys.push(key);
|
|
3064
|
+
}
|
|
3065
|
+
continue;
|
|
3066
|
+
}
|
|
3067
|
+
for (const token of tokenizeValue(rawValue)) {
|
|
3068
|
+
if (token.endsWith("\\") || token.includes("$(") || !validator(token)) {
|
|
3069
|
+
errors.push(`Invalid value for Doxyfile setting ${key}: ${JSON.stringify(token)}`);
|
|
3070
|
+
}
|
|
3071
|
+
}
|
|
3072
|
+
}
|
|
3073
|
+
return { errors, droppedKeys };
|
|
3074
|
+
}
|
|
3075
|
+
|
|
3076
|
+
// src/orpc-client/docs/v2/library-docs/contract.ts
|
|
2935
3077
|
var ALLOWED_HOSTNAMES = /* @__PURE__ */ new Set(["github.com", "gitlab.com"]);
|
|
2936
3078
|
var GithubUrlSchema = z14.string().url().describe(
|
|
2937
3079
|
"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>."
|
|
@@ -2966,8 +3108,13 @@ var LibraryDocsBaseConfigSchema = z14.object({
|
|
|
2966
3108
|
slug: z14.string().nullish()
|
|
2967
3109
|
});
|
|
2968
3110
|
var PythonLibraryDocsConfigSchema = LibraryDocsBaseConfigSchema;
|
|
3111
|
+
var SafeDoxyfileContentSchema = z14.string().superRefine((content, ctx) => {
|
|
3112
|
+
for (const error of validateDoxyfileContent(content).errors) {
|
|
3113
|
+
ctx.addIssue({ code: z14.ZodIssueCode.custom, message: error });
|
|
3114
|
+
}
|
|
3115
|
+
}).nullish();
|
|
2969
3116
|
var CppLibraryDocsConfigSchema = LibraryDocsBaseConfigSchema.extend({
|
|
2970
|
-
doxyfileContent:
|
|
3117
|
+
doxyfileContent: SafeDoxyfileContentSchema
|
|
2971
3118
|
});
|
|
2972
3119
|
var StartLibraryDocsGenerationInputSchema = z14.discriminatedUnion("language", [
|
|
2973
3120
|
z14.object({
|