@dailydotdev/schema 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.
Files changed (47) hide show
  1. package/LICENSE +661 -0
  2. package/README.md +1 -0
  3. package/dist/bragi/pipelines_connect.cjs +133 -0
  4. package/dist/bragi/pipelines_connect.d.cts +113 -0
  5. package/dist/bragi/pipelines_connect.d.ts +113 -0
  6. package/dist/bragi/pipelines_connect.js +110 -0
  7. package/dist/bragi/pipelines_pb.cjs +842 -0
  8. package/dist/bragi/pipelines_pb.d.cts +467 -0
  9. package/dist/bragi/pipelines_pb.d.ts +467 -0
  10. package/dist/bragi/pipelines_pb.js +801 -0
  11. package/dist/bragi/proxy_connect.cjs +88 -0
  12. package/dist/bragi/proxy_connect.d.cts +68 -0
  13. package/dist/bragi/proxy_connect.d.ts +68 -0
  14. package/dist/bragi/proxy_connect.js +65 -0
  15. package/dist/bragi/proxy_pb.cjs +595 -0
  16. package/dist/bragi/proxy_pb.d.cts +332 -0
  17. package/dist/bragi/proxy_pb.d.ts +332 -0
  18. package/dist/bragi/proxy_pb.js +561 -0
  19. package/dist/daily-api/posts_connect.cjs +44 -0
  20. package/dist/daily-api/posts_connect.d.cts +24 -0
  21. package/dist/daily-api/posts_connect.d.ts +24 -0
  22. package/dist/daily-api/posts_connect.js +21 -0
  23. package/dist/daily-api/posts_pb.cjs +122 -0
  24. package/dist/daily-api/posts_pb.d.cts +50 -0
  25. package/dist/daily-api/posts_pb.d.ts +50 -0
  26. package/dist/daily-api/posts_pb.js +98 -0
  27. package/dist/feed/personalised/personalised_pb.cjs +122 -0
  28. package/dist/feed/personalised/personalised_pb.d.cts +50 -0
  29. package/dist/feed/personalised/personalised_pb.d.ts +50 -0
  30. package/dist/feed/personalised/personalised_pb.js +98 -0
  31. package/dist/index.cjs +39 -0
  32. package/dist/index.d.cts +11 -0
  33. package/dist/index.d.ts +11 -0
  34. package/dist/index.js +10 -0
  35. package/dist/snotra/engagement/engagement_pb.cjs +201 -0
  36. package/dist/snotra/engagement/engagement_pb.d.cts +133 -0
  37. package/dist/snotra/engagement/engagement_pb.d.ts +133 -0
  38. package/dist/snotra/engagement/engagement_pb.js +175 -0
  39. package/dist/snotra/personalisation/personalisation_pb.cjs +431 -0
  40. package/dist/snotra/personalisation/personalisation_pb.d.cts +226 -0
  41. package/dist/snotra/personalisation/personalisation_pb.d.ts +226 -0
  42. package/dist/snotra/personalisation/personalisation_pb.js +400 -0
  43. package/dist/util/error_pb.cjs +71 -0
  44. package/dist/util/error_pb.d.cts +25 -0
  45. package/dist/util/error_pb.d.ts +25 -0
  46. package/dist/util/error_pb.js +48 -0
  47. package/package.json +44 -0
@@ -0,0 +1,11 @@
1
+ export { Pipelines } from './bragi/pipelines_connect.cjs';
2
+ export { CollectionPostInput, ContentFormat, ContextBuildingStrategy, EnrichRequest, EnrichResponse, FilterSearchRequest, FilterSearchResponse, GenerateCollectionRequest, GenerateCollectionResponse, IsPageInCacheRequest, IsPageInCacheResponse, PostDimensions, ScrapedPage, SearchAnswerRequest, SearchPromptRequest, SearchPromptResponse, SearchPromptV2Request, SearchQueryRequest, SearchQueryResponse } from './bragi/pipelines_pb.cjs';
3
+ export { LLMProxy } from './bragi/proxy_connect.cjs';
4
+ export { ChatAudit, ChatDelta, ChatMessage, ChatRequest, ChatResponse, ChatStreamResponse, CompletionRequest, Embedding, EmbeddingRequest, EmbeddingResponse, ModelProvider, Usage } from './bragi/proxy_pb.cjs';
5
+ export { PostService } from './daily-api/posts_connect.cjs';
6
+ export { CreatePostRequest, CreatePostResponse } from './daily-api/posts_pb.cjs';
7
+ export { Request, Response } from './feed/personalised/personalised_pb.cjs';
8
+ export { Action, Event, GetUserEventRequest, GetUserEventResponse } from './snotra/engagement/engagement_pb.cjs';
9
+ export { CreateVectorIndexMetaRequest, CreateVectorIndexMetaResponse, GetUserRankRequest, GetUserRankResponse, GetVectorIndexMetaRequest, GetVectorIndexMetaResponse, RankType, UserRank, VectorIndexMeta } from './snotra/personalisation/personalisation_pb.cjs';
10
+ export { Error } from './util/error_pb.cjs';
11
+ import '@bufbuild/protobuf';
@@ -0,0 +1,11 @@
1
+ export { Pipelines } from './bragi/pipelines_connect.js';
2
+ export { CollectionPostInput, ContentFormat, ContextBuildingStrategy, EnrichRequest, EnrichResponse, FilterSearchRequest, FilterSearchResponse, GenerateCollectionRequest, GenerateCollectionResponse, IsPageInCacheRequest, IsPageInCacheResponse, PostDimensions, ScrapedPage, SearchAnswerRequest, SearchPromptRequest, SearchPromptResponse, SearchPromptV2Request, SearchQueryRequest, SearchQueryResponse } from './bragi/pipelines_pb.js';
3
+ export { LLMProxy } from './bragi/proxy_connect.js';
4
+ export { ChatAudit, ChatDelta, ChatMessage, ChatRequest, ChatResponse, ChatStreamResponse, CompletionRequest, Embedding, EmbeddingRequest, EmbeddingResponse, ModelProvider, Usage } from './bragi/proxy_pb.js';
5
+ export { PostService } from './daily-api/posts_connect.js';
6
+ export { CreatePostRequest, CreatePostResponse } from './daily-api/posts_pb.js';
7
+ export { Request, Response } from './feed/personalised/personalised_pb.js';
8
+ export { Action, Event, GetUserEventRequest, GetUserEventResponse } from './snotra/engagement/engagement_pb.js';
9
+ export { CreateVectorIndexMetaRequest, CreateVectorIndexMetaResponse, GetUserRankRequest, GetUserRankResponse, GetVectorIndexMetaRequest, GetVectorIndexMetaResponse, RankType, UserRank, VectorIndexMeta } from './snotra/personalisation/personalisation_pb.js';
10
+ export { Error } from './util/error_pb.js';
11
+ import '@bufbuild/protobuf';
package/dist/index.js ADDED
@@ -0,0 +1,10 @@
1
+ export * from "./bragi/pipelines_connect";
2
+ export * from "./bragi/pipelines_pb";
3
+ export * from "./bragi/proxy_connect";
4
+ export * from "./bragi/proxy_pb";
5
+ export * from "./daily-api/posts_connect";
6
+ export * from "./daily-api/posts_pb";
7
+ export * from "./feed/personalised/personalised_pb";
8
+ export * from "./snotra/engagement/engagement_pb";
9
+ export * from "./snotra/personalisation/personalisation_pb";
10
+ export * from "./util/error_pb";
@@ -0,0 +1,201 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all)
7
+ __defProp(target, name, { get: all[name], enumerable: true });
8
+ };
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+ var engagement_pb_exports = {};
19
+ __export(engagement_pb_exports, {
20
+ Action: () => Action,
21
+ Event: () => Event,
22
+ GetUserEventRequest: () => GetUserEventRequest,
23
+ GetUserEventResponse: () => GetUserEventResponse
24
+ });
25
+ module.exports = __toCommonJS(engagement_pb_exports);
26
+ var import_protobuf = require("@bufbuild/protobuf");
27
+ var import_error_pb = require("../../util/error_pb.js");
28
+ var Action = /* @__PURE__ */ ((Action2) => {
29
+ Action2[Action2["View"] = 0] = "View";
30
+ Action2[Action2["Click"] = 1] = "Click";
31
+ Action2[Action2["Comment"] = 2] = "Comment";
32
+ Action2[Action2["UpVote"] = 3] = "UpVote";
33
+ Action2[Action2["DownVote"] = 4] = "DownVote";
34
+ Action2[Action2["RemoveUpVote"] = 5] = "RemoveUpVote";
35
+ Action2[Action2["RemoveDownVote"] = 6] = "RemoveDownVote";
36
+ Action2[Action2["FeedbackRequested"] = 7] = "FeedbackRequested";
37
+ Action2[Action2["FeedbackReceived"] = 8] = "FeedbackReceived";
38
+ Action2[Action2["BookmarkAdded"] = 9] = "BookmarkAdded";
39
+ Action2[Action2["BookmarkDeleted"] = 10] = "BookmarkDeleted";
40
+ return Action2;
41
+ })(Action || {});
42
+ import_protobuf.proto3.util.setEnumType(Action, "engagement.Action", [
43
+ { no: 0, name: "View" },
44
+ { no: 1, name: "Click" },
45
+ { no: 2, name: "Comment" },
46
+ { no: 3, name: "UpVote" },
47
+ { no: 4, name: "DownVote" },
48
+ { no: 5, name: "RemoveUpVote" },
49
+ { no: 6, name: "RemoveDownVote" },
50
+ { no: 7, name: "FeedbackRequested" },
51
+ { no: 8, name: "FeedbackReceived" },
52
+ { no: 9, name: "BookmarkAdded" },
53
+ { no: 10, name: "BookmarkDeleted" }
54
+ ]);
55
+ class Event extends import_protobuf.Message {
56
+ /**
57
+ * @generated from field: string user_id = 1;
58
+ */
59
+ userId = "";
60
+ /**
61
+ * @generated from field: string post_id = 2;
62
+ */
63
+ postId = "";
64
+ /**
65
+ * @generated from field: engagement.Action action = 3;
66
+ */
67
+ action = 0 /* View */;
68
+ /**
69
+ * @generated from field: bytes options = 4;
70
+ */
71
+ options = new Uint8Array(0);
72
+ /**
73
+ * @generated from field: google.protobuf.Timestamp d_insert = 5;
74
+ */
75
+ dInsert;
76
+ constructor(data) {
77
+ super();
78
+ import_protobuf.proto3.util.initPartial(data, this);
79
+ }
80
+ static runtime = import_protobuf.proto3;
81
+ static typeName = "engagement.Event";
82
+ static fields = import_protobuf.proto3.util.newFieldList(() => [
83
+ {
84
+ no: 1,
85
+ name: "user_id",
86
+ kind: "scalar",
87
+ T: 9
88
+ /* ScalarType.STRING */
89
+ },
90
+ {
91
+ no: 2,
92
+ name: "post_id",
93
+ kind: "scalar",
94
+ T: 9
95
+ /* ScalarType.STRING */
96
+ },
97
+ { no: 3, name: "action", kind: "enum", T: import_protobuf.proto3.getEnumType(Action) },
98
+ {
99
+ no: 4,
100
+ name: "options",
101
+ kind: "scalar",
102
+ T: 12
103
+ /* ScalarType.BYTES */
104
+ },
105
+ { no: 5, name: "d_insert", kind: "message", T: import_protobuf.Timestamp }
106
+ ]);
107
+ static fromBinary(bytes, options) {
108
+ return new Event().fromBinary(bytes, options);
109
+ }
110
+ static fromJson(jsonValue, options) {
111
+ return new Event().fromJson(jsonValue, options);
112
+ }
113
+ static fromJsonString(jsonString, options) {
114
+ return new Event().fromJsonString(jsonString, options);
115
+ }
116
+ static equals(a, b) {
117
+ return import_protobuf.proto3.util.equals(Event, a, b);
118
+ }
119
+ }
120
+ class GetUserEventRequest extends import_protobuf.Message {
121
+ /**
122
+ * @generated from field: string user_id = 1;
123
+ */
124
+ userId = "";
125
+ /**
126
+ * @generated from field: repeated engagement.Action actions = 2;
127
+ */
128
+ actions = [];
129
+ /**
130
+ * @generated from field: optional uint32 days = 3;
131
+ */
132
+ days;
133
+ constructor(data) {
134
+ super();
135
+ import_protobuf.proto3.util.initPartial(data, this);
136
+ }
137
+ static runtime = import_protobuf.proto3;
138
+ static typeName = "engagement.GetUserEventRequest";
139
+ static fields = import_protobuf.proto3.util.newFieldList(() => [
140
+ {
141
+ no: 1,
142
+ name: "user_id",
143
+ kind: "scalar",
144
+ T: 9
145
+ /* ScalarType.STRING */
146
+ },
147
+ { no: 2, name: "actions", kind: "enum", T: import_protobuf.proto3.getEnumType(Action), repeated: true },
148
+ { no: 3, name: "days", kind: "scalar", T: 13, opt: true }
149
+ ]);
150
+ static fromBinary(bytes, options) {
151
+ return new GetUserEventRequest().fromBinary(bytes, options);
152
+ }
153
+ static fromJson(jsonValue, options) {
154
+ return new GetUserEventRequest().fromJson(jsonValue, options);
155
+ }
156
+ static fromJsonString(jsonString, options) {
157
+ return new GetUserEventRequest().fromJsonString(jsonString, options);
158
+ }
159
+ static equals(a, b) {
160
+ return import_protobuf.proto3.util.equals(GetUserEventRequest, a, b);
161
+ }
162
+ }
163
+ class GetUserEventResponse extends import_protobuf.Message {
164
+ /**
165
+ * @generated from field: repeated engagement.Event result = 1;
166
+ */
167
+ result = [];
168
+ /**
169
+ * @generated from field: repeated util.Error error = 2;
170
+ */
171
+ error = [];
172
+ constructor(data) {
173
+ super();
174
+ import_protobuf.proto3.util.initPartial(data, this);
175
+ }
176
+ static runtime = import_protobuf.proto3;
177
+ static typeName = "engagement.GetUserEventResponse";
178
+ static fields = import_protobuf.proto3.util.newFieldList(() => [
179
+ { no: 1, name: "result", kind: "message", T: Event, repeated: true },
180
+ { no: 2, name: "error", kind: "message", T: import_error_pb.Error, repeated: true }
181
+ ]);
182
+ static fromBinary(bytes, options) {
183
+ return new GetUserEventResponse().fromBinary(bytes, options);
184
+ }
185
+ static fromJson(jsonValue, options) {
186
+ return new GetUserEventResponse().fromJson(jsonValue, options);
187
+ }
188
+ static fromJsonString(jsonString, options) {
189
+ return new GetUserEventResponse().fromJsonString(jsonString, options);
190
+ }
191
+ static equals(a, b) {
192
+ return import_protobuf.proto3.util.equals(GetUserEventResponse, a, b);
193
+ }
194
+ }
195
+ // Annotate the CommonJS export names for ESM import in node:
196
+ 0 && (module.exports = {
197
+ Action,
198
+ Event,
199
+ GetUserEventRequest,
200
+ GetUserEventResponse
201
+ });
@@ -0,0 +1,133 @@
1
+ import { Message, Timestamp, PartialMessage, proto3, FieldList, BinaryReadOptions, JsonValue, JsonReadOptions, PlainMessage } from '@bufbuild/protobuf';
2
+ import { Error } from '../../util/error_pb.cjs';
3
+
4
+ /**
5
+ * @generated from enum engagement.Action
6
+ */
7
+ declare enum Action {
8
+ /**
9
+ * @generated from enum value: View = 0;
10
+ */
11
+ View = 0,
12
+ /**
13
+ * @generated from enum value: Click = 1;
14
+ */
15
+ Click = 1,
16
+ /**
17
+ * @generated from enum value: Comment = 2;
18
+ */
19
+ Comment = 2,
20
+ /**
21
+ * @generated from enum value: UpVote = 3;
22
+ */
23
+ UpVote = 3,
24
+ /**
25
+ * @generated from enum value: DownVote = 4;
26
+ */
27
+ DownVote = 4,
28
+ /**
29
+ * @generated from enum value: RemoveUpVote = 5;
30
+ */
31
+ RemoveUpVote = 5,
32
+ /**
33
+ * @generated from enum value: RemoveDownVote = 6;
34
+ */
35
+ RemoveDownVote = 6,
36
+ /**
37
+ * @generated from enum value: FeedbackRequested = 7;
38
+ */
39
+ FeedbackRequested = 7,
40
+ /**
41
+ * @generated from enum value: FeedbackReceived = 8;
42
+ */
43
+ FeedbackReceived = 8,
44
+ /**
45
+ * @generated from enum value: BookmarkAdded = 9;
46
+ */
47
+ BookmarkAdded = 9,
48
+ /**
49
+ * @generated from enum value: BookmarkDeleted = 10;
50
+ */
51
+ BookmarkDeleted = 10
52
+ }
53
+ /**
54
+ * @generated from message engagement.Event
55
+ */
56
+ declare class Event extends Message<Event> {
57
+ /**
58
+ * @generated from field: string user_id = 1;
59
+ */
60
+ userId: string;
61
+ /**
62
+ * @generated from field: string post_id = 2;
63
+ */
64
+ postId: string;
65
+ /**
66
+ * @generated from field: engagement.Action action = 3;
67
+ */
68
+ action: Action;
69
+ /**
70
+ * @generated from field: bytes options = 4;
71
+ */
72
+ options: Uint8Array;
73
+ /**
74
+ * @generated from field: google.protobuf.Timestamp d_insert = 5;
75
+ */
76
+ dInsert?: Timestamp;
77
+ constructor(data?: PartialMessage<Event>);
78
+ static readonly runtime: typeof proto3;
79
+ static readonly typeName = "engagement.Event";
80
+ static readonly fields: FieldList;
81
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): Event;
82
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): Event;
83
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): Event;
84
+ static equals(a: Event | PlainMessage<Event> | undefined, b: Event | PlainMessage<Event> | undefined): boolean;
85
+ }
86
+ /**
87
+ * @generated from message engagement.GetUserEventRequest
88
+ */
89
+ declare class GetUserEventRequest extends Message<GetUserEventRequest> {
90
+ /**
91
+ * @generated from field: string user_id = 1;
92
+ */
93
+ userId: string;
94
+ /**
95
+ * @generated from field: repeated engagement.Action actions = 2;
96
+ */
97
+ actions: Action[];
98
+ /**
99
+ * @generated from field: optional uint32 days = 3;
100
+ */
101
+ days?: number;
102
+ constructor(data?: PartialMessage<GetUserEventRequest>);
103
+ static readonly runtime: typeof proto3;
104
+ static readonly typeName = "engagement.GetUserEventRequest";
105
+ static readonly fields: FieldList;
106
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): GetUserEventRequest;
107
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): GetUserEventRequest;
108
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): GetUserEventRequest;
109
+ static equals(a: GetUserEventRequest | PlainMessage<GetUserEventRequest> | undefined, b: GetUserEventRequest | PlainMessage<GetUserEventRequest> | undefined): boolean;
110
+ }
111
+ /**
112
+ * @generated from message engagement.GetUserEventResponse
113
+ */
114
+ declare class GetUserEventResponse extends Message<GetUserEventResponse> {
115
+ /**
116
+ * @generated from field: repeated engagement.Event result = 1;
117
+ */
118
+ result: Event[];
119
+ /**
120
+ * @generated from field: repeated util.Error error = 2;
121
+ */
122
+ error: Error[];
123
+ constructor(data?: PartialMessage<GetUserEventResponse>);
124
+ static readonly runtime: typeof proto3;
125
+ static readonly typeName = "engagement.GetUserEventResponse";
126
+ static readonly fields: FieldList;
127
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): GetUserEventResponse;
128
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): GetUserEventResponse;
129
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): GetUserEventResponse;
130
+ static equals(a: GetUserEventResponse | PlainMessage<GetUserEventResponse> | undefined, b: GetUserEventResponse | PlainMessage<GetUserEventResponse> | undefined): boolean;
131
+ }
132
+
133
+ export { Action, Event, GetUserEventRequest, GetUserEventResponse };
@@ -0,0 +1,133 @@
1
+ import { Message, Timestamp, PartialMessage, proto3, FieldList, BinaryReadOptions, JsonValue, JsonReadOptions, PlainMessage } from '@bufbuild/protobuf';
2
+ import { Error } from '../../util/error_pb.js';
3
+
4
+ /**
5
+ * @generated from enum engagement.Action
6
+ */
7
+ declare enum Action {
8
+ /**
9
+ * @generated from enum value: View = 0;
10
+ */
11
+ View = 0,
12
+ /**
13
+ * @generated from enum value: Click = 1;
14
+ */
15
+ Click = 1,
16
+ /**
17
+ * @generated from enum value: Comment = 2;
18
+ */
19
+ Comment = 2,
20
+ /**
21
+ * @generated from enum value: UpVote = 3;
22
+ */
23
+ UpVote = 3,
24
+ /**
25
+ * @generated from enum value: DownVote = 4;
26
+ */
27
+ DownVote = 4,
28
+ /**
29
+ * @generated from enum value: RemoveUpVote = 5;
30
+ */
31
+ RemoveUpVote = 5,
32
+ /**
33
+ * @generated from enum value: RemoveDownVote = 6;
34
+ */
35
+ RemoveDownVote = 6,
36
+ /**
37
+ * @generated from enum value: FeedbackRequested = 7;
38
+ */
39
+ FeedbackRequested = 7,
40
+ /**
41
+ * @generated from enum value: FeedbackReceived = 8;
42
+ */
43
+ FeedbackReceived = 8,
44
+ /**
45
+ * @generated from enum value: BookmarkAdded = 9;
46
+ */
47
+ BookmarkAdded = 9,
48
+ /**
49
+ * @generated from enum value: BookmarkDeleted = 10;
50
+ */
51
+ BookmarkDeleted = 10
52
+ }
53
+ /**
54
+ * @generated from message engagement.Event
55
+ */
56
+ declare class Event extends Message<Event> {
57
+ /**
58
+ * @generated from field: string user_id = 1;
59
+ */
60
+ userId: string;
61
+ /**
62
+ * @generated from field: string post_id = 2;
63
+ */
64
+ postId: string;
65
+ /**
66
+ * @generated from field: engagement.Action action = 3;
67
+ */
68
+ action: Action;
69
+ /**
70
+ * @generated from field: bytes options = 4;
71
+ */
72
+ options: Uint8Array;
73
+ /**
74
+ * @generated from field: google.protobuf.Timestamp d_insert = 5;
75
+ */
76
+ dInsert?: Timestamp;
77
+ constructor(data?: PartialMessage<Event>);
78
+ static readonly runtime: typeof proto3;
79
+ static readonly typeName = "engagement.Event";
80
+ static readonly fields: FieldList;
81
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): Event;
82
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): Event;
83
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): Event;
84
+ static equals(a: Event | PlainMessage<Event> | undefined, b: Event | PlainMessage<Event> | undefined): boolean;
85
+ }
86
+ /**
87
+ * @generated from message engagement.GetUserEventRequest
88
+ */
89
+ declare class GetUserEventRequest extends Message<GetUserEventRequest> {
90
+ /**
91
+ * @generated from field: string user_id = 1;
92
+ */
93
+ userId: string;
94
+ /**
95
+ * @generated from field: repeated engagement.Action actions = 2;
96
+ */
97
+ actions: Action[];
98
+ /**
99
+ * @generated from field: optional uint32 days = 3;
100
+ */
101
+ days?: number;
102
+ constructor(data?: PartialMessage<GetUserEventRequest>);
103
+ static readonly runtime: typeof proto3;
104
+ static readonly typeName = "engagement.GetUserEventRequest";
105
+ static readonly fields: FieldList;
106
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): GetUserEventRequest;
107
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): GetUserEventRequest;
108
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): GetUserEventRequest;
109
+ static equals(a: GetUserEventRequest | PlainMessage<GetUserEventRequest> | undefined, b: GetUserEventRequest | PlainMessage<GetUserEventRequest> | undefined): boolean;
110
+ }
111
+ /**
112
+ * @generated from message engagement.GetUserEventResponse
113
+ */
114
+ declare class GetUserEventResponse extends Message<GetUserEventResponse> {
115
+ /**
116
+ * @generated from field: repeated engagement.Event result = 1;
117
+ */
118
+ result: Event[];
119
+ /**
120
+ * @generated from field: repeated util.Error error = 2;
121
+ */
122
+ error: Error[];
123
+ constructor(data?: PartialMessage<GetUserEventResponse>);
124
+ static readonly runtime: typeof proto3;
125
+ static readonly typeName = "engagement.GetUserEventResponse";
126
+ static readonly fields: FieldList;
127
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): GetUserEventResponse;
128
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): GetUserEventResponse;
129
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): GetUserEventResponse;
130
+ static equals(a: GetUserEventResponse | PlainMessage<GetUserEventResponse> | undefined, b: GetUserEventResponse | PlainMessage<GetUserEventResponse> | undefined): boolean;
131
+ }
132
+
133
+ export { Action, Event, GetUserEventRequest, GetUserEventResponse };
@@ -0,0 +1,175 @@
1
+ import { Message, proto3, Timestamp } from "@bufbuild/protobuf";
2
+ import { Error } from "../../util/error_pb.js";
3
+ var Action = /* @__PURE__ */ ((Action2) => {
4
+ Action2[Action2["View"] = 0] = "View";
5
+ Action2[Action2["Click"] = 1] = "Click";
6
+ Action2[Action2["Comment"] = 2] = "Comment";
7
+ Action2[Action2["UpVote"] = 3] = "UpVote";
8
+ Action2[Action2["DownVote"] = 4] = "DownVote";
9
+ Action2[Action2["RemoveUpVote"] = 5] = "RemoveUpVote";
10
+ Action2[Action2["RemoveDownVote"] = 6] = "RemoveDownVote";
11
+ Action2[Action2["FeedbackRequested"] = 7] = "FeedbackRequested";
12
+ Action2[Action2["FeedbackReceived"] = 8] = "FeedbackReceived";
13
+ Action2[Action2["BookmarkAdded"] = 9] = "BookmarkAdded";
14
+ Action2[Action2["BookmarkDeleted"] = 10] = "BookmarkDeleted";
15
+ return Action2;
16
+ })(Action || {});
17
+ proto3.util.setEnumType(Action, "engagement.Action", [
18
+ { no: 0, name: "View" },
19
+ { no: 1, name: "Click" },
20
+ { no: 2, name: "Comment" },
21
+ { no: 3, name: "UpVote" },
22
+ { no: 4, name: "DownVote" },
23
+ { no: 5, name: "RemoveUpVote" },
24
+ { no: 6, name: "RemoveDownVote" },
25
+ { no: 7, name: "FeedbackRequested" },
26
+ { no: 8, name: "FeedbackReceived" },
27
+ { no: 9, name: "BookmarkAdded" },
28
+ { no: 10, name: "BookmarkDeleted" }
29
+ ]);
30
+ class Event extends Message {
31
+ /**
32
+ * @generated from field: string user_id = 1;
33
+ */
34
+ userId = "";
35
+ /**
36
+ * @generated from field: string post_id = 2;
37
+ */
38
+ postId = "";
39
+ /**
40
+ * @generated from field: engagement.Action action = 3;
41
+ */
42
+ action = 0 /* View */;
43
+ /**
44
+ * @generated from field: bytes options = 4;
45
+ */
46
+ options = new Uint8Array(0);
47
+ /**
48
+ * @generated from field: google.protobuf.Timestamp d_insert = 5;
49
+ */
50
+ dInsert;
51
+ constructor(data) {
52
+ super();
53
+ proto3.util.initPartial(data, this);
54
+ }
55
+ static runtime = proto3;
56
+ static typeName = "engagement.Event";
57
+ static fields = proto3.util.newFieldList(() => [
58
+ {
59
+ no: 1,
60
+ name: "user_id",
61
+ kind: "scalar",
62
+ T: 9
63
+ /* ScalarType.STRING */
64
+ },
65
+ {
66
+ no: 2,
67
+ name: "post_id",
68
+ kind: "scalar",
69
+ T: 9
70
+ /* ScalarType.STRING */
71
+ },
72
+ { no: 3, name: "action", kind: "enum", T: proto3.getEnumType(Action) },
73
+ {
74
+ no: 4,
75
+ name: "options",
76
+ kind: "scalar",
77
+ T: 12
78
+ /* ScalarType.BYTES */
79
+ },
80
+ { no: 5, name: "d_insert", kind: "message", T: Timestamp }
81
+ ]);
82
+ static fromBinary(bytes, options) {
83
+ return new Event().fromBinary(bytes, options);
84
+ }
85
+ static fromJson(jsonValue, options) {
86
+ return new Event().fromJson(jsonValue, options);
87
+ }
88
+ static fromJsonString(jsonString, options) {
89
+ return new Event().fromJsonString(jsonString, options);
90
+ }
91
+ static equals(a, b) {
92
+ return proto3.util.equals(Event, a, b);
93
+ }
94
+ }
95
+ class GetUserEventRequest extends Message {
96
+ /**
97
+ * @generated from field: string user_id = 1;
98
+ */
99
+ userId = "";
100
+ /**
101
+ * @generated from field: repeated engagement.Action actions = 2;
102
+ */
103
+ actions = [];
104
+ /**
105
+ * @generated from field: optional uint32 days = 3;
106
+ */
107
+ days;
108
+ constructor(data) {
109
+ super();
110
+ proto3.util.initPartial(data, this);
111
+ }
112
+ static runtime = proto3;
113
+ static typeName = "engagement.GetUserEventRequest";
114
+ static fields = proto3.util.newFieldList(() => [
115
+ {
116
+ no: 1,
117
+ name: "user_id",
118
+ kind: "scalar",
119
+ T: 9
120
+ /* ScalarType.STRING */
121
+ },
122
+ { no: 2, name: "actions", kind: "enum", T: proto3.getEnumType(Action), repeated: true },
123
+ { no: 3, name: "days", kind: "scalar", T: 13, opt: true }
124
+ ]);
125
+ static fromBinary(bytes, options) {
126
+ return new GetUserEventRequest().fromBinary(bytes, options);
127
+ }
128
+ static fromJson(jsonValue, options) {
129
+ return new GetUserEventRequest().fromJson(jsonValue, options);
130
+ }
131
+ static fromJsonString(jsonString, options) {
132
+ return new GetUserEventRequest().fromJsonString(jsonString, options);
133
+ }
134
+ static equals(a, b) {
135
+ return proto3.util.equals(GetUserEventRequest, a, b);
136
+ }
137
+ }
138
+ class GetUserEventResponse extends Message {
139
+ /**
140
+ * @generated from field: repeated engagement.Event result = 1;
141
+ */
142
+ result = [];
143
+ /**
144
+ * @generated from field: repeated util.Error error = 2;
145
+ */
146
+ error = [];
147
+ constructor(data) {
148
+ super();
149
+ proto3.util.initPartial(data, this);
150
+ }
151
+ static runtime = proto3;
152
+ static typeName = "engagement.GetUserEventResponse";
153
+ static fields = proto3.util.newFieldList(() => [
154
+ { no: 1, name: "result", kind: "message", T: Event, repeated: true },
155
+ { no: 2, name: "error", kind: "message", T: Error, repeated: true }
156
+ ]);
157
+ static fromBinary(bytes, options) {
158
+ return new GetUserEventResponse().fromBinary(bytes, options);
159
+ }
160
+ static fromJson(jsonValue, options) {
161
+ return new GetUserEventResponse().fromJson(jsonValue, options);
162
+ }
163
+ static fromJsonString(jsonString, options) {
164
+ return new GetUserEventResponse().fromJsonString(jsonString, options);
165
+ }
166
+ static equals(a, b) {
167
+ return proto3.util.equals(GetUserEventResponse, a, b);
168
+ }
169
+ }
170
+ export {
171
+ Action,
172
+ Event,
173
+ GetUserEventRequest,
174
+ GetUserEventResponse
175
+ };