@altnovatrail/contracts 0.12.0 → 0.14.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.
@@ -0,0 +1,175 @@
1
+ // @generated by protoc-gen-es v2.16.0 with parameter "target=js+dts,import_extension=js"
2
+ // @generated from file novatrail/api/v1/legal.proto (package novatrail.api.v1, syntax proto3)
3
+ /* eslint-disable */
4
+
5
+ // The legal texts in the contract between `app` and `api`: the privacy policy, the terms of use
6
+ // and the consents that `app` shows as its own pages, each in its current version, with its gist
7
+ // in the language of the screen. The texts are those of the legal part, `legal/` of `spec`, or of a
8
+ // self-hosted copy's operator. What each message means is the rule of contracts/README.md,
9
+ // section 15.
10
+
11
+ import type { GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv2";
12
+ import type { Message } from "@bufbuild/protobuf";
13
+
14
+ /**
15
+ * Describes the file novatrail/api/v1/legal.proto.
16
+ */
17
+ export declare const file_novatrail_api_v1_legal: GenFile;
18
+
19
+ /**
20
+ * A request for the legal texts.
21
+ *
22
+ * @generated from message novatrail.api.v1.GetLegalTextsRequest
23
+ */
24
+ export declare type GetLegalTextsRequest = Message<"novatrail.api.v1.GetLegalTextsRequest"> & {
25
+ /**
26
+ * The language of the screen that shows the texts, a well-formed tag of BCP 47, a field of the
27
+ * message and not the header `Accept-Language` (R92): the language the gists come in. Empty
28
+ * asks for English.
29
+ *
30
+ * @generated from field: string interface_language = 1;
31
+ */
32
+ interfaceLanguage: string;
33
+ };
34
+
35
+ /**
36
+ * Describes the message novatrail.api.v1.GetLegalTextsRequest.
37
+ * Use `create(GetLegalTextsRequestSchema)` to create a new message.
38
+ */
39
+ export declare const GetLegalTextsRequestSchema: GenMessage<GetLegalTextsRequest>;
40
+
41
+ /**
42
+ * The legal texts.
43
+ *
44
+ * @generated from message novatrail.api.v1.GetLegalTextsResponse
45
+ */
46
+ export declare type GetLegalTextsResponse = Message<"novatrail.api.v1.GetLegalTextsResponse"> & {
47
+ /**
48
+ * The current version of every text whose place is `app`, in the order of their IDs by code
49
+ * units. A text with no version in force has none, and is absent: the list is empty while no such
50
+ * text is in force.
51
+ *
52
+ * @generated from field: repeated novatrail.api.v1.LegalText texts = 1;
53
+ */
54
+ texts: LegalText[];
55
+ };
56
+
57
+ /**
58
+ * Describes the message novatrail.api.v1.GetLegalTextsResponse.
59
+ * Use `create(GetLegalTextsResponseSchema)` to create a new message.
60
+ */
61
+ export declare const GetLegalTextsResponseSchema: GenMessage<GetLegalTextsResponse>;
62
+
63
+ /**
64
+ * A legal text in its current version: its version in force with the highest number.
65
+ *
66
+ * @generated from message novatrail.api.v1.LegalText
67
+ */
68
+ export declare type LegalText = Message<"novatrail.api.v1.LegalText"> & {
69
+ /**
70
+ * The ID of the text in the passport: lower-case Latin letters and digits in words joined by
71
+ * hyphens, such as "privacy-policy".
72
+ *
73
+ * @generated from field: string id = 1;
74
+ */
75
+ id: string;
76
+
77
+ /**
78
+ * The number of the version, from 1 on.
79
+ *
80
+ * @generated from field: int32 version = 2;
81
+ */
82
+ version: number;
83
+
84
+ /**
85
+ * The date the author approved the version, from which it is in force, `YYYY-MM-DD`.
86
+ *
87
+ * @generated from field: string in_force_since = 3;
88
+ */
89
+ inForceSince: string;
90
+
91
+ /**
92
+ * The text of the version, in English, the one in force: Markdown, CommonMark with the tables of
93
+ * GitHub's flavour, that begins with a heading of the first level, the text's title, and holds no
94
+ * HTML, no image and no link.
95
+ *
96
+ * @generated from field: string body = 4;
97
+ */
98
+ body: string;
99
+
100
+ /**
101
+ * The gist of the version, plain text with no Markdown, of at most 1000 characters: in the
102
+ * language asked when the passport has it, found as the lookup of RFC 4647 finds it — the tag,
103
+ * then the tag cut by its last subtag, with no regard to case — and else in English.
104
+ *
105
+ * @generated from field: string summary = 5;
106
+ */
107
+ summary: string;
108
+
109
+ /**
110
+ * The language the gist is in, its tag as the passport writes it, such as "en" or "ru".
111
+ *
112
+ * @generated from field: string summary_language = 6;
113
+ */
114
+ summaryLanguage: string;
115
+ };
116
+
117
+ /**
118
+ * Describes the message novatrail.api.v1.LegalText.
119
+ * Use `create(LegalTextSchema)` to create a new message.
120
+ */
121
+ export declare const LegalTextSchema: GenMessage<LegalText>;
122
+
123
+ /**
124
+ * A version of a legal text that a person saw, which a request that gives a consent names and the
125
+ * record of the consent keeps (R130; R136): the current version that `GetLegalTexts` gave. A text
126
+ * with no version in force is named by no request, and a version that is not the current one gets
127
+ * `CAUSE_TEXT_NOT_CURRENT`.
128
+ *
129
+ * @generated from message novatrail.api.v1.LegalTextRef
130
+ */
131
+ export declare type LegalTextRef = Message<"novatrail.api.v1.LegalTextRef"> & {
132
+ /**
133
+ * The ID of the text in the passport, such as "parent-consent".
134
+ *
135
+ * @generated from field: string id = 1;
136
+ */
137
+ id: string;
138
+
139
+ /**
140
+ * The number of the version, from 1 on.
141
+ *
142
+ * @generated from field: int32 version = 2;
143
+ */
144
+ version: number;
145
+ };
146
+
147
+ /**
148
+ * Describes the message novatrail.api.v1.LegalTextRef.
149
+ * Use `create(LegalTextRefSchema)` to create a new message.
150
+ */
151
+ export declare const LegalTextRefSchema: GenMessage<LegalTextRef>;
152
+
153
+ /**
154
+ * The legal texts that `app` shows (R130). The method goes without a token and without the ID of a
155
+ * profile, by Connect GET: the policy is read before signing in. It has the idempotency level
156
+ * `NO_SIDE_EFFECTS`, and `app` calls it with no header — no `Connect-Timeout-Ms` either, which
157
+ * would make the request not simple and send a preflight before it. It has no refusal of its own:
158
+ * a tag that is not a well-formed tag of BCP 47 gets `invalid_argument` with no `Refusal`.
159
+ *
160
+ * @generated from service novatrail.api.v1.LegalService
161
+ */
162
+ export declare const LegalService: GenService<{
163
+ /**
164
+ * The current version of every text whose place is `app`, with its body in English and its gist
165
+ * in the language asked when the passport has it, else in English.
166
+ *
167
+ * @generated from rpc novatrail.api.v1.LegalService.GetLegalTexts
168
+ */
169
+ getLegalTexts: {
170
+ methodKind: "unary";
171
+ input: typeof GetLegalTextsRequestSchema;
172
+ output: typeof GetLegalTextsResponseSchema;
173
+ },
174
+ }>;
175
+
@@ -0,0 +1,58 @@
1
+ // @generated by protoc-gen-es v2.16.0 with parameter "target=js+dts,import_extension=js"
2
+ // @generated from file novatrail/api/v1/legal.proto (package novatrail.api.v1, syntax proto3)
3
+ /* eslint-disable */
4
+
5
+ // The legal texts in the contract between `app` and `api`: the privacy policy, the terms of use
6
+ // and the consents that `app` shows as its own pages, each in its current version, with its gist
7
+ // in the language of the screen. The texts are those of the legal part, `legal/` of `spec`, or of a
8
+ // self-hosted copy's operator. What each message means is the rule of contracts/README.md,
9
+ // section 15.
10
+
11
+ import { fileDesc, messageDesc, serviceDesc } from "@bufbuild/protobuf/codegenv2";
12
+
13
+ /**
14
+ * Describes the file novatrail/api/v1/legal.proto.
15
+ */
16
+ export const file_novatrail_api_v1_legal = /*@__PURE__*/
17
+ fileDesc("Chxub3ZhdHJhaWwvYXBpL3YxL2xlZ2FsLnByb3RvEhBub3ZhdHJhaWwuYXBpLnYxIjIKFEdldExlZ2FsVGV4dHNSZXF1ZXN0EhoKEmludGVyZmFjZV9sYW5ndWFnZRgBIAEoCSJDChVHZXRMZWdhbFRleHRzUmVzcG9uc2USKgoFdGV4dHMYASADKAsyGy5ub3ZhdHJhaWwuYXBpLnYxLkxlZ2FsVGV4dCJ5CglMZWdhbFRleHQSCgoCaWQYASABKAkSDwoHdmVyc2lvbhgCIAEoBRIWCg5pbl9mb3JjZV9zaW5jZRgDIAEoCRIMCgRib2R5GAQgASgJEg8KB3N1bW1hcnkYBSABKAkSGAoQc3VtbWFyeV9sYW5ndWFnZRgGIAEoCSIrCgxMZWdhbFRleHRSZWYSCgoCaWQYASABKAkSDwoHdmVyc2lvbhgCIAEoBTJ1CgxMZWdhbFNlcnZpY2USZQoNR2V0TGVnYWxUZXh0cxImLm5vdmF0cmFpbC5hcGkudjEuR2V0TGVnYWxUZXh0c1JlcXVlc3QaJy5ub3ZhdHJhaWwuYXBpLnYxLkdldExlZ2FsVGV4dHNSZXNwb25zZSIDkAIBQsMBChRjb20ubm92YXRyYWlsLmFwaS52MUIKTGVnYWxQcm90b1ABWj1naXRodWIuY29tL2FsdG5vdmF0cmFpbC9zcGVjL2NvbnRyYWN0cy9ub3ZhdHJhaWwvYXBpL3YxO2FwaXYxogIDTkFYqgIQTm92YXRyYWlsLkFwaS5WMcoCEE5vdmF0cmFpbFxBcGlcVjHiAhxOb3ZhdHJhaWxcQXBpXFYxXEdQQk1ldGFkYXRh6gISTm92YXRyYWlsOjpBcGk6OlYxYgZwcm90bzM");
18
+
19
+ /**
20
+ * Describes the message novatrail.api.v1.GetLegalTextsRequest.
21
+ * Use `create(GetLegalTextsRequestSchema)` to create a new message.
22
+ */
23
+ export const GetLegalTextsRequestSchema = /*@__PURE__*/
24
+ messageDesc(file_novatrail_api_v1_legal, 0);
25
+
26
+ /**
27
+ * Describes the message novatrail.api.v1.GetLegalTextsResponse.
28
+ * Use `create(GetLegalTextsResponseSchema)` to create a new message.
29
+ */
30
+ export const GetLegalTextsResponseSchema = /*@__PURE__*/
31
+ messageDesc(file_novatrail_api_v1_legal, 1);
32
+
33
+ /**
34
+ * Describes the message novatrail.api.v1.LegalText.
35
+ * Use `create(LegalTextSchema)` to create a new message.
36
+ */
37
+ export const LegalTextSchema = /*@__PURE__*/
38
+ messageDesc(file_novatrail_api_v1_legal, 2);
39
+
40
+ /**
41
+ * Describes the message novatrail.api.v1.LegalTextRef.
42
+ * Use `create(LegalTextRefSchema)` to create a new message.
43
+ */
44
+ export const LegalTextRefSchema = /*@__PURE__*/
45
+ messageDesc(file_novatrail_api_v1_legal, 3);
46
+
47
+ /**
48
+ * The legal texts that `app` shows (R130). The method goes without a token and without the ID of a
49
+ * profile, by Connect GET: the policy is read before signing in. It has the idempotency level
50
+ * `NO_SIDE_EFFECTS`, and `app` calls it with no header — no `Connect-Timeout-Ms` either, which
51
+ * would make the request not simple and send a preflight before it. It has no refusal of its own:
52
+ * a tag that is not a well-formed tag of BCP 47 gets `invalid_argument` with no `Refusal`.
53
+ *
54
+ * @generated from service novatrail.api.v1.LegalService
55
+ */
56
+ export const LegalService = /*@__PURE__*/
57
+ serviceDesc(file_novatrail_api_v1_legal, 0);
58
+
@@ -258,10 +258,10 @@ export declare const ConnectedModuleSchema: GenMessage<ConnectedModule>;
258
258
  * right `can_learn`, and repeats by the state of the profile, with no idempotency key. Every method
259
259
  * carries the token of the sign-in service and may get the refusals of every request with a token,
260
260
  * which the comment of `AccountService` names with what `app` does on each; a profile that is not
261
- * the account's gets `CAUSE_NO_PROFILE`, and a request of a profile whose consent is not confirmed
262
- * `CAUSE_NO_CONSENT`. A module is named by its ID, and a version by the digest of its package:
263
- * `app` reads its title and explanation language in the open view of its manifest,
264
- * `PackageService`.
261
+ * the account's gets `CAUSE_NO_PROFILE`, a request of a profile whose consent is not confirmed
262
+ * `CAUSE_NO_CONSENT`, and one of a profile whose age is to be given again `CAUSE_AGE_NEEDED`. A
263
+ * module is named by its ID, and a version by the digest of its package: `app` reads its title and
264
+ * explanation language in the open view of its manifest, `PackageService`.
265
265
  *
266
266
  * @generated from service novatrail.api.v1.ModuleService
267
267
  */
@@ -90,10 +90,10 @@ export const ConnectedModuleSchema = /*@__PURE__*/
90
90
  * right `can_learn`, and repeats by the state of the profile, with no idempotency key. Every method
91
91
  * carries the token of the sign-in service and may get the refusals of every request with a token,
92
92
  * which the comment of `AccountService` names with what `app` does on each; a profile that is not
93
- * the account's gets `CAUSE_NO_PROFILE`, and a request of a profile whose consent is not confirmed
94
- * `CAUSE_NO_CONSENT`. A module is named by its ID, and a version by the digest of its package:
95
- * `app` reads its title and explanation language in the open view of its manifest,
96
- * `PackageService`.
93
+ * the account's gets `CAUSE_NO_PROFILE`, a request of a profile whose consent is not confirmed
94
+ * `CAUSE_NO_CONSENT`, and one of a profile whose age is to be given again `CAUSE_AGE_NEEDED`. A
95
+ * module is named by its ID, and a version by the digest of its package: `app` reads its title and
96
+ * explanation language in the open view of its manifest, `PackageService`.
97
97
  *
98
98
  * @generated from service novatrail.api.v1.ModuleService
99
99
  */
@@ -593,7 +593,8 @@ export declare const CriterionMarkSchema: GenEnum<CriterionMark>;
593
593
  * token of the sign-in service and may get the refusals of every request with a token, which the
594
594
  * comment of `AccountService` names with what `app` does on each; a profile that is not the
595
595
  * account's gets `CAUSE_NO_PROFILE`, a learning request of a profile whose consent is not
596
- * confirmed `CAUSE_NO_CONSENT`, a request without the right it needs the code `permission_denied`
596
+ * confirmed `CAUSE_NO_CONSENT` and one of a profile whose age is to be given again
597
+ * `CAUSE_AGE_NEEDED`, a request without the right it needs the code `permission_denied`
597
598
  * with no `Refusal`, and a request whose form the contract refuses the code `invalid_argument`
598
599
  * with no `Refusal`. Both repeat by the state of the profile, with no idempotency key.
599
600
  *
@@ -132,7 +132,8 @@ export const CriterionMark = /*@__PURE__*/
132
132
  * token of the sign-in service and may get the refusals of every request with a token, which the
133
133
  * comment of `AccountService` names with what `app` does on each; a profile that is not the
134
134
  * account's gets `CAUSE_NO_PROFILE`, a learning request of a profile whose consent is not
135
- * confirmed `CAUSE_NO_CONSENT`, a request without the right it needs the code `permission_denied`
135
+ * confirmed `CAUSE_NO_CONSENT` and one of a profile whose age is to be given again
136
+ * `CAUSE_AGE_NEEDED`, a request without the right it needs the code `permission_denied`
136
137
  * with no `Refusal`, and a request whose form the contract refuses the code `invalid_argument`
137
138
  * with no `Refusal`. Both repeat by the state of the profile, with no idempotency key.
138
139
  *
@@ -88,8 +88,10 @@ export declare type Sample = Message<"novatrail.eval.v1.Sample"> & {
88
88
 
89
89
  /**
90
90
  * The version of the set of texts that the samples page showed: the notice of the purpose and
91
- * the form of consent. 1 to 32 Latin letters, digits, dots and hyphens; "none" in a file that the
92
- * samples page did not write, a synthetic sample among them.
91
+ * the form of consent. 1 to 32 Latin letters, digits, dots and hyphens: from the legal part on,
92
+ * the set's ID and version joined by a hyphen, such as "child-sample-1" (legal/README.md,
93
+ * section 4); "none" in a file that the samples page did not write, a synthetic sample among
94
+ * them.
93
95
  *
94
96
  * @generated from field: string text_set_version = 8;
95
97
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@altnovatrail/contracts",
3
- "version": "0.12.0",
3
+ "version": "0.14.0",
4
4
  "description": "The code of NovaTrail's API contracts for TypeScript, which protoc-gen-es generates from their protobuf files: the messages and enums of each contract, with their descriptors, for @bufbuild/protobuf and Connect.",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -25,6 +25,10 @@
25
25
  "types": "./novatrail/api/v1/learning_pb.d.ts",
26
26
  "default": "./novatrail/api/v1/learning_pb.js"
27
27
  },
28
+ "./novatrail/api/v1/legal_pb.js": {
29
+ "types": "./novatrail/api/v1/legal_pb.d.ts",
30
+ "default": "./novatrail/api/v1/legal_pb.js"
31
+ },
28
32
  "./novatrail/api/v1/module_pb.js": {
29
33
  "types": "./novatrail/api/v1/module_pb.d.ts",
30
34
  "default": "./novatrail/api/v1/module_pb.js"