@tinkerer/sdk 0.1.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.
- package/dist/gen/common/v1/pagination_pb.d.ts +99 -0
- package/dist/gen/common/v1/pagination_pb.js +28 -0
- package/dist/gen/directory/v1/directory_pb.d.ts +57 -0
- package/dist/gen/directory/v1/directory_pb.js +26 -0
- package/dist/gen/google/type/date_pb.d.ts +55 -0
- package/dist/gen/google/type/date_pb.js +23 -0
- package/dist/gen/lms/v1/lms_pb.d.ts +434 -0
- package/dist/gen/lms/v1/lms_pb.js +190 -0
- package/dist/index.d.ts +32 -0
- package/dist/index.js +32 -0
- package/package.json +35 -0
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import type { GenFile, GenMessage } from "@bufbuild/protobuf/codegenv2";
|
|
2
|
+
import type { Message } from "@bufbuild/protobuf";
|
|
3
|
+
/**
|
|
4
|
+
* Describes the file common/v1/pagination.proto.
|
|
5
|
+
*/
|
|
6
|
+
export declare const file_common_v1_pagination: GenFile;
|
|
7
|
+
/**
|
|
8
|
+
* CursorPageRequest is the standard pagination block for List endpoints
|
|
9
|
+
* backed by keyset pagination. Efficient at any depth on large datasets;
|
|
10
|
+
* does not support page skipping or totals.
|
|
11
|
+
*
|
|
12
|
+
* @generated from message common.v1.CursorPageRequest
|
|
13
|
+
*/
|
|
14
|
+
export type CursorPageRequest = Message<"common.v1.CursorPageRequest"> & {
|
|
15
|
+
/**
|
|
16
|
+
* Maximum number of items to return. The server may return fewer; if
|
|
17
|
+
* zero, a server-chosen default is used.
|
|
18
|
+
*
|
|
19
|
+
* @generated from field: int32 page_size = 1;
|
|
20
|
+
*/
|
|
21
|
+
pageSize: number;
|
|
22
|
+
/**
|
|
23
|
+
* Opaque token from a previous response. If empty, the first page is
|
|
24
|
+
* returned. Tokens are invalid if the sort or filter parameters of the
|
|
25
|
+
* request changed.
|
|
26
|
+
*
|
|
27
|
+
* @generated from field: string page_token = 2;
|
|
28
|
+
*/
|
|
29
|
+
pageToken: string;
|
|
30
|
+
};
|
|
31
|
+
/**
|
|
32
|
+
* Describes the message common.v1.CursorPageRequest.
|
|
33
|
+
* Use `create(CursorPageRequestSchema)` to create a new message.
|
|
34
|
+
*/
|
|
35
|
+
export declare const CursorPageRequestSchema: GenMessage<CursorPageRequest>;
|
|
36
|
+
/**
|
|
37
|
+
* CursorPageResponse pairs with CursorPageRequest.
|
|
38
|
+
*
|
|
39
|
+
* @generated from message common.v1.CursorPageResponse
|
|
40
|
+
*/
|
|
41
|
+
export type CursorPageResponse = Message<"common.v1.CursorPageResponse"> & {
|
|
42
|
+
/**
|
|
43
|
+
* Token for retrieving the next page; empty if there are no more
|
|
44
|
+
* results.
|
|
45
|
+
*
|
|
46
|
+
* @generated from field: string next_page_token = 1;
|
|
47
|
+
*/
|
|
48
|
+
nextPageToken: string;
|
|
49
|
+
};
|
|
50
|
+
/**
|
|
51
|
+
* Describes the message common.v1.CursorPageResponse.
|
|
52
|
+
* Use `create(CursorPageResponseSchema)` to create a new message.
|
|
53
|
+
*/
|
|
54
|
+
export declare const CursorPageResponseSchema: GenMessage<CursorPageResponse>;
|
|
55
|
+
/**
|
|
56
|
+
* OffsetPageRequest is the standard pagination block for List endpoints
|
|
57
|
+
* backed by offset pagination. Supports page skipping and totals; query
|
|
58
|
+
* cost grows with page depth, so reserve for moderate datasets.
|
|
59
|
+
*
|
|
60
|
+
* @generated from message common.v1.OffsetPageRequest
|
|
61
|
+
*/
|
|
62
|
+
export type OffsetPageRequest = Message<"common.v1.OffsetPageRequest"> & {
|
|
63
|
+
/**
|
|
64
|
+
* Maximum number of items to return. The server may return fewer; if
|
|
65
|
+
* zero, a server-chosen default is used.
|
|
66
|
+
*
|
|
67
|
+
* @generated from field: int32 page_size = 1;
|
|
68
|
+
*/
|
|
69
|
+
pageSize: number;
|
|
70
|
+
/**
|
|
71
|
+
* 1-based page number; 0 is treated as page 1.
|
|
72
|
+
*
|
|
73
|
+
* @generated from field: int32 page = 2;
|
|
74
|
+
*/
|
|
75
|
+
page: number;
|
|
76
|
+
};
|
|
77
|
+
/**
|
|
78
|
+
* Describes the message common.v1.OffsetPageRequest.
|
|
79
|
+
* Use `create(OffsetPageRequestSchema)` to create a new message.
|
|
80
|
+
*/
|
|
81
|
+
export declare const OffsetPageRequestSchema: GenMessage<OffsetPageRequest>;
|
|
82
|
+
/**
|
|
83
|
+
* OffsetPageResponse pairs with OffsetPageRequest.
|
|
84
|
+
*
|
|
85
|
+
* @generated from message common.v1.OffsetPageResponse
|
|
86
|
+
*/
|
|
87
|
+
export type OffsetPageResponse = Message<"common.v1.OffsetPageResponse"> & {
|
|
88
|
+
/**
|
|
89
|
+
* Total number of matching items across all pages.
|
|
90
|
+
*
|
|
91
|
+
* @generated from field: int64 total_size = 1;
|
|
92
|
+
*/
|
|
93
|
+
totalSize: bigint;
|
|
94
|
+
};
|
|
95
|
+
/**
|
|
96
|
+
* Describes the message common.v1.OffsetPageResponse.
|
|
97
|
+
* Use `create(OffsetPageResponseSchema)` to create a new message.
|
|
98
|
+
*/
|
|
99
|
+
export declare const OffsetPageResponseSchema: GenMessage<OffsetPageResponse>;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
// @generated by protoc-gen-es v2.12.1 with parameter "target=ts"
|
|
2
|
+
// @generated from file common/v1/pagination.proto (package common.v1, syntax proto3)
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
import { fileDesc, messageDesc } from "@bufbuild/protobuf/codegenv2";
|
|
5
|
+
/**
|
|
6
|
+
* Describes the file common/v1/pagination.proto.
|
|
7
|
+
*/
|
|
8
|
+
export const file_common_v1_pagination = /*@__PURE__*/ fileDesc("Chpjb21tb24vdjEvcGFnaW5hdGlvbi5wcm90bxIJY29tbW9uLnYxIjoKEUN1cnNvclBhZ2VSZXF1ZXN0EhEKCXBhZ2Vfc2l6ZRgBIAEoBRISCgpwYWdlX3Rva2VuGAIgASgJIi0KEkN1cnNvclBhZ2VSZXNwb25zZRIXCg9uZXh0X3BhZ2VfdG9rZW4YASABKAkiNAoRT2Zmc2V0UGFnZVJlcXVlc3QSEQoJcGFnZV9zaXplGAEgASgFEgwKBHBhZ2UYAiABKAUiKAoST2Zmc2V0UGFnZVJlc3BvbnNlEhIKCnRvdGFsX3NpemUYASABKANiBnByb3RvMw");
|
|
9
|
+
/**
|
|
10
|
+
* Describes the message common.v1.CursorPageRequest.
|
|
11
|
+
* Use `create(CursorPageRequestSchema)` to create a new message.
|
|
12
|
+
*/
|
|
13
|
+
export const CursorPageRequestSchema = /*@__PURE__*/ messageDesc(file_common_v1_pagination, 0);
|
|
14
|
+
/**
|
|
15
|
+
* Describes the message common.v1.CursorPageResponse.
|
|
16
|
+
* Use `create(CursorPageResponseSchema)` to create a new message.
|
|
17
|
+
*/
|
|
18
|
+
export const CursorPageResponseSchema = /*@__PURE__*/ messageDesc(file_common_v1_pagination, 1);
|
|
19
|
+
/**
|
|
20
|
+
* Describes the message common.v1.OffsetPageRequest.
|
|
21
|
+
* Use `create(OffsetPageRequestSchema)` to create a new message.
|
|
22
|
+
*/
|
|
23
|
+
export const OffsetPageRequestSchema = /*@__PURE__*/ messageDesc(file_common_v1_pagination, 2);
|
|
24
|
+
/**
|
|
25
|
+
* Describes the message common.v1.OffsetPageResponse.
|
|
26
|
+
* Use `create(OffsetPageResponseSchema)` to create a new message.
|
|
27
|
+
*/
|
|
28
|
+
export const OffsetPageResponseSchema = /*@__PURE__*/ messageDesc(file_common_v1_pagination, 3);
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import type { GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv2";
|
|
2
|
+
import type { Message } from "@bufbuild/protobuf";
|
|
3
|
+
/**
|
|
4
|
+
* Describes the file directory/v1/directory.proto.
|
|
5
|
+
*/
|
|
6
|
+
export declare const file_directory_v1_directory: GenFile;
|
|
7
|
+
/**
|
|
8
|
+
* @generated from message directory.v1.SayHelloRequest
|
|
9
|
+
*/
|
|
10
|
+
export type SayHelloRequest = Message<"directory.v1.SayHelloRequest"> & {
|
|
11
|
+
/**
|
|
12
|
+
* The name to greet.
|
|
13
|
+
*
|
|
14
|
+
* @generated from field: string name = 1;
|
|
15
|
+
*/
|
|
16
|
+
name: string;
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* Describes the message directory.v1.SayHelloRequest.
|
|
20
|
+
* Use `create(SayHelloRequestSchema)` to create a new message.
|
|
21
|
+
*/
|
|
22
|
+
export declare const SayHelloRequestSchema: GenMessage<SayHelloRequest>;
|
|
23
|
+
/**
|
|
24
|
+
* @generated from message directory.v1.SayHelloResponse
|
|
25
|
+
*/
|
|
26
|
+
export type SayHelloResponse = Message<"directory.v1.SayHelloResponse"> & {
|
|
27
|
+
/**
|
|
28
|
+
* The greeting, e.g. "Hello, Ada!".
|
|
29
|
+
*
|
|
30
|
+
* @generated from field: string message = 1;
|
|
31
|
+
*/
|
|
32
|
+
message: string;
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
* Describes the message directory.v1.SayHelloResponse.
|
|
36
|
+
* Use `create(SayHelloResponseSchema)` to create a new message.
|
|
37
|
+
*/
|
|
38
|
+
export declare const SayHelloResponseSchema: GenMessage<SayHelloResponse>;
|
|
39
|
+
/**
|
|
40
|
+
* DirectoryService is the directory of tinkerer.space.
|
|
41
|
+
*
|
|
42
|
+
* Currently exposes a sample endpoint while the service takes shape.
|
|
43
|
+
*
|
|
44
|
+
* @generated from service directory.v1.DirectoryService
|
|
45
|
+
*/
|
|
46
|
+
export declare const DirectoryService: GenService<{
|
|
47
|
+
/**
|
|
48
|
+
* SayHello returns a greeting for the given name.
|
|
49
|
+
*
|
|
50
|
+
* @generated from rpc directory.v1.DirectoryService.SayHello
|
|
51
|
+
*/
|
|
52
|
+
sayHello: {
|
|
53
|
+
methodKind: "unary";
|
|
54
|
+
input: typeof SayHelloRequestSchema;
|
|
55
|
+
output: typeof SayHelloResponseSchema;
|
|
56
|
+
};
|
|
57
|
+
}>;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
// @generated by protoc-gen-es v2.12.1 with parameter "target=ts"
|
|
2
|
+
// @generated from file directory/v1/directory.proto (package directory.v1, syntax proto3)
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
import { fileDesc, messageDesc, serviceDesc } from "@bufbuild/protobuf/codegenv2";
|
|
5
|
+
/**
|
|
6
|
+
* Describes the file directory/v1/directory.proto.
|
|
7
|
+
*/
|
|
8
|
+
export const file_directory_v1_directory = /*@__PURE__*/ fileDesc("ChxkaXJlY3RvcnkvdjEvZGlyZWN0b3J5LnByb3RvEgxkaXJlY3RvcnkudjEiHwoPU2F5SGVsbG9SZXF1ZXN0EgwKBG5hbWUYASABKAkiIwoQU2F5SGVsbG9SZXNwb25zZRIPCgdtZXNzYWdlGAEgASgJMl0KEERpcmVjdG9yeVNlcnZpY2USSQoIU2F5SGVsbG8SHS5kaXJlY3RvcnkudjEuU2F5SGVsbG9SZXF1ZXN0Gh4uZGlyZWN0b3J5LnYxLlNheUhlbGxvUmVzcG9uc2ViBnByb3RvMw");
|
|
9
|
+
/**
|
|
10
|
+
* Describes the message directory.v1.SayHelloRequest.
|
|
11
|
+
* Use `create(SayHelloRequestSchema)` to create a new message.
|
|
12
|
+
*/
|
|
13
|
+
export const SayHelloRequestSchema = /*@__PURE__*/ messageDesc(file_directory_v1_directory, 0);
|
|
14
|
+
/**
|
|
15
|
+
* Describes the message directory.v1.SayHelloResponse.
|
|
16
|
+
* Use `create(SayHelloResponseSchema)` to create a new message.
|
|
17
|
+
*/
|
|
18
|
+
export const SayHelloResponseSchema = /*@__PURE__*/ messageDesc(file_directory_v1_directory, 1);
|
|
19
|
+
/**
|
|
20
|
+
* DirectoryService is the directory of tinkerer.space.
|
|
21
|
+
*
|
|
22
|
+
* Currently exposes a sample endpoint while the service takes shape.
|
|
23
|
+
*
|
|
24
|
+
* @generated from service directory.v1.DirectoryService
|
|
25
|
+
*/
|
|
26
|
+
export const DirectoryService = /*@__PURE__*/ serviceDesc(file_directory_v1_directory, 0);
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import type { GenFile, GenMessage } from "@bufbuild/protobuf/codegenv2";
|
|
2
|
+
import type { Message } from "@bufbuild/protobuf";
|
|
3
|
+
/**
|
|
4
|
+
* Describes the file google/type/date.proto.
|
|
5
|
+
*/
|
|
6
|
+
export declare const file_google_type_date: GenFile;
|
|
7
|
+
/**
|
|
8
|
+
* Represents a whole or partial calendar date, such as a birthday. The time of
|
|
9
|
+
* day and time zone are either specified elsewhere or are insignificant. The
|
|
10
|
+
* date is relative to the Gregorian Calendar. This can represent one of the
|
|
11
|
+
* following:
|
|
12
|
+
*
|
|
13
|
+
* * A full date, with non-zero year, month, and day values.
|
|
14
|
+
* * A month and day, with a zero year (for example, an anniversary).
|
|
15
|
+
* * A year on its own, with a zero month and a zero day.
|
|
16
|
+
* * A year and month, with a zero day (for example, a credit card expiration
|
|
17
|
+
* date).
|
|
18
|
+
*
|
|
19
|
+
* Related types:
|
|
20
|
+
*
|
|
21
|
+
* * [google.type.TimeOfDay][google.type.TimeOfDay]
|
|
22
|
+
* * [google.type.DateTime][google.type.DateTime]
|
|
23
|
+
* * [google.protobuf.Timestamp][google.protobuf.Timestamp]
|
|
24
|
+
*
|
|
25
|
+
* @generated from message google.type.Date
|
|
26
|
+
*/
|
|
27
|
+
export type Date = Message<"google.type.Date"> & {
|
|
28
|
+
/**
|
|
29
|
+
* Year of the date. Must be from 1 to 9999, or 0 to specify a date without
|
|
30
|
+
* a year.
|
|
31
|
+
*
|
|
32
|
+
* @generated from field: int32 year = 1;
|
|
33
|
+
*/
|
|
34
|
+
year: number;
|
|
35
|
+
/**
|
|
36
|
+
* Month of a year. Must be from 1 to 12, or 0 to specify a year without a
|
|
37
|
+
* month and day.
|
|
38
|
+
*
|
|
39
|
+
* @generated from field: int32 month = 2;
|
|
40
|
+
*/
|
|
41
|
+
month: number;
|
|
42
|
+
/**
|
|
43
|
+
* Day of a month. Must be from 1 to 31 and valid for the year and month, or 0
|
|
44
|
+
* to specify a year by itself or a year and month where the day isn't
|
|
45
|
+
* significant.
|
|
46
|
+
*
|
|
47
|
+
* @generated from field: int32 day = 3;
|
|
48
|
+
*/
|
|
49
|
+
day: number;
|
|
50
|
+
};
|
|
51
|
+
/**
|
|
52
|
+
* Describes the message google.type.Date.
|
|
53
|
+
* Use `create(DateSchema)` to create a new message.
|
|
54
|
+
*/
|
|
55
|
+
export declare const DateSchema: GenMessage<Date>;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
// Copyright 2026 Google LLC
|
|
2
|
+
//
|
|
3
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
// you may not use this file except in compliance with the License.
|
|
5
|
+
// You may obtain a copy of the License at
|
|
6
|
+
//
|
|
7
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
//
|
|
9
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
// See the License for the specific language governing permissions and
|
|
13
|
+
// limitations under the License.
|
|
14
|
+
import { fileDesc, messageDesc } from "@bufbuild/protobuf/codegenv2";
|
|
15
|
+
/**
|
|
16
|
+
* Describes the file google/type/date.proto.
|
|
17
|
+
*/
|
|
18
|
+
export const file_google_type_date = /*@__PURE__*/ fileDesc("ChZnb29nbGUvdHlwZS9kYXRlLnByb3RvEgtnb29nbGUudHlwZSIwCgREYXRlEgwKBHllYXIYASABKAUSDQoFbW9udGgYAiABKAUSCwoDZGF5GAMgASgFQloKD2NvbS5nb29nbGUudHlwZUIJRGF0ZVByb3RvUAFaNGdvb2dsZS5nb2xhbmcub3JnL2dlbnByb3RvL2dvb2dsZWFwaXMvdHlwZS9kYXRlO2RhdGWiAgNHVFBiBnByb3RvMw");
|
|
19
|
+
/**
|
|
20
|
+
* Describes the message google.type.Date.
|
|
21
|
+
* Use `create(DateSchema)` to create a new message.
|
|
22
|
+
*/
|
|
23
|
+
export const DateSchema = /*@__PURE__*/ messageDesc(file_google_type_date, 0);
|
|
@@ -0,0 +1,434 @@
|
|
|
1
|
+
import type { GenEnum, GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv2";
|
|
2
|
+
import type { CursorPageRequest, CursorPageResponse } from "../../common/v1/pagination_pb";
|
|
3
|
+
import type { Timestamp } from "@bufbuild/protobuf/wkt";
|
|
4
|
+
import type { Date } from "../../google/type/date_pb";
|
|
5
|
+
import type { Message } from "@bufbuild/protobuf";
|
|
6
|
+
/**
|
|
7
|
+
* Describes the file lms/v1/lms.proto.
|
|
8
|
+
*/
|
|
9
|
+
export declare const file_lms_v1_lms: GenFile;
|
|
10
|
+
/**
|
|
11
|
+
* GrammarPoint is a grammar point found in a passage, explained in both
|
|
12
|
+
* Japanese and English.
|
|
13
|
+
*
|
|
14
|
+
* @generated from message lms.v1.GrammarPoint
|
|
15
|
+
*/
|
|
16
|
+
export type GrammarPoint = Message<"lms.v1.GrammarPoint"> & {
|
|
17
|
+
/**
|
|
18
|
+
* The grammar point explained in Japanese.
|
|
19
|
+
*
|
|
20
|
+
* @generated from field: string ja = 1;
|
|
21
|
+
*/
|
|
22
|
+
ja: string;
|
|
23
|
+
/**
|
|
24
|
+
* The grammar point explained in English.
|
|
25
|
+
*
|
|
26
|
+
* @generated from field: string en = 2;
|
|
27
|
+
*/
|
|
28
|
+
en: string;
|
|
29
|
+
};
|
|
30
|
+
/**
|
|
31
|
+
* Describes the message lms.v1.GrammarPoint.
|
|
32
|
+
* Use `create(GrammarPointSchema)` to create a new message.
|
|
33
|
+
*/
|
|
34
|
+
export declare const GrammarPointSchema: GenMessage<GrammarPoint>;
|
|
35
|
+
/**
|
|
36
|
+
* JapaneseWriting is a daily Japanese writing passage together with its
|
|
37
|
+
* English translation, grammar notes, and assessed difficulty levels.
|
|
38
|
+
*
|
|
39
|
+
* @generated from message lms.v1.JapaneseWriting
|
|
40
|
+
*/
|
|
41
|
+
export type JapaneseWriting = Message<"lms.v1.JapaneseWriting"> & {
|
|
42
|
+
/**
|
|
43
|
+
* Server-assigned unique identifier.
|
|
44
|
+
*
|
|
45
|
+
* @generated from field: string id = 1;
|
|
46
|
+
*/
|
|
47
|
+
id: string;
|
|
48
|
+
/**
|
|
49
|
+
* The civil date the entry belongs to.
|
|
50
|
+
*
|
|
51
|
+
* @generated from field: google.type.Date date = 2;
|
|
52
|
+
*/
|
|
53
|
+
date?: Date | undefined;
|
|
54
|
+
/**
|
|
55
|
+
* Title of the passage in Japanese.
|
|
56
|
+
*
|
|
57
|
+
* @generated from field: string title = 3;
|
|
58
|
+
*/
|
|
59
|
+
title: string;
|
|
60
|
+
/**
|
|
61
|
+
* Title of the passage translated to English.
|
|
62
|
+
*
|
|
63
|
+
* @generated from field: string title_en = 4;
|
|
64
|
+
*/
|
|
65
|
+
titleEn: string;
|
|
66
|
+
/**
|
|
67
|
+
* The passage text in Japanese.
|
|
68
|
+
*
|
|
69
|
+
* @generated from field: string passage = 5;
|
|
70
|
+
*/
|
|
71
|
+
passage: string;
|
|
72
|
+
/**
|
|
73
|
+
* The passage translated to English.
|
|
74
|
+
*
|
|
75
|
+
* @generated from field: string passage_en = 6;
|
|
76
|
+
*/
|
|
77
|
+
passageEn: string;
|
|
78
|
+
/**
|
|
79
|
+
* Grammar points about the passage.
|
|
80
|
+
*
|
|
81
|
+
* @generated from field: repeated lms.v1.GrammarPoint grammar_points = 7;
|
|
82
|
+
*/
|
|
83
|
+
grammarPoints: GrammarPoint[];
|
|
84
|
+
/**
|
|
85
|
+
* Assessed JLPT level of the passage.
|
|
86
|
+
*
|
|
87
|
+
* @generated from field: lms.v1.Jlpt jlpt = 8;
|
|
88
|
+
*/
|
|
89
|
+
jlpt: Jlpt;
|
|
90
|
+
/**
|
|
91
|
+
* Assessed Japanese school grade level of the passage.
|
|
92
|
+
*
|
|
93
|
+
* @generated from field: lms.v1.Grade grade = 9;
|
|
94
|
+
*/
|
|
95
|
+
grade: Grade;
|
|
96
|
+
/**
|
|
97
|
+
* When the entry was created.
|
|
98
|
+
*
|
|
99
|
+
* @generated from field: google.protobuf.Timestamp created_at = 10;
|
|
100
|
+
*/
|
|
101
|
+
createdAt?: Timestamp | undefined;
|
|
102
|
+
/**
|
|
103
|
+
* When the entry was last updated.
|
|
104
|
+
*
|
|
105
|
+
* @generated from field: google.protobuf.Timestamp updated_at = 11;
|
|
106
|
+
*/
|
|
107
|
+
updatedAt?: Timestamp | undefined;
|
|
108
|
+
/**
|
|
109
|
+
* User id of the requester whose request created the entry;
|
|
110
|
+
* "anonymous" for unauthenticated requests.
|
|
111
|
+
*
|
|
112
|
+
* @generated from field: string created_by = 12;
|
|
113
|
+
*/
|
|
114
|
+
createdBy: string;
|
|
115
|
+
/**
|
|
116
|
+
* Model that generated the passage (e.g. an OpenRouter model slug).
|
|
117
|
+
*
|
|
118
|
+
* @generated from field: string model = 13;
|
|
119
|
+
*/
|
|
120
|
+
model: string;
|
|
121
|
+
/**
|
|
122
|
+
* Version of the managed prompt the passage was generated with.
|
|
123
|
+
*
|
|
124
|
+
* @generated from field: int32 prompt_version = 14;
|
|
125
|
+
*/
|
|
126
|
+
promptVersion: number;
|
|
127
|
+
};
|
|
128
|
+
/**
|
|
129
|
+
* Describes the message lms.v1.JapaneseWriting.
|
|
130
|
+
* Use `create(JapaneseWritingSchema)` to create a new message.
|
|
131
|
+
*/
|
|
132
|
+
export declare const JapaneseWritingSchema: GenMessage<JapaneseWriting>;
|
|
133
|
+
/**
|
|
134
|
+
* @generated from message lms.v1.GetDailyJapaneseWritingRequest
|
|
135
|
+
*/
|
|
136
|
+
export type GetDailyJapaneseWritingRequest = Message<"lms.v1.GetDailyJapaneseWritingRequest"> & {
|
|
137
|
+
/**
|
|
138
|
+
* The target difficulty level. Exactly one must be set.
|
|
139
|
+
*
|
|
140
|
+
* @generated from oneof lms.v1.GetDailyJapaneseWritingRequest.level
|
|
141
|
+
*/
|
|
142
|
+
level: {
|
|
143
|
+
/**
|
|
144
|
+
* Target JLPT level.
|
|
145
|
+
*
|
|
146
|
+
* @generated from field: lms.v1.Jlpt jlpt = 1;
|
|
147
|
+
*/
|
|
148
|
+
value: Jlpt;
|
|
149
|
+
case: "jlpt";
|
|
150
|
+
} | {
|
|
151
|
+
/**
|
|
152
|
+
* Target Japanese school grade level.
|
|
153
|
+
*
|
|
154
|
+
* @generated from field: lms.v1.Grade grade = 2;
|
|
155
|
+
*/
|
|
156
|
+
value: Grade;
|
|
157
|
+
case: "grade";
|
|
158
|
+
} | {
|
|
159
|
+
case: undefined;
|
|
160
|
+
value?: undefined;
|
|
161
|
+
};
|
|
162
|
+
};
|
|
163
|
+
/**
|
|
164
|
+
* Describes the message lms.v1.GetDailyJapaneseWritingRequest.
|
|
165
|
+
* Use `create(GetDailyJapaneseWritingRequestSchema)` to create a new message.
|
|
166
|
+
*/
|
|
167
|
+
export declare const GetDailyJapaneseWritingRequestSchema: GenMessage<GetDailyJapaneseWritingRequest>;
|
|
168
|
+
/**
|
|
169
|
+
* @generated from message lms.v1.GetDailyJapaneseWritingResponse
|
|
170
|
+
*/
|
|
171
|
+
export type GetDailyJapaneseWritingResponse = Message<"lms.v1.GetDailyJapaneseWritingResponse"> & {
|
|
172
|
+
/**
|
|
173
|
+
* Today's writing for the requested level.
|
|
174
|
+
*
|
|
175
|
+
* @generated from field: lms.v1.JapaneseWriting writing = 1;
|
|
176
|
+
*/
|
|
177
|
+
writing?: JapaneseWriting | undefined;
|
|
178
|
+
};
|
|
179
|
+
/**
|
|
180
|
+
* Describes the message lms.v1.GetDailyJapaneseWritingResponse.
|
|
181
|
+
* Use `create(GetDailyJapaneseWritingResponseSchema)` to create a new message.
|
|
182
|
+
*/
|
|
183
|
+
export declare const GetDailyJapaneseWritingResponseSchema: GenMessage<GetDailyJapaneseWritingResponse>;
|
|
184
|
+
/**
|
|
185
|
+
* @generated from message lms.v1.ListJapaneseWritingsRequest
|
|
186
|
+
*/
|
|
187
|
+
export type ListJapaneseWritingsRequest = Message<"lms.v1.ListJapaneseWritingsRequest"> & {
|
|
188
|
+
/**
|
|
189
|
+
* Filter by difficulty level. If unset, writings of all levels are
|
|
190
|
+
* returned.
|
|
191
|
+
*
|
|
192
|
+
* @generated from oneof lms.v1.ListJapaneseWritingsRequest.level
|
|
193
|
+
*/
|
|
194
|
+
level: {
|
|
195
|
+
/**
|
|
196
|
+
* Only return writings assessed at this JLPT level.
|
|
197
|
+
*
|
|
198
|
+
* @generated from field: lms.v1.Jlpt jlpt = 1;
|
|
199
|
+
*/
|
|
200
|
+
value: Jlpt;
|
|
201
|
+
case: "jlpt";
|
|
202
|
+
} | {
|
|
203
|
+
/**
|
|
204
|
+
* Only return writings assessed at this school grade level.
|
|
205
|
+
*
|
|
206
|
+
* @generated from field: lms.v1.Grade grade = 2;
|
|
207
|
+
*/
|
|
208
|
+
value: Grade;
|
|
209
|
+
case: "grade";
|
|
210
|
+
} | {
|
|
211
|
+
case: undefined;
|
|
212
|
+
value?: undefined;
|
|
213
|
+
};
|
|
214
|
+
/**
|
|
215
|
+
* Only return writings dated on or after this date (inclusive).
|
|
216
|
+
* Optional.
|
|
217
|
+
*
|
|
218
|
+
* @generated from field: google.type.Date start_date = 3;
|
|
219
|
+
*/
|
|
220
|
+
startDate?: Date | undefined;
|
|
221
|
+
/**
|
|
222
|
+
* Only return writings dated on or before this date (inclusive).
|
|
223
|
+
* Optional.
|
|
224
|
+
*
|
|
225
|
+
* @generated from field: google.type.Date end_date = 4;
|
|
226
|
+
*/
|
|
227
|
+
endDate?: Date | undefined;
|
|
228
|
+
/**
|
|
229
|
+
* Cursor pagination parameters.
|
|
230
|
+
*
|
|
231
|
+
* @generated from field: common.v1.CursorPageRequest pagination = 5;
|
|
232
|
+
*/
|
|
233
|
+
pagination?: CursorPageRequest | undefined;
|
|
234
|
+
};
|
|
235
|
+
/**
|
|
236
|
+
* Describes the message lms.v1.ListJapaneseWritingsRequest.
|
|
237
|
+
* Use `create(ListJapaneseWritingsRequestSchema)` to create a new message.
|
|
238
|
+
*/
|
|
239
|
+
export declare const ListJapaneseWritingsRequestSchema: GenMessage<ListJapaneseWritingsRequest>;
|
|
240
|
+
/**
|
|
241
|
+
* @generated from message lms.v1.ListJapaneseWritingsResponse
|
|
242
|
+
*/
|
|
243
|
+
export type ListJapaneseWritingsResponse = Message<"lms.v1.ListJapaneseWritingsResponse"> & {
|
|
244
|
+
/**
|
|
245
|
+
* The writings matching the request, ordered by date descending.
|
|
246
|
+
*
|
|
247
|
+
* @generated from field: repeated lms.v1.JapaneseWriting writings = 1;
|
|
248
|
+
*/
|
|
249
|
+
writings: JapaneseWriting[];
|
|
250
|
+
/**
|
|
251
|
+
* Cursor pagination metadata.
|
|
252
|
+
*
|
|
253
|
+
* @generated from field: common.v1.CursorPageResponse pagination = 2;
|
|
254
|
+
*/
|
|
255
|
+
pagination?: CursorPageResponse | undefined;
|
|
256
|
+
};
|
|
257
|
+
/**
|
|
258
|
+
* Describes the message lms.v1.ListJapaneseWritingsResponse.
|
|
259
|
+
* Use `create(ListJapaneseWritingsResponseSchema)` to create a new message.
|
|
260
|
+
*/
|
|
261
|
+
export declare const ListJapaneseWritingsResponseSchema: GenMessage<ListJapaneseWritingsResponse>;
|
|
262
|
+
/**
|
|
263
|
+
* Jlpt is a JLPT (Japanese-Language Proficiency Test) level, from N5
|
|
264
|
+
* (beginner) to N1 (advanced).
|
|
265
|
+
*
|
|
266
|
+
* @generated from enum lms.v1.Jlpt
|
|
267
|
+
*/
|
|
268
|
+
export declare enum Jlpt {
|
|
269
|
+
/**
|
|
270
|
+
* Unknown or not set.
|
|
271
|
+
*
|
|
272
|
+
* @generated from enum value: JLPT_UNSPECIFIED = 0;
|
|
273
|
+
*/
|
|
274
|
+
UNSPECIFIED = 0,
|
|
275
|
+
/**
|
|
276
|
+
* N5: beginner.
|
|
277
|
+
*
|
|
278
|
+
* @generated from enum value: JLPT_N5 = 1;
|
|
279
|
+
*/
|
|
280
|
+
N5 = 1,
|
|
281
|
+
/**
|
|
282
|
+
* N4: elementary.
|
|
283
|
+
*
|
|
284
|
+
* @generated from enum value: JLPT_N4 = 2;
|
|
285
|
+
*/
|
|
286
|
+
N4 = 2,
|
|
287
|
+
/**
|
|
288
|
+
* N3: intermediate.
|
|
289
|
+
*
|
|
290
|
+
* @generated from enum value: JLPT_N3 = 3;
|
|
291
|
+
*/
|
|
292
|
+
N3 = 3,
|
|
293
|
+
/**
|
|
294
|
+
* N2: upper intermediate.
|
|
295
|
+
*
|
|
296
|
+
* @generated from enum value: JLPT_N2 = 4;
|
|
297
|
+
*/
|
|
298
|
+
N2 = 4,
|
|
299
|
+
/**
|
|
300
|
+
* N1: advanced.
|
|
301
|
+
*
|
|
302
|
+
* @generated from enum value: JLPT_N1 = 5;
|
|
303
|
+
*/
|
|
304
|
+
N1 = 5
|
|
305
|
+
}
|
|
306
|
+
/**
|
|
307
|
+
* Describes the enum lms.v1.Jlpt.
|
|
308
|
+
*/
|
|
309
|
+
export declare const JlptSchema: GenEnum<Jlpt>;
|
|
310
|
+
/**
|
|
311
|
+
* Grade is a Japanese school grade level, from first year of elementary
|
|
312
|
+
* school (小1) to third year of high school (高3).
|
|
313
|
+
*
|
|
314
|
+
* @generated from enum lms.v1.Grade
|
|
315
|
+
*/
|
|
316
|
+
export declare enum Grade {
|
|
317
|
+
/**
|
|
318
|
+
* Unknown or not set.
|
|
319
|
+
*
|
|
320
|
+
* @generated from enum value: GRADE_UNSPECIFIED = 0;
|
|
321
|
+
*/
|
|
322
|
+
UNSPECIFIED = 0,
|
|
323
|
+
/**
|
|
324
|
+
* 小1: elementary school, year 1.
|
|
325
|
+
*
|
|
326
|
+
* @generated from enum value: GRADE_ELEMENTARY_1 = 1;
|
|
327
|
+
*/
|
|
328
|
+
ELEMENTARY_1 = 1,
|
|
329
|
+
/**
|
|
330
|
+
* 小2: elementary school, year 2.
|
|
331
|
+
*
|
|
332
|
+
* @generated from enum value: GRADE_ELEMENTARY_2 = 2;
|
|
333
|
+
*/
|
|
334
|
+
ELEMENTARY_2 = 2,
|
|
335
|
+
/**
|
|
336
|
+
* 小3: elementary school, year 3.
|
|
337
|
+
*
|
|
338
|
+
* @generated from enum value: GRADE_ELEMENTARY_3 = 3;
|
|
339
|
+
*/
|
|
340
|
+
ELEMENTARY_3 = 3,
|
|
341
|
+
/**
|
|
342
|
+
* 小4: elementary school, year 4.
|
|
343
|
+
*
|
|
344
|
+
* @generated from enum value: GRADE_ELEMENTARY_4 = 4;
|
|
345
|
+
*/
|
|
346
|
+
ELEMENTARY_4 = 4,
|
|
347
|
+
/**
|
|
348
|
+
* 小5: elementary school, year 5.
|
|
349
|
+
*
|
|
350
|
+
* @generated from enum value: GRADE_ELEMENTARY_5 = 5;
|
|
351
|
+
*/
|
|
352
|
+
ELEMENTARY_5 = 5,
|
|
353
|
+
/**
|
|
354
|
+
* 小6: elementary school, year 6.
|
|
355
|
+
*
|
|
356
|
+
* @generated from enum value: GRADE_ELEMENTARY_6 = 6;
|
|
357
|
+
*/
|
|
358
|
+
ELEMENTARY_6 = 6,
|
|
359
|
+
/**
|
|
360
|
+
* 中1: junior high school, year 1.
|
|
361
|
+
*
|
|
362
|
+
* @generated from enum value: GRADE_JUNIOR_HIGH_1 = 7;
|
|
363
|
+
*/
|
|
364
|
+
JUNIOR_HIGH_1 = 7,
|
|
365
|
+
/**
|
|
366
|
+
* 中2: junior high school, year 2.
|
|
367
|
+
*
|
|
368
|
+
* @generated from enum value: GRADE_JUNIOR_HIGH_2 = 8;
|
|
369
|
+
*/
|
|
370
|
+
JUNIOR_HIGH_2 = 8,
|
|
371
|
+
/**
|
|
372
|
+
* 中3: junior high school, year 3.
|
|
373
|
+
*
|
|
374
|
+
* @generated from enum value: GRADE_JUNIOR_HIGH_3 = 9;
|
|
375
|
+
*/
|
|
376
|
+
JUNIOR_HIGH_3 = 9,
|
|
377
|
+
/**
|
|
378
|
+
* 高1: high school, year 1.
|
|
379
|
+
*
|
|
380
|
+
* @generated from enum value: GRADE_HIGH_1 = 10;
|
|
381
|
+
*/
|
|
382
|
+
HIGH_1 = 10,
|
|
383
|
+
/**
|
|
384
|
+
* 高2: high school, year 2.
|
|
385
|
+
*
|
|
386
|
+
* @generated from enum value: GRADE_HIGH_2 = 11;
|
|
387
|
+
*/
|
|
388
|
+
HIGH_2 = 11,
|
|
389
|
+
/**
|
|
390
|
+
* 高3: high school, year 3.
|
|
391
|
+
*
|
|
392
|
+
* @generated from enum value: GRADE_HIGH_3 = 12;
|
|
393
|
+
*/
|
|
394
|
+
HIGH_3 = 12
|
|
395
|
+
}
|
|
396
|
+
/**
|
|
397
|
+
* Describes the enum lms.v1.Grade.
|
|
398
|
+
*/
|
|
399
|
+
export declare const GradeSchema: GenEnum<Grade>;
|
|
400
|
+
/**
|
|
401
|
+
* LmsService provides language-learning content for tinkerer.space.
|
|
402
|
+
*
|
|
403
|
+
* Currently focused on daily Japanese writing practice: short passages
|
|
404
|
+
* tailored to a JLPT proficiency level or a Japanese school grade level.
|
|
405
|
+
*
|
|
406
|
+
* @generated from service lms.v1.LmsService
|
|
407
|
+
*/
|
|
408
|
+
export declare const LmsService: GenService<{
|
|
409
|
+
/**
|
|
410
|
+
* GetDailyJapaneseWriting returns today's Japanese writing for the given
|
|
411
|
+
* level. If no entry exists for the current date yet, one is generated,
|
|
412
|
+
* persisted, and returned; subsequent calls for the same date and level
|
|
413
|
+
* return the stored entry.
|
|
414
|
+
*
|
|
415
|
+
* @generated from rpc lms.v1.LmsService.GetDailyJapaneseWriting
|
|
416
|
+
*/
|
|
417
|
+
getDailyJapaneseWriting: {
|
|
418
|
+
methodKind: "unary";
|
|
419
|
+
input: typeof GetDailyJapaneseWritingRequestSchema;
|
|
420
|
+
output: typeof GetDailyJapaneseWritingResponseSchema;
|
|
421
|
+
};
|
|
422
|
+
/**
|
|
423
|
+
* ListJapaneseWritings lists previously generated Japanese writings,
|
|
424
|
+
* filterable by date range and level. Missing entries are never
|
|
425
|
+
* generated by this method.
|
|
426
|
+
*
|
|
427
|
+
* @generated from rpc lms.v1.LmsService.ListJapaneseWritings
|
|
428
|
+
*/
|
|
429
|
+
listJapaneseWritings: {
|
|
430
|
+
methodKind: "unary";
|
|
431
|
+
input: typeof ListJapaneseWritingsRequestSchema;
|
|
432
|
+
output: typeof ListJapaneseWritingsResponseSchema;
|
|
433
|
+
};
|
|
434
|
+
}>;
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
// @generated by protoc-gen-es v2.12.1 with parameter "target=ts"
|
|
2
|
+
// @generated from file lms/v1/lms.proto (package lms.v1, syntax proto3)
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
import { enumDesc, fileDesc, messageDesc, serviceDesc } from "@bufbuild/protobuf/codegenv2";
|
|
5
|
+
import { file_common_v1_pagination } from "../../common/v1/pagination_pb";
|
|
6
|
+
import { file_google_protobuf_timestamp } from "@bufbuild/protobuf/wkt";
|
|
7
|
+
import { file_google_type_date } from "../../google/type/date_pb";
|
|
8
|
+
/**
|
|
9
|
+
* Describes the file lms/v1/lms.proto.
|
|
10
|
+
*/
|
|
11
|
+
export const file_lms_v1_lms = /*@__PURE__*/ fileDesc("ChBsbXMvdjEvbG1zLnByb3RvEgZsbXMudjEiJgoMR3JhbW1hclBvaW50EgoKAmphGAEgASgJEgoKAmVuGAIgASgJIocDCg9KYXBhbmVzZVdyaXRpbmcSCgoCaWQYASABKAkSHwoEZGF0ZRgCIAEoCzIRLmdvb2dsZS50eXBlLkRhdGUSDQoFdGl0bGUYAyABKAkSEAoIdGl0bGVfZW4YBCABKAkSDwoHcGFzc2FnZRgFIAEoCRISCgpwYXNzYWdlX2VuGAYgASgJEiwKDmdyYW1tYXJfcG9pbnRzGAcgAygLMhQubG1zLnYxLkdyYW1tYXJQb2ludBIaCgRqbHB0GAggASgOMgwubG1zLnYxLkpscHQSHAoFZ3JhZGUYCSABKA4yDS5sbXMudjEuR3JhZGUSLgoKY3JlYXRlZF9hdBgKIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5UaW1lc3RhbXASLgoKdXBkYXRlZF9hdBgLIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5UaW1lc3RhbXASEgoKY3JlYXRlZF9ieRgMIAEoCRINCgVtb2RlbBgNIAEoCRIWCg5wcm9tcHRfdmVyc2lvbhgOIAEoBSJnCh5HZXREYWlseUphcGFuZXNlV3JpdGluZ1JlcXVlc3QSHAoEamxwdBgBIAEoDjIMLmxtcy52MS5KbHB0SAASHgoFZ3JhZGUYAiABKA4yDS5sbXMudjEuR3JhZGVIAEIHCgVsZXZlbCJLCh9HZXREYWlseUphcGFuZXNlV3JpdGluZ1Jlc3BvbnNlEigKB3dyaXRpbmcYASABKAsyFy5sbXMudjEuSmFwYW5lc2VXcml0aW5nIuIBChtMaXN0SmFwYW5lc2VXcml0aW5nc1JlcXVlc3QSHAoEamxwdBgBIAEoDjIMLmxtcy52MS5KbHB0SAASHgoFZ3JhZGUYAiABKA4yDS5sbXMudjEuR3JhZGVIABIlCgpzdGFydF9kYXRlGAMgASgLMhEuZ29vZ2xlLnR5cGUuRGF0ZRIjCghlbmRfZGF0ZRgEIAEoCzIRLmdvb2dsZS50eXBlLkRhdGUSMAoKcGFnaW5hdGlvbhgFIAEoCzIcLmNvbW1vbi52MS5DdXJzb3JQYWdlUmVxdWVzdEIHCgVsZXZlbCJ8ChxMaXN0SmFwYW5lc2VXcml0aW5nc1Jlc3BvbnNlEikKCHdyaXRpbmdzGAEgAygLMhcubG1zLnYxLkphcGFuZXNlV3JpdGluZxIxCgpwYWdpbmF0aW9uGAIgASgLMh0uY29tbW9uLnYxLkN1cnNvclBhZ2VSZXNwb25zZSpdCgRKbHB0EhQKEEpMUFRfVU5TUEVDSUZJRUQQABILCgdKTFBUX041EAESCwoHSkxQVF9ONBACEgsKB0pMUFRfTjMQAxILCgdKTFBUX04yEAQSCwoHSkxQVF9OMRAFKq8CCgVHcmFkZRIVChFHUkFERV9VTlNQRUNJRklFRBAAEhYKEkdSQURFX0VMRU1FTlRBUllfMRABEhYKEkdSQURFX0VMRU1FTlRBUllfMhACEhYKEkdSQURFX0VMRU1FTlRBUllfMxADEhYKEkdSQURFX0VMRU1FTlRBUllfNBAEEhYKEkdSQURFX0VMRU1FTlRBUllfNRAFEhYKEkdSQURFX0VMRU1FTlRBUllfNhAGEhcKE0dSQURFX0pVTklPUl9ISUdIXzEQBxIXChNHUkFERV9KVU5JT1JfSElHSF8yEAgSFwoTR1JBREVfSlVOSU9SX0hJR0hfMxAJEhAKDEdSQURFX0hJR0hfMRAKEhAKDEdSQURFX0hJR0hfMhALEhAKDEdSQURFX0hJR0hfMxAMMtsBCgpMbXNTZXJ2aWNlEmoKF0dldERhaWx5SmFwYW5lc2VXcml0aW5nEiYubG1zLnYxLkdldERhaWx5SmFwYW5lc2VXcml0aW5nUmVxdWVzdBonLmxtcy52MS5HZXREYWlseUphcGFuZXNlV3JpdGluZ1Jlc3BvbnNlEmEKFExpc3RKYXBhbmVzZVdyaXRpbmdzEiMubG1zLnYxLkxpc3RKYXBhbmVzZVdyaXRpbmdzUmVxdWVzdBokLmxtcy52MS5MaXN0SmFwYW5lc2VXcml0aW5nc1Jlc3BvbnNlYgZwcm90bzM", [file_common_v1_pagination, file_google_protobuf_timestamp, file_google_type_date]);
|
|
12
|
+
/**
|
|
13
|
+
* Describes the message lms.v1.GrammarPoint.
|
|
14
|
+
* Use `create(GrammarPointSchema)` to create a new message.
|
|
15
|
+
*/
|
|
16
|
+
export const GrammarPointSchema = /*@__PURE__*/ messageDesc(file_lms_v1_lms, 0);
|
|
17
|
+
/**
|
|
18
|
+
* Describes the message lms.v1.JapaneseWriting.
|
|
19
|
+
* Use `create(JapaneseWritingSchema)` to create a new message.
|
|
20
|
+
*/
|
|
21
|
+
export const JapaneseWritingSchema = /*@__PURE__*/ messageDesc(file_lms_v1_lms, 1);
|
|
22
|
+
/**
|
|
23
|
+
* Describes the message lms.v1.GetDailyJapaneseWritingRequest.
|
|
24
|
+
* Use `create(GetDailyJapaneseWritingRequestSchema)` to create a new message.
|
|
25
|
+
*/
|
|
26
|
+
export const GetDailyJapaneseWritingRequestSchema = /*@__PURE__*/ messageDesc(file_lms_v1_lms, 2);
|
|
27
|
+
/**
|
|
28
|
+
* Describes the message lms.v1.GetDailyJapaneseWritingResponse.
|
|
29
|
+
* Use `create(GetDailyJapaneseWritingResponseSchema)` to create a new message.
|
|
30
|
+
*/
|
|
31
|
+
export const GetDailyJapaneseWritingResponseSchema = /*@__PURE__*/ messageDesc(file_lms_v1_lms, 3);
|
|
32
|
+
/**
|
|
33
|
+
* Describes the message lms.v1.ListJapaneseWritingsRequest.
|
|
34
|
+
* Use `create(ListJapaneseWritingsRequestSchema)` to create a new message.
|
|
35
|
+
*/
|
|
36
|
+
export const ListJapaneseWritingsRequestSchema = /*@__PURE__*/ messageDesc(file_lms_v1_lms, 4);
|
|
37
|
+
/**
|
|
38
|
+
* Describes the message lms.v1.ListJapaneseWritingsResponse.
|
|
39
|
+
* Use `create(ListJapaneseWritingsResponseSchema)` to create a new message.
|
|
40
|
+
*/
|
|
41
|
+
export const ListJapaneseWritingsResponseSchema = /*@__PURE__*/ messageDesc(file_lms_v1_lms, 5);
|
|
42
|
+
/**
|
|
43
|
+
* Jlpt is a JLPT (Japanese-Language Proficiency Test) level, from N5
|
|
44
|
+
* (beginner) to N1 (advanced).
|
|
45
|
+
*
|
|
46
|
+
* @generated from enum lms.v1.Jlpt
|
|
47
|
+
*/
|
|
48
|
+
export var Jlpt;
|
|
49
|
+
(function (Jlpt) {
|
|
50
|
+
/**
|
|
51
|
+
* Unknown or not set.
|
|
52
|
+
*
|
|
53
|
+
* @generated from enum value: JLPT_UNSPECIFIED = 0;
|
|
54
|
+
*/
|
|
55
|
+
Jlpt[Jlpt["UNSPECIFIED"] = 0] = "UNSPECIFIED";
|
|
56
|
+
/**
|
|
57
|
+
* N5: beginner.
|
|
58
|
+
*
|
|
59
|
+
* @generated from enum value: JLPT_N5 = 1;
|
|
60
|
+
*/
|
|
61
|
+
Jlpt[Jlpt["N5"] = 1] = "N5";
|
|
62
|
+
/**
|
|
63
|
+
* N4: elementary.
|
|
64
|
+
*
|
|
65
|
+
* @generated from enum value: JLPT_N4 = 2;
|
|
66
|
+
*/
|
|
67
|
+
Jlpt[Jlpt["N4"] = 2] = "N4";
|
|
68
|
+
/**
|
|
69
|
+
* N3: intermediate.
|
|
70
|
+
*
|
|
71
|
+
* @generated from enum value: JLPT_N3 = 3;
|
|
72
|
+
*/
|
|
73
|
+
Jlpt[Jlpt["N3"] = 3] = "N3";
|
|
74
|
+
/**
|
|
75
|
+
* N2: upper intermediate.
|
|
76
|
+
*
|
|
77
|
+
* @generated from enum value: JLPT_N2 = 4;
|
|
78
|
+
*/
|
|
79
|
+
Jlpt[Jlpt["N2"] = 4] = "N2";
|
|
80
|
+
/**
|
|
81
|
+
* N1: advanced.
|
|
82
|
+
*
|
|
83
|
+
* @generated from enum value: JLPT_N1 = 5;
|
|
84
|
+
*/
|
|
85
|
+
Jlpt[Jlpt["N1"] = 5] = "N1";
|
|
86
|
+
})(Jlpt || (Jlpt = {}));
|
|
87
|
+
/**
|
|
88
|
+
* Describes the enum lms.v1.Jlpt.
|
|
89
|
+
*/
|
|
90
|
+
export const JlptSchema = /*@__PURE__*/ enumDesc(file_lms_v1_lms, 0);
|
|
91
|
+
/**
|
|
92
|
+
* Grade is a Japanese school grade level, from first year of elementary
|
|
93
|
+
* school (小1) to third year of high school (高3).
|
|
94
|
+
*
|
|
95
|
+
* @generated from enum lms.v1.Grade
|
|
96
|
+
*/
|
|
97
|
+
export var Grade;
|
|
98
|
+
(function (Grade) {
|
|
99
|
+
/**
|
|
100
|
+
* Unknown or not set.
|
|
101
|
+
*
|
|
102
|
+
* @generated from enum value: GRADE_UNSPECIFIED = 0;
|
|
103
|
+
*/
|
|
104
|
+
Grade[Grade["UNSPECIFIED"] = 0] = "UNSPECIFIED";
|
|
105
|
+
/**
|
|
106
|
+
* 小1: elementary school, year 1.
|
|
107
|
+
*
|
|
108
|
+
* @generated from enum value: GRADE_ELEMENTARY_1 = 1;
|
|
109
|
+
*/
|
|
110
|
+
Grade[Grade["ELEMENTARY_1"] = 1] = "ELEMENTARY_1";
|
|
111
|
+
/**
|
|
112
|
+
* 小2: elementary school, year 2.
|
|
113
|
+
*
|
|
114
|
+
* @generated from enum value: GRADE_ELEMENTARY_2 = 2;
|
|
115
|
+
*/
|
|
116
|
+
Grade[Grade["ELEMENTARY_2"] = 2] = "ELEMENTARY_2";
|
|
117
|
+
/**
|
|
118
|
+
* 小3: elementary school, year 3.
|
|
119
|
+
*
|
|
120
|
+
* @generated from enum value: GRADE_ELEMENTARY_3 = 3;
|
|
121
|
+
*/
|
|
122
|
+
Grade[Grade["ELEMENTARY_3"] = 3] = "ELEMENTARY_3";
|
|
123
|
+
/**
|
|
124
|
+
* 小4: elementary school, year 4.
|
|
125
|
+
*
|
|
126
|
+
* @generated from enum value: GRADE_ELEMENTARY_4 = 4;
|
|
127
|
+
*/
|
|
128
|
+
Grade[Grade["ELEMENTARY_4"] = 4] = "ELEMENTARY_4";
|
|
129
|
+
/**
|
|
130
|
+
* 小5: elementary school, year 5.
|
|
131
|
+
*
|
|
132
|
+
* @generated from enum value: GRADE_ELEMENTARY_5 = 5;
|
|
133
|
+
*/
|
|
134
|
+
Grade[Grade["ELEMENTARY_5"] = 5] = "ELEMENTARY_5";
|
|
135
|
+
/**
|
|
136
|
+
* 小6: elementary school, year 6.
|
|
137
|
+
*
|
|
138
|
+
* @generated from enum value: GRADE_ELEMENTARY_6 = 6;
|
|
139
|
+
*/
|
|
140
|
+
Grade[Grade["ELEMENTARY_6"] = 6] = "ELEMENTARY_6";
|
|
141
|
+
/**
|
|
142
|
+
* 中1: junior high school, year 1.
|
|
143
|
+
*
|
|
144
|
+
* @generated from enum value: GRADE_JUNIOR_HIGH_1 = 7;
|
|
145
|
+
*/
|
|
146
|
+
Grade[Grade["JUNIOR_HIGH_1"] = 7] = "JUNIOR_HIGH_1";
|
|
147
|
+
/**
|
|
148
|
+
* 中2: junior high school, year 2.
|
|
149
|
+
*
|
|
150
|
+
* @generated from enum value: GRADE_JUNIOR_HIGH_2 = 8;
|
|
151
|
+
*/
|
|
152
|
+
Grade[Grade["JUNIOR_HIGH_2"] = 8] = "JUNIOR_HIGH_2";
|
|
153
|
+
/**
|
|
154
|
+
* 中3: junior high school, year 3.
|
|
155
|
+
*
|
|
156
|
+
* @generated from enum value: GRADE_JUNIOR_HIGH_3 = 9;
|
|
157
|
+
*/
|
|
158
|
+
Grade[Grade["JUNIOR_HIGH_3"] = 9] = "JUNIOR_HIGH_3";
|
|
159
|
+
/**
|
|
160
|
+
* 高1: high school, year 1.
|
|
161
|
+
*
|
|
162
|
+
* @generated from enum value: GRADE_HIGH_1 = 10;
|
|
163
|
+
*/
|
|
164
|
+
Grade[Grade["HIGH_1"] = 10] = "HIGH_1";
|
|
165
|
+
/**
|
|
166
|
+
* 高2: high school, year 2.
|
|
167
|
+
*
|
|
168
|
+
* @generated from enum value: GRADE_HIGH_2 = 11;
|
|
169
|
+
*/
|
|
170
|
+
Grade[Grade["HIGH_2"] = 11] = "HIGH_2";
|
|
171
|
+
/**
|
|
172
|
+
* 高3: high school, year 3.
|
|
173
|
+
*
|
|
174
|
+
* @generated from enum value: GRADE_HIGH_3 = 12;
|
|
175
|
+
*/
|
|
176
|
+
Grade[Grade["HIGH_3"] = 12] = "HIGH_3";
|
|
177
|
+
})(Grade || (Grade = {}));
|
|
178
|
+
/**
|
|
179
|
+
* Describes the enum lms.v1.Grade.
|
|
180
|
+
*/
|
|
181
|
+
export const GradeSchema = /*@__PURE__*/ enumDesc(file_lms_v1_lms, 1);
|
|
182
|
+
/**
|
|
183
|
+
* LmsService provides language-learning content for tinkerer.space.
|
|
184
|
+
*
|
|
185
|
+
* Currently focused on daily Japanese writing practice: short passages
|
|
186
|
+
* tailored to a JLPT proficiency level or a Japanese school grade level.
|
|
187
|
+
*
|
|
188
|
+
* @generated from service lms.v1.LmsService
|
|
189
|
+
*/
|
|
190
|
+
export const LmsService = /*@__PURE__*/ serviceDesc(file_lms_v1_lms, 0);
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @tinkerer/sdk — browser SDK for tinkerer.space services.
|
|
3
|
+
*
|
|
4
|
+
* Clients speak gRPC-web to the Envoy gateway, which translates to native
|
|
5
|
+
* gRPC for the backend services.
|
|
6
|
+
*/
|
|
7
|
+
import { type Client } from "@connectrpc/connect";
|
|
8
|
+
import { DirectoryService } from "./gen/directory/v1/directory_pb.js";
|
|
9
|
+
import { LmsService } from "./gen/lms/v1/lms_pb.js";
|
|
10
|
+
export type { SayHelloRequest, SayHelloResponse, } from "./gen/directory/v1/directory_pb.js";
|
|
11
|
+
export type { Date } from "./gen/google/type/date_pb.js";
|
|
12
|
+
export type { GetDailyJapaneseWritingRequest, GetDailyJapaneseWritingResponse, GrammarPoint, JapaneseWriting, ListJapaneseWritingsRequest, ListJapaneseWritingsResponse, } from "./gen/lms/v1/lms_pb.js";
|
|
13
|
+
export { Grade, Jlpt } from "./gen/lms/v1/lms_pb.js";
|
|
14
|
+
export { DirectoryService, LmsService };
|
|
15
|
+
/** A client for the directory service. */
|
|
16
|
+
export type DirectoryClient = Client<typeof DirectoryService>;
|
|
17
|
+
/**
|
|
18
|
+
* Creates a directory service client.
|
|
19
|
+
*
|
|
20
|
+
* @param baseUrl Base URL of the tinkerer.space API gateway,
|
|
21
|
+
* e.g. `https://api.tinkerer.space`.
|
|
22
|
+
*/
|
|
23
|
+
export declare function createDirectoryClient(baseUrl: string): DirectoryClient;
|
|
24
|
+
/** A client for the lms service. */
|
|
25
|
+
export type LmsClient = Client<typeof LmsService>;
|
|
26
|
+
/**
|
|
27
|
+
* Creates an lms service client.
|
|
28
|
+
*
|
|
29
|
+
* @param baseUrl Base URL of the tinkerer.space API gateway,
|
|
30
|
+
* e.g. `https://api.tinkerer.space`.
|
|
31
|
+
*/
|
|
32
|
+
export declare function createLmsClient(baseUrl: string): LmsClient;
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @tinkerer/sdk — browser SDK for tinkerer.space services.
|
|
3
|
+
*
|
|
4
|
+
* Clients speak gRPC-web to the Envoy gateway, which translates to native
|
|
5
|
+
* gRPC for the backend services.
|
|
6
|
+
*/
|
|
7
|
+
import { createClient } from "@connectrpc/connect";
|
|
8
|
+
import { createGrpcWebTransport } from "@connectrpc/connect-web";
|
|
9
|
+
import { DirectoryService } from "./gen/directory/v1/directory_pb.js";
|
|
10
|
+
import { LmsService } from "./gen/lms/v1/lms_pb.js";
|
|
11
|
+
export { Grade, Jlpt } from "./gen/lms/v1/lms_pb.js";
|
|
12
|
+
export { DirectoryService, LmsService };
|
|
13
|
+
/**
|
|
14
|
+
* Creates a directory service client.
|
|
15
|
+
*
|
|
16
|
+
* @param baseUrl Base URL of the tinkerer.space API gateway,
|
|
17
|
+
* e.g. `https://api.tinkerer.space`.
|
|
18
|
+
*/
|
|
19
|
+
export function createDirectoryClient(baseUrl) {
|
|
20
|
+
const transport = createGrpcWebTransport({ baseUrl });
|
|
21
|
+
return createClient(DirectoryService, transport);
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Creates an lms service client.
|
|
25
|
+
*
|
|
26
|
+
* @param baseUrl Base URL of the tinkerer.space API gateway,
|
|
27
|
+
* e.g. `https://api.tinkerer.space`.
|
|
28
|
+
*/
|
|
29
|
+
export function createLmsClient(baseUrl) {
|
|
30
|
+
const transport = createGrpcWebTransport({ baseUrl });
|
|
31
|
+
return createClient(LmsService, transport);
|
|
32
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@tinkerer/sdk",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Browser SDK for tinkerer.space services.",
|
|
5
|
+
"license": "UNLICENSED",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "git+https://github.com/bakakaba/tinkr_api.git",
|
|
9
|
+
"directory": "sdks/web"
|
|
10
|
+
},
|
|
11
|
+
"type": "module",
|
|
12
|
+
"sideEffects": false,
|
|
13
|
+
"exports": {
|
|
14
|
+
".": {
|
|
15
|
+
"types": "./dist/index.d.ts",
|
|
16
|
+
"default": "./dist/index.js"
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
"files": [
|
|
20
|
+
"dist"
|
|
21
|
+
],
|
|
22
|
+
"publishConfig": {
|
|
23
|
+
"access": "public"
|
|
24
|
+
},
|
|
25
|
+
"scripts": {
|
|
26
|
+
"prepublishOnly": "bun install --frozen-lockfile && rm -rf dist && bun run build",
|
|
27
|
+
"build": "tsc",
|
|
28
|
+
"lint": "biome ci . && tsc --noEmit"
|
|
29
|
+
},
|
|
30
|
+
"dependencies": {
|
|
31
|
+
"@bufbuild/protobuf": "^2.12.1",
|
|
32
|
+
"@connectrpc/connect": "^2.1.2",
|
|
33
|
+
"@connectrpc/connect-web": "^2.1.2"
|
|
34
|
+
}
|
|
35
|
+
}
|