@kulupu-linku/sona 0.1.10 → 0.2.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.
@@ -0,0 +1,537 @@
1
+ import type { AppType } from '../server';
2
+ export declare const client: ({ baseUrl, fetchFunc, }: {
3
+ baseUrl: string;
4
+ fetchFunc: any;
5
+ }) => {
6
+ index: import("hono/client").ClientRequest<{
7
+ $get: {
8
+ input: {};
9
+ output: {};
10
+ };
11
+ }>;
12
+ } & {
13
+ v1: {
14
+ words: import("hono/client").ClientRequest<{
15
+ $get: {
16
+ input: {
17
+ query: {
18
+ lang?: string | string[] | undefined;
19
+ };
20
+ };
21
+ output: Record<string, {
22
+ id: string;
23
+ author_verbatim: string;
24
+ author_verbatim_source: string;
25
+ book: "pu" | "ku suli" | "ku lili" | "none";
26
+ coined_era: "" | "pre-pu" | "post-pu" | "post-ku";
27
+ coined_year: string;
28
+ creator: string[];
29
+ see_also: string[];
30
+ source_language: string;
31
+ usage_category: "core" | "common" | "uncommon" | "obscure" | "sandbox";
32
+ word: string;
33
+ deprecated: boolean;
34
+ etymology: {
35
+ word?: string | undefined;
36
+ alt?: string | undefined;
37
+ }[];
38
+ audio: {
39
+ author: string;
40
+ link: string;
41
+ }[];
42
+ usage: Record<string, number>;
43
+ translations: Record<string, {
44
+ etymology: {
45
+ language: string;
46
+ definition?: string | undefined;
47
+ }[];
48
+ commentary: string;
49
+ definition: string;
50
+ sp_etymology: string;
51
+ }>;
52
+ ku_data?: Record<string, number> | undefined;
53
+ resources?: {
54
+ sona_pona?: string | undefined;
55
+ lipamanka_semantic?: string | undefined;
56
+ } | undefined;
57
+ representations?: {
58
+ sitelen_emosi?: string | undefined;
59
+ sitelen_jelo?: string[] | undefined;
60
+ ligatures?: string[] | undefined;
61
+ sitelen_sitelen?: string | undefined;
62
+ ucsur?: string | undefined;
63
+ } | undefined;
64
+ pu_verbatim?: {
65
+ en: string;
66
+ fr: string;
67
+ de: string;
68
+ eo: string;
69
+ } | undefined;
70
+ }>;
71
+ };
72
+ }>;
73
+ };
74
+ } & {
75
+ v1: import("hono/client").ClientRequest<{
76
+ $get: {
77
+ input: {};
78
+ output: {};
79
+ };
80
+ }>;
81
+ } & {
82
+ v1: {
83
+ words: {
84
+ ":word": import("hono/client").ClientRequest<{
85
+ $get: {
86
+ input: {
87
+ query: {
88
+ lang?: string | string[] | undefined;
89
+ };
90
+ } & {
91
+ param: {
92
+ word: string;
93
+ };
94
+ };
95
+ output: import("../server/utils").Result<{
96
+ id: string;
97
+ author_verbatim: string;
98
+ author_verbatim_source: string;
99
+ book: "pu" | "ku suli" | "ku lili" | "none";
100
+ coined_era: "" | "pre-pu" | "post-pu" | "post-ku";
101
+ coined_year: string;
102
+ creator: string[];
103
+ see_also: string[];
104
+ source_language: string;
105
+ usage_category: "core" | "common" | "uncommon" | "obscure" | "sandbox";
106
+ word: string;
107
+ deprecated: boolean;
108
+ etymology: {
109
+ word?: string | undefined;
110
+ alt?: string | undefined;
111
+ }[];
112
+ audio: {
113
+ author: string;
114
+ link: string;
115
+ }[];
116
+ usage: Record<string, number>;
117
+ translations: Record<string, {
118
+ etymology: {
119
+ language: string;
120
+ definition?: string | undefined;
121
+ }[];
122
+ commentary: string;
123
+ definition: string;
124
+ sp_etymology: string;
125
+ }>;
126
+ ku_data?: Record<string, number> | undefined;
127
+ resources?: {
128
+ sona_pona?: string | undefined;
129
+ lipamanka_semantic?: string | undefined;
130
+ } | undefined;
131
+ representations?: {
132
+ sitelen_emosi?: string | undefined;
133
+ sitelen_jelo?: string[] | undefined;
134
+ ligatures?: string[] | undefined;
135
+ sitelen_sitelen?: string | undefined;
136
+ ucsur?: string | undefined;
137
+ } | undefined;
138
+ pu_verbatim?: {
139
+ en: string;
140
+ fr: string;
141
+ de: string;
142
+ eo: string;
143
+ } | undefined;
144
+ }>;
145
+ };
146
+ }>;
147
+ };
148
+ };
149
+ } & {
150
+ v1: {
151
+ sandbox: import("hono/client").ClientRequest<{
152
+ $get: {
153
+ input: {
154
+ query: {
155
+ lang?: string | string[] | undefined;
156
+ };
157
+ };
158
+ output: Record<string, {
159
+ id: string;
160
+ author_verbatim: string;
161
+ author_verbatim_source: string;
162
+ book: "pu" | "ku suli" | "ku lili" | "none";
163
+ coined_era: "" | "pre-pu" | "post-pu" | "post-ku";
164
+ coined_year: string;
165
+ creator: string[];
166
+ see_also: string[];
167
+ source_language: string;
168
+ usage_category: "core" | "common" | "uncommon" | "obscure" | "sandbox";
169
+ word: string;
170
+ deprecated: boolean;
171
+ etymology: {
172
+ word?: string | undefined;
173
+ alt?: string | undefined;
174
+ }[];
175
+ audio: {
176
+ author: string;
177
+ link: string;
178
+ }[];
179
+ usage: Record<string, number>;
180
+ translations: Record<string, {
181
+ etymology: {
182
+ language: string;
183
+ definition?: string | undefined;
184
+ }[];
185
+ commentary: string;
186
+ definition: string;
187
+ sp_etymology: string;
188
+ }>;
189
+ ku_data?: Record<string, number> | undefined;
190
+ resources?: {
191
+ sona_pona?: string | undefined;
192
+ lipamanka_semantic?: string | undefined;
193
+ } | undefined;
194
+ representations?: {
195
+ sitelen_emosi?: string | undefined;
196
+ sitelen_jelo?: string[] | undefined;
197
+ ligatures?: string[] | undefined;
198
+ sitelen_sitelen?: string | undefined;
199
+ ucsur?: string | undefined;
200
+ } | undefined;
201
+ pu_verbatim?: {
202
+ en: string;
203
+ fr: string;
204
+ de: string;
205
+ eo: string;
206
+ } | undefined;
207
+ }>;
208
+ };
209
+ }>;
210
+ };
211
+ } & {
212
+ v1: {
213
+ sandbox: {
214
+ ":word": import("hono/client").ClientRequest<{
215
+ $get: {
216
+ input: {
217
+ query: {
218
+ lang?: string | string[] | undefined;
219
+ };
220
+ } & {
221
+ param: {
222
+ word: string;
223
+ };
224
+ };
225
+ output: import("../server/utils").Result<{
226
+ id: string;
227
+ author_verbatim: string;
228
+ author_verbatim_source: string;
229
+ book: "pu" | "ku suli" | "ku lili" | "none";
230
+ coined_era: "" | "pre-pu" | "post-pu" | "post-ku";
231
+ coined_year: string;
232
+ creator: string[];
233
+ see_also: string[];
234
+ source_language: string;
235
+ usage_category: "core" | "common" | "uncommon" | "obscure" | "sandbox";
236
+ word: string;
237
+ deprecated: boolean;
238
+ etymology: {
239
+ word?: string | undefined;
240
+ alt?: string | undefined;
241
+ }[];
242
+ audio: {
243
+ author: string;
244
+ link: string;
245
+ }[];
246
+ usage: Record<string, number>;
247
+ translations: Record<string, {
248
+ etymology: {
249
+ language: string;
250
+ definition?: string | undefined;
251
+ }[];
252
+ commentary: string;
253
+ definition: string;
254
+ sp_etymology: string;
255
+ }>;
256
+ ku_data?: Record<string, number> | undefined;
257
+ resources?: {
258
+ sona_pona?: string | undefined;
259
+ lipamanka_semantic?: string | undefined;
260
+ } | undefined;
261
+ representations?: {
262
+ sitelen_emosi?: string | undefined;
263
+ sitelen_jelo?: string[] | undefined;
264
+ ligatures?: string[] | undefined;
265
+ sitelen_sitelen?: string | undefined;
266
+ ucsur?: string | undefined;
267
+ } | undefined;
268
+ pu_verbatim?: {
269
+ en: string;
270
+ fr: string;
271
+ de: string;
272
+ eo: string;
273
+ } | undefined;
274
+ }>;
275
+ };
276
+ }>;
277
+ };
278
+ };
279
+ } & {
280
+ v1: {
281
+ luka_pona: {
282
+ fingerspelling: import("hono/client").ClientRequest<{
283
+ $get: {
284
+ input: {
285
+ query: {
286
+ lang?: string | string[] | undefined;
287
+ };
288
+ };
289
+ output: Record<string, {
290
+ id: string;
291
+ etymology: {
292
+ language: string;
293
+ sign: string;
294
+ }[];
295
+ translations: Record<string, {
296
+ parameters: {
297
+ handshape?: string | undefined;
298
+ movement?: string | undefined;
299
+ placement?: string | undefined;
300
+ orientation?: string | undefined;
301
+ };
302
+ }>;
303
+ is_two_handed: boolean;
304
+ signwriting: {
305
+ fsw: string;
306
+ swu: string;
307
+ };
308
+ video: {
309
+ gif?: string | undefined;
310
+ mp4?: string | undefined;
311
+ };
312
+ }>;
313
+ };
314
+ }>;
315
+ };
316
+ };
317
+ } & {
318
+ v1: {
319
+ luka_pona: {
320
+ fingerspelling: {
321
+ ":sign": import("hono/client").ClientRequest<{
322
+ $get: {
323
+ input: {
324
+ query: {
325
+ lang?: string | string[] | undefined;
326
+ };
327
+ } & {
328
+ param: {
329
+ sign: string;
330
+ };
331
+ };
332
+ output: import("../server/utils").Result<{
333
+ id: string;
334
+ etymology: {
335
+ language: string;
336
+ sign: string;
337
+ }[];
338
+ is_two_handed: boolean;
339
+ signwriting: {
340
+ fsw: string;
341
+ swu: string;
342
+ };
343
+ video: {
344
+ gif?: string | undefined;
345
+ mp4?: string | undefined;
346
+ };
347
+ }>;
348
+ };
349
+ }>;
350
+ };
351
+ };
352
+ };
353
+ } & {
354
+ v1: {
355
+ luka_pona: {
356
+ signs: import("hono/client").ClientRequest<{
357
+ $get: {
358
+ input: {
359
+ query: {
360
+ lang?: string | string[] | undefined;
361
+ };
362
+ };
363
+ output: Record<string, {
364
+ id: string;
365
+ etymology: {
366
+ language: string;
367
+ sign?: string | undefined;
368
+ }[];
369
+ translations: Record<string, {
370
+ parameters: {
371
+ handshape?: string | undefined;
372
+ movement?: string | undefined;
373
+ placement?: string | undefined;
374
+ orientation?: string | undefined;
375
+ };
376
+ icons: string;
377
+ }>;
378
+ definition: string;
379
+ is_two_handed: boolean;
380
+ new_gloss: string;
381
+ old_gloss: string;
382
+ signwriting: {
383
+ fsw: string;
384
+ swu: string;
385
+ };
386
+ video: {
387
+ gif: string;
388
+ mp4: string;
389
+ };
390
+ }>;
391
+ };
392
+ }>;
393
+ };
394
+ };
395
+ } & {
396
+ v1: {
397
+ luka_pona: {
398
+ signs: {
399
+ ":sign": import("hono/client").ClientRequest<{
400
+ $get: {
401
+ input: {
402
+ query: {
403
+ lang?: string | string[] | undefined;
404
+ };
405
+ } & {
406
+ param: {
407
+ sign: string;
408
+ };
409
+ };
410
+ output: import("../server/utils").Result<{
411
+ id: string;
412
+ etymology: {
413
+ language: string;
414
+ sign?: string | undefined;
415
+ }[];
416
+ definition: string;
417
+ is_two_handed: boolean;
418
+ new_gloss: string;
419
+ old_gloss: string;
420
+ signwriting: {
421
+ fsw: string;
422
+ swu: string;
423
+ };
424
+ video: {
425
+ gif: string;
426
+ mp4: string;
427
+ };
428
+ }>;
429
+ };
430
+ }>;
431
+ };
432
+ };
433
+ };
434
+ } & {
435
+ v1: {
436
+ fonts: import("hono/client").ClientRequest<{
437
+ $get: {
438
+ input: {};
439
+ output: Record<string, {
440
+ id: string;
441
+ creator: string[];
442
+ ligatures: boolean;
443
+ ucsur: boolean;
444
+ features: string[];
445
+ filename: string;
446
+ license: string;
447
+ name: string;
448
+ style: string;
449
+ version: string;
450
+ writing_system: "sitelen pona" | "sitelen sitelen" | "alphabet" | "syllabary" | "logography" | "tokiponido alphabet" | "tokiponido syllabary" | "tokiponido logography";
451
+ links: {
452
+ fontfile?: string | undefined;
453
+ repo?: string | undefined;
454
+ webpage?: string | undefined;
455
+ };
456
+ last_updated?: string | undefined;
457
+ }>;
458
+ };
459
+ }>;
460
+ };
461
+ } & {
462
+ v1: {
463
+ fonts: {
464
+ ":font": import("hono/client").ClientRequest<{
465
+ $get: {
466
+ input: {
467
+ param: {
468
+ font: string;
469
+ };
470
+ };
471
+ output: import("../server/utils").Result<{
472
+ id: string;
473
+ creator: string[];
474
+ ligatures: boolean;
475
+ ucsur: boolean;
476
+ features: string[];
477
+ filename: string;
478
+ license: string;
479
+ name: string;
480
+ style: string;
481
+ version: string;
482
+ writing_system: "sitelen pona" | "sitelen sitelen" | "alphabet" | "syllabary" | "logography" | "tokiponido alphabet" | "tokiponido syllabary" | "tokiponido logography";
483
+ links: {
484
+ fontfile?: string | undefined;
485
+ repo?: string | undefined;
486
+ webpage?: string | undefined;
487
+ };
488
+ last_updated?: string | undefined;
489
+ }>;
490
+ };
491
+ }>;
492
+ };
493
+ };
494
+ } & {
495
+ v1: {
496
+ languages: import("hono/client").ClientRequest<{
497
+ $get: {
498
+ input: {};
499
+ output: Record<string, {
500
+ id: string;
501
+ name: {
502
+ en: string;
503
+ tok?: string | undefined;
504
+ endonym?: string | undefined;
505
+ };
506
+ locale: string;
507
+ direction: "ltr" | "rtl";
508
+ }>;
509
+ };
510
+ }>;
511
+ };
512
+ } & {
513
+ v1: {
514
+ languages: {
515
+ ":language": import("hono/client").ClientRequest<{
516
+ $get: {
517
+ input: {
518
+ param: {
519
+ language: string;
520
+ };
521
+ };
522
+ output: import("../server/utils").Result<{
523
+ id: string;
524
+ name: {
525
+ en: string;
526
+ tok?: string | undefined;
527
+ endonym?: string | undefined;
528
+ };
529
+ locale: string;
530
+ direction: "ltr" | "rtl";
531
+ }>;
532
+ };
533
+ }>;
534
+ };
535
+ };
536
+ };
537
+ export type ApiType = AppType;
@@ -0,0 +1,27 @@
1
+ import type { Fingerspelling, Font, Fonts, Language, Languages, LocalizedFingerspellingSign, LocalizedSign, LocalizedWord, Signs, Words } from '.';
2
+ import { client } from './client';
3
+ import type { ClientResponse } from "hono/client";
4
+ import type { Equal, Expect } from "hono/utils/types";
5
+ type ResponseType<F> = F extends {
6
+ $get: (...args: any[]) => Promise<ClientResponse<infer O>>;
7
+ } ? O : never;
8
+ type ClientType = typeof client;
9
+ type Result<T> = {
10
+ ok: true;
11
+ data: T;
12
+ } | {
13
+ ok: false;
14
+ message: string;
15
+ };
16
+ export type WordsTest = Expect<Equal<ResponseType<ClientType["v1"]["words"]>, Words>>;
17
+ export type WordTest = Expect<Equal<ResponseType<ClientType["v1"]["words"][":word"]>, Result<LocalizedWord>>>;
18
+ export type SignsTest = Expect<Equal<ResponseType<ClientType["v1"]["luka_pona"]["signs"]>, Signs>>;
19
+ export type SignTest = Expect<Equal<ResponseType<ClientType["v1"]["luka_pona"]["signs"][":sign"]>, Result<LocalizedSign>>>;
20
+ export type FingerspellingsTest = Expect<Equal<ResponseType<ClientType["v1"]["luka_pona"]["fingerspelling"]>, Fingerspelling>>;
21
+ export type FingerspellingTest = Expect<Equal<ResponseType<ClientType["v1"]["luka_pona"]["fingerspelling"][":sign"]>, Result<LocalizedFingerspellingSign>>>;
22
+ export type SandboxTest = Expect<Equal<ResponseType<ClientType["v1"]["sandbox"]>, Words>>;
23
+ export type FontsTest = Expect<Equal<ResponseType<ClientType["v1"]["fonts"]>, Fonts>>;
24
+ export type FontTest = Expect<Equal<ResponseType<ClientType["v1"]["fonts"][":font"]>, Result<Font>>>;
25
+ export type LanguagesTest = Expect<Equal<ResponseType<ClientType["v1"]["languages"]>, Languages>>;
26
+ export type LanguageTest = Expect<Equal<ResponseType<ClientType["v1"]["languages"][":language"]>, Result<Language>>>;
27
+ export {};