@fern-api/fdr-sdk 1.2.93-9d4e38f080 → 1.2.94-cdc1690f8b
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/client/FdrClient.js +150 -6
- package/dist/js/client/FdrClient.js.map +1 -1
- package/dist/js/client/FdrClient.mjs +150 -6
- package/dist/js/client/FdrClient.mjs.map +1 -1
- package/dist/js/client/types.js.map +1 -1
- package/dist/js/client/types.mjs.map +1 -1
- package/dist/js/converters/index.js.map +1 -1
- package/dist/js/converters/index.mjs.map +1 -1
- package/dist/js/index.js +150 -6
- package/dist/js/index.js.map +1 -1
- package/dist/js/index.mjs +150 -6
- package/dist/js/index.mjs.map +1 -1
- package/dist/js/navigation/index.js.map +1 -1
- package/dist/js/navigation/index.mjs.map +1 -1
- package/dist/js/orpc-client.js +160 -8
- package/dist/js/orpc-client.js.map +1 -1
- package/dist/js/orpc-client.mjs +155 -7
- package/dist/js/orpc-client.mjs.map +1 -1
- package/dist/types/client/libraryDocs.d.ts +5 -0
- package/dist/types/client/libraryDocs.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/index.js
CHANGED
|
@@ -7234,7 +7234,9 @@ var GetDocsStatusResponseSchema = z7.object({
|
|
|
7234
7234
|
});
|
|
7235
7235
|
var GetDocsDeploymentsResponseSchema = z7.object({
|
|
7236
7236
|
deployments: z7.array(DocsDeploymentSchema),
|
|
7237
|
-
hasMore: z7.boolean()
|
|
7237
|
+
hasMore: z7.boolean(),
|
|
7238
|
+
/** Pass back as `cursor` to fetch the next page. Absent when `hasMore` is false. */
|
|
7239
|
+
nextCursor: z7.string().optional()
|
|
7238
7240
|
});
|
|
7239
7241
|
var CreateDeploymentResponseSchema = z7.object({
|
|
7240
7242
|
deploymentId: z7.string()
|
|
@@ -7392,7 +7394,9 @@ var DashboardFeedbackInputSchema = z9.object({
|
|
|
7392
7394
|
domain: z9.string().min(1),
|
|
7393
7395
|
dateRange: z9.string().optional(),
|
|
7394
7396
|
feedbackType: z9.enum(["page", "code_block", "all"]).optional(),
|
|
7395
|
-
limit: z9.number().int().min(1).max(50).optional()
|
|
7397
|
+
limit: z9.number().int().min(1).max(50).optional(),
|
|
7398
|
+
/** `nextCursor` from a previous page; continues that page's ordering. */
|
|
7399
|
+
cursor: z9.string().optional()
|
|
7396
7400
|
});
|
|
7397
7401
|
var DashboardListOrgMembersInputSchema = z9.object({
|
|
7398
7402
|
orgId: z9.string(),
|
|
@@ -7451,20 +7455,37 @@ var LlmBotTrafficResponseSchema = z9.object({
|
|
|
7451
7455
|
});
|
|
7452
7456
|
var RecentFeedbackResponseSchema = z9.object({
|
|
7453
7457
|
resolvedDateRange: ResolvedDateRangeSchema,
|
|
7458
|
+
/**
|
|
7459
|
+
* Vote counts over the whole date range, not just the returned page, and over page
|
|
7460
|
+
* feedback only: code-block reports carry no helpful/unhelpful vote and are counted
|
|
7461
|
+
* by `codeBlockCount` instead.
|
|
7462
|
+
*/
|
|
7454
7463
|
helpfulCount: z9.number(),
|
|
7455
7464
|
unhelpfulCount: z9.number(),
|
|
7465
|
+
codeBlockCount: z9.number(),
|
|
7466
|
+
/** Entries matching the filters over the whole date range. */
|
|
7467
|
+
totalCount: z9.number(),
|
|
7456
7468
|
entries: z9.array(
|
|
7457
7469
|
z9.object({
|
|
7458
7470
|
date: z9.string(),
|
|
7459
7471
|
location: z9.string(),
|
|
7472
|
+
/** Always false for code-block reports, which carry no vote. */
|
|
7460
7473
|
wasHelpful: z9.boolean(),
|
|
7461
7474
|
userFeedback: z9.string(),
|
|
7462
7475
|
feedbackType: z9.string().optional(),
|
|
7463
7476
|
/** URL of the docs page the feedback was submitted on. */
|
|
7464
|
-
url: z9.string().optional()
|
|
7477
|
+
url: z9.string().optional(),
|
|
7478
|
+
/** What the reader selected on the page, for page feedback. */
|
|
7479
|
+
selection: z9.string().optional(),
|
|
7480
|
+
/** Language of the code block a code-block report was filed against. */
|
|
7481
|
+
language: z9.string().optional(),
|
|
7482
|
+
/** The reported code block, truncated. */
|
|
7483
|
+
code: z9.string().optional()
|
|
7465
7484
|
})
|
|
7466
7485
|
),
|
|
7467
|
-
hasMore: z9.boolean()
|
|
7486
|
+
hasMore: z9.boolean(),
|
|
7487
|
+
/** Pass back as `cursor` to fetch the next page. Absent when `hasMore` is false. */
|
|
7488
|
+
nextCursor: z9.string().optional()
|
|
7468
7489
|
});
|
|
7469
7490
|
var QueryAnalyticsResponseSchema = z9.object({
|
|
7470
7491
|
resolvedDateRange: ResolvedDateRangeSchema,
|
|
@@ -7479,7 +7500,11 @@ var QueryAnalyticsResponseSchema = z9.object({
|
|
|
7479
7500
|
visitors: z9.number().optional(),
|
|
7480
7501
|
sessions: z9.number().optional()
|
|
7481
7502
|
})
|
|
7482
|
-
)
|
|
7503
|
+
),
|
|
7504
|
+
/** The row cap the query ran with, after clamping. */
|
|
7505
|
+
limit: z9.number(),
|
|
7506
|
+
/** True when the metric had more rows than `limit`, so `rows` is a truncated ranking. */
|
|
7507
|
+
hasMore: z9.boolean()
|
|
7483
7508
|
});
|
|
7484
7509
|
var OrgMembersResponseSchema = z9.object({
|
|
7485
7510
|
members: z9.array(
|
|
@@ -8400,6 +8425,120 @@ var import_fetch5 = require("@orpc/openapi-client/fetch");
|
|
|
8400
8425
|
// src/orpc-client/docs/v2/library-docs/contract.ts
|
|
8401
8426
|
var import_contract10 = require("@orpc/contract");
|
|
8402
8427
|
var z14 = __toESM(require("zod"), 1);
|
|
8428
|
+
|
|
8429
|
+
// src/orpc-client/docs/v2/library-docs/doxyfile.ts
|
|
8430
|
+
var MAX_DOXYFILE_CONTENT_LENGTH = 262144;
|
|
8431
|
+
var SETTING_LINE_RE = /^\s*([A-Z][A-Z0-9_]*)\s*(\+?=)(.*)$/;
|
|
8432
|
+
var AT_DIRECTIVE_RE = /^\s*@[A-Z_]+\b/;
|
|
8433
|
+
var BOOL_RE = /^(?:YES|NO)$/i;
|
|
8434
|
+
var FILE_PATTERN_RE = /^[A-Za-z0-9_.*?+-]+$/;
|
|
8435
|
+
var PREDEFINED_RE = /^[A-Za-z_][A-Za-z0-9_]*(?:\([A-Za-z0-9_,. ]*\))?(?::?=.*)?$/;
|
|
8436
|
+
var ALIAS_DEF_RE = /^\w+(?:\{\d+\})?=/;
|
|
8437
|
+
var DOXYFILE_ALLOWED_KEYS = {
|
|
8438
|
+
ALIASES: (value) => ALIAS_DEF_RE.test(value),
|
|
8439
|
+
PREDEFINED: (value) => PREDEFINED_RE.test(value),
|
|
8440
|
+
FILE_PATTERNS: (value) => FILE_PATTERN_RE.test(value),
|
|
8441
|
+
OPTIMIZE_OUTPUT_FOR_C: (value) => BOOL_RE.test(value)
|
|
8442
|
+
};
|
|
8443
|
+
function joinContinuations(text) {
|
|
8444
|
+
const logical = [];
|
|
8445
|
+
let buffer = "";
|
|
8446
|
+
for (const rawLine of text.split(/\r?\n/)) {
|
|
8447
|
+
const line = rawLine.replace(/\s+$/, "");
|
|
8448
|
+
if (line.endsWith("\\") && !line.endsWith("\\\\")) {
|
|
8449
|
+
buffer += `${line.slice(0, -1)} `;
|
|
8450
|
+
continue;
|
|
8451
|
+
}
|
|
8452
|
+
buffer += line;
|
|
8453
|
+
logical.push(buffer);
|
|
8454
|
+
buffer = "";
|
|
8455
|
+
}
|
|
8456
|
+
if (buffer) {
|
|
8457
|
+
logical.push(buffer);
|
|
8458
|
+
}
|
|
8459
|
+
return logical;
|
|
8460
|
+
}
|
|
8461
|
+
function tokenizeValue(value) {
|
|
8462
|
+
const tokens = [];
|
|
8463
|
+
let i = 0;
|
|
8464
|
+
const n = value.length;
|
|
8465
|
+
while (i < n) {
|
|
8466
|
+
const ch = value[i];
|
|
8467
|
+
if (/\s/.test(ch ?? "")) {
|
|
8468
|
+
i++;
|
|
8469
|
+
continue;
|
|
8470
|
+
}
|
|
8471
|
+
if (ch === '"') {
|
|
8472
|
+
i++;
|
|
8473
|
+
let buf = "";
|
|
8474
|
+
while (i < n) {
|
|
8475
|
+
const c = value[i];
|
|
8476
|
+
if (c === "\\" && i + 1 < n && value[i + 1] === '"') {
|
|
8477
|
+
buf += '"';
|
|
8478
|
+
i += 2;
|
|
8479
|
+
continue;
|
|
8480
|
+
}
|
|
8481
|
+
if (c === '"') {
|
|
8482
|
+
i++;
|
|
8483
|
+
break;
|
|
8484
|
+
}
|
|
8485
|
+
buf += c;
|
|
8486
|
+
i++;
|
|
8487
|
+
}
|
|
8488
|
+
tokens.push(buf);
|
|
8489
|
+
} else {
|
|
8490
|
+
let j = i;
|
|
8491
|
+
while (j < n && !/\s/.test(value[j] ?? "")) {
|
|
8492
|
+
j++;
|
|
8493
|
+
}
|
|
8494
|
+
tokens.push(value.slice(i, j));
|
|
8495
|
+
i = j;
|
|
8496
|
+
}
|
|
8497
|
+
}
|
|
8498
|
+
return tokens;
|
|
8499
|
+
}
|
|
8500
|
+
function validateDoxyfileContent(content) {
|
|
8501
|
+
const errors = [];
|
|
8502
|
+
const droppedKeys = [];
|
|
8503
|
+
if (content.length > MAX_DOXYFILE_CONTENT_LENGTH) {
|
|
8504
|
+
errors.push(`doxyfileContent exceeds ${MAX_DOXYFILE_CONTENT_LENGTH} characters`);
|
|
8505
|
+
return { errors, droppedKeys };
|
|
8506
|
+
}
|
|
8507
|
+
for (const line of joinContinuations(content)) {
|
|
8508
|
+
const stripped = line.trim();
|
|
8509
|
+
if (!stripped || stripped.startsWith("#")) {
|
|
8510
|
+
continue;
|
|
8511
|
+
}
|
|
8512
|
+
if (AT_DIRECTIVE_RE.test(stripped)) {
|
|
8513
|
+
const directive = stripped.split(/\s+/)[0] ?? stripped;
|
|
8514
|
+
if (!droppedKeys.includes(directive)) {
|
|
8515
|
+
droppedKeys.push(directive);
|
|
8516
|
+
}
|
|
8517
|
+
continue;
|
|
8518
|
+
}
|
|
8519
|
+
const match = SETTING_LINE_RE.exec(line);
|
|
8520
|
+
if (match == null) {
|
|
8521
|
+
continue;
|
|
8522
|
+
}
|
|
8523
|
+
const key = match[1] ?? "";
|
|
8524
|
+
const rawValue = match[3] ?? "";
|
|
8525
|
+
const validator = DOXYFILE_ALLOWED_KEYS[key];
|
|
8526
|
+
if (validator == null) {
|
|
8527
|
+
if (!droppedKeys.includes(key)) {
|
|
8528
|
+
droppedKeys.push(key);
|
|
8529
|
+
}
|
|
8530
|
+
continue;
|
|
8531
|
+
}
|
|
8532
|
+
for (const token of tokenizeValue(rawValue)) {
|
|
8533
|
+
if (token.endsWith("\\") || token.includes("$(") || !validator(token)) {
|
|
8534
|
+
errors.push(`Invalid value for Doxyfile setting ${key}: ${JSON.stringify(token)}`);
|
|
8535
|
+
}
|
|
8536
|
+
}
|
|
8537
|
+
}
|
|
8538
|
+
return { errors, droppedKeys };
|
|
8539
|
+
}
|
|
8540
|
+
|
|
8541
|
+
// src/orpc-client/docs/v2/library-docs/contract.ts
|
|
8403
8542
|
var ALLOWED_HOSTNAMES = /* @__PURE__ */ new Set(["github.com", "gitlab.com"]);
|
|
8404
8543
|
var GithubUrlSchema = z14.string().url().describe(
|
|
8405
8544
|
"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>."
|
|
@@ -8434,8 +8573,13 @@ var LibraryDocsBaseConfigSchema = z14.object({
|
|
|
8434
8573
|
slug: z14.string().nullish()
|
|
8435
8574
|
});
|
|
8436
8575
|
var PythonLibraryDocsConfigSchema = LibraryDocsBaseConfigSchema;
|
|
8576
|
+
var SafeDoxyfileContentSchema = z14.string().superRefine((content, ctx) => {
|
|
8577
|
+
for (const error of validateDoxyfileContent(content).errors) {
|
|
8578
|
+
ctx.addIssue({ code: z14.ZodIssueCode.custom, message: error });
|
|
8579
|
+
}
|
|
8580
|
+
}).nullish();
|
|
8437
8581
|
var CppLibraryDocsConfigSchema = LibraryDocsBaseConfigSchema.extend({
|
|
8438
|
-
doxyfileContent:
|
|
8582
|
+
doxyfileContent: SafeDoxyfileContentSchema
|
|
8439
8583
|
});
|
|
8440
8584
|
var StartLibraryDocsGenerationInputSchema = z14.discriminatedUnion("language", [
|
|
8441
8585
|
z14.object({
|