@sdk-it/spec 0.28.0 → 0.30.0

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 (91) hide show
  1. package/dist/index.d.ts +1 -1
  2. package/dist/index.d.ts.map +1 -1
  3. package/dist/index.js +1 -1
  4. package/dist/index.js.map +1 -1
  5. package/dist/lib/find-polymorphic-varients.d.ts +3 -3
  6. package/dist/lib/find-polymorphic-varients.d.ts.map +1 -1
  7. package/dist/lib/find-polymorphic-varients.js.map +1 -1
  8. package/dist/lib/find-polymorphic-varients.test.js +2 -2
  9. package/dist/lib/find-polymorphic-varients.test.js.map +2 -2
  10. package/dist/lib/for-each-operation.d.ts +2 -2
  11. package/dist/lib/for-each-operation.d.ts.map +1 -1
  12. package/dist/lib/for-each-operation.js.map +1 -1
  13. package/dist/lib/get-ref-usage.d.ts +2 -2
  14. package/dist/lib/get-ref-usage.d.ts.map +1 -1
  15. package/dist/lib/get-ref-usage.js.map +1 -1
  16. package/dist/lib/guess/guess-resource.d.ts.map +1 -1
  17. package/dist/lib/ir.d.ts +4 -0
  18. package/dist/lib/ir.d.ts.map +1 -0
  19. package/dist/lib/{operation.js → ir.js} +3 -3
  20. package/dist/lib/ir.js.map +7 -0
  21. package/dist/lib/ir.test.d.ts +2 -0
  22. package/dist/lib/ir.test.d.ts.map +1 -0
  23. package/dist/lib/{operation.test.js → ir.test.js} +1 -1
  24. package/dist/lib/{operation.test.js.map → ir.test.js.map} +1 -1
  25. package/dist/lib/options.d.ts +1 -1
  26. package/dist/lib/options.d.ts.map +1 -1
  27. package/dist/lib/options.js +2 -1
  28. package/dist/lib/options.js.map +2 -2
  29. package/dist/lib/overview-docs/doc-templates.d.ts +51 -0
  30. package/dist/lib/overview-docs/doc-templates.d.ts.map +1 -0
  31. package/dist/lib/overview-docs/doc-templates.js +123 -0
  32. package/dist/lib/overview-docs/doc-templates.js.map +7 -0
  33. package/dist/lib/overview-docs/doc-text-utils.d.ts +86 -0
  34. package/dist/lib/overview-docs/doc-text-utils.d.ts.map +1 -0
  35. package/dist/lib/overview-docs/doc-text-utils.js +108 -0
  36. package/dist/lib/overview-docs/doc-text-utils.js.map +7 -0
  37. package/dist/lib/overview-docs/overview-auth.d.ts +2 -2
  38. package/dist/lib/overview-docs/overview-auth.d.ts.map +1 -1
  39. package/dist/lib/overview-docs/overview-auth.js +34 -52
  40. package/dist/lib/overview-docs/overview-auth.js.map +2 -2
  41. package/dist/lib/overview-docs/overview-docs.d.ts +2 -2
  42. package/dist/lib/overview-docs/overview-docs.d.ts.map +1 -1
  43. package/dist/lib/overview-docs/overview-docs.js.map +1 -1
  44. package/dist/lib/overview-docs/overview-errors.d.ts +2 -2
  45. package/dist/lib/overview-docs/overview-errors.d.ts.map +1 -1
  46. package/dist/lib/overview-docs/overview-errors.js +11 -28
  47. package/dist/lib/overview-docs/overview-errors.js.map +2 -2
  48. package/dist/lib/overview-docs/overview-intro.d.ts +2 -2
  49. package/dist/lib/overview-docs/overview-intro.d.ts.map +1 -1
  50. package/dist/lib/overview-docs/overview-intro.js +41 -36
  51. package/dist/lib/overview-docs/overview-intro.js.map +2 -2
  52. package/dist/lib/overview-docs/overview-pagination.d.ts +2 -2
  53. package/dist/lib/overview-docs/overview-pagination.d.ts.map +1 -1
  54. package/dist/lib/overview-docs/overview-pagination.js +27 -9
  55. package/dist/lib/overview-docs/overview-pagination.js.map +2 -2
  56. package/dist/lib/pagination/pagination.d.ts +2 -2
  57. package/dist/lib/pagination/pagination.d.ts.map +1 -1
  58. package/dist/lib/pagination/pagination.js.map +2 -2
  59. package/dist/lib/security.d.ts +3 -3
  60. package/dist/lib/security.d.ts.map +1 -1
  61. package/dist/lib/security.js.map +2 -2
  62. package/dist/lib/sidebar.d.ts +2 -2
  63. package/dist/lib/sidebar.d.ts.map +1 -1
  64. package/dist/lib/sidebar.js.map +2 -2
  65. package/dist/lib/tune-request-body.d.ts +3 -3
  66. package/dist/lib/tune-request-body.d.ts.map +1 -1
  67. package/dist/lib/tune-request-body.js.map +1 -1
  68. package/dist/lib/tune-response.d.ts +2 -2
  69. package/dist/lib/tune-response.d.ts.map +1 -1
  70. package/dist/lib/tune-response.js.map +1 -1
  71. package/dist/lib/tune.d.ts +3 -3
  72. package/dist/lib/tune.d.ts.map +1 -1
  73. package/dist/lib/tune.js.map +1 -1
  74. package/dist/lib/tune.test.js +2 -2
  75. package/dist/lib/tune.test.js.map +2 -2
  76. package/dist/lib/types.d.ts +3 -2
  77. package/dist/lib/types.d.ts.map +1 -1
  78. package/package.json +2 -2
  79. package/dist/lib/operation.d.ts +0 -4
  80. package/dist/lib/operation.d.ts.map +0 -1
  81. package/dist/lib/operation.js.map +0 -7
  82. package/dist/lib/operation.test.d.ts +0 -2
  83. package/dist/lib/operation.test.d.ts.map +0 -1
  84. package/dist/lib/overview-docs/overview-quick-reference.d.ts +0 -4
  85. package/dist/lib/overview-docs/overview-quick-reference.d.ts.map +0 -1
  86. package/dist/lib/overview-docs/overview-sdk-examples.d.ts +0 -4
  87. package/dist/lib/overview-docs/overview-sdk-examples.d.ts.map +0 -1
  88. package/dist/lib/overview-docs/overview-usage.d.ts +0 -4
  89. package/dist/lib/overview-docs/overview-usage.d.ts.map +0 -1
  90. package/dist/lib/overview-docs.d.ts +0 -4
  91. package/dist/lib/overview-docs.d.ts.map +0 -1
@@ -0,0 +1,51 @@
1
+ export declare const docTemplates: {
2
+ readonly servers: {
3
+ readonly sectionTitle: "API Server";
4
+ readonly description: "The following {count} {isAre} available for this API:";
5
+ };
6
+ readonly authMethods: {
7
+ readonly sectionTitle: "Available Authentication Method";
8
+ readonly introText: "This API provides secure access through {countText} authentication {method}. Below you'll find details about {articleCount} available authentication {scheme} and how to use {pronoun}.";
9
+ readonly noAuthText: "This API does not require authentication.";
10
+ };
11
+ readonly apiClients: {
12
+ readonly sectionTitle: "Official API Client";
13
+ readonly description: "{apiTitle} provides official client SDK{sdkPlural} for {languageText}. We recommend using {clientText} to interact with all stable endpoints. You can find {pronoun} here:";
14
+ };
15
+ readonly needHelp: {
16
+ readonly sectionTitle: "Need Help?";
17
+ };
18
+ };
19
+ interface CountTextOptions {
20
+ count: number;
21
+ word: string;
22
+ includeCount?: boolean;
23
+ }
24
+ export declare function getCountText(options: CountTextOptions): string;
25
+ export declare function getPronoun(count: number, type?: 'subject' | 'object'): string;
26
+ export declare function getArticle(count: number, word: string): string;
27
+ export declare function getIsAre(count: number): string;
28
+ export declare function getThisThese(count: number): string;
29
+ export declare function processTemplate(template: string, replacements: Record<string, string | number>): string;
30
+ export declare function getServerText(count: number): {
31
+ title: string;
32
+ description: string;
33
+ };
34
+ export declare function getAuthMethodText(count: number): {
35
+ title: string;
36
+ intro: string;
37
+ };
38
+ export declare function getApiClientText(count: number, apiTitle: string): {
39
+ title: string;
40
+ description: string;
41
+ };
42
+ export declare function getAuthText(count: number): {
43
+ title: string;
44
+ intro: string;
45
+ };
46
+ export declare function getErrorsApiClientText(count: number, apiTitle: string, sdkList: string[]): {
47
+ title: string;
48
+ description: string;
49
+ };
50
+ export {};
51
+ //# sourceMappingURL=doc-templates.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"doc-templates.d.ts","sourceRoot":"","sources":["../../../src/lib/overview-docs/doc-templates.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;CAmBf,CAAC;AAEX,UAAU,gBAAgB;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB;AAED,wBAAgB,YAAY,CAAC,OAAO,EAAE,gBAAgB,GAAG,MAAM,CAK9D;AAED,wBAAgB,UAAU,CACxB,KAAK,EAAE,MAAM,EACb,IAAI,GAAE,SAAS,GAAG,QAAmB,GACpC,MAAM,CAKR;AAED,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAM9D;AAED,wBAAgB,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAE9C;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAElD;AAED,wBAAgB,eAAe,CAC7B,QAAQ,EAAE,MAAM,EAChB,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,GAC5C,MAAM,CAKR;AAED,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG;IAC5C,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;CACrB,CAQA;AAED,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,MAAM,GAAG;IAChD,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;CACf,CAeA;AAED,wBAAgB,gBAAgB,CAC9B,KAAK,EAAE,MAAM,EACb,QAAQ,EAAE,MAAM,GACf;IACD,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;CACrB,CAkBA;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG;IAC1C,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;CACf,CAeA;AAED,wBAAgB,sBAAsB,CACpC,KAAK,EAAE,MAAM,EACb,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,MAAM,EAAE,GAChB;IACD,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;CACrB,CAWA"}
@@ -0,0 +1,123 @@
1
+ import pluralize from "pluralize";
2
+ const docTemplates = {
3
+ servers: {
4
+ sectionTitle: "API Server",
5
+ description: "The following {count} {isAre} available for this API:"
6
+ },
7
+ authMethods: {
8
+ sectionTitle: "Available Authentication Method",
9
+ introText: "This API provides secure access through {countText} authentication {method}. Below you'll find details about {articleCount} available authentication {scheme} and how to use {pronoun}.",
10
+ noAuthText: "This API does not require authentication."
11
+ },
12
+ apiClients: {
13
+ sectionTitle: "Official API Client",
14
+ description: "{apiTitle} provides official client SDK{sdkPlural} for {languageText}. We recommend using {clientText} to interact with all stable endpoints. You can find {pronoun} here:"
15
+ },
16
+ needHelp: {
17
+ sectionTitle: "Need Help?"
18
+ }
19
+ };
20
+ function getCountText(options) {
21
+ const { count, word, includeCount = false } = options;
22
+ const pluralizedWord = count === 1 ? pluralize.singular(word) : pluralize.plural(word);
23
+ return includeCount ? `${count} ${pluralizedWord}` : pluralizedWord;
24
+ }
25
+ function getPronoun(count, type = "object") {
26
+ if (type === "subject") {
27
+ return count === 1 ? "it" : "they";
28
+ }
29
+ return count === 1 ? "it" : "them";
30
+ }
31
+ function getArticle(count, word) {
32
+ if (count === 1) {
33
+ const firstLetter = word.charAt(0).toLowerCase();
34
+ return ["a", "e", "i", "o", "u"].includes(firstLetter) ? "an" : "a";
35
+ }
36
+ return "";
37
+ }
38
+ function getIsAre(count) {
39
+ return count === 1 ? "is" : "are";
40
+ }
41
+ function getThisThese(count) {
42
+ return count === 1 ? "this" : "these";
43
+ }
44
+ function processTemplate(template, replacements) {
45
+ return template.replace(/\{([^}]+)\}/g, (match, key) => {
46
+ const value = replacements[key];
47
+ return value !== void 0 ? String(value) : match;
48
+ });
49
+ }
50
+ function getServerText(count) {
51
+ return {
52
+ title: `## ${getCountText({ count, word: "server", includeCount: false })}`,
53
+ description: processTemplate(docTemplates.servers.description, {
54
+ count: getCountText({ count, word: "server", includeCount: true }),
55
+ isAre: getIsAre(count)
56
+ })
57
+ };
58
+ }
59
+ function getAuthMethodText(count) {
60
+ const countText = count === 1 ? getArticle(count, "authentication method") : "various";
61
+ const articleCount = count === 1 ? "the" : "each";
62
+ return {
63
+ title: `## ${getCountText({ count, word: docTemplates.authMethods.sectionTitle })}`,
64
+ intro: processTemplate(docTemplates.authMethods.introText, {
65
+ countText,
66
+ method: getCountText({ count, word: "method" }),
67
+ articleCount,
68
+ scheme: getCountText({ count, word: "scheme" }),
69
+ pronoun: getPronoun(count)
70
+ })
71
+ };
72
+ }
73
+ function getApiClientText(count, apiTitle) {
74
+ const languageText = count === 1 ? "a programming language" : "multiple programming languages";
75
+ const clientText = count === 1 ? getThisThese(count) + " client" : getThisThese(count) + " clients";
76
+ return {
77
+ title: `## ${getCountText({ count, word: docTemplates.apiClients.sectionTitle })}`,
78
+ description: processTemplate(docTemplates.apiClients.description, {
79
+ apiTitle,
80
+ sdkPlural: count === 1 ? "" : "s",
81
+ languageText,
82
+ clientText,
83
+ pronoun: getPronoun(count)
84
+ })
85
+ };
86
+ }
87
+ function getAuthText(count) {
88
+ const countText = count === 1 ? getArticle(count, "authentication method") : "various";
89
+ const articleCount = count === 1 ? "the" : "each";
90
+ return {
91
+ title: `## ${getCountText({ count, word: docTemplates.authMethods.sectionTitle })}`,
92
+ intro: processTemplate(docTemplates.authMethods.introText, {
93
+ countText,
94
+ method: getCountText({ count, word: "method" }),
95
+ articleCount,
96
+ scheme: getCountText({ count, word: "scheme" }),
97
+ pronoun: getPronoun(count)
98
+ })
99
+ };
100
+ }
101
+ function getErrorsApiClientText(count, apiTitle, sdkList) {
102
+ const languageText = count === 1 ? sdkList[0] : sdkList.join(", ");
103
+ const clientText = count === 1 ? getThisThese(count) + " client" : getThisThese(count) + " clients";
104
+ return {
105
+ title: `## ${getCountText({ count, word: docTemplates.apiClients.sectionTitle })}`,
106
+ description: `${apiTitle} maintains official API ${getCountText({ count, word: "client" })}${count > 0 ? ` for ${languageText}` : ""}. We recommend using ${clientText} to interact with all stable endpoints. You can find ${getPronoun(count)} here:`
107
+ };
108
+ }
109
+ export {
110
+ docTemplates,
111
+ getApiClientText,
112
+ getArticle,
113
+ getAuthMethodText,
114
+ getAuthText,
115
+ getCountText,
116
+ getErrorsApiClientText,
117
+ getIsAre,
118
+ getPronoun,
119
+ getServerText,
120
+ getThisThese,
121
+ processTemplate
122
+ };
123
+ //# sourceMappingURL=doc-templates.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/lib/overview-docs/doc-templates.ts"],
4
+ "sourcesContent": ["import pluralize from 'pluralize';\n\nexport const docTemplates = {\n servers: {\n sectionTitle: 'API Server',\n description: 'The following {count} {isAre} available for this API:',\n },\n authMethods: {\n sectionTitle: 'Available Authentication Method',\n introText:\n \"This API provides secure access through {countText} authentication {method}. Below you'll find details about {articleCount} available authentication {scheme} and how to use {pronoun}.\",\n noAuthText: 'This API does not require authentication.',\n },\n apiClients: {\n sectionTitle: 'Official API Client',\n description:\n '{apiTitle} provides official client SDK{sdkPlural} for {languageText}. We recommend using {clientText} to interact with all stable endpoints. You can find {pronoun} here:',\n },\n needHelp: {\n sectionTitle: 'Need Help?',\n },\n} as const;\n\ninterface CountTextOptions {\n count: number;\n word: string;\n includeCount?: boolean;\n}\n\nexport function getCountText(options: CountTextOptions): string {\n const { count, word, includeCount = false } = options;\n const pluralizedWord =\n count === 1 ? pluralize.singular(word) : pluralize.plural(word);\n return includeCount ? `${count} ${pluralizedWord}` : pluralizedWord;\n}\n\nexport function getPronoun(\n count: number,\n type: 'subject' | 'object' = 'object',\n): string {\n if (type === 'subject') {\n return count === 1 ? 'it' : 'they';\n }\n return count === 1 ? 'it' : 'them';\n}\n\nexport function getArticle(count: number, word: string): string {\n if (count === 1) {\n const firstLetter = word.charAt(0).toLowerCase();\n return ['a', 'e', 'i', 'o', 'u'].includes(firstLetter) ? 'an' : 'a';\n }\n return '';\n}\n\nexport function getIsAre(count: number): string {\n return count === 1 ? 'is' : 'are';\n}\n\nexport function getThisThese(count: number): string {\n return count === 1 ? 'this' : 'these';\n}\n\nexport function processTemplate(\n template: string,\n replacements: Record<string, string | number>,\n): string {\n return template.replace(/\\{([^}]+)\\}/g, (match, key) => {\n const value = replacements[key];\n return value !== undefined ? String(value) : match;\n });\n}\n\nexport function getServerText(count: number): {\n title: string;\n description: string;\n} {\n return {\n title: `## ${getCountText({ count, word: 'server', includeCount: false })}`,\n description: processTemplate(docTemplates.servers.description, {\n count: getCountText({ count, word: 'server', includeCount: true }),\n isAre: getIsAre(count),\n }),\n };\n}\n\nexport function getAuthMethodText(count: number): {\n title: string;\n intro: string;\n} {\n const countText =\n count === 1 ? getArticle(count, 'authentication method') : 'various';\n const articleCount = count === 1 ? 'the' : 'each';\n\n return {\n title: `## ${getCountText({ count, word: docTemplates.authMethods.sectionTitle })}`,\n intro: processTemplate(docTemplates.authMethods.introText, {\n countText,\n method: getCountText({ count, word: 'method' }),\n articleCount,\n scheme: getCountText({ count, word: 'scheme' }),\n pronoun: getPronoun(count),\n }),\n };\n}\n\nexport function getApiClientText(\n count: number,\n apiTitle: string,\n): {\n title: string;\n description: string;\n} {\n const languageText =\n count === 1 ? 'a programming language' : 'multiple programming languages';\n const clientText =\n count === 1\n ? getThisThese(count) + ' client'\n : getThisThese(count) + ' clients';\n\n return {\n title: `## ${getCountText({ count, word: docTemplates.apiClients.sectionTitle })}`,\n description: processTemplate(docTemplates.apiClients.description, {\n apiTitle,\n sdkPlural: count === 1 ? '' : 's',\n languageText,\n clientText,\n pronoun: getPronoun(count),\n }),\n };\n}\n\nexport function getAuthText(count: number): {\n title: string;\n intro: string;\n} {\n const countText =\n count === 1 ? getArticle(count, 'authentication method') : 'various';\n const articleCount = count === 1 ? 'the' : 'each';\n\n return {\n title: `## ${getCountText({ count, word: docTemplates.authMethods.sectionTitle })}`,\n intro: processTemplate(docTemplates.authMethods.introText, {\n countText,\n method: getCountText({ count, word: 'method' }),\n articleCount,\n scheme: getCountText({ count, word: 'scheme' }),\n pronoun: getPronoun(count),\n }),\n };\n}\n\nexport function getErrorsApiClientText(\n count: number,\n apiTitle: string,\n sdkList: string[],\n): {\n title: string;\n description: string;\n} {\n const languageText = count === 1 ? sdkList[0] : sdkList.join(', ');\n const clientText =\n count === 1\n ? getThisThese(count) + ' client'\n : getThisThese(count) + ' clients';\n\n return {\n title: `## ${getCountText({ count, word: docTemplates.apiClients.sectionTitle })}`,\n description: `${apiTitle} maintains official API ${getCountText({ count, word: 'client' })}${count > 0 ? ` for ${languageText}` : ''}. We recommend using ${clientText} to interact with all stable endpoints. You can find ${getPronoun(count)} here:`,\n };\n}\n"],
5
+ "mappings": "AAAA,OAAO,eAAe;AAEf,MAAM,eAAe;AAAA,EAC1B,SAAS;AAAA,IACP,cAAc;AAAA,IACd,aAAa;AAAA,EACf;AAAA,EACA,aAAa;AAAA,IACX,cAAc;AAAA,IACd,WACE;AAAA,IACF,YAAY;AAAA,EACd;AAAA,EACA,YAAY;AAAA,IACV,cAAc;AAAA,IACd,aACE;AAAA,EACJ;AAAA,EACA,UAAU;AAAA,IACR,cAAc;AAAA,EAChB;AACF;AAQO,SAAS,aAAa,SAAmC;AAC9D,QAAM,EAAE,OAAO,MAAM,eAAe,MAAM,IAAI;AAC9C,QAAM,iBACJ,UAAU,IAAI,UAAU,SAAS,IAAI,IAAI,UAAU,OAAO,IAAI;AAChE,SAAO,eAAe,GAAG,KAAK,IAAI,cAAc,KAAK;AACvD;AAEO,SAAS,WACd,OACA,OAA6B,UACrB;AACR,MAAI,SAAS,WAAW;AACtB,WAAO,UAAU,IAAI,OAAO;AAAA,EAC9B;AACA,SAAO,UAAU,IAAI,OAAO;AAC9B;AAEO,SAAS,WAAW,OAAe,MAAsB;AAC9D,MAAI,UAAU,GAAG;AACf,UAAM,cAAc,KAAK,OAAO,CAAC,EAAE,YAAY;AAC/C,WAAO,CAAC,KAAK,KAAK,KAAK,KAAK,GAAG,EAAE,SAAS,WAAW,IAAI,OAAO;AAAA,EAClE;AACA,SAAO;AACT;AAEO,SAAS,SAAS,OAAuB;AAC9C,SAAO,UAAU,IAAI,OAAO;AAC9B;AAEO,SAAS,aAAa,OAAuB;AAClD,SAAO,UAAU,IAAI,SAAS;AAChC;AAEO,SAAS,gBACd,UACA,cACQ;AACR,SAAO,SAAS,QAAQ,gBAAgB,CAAC,OAAO,QAAQ;AACtD,UAAM,QAAQ,aAAa,GAAG;AAC9B,WAAO,UAAU,SAAY,OAAO,KAAK,IAAI;AAAA,EAC/C,CAAC;AACH;AAEO,SAAS,cAA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eAAe,UAAU,IAAI,QAAQ;AAE3C,SAAO;AAAA,IACL,OAAO,MAAM,aAAa,EAAE,OAAO,MAAM,aAAa,YAAY,aAAa,CAAC,CAAC;AAAA,IACjF,OAAO,gBAAgB,aAAa,YAAY,WAAW;AAAA,MACzD;AAAA,MACA,QAAQ,aAAa,EAAE,OAAO,MAAM,SAAS,CAAC;AAAA,MAC9C;AAAA,MACA,QAAQ,aAAa,EAAE,OAAO,MAAM,SAAS,CAAC;AAAA,MAC9C,SAAS,WAAW,KAAK;AAAA,IAC3B,CAAC;AAAA,EACH;AACF;AAEO,SAAS,uBACd,OACA,UACA,SAIA;AACA,QAAM,eAAe,UAAU,IAAI,QAAQ,CAAC,IAAI,QAAQ,KAAK,IAAI;AACjE,QAAM,aACJ,UAAU,IACN,aAAa,KAAK,IAAI,YACtB,aAAa,KAAK,IAAI;AAE5B,SAAO;AAAA,IACL,OAAO,MAAM,aAAa,EAAE,OAAO,MAAM,aAAa,WAAW,aAAa,CAAC,CAAC;AAAA,IAChF,aAAa,GAAG,QAAQ,2BAA2B,aAAa,EAAE,OAAO,MAAM,SAAS,CAAC,CAAC,GAAG,QAAQ,IAAI,QAAQ,YAAY,KAAK,EAAE,wBAAwB,UAAU,wDAAwD,WAAW,KAAK,CAAC;AAAA,EACjP;AACF;",
6
+ "names": []
7
+ }
@@ -0,0 +1,86 @@
1
+ /**
2
+ * Preset documentation text templates for consistent singular/plural handling
3
+ */
4
+ export declare const presetDocs: {
5
+ readonly auth: {
6
+ readonly section: {
7
+ readonly singular: "Available Authentication Method";
8
+ readonly plural: "Available Authentication Methods";
9
+ };
10
+ readonly description: {
11
+ readonly singular: "an authentication method";
12
+ readonly plural: "various authentication methods";
13
+ };
14
+ readonly scheme: {
15
+ readonly singular: "the available authentication scheme";
16
+ readonly plural: "each available authentication scheme";
17
+ };
18
+ readonly intro: {
19
+ readonly template: (count: number, methods: string, schemes: string, pronoun: string) => string;
20
+ };
21
+ };
22
+ readonly server: {
23
+ readonly section: {
24
+ readonly singular: "API Server";
25
+ readonly plural: "API Servers";
26
+ };
27
+ readonly description: {
28
+ readonly singular: "The following server is available for this API:";
29
+ readonly plural: "The following servers are available for this API:";
30
+ };
31
+ };
32
+ readonly client: {
33
+ readonly section: {
34
+ readonly singular: "Official API Client";
35
+ readonly plural: "Official API Clients";
36
+ };
37
+ readonly sdk: {
38
+ readonly singular: "SDK";
39
+ readonly plural: "SDKs";
40
+ };
41
+ readonly language: {
42
+ readonly singular: "a programming language";
43
+ readonly plural: "multiple programming languages";
44
+ };
45
+ readonly recommendation: {
46
+ readonly singular: "this client";
47
+ readonly plural: "these clients";
48
+ };
49
+ readonly location: {
50
+ readonly singular: "it";
51
+ readonly plural: "them";
52
+ };
53
+ readonly intro: {
54
+ readonly template: (apiTitle: string, count: number, sdks: string, languages: string, recommendation: string, location: string) => string;
55
+ };
56
+ };
57
+ };
58
+ /**
59
+ * Common pronouns and determiners based on count
60
+ */
61
+ export declare const pronouns: {
62
+ readonly pronoun: (count: number) => "it" | "them";
63
+ readonly determiner: (count: number) => "this" | "these";
64
+ readonly article: (count: number) => "" | "a";
65
+ };
66
+ /**
67
+ * Get the appropriate text based on count (singular/plural)
68
+ */
69
+ export declare function getTextByCount<T extends Record<'singular' | 'plural', string>>(count: number, textOptions: T): string;
70
+ /**
71
+ * Automatically pluralize a word based on count using the pluralize library
72
+ */
73
+ export declare function pluralizeWord(word: string, count: number): string;
74
+ /**
75
+ * Helper function to get common text variations based on count
76
+ */
77
+ export declare function getCommonText(count: number): {
78
+ pronoun: string;
79
+ determiner: string;
80
+ article: string;
81
+ isAre: string;
82
+ hasHave: string;
83
+ };
84
+ export declare function getAuthIntroText(count: number): string;
85
+ export declare function getClientIntroText(apiTitle: string, count: number): string;
86
+ //# sourceMappingURL=doc-text-utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"doc-text-utils.d.ts","sourceRoot":"","sources":["../../../src/lib/overview-docs/doc-text-utils.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;uCAgBR,MAAM,WACJ,MAAM,WACN,MAAM,WACN,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;0CAsCL,MAAM,SACT,MAAM,QACP,MAAM,aACD,MAAM,kBACD,MAAM,YACZ,MAAM;;;CAKd,CAAC;AAEX;;GAEG;AACH,eAAO,MAAM,QAAQ;8BACF,MAAM;iCACH,MAAM;8BACT,MAAM;CACf,CAAC;AAEX;;GAEG;AACH,wBAAgB,cAAc,CAAC,CAAC,SAAS,MAAM,CAAC,UAAU,GAAG,QAAQ,EAAE,MAAM,CAAC,EAC5E,KAAK,EAAE,MAAM,EACb,WAAW,EAAE,CAAC,GACb,MAAM,CAER;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAEjE;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM;;;;;;EAQ1C;AAED,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAMtD;AAED,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAiB1E"}
@@ -0,0 +1,108 @@
1
+ import pluralize from "pluralize";
2
+ const presetDocs = {
3
+ auth: {
4
+ section: {
5
+ singular: "Available Authentication Method",
6
+ plural: "Available Authentication Methods"
7
+ },
8
+ description: {
9
+ singular: "an authentication method",
10
+ plural: "various authentication methods"
11
+ },
12
+ scheme: {
13
+ singular: "the available authentication scheme",
14
+ plural: "each available authentication scheme"
15
+ },
16
+ intro: {
17
+ template: (count, methods, schemes, pronoun) => `This API provides secure access through ${methods}. Below you'll find details about ${schemes} and how to use ${pronoun}.`
18
+ }
19
+ },
20
+ server: {
21
+ section: {
22
+ singular: "API Server",
23
+ plural: "API Servers"
24
+ },
25
+ description: {
26
+ singular: "The following server is available for this API:",
27
+ plural: "The following servers are available for this API:"
28
+ }
29
+ },
30
+ client: {
31
+ section: {
32
+ singular: "Official API Client",
33
+ plural: "Official API Clients"
34
+ },
35
+ sdk: {
36
+ singular: "SDK",
37
+ plural: "SDKs"
38
+ },
39
+ language: {
40
+ singular: "a programming language",
41
+ plural: "multiple programming languages"
42
+ },
43
+ recommendation: {
44
+ singular: "this client",
45
+ plural: "these clients"
46
+ },
47
+ location: {
48
+ singular: "it",
49
+ plural: "them"
50
+ },
51
+ intro: {
52
+ template: (apiTitle, count, sdks, languages, recommendation, location) => `${apiTitle} provides official client ${sdks} for ${languages}. We recommend using ${recommendation} to interact with all stable endpoints. You can find ${location} here:`
53
+ }
54
+ }
55
+ };
56
+ const pronouns = {
57
+ pronoun: (count) => count === 1 ? "it" : "them",
58
+ determiner: (count) => count === 1 ? "this" : "these",
59
+ article: (count) => count === 1 ? "a" : ""
60
+ };
61
+ function getTextByCount(count, textOptions) {
62
+ return count === 1 ? textOptions.singular : textOptions.plural;
63
+ }
64
+ function pluralizeWord(word, count) {
65
+ return pluralize(word, count);
66
+ }
67
+ function getCommonText(count) {
68
+ return {
69
+ pronoun: pronouns.pronoun(count),
70
+ determiner: pronouns.determiner(count),
71
+ article: pronouns.article(count),
72
+ isAre: count === 1 ? "is" : "are",
73
+ hasHave: count === 1 ? "has" : "have"
74
+ };
75
+ }
76
+ function getAuthIntroText(count) {
77
+ const methods = getTextByCount(count, presetDocs.auth.description);
78
+ const schemes = getTextByCount(count, presetDocs.auth.scheme);
79
+ const pronoun = pronouns.pronoun(count);
80
+ return presetDocs.auth.intro.template(count, methods, schemes, pronoun);
81
+ }
82
+ function getClientIntroText(apiTitle, count) {
83
+ const sdks = getTextByCount(count, presetDocs.client.sdk);
84
+ const languages = getTextByCount(count, presetDocs.client.language);
85
+ const recommendation = getTextByCount(
86
+ count,
87
+ presetDocs.client.recommendation
88
+ );
89
+ const location = getTextByCount(count, presetDocs.client.location);
90
+ return presetDocs.client.intro.template(
91
+ apiTitle,
92
+ count,
93
+ sdks,
94
+ languages,
95
+ recommendation,
96
+ location
97
+ );
98
+ }
99
+ export {
100
+ getAuthIntroText,
101
+ getClientIntroText,
102
+ getCommonText,
103
+ getTextByCount,
104
+ pluralizeWord,
105
+ presetDocs,
106
+ pronouns
107
+ };
108
+ //# sourceMappingURL=doc-text-utils.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/lib/overview-docs/doc-text-utils.ts"],
4
+ "sourcesContent": ["import pluralize from 'pluralize';\n\n/**\n * Preset documentation text templates for consistent singular/plural handling\n */\nexport const presetDocs = {\n auth: {\n section: {\n singular: 'Available Authentication Method',\n plural: 'Available Authentication Methods',\n },\n description: {\n singular: 'an authentication method',\n plural: 'various authentication methods',\n },\n scheme: {\n singular: 'the available authentication scheme',\n plural: 'each available authentication scheme',\n },\n intro: {\n template: (\n count: number,\n methods: string,\n schemes: string,\n pronoun: string,\n ) =>\n `This API provides secure access through ${methods}. Below you'll find details about ${schemes} and how to use ${pronoun}.`,\n },\n },\n server: {\n section: {\n singular: 'API Server',\n plural: 'API Servers',\n },\n description: {\n singular: 'The following server is available for this API:',\n plural: 'The following servers are available for this API:',\n },\n },\n client: {\n section: {\n singular: 'Official API Client',\n plural: 'Official API Clients',\n },\n sdk: {\n singular: 'SDK',\n plural: 'SDKs',\n },\n language: {\n singular: 'a programming language',\n plural: 'multiple programming languages',\n },\n recommendation: {\n singular: 'this client',\n plural: 'these clients',\n },\n location: {\n singular: 'it',\n plural: 'them',\n },\n intro: {\n template: (\n apiTitle: string,\n count: number,\n sdks: string,\n languages: string,\n recommendation: string,\n location: string,\n ) =>\n `${apiTitle} provides official client ${sdks} for ${languages}. We recommend using ${recommendation} to interact with all stable endpoints. You can find ${location} here:`,\n },\n },\n} as const;\n\n/**\n * Common pronouns and determiners based on count\n */\nexport const pronouns = {\n pronoun: (count: number) => (count === 1 ? 'it' : 'them'),\n determiner: (count: number) => (count === 1 ? 'this' : 'these'),\n article: (count: number) => (count === 1 ? 'a' : ''),\n} as const;\n\n/**\n * Get the appropriate text based on count (singular/plural)\n */\nexport function getTextByCount<T extends Record<'singular' | 'plural', string>>(\n count: number,\n textOptions: T,\n): string {\n return count === 1 ? textOptions.singular : textOptions.plural;\n}\n\n/**\n * Automatically pluralize a word based on count using the pluralize library\n */\nexport function pluralizeWord(word: string, count: number): string {\n return pluralize(word, count);\n}\n\n/**\n * Helper function to get common text variations based on count\n */\nexport function getCommonText(count: number) {\n return {\n pronoun: pronouns.pronoun(count),\n determiner: pronouns.determiner(count),\n article: pronouns.article(count),\n isAre: count === 1 ? 'is' : 'are',\n hasHave: count === 1 ? 'has' : 'have',\n };\n}\n\nexport function getAuthIntroText(count: number): string {\n const methods = getTextByCount(count, presetDocs.auth.description);\n const schemes = getTextByCount(count, presetDocs.auth.scheme);\n const pronoun = pronouns.pronoun(count);\n\n return presetDocs.auth.intro.template(count, methods, schemes, pronoun);\n}\n\nexport function getClientIntroText(apiTitle: string, count: number): string {\n const sdks = getTextByCount(count, presetDocs.client.sdk);\n const languages = getTextByCount(count, presetDocs.client.language);\n const recommendation = getTextByCount(\n count,\n presetDocs.client.recommendation,\n );\n const location = getTextByCount(count, presetDocs.client.location);\n\n return presetDocs.client.intro.template(\n apiTitle,\n count,\n sdks,\n languages,\n recommendation,\n location,\n );\n}\n"],
5
+ "mappings": "AAAA,OAAO,eAAe;AAKf,MAAM,aAAa;AAAA,EACxB,MAAM;AAAA,IACJ,SAAS;AAAA,MACP,UAAU;AAAA,MACV,QAAQ;AAAA,IACV;AAAA,IACA,aAAa;AAAA,MACX,UAAU;AAAA,MACV,QAAQ;AAAA,IACV;AAAA,IACA,QAAQ;AAAA,MACN,UAAU;AAAA,MACV,QAAQ;AAAA,IACV;AAAA,IACA,OAAO;AAAA,MACL,UAAU,CACR,OACA,SACA,SACA,YAEA,2CAA2C,OAAO,qCAAqC,OAAO,mBAAmB,OAAO;AAAA,IAC5H;AAAA,EACF;AA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AAuB;AACtD,QAAM,UAAU,eAAe,OAAO,WAAW,KAAK,WAAW;AACjE,QAAM,UAAU,eAAe,OAAO,WAAW,KAAK,MAAM;AAC5D,QAAM,UAAU,SAAS,QAAQ,KAAK;AAEtC,SAAO,WAAW,KAAK,MAAM,SAAS,OAAO,SAAS,SAAS,OAAO;AACxE;AAEO,SAAS,mBAAmB,UAAkB,OAAuB;AAC1E,QAAM,OAAO,eAAe,OAAO,WAAW,OAAO,GAAG;AACxD,QAAM,YAAY,eAAe,OAAO,WAAW,OAAO,QAAQ;AAClE,QAAM,iBAAiB;AAAA,IACrB;AAAA,IACA,WAAW,OAAO;AAAA,EACpB;AACA,QAAM,WAAW,eAAe,OAAO,WAAW,OAAO,QAAQ;AAEjE,SAAO,WAAW,OAAO,MAAM;AAAA,IAC7B;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AACF;",
6
+ "names": []
7
+ }
@@ -1,4 +1,4 @@
1
1
  import type { NavItem } from '../sidebar.js';
2
- import type { OurOpenAPIObject } from '../types.js';
3
- export declare function generateAuthOverview(spec: OurOpenAPIObject): NavItem;
2
+ import type { IR } from '../types.js';
3
+ export declare function generateAuthOverview(spec: IR): NavItem;
4
4
  //# sourceMappingURL=overview-auth.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"overview-auth.d.ts","sourceRoot":"","sources":["../../../src/lib/overview-docs/overview-auth.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AA+GpD,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,gBAAgB,GAAG,OAAO,CAsDpE"}
1
+ {"version":3,"file":"overview-auth.d.ts","sourceRoot":"","sources":["../../../src/lib/overview-docs/overview-auth.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AA2FtC,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,EAAE,GAAG,OAAO,CAmDtD"}
@@ -1,4 +1,9 @@
1
1
  import { resolveRef } from "@sdk-it/core";
2
+ import {
3
+ getAuthIntroText,
4
+ getTextByCount,
5
+ presetDocs
6
+ } from "./doc-text-utils.js";
2
7
  function getSecuritySchemeDescription(scheme) {
3
8
  switch (scheme.type) {
4
9
  case "apiKey": {
@@ -77,85 +82,62 @@ function getFlowDisplayName(flowType) {
77
82
  };
78
83
  return flowNames[flowType] || flowType;
79
84
  }
80
- function formatSecurityRequirements(requirements) {
81
- if (!requirements || requirements.length === 0) return "";
82
- let result = "";
83
- requirements.forEach((req, index) => {
84
- const schemes = Object.entries(req);
85
- if (schemes.length === 0) {
86
- result += `${index + 1}. No authentication required
87
- `;
88
- } else {
89
- result += `${index + 1}. Requires: `;
90
- const schemeDescriptions = schemes.map(([scheme, scopes]) => {
91
- const scopeArray = scopes;
92
- if (scopeArray && scopeArray.length > 0) {
93
- return `\`${scheme}\` with scopes: ${scopeArray.map((s) => `\`${s}\``).join(", ")}`;
94
- }
95
- return `\`${scheme}\``;
96
- });
97
- result += schemeDescriptions.join(" AND ") + "\n";
98
- }
99
- });
100
- return result;
101
- }
102
85
  function generateAuthOverview(spec) {
103
- let markdown = `# Authorization
86
+ let markdown = `# Authentication
104
87
 
105
88
  `;
106
- const securitySchemes = spec.components?.securitySchemes || {};
89
+ const securitySchemes = spec.components.securitySchemes;
107
90
  const globalSecurity = spec.security || [];
108
- if (Object.keys(securitySchemes).length === 0 && globalSecurity.length === 0) {
91
+ const authMethodCount = Object.keys(securitySchemes).length;
92
+ if (!authMethodCount && !globalSecurity.length) {
109
93
  markdown += `This API does not require authentication.
110
94
 
111
95
  `;
112
96
  } else {
113
- markdown += `This API provides secure access through various authentication methods. Below you'll find details about each available authentication scheme and how to use them.
97
+ if (authMethodCount > 1) {
98
+ markdown += `${getAuthIntroText(authMethodCount)}
114
99
 
115
100
  `;
116
- if (Object.keys(securitySchemes).length > 0) {
117
- markdown += `## Available Authentication Methods
101
+ markdown += `## ${getTextByCount(authMethodCount, presetDocs.auth.section)}
118
102
 
119
103
  `;
120
- for (const [name, scheme] of Object.entries(securitySchemes)) {
121
- const schemeObj = resolveRef(spec, scheme);
104
+ }
105
+ for (const [name, scheme] of Object.entries(securitySchemes)) {
106
+ const schemeObj = resolveRef(spec, scheme);
107
+ if (authMethodCount > 1) {
122
108
  markdown += `### ${name}
123
109
 
124
110
  `;
125
- const description = schemeObj.description || getSecuritySchemeDescription(schemeObj);
126
- markdown += `${description}
111
+ }
112
+ const description = schemeObj.description || getSecuritySchemeDescription(schemeObj);
113
+ markdown += `${description}
127
114
 
128
115
  `;
129
- if (schemeObj.type === "apiKey") {
130
- markdown += `**Details:**
116
+ if (schemeObj.type === "apiKey") {
117
+ markdown += `**Details:**
131
118
  `;
132
- markdown += `- Parameter Name: \`${schemeObj.name}\`
119
+ markdown += `- Parameter Name: \`${schemeObj.name}\`
133
120
  `;
134
- markdown += `- Location: ${schemeObj.in === "header" ? "HTTP Header" : schemeObj.in === "query" ? "Query Parameter" : "Cookie"}
121
+ markdown += `- Location: ${schemeObj.in === "header" ? "HTTP Header" : schemeObj.in === "query" ? "Query Parameter" : "Cookie"}
135
122
 
136
123
  `;
137
- } else if (schemeObj.type === "http") {
138
- markdown += `**Details:**
139
- `;
140
- markdown += `- Scheme: \`${schemeObj.scheme}\`
124
+ } else if (schemeObj.type === "http") {
125
+ if (schemeObj.bearerFormat) {
126
+ markdown += `- Token Format: \`${schemeObj.bearerFormat}\`
141
127
  `;
142
- if (schemeObj.bearerFormat) {
143
- markdown += `- Token Format: \`${schemeObj.bearerFormat}\`
144
- `;
145
- }
146
- markdown += "\n";
147
- } else if (schemeObj.type === "oauth2" && schemeObj.flows) {
148
- markdown += `**OAuth 2.0 Flows:**
128
+ }
129
+ markdown += "\n";
130
+ } else if (schemeObj.type === "oauth2" && schemeObj.flows) {
131
+ markdown += `**OAuth 2.0 Flows:**
149
132
 
150
133
  `;
151
- markdown += formatOAuth2Flows(schemeObj.flows);
152
- } else if (schemeObj.type === "openIdConnect") {
153
- markdown += `**Details:**
134
+ markdown += formatOAuth2Flows(schemeObj.flows);
135
+ } else if (schemeObj.type === "openIdConnect") {
136
+ markdown += `**Details:**
154
137
  `;
155
- markdown += `- Discovery URL: \`${schemeObj.openIdConnectUrl}\`
138
+ markdown += `- Discovery URL: \`${schemeObj.openIdConnectUrl}\`
156
139
 
157
140
  `;
158
- }
159
141
  }
160
142
  }
161
143
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/lib/overview-docs/overview-auth.ts"],
4
- "sourcesContent": ["import type { OAuthFlowsObject, SecuritySchemeObject } from 'openapi3-ts/oas31';\n\nimport { resolveRef } from '@sdk-it/core';\n\nimport type { NavItem } from '../sidebar.js';\nimport type { OurOpenAPIObject } from '../types.js';\n\nfunction getSecuritySchemeDescription(scheme: SecuritySchemeObject): string {\n switch (scheme.type) {\n case 'apiKey': {\n const location =\n scheme.in === 'header'\n ? 'HTTP header'\n : scheme.in === 'query'\n ? 'query parameter'\n : 'cookie';\n return `API Key authentication requires you to provide an API key in the ${location} named \\`${scheme.name}\\`.`;\n }\n case 'http':\n if (scheme.scheme === 'bearer') {\n const format = scheme.bearerFormat\n ? ` The expected token format is \\`${scheme.bearerFormat}\\`.`\n : '';\n return `Bearer token authentication requires you to include a bearer token in the \\`Authorization\\` header of your requests.${format}`;\n }\n if (scheme.scheme === 'basic') {\n return `Basic authentication requires you to provide a username and password, encoded in base64 format in the \\`Authorization\\` header.`;\n }\n return `HTTP ${scheme.scheme} authentication is required for accessing this API.`;\n case 'oauth2': {\n const flows = Object.keys(scheme.flows || {});\n const flowDescriptions = flows.map((flow) => {\n switch (flow) {\n case 'authorizationCode':\n return 'Authorization Code (for server-side applications)';\n case 'implicit':\n return 'Implicit (for browser-based applications)';\n case 'password':\n return 'Resource Owner Password Credentials';\n case 'clientCredentials':\n return 'Client Credentials (for machine-to-machine authentication)';\n default:\n return flow;\n }\n });\n return `OAuth 2.0 authentication is supported with the following grant type(s): ${flowDescriptions.join(', ')}.`;\n }\n case 'openIdConnect':\n return `OpenID Connect authentication is used for this API. You will need to authenticate through the OpenID provider to obtain access tokens.`;\n default:\n return 'This API uses a custom authentication scheme. Please refer to the API documentation for specific details.';\n }\n}\n\nfunction formatOAuth2Flows(flows: OAuthFlowsObject): string {\n let result = '';\n\n for (const [flowType, flow] of Object.entries(flows || {})) {\n result += `#### ${getFlowDisplayName(flowType)}\\n\\n`;\n\n if (flow.authorizationUrl) {\n result += `- **Authorization URL:** \\`${flow.authorizationUrl}\\`\\n`;\n }\n if (flow.tokenUrl) {\n result += `- **Token URL:** \\`${flow.tokenUrl}\\`\\n`;\n }\n if (flow.refreshUrl) {\n result += `- **Refresh URL:** \\`${flow.refreshUrl}\\`\\n`;\n }\n if (flow.scopes && Object.keys(flow.scopes).length > 0) {\n result += `- **Available Scopes:**\\n`;\n for (const [scope, description] of Object.entries(flow.scopes)) {\n result += ` - \\`${scope}\\`: ${description}\\n`;\n }\n }\n result += '\\n';\n }\n\n return result;\n}\n\nfunction getFlowDisplayName(flowType: string): string {\n const flowNames: Record<string, string> = {\n authorizationCode: 'Authorization Code Flow',\n implicit: 'Implicit Flow',\n password: 'Resource Owner Password Flow',\n clientCredentials: 'Client Credentials Flow',\n };\n return flowNames[flowType] || flowType;\n}\n\nfunction formatSecurityRequirements(\n requirements: Array<Record<string, string[]>>,\n): string {\n if (!requirements || requirements.length === 0) return '';\n\n let result = '';\n requirements.forEach((req, index) => {\n const schemes = Object.entries(req);\n if (schemes.length === 0) {\n result += `${index + 1}. No authentication required\\n`;\n } else {\n result += `${index + 1}. Requires: `;\n const schemeDescriptions = schemes.map(([scheme, scopes]) => {\n const scopeArray = scopes as string[];\n if (scopeArray && scopeArray.length > 0) {\n return `\\`${scheme}\\` with scopes: ${scopeArray.map((s) => `\\`${s}\\``).join(', ')}`;\n }\n return `\\`${scheme}\\``;\n });\n result += schemeDescriptions.join(' AND ') + '\\n';\n }\n });\n return result;\n}\n\nexport function generateAuthOverview(spec: OurOpenAPIObject): NavItem {\n let markdown = `# Authorization\\n\\n`;\n\n const securitySchemes = spec.components?.securitySchemes || {};\n const globalSecurity = spec.security || [];\n\n if (\n Object.keys(securitySchemes).length === 0 &&\n globalSecurity.length === 0\n ) {\n markdown += `This API does not require authentication.\\n\\n`;\n } else {\n markdown += `This API provides secure access through various authentication methods. Below you'll find details about each available authentication scheme and how to use them.\\n\\n`;\n\n if (Object.keys(securitySchemes).length > 0) {\n markdown += `## Available Authentication Methods\\n\\n`;\n\n for (const [name, scheme] of Object.entries(securitySchemes)) {\n const schemeObj = resolveRef<SecuritySchemeObject>(spec, scheme);\n markdown += `### ${name}\\n\\n`;\n\n const description =\n schemeObj.description || getSecuritySchemeDescription(schemeObj);\n markdown += `${description}\\n\\n`;\n\n if (schemeObj.type === 'apiKey') {\n markdown += `**Details:**\\n`;\n markdown += `- Parameter Name: \\`${schemeObj.name}\\`\\n`;\n markdown += `- Location: ${schemeObj.in === 'header' ? 'HTTP Header' : schemeObj.in === 'query' ? 'Query Parameter' : 'Cookie'}\\n\\n`;\n } else if (schemeObj.type === 'http') {\n markdown += `**Details:**\\n`;\n markdown += `- Scheme: \\`${schemeObj.scheme}\\`\\n`;\n if (schemeObj.bearerFormat) {\n markdown += `- Token Format: \\`${schemeObj.bearerFormat}\\`\\n`;\n }\n markdown += '\\n';\n } else if (schemeObj.type === 'oauth2' && schemeObj.flows) {\n markdown += `**OAuth 2.0 Flows:**\\n\\n`;\n markdown += formatOAuth2Flows(schemeObj.flows);\n } else if (schemeObj.type === 'openIdConnect') {\n markdown += `**Details:**\\n`;\n markdown += `- Discovery URL: \\`${schemeObj.openIdConnectUrl}\\`\\n\\n`;\n }\n }\n }\n }\n\n return {\n id: 'authorization',\n url: '/authorization',\n title: 'Authorization',\n description: 'Authentication methods and security schemes',\n content: markdown,\n };\n}\n"],
5
- "mappings": "AAEA,SAAS,kBAAkB;AAK3B,SAAS,6BAA6B,QAAsC;AAC1E,UAAQ,OAAO,MAAM;AAAA,IACnB,KAAK,UAAU;AACb,YAAM,WACJ,OAAO,OAAO,WACV,gBACA,OAAO,OAAO,UACZ,oBACA;AACR,aAAO,oEAAoE,QAAQ,YAAY,OAAO,IAAI;AAAA,IAC5G;AAAA,IACA,KAAK;AACH,UAAI,OAAO,WAAW,UAAU;AAC9B,cAAM,SAAS,OAAO,eAClB,mCAAmC,OAAO,YAAY,QACtD;AACJ,eAAO,uHAAuH,MAAM;AAAA,MACtI;AACA,UAAI,OAAO,WAAW,SAAS;AAC7B,eAAO;AAAA,MACT;AACA,aAAO,QAAQ,OAAO,MAAM;AAAA,IAC9B,KAAK,UAAU;AACb,YAAM,QAAQ,OAAO,KAAK,OAAO,SAAS,CAAC,CAAC;AAC5C,YAAM,mBAAmB,MAAM,IAAI,CAAC,SAAS;AAC3C,gBAAQ,MAAM;AAAA,UACZ,KAAK;AACH,mBAAO;AAAA,UACT,KAAK;AACH,mBAAO;AAAA,UACT,KAAK;AACH,mBAAO;AAAA,UACT,KAAK;AACH,mBAAO;AAAA,UACT;AACE,mBAAO;AAAA,QACX;AAAA,MACF,CAAC;AACD,aAAO,2EAA2E,iBAAiB,KAAK,IAAI,CAAC;AAAA,IAC/G;AAAA,IACA,KAAK;AACH,aAAO;AAAA,IACT;AACE,aAAO;AAAA,EACX;AACF;AAEA,SAAS,kBAAkB,OAAiC;AAC1D,MAAI,SAAS;AAEb,aAAW,CAAC,UAAU,IAAI,KAAK,OAAO,QAAQ,SAAS,CAAC,CAAC,GAAG;AAC1D,cAAU,QAAQ,mBAAmB,QAAQ,CAAC;AAAA;AAAA;AAE9C,QAAI,KAAK,kBAAkB;AACzB,gBAAU,8BAA8B,KAAK,gBAAgB;AAAA;AAAA,IAC/D;AACA,QAAI,KAAK,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ACL,OAAO;AAAA,IACP,aAAa;AAAA,IACb,SAAS;AAAA,EACX;AACF;",
4
+ "sourcesContent": ["import type { OAuthFlowsObject, SecuritySchemeObject } from 'openapi3-ts/oas31';\n\nimport { resolveRef } from '@sdk-it/core';\n\nimport type { NavItem } from '../sidebar.js';\nimport type { IR } from '../types.js';\nimport {\n getAuthIntroText,\n getTextByCount,\n presetDocs,\n} from './doc-text-utils.js';\n\nfunction getSecuritySchemeDescription(scheme: SecuritySchemeObject): string {\n switch (scheme.type) {\n case 'apiKey': {\n const location =\n scheme.in === 'header'\n ? 'HTTP header'\n : scheme.in === 'query'\n ? 'query parameter'\n : 'cookie';\n return `API Key authentication requires you to provide an API key in the ${location} named \\`${scheme.name}\\`.`;\n }\n case 'http':\n if (scheme.scheme === 'bearer') {\n const format = scheme.bearerFormat\n ? ` The expected token format is \\`${scheme.bearerFormat}\\`.`\n : '';\n return `Bearer token authentication requires you to include a bearer token in the \\`Authorization\\` header of your requests.${format}`;\n }\n if (scheme.scheme === 'basic') {\n return `Basic authentication requires you to provide a username and password, encoded in base64 format in the \\`Authorization\\` header.`;\n }\n return `HTTP ${scheme.scheme} authentication is required for accessing this API.`;\n case 'oauth2': {\n const flows = Object.keys(scheme.flows || {});\n const flowDescriptions = flows.map((flow) => {\n switch (flow) {\n case 'authorizationCode':\n return 'Authorization Code (for server-side applications)';\n case 'implicit':\n return 'Implicit (for browser-based applications)';\n case 'password':\n return 'Resource Owner Password Credentials';\n case 'clientCredentials':\n return 'Client Credentials (for machine-to-machine authentication)';\n default:\n return flow;\n }\n });\n return `OAuth 2.0 authentication is supported with the following grant type(s): ${flowDescriptions.join(', ')}.`;\n }\n case 'openIdConnect':\n return `OpenID Connect authentication is used for this API. You will need to authenticate through the OpenID provider to obtain access tokens.`;\n default:\n return 'This API uses a custom authentication scheme. Please refer to the API documentation for specific details.';\n }\n}\n\nfunction formatOAuth2Flows(flows: OAuthFlowsObject): string {\n let result = '';\n\n for (const [flowType, flow] of Object.entries(flows || {})) {\n result += `#### ${getFlowDisplayName(flowType)}\\n\\n`;\n\n if (flow.authorizationUrl) {\n result += `- **Authorization URL:** \\`${flow.authorizationUrl}\\`\\n`;\n }\n if (flow.tokenUrl) {\n result += `- **Token URL:** \\`${flow.tokenUrl}\\`\\n`;\n }\n if (flow.refreshUrl) {\n result += `- **Refresh URL:** \\`${flow.refreshUrl}\\`\\n`;\n }\n if (flow.scopes && Object.keys(flow.scopes).length > 0) {\n result += `- **Available Scopes:**\\n`;\n for (const [scope, description] of Object.entries(flow.scopes)) {\n result += ` - \\`${scope}\\`: ${description}\\n`;\n }\n }\n result += '\\n';\n }\n\n return result;\n}\n\nfunction getFlowDisplayName(flowType: string): string {\n const flowNames: Record<string, string> = {\n authorizationCode: 'Authorization Code Flow',\n implicit: 'Implicit Flow',\n password: 'Resource Owner Password Flow',\n clientCredentials: 'Client Credentials Flow',\n };\n return flowNames[flowType] || flowType;\n}\n\nexport function generateAuthOverview(spec: IR): NavItem {\n let markdown = `# Authentication\\n\\n`;\n\n const securitySchemes = spec.components.securitySchemes;\n const globalSecurity = spec.security || [];\n\n const authMethodCount = Object.keys(securitySchemes).length;\n if (!authMethodCount && !globalSecurity.length) {\n markdown += `This API does not require authentication.\\n\\n`;\n } else {\n if (authMethodCount > 1) {\n markdown += `${getAuthIntroText(authMethodCount)}\\n\\n`;\n markdown += `## ${getTextByCount(authMethodCount, presetDocs.auth.section)}\\n\\n`;\n }\n\n for (const [name, scheme] of Object.entries(securitySchemes)) {\n const schemeObj = resolveRef<SecuritySchemeObject>(spec, scheme);\n if (authMethodCount > 1) {\n markdown += `### ${name}\\n\\n`;\n }\n\n const description =\n schemeObj.description || getSecuritySchemeDescription(schemeObj);\n markdown += `${description}\\n\\n`;\n\n if (schemeObj.type === 'apiKey') {\n markdown += `**Details:**\\n`;\n markdown += `- Parameter Name: \\`${schemeObj.name}\\`\\n`;\n markdown += `- Location: ${schemeObj.in === 'header' ? 'HTTP Header' : schemeObj.in === 'query' ? 'Query Parameter' : 'Cookie'}\\n\\n`;\n } else if (schemeObj.type === 'http') {\n if (schemeObj.bearerFormat) {\n markdown += `- Token Format: \\`${schemeObj.bearerFormat}\\`\\n`;\n }\n markdown += '\\n';\n } else if (schemeObj.type === 'oauth2' && schemeObj.flows) {\n markdown += `**OAuth 2.0 Flows:**\\n\\n`;\n markdown += formatOAuth2Flows(schemeObj.flows);\n } else if (schemeObj.type === 'openIdConnect') {\n markdown += `**Details:**\\n`;\n markdown += `- Discovery URL: \\`${schemeObj.openIdConnectUrl}\\`\\n\\n`;\n }\n }\n }\n\n return {\n id: 'authorization',\n url: '/authorization',\n title: 'Authorization',\n description: 'Authentication methods and security schemes',\n content: markdown,\n };\n}\n"],
5
+ "mappings": "AAEA,SAAS,kBAAkB;AAI3B;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAEP,SAAS,6BAA6B,QAAsC;AAC1E,UAAQ,OAAO,MAAM;AAAA,IACnB,KAAK,UAAU;AACb,YAAM,WACJ,OAAO,OAAO,WACV,gBACA,OAAO,OAAO,UACZ,oBACA;AACR,aAAO,oEAAoE,QAAQ,YAAY,OAAO,IAAI;AAAA,IAC5G;AAAA,IACA,KAAK;AACH,UAAI,OAAO,WAAW,UAAU;AAC9B,cAAM,SAAS,OAAO,eAClB,mCAAmC,OAAO,YAAY,QACtD;AACJ,eAAO,uHAAuH,MAAM;AAAA,MACtI;AACA,UAAI,OAAO,WAAW,SAAS;AAC7B,eAAO;AAAA,MACT;AACA,aAAO,QAAQ,OAAO,MAAM;AAAA,IAC9B,KAAK,UAAU;AACb,YAAM,QAAQ,OAAO,KAAK,OAAO,SAAS,CAAC,CAAC;AAC5C,YAAM,mBAAmB,MAAM,IAAI,CAAC,SAAS;AAC3C,gBAAQ,MAAM;AAAA,UACZ,KAAK;AACH,mBAAO;AAAA,UACT,KAAK;AACH,mBAAO;AAAA,UACT,KAAK;AACH,mBAAO;AAAA,UACT,KAAK;AACH,mBAAO;AAAA,UACT;AAC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Y;AAAA;AAAA;AAAA,EACd,OAAO;AACL,QAAI,kBAAkB,GAAG;AACvB,kBAAY,GAAG,iBAAiB,eAAe,CAAC;AAAA;AAAA;AAChD,kBAAY,MAAM,eAAe,iBAAiB,WAAW,KAAK,OAAO,CAAC;AAAA;AAAA;AAAA,IAC5E;AAEA,eAAW,CAAC,MAAM,MAAM,KAAK,OAAO,QAAQ,eAAe,GAAG;AAC5D,YAAM,YAAY,WAAiC,MAAM,MAAM;AAC/D,UAAI,kBAAkB,GAAG;AACvB,oBAAY,OAAO,IAAI;AAAA;AAAA;AAAA,MACzB;AAEA,YAAM,cACJ,UAAU,eAAe,6BAA6B,SAAS;AACjE,kBAAY,GAAG,WAAW;AAAA;AAAA;AAE1B,UAAI,UAAU,SAAS,UAAU;AAC/B,oBAAY;AAAA;AACZ,oBAAY,uBAAuB,UAAU,IAAI;AAAA;AACjD,oBAAY,eAAe,UAAU,OAAO,WAAW,gBAAgB,UAAU,OAAO,UAAU,oBAAoB,QAAQ;AAAA;AAAA;AAAA,MAChI,WAAW,UAAU,SAAS,QAAQ;AACpC,YAAI,UAAU,cAAc;AAC1B,sBAAY,qBAAqB,UAAU,YAAY;AAAA;AAAA,QACzD;AACA,oBAAY;AAAA,MACd,WAAW,UAAU,SAAS,YAAY,UAAU,OAAO;AACzD,oBAAY;AAAA;AAAA;AACZ,oBAAY,kBAAkB,UAAU,KAAK;AAAA,MAC/C,WAAW,UAAU,SAAS,iBAAiB;AAC7C,oBAAY;AAAA;AACZ,oBAAY,sBAAsB,UAAU,gBAAgB;AAAA;AAAA;AAAA,MAC9D;AAAA,IACF;AAAA,EACF;AAEA,SAAO;AAAA,IACL,IAAI;AAAA,IACJ,KAAK;AAAA,IACL,OAAO;AAAA,IACP,aAAa;AAAA,IACb,SAAS;AAAA,EACX;AACF;",
6
6
  "names": []
7
7
  }
@@ -1,4 +1,4 @@
1
1
  import type { SidebarData } from '../sidebar.js';
2
- import type { OurOpenAPIObject } from '../types.js';
3
- export declare function extractOverviewDocs(spec: OurOpenAPIObject, availableSdks?: string[]): SidebarData;
2
+ import type { IR } from '../types.js';
3
+ export declare function extractOverviewDocs(spec: IR, availableSdks?: string[]): SidebarData;
4
4
  //# sourceMappingURL=overview-docs.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"overview-docs.d.ts","sourceRoot":"","sources":["../../../src/lib/overview-docs/overview-docs.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAKpD,wBAAgB,mBAAmB,CACjC,IAAI,EAAE,gBAAgB,EACtB,aAAa,GAAE,MAAM,EAAmB,GACvC,WAAW,CAYb"}
1
+ {"version":3,"file":"overview-docs.d.ts","sourceRoot":"","sources":["../../../src/lib/overview-docs/overview-docs.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AAKtC,wBAAgB,mBAAmB,CACjC,IAAI,EAAE,EAAE,EACR,aAAa,GAAE,MAAM,EAAmB,GACvC,WAAW,CAYb"}
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/lib/overview-docs/overview-docs.ts"],
4
- "sourcesContent": ["import type { SidebarData } from '../sidebar.js';\nimport type { OurOpenAPIObject } from '../types.js';\nimport { generateAuthOverview } from './overview-auth.js';\nimport { generateErrorsOverview } from './overview-errors.js';\nimport { generateIntroOverview } from './overview-intro.js';\n\nexport function extractOverviewDocs(\n spec: OurOpenAPIObject,\n availableSdks: string[] = ['typescript'],\n): SidebarData {\n return [\n {\n id: 'overview',\n category: 'Overview',\n items: [\n generateIntroOverview(spec, availableSdks),\n generateAuthOverview(spec),\n generateErrorsOverview(spec),\n ],\n },\n ];\n}\n"],
4
+ "sourcesContent": ["import type { SidebarData } from '../sidebar.js';\nimport type { IR } from '../types.js';\nimport { generateAuthOverview } from './overview-auth.js';\nimport { generateErrorsOverview } from './overview-errors.js';\nimport { generateIntroOverview } from './overview-intro.js';\n\nexport function extractOverviewDocs(\n spec: IR,\n availableSdks: string[] = ['typescript'],\n): SidebarData {\n return [\n {\n id: 'overview',\n category: 'Overview',\n items: [\n generateIntroOverview(spec, availableSdks),\n generateAuthOverview(spec),\n generateErrorsOverview(spec),\n ],\n },\n ];\n}\n"],
5
5
  "mappings": "AAEA,SAAS,4BAA4B;AACrC,SAAS,8BAA8B;AACvC,SAAS,6BAA6B;AAE/B,SAAS,oBACd,MACA,gBAA0B,CAAC,YAAY,GAC1B;AACb,SAAO;AAAA,IACL;AAAA,MACE,IAAI;AAAA,MACJ,UAAU;AAAA,MACV,OAAO;AAAA,QACL,sBAAsB,MAAM,aAAa;AAAA,QACzC,qBAAqB,IAAI;AAAA,QACzB,uBAAuB,IAAI;AAAA,MAC7B;AAAA,IACF;AAAA,EACF;AACF;",
6
6
  "names": []
7
7
  }