@dailydotdev/schema 0.2.6 → 0.2.7
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/bragi/pipelines_connect.cjs +1 -1
- package/dist/bragi/pipelines_connect.d.cts +45 -1
- package/dist/bragi/pipelines_connect.d.ts +45 -1
- package/dist/bragi/pipelines_connect.js +1 -1
- package/dist/bragi/pipelines_pb.cjs +1 -1
- package/dist/bragi/pipelines_pb.d.cts +182 -1
- package/dist/bragi/pipelines_pb.d.ts +182 -1
- package/dist/bragi/pipelines_pb.js +1 -1
- package/dist/bragi/proxy_connect.cjs +1 -1
- package/dist/bragi/proxy_connect.d.cts +12 -1
- package/dist/bragi/proxy_connect.d.ts +12 -1
- package/dist/bragi/proxy_connect.js +1 -1
- package/dist/bragi/proxy_pb.cjs +1 -1
- package/dist/bragi/proxy_pb.d.cts +119 -1
- package/dist/bragi/proxy_pb.d.ts +119 -1
- package/dist/bragi/proxy_pb.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +4 -2
- package/dist/index.d.ts +4 -2
- package/dist/index.js +1 -1
- package/dist/njord/transactions_connect.cjs +1 -0
- package/dist/njord/transactions_connect.d.cts +31 -0
- package/dist/njord/transactions_connect.d.ts +31 -0
- package/dist/njord/transactions_connect.js +1 -0
- package/dist/njord/transactions_pb.cjs +1 -0
- package/dist/njord/transactions_pb.d.cts +297 -0
- package/dist/njord/transactions_pb.d.ts +297 -0
- package/dist/njord/transactions_pb.js +1 -0
- package/dist/snotra/engagement/engagement_pb.cjs +1 -1
- package/dist/snotra/engagement/engagement_pb.d.cts +13 -1
- package/dist/snotra/engagement/engagement_pb.d.ts +13 -1
- package/dist/snotra/engagement/engagement_pb.js +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var t,n=Object.defineProperty,e=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,a=Object.prototype.hasOwnProperty,o={};((t,e)=>{for(var r in e)n(t,r,{get:e[r],enumerable:!0})})(o,{BalanceChange:()=>d,Currency:()=>i,EntityType:()=>u,GetBalanceRequest:()=>y,GetBalanceResponse:()=>T,TransactionLogEntry:()=>g,TransferParticipant:()=>m,TransferRequest:()=>l,TransferResponse:()=>f,TransferType:()=>c,UserAccount:()=>p}),module.exports=(t=o,((t,o,s,i)=>{if(o&&"object"==typeof o||"function"==typeof o)for(let c of r(o))a.call(t,c)||c===s||n(t,c,{get:()=>o[c],enumerable:!(i=e(o,c))||i.enumerable});return t})(n({},"__esModule",{value:!0}),t));var s=require("@bufbuild/protobuf"),i=(t=>(t[t.CORES=0]="CORES",t))(i||{});s.proto3.util.setEnumType(i,"njord.transactions.Currency",[{no:0,name:"CORES"}]);var c=(t=>(t[t.TRANSFER=0]="TRANSFER",t))(c||{});s.proto3.util.setEnumType(c,"njord.transactions.TransferType",[{no:0,name:"TRANSFER"}]);var u=(t=>(t[t.SYSTEM=0]="SYSTEM",t[t.USER=1]="USER",t))(u||{});s.proto3.util.setEnumType(u,"njord.transactions.EntityType",[{no:0,name:"SYSTEM"},{no:1,name:"USER"}]);class m extends s.Message{type=0;id="";constructor(t){super(),s.proto3.util.initPartial(t,this)}static runtime=s.proto3;static typeName="njord.transactions.TransferParticipant";static fields=s.proto3.util.newFieldList((()=>[{no:1,name:"type",kind:"enum",T:s.proto3.getEnumType(u)},{no:2,name:"id",kind:"scalar",T:9}]));static fromBinary(t,n){return(new m).fromBinary(t,n)}static fromJson(t,n){return(new m).fromJson(t,n)}static fromJsonString(t,n){return(new m).fromJsonString(t,n)}static equals(t,n){return s.proto3.util.equals(m,t,n)}}class l extends s.Message{idempotencyKey="";sender;receiver;currency=0;amount=s.protoInt64.zero;transferType=0;description="";allowNegative=!1;constructor(t){super(),s.proto3.util.initPartial(t,this)}static runtime=s.proto3;static typeName="njord.transactions.TransferRequest";static fields=s.proto3.util.newFieldList((()=>[{no:1,name:"idempotency_key",kind:"scalar",T:9},{no:2,name:"sender",kind:"message",T:m},{no:3,name:"receiver",kind:"message",T:m},{no:4,name:"currency",kind:"enum",T:s.proto3.getEnumType(i)},{no:5,name:"amount",kind:"scalar",T:3},{no:6,name:"transfer_type",kind:"enum",T:s.proto3.getEnumType(c)},{no:7,name:"description",kind:"scalar",T:9},{no:9,name:"allow_negative",kind:"scalar",T:8}]));static fromBinary(t,n){return(new l).fromBinary(t,n)}static fromJson(t,n){return(new l).fromJson(t,n)}static fromJsonString(t,n){return(new l).fromJsonString(t,n)}static equals(t,n){return s.proto3.util.equals(l,t,n)}}class p extends s.Message{userId="";currency=0;constructor(t){super(),s.proto3.util.initPartial(t,this)}static runtime=s.proto3;static typeName="njord.transactions.UserAccount";static fields=s.proto3.util.newFieldList((()=>[{no:1,name:"user_id",kind:"scalar",T:9},{no:2,name:"currency",kind:"enum",T:s.proto3.getEnumType(i)}]));static fromBinary(t,n){return(new p).fromBinary(t,n)}static fromJson(t,n){return(new p).fromJson(t,n)}static fromJsonString(t,n){return(new p).fromJsonString(t,n)}static equals(t,n){return s.proto3.util.equals(p,t,n)}}class d extends s.Message{account;previousBalance=s.protoInt64.zero;newBalance=s.protoInt64.zero;changeAmount=s.protoInt64.zero;constructor(t){super(),s.proto3.util.initPartial(t,this)}static runtime=s.proto3;static typeName="njord.transactions.BalanceChange";static fields=s.proto3.util.newFieldList((()=>[{no:1,name:"account",kind:"message",T:p},{no:2,name:"previous_balance",kind:"scalar",T:3},{no:3,name:"new_balance",kind:"scalar",T:3},{no:4,name:"change_amount",kind:"scalar",T:3}]));static fromBinary(t,n){return(new d).fromBinary(t,n)}static fromJson(t,n){return(new d).fromJson(t,n)}static fromJsonString(t,n){return(new d).fromJsonString(t,n)}static equals(t,n){return s.proto3.util.equals(d,t,n)}}class f extends s.Message{idempotencyKey="";senderBalance;receiverBalance;timestamp=s.protoInt64.zero;constructor(t){super(),s.proto3.util.initPartial(t,this)}static runtime=s.proto3;static typeName="njord.transactions.TransferResponse";static fields=s.proto3.util.newFieldList((()=>[{no:1,name:"idempotency_key",kind:"scalar",T:9},{no:2,name:"sender_balance",kind:"message",T:d},{no:3,name:"receiver_balance",kind:"message",T:d},{no:4,name:"timestamp",kind:"scalar",T:3}]));static fromBinary(t,n){return(new f).fromBinary(t,n)}static fromJson(t,n){return(new f).fromJson(t,n)}static fromJsonString(t,n){return(new f).fromJsonString(t,n)}static equals(t,n){return s.proto3.util.equals(f,t,n)}}class y extends s.Message{account;constructor(t){super(),s.proto3.util.initPartial(t,this)}static runtime=s.proto3;static typeName="njord.transactions.GetBalanceRequest";static fields=s.proto3.util.newFieldList((()=>[{no:1,name:"account",kind:"message",T:p}]));static fromBinary(t,n){return(new y).fromBinary(t,n)}static fromJson(t,n){return(new y).fromJson(t,n)}static fromJsonString(t,n){return(new y).fromJsonString(t,n)}static equals(t,n){return s.proto3.util.equals(y,t,n)}}class T extends s.Message{amount=s.protoInt64.zero;constructor(t){super(),s.proto3.util.initPartial(t,this)}static runtime=s.proto3;static typeName="njord.transactions.GetBalanceResponse";static fields=s.proto3.util.newFieldList((()=>[{no:1,name:"amount",kind:"scalar",T:3}]));static fromBinary(t,n){return(new T).fromBinary(t,n)}static fromJson(t,n){return(new T).fromJson(t,n)}static fromJsonString(t,n){return(new T).fromJsonString(t,n)}static equals(t,n){return s.proto3.util.equals(T,t,n)}}class g extends s.Message{transactionId="";userId="";currency=0;amount=s.protoInt64.zero;previousBalance=s.protoInt64.zero;currentBalance=s.protoInt64.zero;transferType=0;description="";timestamp=s.protoInt64.zero;constructor(t){super(),s.proto3.util.initPartial(t,this)}static runtime=s.proto3;static typeName="njord.transactions.TransactionLogEntry";static fields=s.proto3.util.newFieldList((()=>[{no:1,name:"transaction_id",kind:"scalar",T:9},{no:2,name:"user_id",kind:"scalar",T:9},{no:3,name:"currency",kind:"enum",T:s.proto3.getEnumType(i)},{no:4,name:"amount",kind:"scalar",T:3},{no:5,name:"previous_balance",kind:"scalar",T:3},{no:6,name:"current_balance",kind:"scalar",T:3},{no:7,name:"transfer_type",kind:"enum",T:s.proto3.getEnumType(c)},{no:8,name:"description",kind:"scalar",T:9},{no:9,name:"timestamp",kind:"scalar",T:3}]));static fromBinary(t,n){return(new g).fromBinary(t,n)}static fromJson(t,n){return(new g).fromJson(t,n)}static fromJsonString(t,n){return(new g).fromJsonString(t,n)}static equals(t,n){return s.proto3.util.equals(g,t,n)}}
|
|
@@ -0,0 +1,297 @@
|
|
|
1
|
+
import { Message, PartialMessage, proto3, FieldList, BinaryReadOptions, JsonValue, JsonReadOptions, PlainMessage } from '@bufbuild/protobuf';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @generated from enum njord.transactions.Currency
|
|
5
|
+
*/
|
|
6
|
+
declare enum Currency {
|
|
7
|
+
/**
|
|
8
|
+
* only one kind of currency for now
|
|
9
|
+
*
|
|
10
|
+
* @generated from enum value: CORES = 0;
|
|
11
|
+
*/
|
|
12
|
+
CORES = 0
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* @generated from enum njord.transactions.TransferType
|
|
16
|
+
*/
|
|
17
|
+
declare enum TransferType {
|
|
18
|
+
/**
|
|
19
|
+
* just generic transfer for now
|
|
20
|
+
*
|
|
21
|
+
* @generated from enum value: TRANSFER = 0;
|
|
22
|
+
*/
|
|
23
|
+
TRANSFER = 0
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* @generated from enum njord.transactions.EntityType
|
|
27
|
+
*/
|
|
28
|
+
declare enum EntityType {
|
|
29
|
+
/**
|
|
30
|
+
* can give or receive currency, but does not have associated account
|
|
31
|
+
*
|
|
32
|
+
* @generated from enum value: SYSTEM = 0;
|
|
33
|
+
*/
|
|
34
|
+
SYSTEM = 0,
|
|
35
|
+
/**
|
|
36
|
+
* @generated from enum value: USER = 1;
|
|
37
|
+
*/
|
|
38
|
+
USER = 1
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* @generated from message njord.transactions.TransferParticipant
|
|
42
|
+
*/
|
|
43
|
+
declare class TransferParticipant extends Message<TransferParticipant> {
|
|
44
|
+
/**
|
|
45
|
+
* @generated from field: njord.transactions.EntityType type = 1;
|
|
46
|
+
*/
|
|
47
|
+
type: EntityType;
|
|
48
|
+
/**
|
|
49
|
+
* user id
|
|
50
|
+
*
|
|
51
|
+
* @generated from field: string id = 2;
|
|
52
|
+
*/
|
|
53
|
+
id: string;
|
|
54
|
+
constructor(data?: PartialMessage<TransferParticipant>);
|
|
55
|
+
static readonly runtime: typeof proto3;
|
|
56
|
+
static readonly typeName = "njord.transactions.TransferParticipant";
|
|
57
|
+
static readonly fields: FieldList;
|
|
58
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): TransferParticipant;
|
|
59
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): TransferParticipant;
|
|
60
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): TransferParticipant;
|
|
61
|
+
static equals(a: TransferParticipant | PlainMessage<TransferParticipant> | undefined, b: TransferParticipant | PlainMessage<TransferParticipant> | undefined): boolean;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* @generated from message njord.transactions.TransferRequest
|
|
65
|
+
*/
|
|
66
|
+
declare class TransferRequest extends Message<TransferRequest> {
|
|
67
|
+
/**
|
|
68
|
+
* id to insure operation idempotency (UUID)
|
|
69
|
+
*
|
|
70
|
+
* @generated from field: string idempotency_key = 1;
|
|
71
|
+
*/
|
|
72
|
+
idempotencyKey: string;
|
|
73
|
+
/**
|
|
74
|
+
* user sending currency
|
|
75
|
+
*
|
|
76
|
+
* @generated from field: njord.transactions.TransferParticipant sender = 2;
|
|
77
|
+
*/
|
|
78
|
+
sender?: TransferParticipant;
|
|
79
|
+
/**
|
|
80
|
+
* user receiving currency
|
|
81
|
+
*
|
|
82
|
+
* @generated from field: njord.transactions.TransferParticipant receiver = 3;
|
|
83
|
+
*/
|
|
84
|
+
receiver?: TransferParticipant;
|
|
85
|
+
/**
|
|
86
|
+
* @generated from field: njord.transactions.Currency currency = 4;
|
|
87
|
+
*/
|
|
88
|
+
currency: Currency;
|
|
89
|
+
/**
|
|
90
|
+
* Amount of change in the balance (could be positive or negative)
|
|
91
|
+
*
|
|
92
|
+
* @generated from field: int64 amount = 5;
|
|
93
|
+
*/
|
|
94
|
+
amount: any;
|
|
95
|
+
/**
|
|
96
|
+
* Type of change (e.g., "deposit", "withdrawal"). It is not limited to above values and can be any kind of label, like "promotion_reward" or "admin_action".
|
|
97
|
+
*
|
|
98
|
+
* @generated from field: njord.transactions.TransferType transfer_type = 6;
|
|
99
|
+
*/
|
|
100
|
+
transferType: TransferType;
|
|
101
|
+
/**
|
|
102
|
+
* Free form description
|
|
103
|
+
*
|
|
104
|
+
* @generated from field: string description = 7;
|
|
105
|
+
*/
|
|
106
|
+
description: string;
|
|
107
|
+
/**
|
|
108
|
+
* flag to allow credited account to become negative. Default false
|
|
109
|
+
*
|
|
110
|
+
* @generated from field: bool allow_negative = 9;
|
|
111
|
+
*/
|
|
112
|
+
allowNegative: boolean;
|
|
113
|
+
constructor(data?: PartialMessage<TransferRequest>);
|
|
114
|
+
static readonly runtime: typeof proto3;
|
|
115
|
+
static readonly typeName = "njord.transactions.TransferRequest";
|
|
116
|
+
static readonly fields: FieldList;
|
|
117
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): TransferRequest;
|
|
118
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): TransferRequest;
|
|
119
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): TransferRequest;
|
|
120
|
+
static equals(a: TransferRequest | PlainMessage<TransferRequest> | undefined, b: TransferRequest | PlainMessage<TransferRequest> | undefined): boolean;
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* @generated from message njord.transactions.UserAccount
|
|
124
|
+
*/
|
|
125
|
+
declare class UserAccount extends Message<UserAccount> {
|
|
126
|
+
/**
|
|
127
|
+
* @generated from field: string user_id = 1;
|
|
128
|
+
*/
|
|
129
|
+
userId: string;
|
|
130
|
+
/**
|
|
131
|
+
* @generated from field: njord.transactions.Currency currency = 2;
|
|
132
|
+
*/
|
|
133
|
+
currency: Currency;
|
|
134
|
+
constructor(data?: PartialMessage<UserAccount>);
|
|
135
|
+
static readonly runtime: typeof proto3;
|
|
136
|
+
static readonly typeName = "njord.transactions.UserAccount";
|
|
137
|
+
static readonly fields: FieldList;
|
|
138
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): UserAccount;
|
|
139
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): UserAccount;
|
|
140
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): UserAccount;
|
|
141
|
+
static equals(a: UserAccount | PlainMessage<UserAccount> | undefined, b: UserAccount | PlainMessage<UserAccount> | undefined): boolean;
|
|
142
|
+
}
|
|
143
|
+
/**
|
|
144
|
+
* @generated from message njord.transactions.BalanceChange
|
|
145
|
+
*/
|
|
146
|
+
declare class BalanceChange extends Message<BalanceChange> {
|
|
147
|
+
/**
|
|
148
|
+
* @generated from field: njord.transactions.UserAccount account = 1;
|
|
149
|
+
*/
|
|
150
|
+
account?: UserAccount;
|
|
151
|
+
/**
|
|
152
|
+
* Balance before the update
|
|
153
|
+
*
|
|
154
|
+
* @generated from field: int64 previous_balance = 2;
|
|
155
|
+
*/
|
|
156
|
+
previousBalance: any;
|
|
157
|
+
/**
|
|
158
|
+
* Balance after the update
|
|
159
|
+
*
|
|
160
|
+
* @generated from field: int64 new_balance = 3;
|
|
161
|
+
*/
|
|
162
|
+
newBalance: any;
|
|
163
|
+
/**
|
|
164
|
+
* Amount of change in the balance (could be positive or negative)
|
|
165
|
+
*
|
|
166
|
+
* @generated from field: int64 change_amount = 4;
|
|
167
|
+
*/
|
|
168
|
+
changeAmount: any;
|
|
169
|
+
constructor(data?: PartialMessage<BalanceChange>);
|
|
170
|
+
static readonly runtime: typeof proto3;
|
|
171
|
+
static readonly typeName = "njord.transactions.BalanceChange";
|
|
172
|
+
static readonly fields: FieldList;
|
|
173
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): BalanceChange;
|
|
174
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): BalanceChange;
|
|
175
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): BalanceChange;
|
|
176
|
+
static equals(a: BalanceChange | PlainMessage<BalanceChange> | undefined, b: BalanceChange | PlainMessage<BalanceChange> | undefined): boolean;
|
|
177
|
+
}
|
|
178
|
+
/**
|
|
179
|
+
* @generated from message njord.transactions.TransferResponse
|
|
180
|
+
*/
|
|
181
|
+
declare class TransferResponse extends Message<TransferResponse> {
|
|
182
|
+
/**
|
|
183
|
+
* @generated from field: string idempotency_key = 1;
|
|
184
|
+
*/
|
|
185
|
+
idempotencyKey: string;
|
|
186
|
+
/**
|
|
187
|
+
* @generated from field: njord.transactions.BalanceChange sender_balance = 2;
|
|
188
|
+
*/
|
|
189
|
+
senderBalance?: BalanceChange;
|
|
190
|
+
/**
|
|
191
|
+
* @generated from field: njord.transactions.BalanceChange receiver_balance = 3;
|
|
192
|
+
*/
|
|
193
|
+
receiverBalance?: BalanceChange;
|
|
194
|
+
/**
|
|
195
|
+
* @generated from field: int64 timestamp = 4;
|
|
196
|
+
*/
|
|
197
|
+
timestamp: any;
|
|
198
|
+
constructor(data?: PartialMessage<TransferResponse>);
|
|
199
|
+
static readonly runtime: typeof proto3;
|
|
200
|
+
static readonly typeName = "njord.transactions.TransferResponse";
|
|
201
|
+
static readonly fields: FieldList;
|
|
202
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): TransferResponse;
|
|
203
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): TransferResponse;
|
|
204
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): TransferResponse;
|
|
205
|
+
static equals(a: TransferResponse | PlainMessage<TransferResponse> | undefined, b: TransferResponse | PlainMessage<TransferResponse> | undefined): boolean;
|
|
206
|
+
}
|
|
207
|
+
/**
|
|
208
|
+
* @generated from message njord.transactions.GetBalanceRequest
|
|
209
|
+
*/
|
|
210
|
+
declare class GetBalanceRequest extends Message<GetBalanceRequest> {
|
|
211
|
+
/**
|
|
212
|
+
* @generated from field: njord.transactions.UserAccount account = 1;
|
|
213
|
+
*/
|
|
214
|
+
account?: UserAccount;
|
|
215
|
+
constructor(data?: PartialMessage<GetBalanceRequest>);
|
|
216
|
+
static readonly runtime: typeof proto3;
|
|
217
|
+
static readonly typeName = "njord.transactions.GetBalanceRequest";
|
|
218
|
+
static readonly fields: FieldList;
|
|
219
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): GetBalanceRequest;
|
|
220
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): GetBalanceRequest;
|
|
221
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): GetBalanceRequest;
|
|
222
|
+
static equals(a: GetBalanceRequest | PlainMessage<GetBalanceRequest> | undefined, b: GetBalanceRequest | PlainMessage<GetBalanceRequest> | undefined): boolean;
|
|
223
|
+
}
|
|
224
|
+
/**
|
|
225
|
+
* @generated from message njord.transactions.GetBalanceResponse
|
|
226
|
+
*/
|
|
227
|
+
declare class GetBalanceResponse extends Message<GetBalanceResponse> {
|
|
228
|
+
/**
|
|
229
|
+
* Current amount
|
|
230
|
+
*
|
|
231
|
+
* @generated from field: int64 amount = 1;
|
|
232
|
+
*/
|
|
233
|
+
amount: any;
|
|
234
|
+
constructor(data?: PartialMessage<GetBalanceResponse>);
|
|
235
|
+
static readonly runtime: typeof proto3;
|
|
236
|
+
static readonly typeName = "njord.transactions.GetBalanceResponse";
|
|
237
|
+
static readonly fields: FieldList;
|
|
238
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): GetBalanceResponse;
|
|
239
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): GetBalanceResponse;
|
|
240
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): GetBalanceResponse;
|
|
241
|
+
static equals(a: GetBalanceResponse | PlainMessage<GetBalanceResponse> | undefined, b: GetBalanceResponse | PlainMessage<GetBalanceResponse> | undefined): boolean;
|
|
242
|
+
}
|
|
243
|
+
/**
|
|
244
|
+
* @generated from message njord.transactions.TransactionLogEntry
|
|
245
|
+
*/
|
|
246
|
+
declare class TransactionLogEntry extends Message<TransactionLogEntry> {
|
|
247
|
+
/**
|
|
248
|
+
* unique identifier based on transfer id and user
|
|
249
|
+
*
|
|
250
|
+
* @generated from field: string transaction_id = 1;
|
|
251
|
+
*/
|
|
252
|
+
transactionId: string;
|
|
253
|
+
/**
|
|
254
|
+
* @generated from field: string user_id = 2;
|
|
255
|
+
*/
|
|
256
|
+
userId: string;
|
|
257
|
+
/**
|
|
258
|
+
* @generated from field: njord.transactions.Currency currency = 3;
|
|
259
|
+
*/
|
|
260
|
+
currency: Currency;
|
|
261
|
+
/**
|
|
262
|
+
* @generated from field: int64 amount = 4;
|
|
263
|
+
*/
|
|
264
|
+
amount: any;
|
|
265
|
+
/**
|
|
266
|
+
* @generated from field: int64 previous_balance = 5;
|
|
267
|
+
*/
|
|
268
|
+
previousBalance: any;
|
|
269
|
+
/**
|
|
270
|
+
* @generated from field: int64 current_balance = 6;
|
|
271
|
+
*/
|
|
272
|
+
currentBalance: any;
|
|
273
|
+
/**
|
|
274
|
+
* Type of change (e.g., "deposit", "withdrawal"). It is not limited to above values and can be any kind of label, like "promotion_reward" or "admin_action".
|
|
275
|
+
*
|
|
276
|
+
* @generated from field: njord.transactions.TransferType transfer_type = 7;
|
|
277
|
+
*/
|
|
278
|
+
transferType: TransferType;
|
|
279
|
+
/**
|
|
280
|
+
* @generated from field: string description = 8;
|
|
281
|
+
*/
|
|
282
|
+
description: string;
|
|
283
|
+
/**
|
|
284
|
+
* @generated from field: int64 timestamp = 9;
|
|
285
|
+
*/
|
|
286
|
+
timestamp: any;
|
|
287
|
+
constructor(data?: PartialMessage<TransactionLogEntry>);
|
|
288
|
+
static readonly runtime: typeof proto3;
|
|
289
|
+
static readonly typeName = "njord.transactions.TransactionLogEntry";
|
|
290
|
+
static readonly fields: FieldList;
|
|
291
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): TransactionLogEntry;
|
|
292
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): TransactionLogEntry;
|
|
293
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): TransactionLogEntry;
|
|
294
|
+
static equals(a: TransactionLogEntry | PlainMessage<TransactionLogEntry> | undefined, b: TransactionLogEntry | PlainMessage<TransactionLogEntry> | undefined): boolean;
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
export { BalanceChange, Currency, EntityType, GetBalanceRequest, GetBalanceResponse, TransactionLogEntry, TransferParticipant, TransferRequest, TransferResponse, TransferType, UserAccount };
|
|
@@ -0,0 +1,297 @@
|
|
|
1
|
+
import { Message, PartialMessage, proto3, FieldList, BinaryReadOptions, JsonValue, JsonReadOptions, PlainMessage } from '@bufbuild/protobuf';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @generated from enum njord.transactions.Currency
|
|
5
|
+
*/
|
|
6
|
+
declare enum Currency {
|
|
7
|
+
/**
|
|
8
|
+
* only one kind of currency for now
|
|
9
|
+
*
|
|
10
|
+
* @generated from enum value: CORES = 0;
|
|
11
|
+
*/
|
|
12
|
+
CORES = 0
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* @generated from enum njord.transactions.TransferType
|
|
16
|
+
*/
|
|
17
|
+
declare enum TransferType {
|
|
18
|
+
/**
|
|
19
|
+
* just generic transfer for now
|
|
20
|
+
*
|
|
21
|
+
* @generated from enum value: TRANSFER = 0;
|
|
22
|
+
*/
|
|
23
|
+
TRANSFER = 0
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* @generated from enum njord.transactions.EntityType
|
|
27
|
+
*/
|
|
28
|
+
declare enum EntityType {
|
|
29
|
+
/**
|
|
30
|
+
* can give or receive currency, but does not have associated account
|
|
31
|
+
*
|
|
32
|
+
* @generated from enum value: SYSTEM = 0;
|
|
33
|
+
*/
|
|
34
|
+
SYSTEM = 0,
|
|
35
|
+
/**
|
|
36
|
+
* @generated from enum value: USER = 1;
|
|
37
|
+
*/
|
|
38
|
+
USER = 1
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* @generated from message njord.transactions.TransferParticipant
|
|
42
|
+
*/
|
|
43
|
+
declare class TransferParticipant extends Message<TransferParticipant> {
|
|
44
|
+
/**
|
|
45
|
+
* @generated from field: njord.transactions.EntityType type = 1;
|
|
46
|
+
*/
|
|
47
|
+
type: EntityType;
|
|
48
|
+
/**
|
|
49
|
+
* user id
|
|
50
|
+
*
|
|
51
|
+
* @generated from field: string id = 2;
|
|
52
|
+
*/
|
|
53
|
+
id: string;
|
|
54
|
+
constructor(data?: PartialMessage<TransferParticipant>);
|
|
55
|
+
static readonly runtime: typeof proto3;
|
|
56
|
+
static readonly typeName = "njord.transactions.TransferParticipant";
|
|
57
|
+
static readonly fields: FieldList;
|
|
58
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): TransferParticipant;
|
|
59
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): TransferParticipant;
|
|
60
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): TransferParticipant;
|
|
61
|
+
static equals(a: TransferParticipant | PlainMessage<TransferParticipant> | undefined, b: TransferParticipant | PlainMessage<TransferParticipant> | undefined): boolean;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* @generated from message njord.transactions.TransferRequest
|
|
65
|
+
*/
|
|
66
|
+
declare class TransferRequest extends Message<TransferRequest> {
|
|
67
|
+
/**
|
|
68
|
+
* id to insure operation idempotency (UUID)
|
|
69
|
+
*
|
|
70
|
+
* @generated from field: string idempotency_key = 1;
|
|
71
|
+
*/
|
|
72
|
+
idempotencyKey: string;
|
|
73
|
+
/**
|
|
74
|
+
* user sending currency
|
|
75
|
+
*
|
|
76
|
+
* @generated from field: njord.transactions.TransferParticipant sender = 2;
|
|
77
|
+
*/
|
|
78
|
+
sender?: TransferParticipant;
|
|
79
|
+
/**
|
|
80
|
+
* user receiving currency
|
|
81
|
+
*
|
|
82
|
+
* @generated from field: njord.transactions.TransferParticipant receiver = 3;
|
|
83
|
+
*/
|
|
84
|
+
receiver?: TransferParticipant;
|
|
85
|
+
/**
|
|
86
|
+
* @generated from field: njord.transactions.Currency currency = 4;
|
|
87
|
+
*/
|
|
88
|
+
currency: Currency;
|
|
89
|
+
/**
|
|
90
|
+
* Amount of change in the balance (could be positive or negative)
|
|
91
|
+
*
|
|
92
|
+
* @generated from field: int64 amount = 5;
|
|
93
|
+
*/
|
|
94
|
+
amount: any;
|
|
95
|
+
/**
|
|
96
|
+
* Type of change (e.g., "deposit", "withdrawal"). It is not limited to above values and can be any kind of label, like "promotion_reward" or "admin_action".
|
|
97
|
+
*
|
|
98
|
+
* @generated from field: njord.transactions.TransferType transfer_type = 6;
|
|
99
|
+
*/
|
|
100
|
+
transferType: TransferType;
|
|
101
|
+
/**
|
|
102
|
+
* Free form description
|
|
103
|
+
*
|
|
104
|
+
* @generated from field: string description = 7;
|
|
105
|
+
*/
|
|
106
|
+
description: string;
|
|
107
|
+
/**
|
|
108
|
+
* flag to allow credited account to become negative. Default false
|
|
109
|
+
*
|
|
110
|
+
* @generated from field: bool allow_negative = 9;
|
|
111
|
+
*/
|
|
112
|
+
allowNegative: boolean;
|
|
113
|
+
constructor(data?: PartialMessage<TransferRequest>);
|
|
114
|
+
static readonly runtime: typeof proto3;
|
|
115
|
+
static readonly typeName = "njord.transactions.TransferRequest";
|
|
116
|
+
static readonly fields: FieldList;
|
|
117
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): TransferRequest;
|
|
118
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): TransferRequest;
|
|
119
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): TransferRequest;
|
|
120
|
+
static equals(a: TransferRequest | PlainMessage<TransferRequest> | undefined, b: TransferRequest | PlainMessage<TransferRequest> | undefined): boolean;
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* @generated from message njord.transactions.UserAccount
|
|
124
|
+
*/
|
|
125
|
+
declare class UserAccount extends Message<UserAccount> {
|
|
126
|
+
/**
|
|
127
|
+
* @generated from field: string user_id = 1;
|
|
128
|
+
*/
|
|
129
|
+
userId: string;
|
|
130
|
+
/**
|
|
131
|
+
* @generated from field: njord.transactions.Currency currency = 2;
|
|
132
|
+
*/
|
|
133
|
+
currency: Currency;
|
|
134
|
+
constructor(data?: PartialMessage<UserAccount>);
|
|
135
|
+
static readonly runtime: typeof proto3;
|
|
136
|
+
static readonly typeName = "njord.transactions.UserAccount";
|
|
137
|
+
static readonly fields: FieldList;
|
|
138
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): UserAccount;
|
|
139
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): UserAccount;
|
|
140
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): UserAccount;
|
|
141
|
+
static equals(a: UserAccount | PlainMessage<UserAccount> | undefined, b: UserAccount | PlainMessage<UserAccount> | undefined): boolean;
|
|
142
|
+
}
|
|
143
|
+
/**
|
|
144
|
+
* @generated from message njord.transactions.BalanceChange
|
|
145
|
+
*/
|
|
146
|
+
declare class BalanceChange extends Message<BalanceChange> {
|
|
147
|
+
/**
|
|
148
|
+
* @generated from field: njord.transactions.UserAccount account = 1;
|
|
149
|
+
*/
|
|
150
|
+
account?: UserAccount;
|
|
151
|
+
/**
|
|
152
|
+
* Balance before the update
|
|
153
|
+
*
|
|
154
|
+
* @generated from field: int64 previous_balance = 2;
|
|
155
|
+
*/
|
|
156
|
+
previousBalance: any;
|
|
157
|
+
/**
|
|
158
|
+
* Balance after the update
|
|
159
|
+
*
|
|
160
|
+
* @generated from field: int64 new_balance = 3;
|
|
161
|
+
*/
|
|
162
|
+
newBalance: any;
|
|
163
|
+
/**
|
|
164
|
+
* Amount of change in the balance (could be positive or negative)
|
|
165
|
+
*
|
|
166
|
+
* @generated from field: int64 change_amount = 4;
|
|
167
|
+
*/
|
|
168
|
+
changeAmount: any;
|
|
169
|
+
constructor(data?: PartialMessage<BalanceChange>);
|
|
170
|
+
static readonly runtime: typeof proto3;
|
|
171
|
+
static readonly typeName = "njord.transactions.BalanceChange";
|
|
172
|
+
static readonly fields: FieldList;
|
|
173
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): BalanceChange;
|
|
174
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): BalanceChange;
|
|
175
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): BalanceChange;
|
|
176
|
+
static equals(a: BalanceChange | PlainMessage<BalanceChange> | undefined, b: BalanceChange | PlainMessage<BalanceChange> | undefined): boolean;
|
|
177
|
+
}
|
|
178
|
+
/**
|
|
179
|
+
* @generated from message njord.transactions.TransferResponse
|
|
180
|
+
*/
|
|
181
|
+
declare class TransferResponse extends Message<TransferResponse> {
|
|
182
|
+
/**
|
|
183
|
+
* @generated from field: string idempotency_key = 1;
|
|
184
|
+
*/
|
|
185
|
+
idempotencyKey: string;
|
|
186
|
+
/**
|
|
187
|
+
* @generated from field: njord.transactions.BalanceChange sender_balance = 2;
|
|
188
|
+
*/
|
|
189
|
+
senderBalance?: BalanceChange;
|
|
190
|
+
/**
|
|
191
|
+
* @generated from field: njord.transactions.BalanceChange receiver_balance = 3;
|
|
192
|
+
*/
|
|
193
|
+
receiverBalance?: BalanceChange;
|
|
194
|
+
/**
|
|
195
|
+
* @generated from field: int64 timestamp = 4;
|
|
196
|
+
*/
|
|
197
|
+
timestamp: any;
|
|
198
|
+
constructor(data?: PartialMessage<TransferResponse>);
|
|
199
|
+
static readonly runtime: typeof proto3;
|
|
200
|
+
static readonly typeName = "njord.transactions.TransferResponse";
|
|
201
|
+
static readonly fields: FieldList;
|
|
202
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): TransferResponse;
|
|
203
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): TransferResponse;
|
|
204
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): TransferResponse;
|
|
205
|
+
static equals(a: TransferResponse | PlainMessage<TransferResponse> | undefined, b: TransferResponse | PlainMessage<TransferResponse> | undefined): boolean;
|
|
206
|
+
}
|
|
207
|
+
/**
|
|
208
|
+
* @generated from message njord.transactions.GetBalanceRequest
|
|
209
|
+
*/
|
|
210
|
+
declare class GetBalanceRequest extends Message<GetBalanceRequest> {
|
|
211
|
+
/**
|
|
212
|
+
* @generated from field: njord.transactions.UserAccount account = 1;
|
|
213
|
+
*/
|
|
214
|
+
account?: UserAccount;
|
|
215
|
+
constructor(data?: PartialMessage<GetBalanceRequest>);
|
|
216
|
+
static readonly runtime: typeof proto3;
|
|
217
|
+
static readonly typeName = "njord.transactions.GetBalanceRequest";
|
|
218
|
+
static readonly fields: FieldList;
|
|
219
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): GetBalanceRequest;
|
|
220
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): GetBalanceRequest;
|
|
221
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): GetBalanceRequest;
|
|
222
|
+
static equals(a: GetBalanceRequest | PlainMessage<GetBalanceRequest> | undefined, b: GetBalanceRequest | PlainMessage<GetBalanceRequest> | undefined): boolean;
|
|
223
|
+
}
|
|
224
|
+
/**
|
|
225
|
+
* @generated from message njord.transactions.GetBalanceResponse
|
|
226
|
+
*/
|
|
227
|
+
declare class GetBalanceResponse extends Message<GetBalanceResponse> {
|
|
228
|
+
/**
|
|
229
|
+
* Current amount
|
|
230
|
+
*
|
|
231
|
+
* @generated from field: int64 amount = 1;
|
|
232
|
+
*/
|
|
233
|
+
amount: any;
|
|
234
|
+
constructor(data?: PartialMessage<GetBalanceResponse>);
|
|
235
|
+
static readonly runtime: typeof proto3;
|
|
236
|
+
static readonly typeName = "njord.transactions.GetBalanceResponse";
|
|
237
|
+
static readonly fields: FieldList;
|
|
238
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): GetBalanceResponse;
|
|
239
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): GetBalanceResponse;
|
|
240
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): GetBalanceResponse;
|
|
241
|
+
static equals(a: GetBalanceResponse | PlainMessage<GetBalanceResponse> | undefined, b: GetBalanceResponse | PlainMessage<GetBalanceResponse> | undefined): boolean;
|
|
242
|
+
}
|
|
243
|
+
/**
|
|
244
|
+
* @generated from message njord.transactions.TransactionLogEntry
|
|
245
|
+
*/
|
|
246
|
+
declare class TransactionLogEntry extends Message<TransactionLogEntry> {
|
|
247
|
+
/**
|
|
248
|
+
* unique identifier based on transfer id and user
|
|
249
|
+
*
|
|
250
|
+
* @generated from field: string transaction_id = 1;
|
|
251
|
+
*/
|
|
252
|
+
transactionId: string;
|
|
253
|
+
/**
|
|
254
|
+
* @generated from field: string user_id = 2;
|
|
255
|
+
*/
|
|
256
|
+
userId: string;
|
|
257
|
+
/**
|
|
258
|
+
* @generated from field: njord.transactions.Currency currency = 3;
|
|
259
|
+
*/
|
|
260
|
+
currency: Currency;
|
|
261
|
+
/**
|
|
262
|
+
* @generated from field: int64 amount = 4;
|
|
263
|
+
*/
|
|
264
|
+
amount: any;
|
|
265
|
+
/**
|
|
266
|
+
* @generated from field: int64 previous_balance = 5;
|
|
267
|
+
*/
|
|
268
|
+
previousBalance: any;
|
|
269
|
+
/**
|
|
270
|
+
* @generated from field: int64 current_balance = 6;
|
|
271
|
+
*/
|
|
272
|
+
currentBalance: any;
|
|
273
|
+
/**
|
|
274
|
+
* Type of change (e.g., "deposit", "withdrawal"). It is not limited to above values and can be any kind of label, like "promotion_reward" or "admin_action".
|
|
275
|
+
*
|
|
276
|
+
* @generated from field: njord.transactions.TransferType transfer_type = 7;
|
|
277
|
+
*/
|
|
278
|
+
transferType: TransferType;
|
|
279
|
+
/**
|
|
280
|
+
* @generated from field: string description = 8;
|
|
281
|
+
*/
|
|
282
|
+
description: string;
|
|
283
|
+
/**
|
|
284
|
+
* @generated from field: int64 timestamp = 9;
|
|
285
|
+
*/
|
|
286
|
+
timestamp: any;
|
|
287
|
+
constructor(data?: PartialMessage<TransactionLogEntry>);
|
|
288
|
+
static readonly runtime: typeof proto3;
|
|
289
|
+
static readonly typeName = "njord.transactions.TransactionLogEntry";
|
|
290
|
+
static readonly fields: FieldList;
|
|
291
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): TransactionLogEntry;
|
|
292
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): TransactionLogEntry;
|
|
293
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): TransactionLogEntry;
|
|
294
|
+
static equals(a: TransactionLogEntry | PlainMessage<TransactionLogEntry> | undefined, b: TransactionLogEntry | PlainMessage<TransactionLogEntry> | undefined): boolean;
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
export { BalanceChange, Currency, EntityType, GetBalanceRequest, GetBalanceResponse, TransactionLogEntry, TransferParticipant, TransferRequest, TransferResponse, TransferType, UserAccount };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Message as n,proto3 as t,protoInt64 as e}from"@bufbuild/protobuf";var r=(n=>(n[n.CORES=0]="CORES",n))(r||{});t.util.setEnumType(r,"njord.transactions.Currency",[{no:0,name:"CORES"}]);var a=(n=>(n[n.TRANSFER=0]="TRANSFER",n))(a||{});t.util.setEnumType(a,"njord.transactions.TransferType",[{no:0,name:"TRANSFER"}]);var s=(n=>(n[n.SYSTEM=0]="SYSTEM",n[n.USER=1]="USER",n))(s||{});t.util.setEnumType(s,"njord.transactions.EntityType",[{no:0,name:"SYSTEM"},{no:1,name:"USER"}]);class i extends n{type=0;id="";constructor(n){super(),t.util.initPartial(n,this)}static runtime=t;static typeName="njord.transactions.TransferParticipant";static fields=t.util.newFieldList((()=>[{no:1,name:"type",kind:"enum",T:t.getEnumType(s)},{no:2,name:"id",kind:"scalar",T:9}]));static fromBinary(n,t){return(new i).fromBinary(n,t)}static fromJson(n,t){return(new i).fromJson(n,t)}static fromJsonString(n,t){return(new i).fromJsonString(n,t)}static equals(n,e){return t.util.equals(i,n,e)}}class o extends n{idempotencyKey="";sender;receiver;currency=0;amount=e.zero;transferType=0;description="";allowNegative=!1;constructor(n){super(),t.util.initPartial(n,this)}static runtime=t;static typeName="njord.transactions.TransferRequest";static fields=t.util.newFieldList((()=>[{no:1,name:"idempotency_key",kind:"scalar",T:9},{no:2,name:"sender",kind:"message",T:i},{no:3,name:"receiver",kind:"message",T:i},{no:4,name:"currency",kind:"enum",T:t.getEnumType(r)},{no:5,name:"amount",kind:"scalar",T:3},{no:6,name:"transfer_type",kind:"enum",T:t.getEnumType(a)},{no:7,name:"description",kind:"scalar",T:9},{no:9,name:"allow_negative",kind:"scalar",T:8}]));static fromBinary(n,t){return(new o).fromBinary(n,t)}static fromJson(n,t){return(new o).fromJson(n,t)}static fromJsonString(n,t){return(new o).fromJsonString(n,t)}static equals(n,e){return t.util.equals(o,n,e)}}class c extends n{userId="";currency=0;constructor(n){super(),t.util.initPartial(n,this)}static runtime=t;static typeName="njord.transactions.UserAccount";static fields=t.util.newFieldList((()=>[{no:1,name:"user_id",kind:"scalar",T:9},{no:2,name:"currency",kind:"enum",T:t.getEnumType(r)}]));static fromBinary(n,t){return(new c).fromBinary(n,t)}static fromJson(n,t){return(new c).fromJson(n,t)}static fromJsonString(n,t){return(new c).fromJsonString(n,t)}static equals(n,e){return t.util.equals(c,n,e)}}class u extends n{account;previousBalance=e.zero;newBalance=e.zero;changeAmount=e.zero;constructor(n){super(),t.util.initPartial(n,this)}static runtime=t;static typeName="njord.transactions.BalanceChange";static fields=t.util.newFieldList((()=>[{no:1,name:"account",kind:"message",T:c},{no:2,name:"previous_balance",kind:"scalar",T:3},{no:3,name:"new_balance",kind:"scalar",T:3},{no:4,name:"change_amount",kind:"scalar",T:3}]));static fromBinary(n,t){return(new u).fromBinary(n,t)}static fromJson(n,t){return(new u).fromJson(n,t)}static fromJsonString(n,t){return(new u).fromJsonString(n,t)}static equals(n,e){return t.util.equals(u,n,e)}}class m extends n{idempotencyKey="";senderBalance;receiverBalance;timestamp=e.zero;constructor(n){super(),t.util.initPartial(n,this)}static runtime=t;static typeName="njord.transactions.TransferResponse";static fields=t.util.newFieldList((()=>[{no:1,name:"idempotency_key",kind:"scalar",T:9},{no:2,name:"sender_balance",kind:"message",T:u},{no:3,name:"receiver_balance",kind:"message",T:u},{no:4,name:"timestamp",kind:"scalar",T:3}]));static fromBinary(n,t){return(new m).fromBinary(n,t)}static fromJson(n,t){return(new m).fromJson(n,t)}static fromJsonString(n,t){return(new m).fromJsonString(n,t)}static equals(n,e){return t.util.equals(m,n,e)}}class l extends n{account;constructor(n){super(),t.util.initPartial(n,this)}static runtime=t;static typeName="njord.transactions.GetBalanceRequest";static fields=t.util.newFieldList((()=>[{no:1,name:"account",kind:"message",T:c}]));static fromBinary(n,t){return(new l).fromBinary(n,t)}static fromJson(n,t){return(new l).fromJson(n,t)}static fromJsonString(n,t){return(new l).fromJsonString(n,t)}static equals(n,e){return t.util.equals(l,n,e)}}class d extends n{amount=e.zero;constructor(n){super(),t.util.initPartial(n,this)}static runtime=t;static typeName="njord.transactions.GetBalanceResponse";static fields=t.util.newFieldList((()=>[{no:1,name:"amount",kind:"scalar",T:3}]));static fromBinary(n,t){return(new d).fromBinary(n,t)}static fromJson(n,t){return(new d).fromJson(n,t)}static fromJsonString(n,t){return(new d).fromJsonString(n,t)}static equals(n,e){return t.util.equals(d,n,e)}}class f extends n{transactionId="";userId="";currency=0;amount=e.zero;previousBalance=e.zero;currentBalance=e.zero;transferType=0;description="";timestamp=e.zero;constructor(n){super(),t.util.initPartial(n,this)}static runtime=t;static typeName="njord.transactions.TransactionLogEntry";static fields=t.util.newFieldList((()=>[{no:1,name:"transaction_id",kind:"scalar",T:9},{no:2,name:"user_id",kind:"scalar",T:9},{no:3,name:"currency",kind:"enum",T:t.getEnumType(r)},{no:4,name:"amount",kind:"scalar",T:3},{no:5,name:"previous_balance",kind:"scalar",T:3},{no:6,name:"current_balance",kind:"scalar",T:3},{no:7,name:"transfer_type",kind:"enum",T:t.getEnumType(a)},{no:8,name:"description",kind:"scalar",T:9},{no:9,name:"timestamp",kind:"scalar",T:3}]));static fromBinary(n,t){return(new f).fromBinary(n,t)}static fromJson(n,t){return(new f).fromJson(n,t)}static fromJsonString(n,t){return(new f).fromJsonString(n,t)}static equals(n,e){return t.util.equals(f,n,e)}}export{u as BalanceChange,r as Currency,s as EntityType,l as GetBalanceRequest,d as GetBalanceResponse,f as TransactionLogEntry,i as TransferParticipant,o as TransferRequest,m as TransferResponse,a as TransferType,c as UserAccount};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var e,t=Object.defineProperty,
|
|
1
|
+
var e,t=Object.defineProperty,o=Object.getOwnPropertyDescriptor,n=Object.getOwnPropertyNames,r=Object.prototype.hasOwnProperty,s={};((e,o)=>{for(var n in o)t(e,n,{get:o[n],enumerable:!0})})(s,{Action:()=>m,Event:()=>u,GetUserEventRequest:()=>d,GetUserEventResponse:()=>c}),module.exports=(e=s,((e,s,a,i)=>{if(s&&"object"==typeof s||"function"==typeof s)for(let m of n(s))r.call(e,m)||m===a||t(e,m,{get:()=>s[m],enumerable:!(i=o(s,m))||i.enumerable});return e})(t({},"__esModule",{value:!0}),e));var a=require("@bufbuild/protobuf"),i=require("../../util/error_pb.cjs"),m=(e=>(e[e.View=0]="View",e[e.Click=1]="Click",e[e.Comment=2]="Comment",e[e.UpVote=3]="UpVote",e[e.DownVote=4]="DownVote",e[e.RemoveUpVote=5]="RemoveUpVote",e[e.RemoveDownVote=6]="RemoveDownVote",e[e.FeedbackRequested=7]="FeedbackRequested",e[e.FeedbackReceived=8]="FeedbackReceived",e[e.BookmarkAdded=9]="BookmarkAdded",e[e.BookmarkDeleted=10]="BookmarkDeleted",e[e.BookmarkViewed=11]="BookmarkViewed",e[e.TwoImpressions=12]="TwoImpressions",e[e.ThreeImpressions=13]="ThreeImpressions",e))(m||{});a.proto3.util.setEnumType(m,"engagement.Action",[{no:0,name:"View"},{no:1,name:"Click"},{no:2,name:"Comment"},{no:3,name:"UpVote"},{no:4,name:"DownVote"},{no:5,name:"RemoveUpVote"},{no:6,name:"RemoveDownVote"},{no:7,name:"FeedbackRequested"},{no:8,name:"FeedbackReceived"},{no:9,name:"BookmarkAdded"},{no:10,name:"BookmarkDeleted"},{no:11,name:"BookmarkViewed"},{no:12,name:"TwoImpressions"},{no:13,name:"ThreeImpressions"}]);class u extends a.Message{userId="";postId="";action=0;options=new Uint8Array(0);dInsert;constructor(e){super(),a.proto3.util.initPartial(e,this)}static runtime=a.proto3;static typeName="engagement.Event";static fields=a.proto3.util.newFieldList((()=>[{no:1,name:"user_id",kind:"scalar",T:9},{no:2,name:"post_id",kind:"scalar",T:9},{no:3,name:"action",kind:"enum",T:a.proto3.getEnumType(m)},{no:4,name:"options",kind:"scalar",T:12},{no:5,name:"d_insert",kind:"message",T:a.Timestamp}]));static fromBinary(e,t){return(new u).fromBinary(e,t)}static fromJson(e,t){return(new u).fromJson(e,t)}static fromJsonString(e,t){return(new u).fromJsonString(e,t)}static equals(e,t){return a.proto3.util.equals(u,e,t)}}class d extends a.Message{userId="";actions=[];days;constructor(e){super(),a.proto3.util.initPartial(e,this)}static runtime=a.proto3;static typeName="engagement.GetUserEventRequest";static fields=a.proto3.util.newFieldList((()=>[{no:1,name:"user_id",kind:"scalar",T:9},{no:2,name:"actions",kind:"enum",T:a.proto3.getEnumType(m),repeated:!0},{no:3,name:"days",kind:"scalar",T:13,opt:!0}]));static fromBinary(e,t){return(new d).fromBinary(e,t)}static fromJson(e,t){return(new d).fromJson(e,t)}static fromJsonString(e,t){return(new d).fromJsonString(e,t)}static equals(e,t){return a.proto3.util.equals(d,e,t)}}class c extends a.Message{result=[];error=[];constructor(e){super(),a.proto3.util.initPartial(e,this)}static runtime=a.proto3;static typeName="engagement.GetUserEventResponse";static fields=a.proto3.util.newFieldList((()=>[{no:1,name:"result",kind:"message",T:u,repeated:!0},{no:2,name:"error",kind:"message",T:i.Error,repeated:!0}]));static fromBinary(e,t){return(new c).fromBinary(e,t)}static fromJson(e,t){return(new c).fromJson(e,t)}static fromJsonString(e,t){return(new c).fromJsonString(e,t)}static equals(e,t){return a.proto3.util.equals(c,e,t)}}
|
|
@@ -48,7 +48,19 @@ declare enum Action {
|
|
|
48
48
|
/**
|
|
49
49
|
* @generated from enum value: BookmarkDeleted = 10;
|
|
50
50
|
*/
|
|
51
|
-
BookmarkDeleted = 10
|
|
51
|
+
BookmarkDeleted = 10,
|
|
52
|
+
/**
|
|
53
|
+
* @generated from enum value: BookmarkViewed = 11;
|
|
54
|
+
*/
|
|
55
|
+
BookmarkViewed = 11,
|
|
56
|
+
/**
|
|
57
|
+
* @generated from enum value: TwoImpressions = 12;
|
|
58
|
+
*/
|
|
59
|
+
TwoImpressions = 12,
|
|
60
|
+
/**
|
|
61
|
+
* @generated from enum value: ThreeImpressions = 13;
|
|
62
|
+
*/
|
|
63
|
+
ThreeImpressions = 13
|
|
52
64
|
}
|
|
53
65
|
/**
|
|
54
66
|
* @generated from message engagement.Event
|