@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
@@ -1840,7 +1840,9 @@ var GetDocsStatusResponseSchema = z7.object({
1840
1840
  });
1841
1841
  var GetDocsDeploymentsResponseSchema = z7.object({
1842
1842
  deployments: z7.array(DocsDeploymentSchema),
1843
- 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()
1844
1846
  });
1845
1847
  var CreateDeploymentResponseSchema = z7.object({
1846
1848
  deploymentId: z7.string()
@@ -1998,7 +2000,9 @@ var DashboardFeedbackInputSchema = z9.object({
1998
2000
  domain: z9.string().min(1),
1999
2001
  dateRange: z9.string().optional(),
2000
2002
  feedbackType: z9.enum(["page", "code_block", "all"]).optional(),
2001
- 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()
2002
2006
  });
2003
2007
  var DashboardListOrgMembersInputSchema = z9.object({
2004
2008
  orgId: z9.string(),
@@ -2057,20 +2061,37 @@ var LlmBotTrafficResponseSchema = z9.object({
2057
2061
  });
2058
2062
  var RecentFeedbackResponseSchema = z9.object({
2059
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
+ */
2060
2069
  helpfulCount: z9.number(),
2061
2070
  unhelpfulCount: z9.number(),
2071
+ codeBlockCount: z9.number(),
2072
+ /** Entries matching the filters over the whole date range. */
2073
+ totalCount: z9.number(),
2062
2074
  entries: z9.array(
2063
2075
  z9.object({
2064
2076
  date: z9.string(),
2065
2077
  location: z9.string(),
2078
+ /** Always false for code-block reports, which carry no vote. */
2066
2079
  wasHelpful: z9.boolean(),
2067
2080
  userFeedback: z9.string(),
2068
2081
  feedbackType: z9.string().optional(),
2069
2082
  /** URL of the docs page the feedback was submitted on. */
2070
- 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()
2071
2090
  })
2072
2091
  ),
2073
- 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()
2074
2095
  });
2075
2096
  var QueryAnalyticsResponseSchema = z9.object({
2076
2097
  resolvedDateRange: ResolvedDateRangeSchema,
@@ -2085,7 +2106,11 @@ var QueryAnalyticsResponseSchema = z9.object({
2085
2106
  visitors: z9.number().optional(),
2086
2107
  sessions: z9.number().optional()
2087
2108
  })
2088
- )
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()
2089
2114
  });
2090
2115
  var OrgMembersResponseSchema = z9.object({
2091
2116
  members: z9.array(
@@ -2972,6 +2997,120 @@ var import_fetch5 = require("@orpc/openapi-client/fetch");
2972
2997
  // src/orpc-client/docs/v2/library-docs/contract.ts
2973
2998
  var import_contract10 = require("@orpc/contract");
2974
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
2975
3114
  var ALLOWED_HOSTNAMES = /* @__PURE__ */ new Set(["github.com", "gitlab.com"]);
2976
3115
  var GithubUrlSchema = z14.string().url().describe(
2977
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>."
@@ -3006,8 +3145,13 @@ var LibraryDocsBaseConfigSchema = z14.object({
3006
3145
  slug: z14.string().nullish()
3007
3146
  });
3008
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();
3009
3153
  var CppLibraryDocsConfigSchema = LibraryDocsBaseConfigSchema.extend({
3010
- doxyfileContent: z14.string().nullish()
3154
+ doxyfileContent: SafeDoxyfileContentSchema
3011
3155
  });
3012
3156
  var StartLibraryDocsGenerationInputSchema = z14.discriminatedUnion("language", [
3013
3157
  z14.object({