@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
|
@@ -786,7 +786,8 @@ var RegisterWebSocketChannelSchema = z3.object({
|
|
|
786
786
|
headers: z3.array(HeaderSchema),
|
|
787
787
|
queryParameters: z3.array(QueryParameterSchema),
|
|
788
788
|
messages: z3.array(WebSocketMessageSchema),
|
|
789
|
-
examples: z3.array(ExampleWebSocketSessionSchema)
|
|
789
|
+
examples: z3.array(ExampleWebSocketSessionSchema),
|
|
790
|
+
includeInApiExplorer: z3.boolean().nullish()
|
|
790
791
|
});
|
|
791
792
|
var SourceIdSchema = z3.string();
|
|
792
793
|
var SourceSchema = z3.discriminatedUnion("type", [
|
|
@@ -1387,7 +1388,8 @@ var LatestWebSocketChannelSchema = z4.object({
|
|
|
1387
1388
|
pathParameters: z4.array(LatestParameterPropertySchema).nullish(),
|
|
1388
1389
|
queryParameters: z4.array(LatestParameterPropertySchema).nullish(),
|
|
1389
1390
|
requestHeaders: z4.array(LatestObjectPropertySchema).nullish(),
|
|
1390
|
-
examples: z4.array(LatestExampleWebSocketSessionSchema).nullish()
|
|
1391
|
+
examples: z4.array(LatestExampleWebSocketSessionSchema).nullish(),
|
|
1392
|
+
includeInApiExplorer: z4.boolean().nullish()
|
|
1391
1393
|
});
|
|
1392
1394
|
var LatestSubpackageMetadataSchema = z4.object({
|
|
1393
1395
|
id: SubpackageIdSchema,
|
|
@@ -1634,7 +1636,8 @@ var ReadWebSocketChannelSchema = z5.object({
|
|
|
1634
1636
|
headers: z5.array(HeaderSchema),
|
|
1635
1637
|
queryParameters: z5.array(QueryParameterSchema),
|
|
1636
1638
|
messages: z5.array(WebSocketMessageSchema),
|
|
1637
|
-
examples: z5.array(ExampleWebSocketSessionSchema)
|
|
1639
|
+
examples: z5.array(ExampleWebSocketSessionSchema),
|
|
1640
|
+
includeInApiExplorer: z5.boolean().nullish()
|
|
1638
1641
|
});
|
|
1639
1642
|
var ReadApiDefinitionPackageSchema = z5.object({
|
|
1640
1643
|
endpoints: z5.array(ReadEndpointDefinitionSchema),
|
|
@@ -1837,7 +1840,9 @@ var GetDocsStatusResponseSchema = z7.object({
|
|
|
1837
1840
|
});
|
|
1838
1841
|
var GetDocsDeploymentsResponseSchema = z7.object({
|
|
1839
1842
|
deployments: z7.array(DocsDeploymentSchema),
|
|
1840
|
-
hasMore: z7.boolean()
|
|
1843
|
+
hasMore: z7.boolean(),
|
|
1844
|
+
/** Pass back as `cursor` to fetch the next page. Absent when `hasMore` is false. */
|
|
1845
|
+
nextCursor: z7.string().optional()
|
|
1841
1846
|
});
|
|
1842
1847
|
var CreateDeploymentResponseSchema = z7.object({
|
|
1843
1848
|
deploymentId: z7.string()
|
|
@@ -1995,7 +2000,9 @@ var DashboardFeedbackInputSchema = z9.object({
|
|
|
1995
2000
|
domain: z9.string().min(1),
|
|
1996
2001
|
dateRange: z9.string().optional(),
|
|
1997
2002
|
feedbackType: z9.enum(["page", "code_block", "all"]).optional(),
|
|
1998
|
-
limit: z9.number().int().min(1).max(50).optional()
|
|
2003
|
+
limit: z9.number().int().min(1).max(50).optional(),
|
|
2004
|
+
/** `nextCursor` from a previous page; continues that page's ordering. */
|
|
2005
|
+
cursor: z9.string().optional()
|
|
1999
2006
|
});
|
|
2000
2007
|
var DashboardListOrgMembersInputSchema = z9.object({
|
|
2001
2008
|
orgId: z9.string(),
|
|
@@ -2054,20 +2061,37 @@ var LlmBotTrafficResponseSchema = z9.object({
|
|
|
2054
2061
|
});
|
|
2055
2062
|
var RecentFeedbackResponseSchema = z9.object({
|
|
2056
2063
|
resolvedDateRange: ResolvedDateRangeSchema,
|
|
2064
|
+
/**
|
|
2065
|
+
* Vote counts over the whole date range, not just the returned page, and over page
|
|
2066
|
+
* feedback only: code-block reports carry no helpful/unhelpful vote and are counted
|
|
2067
|
+
* by `codeBlockCount` instead.
|
|
2068
|
+
*/
|
|
2057
2069
|
helpfulCount: z9.number(),
|
|
2058
2070
|
unhelpfulCount: z9.number(),
|
|
2071
|
+
codeBlockCount: z9.number(),
|
|
2072
|
+
/** Entries matching the filters over the whole date range. */
|
|
2073
|
+
totalCount: z9.number(),
|
|
2059
2074
|
entries: z9.array(
|
|
2060
2075
|
z9.object({
|
|
2061
2076
|
date: z9.string(),
|
|
2062
2077
|
location: z9.string(),
|
|
2078
|
+
/** Always false for code-block reports, which carry no vote. */
|
|
2063
2079
|
wasHelpful: z9.boolean(),
|
|
2064
2080
|
userFeedback: z9.string(),
|
|
2065
2081
|
feedbackType: z9.string().optional(),
|
|
2066
2082
|
/** URL of the docs page the feedback was submitted on. */
|
|
2067
|
-
url: z9.string().optional()
|
|
2083
|
+
url: z9.string().optional(),
|
|
2084
|
+
/** What the reader selected on the page, for page feedback. */
|
|
2085
|
+
selection: z9.string().optional(),
|
|
2086
|
+
/** Language of the code block a code-block report was filed against. */
|
|
2087
|
+
language: z9.string().optional(),
|
|
2088
|
+
/** The reported code block, truncated. */
|
|
2089
|
+
code: z9.string().optional()
|
|
2068
2090
|
})
|
|
2069
2091
|
),
|
|
2070
|
-
hasMore: z9.boolean()
|
|
2092
|
+
hasMore: z9.boolean(),
|
|
2093
|
+
/** Pass back as `cursor` to fetch the next page. Absent when `hasMore` is false. */
|
|
2094
|
+
nextCursor: z9.string().optional()
|
|
2071
2095
|
});
|
|
2072
2096
|
var QueryAnalyticsResponseSchema = z9.object({
|
|
2073
2097
|
resolvedDateRange: ResolvedDateRangeSchema,
|
|
@@ -2082,7 +2106,11 @@ var QueryAnalyticsResponseSchema = z9.object({
|
|
|
2082
2106
|
visitors: z9.number().optional(),
|
|
2083
2107
|
sessions: z9.number().optional()
|
|
2084
2108
|
})
|
|
2085
|
-
)
|
|
2109
|
+
),
|
|
2110
|
+
/** The row cap the query ran with, after clamping. */
|
|
2111
|
+
limit: z9.number(),
|
|
2112
|
+
/** True when the metric had more rows than `limit`, so `rows` is a truncated ranking. */
|
|
2113
|
+
hasMore: z9.boolean()
|
|
2086
2114
|
});
|
|
2087
2115
|
var OrgMembersResponseSchema = z9.object({
|
|
2088
2116
|
members: z9.array(
|
|
@@ -2969,6 +2997,120 @@ var import_fetch5 = require("@orpc/openapi-client/fetch");
|
|
|
2969
2997
|
// src/orpc-client/docs/v2/library-docs/contract.ts
|
|
2970
2998
|
var import_contract10 = require("@orpc/contract");
|
|
2971
2999
|
var z14 = __toESM(require("zod"), 1);
|
|
3000
|
+
|
|
3001
|
+
// src/orpc-client/docs/v2/library-docs/doxyfile.ts
|
|
3002
|
+
var MAX_DOXYFILE_CONTENT_LENGTH = 262144;
|
|
3003
|
+
var SETTING_LINE_RE = /^\s*([A-Z][A-Z0-9_]*)\s*(\+?=)(.*)$/;
|
|
3004
|
+
var AT_DIRECTIVE_RE = /^\s*@[A-Z_]+\b/;
|
|
3005
|
+
var BOOL_RE = /^(?:YES|NO)$/i;
|
|
3006
|
+
var FILE_PATTERN_RE = /^[A-Za-z0-9_.*?+-]+$/;
|
|
3007
|
+
var PREDEFINED_RE = /^[A-Za-z_][A-Za-z0-9_]*(?:\([A-Za-z0-9_,. ]*\))?(?::?=.*)?$/;
|
|
3008
|
+
var ALIAS_DEF_RE = /^\w+(?:\{\d+\})?=/;
|
|
3009
|
+
var DOXYFILE_ALLOWED_KEYS = {
|
|
3010
|
+
ALIASES: (value) => ALIAS_DEF_RE.test(value),
|
|
3011
|
+
PREDEFINED: (value) => PREDEFINED_RE.test(value),
|
|
3012
|
+
FILE_PATTERNS: (value) => FILE_PATTERN_RE.test(value),
|
|
3013
|
+
OPTIMIZE_OUTPUT_FOR_C: (value) => BOOL_RE.test(value)
|
|
3014
|
+
};
|
|
3015
|
+
function joinContinuations(text) {
|
|
3016
|
+
const logical = [];
|
|
3017
|
+
let buffer = "";
|
|
3018
|
+
for (const rawLine of text.split(/\r?\n/)) {
|
|
3019
|
+
const line = rawLine.replace(/\s+$/, "");
|
|
3020
|
+
if (line.endsWith("\\") && !line.endsWith("\\\\")) {
|
|
3021
|
+
buffer += `${line.slice(0, -1)} `;
|
|
3022
|
+
continue;
|
|
3023
|
+
}
|
|
3024
|
+
buffer += line;
|
|
3025
|
+
logical.push(buffer);
|
|
3026
|
+
buffer = "";
|
|
3027
|
+
}
|
|
3028
|
+
if (buffer) {
|
|
3029
|
+
logical.push(buffer);
|
|
3030
|
+
}
|
|
3031
|
+
return logical;
|
|
3032
|
+
}
|
|
3033
|
+
function tokenizeValue(value) {
|
|
3034
|
+
const tokens = [];
|
|
3035
|
+
let i = 0;
|
|
3036
|
+
const n = value.length;
|
|
3037
|
+
while (i < n) {
|
|
3038
|
+
const ch = value[i];
|
|
3039
|
+
if (/\s/.test(ch ?? "")) {
|
|
3040
|
+
i++;
|
|
3041
|
+
continue;
|
|
3042
|
+
}
|
|
3043
|
+
if (ch === '"') {
|
|
3044
|
+
i++;
|
|
3045
|
+
let buf = "";
|
|
3046
|
+
while (i < n) {
|
|
3047
|
+
const c = value[i];
|
|
3048
|
+
if (c === "\\" && i + 1 < n && value[i + 1] === '"') {
|
|
3049
|
+
buf += '"';
|
|
3050
|
+
i += 2;
|
|
3051
|
+
continue;
|
|
3052
|
+
}
|
|
3053
|
+
if (c === '"') {
|
|
3054
|
+
i++;
|
|
3055
|
+
break;
|
|
3056
|
+
}
|
|
3057
|
+
buf += c;
|
|
3058
|
+
i++;
|
|
3059
|
+
}
|
|
3060
|
+
tokens.push(buf);
|
|
3061
|
+
} else {
|
|
3062
|
+
let j = i;
|
|
3063
|
+
while (j < n && !/\s/.test(value[j] ?? "")) {
|
|
3064
|
+
j++;
|
|
3065
|
+
}
|
|
3066
|
+
tokens.push(value.slice(i, j));
|
|
3067
|
+
i = j;
|
|
3068
|
+
}
|
|
3069
|
+
}
|
|
3070
|
+
return tokens;
|
|
3071
|
+
}
|
|
3072
|
+
function validateDoxyfileContent(content) {
|
|
3073
|
+
const errors = [];
|
|
3074
|
+
const droppedKeys = [];
|
|
3075
|
+
if (content.length > MAX_DOXYFILE_CONTENT_LENGTH) {
|
|
3076
|
+
errors.push(`doxyfileContent exceeds ${MAX_DOXYFILE_CONTENT_LENGTH} characters`);
|
|
3077
|
+
return { errors, droppedKeys };
|
|
3078
|
+
}
|
|
3079
|
+
for (const line of joinContinuations(content)) {
|
|
3080
|
+
const stripped = line.trim();
|
|
3081
|
+
if (!stripped || stripped.startsWith("#")) {
|
|
3082
|
+
continue;
|
|
3083
|
+
}
|
|
3084
|
+
if (AT_DIRECTIVE_RE.test(stripped)) {
|
|
3085
|
+
const directive = stripped.split(/\s+/)[0] ?? stripped;
|
|
3086
|
+
if (!droppedKeys.includes(directive)) {
|
|
3087
|
+
droppedKeys.push(directive);
|
|
3088
|
+
}
|
|
3089
|
+
continue;
|
|
3090
|
+
}
|
|
3091
|
+
const match = SETTING_LINE_RE.exec(line);
|
|
3092
|
+
if (match == null) {
|
|
3093
|
+
continue;
|
|
3094
|
+
}
|
|
3095
|
+
const key = match[1] ?? "";
|
|
3096
|
+
const rawValue = match[3] ?? "";
|
|
3097
|
+
const validator = DOXYFILE_ALLOWED_KEYS[key];
|
|
3098
|
+
if (validator == null) {
|
|
3099
|
+
if (!droppedKeys.includes(key)) {
|
|
3100
|
+
droppedKeys.push(key);
|
|
3101
|
+
}
|
|
3102
|
+
continue;
|
|
3103
|
+
}
|
|
3104
|
+
for (const token of tokenizeValue(rawValue)) {
|
|
3105
|
+
if (token.endsWith("\\") || token.includes("$(") || !validator(token)) {
|
|
3106
|
+
errors.push(`Invalid value for Doxyfile setting ${key}: ${JSON.stringify(token)}`);
|
|
3107
|
+
}
|
|
3108
|
+
}
|
|
3109
|
+
}
|
|
3110
|
+
return { errors, droppedKeys };
|
|
3111
|
+
}
|
|
3112
|
+
|
|
3113
|
+
// src/orpc-client/docs/v2/library-docs/contract.ts
|
|
2972
3114
|
var ALLOWED_HOSTNAMES = /* @__PURE__ */ new Set(["github.com", "gitlab.com"]);
|
|
2973
3115
|
var GithubUrlSchema = z14.string().url().describe(
|
|
2974
3116
|
"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>."
|
|
@@ -3003,8 +3145,13 @@ var LibraryDocsBaseConfigSchema = z14.object({
|
|
|
3003
3145
|
slug: z14.string().nullish()
|
|
3004
3146
|
});
|
|
3005
3147
|
var PythonLibraryDocsConfigSchema = LibraryDocsBaseConfigSchema;
|
|
3148
|
+
var SafeDoxyfileContentSchema = z14.string().superRefine((content, ctx) => {
|
|
3149
|
+
for (const error of validateDoxyfileContent(content).errors) {
|
|
3150
|
+
ctx.addIssue({ code: z14.ZodIssueCode.custom, message: error });
|
|
3151
|
+
}
|
|
3152
|
+
}).nullish();
|
|
3006
3153
|
var CppLibraryDocsConfigSchema = LibraryDocsBaseConfigSchema.extend({
|
|
3007
|
-
doxyfileContent:
|
|
3154
|
+
doxyfileContent: SafeDoxyfileContentSchema
|
|
3008
3155
|
});
|
|
3009
3156
|
var StartLibraryDocsGenerationInputSchema = z14.discriminatedUnion("language", [
|
|
3010
3157
|
z14.object({
|