@world-engines/protocol-ts 0.1.0-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (74) hide show
  1. package/LICENSE +46 -0
  2. package/dist/entity-prop-envelope.d.ts +36 -0
  3. package/dist/entity-prop-envelope.js +50 -0
  4. package/dist/gen/v1/auth.d.ts +46 -0
  5. package/dist/gen/v1/auth.js +278 -0
  6. package/dist/gen/v1/billing.d.ts +71 -0
  7. package/dist/gen/v1/billing.js +521 -0
  8. package/dist/gen/v1/common.d.ts +65 -0
  9. package/dist/gen/v1/common.js +387 -0
  10. package/dist/gen/v1/llm.d.ts +317 -0
  11. package/dist/gen/v1/llm.js +3557 -0
  12. package/dist/gen/v1/mcp.d.ts +373 -0
  13. package/dist/gen/v1/mcp.js +3190 -0
  14. package/dist/gen/v1/moderation.d.ts +51 -0
  15. package/dist/gen/v1/moderation.js +368 -0
  16. package/dist/gen/v1/neutral_scenario_source.d.ts +80 -0
  17. package/dist/gen/v1/neutral_scenario_source.js +569 -0
  18. package/dist/gen/v1/relation_kind.d.ts +105 -0
  19. package/dist/gen/v1/relation_kind.js +562 -0
  20. package/dist/gen/v1/rest/admin.d.ts +432 -0
  21. package/dist/gen/v1/rest/admin.js +4957 -0
  22. package/dist/gen/v1/rest/asset.d.ts +205 -0
  23. package/dist/gen/v1/rest/asset.js +2200 -0
  24. package/dist/gen/v1/rest/auth.d.ts +275 -0
  25. package/dist/gen/v1/rest/auth.js +2896 -0
  26. package/dist/gen/v1/rest/billing.d.ts +101 -0
  27. package/dist/gen/v1/rest/billing.js +866 -0
  28. package/dist/gen/v1/rest/common.d.ts +179 -0
  29. package/dist/gen/v1/rest/common.js +1358 -0
  30. package/dist/gen/v1/rest/creator.d.ts +354 -0
  31. package/dist/gen/v1/rest/creator.js +4169 -0
  32. package/dist/gen/v1/rest/messaging.d.ts +190 -0
  33. package/dist/gen/v1/rest/messaging.js +2017 -0
  34. package/dist/gen/v1/rest/moderation.d.ts +61 -0
  35. package/dist/gen/v1/rest/moderation.js +569 -0
  36. package/dist/gen/v1/rest/pet.d.ts +98 -0
  37. package/dist/gen/v1/rest/pet.js +698 -0
  38. package/dist/gen/v1/rest/project_transfer.d.ts +470 -0
  39. package/dist/gen/v1/rest/project_transfer.js +5266 -0
  40. package/dist/gen/v1/rest/scenario.d.ts +756 -0
  41. package/dist/gen/v1/rest/scenario.js +8768 -0
  42. package/dist/gen/v1/rest/stock_bounty.d.ts +154 -0
  43. package/dist/gen/v1/rest/stock_bounty.js +1547 -0
  44. package/dist/gen/v1/rest/stocks.d.ts +465 -0
  45. package/dist/gen/v1/rest/stocks.js +5200 -0
  46. package/dist/gen/v1/rest/support_ticket.d.ts +61 -0
  47. package/dist/gen/v1/rest/support_ticket.js +511 -0
  48. package/dist/gen/v1/rest/users.d.ts +292 -0
  49. package/dist/gen/v1/rest/users.js +2879 -0
  50. package/dist/gen/v1/rest/violations.d.ts +52 -0
  51. package/dist/gen/v1/rest/violations.js +338 -0
  52. package/dist/gen/v1/sav.d.ts +987 -0
  53. package/dist/gen/v1/sav.js +12327 -0
  54. package/dist/gen/v1/save.d.ts +68 -0
  55. package/dist/gen/v1/save.js +595 -0
  56. package/dist/gen/v1/scenario_part_source.d.ts +94 -0
  57. package/dist/gen/v1/scenario_part_source.js +913 -0
  58. package/dist/gen/v1/session.d.ts +49 -0
  59. package/dist/gen/v1/session.js +311 -0
  60. package/dist/gen/v1/view_state.d.ts +267 -0
  61. package/dist/gen/v1/view_state.js +3239 -0
  62. package/dist/gen/v1/world.d.ts +82 -0
  63. package/dist/gen/v1/world.js +707 -0
  64. package/dist/gen/v1/world_memory.d.ts +545 -0
  65. package/dist/gen/v1/world_memory.js +5816 -0
  66. package/dist/gen/v1/world_memory_privacy.d.ts +96 -0
  67. package/dist/gen/v1/world_memory_privacy.js +994 -0
  68. package/dist/gen/v1/ws_frame.d.ts +1626 -0
  69. package/dist/gen/v1/ws_frame.js +18253 -0
  70. package/dist/index.d.ts +2 -0
  71. package/dist/index.js +5 -0
  72. package/dist/ladybug-extraction.d.ts +36 -0
  73. package/dist/ladybug-extraction.js +1 -0
  74. package/package.json +65 -0
@@ -0,0 +1,562 @@
1
+ // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
2
+ // versions:
3
+ // protoc-gen-ts_proto v2.12.0
4
+ // protoc unknown
5
+ // source: v1/relation_kind.proto
6
+ /* eslint-disable */
7
+ import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
8
+ export var RelationKind;
9
+ (function (RelationKind) {
10
+ RelationKind[RelationKind["RELATION_KIND_UNSPECIFIED"] = 0] = "RELATION_KIND_UNSPECIFIED";
11
+ /** RELATION_KIND_FAMILY_OF - 亲属 (kinship) */
12
+ RelationKind[RelationKind["RELATION_KIND_FAMILY_OF"] = 1] = "RELATION_KIND_FAMILY_OF";
13
+ RelationKind[RelationKind["RELATION_KIND_PARENT_OF"] = 2] = "RELATION_KIND_PARENT_OF";
14
+ RelationKind[RelationKind["RELATION_KIND_CHILD_OF"] = 3] = "RELATION_KIND_CHILD_OF";
15
+ RelationKind[RelationKind["RELATION_KIND_SIBLING_OF"] = 4] = "RELATION_KIND_SIBLING_OF";
16
+ RelationKind[RelationKind["RELATION_KIND_SPOUSE_OF"] = 5] = "RELATION_KIND_SPOUSE_OF";
17
+ RelationKind[RelationKind["RELATION_KIND_RELATIVE_OF"] = 6] = "RELATION_KIND_RELATIVE_OF";
18
+ /** RELATION_KIND_KNOWS - 社交 (social) */
19
+ RelationKind[RelationKind["RELATION_KIND_KNOWS"] = 20] = "RELATION_KIND_KNOWS";
20
+ RelationKind[RelationKind["RELATION_KIND_FRIEND_OF"] = 21] = "RELATION_KIND_FRIEND_OF";
21
+ RelationKind[RelationKind["RELATION_KIND_HOSTILE_TO"] = 22] = "RELATION_KIND_HOSTILE_TO";
22
+ RelationKind[RelationKind["RELATION_KIND_ROMANTIC_WITH"] = 23] = "RELATION_KIND_ROMANTIC_WITH";
23
+ RelationKind[RelationKind["RELATION_KIND_RIVAL_OF"] = 24] = "RELATION_KIND_RIVAL_OF";
24
+ /** RELATION_KIND_TEACHER_OF - 师徒 (mentorship) */
25
+ RelationKind[RelationKind["RELATION_KIND_TEACHER_OF"] = 30] = "RELATION_KIND_TEACHER_OF";
26
+ RelationKind[RelationKind["RELATION_KIND_STUDENT_OF"] = 31] = "RELATION_KIND_STUDENT_OF";
27
+ RelationKind[RelationKind["RELATION_KIND_TEACHES"] = 32] = "RELATION_KIND_TEACHES";
28
+ /** RELATION_KIND_EMPLOYER_OF - 职场 (workplace) */
29
+ RelationKind[RelationKind["RELATION_KIND_EMPLOYER_OF"] = 40] = "RELATION_KIND_EMPLOYER_OF";
30
+ RelationKind[RelationKind["RELATION_KIND_EMPLOYEE_OF"] = 41] = "RELATION_KIND_EMPLOYEE_OF";
31
+ RelationKind[RelationKind["RELATION_KIND_COLLEAGUE_OF"] = 42] = "RELATION_KIND_COLLEAGUE_OF";
32
+ /** RELATION_KIND_LOCATED_IN - 空间与持有 (spatial) */
33
+ RelationKind[RelationKind["RELATION_KIND_LOCATED_IN"] = 50] = "RELATION_KIND_LOCATED_IN";
34
+ RelationKind[RelationKind["RELATION_KIND_OWNS"] = 51] = "RELATION_KIND_OWNS";
35
+ /** RELATION_KIND_MEMBER_OF - 组织与隶属 (organization) */
36
+ RelationKind[RelationKind["RELATION_KIND_MEMBER_OF"] = 60] = "RELATION_KIND_MEMBER_OF";
37
+ RelationKind[RelationKind["RELATION_KIND_LEADER_OF"] = 61] = "RELATION_KIND_LEADER_OF";
38
+ RelationKind[RelationKind["RELATION_KIND_SUBORDINATE_OF"] = 62] = "RELATION_KIND_SUBORDINATE_OF";
39
+ RelationKind[RelationKind["RELATION_KIND_AFFILIATED_WITH"] = 63] = "RELATION_KIND_AFFILIATED_WITH";
40
+ RelationKind[RelationKind["RELATION_KIND_ALLIED_WITH"] = 64] = "RELATION_KIND_ALLIED_WITH";
41
+ /** RELATION_KIND_CREATED - 创造 (creation) */
42
+ RelationKind[RelationKind["RELATION_KIND_CREATED"] = 70] = "RELATION_KIND_CREATED";
43
+ /** RELATION_KIND_RELATED_TO - 兜底 (fallback) 上表未覆盖的自由语义用 related_to 承接 */
44
+ RelationKind[RelationKind["RELATION_KIND_RELATED_TO"] = 90] = "RELATION_KIND_RELATED_TO";
45
+ RelationKind[RelationKind["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
46
+ })(RelationKind || (RelationKind = {}));
47
+ export function relationKindFromJSON(object) {
48
+ switch (object) {
49
+ case 0:
50
+ case "RELATION_KIND_UNSPECIFIED":
51
+ return RelationKind.RELATION_KIND_UNSPECIFIED;
52
+ case 1:
53
+ case "RELATION_KIND_FAMILY_OF":
54
+ return RelationKind.RELATION_KIND_FAMILY_OF;
55
+ case 2:
56
+ case "RELATION_KIND_PARENT_OF":
57
+ return RelationKind.RELATION_KIND_PARENT_OF;
58
+ case 3:
59
+ case "RELATION_KIND_CHILD_OF":
60
+ return RelationKind.RELATION_KIND_CHILD_OF;
61
+ case 4:
62
+ case "RELATION_KIND_SIBLING_OF":
63
+ return RelationKind.RELATION_KIND_SIBLING_OF;
64
+ case 5:
65
+ case "RELATION_KIND_SPOUSE_OF":
66
+ return RelationKind.RELATION_KIND_SPOUSE_OF;
67
+ case 6:
68
+ case "RELATION_KIND_RELATIVE_OF":
69
+ return RelationKind.RELATION_KIND_RELATIVE_OF;
70
+ case 20:
71
+ case "RELATION_KIND_KNOWS":
72
+ return RelationKind.RELATION_KIND_KNOWS;
73
+ case 21:
74
+ case "RELATION_KIND_FRIEND_OF":
75
+ return RelationKind.RELATION_KIND_FRIEND_OF;
76
+ case 22:
77
+ case "RELATION_KIND_HOSTILE_TO":
78
+ return RelationKind.RELATION_KIND_HOSTILE_TO;
79
+ case 23:
80
+ case "RELATION_KIND_ROMANTIC_WITH":
81
+ return RelationKind.RELATION_KIND_ROMANTIC_WITH;
82
+ case 24:
83
+ case "RELATION_KIND_RIVAL_OF":
84
+ return RelationKind.RELATION_KIND_RIVAL_OF;
85
+ case 30:
86
+ case "RELATION_KIND_TEACHER_OF":
87
+ return RelationKind.RELATION_KIND_TEACHER_OF;
88
+ case 31:
89
+ case "RELATION_KIND_STUDENT_OF":
90
+ return RelationKind.RELATION_KIND_STUDENT_OF;
91
+ case 32:
92
+ case "RELATION_KIND_TEACHES":
93
+ return RelationKind.RELATION_KIND_TEACHES;
94
+ case 40:
95
+ case "RELATION_KIND_EMPLOYER_OF":
96
+ return RelationKind.RELATION_KIND_EMPLOYER_OF;
97
+ case 41:
98
+ case "RELATION_KIND_EMPLOYEE_OF":
99
+ return RelationKind.RELATION_KIND_EMPLOYEE_OF;
100
+ case 42:
101
+ case "RELATION_KIND_COLLEAGUE_OF":
102
+ return RelationKind.RELATION_KIND_COLLEAGUE_OF;
103
+ case 50:
104
+ case "RELATION_KIND_LOCATED_IN":
105
+ return RelationKind.RELATION_KIND_LOCATED_IN;
106
+ case 51:
107
+ case "RELATION_KIND_OWNS":
108
+ return RelationKind.RELATION_KIND_OWNS;
109
+ case 60:
110
+ case "RELATION_KIND_MEMBER_OF":
111
+ return RelationKind.RELATION_KIND_MEMBER_OF;
112
+ case 61:
113
+ case "RELATION_KIND_LEADER_OF":
114
+ return RelationKind.RELATION_KIND_LEADER_OF;
115
+ case 62:
116
+ case "RELATION_KIND_SUBORDINATE_OF":
117
+ return RelationKind.RELATION_KIND_SUBORDINATE_OF;
118
+ case 63:
119
+ case "RELATION_KIND_AFFILIATED_WITH":
120
+ return RelationKind.RELATION_KIND_AFFILIATED_WITH;
121
+ case 64:
122
+ case "RELATION_KIND_ALLIED_WITH":
123
+ return RelationKind.RELATION_KIND_ALLIED_WITH;
124
+ case 70:
125
+ case "RELATION_KIND_CREATED":
126
+ return RelationKind.RELATION_KIND_CREATED;
127
+ case 90:
128
+ case "RELATION_KIND_RELATED_TO":
129
+ return RelationKind.RELATION_KIND_RELATED_TO;
130
+ case -1:
131
+ case "UNRECOGNIZED":
132
+ default:
133
+ return RelationKind.UNRECOGNIZED;
134
+ }
135
+ }
136
+ export function relationKindToJSON(object) {
137
+ switch (object) {
138
+ case RelationKind.RELATION_KIND_UNSPECIFIED:
139
+ return "RELATION_KIND_UNSPECIFIED";
140
+ case RelationKind.RELATION_KIND_FAMILY_OF:
141
+ return "RELATION_KIND_FAMILY_OF";
142
+ case RelationKind.RELATION_KIND_PARENT_OF:
143
+ return "RELATION_KIND_PARENT_OF";
144
+ case RelationKind.RELATION_KIND_CHILD_OF:
145
+ return "RELATION_KIND_CHILD_OF";
146
+ case RelationKind.RELATION_KIND_SIBLING_OF:
147
+ return "RELATION_KIND_SIBLING_OF";
148
+ case RelationKind.RELATION_KIND_SPOUSE_OF:
149
+ return "RELATION_KIND_SPOUSE_OF";
150
+ case RelationKind.RELATION_KIND_RELATIVE_OF:
151
+ return "RELATION_KIND_RELATIVE_OF";
152
+ case RelationKind.RELATION_KIND_KNOWS:
153
+ return "RELATION_KIND_KNOWS";
154
+ case RelationKind.RELATION_KIND_FRIEND_OF:
155
+ return "RELATION_KIND_FRIEND_OF";
156
+ case RelationKind.RELATION_KIND_HOSTILE_TO:
157
+ return "RELATION_KIND_HOSTILE_TO";
158
+ case RelationKind.RELATION_KIND_ROMANTIC_WITH:
159
+ return "RELATION_KIND_ROMANTIC_WITH";
160
+ case RelationKind.RELATION_KIND_RIVAL_OF:
161
+ return "RELATION_KIND_RIVAL_OF";
162
+ case RelationKind.RELATION_KIND_TEACHER_OF:
163
+ return "RELATION_KIND_TEACHER_OF";
164
+ case RelationKind.RELATION_KIND_STUDENT_OF:
165
+ return "RELATION_KIND_STUDENT_OF";
166
+ case RelationKind.RELATION_KIND_TEACHES:
167
+ return "RELATION_KIND_TEACHES";
168
+ case RelationKind.RELATION_KIND_EMPLOYER_OF:
169
+ return "RELATION_KIND_EMPLOYER_OF";
170
+ case RelationKind.RELATION_KIND_EMPLOYEE_OF:
171
+ return "RELATION_KIND_EMPLOYEE_OF";
172
+ case RelationKind.RELATION_KIND_COLLEAGUE_OF:
173
+ return "RELATION_KIND_COLLEAGUE_OF";
174
+ case RelationKind.RELATION_KIND_LOCATED_IN:
175
+ return "RELATION_KIND_LOCATED_IN";
176
+ case RelationKind.RELATION_KIND_OWNS:
177
+ return "RELATION_KIND_OWNS";
178
+ case RelationKind.RELATION_KIND_MEMBER_OF:
179
+ return "RELATION_KIND_MEMBER_OF";
180
+ case RelationKind.RELATION_KIND_LEADER_OF:
181
+ return "RELATION_KIND_LEADER_OF";
182
+ case RelationKind.RELATION_KIND_SUBORDINATE_OF:
183
+ return "RELATION_KIND_SUBORDINATE_OF";
184
+ case RelationKind.RELATION_KIND_AFFILIATED_WITH:
185
+ return "RELATION_KIND_AFFILIATED_WITH";
186
+ case RelationKind.RELATION_KIND_ALLIED_WITH:
187
+ return "RELATION_KIND_ALLIED_WITH";
188
+ case RelationKind.RELATION_KIND_CREATED:
189
+ return "RELATION_KIND_CREATED";
190
+ case RelationKind.RELATION_KIND_RELATED_TO:
191
+ return "RELATION_KIND_RELATED_TO";
192
+ case RelationKind.UNRECOGNIZED:
193
+ default:
194
+ return "UNRECOGNIZED";
195
+ }
196
+ }
197
+ /** 关系类型分类 供 UI 分组 */
198
+ export var RelationKindCategory;
199
+ (function (RelationKindCategory) {
200
+ RelationKindCategory[RelationKindCategory["RELATION_KIND_CATEGORY_UNSPECIFIED"] = 0] = "RELATION_KIND_CATEGORY_UNSPECIFIED";
201
+ RelationKindCategory[RelationKindCategory["RELATION_KIND_CATEGORY_KINSHIP"] = 1] = "RELATION_KIND_CATEGORY_KINSHIP";
202
+ RelationKindCategory[RelationKindCategory["RELATION_KIND_CATEGORY_SOCIAL"] = 2] = "RELATION_KIND_CATEGORY_SOCIAL";
203
+ RelationKindCategory[RelationKindCategory["RELATION_KIND_CATEGORY_MENTORSHIP"] = 3] = "RELATION_KIND_CATEGORY_MENTORSHIP";
204
+ RelationKindCategory[RelationKindCategory["RELATION_KIND_CATEGORY_WORKPLACE"] = 4] = "RELATION_KIND_CATEGORY_WORKPLACE";
205
+ RelationKindCategory[RelationKindCategory["RELATION_KIND_CATEGORY_SPATIAL"] = 5] = "RELATION_KIND_CATEGORY_SPATIAL";
206
+ RelationKindCategory[RelationKindCategory["RELATION_KIND_CATEGORY_ORGANIZATION"] = 6] = "RELATION_KIND_CATEGORY_ORGANIZATION";
207
+ RelationKindCategory[RelationKindCategory["RELATION_KIND_CATEGORY_CREATION"] = 7] = "RELATION_KIND_CATEGORY_CREATION";
208
+ RelationKindCategory[RelationKindCategory["RELATION_KIND_CATEGORY_FALLBACK"] = 8] = "RELATION_KIND_CATEGORY_FALLBACK";
209
+ RelationKindCategory[RelationKindCategory["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
210
+ })(RelationKindCategory || (RelationKindCategory = {}));
211
+ export function relationKindCategoryFromJSON(object) {
212
+ switch (object) {
213
+ case 0:
214
+ case "RELATION_KIND_CATEGORY_UNSPECIFIED":
215
+ return RelationKindCategory.RELATION_KIND_CATEGORY_UNSPECIFIED;
216
+ case 1:
217
+ case "RELATION_KIND_CATEGORY_KINSHIP":
218
+ return RelationKindCategory.RELATION_KIND_CATEGORY_KINSHIP;
219
+ case 2:
220
+ case "RELATION_KIND_CATEGORY_SOCIAL":
221
+ return RelationKindCategory.RELATION_KIND_CATEGORY_SOCIAL;
222
+ case 3:
223
+ case "RELATION_KIND_CATEGORY_MENTORSHIP":
224
+ return RelationKindCategory.RELATION_KIND_CATEGORY_MENTORSHIP;
225
+ case 4:
226
+ case "RELATION_KIND_CATEGORY_WORKPLACE":
227
+ return RelationKindCategory.RELATION_KIND_CATEGORY_WORKPLACE;
228
+ case 5:
229
+ case "RELATION_KIND_CATEGORY_SPATIAL":
230
+ return RelationKindCategory.RELATION_KIND_CATEGORY_SPATIAL;
231
+ case 6:
232
+ case "RELATION_KIND_CATEGORY_ORGANIZATION":
233
+ return RelationKindCategory.RELATION_KIND_CATEGORY_ORGANIZATION;
234
+ case 7:
235
+ case "RELATION_KIND_CATEGORY_CREATION":
236
+ return RelationKindCategory.RELATION_KIND_CATEGORY_CREATION;
237
+ case 8:
238
+ case "RELATION_KIND_CATEGORY_FALLBACK":
239
+ return RelationKindCategory.RELATION_KIND_CATEGORY_FALLBACK;
240
+ case -1:
241
+ case "UNRECOGNIZED":
242
+ default:
243
+ return RelationKindCategory.UNRECOGNIZED;
244
+ }
245
+ }
246
+ export function relationKindCategoryToJSON(object) {
247
+ switch (object) {
248
+ case RelationKindCategory.RELATION_KIND_CATEGORY_UNSPECIFIED:
249
+ return "RELATION_KIND_CATEGORY_UNSPECIFIED";
250
+ case RelationKindCategory.RELATION_KIND_CATEGORY_KINSHIP:
251
+ return "RELATION_KIND_CATEGORY_KINSHIP";
252
+ case RelationKindCategory.RELATION_KIND_CATEGORY_SOCIAL:
253
+ return "RELATION_KIND_CATEGORY_SOCIAL";
254
+ case RelationKindCategory.RELATION_KIND_CATEGORY_MENTORSHIP:
255
+ return "RELATION_KIND_CATEGORY_MENTORSHIP";
256
+ case RelationKindCategory.RELATION_KIND_CATEGORY_WORKPLACE:
257
+ return "RELATION_KIND_CATEGORY_WORKPLACE";
258
+ case RelationKindCategory.RELATION_KIND_CATEGORY_SPATIAL:
259
+ return "RELATION_KIND_CATEGORY_SPATIAL";
260
+ case RelationKindCategory.RELATION_KIND_CATEGORY_ORGANIZATION:
261
+ return "RELATION_KIND_CATEGORY_ORGANIZATION";
262
+ case RelationKindCategory.RELATION_KIND_CATEGORY_CREATION:
263
+ return "RELATION_KIND_CATEGORY_CREATION";
264
+ case RelationKindCategory.RELATION_KIND_CATEGORY_FALLBACK:
265
+ return "RELATION_KIND_CATEGORY_FALLBACK";
266
+ case RelationKindCategory.UNRECOGNIZED:
267
+ default:
268
+ return "UNRECOGNIZED";
269
+ }
270
+ }
271
+ function createBaseSubtypeProp() {
272
+ return { name: "", default_value: "", allowed_values: [], _unknownFields: {} };
273
+ }
274
+ export const SubtypeProp = {
275
+ encode(message, writer = new BinaryWriter()) {
276
+ if (message.name !== "") {
277
+ writer.uint32(10).string(message.name);
278
+ }
279
+ if (message.default_value !== "") {
280
+ writer.uint32(18).string(message.default_value);
281
+ }
282
+ for (const v of message.allowed_values) {
283
+ writer.uint32(26).string(v);
284
+ }
285
+ if (message._unknownFields !== undefined) {
286
+ for (const [key, values] of globalThis.Object.entries(message._unknownFields)) {
287
+ const tag = parseInt(key, 10);
288
+ for (const value of values) {
289
+ writer.uint32(tag).raw(value);
290
+ }
291
+ }
292
+ }
293
+ return writer;
294
+ },
295
+ decode(input, length) {
296
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
297
+ const end = length === undefined ? reader.len : reader.pos + length;
298
+ const message = createBaseSubtypeProp();
299
+ while (reader.pos < end) {
300
+ const tag = reader.uint32();
301
+ switch (tag >>> 3) {
302
+ case 1: {
303
+ if (tag !== 10) {
304
+ break;
305
+ }
306
+ message.name = reader.string();
307
+ continue;
308
+ }
309
+ case 2: {
310
+ if (tag !== 18) {
311
+ break;
312
+ }
313
+ message.default_value = reader.string();
314
+ continue;
315
+ }
316
+ case 3: {
317
+ if (tag !== 26) {
318
+ break;
319
+ }
320
+ message.allowed_values.push(reader.string());
321
+ continue;
322
+ }
323
+ }
324
+ if ((tag & 7) === 4 || tag === 0) {
325
+ break;
326
+ }
327
+ const buf = reader.skip(tag & 7);
328
+ const list = message._unknownFields[tag];
329
+ if (list === undefined) {
330
+ message._unknownFields[tag] = [buf];
331
+ }
332
+ else {
333
+ list.push(buf);
334
+ }
335
+ }
336
+ return message;
337
+ },
338
+ fromJSON(object) {
339
+ return {
340
+ name: isSet(object.name) ? globalThis.String(object.name) : "",
341
+ default_value: isSet(object.defaultValue)
342
+ ? globalThis.String(object.defaultValue)
343
+ : isSet(object.default_value)
344
+ ? globalThis.String(object.default_value)
345
+ : "",
346
+ allowed_values: globalThis.Array.isArray(object?.allowedValues)
347
+ ? object.allowedValues.map((e) => globalThis.String(e))
348
+ : globalThis.Array.isArray(object?.allowed_values)
349
+ ? object.allowed_values.map((e) => globalThis.String(e))
350
+ : [],
351
+ };
352
+ },
353
+ toJSON(message) {
354
+ const obj = {};
355
+ if (message.name !== "") {
356
+ obj.name = message.name;
357
+ }
358
+ if (message.default_value !== "") {
359
+ obj.defaultValue = message.default_value;
360
+ }
361
+ if (message.allowed_values?.length) {
362
+ obj.allowedValues = message.allowed_values;
363
+ }
364
+ return obj;
365
+ },
366
+ create(base) {
367
+ return SubtypeProp.fromPartial(base ?? {});
368
+ },
369
+ fromPartial(object) {
370
+ const message = createBaseSubtypeProp();
371
+ message.name = object.name ?? "";
372
+ message.default_value = object.default_value ?? "";
373
+ message.allowed_values = object.allowed_values?.map((e) => e) || [];
374
+ return message;
375
+ },
376
+ };
377
+ function createBaseRelationKindMetadata() {
378
+ return {
379
+ kind: 0,
380
+ snake_case_id: "",
381
+ category: 0,
382
+ label_i18n_key: "",
383
+ desc_i18n_key: "",
384
+ subtype_props: [],
385
+ deprecated: false,
386
+ _unknownFields: {},
387
+ };
388
+ }
389
+ export const RelationKindMetadata = {
390
+ encode(message, writer = new BinaryWriter()) {
391
+ if (message.kind !== 0) {
392
+ writer.uint32(8).int32(message.kind);
393
+ }
394
+ if (message.snake_case_id !== "") {
395
+ writer.uint32(18).string(message.snake_case_id);
396
+ }
397
+ if (message.category !== 0) {
398
+ writer.uint32(24).int32(message.category);
399
+ }
400
+ if (message.label_i18n_key !== "") {
401
+ writer.uint32(34).string(message.label_i18n_key);
402
+ }
403
+ if (message.desc_i18n_key !== "") {
404
+ writer.uint32(42).string(message.desc_i18n_key);
405
+ }
406
+ for (const v of message.subtype_props) {
407
+ SubtypeProp.encode(v, writer.uint32(50).fork()).join();
408
+ }
409
+ if (message.deprecated !== false) {
410
+ writer.uint32(56).bool(message.deprecated);
411
+ }
412
+ if (message._unknownFields !== undefined) {
413
+ for (const [key, values] of globalThis.Object.entries(message._unknownFields)) {
414
+ const tag = parseInt(key, 10);
415
+ for (const value of values) {
416
+ writer.uint32(tag).raw(value);
417
+ }
418
+ }
419
+ }
420
+ return writer;
421
+ },
422
+ decode(input, length) {
423
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
424
+ const end = length === undefined ? reader.len : reader.pos + length;
425
+ const message = createBaseRelationKindMetadata();
426
+ while (reader.pos < end) {
427
+ const tag = reader.uint32();
428
+ switch (tag >>> 3) {
429
+ case 1: {
430
+ if (tag !== 8) {
431
+ break;
432
+ }
433
+ message.kind = reader.int32();
434
+ continue;
435
+ }
436
+ case 2: {
437
+ if (tag !== 18) {
438
+ break;
439
+ }
440
+ message.snake_case_id = reader.string();
441
+ continue;
442
+ }
443
+ case 3: {
444
+ if (tag !== 24) {
445
+ break;
446
+ }
447
+ message.category = reader.int32();
448
+ continue;
449
+ }
450
+ case 4: {
451
+ if (tag !== 34) {
452
+ break;
453
+ }
454
+ message.label_i18n_key = reader.string();
455
+ continue;
456
+ }
457
+ case 5: {
458
+ if (tag !== 42) {
459
+ break;
460
+ }
461
+ message.desc_i18n_key = reader.string();
462
+ continue;
463
+ }
464
+ case 6: {
465
+ if (tag !== 50) {
466
+ break;
467
+ }
468
+ message.subtype_props.push(SubtypeProp.decode(reader, reader.uint32()));
469
+ continue;
470
+ }
471
+ case 7: {
472
+ if (tag !== 56) {
473
+ break;
474
+ }
475
+ message.deprecated = reader.bool();
476
+ continue;
477
+ }
478
+ }
479
+ if ((tag & 7) === 4 || tag === 0) {
480
+ break;
481
+ }
482
+ const buf = reader.skip(tag & 7);
483
+ const list = message._unknownFields[tag];
484
+ if (list === undefined) {
485
+ message._unknownFields[tag] = [buf];
486
+ }
487
+ else {
488
+ list.push(buf);
489
+ }
490
+ }
491
+ return message;
492
+ },
493
+ fromJSON(object) {
494
+ return {
495
+ kind: isSet(object.kind) ? relationKindFromJSON(object.kind) : 0,
496
+ snake_case_id: isSet(object.snakeCaseId)
497
+ ? globalThis.String(object.snakeCaseId)
498
+ : isSet(object.snake_case_id)
499
+ ? globalThis.String(object.snake_case_id)
500
+ : "",
501
+ category: isSet(object.category) ? relationKindCategoryFromJSON(object.category) : 0,
502
+ label_i18n_key: isSet(object.labelI18nKey)
503
+ ? globalThis.String(object.labelI18nKey)
504
+ : isSet(object.label_i18n_key)
505
+ ? globalThis.String(object.label_i18n_key)
506
+ : "",
507
+ desc_i18n_key: isSet(object.descI18nKey)
508
+ ? globalThis.String(object.descI18nKey)
509
+ : isSet(object.desc_i18n_key)
510
+ ? globalThis.String(object.desc_i18n_key)
511
+ : "",
512
+ subtype_props: globalThis.Array.isArray(object?.subtypeProps)
513
+ ? object.subtypeProps.map((e) => SubtypeProp.fromJSON(e))
514
+ : globalThis.Array.isArray(object?.subtype_props)
515
+ ? object.subtype_props.map((e) => SubtypeProp.fromJSON(e))
516
+ : [],
517
+ deprecated: isSet(object.deprecated) ? globalThis.Boolean(object.deprecated) : false,
518
+ };
519
+ },
520
+ toJSON(message) {
521
+ const obj = {};
522
+ if (message.kind !== 0) {
523
+ obj.kind = relationKindToJSON(message.kind);
524
+ }
525
+ if (message.snake_case_id !== "") {
526
+ obj.snakeCaseId = message.snake_case_id;
527
+ }
528
+ if (message.category !== 0) {
529
+ obj.category = relationKindCategoryToJSON(message.category);
530
+ }
531
+ if (message.label_i18n_key !== "") {
532
+ obj.labelI18nKey = message.label_i18n_key;
533
+ }
534
+ if (message.desc_i18n_key !== "") {
535
+ obj.descI18nKey = message.desc_i18n_key;
536
+ }
537
+ if (message.subtype_props?.length) {
538
+ obj.subtypeProps = message.subtype_props.map((e) => SubtypeProp.toJSON(e));
539
+ }
540
+ if (message.deprecated !== false) {
541
+ obj.deprecated = message.deprecated;
542
+ }
543
+ return obj;
544
+ },
545
+ create(base) {
546
+ return RelationKindMetadata.fromPartial(base ?? {});
547
+ },
548
+ fromPartial(object) {
549
+ const message = createBaseRelationKindMetadata();
550
+ message.kind = object.kind ?? 0;
551
+ message.snake_case_id = object.snake_case_id ?? "";
552
+ message.category = object.category ?? 0;
553
+ message.label_i18n_key = object.label_i18n_key ?? "";
554
+ message.desc_i18n_key = object.desc_i18n_key ?? "";
555
+ message.subtype_props = object.subtype_props?.map((e) => SubtypeProp.fromPartial(e)) || [];
556
+ message.deprecated = object.deprecated ?? false;
557
+ return message;
558
+ },
559
+ };
560
+ function isSet(value) {
561
+ return value !== null && value !== undefined;
562
+ }