@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.
Files changed (33) hide show
  1. package/dist/js/client/FdrClient.js +150 -6
  2. package/dist/js/client/FdrClient.js.map +1 -1
  3. package/dist/js/client/FdrClient.mjs +150 -6
  4. package/dist/js/client/FdrClient.mjs.map +1 -1
  5. package/dist/js/client/types.js.map +1 -1
  6. package/dist/js/client/types.mjs.map +1 -1
  7. package/dist/js/converters/index.js.map +1 -1
  8. package/dist/js/converters/index.mjs.map +1 -1
  9. package/dist/js/index.js +150 -6
  10. package/dist/js/index.js.map +1 -1
  11. package/dist/js/index.mjs +150 -6
  12. package/dist/js/index.mjs.map +1 -1
  13. package/dist/js/navigation/index.js.map +1 -1
  14. package/dist/js/navigation/index.mjs.map +1 -1
  15. package/dist/js/orpc-client.js +160 -8
  16. package/dist/js/orpc-client.js.map +1 -1
  17. package/dist/js/orpc-client.mjs +155 -7
  18. package/dist/js/orpc-client.mjs.map +1 -1
  19. package/dist/types/client/libraryDocs.d.ts +5 -0
  20. package/dist/types/client/libraryDocs.d.ts.map +1 -1
  21. package/dist/types/orpc-client/dashboard-agent/contract.d.ts +94 -0
  22. package/dist/types/orpc-client/dashboard-agent/contract.d.ts.map +1 -1
  23. package/dist/types/orpc-client/docs/v2/library-docs/__test__/doxyfile.test.d.ts +2 -0
  24. package/dist/types/orpc-client/docs/v2/library-docs/__test__/doxyfile.test.d.ts.map +1 -0
  25. package/dist/types/orpc-client/docs/v2/library-docs/contract.d.ts +9 -3
  26. package/dist/types/orpc-client/docs/v2/library-docs/contract.d.ts.map +1 -1
  27. package/dist/types/orpc-client/docs/v2/library-docs/doxyfile.d.ts +32 -0
  28. package/dist/types/orpc-client/docs/v2/library-docs/doxyfile.d.ts.map +1 -0
  29. package/dist/types/orpc-client/docs/v2/library-docs/index.d.ts +1 -0
  30. package/dist/types/orpc-client/docs/v2/library-docs/index.d.ts.map +1 -1
  31. package/dist/types/orpc-client/docs-deployment/contract.d.ts +8 -0
  32. package/dist/types/orpc-client/docs-deployment/contract.d.ts.map +1 -1
  33. package/package.json +1 -1
@@ -1803,7 +1803,9 @@ var GetDocsStatusResponseSchema = z7.object({
1803
1803
  });
1804
1804
  var GetDocsDeploymentsResponseSchema = z7.object({
1805
1805
  deployments: z7.array(DocsDeploymentSchema),
1806
- 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()
1807
1809
  });
1808
1810
  var CreateDeploymentResponseSchema = z7.object({
1809
1811
  deploymentId: z7.string()
@@ -1961,7 +1963,9 @@ var DashboardFeedbackInputSchema = z9.object({
1961
1963
  domain: z9.string().min(1),
1962
1964
  dateRange: z9.string().optional(),
1963
1965
  feedbackType: z9.enum(["page", "code_block", "all"]).optional(),
1964
- 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()
1965
1969
  });
1966
1970
  var DashboardListOrgMembersInputSchema = z9.object({
1967
1971
  orgId: z9.string(),
@@ -2020,20 +2024,37 @@ var LlmBotTrafficResponseSchema = z9.object({
2020
2024
  });
2021
2025
  var RecentFeedbackResponseSchema = z9.object({
2022
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
+ */
2023
2032
  helpfulCount: z9.number(),
2024
2033
  unhelpfulCount: z9.number(),
2034
+ codeBlockCount: z9.number(),
2035
+ /** Entries matching the filters over the whole date range. */
2036
+ totalCount: z9.number(),
2025
2037
  entries: z9.array(
2026
2038
  z9.object({
2027
2039
  date: z9.string(),
2028
2040
  location: z9.string(),
2041
+ /** Always false for code-block reports, which carry no vote. */
2029
2042
  wasHelpful: z9.boolean(),
2030
2043
  userFeedback: z9.string(),
2031
2044
  feedbackType: z9.string().optional(),
2032
2045
  /** URL of the docs page the feedback was submitted on. */
2033
- 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()
2034
2053
  })
2035
2054
  ),
2036
- 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()
2037
2058
  });
2038
2059
  var QueryAnalyticsResponseSchema = z9.object({
2039
2060
  resolvedDateRange: ResolvedDateRangeSchema,
@@ -2048,7 +2069,11 @@ var QueryAnalyticsResponseSchema = z9.object({
2048
2069
  visitors: z9.number().optional(),
2049
2070
  sessions: z9.number().optional()
2050
2071
  })
2051
- )
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()
2052
2077
  });
2053
2078
  var OrgMembersResponseSchema = z9.object({
2054
2079
  members: z9.array(
@@ -2935,6 +2960,120 @@ import { OpenAPILink as OpenAPILink5 } from "@orpc/openapi-client/fetch";
2935
2960
  // src/orpc-client/docs/v2/library-docs/contract.ts
2936
2961
  import { oc as oc6 } from "@orpc/contract";
2937
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
2938
3077
  var ALLOWED_HOSTNAMES = /* @__PURE__ */ new Set(["github.com", "gitlab.com"]);
2939
3078
  var GithubUrlSchema = z14.string().url().describe(
2940
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>."
@@ -2969,8 +3108,13 @@ var LibraryDocsBaseConfigSchema = z14.object({
2969
3108
  slug: z14.string().nullish()
2970
3109
  });
2971
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();
2972
3116
  var CppLibraryDocsConfigSchema = LibraryDocsBaseConfigSchema.extend({
2973
- doxyfileContent: z14.string().nullish()
3117
+ doxyfileContent: SafeDoxyfileContentSchema
2974
3118
  });
2975
3119
  var StartLibraryDocsGenerationInputSchema = z14.discriminatedUnion("language", [
2976
3120
  z14.object({