@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/index.js
CHANGED
|
@@ -1829,7 +1829,8 @@ var RegisterWebSocketChannelSchema = z3.object({
|
|
|
1829
1829
|
headers: z3.array(HeaderSchema),
|
|
1830
1830
|
queryParameters: z3.array(QueryParameterSchema),
|
|
1831
1831
|
messages: z3.array(WebSocketMessageSchema),
|
|
1832
|
-
examples: z3.array(ExampleWebSocketSessionSchema)
|
|
1832
|
+
examples: z3.array(ExampleWebSocketSessionSchema),
|
|
1833
|
+
includeInApiExplorer: z3.boolean().nullish()
|
|
1833
1834
|
});
|
|
1834
1835
|
var SourceIdSchema = z3.string();
|
|
1835
1836
|
function SourceId(value) {
|
|
@@ -2433,7 +2434,8 @@ var LatestWebSocketChannelSchema = z4.object({
|
|
|
2433
2434
|
pathParameters: z4.array(LatestParameterPropertySchema).nullish(),
|
|
2434
2435
|
queryParameters: z4.array(LatestParameterPropertySchema).nullish(),
|
|
2435
2436
|
requestHeaders: z4.array(LatestObjectPropertySchema).nullish(),
|
|
2436
|
-
examples: z4.array(LatestExampleWebSocketSessionSchema).nullish()
|
|
2437
|
+
examples: z4.array(LatestExampleWebSocketSessionSchema).nullish(),
|
|
2438
|
+
includeInApiExplorer: z4.boolean().nullish()
|
|
2437
2439
|
});
|
|
2438
2440
|
var LatestSubpackageMetadataSchema = z4.object({
|
|
2439
2441
|
id: SubpackageIdSchema,
|
|
@@ -4591,7 +4593,8 @@ var ApiDefinitionV1ToLatest = class _ApiDefinitionV1ToLatest {
|
|
|
4591
4593
|
pathParameters: this.migratePathOrQueryParameters(v1?.path?.pathParameters),
|
|
4592
4594
|
queryParameters: this.migratePathOrQueryParameters(v1?.queryParameters),
|
|
4593
4595
|
requestHeaders: this.migrateParameters(v1?.headers),
|
|
4594
|
-
examples: this.migrateChannelExamples(v1?.examples, messages)
|
|
4596
|
+
examples: this.migrateChannelExamples(v1?.examples, messages),
|
|
4597
|
+
includeInApiExplorer: v1?.includeInApiExplorer ?? true
|
|
4595
4598
|
};
|
|
4596
4599
|
};
|
|
4597
4600
|
migrateWebhook = (id, v1, namespace) => {
|
|
@@ -7027,7 +7030,8 @@ var ReadWebSocketChannelSchema = z5.object({
|
|
|
7027
7030
|
headers: z5.array(HeaderSchema),
|
|
7028
7031
|
queryParameters: z5.array(QueryParameterSchema),
|
|
7029
7032
|
messages: z5.array(WebSocketMessageSchema),
|
|
7030
|
-
examples: z5.array(ExampleWebSocketSessionSchema)
|
|
7033
|
+
examples: z5.array(ExampleWebSocketSessionSchema),
|
|
7034
|
+
includeInApiExplorer: z5.boolean().nullish()
|
|
7031
7035
|
});
|
|
7032
7036
|
var ReadApiDefinitionPackageSchema = z5.object({
|
|
7033
7037
|
endpoints: z5.array(ReadEndpointDefinitionSchema),
|
|
@@ -7230,7 +7234,9 @@ var GetDocsStatusResponseSchema = z7.object({
|
|
|
7230
7234
|
});
|
|
7231
7235
|
var GetDocsDeploymentsResponseSchema = z7.object({
|
|
7232
7236
|
deployments: z7.array(DocsDeploymentSchema),
|
|
7233
|
-
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()
|
|
7234
7240
|
});
|
|
7235
7241
|
var CreateDeploymentResponseSchema = z7.object({
|
|
7236
7242
|
deploymentId: z7.string()
|
|
@@ -7388,7 +7394,9 @@ var DashboardFeedbackInputSchema = z9.object({
|
|
|
7388
7394
|
domain: z9.string().min(1),
|
|
7389
7395
|
dateRange: z9.string().optional(),
|
|
7390
7396
|
feedbackType: z9.enum(["page", "code_block", "all"]).optional(),
|
|
7391
|
-
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()
|
|
7392
7400
|
});
|
|
7393
7401
|
var DashboardListOrgMembersInputSchema = z9.object({
|
|
7394
7402
|
orgId: z9.string(),
|
|
@@ -7447,20 +7455,37 @@ var LlmBotTrafficResponseSchema = z9.object({
|
|
|
7447
7455
|
});
|
|
7448
7456
|
var RecentFeedbackResponseSchema = z9.object({
|
|
7449
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
|
+
*/
|
|
7450
7463
|
helpfulCount: z9.number(),
|
|
7451
7464
|
unhelpfulCount: z9.number(),
|
|
7465
|
+
codeBlockCount: z9.number(),
|
|
7466
|
+
/** Entries matching the filters over the whole date range. */
|
|
7467
|
+
totalCount: z9.number(),
|
|
7452
7468
|
entries: z9.array(
|
|
7453
7469
|
z9.object({
|
|
7454
7470
|
date: z9.string(),
|
|
7455
7471
|
location: z9.string(),
|
|
7472
|
+
/** Always false for code-block reports, which carry no vote. */
|
|
7456
7473
|
wasHelpful: z9.boolean(),
|
|
7457
7474
|
userFeedback: z9.string(),
|
|
7458
7475
|
feedbackType: z9.string().optional(),
|
|
7459
7476
|
/** URL of the docs page the feedback was submitted on. */
|
|
7460
|
-
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()
|
|
7461
7484
|
})
|
|
7462
7485
|
),
|
|
7463
|
-
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()
|
|
7464
7489
|
});
|
|
7465
7490
|
var QueryAnalyticsResponseSchema = z9.object({
|
|
7466
7491
|
resolvedDateRange: ResolvedDateRangeSchema,
|
|
@@ -7475,7 +7500,11 @@ var QueryAnalyticsResponseSchema = z9.object({
|
|
|
7475
7500
|
visitors: z9.number().optional(),
|
|
7476
7501
|
sessions: z9.number().optional()
|
|
7477
7502
|
})
|
|
7478
|
-
)
|
|
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()
|
|
7479
7508
|
});
|
|
7480
7509
|
var OrgMembersResponseSchema = z9.object({
|
|
7481
7510
|
members: z9.array(
|
|
@@ -8396,6 +8425,120 @@ var import_fetch5 = require("@orpc/openapi-client/fetch");
|
|
|
8396
8425
|
// src/orpc-client/docs/v2/library-docs/contract.ts
|
|
8397
8426
|
var import_contract10 = require("@orpc/contract");
|
|
8398
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
|
|
8399
8542
|
var ALLOWED_HOSTNAMES = /* @__PURE__ */ new Set(["github.com", "gitlab.com"]);
|
|
8400
8543
|
var GithubUrlSchema = z14.string().url().describe(
|
|
8401
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>."
|
|
@@ -8430,8 +8573,13 @@ var LibraryDocsBaseConfigSchema = z14.object({
|
|
|
8430
8573
|
slug: z14.string().nullish()
|
|
8431
8574
|
});
|
|
8432
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();
|
|
8433
8581
|
var CppLibraryDocsConfigSchema = LibraryDocsBaseConfigSchema.extend({
|
|
8434
|
-
doxyfileContent:
|
|
8582
|
+
doxyfileContent: SafeDoxyfileContentSchema
|
|
8435
8583
|
});
|
|
8436
8584
|
var StartLibraryDocsGenerationInputSchema = z14.discriminatedUnion("language", [
|
|
8437
8585
|
z14.object({
|
|
@@ -14006,7 +14154,8 @@ function transformWebsocket({ writeShape }) {
|
|
|
14006
14154
|
name: writeShape.name,
|
|
14007
14155
|
path: writeShape.path,
|
|
14008
14156
|
queryParameters: writeShape.queryParameters,
|
|
14009
|
-
examples: writeShape.examples
|
|
14157
|
+
examples: writeShape.examples,
|
|
14158
|
+
includeInApiExplorer: writeShape.includeInApiExplorer
|
|
14010
14159
|
};
|
|
14011
14160
|
}
|
|
14012
14161
|
function transformWebhook({
|