@gitbook/react-openapi 1.4.3 → 1.5.1

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 (225) hide show
  1. package/CHANGELOG.md +27 -0
  2. package/dist/index.d.ts +663 -10
  3. package/dist/index.js +3873 -8
  4. package/package.json +11 -7
  5. package/dist/InteractiveSection.d.ts +0 -33
  6. package/dist/InteractiveSection.jsx +0 -61
  7. package/dist/Markdown.d.ts +0 -4
  8. package/dist/Markdown.jsx +0 -5
  9. package/dist/OpenAPICodeSample.d.ts +0 -19
  10. package/dist/OpenAPICodeSample.jsx +0 -230
  11. package/dist/OpenAPICodeSampleInteractive.d.ts +0 -14
  12. package/dist/OpenAPICodeSampleInteractive.jsx +0 -73
  13. package/dist/OpenAPICodeSampleSelector.d.ts +0 -14
  14. package/dist/OpenAPICodeSampleSelector.jsx +0 -44
  15. package/dist/OpenAPICopyButton.d.ts +0 -13
  16. package/dist/OpenAPICopyButton.jsx +0 -35
  17. package/dist/OpenAPIDisclosure.d.ts +0 -11
  18. package/dist/OpenAPIDisclosure.jsx +0 -30
  19. package/dist/OpenAPIDisclosureGroup.d.ts +0 -23
  20. package/dist/OpenAPIDisclosureGroup.jsx +0 -83
  21. package/dist/OpenAPIExample.d.ts +0 -16
  22. package/dist/OpenAPIExample.jsx +0 -36
  23. package/dist/OpenAPIMediaType.d.ts +0 -21
  24. package/dist/OpenAPIMediaType.jsx +0 -61
  25. package/dist/OpenAPIOperation.d.ts +0 -10
  26. package/dist/OpenAPIOperation.jsx +0 -25
  27. package/dist/OpenAPIOperationContext.d.ts +0 -16
  28. package/dist/OpenAPIOperationContext.jsx +0 -26
  29. package/dist/OpenAPIOperationDescription.d.ts +0 -9
  30. package/dist/OpenAPIOperationDescription.jsx +0 -22
  31. package/dist/OpenAPIOperationStability.d.ts +0 -9
  32. package/dist/OpenAPIOperationStability.jsx +0 -27
  33. package/dist/OpenAPIPath.d.ts +0 -18
  34. package/dist/OpenAPIPath.jsx +0 -55
  35. package/dist/OpenAPIPrefillContextProvider.d.ts +0 -22
  36. package/dist/OpenAPIPrefillContextProvider.jsx +0 -19
  37. package/dist/OpenAPIRequestBody.d.ts +0 -11
  38. package/dist/OpenAPIRequestBody.jsx +0 -28
  39. package/dist/OpenAPIRequestBodyHeaderType.d.ts +0 -8
  40. package/dist/OpenAPIRequestBodyHeaderType.jsx +0 -25
  41. package/dist/OpenAPIResponse.d.ts +0 -10
  42. package/dist/OpenAPIResponse.jsx +0 -57
  43. package/dist/OpenAPIResponseExample.d.ts +0 -9
  44. package/dist/OpenAPIResponseExample.jsx +0 -105
  45. package/dist/OpenAPIResponseExampleContent.d.ts +0 -22
  46. package/dist/OpenAPIResponseExampleContent.jsx +0 -60
  47. package/dist/OpenAPIResponses.d.ts +0 -9
  48. package/dist/OpenAPIResponses.jsx +0 -77
  49. package/dist/OpenAPISchema.d.ts +0 -27
  50. package/dist/OpenAPISchema.jsx +0 -400
  51. package/dist/OpenAPISchemaName.d.ts +0 -16
  52. package/dist/OpenAPISchemaName.jsx +0 -43
  53. package/dist/OpenAPISchemaServer.d.ts +0 -12
  54. package/dist/OpenAPISchemaServer.jsx +0 -8
  55. package/dist/OpenAPISecurities.d.ts +0 -9
  56. package/dist/OpenAPISecurities.jsx +0 -114
  57. package/dist/OpenAPISelect.d.ts +0 -22
  58. package/dist/OpenAPISelect.jsx +0 -44
  59. package/dist/OpenAPISpec.d.ts +0 -6
  60. package/dist/OpenAPISpec.jsx +0 -80
  61. package/dist/OpenAPITabs.d.ts +0 -26
  62. package/dist/OpenAPITabs.jsx +0 -109
  63. package/dist/OpenAPIWebhook.d.ts +0 -10
  64. package/dist/OpenAPIWebhook.jsx +0 -23
  65. package/dist/OpenAPIWebhookExample.d.ts +0 -6
  66. package/dist/OpenAPIWebhookExample.jsx +0 -41
  67. package/dist/ScalarApiButton.d.ts +0 -14
  68. package/dist/ScalarApiButton.jsx +0 -81
  69. package/dist/StaticSection.d.ts +0 -13
  70. package/dist/StaticSection.jsx +0 -32
  71. package/dist/code-samples.d.ts +0 -17
  72. package/dist/code-samples.js +0 -427
  73. package/dist/common/OpenAPIColumnSpec.d.ts +0 -6
  74. package/dist/common/OpenAPIColumnSpec.jsx +0 -20
  75. package/dist/common/OpenAPIOperationDescription.d.ts +0 -6
  76. package/dist/common/OpenAPIOperationDescription.jsx +0 -19
  77. package/dist/common/OpenAPIStability.d.ts +0 -4
  78. package/dist/common/OpenAPIStability.jsx +0 -15
  79. package/dist/common/OpenAPISummary.d.ts +0 -6
  80. package/dist/common/OpenAPISummary.jsx +0 -30
  81. package/dist/contentTypeChecks.d.ts +0 -10
  82. package/dist/contentTypeChecks.js +0 -30
  83. package/dist/context.d.ts +0 -75
  84. package/dist/context.js +0 -43
  85. package/dist/decycle.d.ts +0 -2
  86. package/dist/decycle.js +0 -70
  87. package/dist/dereference.d.ts +0 -5
  88. package/dist/dereference.js +0 -68
  89. package/dist/generateSchemaExample.d.ts +0 -45
  90. package/dist/generateSchemaExample.js +0 -342
  91. package/dist/getDisclosureLabel.d.ts +0 -7
  92. package/dist/getDisclosureLabel.js +0 -18
  93. package/dist/getOrCreateStoreByKey.d.ts +0 -10
  94. package/dist/getOrCreateStoreByKey.js +0 -19
  95. package/dist/json2xml.d.ts +0 -4
  96. package/dist/json2xml.js +0 -7
  97. package/dist/resolveOpenAPIOperation.d.ts +0 -11
  98. package/dist/resolveOpenAPIOperation.js +0 -173
  99. package/dist/resolveOpenAPIWebhook.d.ts +0 -11
  100. package/dist/resolveOpenAPIWebhook.js +0 -127
  101. package/dist/schemas/OpenAPISchemaItem.d.ts +0 -7
  102. package/dist/schemas/OpenAPISchemaItem.jsx +0 -16
  103. package/dist/schemas/OpenAPISchemas.d.ts +0 -14
  104. package/dist/schemas/OpenAPISchemas.jsx +0 -59
  105. package/dist/schemas/index.d.ts +0 -2
  106. package/dist/schemas/index.js +0 -2
  107. package/dist/schemas/resolveOpenAPISchemas.d.ts +0 -10
  108. package/dist/schemas/resolveOpenAPISchemas.js +0 -61
  109. package/dist/stringifyOpenAPI.d.ts +0 -4
  110. package/dist/stringifyOpenAPI.js +0 -15
  111. package/dist/translate.d.ts +0 -10
  112. package/dist/translate.jsx +0 -75
  113. package/dist/translations/de.d.ts +0 -43
  114. package/dist/translations/de.js +0 -43
  115. package/dist/translations/en.d.ts +0 -43
  116. package/dist/translations/en.js +0 -43
  117. package/dist/translations/es.d.ts +0 -43
  118. package/dist/translations/es.js +0 -43
  119. package/dist/translations/fr.d.ts +0 -43
  120. package/dist/translations/fr.js +0 -43
  121. package/dist/translations/index.d.ts +0 -395
  122. package/dist/translations/index.js +0 -27
  123. package/dist/translations/ja.d.ts +0 -43
  124. package/dist/translations/ja.js +0 -43
  125. package/dist/translations/nl.d.ts +0 -43
  126. package/dist/translations/nl.js +0 -43
  127. package/dist/translations/no.d.ts +0 -43
  128. package/dist/translations/no.js +0 -43
  129. package/dist/translations/pt-br.d.ts +0 -43
  130. package/dist/translations/pt-br.js +0 -43
  131. package/dist/translations/types.d.ts +0 -5
  132. package/dist/translations/types.js +0 -1
  133. package/dist/translations/zh.d.ts +0 -43
  134. package/dist/translations/zh.js +0 -43
  135. package/dist/tsconfig.build.tsbuildinfo +0 -1
  136. package/dist/types.d.ts +0 -31
  137. package/dist/types.js +0 -1
  138. package/dist/util/example.d.ts +0 -35
  139. package/dist/util/example.jsx +0 -103
  140. package/dist/util/server.d.ts +0 -9
  141. package/dist/util/server.js +0 -44
  142. package/dist/util/tryit-prefill.d.ts +0 -20
  143. package/dist/util/tryit-prefill.js +0 -129
  144. package/dist/utils.d.ts +0 -50
  145. package/dist/utils.js +0 -224
  146. package/src/InteractiveSection.tsx +0 -147
  147. package/src/Markdown.tsx +0 -12
  148. package/src/OpenAPICodeSample.tsx +0 -330
  149. package/src/OpenAPICodeSampleInteractive.tsx +0 -136
  150. package/src/OpenAPICodeSampleSelector.tsx +0 -94
  151. package/src/OpenAPICopyButton.tsx +0 -72
  152. package/src/OpenAPIDisclosure.tsx +0 -46
  153. package/src/OpenAPIDisclosureGroup.tsx +0 -158
  154. package/src/OpenAPIExample.tsx +0 -55
  155. package/src/OpenAPIMediaType.tsx +0 -139
  156. package/src/OpenAPIOperation.tsx +0 -35
  157. package/src/OpenAPIOperationContext.tsx +0 -45
  158. package/src/OpenAPIOperationDescription.tsx +0 -34
  159. package/src/OpenAPIOperationStability.tsx +0 -39
  160. package/src/OpenAPIPath.tsx +0 -90
  161. package/src/OpenAPIPrefillContextProvider.tsx +0 -40
  162. package/src/OpenAPIRequestBody.tsx +0 -54
  163. package/src/OpenAPIRequestBodyHeaderType.tsx +0 -36
  164. package/src/OpenAPIResponse.tsx +0 -82
  165. package/src/OpenAPIResponseExample.tsx +0 -151
  166. package/src/OpenAPIResponseExampleContent.tsx +0 -125
  167. package/src/OpenAPIResponses.tsx +0 -125
  168. package/src/OpenAPISchema.test.ts +0 -172
  169. package/src/OpenAPISchema.tsx +0 -654
  170. package/src/OpenAPISchemaName.tsx +0 -80
  171. package/src/OpenAPISchemaServer.tsx +0 -34
  172. package/src/OpenAPISecurities.tsx +0 -231
  173. package/src/OpenAPISelect.tsx +0 -96
  174. package/src/OpenAPISpec.tsx +0 -138
  175. package/src/OpenAPITabs.tsx +0 -147
  176. package/src/OpenAPIWebhook.tsx +0 -33
  177. package/src/OpenAPIWebhookExample.tsx +0 -60
  178. package/src/ScalarApiButton.tsx +0 -132
  179. package/src/StaticSection.tsx +0 -91
  180. package/src/__snapshots__/json2xml.test.ts.snap +0 -18
  181. package/src/code-samples.test.ts +0 -714
  182. package/src/code-samples.ts +0 -448
  183. package/src/common/OpenAPIColumnSpec.tsx +0 -31
  184. package/src/common/OpenAPIOperationDescription.tsx +0 -31
  185. package/src/common/OpenAPIStability.tsx +0 -23
  186. package/src/common/OpenAPISummary.tsx +0 -45
  187. package/src/contentTypeChecks.ts +0 -39
  188. package/src/context.ts +0 -99
  189. package/src/decycle.ts +0 -68
  190. package/src/dereference.ts +0 -29
  191. package/src/generateSchemaExample.test.ts +0 -1040
  192. package/src/generateSchemaExample.ts +0 -530
  193. package/src/getDisclosureLabel.ts +0 -25
  194. package/src/getOrCreateStoreByKey.ts +0 -33
  195. package/src/index.ts +0 -10
  196. package/src/json2xml.test.ts +0 -46
  197. package/src/json2xml.ts +0 -8
  198. package/src/resolveOpenAPIOperation.test.ts +0 -177
  199. package/src/resolveOpenAPIOperation.ts +0 -151
  200. package/src/resolveOpenAPIWebhook.ts +0 -99
  201. package/src/schemas/OpenAPISchemaItem.tsx +0 -34
  202. package/src/schemas/OpenAPISchemas.tsx +0 -98
  203. package/src/schemas/index.ts +0 -2
  204. package/src/schemas/resolveOpenAPISchemas.test.ts +0 -174
  205. package/src/schemas/resolveOpenAPISchemas.ts +0 -28
  206. package/src/stringifyOpenAPI.ts +0 -25
  207. package/src/translate.tsx +0 -80
  208. package/src/translations/de.ts +0 -43
  209. package/src/translations/en.ts +0 -43
  210. package/src/translations/es.ts +0 -43
  211. package/src/translations/fr.ts +0 -43
  212. package/src/translations/index.ts +0 -33
  213. package/src/translations/ja.ts +0 -43
  214. package/src/translations/nl.ts +0 -43
  215. package/src/translations/no.ts +0 -43
  216. package/src/translations/pt-br.ts +0 -43
  217. package/src/translations/types.ts +0 -7
  218. package/src/translations/zh.ts +0 -43
  219. package/src/types.ts +0 -46
  220. package/src/util/example.tsx +0 -129
  221. package/src/util/server.test.ts +0 -58
  222. package/src/util/server.ts +0 -47
  223. package/src/util/tryit-prefill.test.ts +0 -311
  224. package/src/util/tryit-prefill.ts +0 -160
  225. package/src/utils.ts +0 -255
@@ -1,174 +0,0 @@
1
- import { describe, expect, it } from 'bun:test';
2
-
3
- import { parseOpenAPI, traverse } from '@gitbook/openapi-parser';
4
- import { resolveOpenAPISchemas } from './resolveOpenAPISchemas';
5
-
6
- async function fetchFilesystem(url: string) {
7
- const response = await fetch(url);
8
- const text = await response.text();
9
- const { filesystem } = await parseOpenAPI({ value: text, rootURL: url });
10
- const transformedFs = await traverse(filesystem, async (node) => {
11
- if ('description' in node && typeof node.description === 'string' && node.description) {
12
- node['x-gitbook-description-html'] = node.description;
13
- }
14
- return node;
15
- });
16
- return transformedFs;
17
- }
18
-
19
- describe('#resolveOpenAPISchemas', () => {
20
- it('should resolve refs', async () => {
21
- const filesystem = await fetchFilesystem(
22
- 'https://petstore3.swagger.io/api/v3/openapi.json'
23
- );
24
- const resolved = await resolveOpenAPISchemas(filesystem, { schemas: ['Pet', 'Tag'] });
25
-
26
- expect(resolved).toMatchObject({
27
- schemas: [
28
- {
29
- name: 'Pet',
30
- schema: {
31
- properties: {
32
- tags: {
33
- type: 'array',
34
- items: {
35
- type: 'object',
36
- properties: {
37
- id: {
38
- format: 'int64',
39
- type: 'integer',
40
- },
41
- name: {
42
- type: 'string',
43
- },
44
- },
45
- },
46
- },
47
- },
48
- },
49
- },
50
- {
51
- name: 'Tag',
52
- schema: {
53
- type: 'object',
54
- properties: {
55
- id: {
56
- type: 'integer',
57
- format: 'int64',
58
- },
59
- name: {
60
- type: 'string',
61
- },
62
- },
63
- xml: {
64
- name: 'tag',
65
- },
66
- },
67
- },
68
- ],
69
- });
70
- });
71
-
72
- it('should support yaml', async () => {
73
- const filesystem = await fetchFilesystem(
74
- 'https://petstore3.swagger.io/api/v3/openapi.yaml'
75
- );
76
- const resolved = await resolveOpenAPISchemas(filesystem, { schemas: ['Pet'] });
77
-
78
- expect(resolved).toMatchObject({
79
- schemas: [
80
- {
81
- name: 'Pet',
82
- schema: {
83
- properties: {
84
- tags: {
85
- type: 'array',
86
- items: {
87
- properties: {
88
- id: {
89
- format: 'int64',
90
- type: 'integer',
91
- },
92
- name: {
93
- type: 'string',
94
- },
95
- },
96
- type: 'object',
97
- },
98
- },
99
- },
100
- },
101
- },
102
- ],
103
- });
104
- });
105
-
106
- it('should resolve circular refs', async () => {
107
- const filesystem = await fetchFilesystem('https://api.gitbook.com/openapi.json');
108
- const resolved = await resolveOpenAPISchemas(filesystem, {
109
- schemas: ['DocumentBlockTabs'],
110
- });
111
-
112
- expect(resolved).toMatchObject({
113
- schemas: [
114
- {
115
- name: 'DocumentBlockTabs',
116
- schema: {
117
- type: 'object',
118
- properties: {
119
- object: {
120
- type: 'string',
121
- enum: ['block'],
122
- },
123
- },
124
- },
125
- },
126
- ],
127
- });
128
- });
129
-
130
- it('should resolve to null if the schema does not exist', async () => {
131
- const filesystem = await fetchFilesystem(
132
- 'https://petstore3.swagger.io/api/v3/openapi.json'
133
- );
134
- const resolved = await resolveOpenAPISchemas(filesystem, {
135
- schemas: ['NonExistentSchema'],
136
- });
137
-
138
- expect(resolved).toBe(null);
139
- });
140
-
141
- it('should parse Swagger 2.0', async () => {
142
- const filesystem = await fetchFilesystem('https://petstore.swagger.io/v2/swagger.json');
143
- const resolved = await resolveOpenAPISchemas(filesystem, {
144
- schemas: ['Pet'],
145
- });
146
-
147
- expect(resolved).toMatchObject({
148
- schemas: [
149
- {
150
- name: 'Pet',
151
- schema: {
152
- properties: {
153
- tags: {
154
- type: 'array',
155
- items: {
156
- properties: {
157
- id: {
158
- format: 'int64',
159
- type: 'integer',
160
- },
161
- name: {
162
- type: 'string',
163
- },
164
- },
165
- type: 'object',
166
- },
167
- },
168
- },
169
- },
170
- },
171
- ],
172
- });
173
- });
174
- });
@@ -1,28 +0,0 @@
1
- import type { Filesystem, OpenAPISchema, OpenAPIV3xDocument } from '@gitbook/openapi-parser';
2
- import { filterSelectedOpenAPISchemas } from '@gitbook/openapi-parser';
3
- import { dereferenceFilesystem } from '../dereference';
4
-
5
- /**
6
- * Resolve an OpenAPI schemas from a file and compile it to a more usable format.
7
- * Schemas are extracted from the OpenAPI components.schemas
8
- */
9
- export async function resolveOpenAPISchemas(
10
- filesystem: Filesystem<OpenAPIV3xDocument>,
11
- options: {
12
- schemas: string[];
13
- }
14
- ): Promise<{
15
- schemas: OpenAPISchema[];
16
- } | null> {
17
- const { schemas: selectedSchemas } = options;
18
-
19
- const schema = await dereferenceFilesystem(filesystem);
20
-
21
- const schemas = filterSelectedOpenAPISchemas(schema, selectedSchemas);
22
-
23
- if (schemas.length === 0) {
24
- return null;
25
- }
26
-
27
- return { schemas };
28
- }
@@ -1,25 +0,0 @@
1
- /**
2
- * Stringify an OpenAPI object. Same API as JSON.stringify.
3
- */
4
- export function stringifyOpenAPI(
5
- value: any,
6
- replacer?: ((this: any, key: string, value: any) => any) | null,
7
- space?: string | number
8
- ): string {
9
- return JSON.stringify(
10
- value,
11
- (key, value) => {
12
- // Ignore internal keys
13
- if (key.startsWith('x-gitbook-')) {
14
- return undefined;
15
- }
16
-
17
- if (replacer) {
18
- return replacer(key, value);
19
- }
20
-
21
- return value;
22
- },
23
- space
24
- );
25
- }
package/src/translate.tsx DELETED
@@ -1,80 +0,0 @@
1
- import React from 'react';
2
-
3
- import type { Translation, TranslationKey } from './translations';
4
-
5
- /**
6
- * Translate a string.
7
- */
8
- export function t(
9
- translation: Translation,
10
- id: TranslationKey,
11
- ...args: React.ReactNode[]
12
- ): React.ReactNode {
13
- const string = translation[id];
14
- if (!string) {
15
- throw new Error(`Translation not found for "${id}"`);
16
- }
17
-
18
- // Now we are going to replace the arguments
19
- // but we want to return a string as long as it's possible
20
- // (eg. if there isn't any argument that is a ReactNode)
21
- const parts: React.ReactNode[] = [];
22
- let currentStringToReplace: string = string;
23
-
24
- args.forEach((arg, i) => {
25
- if (typeof arg === 'string') {
26
- currentStringToReplace = currentStringToReplace.replace(`\${${i + 1}}`, arg);
27
- } else {
28
- const [partToPush, partToReplace] = currentStringToReplace.split(`\${${i + 1}}`);
29
- if (partToPush === undefined || partToReplace === undefined) {
30
- throw new Error(`Invalid translation "${id}"`);
31
- }
32
- parts.push(<React.Fragment key={`string-${i}`}>{partToPush}</React.Fragment>);
33
- parts.push(<React.Fragment key={`arg-${i}`}>{arg}</React.Fragment>);
34
- currentStringToReplace = partToReplace;
35
- }
36
- });
37
-
38
- if (!parts.length) {
39
- return currentStringToReplace;
40
- }
41
-
42
- return (
43
- <>
44
- {parts}
45
- {currentStringToReplace}
46
- </>
47
- );
48
- }
49
-
50
- /**
51
- * Version of `t` that returns a string.
52
- */
53
- export function tString(
54
- translation: Translation,
55
- id: TranslationKey,
56
- ...args: React.ReactNode[]
57
- ): string {
58
- const result = t(translation, id, ...args);
59
- return reactToString(result);
60
- }
61
-
62
- function reactToString(el: React.ReactNode): string {
63
- if (typeof el === 'string' || typeof el === 'number' || typeof el === 'boolean') {
64
- return `${el}`;
65
- }
66
-
67
- if (el === null || el === undefined) {
68
- return '';
69
- }
70
-
71
- if (Array.isArray(el)) {
72
- return el.map(reactToString).join('');
73
- }
74
-
75
- if (typeof el === 'object' && 'props' in el) {
76
- return el.props.children.map(reactToString).join('');
77
- }
78
-
79
- throw new Error(`Unsupported type ${typeof el}`);
80
- }
@@ -1,43 +0,0 @@
1
- export const de = {
2
- required: 'Erforderlich',
3
- deprecated: 'Veraltet',
4
- deprecated_and_sunset_on: 'Diese Operation ist veraltet und wird am ${1} eingestellt.',
5
- stability_experimental: 'Experimentell',
6
- stability_alpha: 'Alpha',
7
- stability_beta: 'Beta',
8
- copy_to_clipboard: 'In die Zwischenablage kopieren',
9
- copied: 'Kopiert',
10
- no_content: 'Kein Inhalt',
11
- unresolved_reference: 'Nicht aufgelöste Referenz',
12
- circular_reference: 'Zirkuläre Referenz',
13
- read_only: 'Nur lesen',
14
- write_only: 'Nur schreiben',
15
- optional: 'Optional',
16
- min: 'Min',
17
- max: 'Max',
18
- nullable: 'Nullfähig',
19
- body: 'Rumpf',
20
- payload: 'Nutzlast',
21
- headers: 'Header',
22
- header: 'Header',
23
- authorizations: 'Autorisierungen',
24
- responses: 'Antworten',
25
- response: 'Antwort',
26
- path_parameters: 'Pfadparameter',
27
- query_parameters: 'Abfrageparameter',
28
- header_parameters: 'Header-Parameter',
29
- attributes: 'Attribute',
30
- test_it: 'Teste es',
31
- information: 'Information',
32
- success: 'Erfolg',
33
- redirect: 'Umleitung',
34
- error: 'Fehler',
35
- show: 'Zeige ${1}',
36
- hide: 'Verstecke ${1}',
37
- available_items: 'Verfügbare Elemente',
38
- available_scopes: 'Verfügbare scopes',
39
- properties: 'Eigenschaften',
40
- or: 'oder',
41
- and: 'und',
42
- possible_values: 'Mögliche Werte',
43
- };
@@ -1,43 +0,0 @@
1
- export const en = {
2
- required: 'Required',
3
- deprecated: 'Deprecated',
4
- deprecated_and_sunset_on: 'This operation is deprecated and will be sunset on ${1}.',
5
- stability_experimental: 'Experimental',
6
- stability_alpha: 'Alpha',
7
- stability_beta: 'Beta',
8
- copy_to_clipboard: 'Copy to clipboard',
9
- copied: 'Copied',
10
- no_content: 'No content',
11
- unresolved_reference: 'Unresolved reference',
12
- circular_reference: 'Circular reference',
13
- read_only: 'Read-only',
14
- write_only: 'Write-only',
15
- optional: 'Optional',
16
- min: 'Min',
17
- max: 'Max',
18
- nullable: 'Nullable',
19
- body: 'Body',
20
- payload: 'Payload',
21
- headers: 'Headers',
22
- header: 'Header',
23
- authorizations: 'Authorizations',
24
- responses: 'Responses',
25
- response: 'Response',
26
- path_parameters: 'Path parameters',
27
- query_parameters: 'Query parameters',
28
- header_parameters: 'Header parameters',
29
- attributes: 'Attributes',
30
- test_it: 'Test it',
31
- information: 'Information',
32
- success: 'Success',
33
- redirect: 'Redirect',
34
- error: 'Error',
35
- show: 'Show ${1}',
36
- hide: 'Hide ${1}',
37
- available_items: 'Available items',
38
- available_scopes: 'Available scopes',
39
- possible_values: 'Possible values',
40
- properties: 'Properties',
41
- or: 'or',
42
- and: 'and',
43
- };
@@ -1,43 +0,0 @@
1
- export const es = {
2
- required: 'Requerido',
3
- deprecated: 'Obsoleto',
4
- deprecated_and_sunset_on: 'Esta operación está obsoleta y se retirará el ${1}.',
5
- stability_experimental: 'Experimental',
6
- stability_alpha: 'Alfa',
7
- stability_beta: 'Beta',
8
- copy_to_clipboard: 'Copiar al portapapeles',
9
- copied: 'Copiado',
10
- no_content: 'Sin contenido',
11
- unresolved_reference: 'Referencia no resuelta',
12
- circular_reference: 'Referencia circular',
13
- read_only: 'Solo lectura',
14
- write_only: 'Solo escritura',
15
- optional: 'Opcional',
16
- min: 'Mín',
17
- max: 'Máx',
18
- nullable: 'Nulo',
19
- body: 'Cuerpo',
20
- payload: 'Caga útil',
21
- headers: 'Headers',
22
- header: 'Header',
23
- authorizations: 'Autorizaciones',
24
- responses: 'Respuestas',
25
- response: 'Respuesta',
26
- path_parameters: 'Parámetros de ruta',
27
- query_parameters: 'Parámetros de consulta',
28
- header_parameters: 'Parámetros de encabezado',
29
- attributes: 'Atributos',
30
- test_it: 'Pruébalo',
31
- information: 'Información',
32
- success: 'Éxito',
33
- redirect: 'Redirección',
34
- error: 'Error',
35
- show: 'Mostrar ${1}',
36
- hide: 'Ocultar ${1}',
37
- available_items: 'Elementos disponibles',
38
- available_scopes: 'Scopes disponibles',
39
- properties: 'Propiedades',
40
- or: 'o',
41
- and: 'y',
42
- possible_values: 'Valores posibles',
43
- };
@@ -1,43 +0,0 @@
1
- export const fr = {
2
- required: 'Requis',
3
- deprecated: 'Obsolète',
4
- deprecated_and_sunset_on: 'Cette opération est obsolète et sera supprimée le ${1}.',
5
- stability_experimental: 'Expérimental',
6
- stability_alpha: 'Alpha',
7
- stability_beta: 'Bêta',
8
- copy_to_clipboard: 'Copier dans le presse-papiers',
9
- copied: 'Copié',
10
- no_content: 'Aucun contenu',
11
- unresolved_reference: 'Référence non résolue',
12
- circular_reference: 'Référence circulaire',
13
- read_only: 'Lecture seule',
14
- write_only: 'Écriture seule',
15
- optional: 'Optionnel',
16
- min: 'Min',
17
- max: 'Max',
18
- nullable: 'Nullable',
19
- body: 'Corps',
20
- payload: 'Charge utile',
21
- headers: 'Headers',
22
- header: 'Header',
23
- authorizations: 'Autorisations',
24
- responses: 'Réponses',
25
- response: 'Réponse',
26
- path_parameters: 'Paramètres de chemin',
27
- query_parameters: 'Paramètres de requête',
28
- header_parameters: "Paramètres d'en-tête",
29
- attributes: 'Attributs',
30
- test_it: 'Tester',
31
- information: 'Information',
32
- success: 'Succès',
33
- redirect: 'Redirection',
34
- error: 'Erreur',
35
- show: 'Afficher ${1}',
36
- hide: 'Masquer ${1}',
37
- available_items: 'Éléments disponibles',
38
- available_scopes: 'Scopes disponibles',
39
- properties: 'Propriétés',
40
- or: 'ou',
41
- and: 'et',
42
- possible_values: 'Valeurs possibles',
43
- };
@@ -1,33 +0,0 @@
1
- import { de } from './de';
2
- import { en } from './en';
3
- import { es } from './es';
4
- import { fr } from './fr';
5
- import { ja } from './ja';
6
- import { nl } from './nl';
7
- import { no } from './no';
8
- import { pt_br } from './pt-br';
9
- import type { Translation } from './types';
10
- import { zh } from './zh';
11
-
12
- export * from './types';
13
-
14
- export const translations = {
15
- en,
16
- de,
17
- es,
18
- fr,
19
- ja,
20
- nl,
21
- no,
22
- 'pt-br': pt_br,
23
- zh,
24
- } satisfies Record<string, Translation>;
25
-
26
- export type TranslationLocale = keyof typeof translations;
27
-
28
- /**
29
- * Check if the locale is valid.
30
- */
31
- export function checkIsValidLocale(locale: string): locale is TranslationLocale {
32
- return Object.prototype.hasOwnProperty.call(translations, locale);
33
- }
@@ -1,43 +0,0 @@
1
- export const ja = {
2
- required: '必須',
3
- deprecated: '非推奨',
4
- deprecated_and_sunset_on: 'この操作は非推奨であり、${1}に廃止されます。',
5
- stability_experimental: '実験的',
6
- stability_alpha: 'アルファ',
7
- stability_beta: 'ベータ',
8
- copy_to_clipboard: 'クリップボードにコピー',
9
- copied: 'コピー済み',
10
- no_content: 'コンテンツなし',
11
- unresolved_reference: '未解決の参照',
12
- circular_reference: '循環参照',
13
- read_only: '読み取り専用',
14
- write_only: '書き込み専用',
15
- optional: 'オプション',
16
- min: '最小',
17
- max: '最大',
18
- nullable: 'ヌル許容',
19
- body: '本文',
20
- payload: 'ペイロード',
21
- headers: 'ヘッダー',
22
- header: 'ヘッダー',
23
- authorizations: '認可',
24
- responses: 'レスポンス',
25
- response: 'レスポンス',
26
- path_parameters: 'パスパラメータ',
27
- query_parameters: 'クエリパラメータ',
28
- header_parameters: 'ヘッダーパラメータ',
29
- attributes: '属性',
30
- test_it: 'テストする',
31
- information: '情報',
32
- success: '成功',
33
- redirect: 'リダイレクト',
34
- error: 'エラー',
35
- show: '${1}を表示',
36
- hide: '${1}を非表示',
37
- available_items: '利用可能なアイテム',
38
- available_scopes: '利用可能なスコープ',
39
- properties: 'プロパティ',
40
- or: 'または',
41
- and: 'かつ',
42
- possible_values: '可能な値',
43
- };
@@ -1,43 +0,0 @@
1
- export const nl = {
2
- required: 'Vereist',
3
- deprecated: 'Verouderd',
4
- deprecated_and_sunset_on: 'Deze bewerking is verouderd en wordt op ${1} beëindigd.',
5
- stability_experimental: 'Experimenteel',
6
- stability_alpha: 'Alfa',
7
- stability_beta: 'Bèta',
8
- copy_to_clipboard: 'Kopiëren naar klembord',
9
- copied: 'Gekopieerd',
10
- no_content: 'Geen inhoud',
11
- unresolved_reference: 'Onopgeloste verwijzing',
12
- circular_reference: 'Circulaire verwijzing',
13
- read_only: 'Alleen lezen',
14
- write_only: 'Alleen schrijven',
15
- optional: 'Optioneel',
16
- min: 'Min',
17
- max: 'Max',
18
- nullable: 'Null toegestaan',
19
- body: 'Body',
20
- payload: 'Payload',
21
- headers: 'Headers',
22
- header: 'Header',
23
- authorizations: 'Autorisaties',
24
- responses: 'Reacties',
25
- response: 'Reactie',
26
- path_parameters: 'Padparameters',
27
- query_parameters: 'Queryparameters',
28
- header_parameters: 'Headerparameters',
29
- attributes: 'Attributen',
30
- test_it: 'Test het',
31
- information: 'Informatie',
32
- success: 'Succes',
33
- redirect: 'Omleiding',
34
- error: 'Fout',
35
- show: 'Toon ${1}',
36
- hide: 'Verberg ${1}',
37
- available_items: 'Beschikbare items',
38
- available_scopes: 'Beschikbare scopes',
39
- properties: 'Eigenschappen',
40
- or: 'of',
41
- and: 'en',
42
- possible_values: 'Mogelijke waarden',
43
- };
@@ -1,43 +0,0 @@
1
- export const no = {
2
- required: 'Påkrevd',
3
- deprecated: 'Foreldet',
4
- deprecated_and_sunset_on: 'Denne operasjonen er foreldet og vil bli avviklet den ${1}.',
5
- stability_experimental: 'Eksperimentell',
6
- stability_alpha: 'Alfa',
7
- stability_beta: 'Beta',
8
- copy_to_clipboard: 'Kopier til utklippstavle',
9
- copied: 'Kopiert',
10
- no_content: 'Ingen innhold',
11
- unresolved_reference: 'Uavklart referanse',
12
- circular_reference: 'Sirkulær referanse',
13
- read_only: 'Skrivebeskyttet',
14
- write_only: 'Kun skriving',
15
- optional: 'Valgfri',
16
- min: 'Min',
17
- max: 'Maks',
18
- nullable: 'Kan være null',
19
- body: 'Brødtekst',
20
- payload: 'Nyttelast',
21
- headers: 'Headers',
22
- header: 'Header',
23
- authorizations: 'Autorisasjoner',
24
- responses: 'Responser',
25
- response: 'Respons',
26
- path_parameters: 'Sti-parametere',
27
- query_parameters: 'Forespørselsparametere',
28
- header_parameters: 'Header-parametere',
29
- attributes: 'Attributter',
30
- test_it: 'Test det',
31
- information: 'Informasjon',
32
- success: 'Suksess',
33
- redirect: 'Viderekobling',
34
- error: 'Feil',
35
- show: 'Vis ${1}',
36
- hide: 'Skjul ${1}',
37
- available_items: 'Tilgjengelige elementer',
38
- available_scopes: 'Tilgjengelige scopes',
39
- properties: 'Egenskaper',
40
- or: 'eller',
41
- and: 'og',
42
- possible_values: 'Mulige verdier',
43
- };