@acequants/aegis-contracts 0.1.42 → 0.1.44
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/src/gen/billing/v1/billing.d.ts +172 -0
- package/dist/src/gen/billing/v1/billing.d.ts.map +1 -0
- package/dist/src/gen/billing/v1/billing.js +645 -0
- package/dist/src/index.d.ts +1 -0
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +1 -0
- package/package.json +1 -1
- package/proto/billing/v1/billing.proto +90 -0
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
import type { handleUnaryCall, UntypedServiceImplementation } from "@grpc/grpc-js";
|
|
2
|
+
import _m0 from "protobufjs/minimal";
|
|
3
|
+
import { Observable } from "rxjs";
|
|
4
|
+
import { Timestamp } from "../../google/protobuf/timestamp";
|
|
5
|
+
export declare const protobufPackage = "aegis.billing.v1";
|
|
6
|
+
export interface GrpcDtoPagination {
|
|
7
|
+
totalItems: number;
|
|
8
|
+
totalPages: number;
|
|
9
|
+
currentPage: number;
|
|
10
|
+
pageSize: number;
|
|
11
|
+
}
|
|
12
|
+
export interface GrpcDtoMessage {
|
|
13
|
+
message: string;
|
|
14
|
+
}
|
|
15
|
+
/** ---- CURRENCY ---- */
|
|
16
|
+
export interface GrpcDtoCurrency {
|
|
17
|
+
publicId: string;
|
|
18
|
+
code: string;
|
|
19
|
+
name: string;
|
|
20
|
+
symbol: string;
|
|
21
|
+
isActive: boolean;
|
|
22
|
+
exchangeRate: number;
|
|
23
|
+
createdAt?: Timestamp | undefined;
|
|
24
|
+
updatedAt?: Timestamp | undefined;
|
|
25
|
+
deletedAt?: Timestamp | undefined;
|
|
26
|
+
}
|
|
27
|
+
/** ---- EXCHANGE RATE ---- */
|
|
28
|
+
export interface GrpcInputExchangeRates {
|
|
29
|
+
baseCurrencyPublicId?: string | undefined;
|
|
30
|
+
quoteCurrencyPublicId?: string | undefined;
|
|
31
|
+
search?: string | undefined;
|
|
32
|
+
page?: number | undefined;
|
|
33
|
+
pageSize?: number | undefined;
|
|
34
|
+
sortBy?: string | undefined;
|
|
35
|
+
sortOrder?: string | undefined;
|
|
36
|
+
}
|
|
37
|
+
export interface GrpcInputExchangeRateCreate {
|
|
38
|
+
baseCurrencyPublicId: string;
|
|
39
|
+
quoteCurrencyPublicId: string;
|
|
40
|
+
rate: string;
|
|
41
|
+
source: string;
|
|
42
|
+
}
|
|
43
|
+
/** optional string servicePublicId = 1; */
|
|
44
|
+
export interface GrpcInputExchangeRateCacheClear {
|
|
45
|
+
}
|
|
46
|
+
export interface GrpcInputExchangeRateConversion {
|
|
47
|
+
fromCode: string;
|
|
48
|
+
toCode: string;
|
|
49
|
+
amount: string;
|
|
50
|
+
}
|
|
51
|
+
export interface GrpcDtoExchangeRate {
|
|
52
|
+
publicId: string;
|
|
53
|
+
baseCurrency?: GrpcDtoCurrency | undefined;
|
|
54
|
+
quoteCurrency?: GrpcDtoCurrency | undefined;
|
|
55
|
+
rate: string;
|
|
56
|
+
source: string;
|
|
57
|
+
createdAt?: Timestamp | undefined;
|
|
58
|
+
updatedAt?: Timestamp | undefined;
|
|
59
|
+
deletedAt?: Timestamp | undefined;
|
|
60
|
+
}
|
|
61
|
+
export interface GrpcDtoExchangeRates {
|
|
62
|
+
items: GrpcDtoExchangeRate[];
|
|
63
|
+
meta?: GrpcDtoPagination | undefined;
|
|
64
|
+
}
|
|
65
|
+
export interface GrpcDtoExchangeRateConvertion {
|
|
66
|
+
amount: number;
|
|
67
|
+
}
|
|
68
|
+
export declare const AEGIS_BILLING_V1_PACKAGE_NAME = "aegis.billing.v1";
|
|
69
|
+
export declare const GrpcDtoPagination: {
|
|
70
|
+
encode(message: GrpcDtoPagination, writer?: _m0.Writer): _m0.Writer;
|
|
71
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): GrpcDtoPagination;
|
|
72
|
+
};
|
|
73
|
+
export declare const GrpcDtoMessage: {
|
|
74
|
+
encode(message: GrpcDtoMessage, writer?: _m0.Writer): _m0.Writer;
|
|
75
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): GrpcDtoMessage;
|
|
76
|
+
};
|
|
77
|
+
export declare const GrpcDtoCurrency: {
|
|
78
|
+
encode(message: GrpcDtoCurrency, writer?: _m0.Writer): _m0.Writer;
|
|
79
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): GrpcDtoCurrency;
|
|
80
|
+
};
|
|
81
|
+
export declare const GrpcInputExchangeRates: {
|
|
82
|
+
encode(message: GrpcInputExchangeRates, writer?: _m0.Writer): _m0.Writer;
|
|
83
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): GrpcInputExchangeRates;
|
|
84
|
+
};
|
|
85
|
+
export declare const GrpcInputExchangeRateCreate: {
|
|
86
|
+
encode(message: GrpcInputExchangeRateCreate, writer?: _m0.Writer): _m0.Writer;
|
|
87
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): GrpcInputExchangeRateCreate;
|
|
88
|
+
};
|
|
89
|
+
export declare const GrpcInputExchangeRateCacheClear: {
|
|
90
|
+
encode(_: GrpcInputExchangeRateCacheClear, writer?: _m0.Writer): _m0.Writer;
|
|
91
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): GrpcInputExchangeRateCacheClear;
|
|
92
|
+
};
|
|
93
|
+
export declare const GrpcInputExchangeRateConversion: {
|
|
94
|
+
encode(message: GrpcInputExchangeRateConversion, writer?: _m0.Writer): _m0.Writer;
|
|
95
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): GrpcInputExchangeRateConversion;
|
|
96
|
+
};
|
|
97
|
+
export declare const GrpcDtoExchangeRate: {
|
|
98
|
+
encode(message: GrpcDtoExchangeRate, writer?: _m0.Writer): _m0.Writer;
|
|
99
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): GrpcDtoExchangeRate;
|
|
100
|
+
};
|
|
101
|
+
export declare const GrpcDtoExchangeRates: {
|
|
102
|
+
encode(message: GrpcDtoExchangeRates, writer?: _m0.Writer): _m0.Writer;
|
|
103
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): GrpcDtoExchangeRates;
|
|
104
|
+
};
|
|
105
|
+
export declare const GrpcDtoExchangeRateConvertion: {
|
|
106
|
+
encode(message: GrpcDtoExchangeRateConvertion, writer?: _m0.Writer): _m0.Writer;
|
|
107
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): GrpcDtoExchangeRateConvertion;
|
|
108
|
+
};
|
|
109
|
+
export interface BillingServiceClient {
|
|
110
|
+
/** --- Exchange Rate --- */
|
|
111
|
+
rates(request: GrpcInputExchangeRates): Observable<GrpcDtoExchangeRates>;
|
|
112
|
+
create(request: GrpcInputExchangeRateCreate): Observable<GrpcDtoExchangeRate>;
|
|
113
|
+
convertion(request: GrpcInputExchangeRateConversion): Observable<GrpcDtoExchangeRateConvertion>;
|
|
114
|
+
clearCache(request: GrpcInputExchangeRateCacheClear): Observable<GrpcDtoMessage>;
|
|
115
|
+
}
|
|
116
|
+
export interface BillingServiceController {
|
|
117
|
+
/** --- Exchange Rate --- */
|
|
118
|
+
rates(request: GrpcInputExchangeRates): Promise<GrpcDtoExchangeRates> | Observable<GrpcDtoExchangeRates> | GrpcDtoExchangeRates;
|
|
119
|
+
create(request: GrpcInputExchangeRateCreate): Promise<GrpcDtoExchangeRate> | Observable<GrpcDtoExchangeRate> | GrpcDtoExchangeRate;
|
|
120
|
+
convertion(request: GrpcInputExchangeRateConversion): Promise<GrpcDtoExchangeRateConvertion> | Observable<GrpcDtoExchangeRateConvertion> | GrpcDtoExchangeRateConvertion;
|
|
121
|
+
clearCache(request: GrpcInputExchangeRateCacheClear): Promise<GrpcDtoMessage> | Observable<GrpcDtoMessage> | GrpcDtoMessage;
|
|
122
|
+
}
|
|
123
|
+
export declare function BillingServiceControllerMethods(): (constructor: Function) => void;
|
|
124
|
+
export declare const BILLING_SERVICE_NAME = "BillingService";
|
|
125
|
+
export type BillingServiceService = typeof BillingServiceService;
|
|
126
|
+
export declare const BillingServiceService: {
|
|
127
|
+
/** --- Exchange Rate --- */
|
|
128
|
+
readonly rates: {
|
|
129
|
+
readonly path: "/aegis.billing.v1.BillingService/Rates";
|
|
130
|
+
readonly requestStream: false;
|
|
131
|
+
readonly responseStream: false;
|
|
132
|
+
readonly requestSerialize: (value: GrpcInputExchangeRates) => Buffer<ArrayBuffer>;
|
|
133
|
+
readonly requestDeserialize: (value: Buffer) => GrpcInputExchangeRates;
|
|
134
|
+
readonly responseSerialize: (value: GrpcDtoExchangeRates) => Buffer<ArrayBuffer>;
|
|
135
|
+
readonly responseDeserialize: (value: Buffer) => GrpcDtoExchangeRates;
|
|
136
|
+
};
|
|
137
|
+
readonly create: {
|
|
138
|
+
readonly path: "/aegis.billing.v1.BillingService/Create";
|
|
139
|
+
readonly requestStream: false;
|
|
140
|
+
readonly responseStream: false;
|
|
141
|
+
readonly requestSerialize: (value: GrpcInputExchangeRateCreate) => Buffer<ArrayBuffer>;
|
|
142
|
+
readonly requestDeserialize: (value: Buffer) => GrpcInputExchangeRateCreate;
|
|
143
|
+
readonly responseSerialize: (value: GrpcDtoExchangeRate) => Buffer<ArrayBuffer>;
|
|
144
|
+
readonly responseDeserialize: (value: Buffer) => GrpcDtoExchangeRate;
|
|
145
|
+
};
|
|
146
|
+
readonly convertion: {
|
|
147
|
+
readonly path: "/aegis.billing.v1.BillingService/Convertion";
|
|
148
|
+
readonly requestStream: false;
|
|
149
|
+
readonly responseStream: false;
|
|
150
|
+
readonly requestSerialize: (value: GrpcInputExchangeRateConversion) => Buffer<ArrayBuffer>;
|
|
151
|
+
readonly requestDeserialize: (value: Buffer) => GrpcInputExchangeRateConversion;
|
|
152
|
+
readonly responseSerialize: (value: GrpcDtoExchangeRateConvertion) => Buffer<ArrayBuffer>;
|
|
153
|
+
readonly responseDeserialize: (value: Buffer) => GrpcDtoExchangeRateConvertion;
|
|
154
|
+
};
|
|
155
|
+
readonly clearCache: {
|
|
156
|
+
readonly path: "/aegis.billing.v1.BillingService/ClearCache";
|
|
157
|
+
readonly requestStream: false;
|
|
158
|
+
readonly responseStream: false;
|
|
159
|
+
readonly requestSerialize: (value: GrpcInputExchangeRateCacheClear) => Buffer<ArrayBuffer>;
|
|
160
|
+
readonly requestDeserialize: (value: Buffer) => GrpcInputExchangeRateCacheClear;
|
|
161
|
+
readonly responseSerialize: (value: GrpcDtoMessage) => Buffer<ArrayBuffer>;
|
|
162
|
+
readonly responseDeserialize: (value: Buffer) => GrpcDtoMessage;
|
|
163
|
+
};
|
|
164
|
+
};
|
|
165
|
+
export interface BillingServiceServer extends UntypedServiceImplementation {
|
|
166
|
+
/** --- Exchange Rate --- */
|
|
167
|
+
rates: handleUnaryCall<GrpcInputExchangeRates, GrpcDtoExchangeRates>;
|
|
168
|
+
create: handleUnaryCall<GrpcInputExchangeRateCreate, GrpcDtoExchangeRate>;
|
|
169
|
+
convertion: handleUnaryCall<GrpcInputExchangeRateConversion, GrpcDtoExchangeRateConvertion>;
|
|
170
|
+
clearCache: handleUnaryCall<GrpcInputExchangeRateCacheClear, GrpcDtoMessage>;
|
|
171
|
+
}
|
|
172
|
+
//# sourceMappingURL=billing.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"billing.d.ts","sourceRoot":"","sources":["../../../../../src/gen/billing/v1/billing.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,eAAe,EAAE,4BAA4B,EAAE,MAAM,eAAe,CAAC;AAEnF,OAAO,GAAG,MAAM,oBAAoB,CAAC;AACrC,OAAO,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAClC,OAAO,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAE5D,eAAO,MAAM,eAAe,qBAAqB,CAAC;AAElD,MAAM,WAAW,iBAAiB;IAChC,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,cAAc;IAC7B,O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,CAAC;IAC1E,UAAU,EAAE,eAAe,CAAC,+BAA+B,EAAE,6BAA6B,CAAC,CAAC;IAC5F,UAAU,EAAE,eAAe,CAAC,+BAA+B,EAAE,cAAc,CAAC,CAAC;CAC9E"}
|
|
@@ -0,0 +1,645 @@
|
|
|
1
|
+
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
2
|
+
// versions:
|
|
3
|
+
// protoc-gen-ts_proto v1.181.2
|
|
4
|
+
// protoc v6.32.0
|
|
5
|
+
// source: billing/v1/billing.proto
|
|
6
|
+
import { GrpcMethod, GrpcStreamMethod } from "@nestjs/microservices";
|
|
7
|
+
import _m0 from "protobufjs/minimal";
|
|
8
|
+
import { Timestamp } from "../../google/protobuf/timestamp";
|
|
9
|
+
export const protobufPackage = "aegis.billing.v1";
|
|
10
|
+
export const AEGIS_BILLING_V1_PACKAGE_NAME = "aegis.billing.v1";
|
|
11
|
+
function createBaseGrpcDtoPagination() {
|
|
12
|
+
return { totalItems: 0, totalPages: 0, currentPage: 0, pageSize: 0 };
|
|
13
|
+
}
|
|
14
|
+
export const GrpcDtoPagination = {
|
|
15
|
+
encode(message, writer = _m0.Writer.create()) {
|
|
16
|
+
if (message.totalItems !== 0) {
|
|
17
|
+
writer.uint32(8).int32(message.totalItems);
|
|
18
|
+
}
|
|
19
|
+
if (message.totalPages !== 0) {
|
|
20
|
+
writer.uint32(16).int32(message.totalPages);
|
|
21
|
+
}
|
|
22
|
+
if (message.currentPage !== 0) {
|
|
23
|
+
writer.uint32(24).int32(message.currentPage);
|
|
24
|
+
}
|
|
25
|
+
if (message.pageSize !== 0) {
|
|
26
|
+
writer.uint32(32).int32(message.pageSize);
|
|
27
|
+
}
|
|
28
|
+
return writer;
|
|
29
|
+
},
|
|
30
|
+
decode(input, length) {
|
|
31
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
32
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
33
|
+
const message = createBaseGrpcDtoPagination();
|
|
34
|
+
while (reader.pos < end) {
|
|
35
|
+
const tag = reader.uint32();
|
|
36
|
+
switch (tag >>> 3) {
|
|
37
|
+
case 1:
|
|
38
|
+
if (tag !== 8) {
|
|
39
|
+
break;
|
|
40
|
+
}
|
|
41
|
+
message.totalItems = reader.int32();
|
|
42
|
+
continue;
|
|
43
|
+
case 2:
|
|
44
|
+
if (tag !== 16) {
|
|
45
|
+
break;
|
|
46
|
+
}
|
|
47
|
+
message.totalPages = reader.int32();
|
|
48
|
+
continue;
|
|
49
|
+
case 3:
|
|
50
|
+
if (tag !== 24) {
|
|
51
|
+
break;
|
|
52
|
+
}
|
|
53
|
+
message.currentPage = reader.int32();
|
|
54
|
+
continue;
|
|
55
|
+
case 4:
|
|
56
|
+
if (tag !== 32) {
|
|
57
|
+
break;
|
|
58
|
+
}
|
|
59
|
+
message.pageSize = reader.int32();
|
|
60
|
+
continue;
|
|
61
|
+
}
|
|
62
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
63
|
+
break;
|
|
64
|
+
}
|
|
65
|
+
reader.skipType(tag & 7);
|
|
66
|
+
}
|
|
67
|
+
return message;
|
|
68
|
+
},
|
|
69
|
+
};
|
|
70
|
+
function createBaseGrpcDtoMessage() {
|
|
71
|
+
return { message: "" };
|
|
72
|
+
}
|
|
73
|
+
export const GrpcDtoMessage = {
|
|
74
|
+
encode(message, writer = _m0.Writer.create()) {
|
|
75
|
+
if (message.message !== "") {
|
|
76
|
+
writer.uint32(10).string(message.message);
|
|
77
|
+
}
|
|
78
|
+
return writer;
|
|
79
|
+
},
|
|
80
|
+
decode(input, length) {
|
|
81
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
82
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
83
|
+
const message = createBaseGrpcDtoMessage();
|
|
84
|
+
while (reader.pos < end) {
|
|
85
|
+
const tag = reader.uint32();
|
|
86
|
+
switch (tag >>> 3) {
|
|
87
|
+
case 1:
|
|
88
|
+
if (tag !== 10) {
|
|
89
|
+
break;
|
|
90
|
+
}
|
|
91
|
+
message.message = reader.string();
|
|
92
|
+
continue;
|
|
93
|
+
}
|
|
94
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
95
|
+
break;
|
|
96
|
+
}
|
|
97
|
+
reader.skipType(tag & 7);
|
|
98
|
+
}
|
|
99
|
+
return message;
|
|
100
|
+
},
|
|
101
|
+
};
|
|
102
|
+
function createBaseGrpcDtoCurrency() {
|
|
103
|
+
return { publicId: "", code: "", name: "", symbol: "", isActive: false, exchangeRate: 0 };
|
|
104
|
+
}
|
|
105
|
+
export const GrpcDtoCurrency = {
|
|
106
|
+
encode(message, writer = _m0.Writer.create()) {
|
|
107
|
+
if (message.publicId !== "") {
|
|
108
|
+
writer.uint32(10).string(message.publicId);
|
|
109
|
+
}
|
|
110
|
+
if (message.code !== "") {
|
|
111
|
+
writer.uint32(18).string(message.code);
|
|
112
|
+
}
|
|
113
|
+
if (message.name !== "") {
|
|
114
|
+
writer.uint32(26).string(message.name);
|
|
115
|
+
}
|
|
116
|
+
if (message.symbol !== "") {
|
|
117
|
+
writer.uint32(34).string(message.symbol);
|
|
118
|
+
}
|
|
119
|
+
if (message.isActive !== false) {
|
|
120
|
+
writer.uint32(40).bool(message.isActive);
|
|
121
|
+
}
|
|
122
|
+
if (message.exchangeRate !== 0) {
|
|
123
|
+
writer.uint32(53).float(message.exchangeRate);
|
|
124
|
+
}
|
|
125
|
+
if (message.createdAt !== undefined) {
|
|
126
|
+
Timestamp.encode(message.createdAt, writer.uint32(58).fork()).ldelim();
|
|
127
|
+
}
|
|
128
|
+
if (message.updatedAt !== undefined) {
|
|
129
|
+
Timestamp.encode(message.updatedAt, writer.uint32(66).fork()).ldelim();
|
|
130
|
+
}
|
|
131
|
+
if (message.deletedAt !== undefined) {
|
|
132
|
+
Timestamp.encode(message.deletedAt, writer.uint32(74).fork()).ldelim();
|
|
133
|
+
}
|
|
134
|
+
return writer;
|
|
135
|
+
},
|
|
136
|
+
decode(input, length) {
|
|
137
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
138
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
139
|
+
const message = createBaseGrpcDtoCurrency();
|
|
140
|
+
while (reader.pos < end) {
|
|
141
|
+
const tag = reader.uint32();
|
|
142
|
+
switch (tag >>> 3) {
|
|
143
|
+
case 1:
|
|
144
|
+
if (tag !== 10) {
|
|
145
|
+
break;
|
|
146
|
+
}
|
|
147
|
+
message.publicId = reader.string();
|
|
148
|
+
continue;
|
|
149
|
+
case 2:
|
|
150
|
+
if (tag !== 18) {
|
|
151
|
+
break;
|
|
152
|
+
}
|
|
153
|
+
message.code = reader.string();
|
|
154
|
+
continue;
|
|
155
|
+
case 3:
|
|
156
|
+
if (tag !== 26) {
|
|
157
|
+
break;
|
|
158
|
+
}
|
|
159
|
+
message.name = reader.string();
|
|
160
|
+
continue;
|
|
161
|
+
case 4:
|
|
162
|
+
if (tag !== 34) {
|
|
163
|
+
break;
|
|
164
|
+
}
|
|
165
|
+
message.symbol = reader.string();
|
|
166
|
+
continue;
|
|
167
|
+
case 5:
|
|
168
|
+
if (tag !== 40) {
|
|
169
|
+
break;
|
|
170
|
+
}
|
|
171
|
+
message.isActive = reader.bool();
|
|
172
|
+
continue;
|
|
173
|
+
case 6:
|
|
174
|
+
if (tag !== 53) {
|
|
175
|
+
break;
|
|
176
|
+
}
|
|
177
|
+
message.exchangeRate = reader.float();
|
|
178
|
+
continue;
|
|
179
|
+
case 7:
|
|
180
|
+
if (tag !== 58) {
|
|
181
|
+
break;
|
|
182
|
+
}
|
|
183
|
+
message.createdAt = Timestamp.decode(reader, reader.uint32());
|
|
184
|
+
continue;
|
|
185
|
+
case 8:
|
|
186
|
+
if (tag !== 66) {
|
|
187
|
+
break;
|
|
188
|
+
}
|
|
189
|
+
message.updatedAt = Timestamp.decode(reader, reader.uint32());
|
|
190
|
+
continue;
|
|
191
|
+
case 9:
|
|
192
|
+
if (tag !== 74) {
|
|
193
|
+
break;
|
|
194
|
+
}
|
|
195
|
+
message.deletedAt = Timestamp.decode(reader, reader.uint32());
|
|
196
|
+
continue;
|
|
197
|
+
}
|
|
198
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
199
|
+
break;
|
|
200
|
+
}
|
|
201
|
+
reader.skipType(tag & 7);
|
|
202
|
+
}
|
|
203
|
+
return message;
|
|
204
|
+
},
|
|
205
|
+
};
|
|
206
|
+
function createBaseGrpcInputExchangeRates() {
|
|
207
|
+
return {};
|
|
208
|
+
}
|
|
209
|
+
export const GrpcInputExchangeRates = {
|
|
210
|
+
encode(message, writer = _m0.Writer.create()) {
|
|
211
|
+
if (message.baseCurrencyPublicId !== undefined) {
|
|
212
|
+
writer.uint32(10).string(message.baseCurrencyPublicId);
|
|
213
|
+
}
|
|
214
|
+
if (message.quoteCurrencyPublicId !== undefined) {
|
|
215
|
+
writer.uint32(18).string(message.quoteCurrencyPublicId);
|
|
216
|
+
}
|
|
217
|
+
if (message.search !== undefined) {
|
|
218
|
+
writer.uint32(26).string(message.search);
|
|
219
|
+
}
|
|
220
|
+
if (message.page !== undefined) {
|
|
221
|
+
writer.uint32(32).int32(message.page);
|
|
222
|
+
}
|
|
223
|
+
if (message.pageSize !== undefined) {
|
|
224
|
+
writer.uint32(40).int32(message.pageSize);
|
|
225
|
+
}
|
|
226
|
+
if (message.sortBy !== undefined) {
|
|
227
|
+
writer.uint32(50).string(message.sortBy);
|
|
228
|
+
}
|
|
229
|
+
if (message.sortOrder !== undefined) {
|
|
230
|
+
writer.uint32(58).string(message.sortOrder);
|
|
231
|
+
}
|
|
232
|
+
return writer;
|
|
233
|
+
},
|
|
234
|
+
decode(input, length) {
|
|
235
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
236
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
237
|
+
const message = createBaseGrpcInputExchangeRates();
|
|
238
|
+
while (reader.pos < end) {
|
|
239
|
+
const tag = reader.uint32();
|
|
240
|
+
switch (tag >>> 3) {
|
|
241
|
+
case 1:
|
|
242
|
+
if (tag !== 10) {
|
|
243
|
+
break;
|
|
244
|
+
}
|
|
245
|
+
message.baseCurrencyPublicId = reader.string();
|
|
246
|
+
continue;
|
|
247
|
+
case 2:
|
|
248
|
+
if (tag !== 18) {
|
|
249
|
+
break;
|
|
250
|
+
}
|
|
251
|
+
message.quoteCurrencyPublicId = reader.string();
|
|
252
|
+
continue;
|
|
253
|
+
case 3:
|
|
254
|
+
if (tag !== 26) {
|
|
255
|
+
break;
|
|
256
|
+
}
|
|
257
|
+
message.search = reader.string();
|
|
258
|
+
continue;
|
|
259
|
+
case 4:
|
|
260
|
+
if (tag !== 32) {
|
|
261
|
+
break;
|
|
262
|
+
}
|
|
263
|
+
message.page = reader.int32();
|
|
264
|
+
continue;
|
|
265
|
+
case 5:
|
|
266
|
+
if (tag !== 40) {
|
|
267
|
+
break;
|
|
268
|
+
}
|
|
269
|
+
message.pageSize = reader.int32();
|
|
270
|
+
continue;
|
|
271
|
+
case 6:
|
|
272
|
+
if (tag !== 50) {
|
|
273
|
+
break;
|
|
274
|
+
}
|
|
275
|
+
message.sortBy = reader.string();
|
|
276
|
+
continue;
|
|
277
|
+
case 7:
|
|
278
|
+
if (tag !== 58) {
|
|
279
|
+
break;
|
|
280
|
+
}
|
|
281
|
+
message.sortOrder = reader.string();
|
|
282
|
+
continue;
|
|
283
|
+
}
|
|
284
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
285
|
+
break;
|
|
286
|
+
}
|
|
287
|
+
reader.skipType(tag & 7);
|
|
288
|
+
}
|
|
289
|
+
return message;
|
|
290
|
+
},
|
|
291
|
+
};
|
|
292
|
+
function createBaseGrpcInputExchangeRateCreate() {
|
|
293
|
+
return { baseCurrencyPublicId: "", quoteCurrencyPublicId: "", rate: "", source: "" };
|
|
294
|
+
}
|
|
295
|
+
export const GrpcInputExchangeRateCreate = {
|
|
296
|
+
encode(message, writer = _m0.Writer.create()) {
|
|
297
|
+
if (message.baseCurrencyPublicId !== "") {
|
|
298
|
+
writer.uint32(10).string(message.baseCurrencyPublicId);
|
|
299
|
+
}
|
|
300
|
+
if (message.quoteCurrencyPublicId !== "") {
|
|
301
|
+
writer.uint32(18).string(message.quoteCurrencyPublicId);
|
|
302
|
+
}
|
|
303
|
+
if (message.rate !== "") {
|
|
304
|
+
writer.uint32(26).string(message.rate);
|
|
305
|
+
}
|
|
306
|
+
if (message.source !== "") {
|
|
307
|
+
writer.uint32(34).string(message.source);
|
|
308
|
+
}
|
|
309
|
+
return writer;
|
|
310
|
+
},
|
|
311
|
+
decode(input, length) {
|
|
312
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
313
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
314
|
+
const message = createBaseGrpcInputExchangeRateCreate();
|
|
315
|
+
while (reader.pos < end) {
|
|
316
|
+
const tag = reader.uint32();
|
|
317
|
+
switch (tag >>> 3) {
|
|
318
|
+
case 1:
|
|
319
|
+
if (tag !== 10) {
|
|
320
|
+
break;
|
|
321
|
+
}
|
|
322
|
+
message.baseCurrencyPublicId = reader.string();
|
|
323
|
+
continue;
|
|
324
|
+
case 2:
|
|
325
|
+
if (tag !== 18) {
|
|
326
|
+
break;
|
|
327
|
+
}
|
|
328
|
+
message.quoteCurrencyPublicId = reader.string();
|
|
329
|
+
continue;
|
|
330
|
+
case 3:
|
|
331
|
+
if (tag !== 26) {
|
|
332
|
+
break;
|
|
333
|
+
}
|
|
334
|
+
message.rate = reader.string();
|
|
335
|
+
continue;
|
|
336
|
+
case 4:
|
|
337
|
+
if (tag !== 34) {
|
|
338
|
+
break;
|
|
339
|
+
}
|
|
340
|
+
message.source = reader.string();
|
|
341
|
+
continue;
|
|
342
|
+
}
|
|
343
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
344
|
+
break;
|
|
345
|
+
}
|
|
346
|
+
reader.skipType(tag & 7);
|
|
347
|
+
}
|
|
348
|
+
return message;
|
|
349
|
+
},
|
|
350
|
+
};
|
|
351
|
+
function createBaseGrpcInputExchangeRateCacheClear() {
|
|
352
|
+
return {};
|
|
353
|
+
}
|
|
354
|
+
export const GrpcInputExchangeRateCacheClear = {
|
|
355
|
+
encode(_, writer = _m0.Writer.create()) {
|
|
356
|
+
return writer;
|
|
357
|
+
},
|
|
358
|
+
decode(input, length) {
|
|
359
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
360
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
361
|
+
const message = createBaseGrpcInputExchangeRateCacheClear();
|
|
362
|
+
while (reader.pos < end) {
|
|
363
|
+
const tag = reader.uint32();
|
|
364
|
+
switch (tag >>> 3) {
|
|
365
|
+
}
|
|
366
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
367
|
+
break;
|
|
368
|
+
}
|
|
369
|
+
reader.skipType(tag & 7);
|
|
370
|
+
}
|
|
371
|
+
return message;
|
|
372
|
+
},
|
|
373
|
+
};
|
|
374
|
+
function createBaseGrpcInputExchangeRateConversion() {
|
|
375
|
+
return { fromCode: "", toCode: "", amount: "" };
|
|
376
|
+
}
|
|
377
|
+
export const GrpcInputExchangeRateConversion = {
|
|
378
|
+
encode(message, writer = _m0.Writer.create()) {
|
|
379
|
+
if (message.fromCode !== "") {
|
|
380
|
+
writer.uint32(10).string(message.fromCode);
|
|
381
|
+
}
|
|
382
|
+
if (message.toCode !== "") {
|
|
383
|
+
writer.uint32(18).string(message.toCode);
|
|
384
|
+
}
|
|
385
|
+
if (message.amount !== "") {
|
|
386
|
+
writer.uint32(26).string(message.amount);
|
|
387
|
+
}
|
|
388
|
+
return writer;
|
|
389
|
+
},
|
|
390
|
+
decode(input, length) {
|
|
391
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
392
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
393
|
+
const message = createBaseGrpcInputExchangeRateConversion();
|
|
394
|
+
while (reader.pos < end) {
|
|
395
|
+
const tag = reader.uint32();
|
|
396
|
+
switch (tag >>> 3) {
|
|
397
|
+
case 1:
|
|
398
|
+
if (tag !== 10) {
|
|
399
|
+
break;
|
|
400
|
+
}
|
|
401
|
+
message.fromCode = reader.string();
|
|
402
|
+
continue;
|
|
403
|
+
case 2:
|
|
404
|
+
if (tag !== 18) {
|
|
405
|
+
break;
|
|
406
|
+
}
|
|
407
|
+
message.toCode = reader.string();
|
|
408
|
+
continue;
|
|
409
|
+
case 3:
|
|
410
|
+
if (tag !== 26) {
|
|
411
|
+
break;
|
|
412
|
+
}
|
|
413
|
+
message.amount = reader.string();
|
|
414
|
+
continue;
|
|
415
|
+
}
|
|
416
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
417
|
+
break;
|
|
418
|
+
}
|
|
419
|
+
reader.skipType(tag & 7);
|
|
420
|
+
}
|
|
421
|
+
return message;
|
|
422
|
+
},
|
|
423
|
+
};
|
|
424
|
+
function createBaseGrpcDtoExchangeRate() {
|
|
425
|
+
return { publicId: "", rate: "", source: "" };
|
|
426
|
+
}
|
|
427
|
+
export const GrpcDtoExchangeRate = {
|
|
428
|
+
encode(message, writer = _m0.Writer.create()) {
|
|
429
|
+
if (message.publicId !== "") {
|
|
430
|
+
writer.uint32(10).string(message.publicId);
|
|
431
|
+
}
|
|
432
|
+
if (message.baseCurrency !== undefined) {
|
|
433
|
+
GrpcDtoCurrency.encode(message.baseCurrency, writer.uint32(18).fork()).ldelim();
|
|
434
|
+
}
|
|
435
|
+
if (message.quoteCurrency !== undefined) {
|
|
436
|
+
GrpcDtoCurrency.encode(message.quoteCurrency, writer.uint32(26).fork()).ldelim();
|
|
437
|
+
}
|
|
438
|
+
if (message.rate !== "") {
|
|
439
|
+
writer.uint32(34).string(message.rate);
|
|
440
|
+
}
|
|
441
|
+
if (message.source !== "") {
|
|
442
|
+
writer.uint32(42).string(message.source);
|
|
443
|
+
}
|
|
444
|
+
if (message.createdAt !== undefined) {
|
|
445
|
+
Timestamp.encode(message.createdAt, writer.uint32(50).fork()).ldelim();
|
|
446
|
+
}
|
|
447
|
+
if (message.updatedAt !== undefined) {
|
|
448
|
+
Timestamp.encode(message.updatedAt, writer.uint32(58).fork()).ldelim();
|
|
449
|
+
}
|
|
450
|
+
if (message.deletedAt !== undefined) {
|
|
451
|
+
Timestamp.encode(message.deletedAt, writer.uint32(66).fork()).ldelim();
|
|
452
|
+
}
|
|
453
|
+
return writer;
|
|
454
|
+
},
|
|
455
|
+
decode(input, length) {
|
|
456
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
457
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
458
|
+
const message = createBaseGrpcDtoExchangeRate();
|
|
459
|
+
while (reader.pos < end) {
|
|
460
|
+
const tag = reader.uint32();
|
|
461
|
+
switch (tag >>> 3) {
|
|
462
|
+
case 1:
|
|
463
|
+
if (tag !== 10) {
|
|
464
|
+
break;
|
|
465
|
+
}
|
|
466
|
+
message.publicId = reader.string();
|
|
467
|
+
continue;
|
|
468
|
+
case 2:
|
|
469
|
+
if (tag !== 18) {
|
|
470
|
+
break;
|
|
471
|
+
}
|
|
472
|
+
message.baseCurrency = GrpcDtoCurrency.decode(reader, reader.uint32());
|
|
473
|
+
continue;
|
|
474
|
+
case 3:
|
|
475
|
+
if (tag !== 26) {
|
|
476
|
+
break;
|
|
477
|
+
}
|
|
478
|
+
message.quoteCurrency = GrpcDtoCurrency.decode(reader, reader.uint32());
|
|
479
|
+
continue;
|
|
480
|
+
case 4:
|
|
481
|
+
if (tag !== 34) {
|
|
482
|
+
break;
|
|
483
|
+
}
|
|
484
|
+
message.rate = reader.string();
|
|
485
|
+
continue;
|
|
486
|
+
case 5:
|
|
487
|
+
if (tag !== 42) {
|
|
488
|
+
break;
|
|
489
|
+
}
|
|
490
|
+
message.source = reader.string();
|
|
491
|
+
continue;
|
|
492
|
+
case 6:
|
|
493
|
+
if (tag !== 50) {
|
|
494
|
+
break;
|
|
495
|
+
}
|
|
496
|
+
message.createdAt = Timestamp.decode(reader, reader.uint32());
|
|
497
|
+
continue;
|
|
498
|
+
case 7:
|
|
499
|
+
if (tag !== 58) {
|
|
500
|
+
break;
|
|
501
|
+
}
|
|
502
|
+
message.updatedAt = Timestamp.decode(reader, reader.uint32());
|
|
503
|
+
continue;
|
|
504
|
+
case 8:
|
|
505
|
+
if (tag !== 66) {
|
|
506
|
+
break;
|
|
507
|
+
}
|
|
508
|
+
message.deletedAt = Timestamp.decode(reader, reader.uint32());
|
|
509
|
+
continue;
|
|
510
|
+
}
|
|
511
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
512
|
+
break;
|
|
513
|
+
}
|
|
514
|
+
reader.skipType(tag & 7);
|
|
515
|
+
}
|
|
516
|
+
return message;
|
|
517
|
+
},
|
|
518
|
+
};
|
|
519
|
+
function createBaseGrpcDtoExchangeRates() {
|
|
520
|
+
return { items: [] };
|
|
521
|
+
}
|
|
522
|
+
export const GrpcDtoExchangeRates = {
|
|
523
|
+
encode(message, writer = _m0.Writer.create()) {
|
|
524
|
+
for (const v of message.items) {
|
|
525
|
+
GrpcDtoExchangeRate.encode(v, writer.uint32(10).fork()).ldelim();
|
|
526
|
+
}
|
|
527
|
+
if (message.meta !== undefined) {
|
|
528
|
+
GrpcDtoPagination.encode(message.meta, writer.uint32(18).fork()).ldelim();
|
|
529
|
+
}
|
|
530
|
+
return writer;
|
|
531
|
+
},
|
|
532
|
+
decode(input, length) {
|
|
533
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
534
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
535
|
+
const message = createBaseGrpcDtoExchangeRates();
|
|
536
|
+
while (reader.pos < end) {
|
|
537
|
+
const tag = reader.uint32();
|
|
538
|
+
switch (tag >>> 3) {
|
|
539
|
+
case 1:
|
|
540
|
+
if (tag !== 10) {
|
|
541
|
+
break;
|
|
542
|
+
}
|
|
543
|
+
message.items.push(GrpcDtoExchangeRate.decode(reader, reader.uint32()));
|
|
544
|
+
continue;
|
|
545
|
+
case 2:
|
|
546
|
+
if (tag !== 18) {
|
|
547
|
+
break;
|
|
548
|
+
}
|
|
549
|
+
message.meta = GrpcDtoPagination.decode(reader, reader.uint32());
|
|
550
|
+
continue;
|
|
551
|
+
}
|
|
552
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
553
|
+
break;
|
|
554
|
+
}
|
|
555
|
+
reader.skipType(tag & 7);
|
|
556
|
+
}
|
|
557
|
+
return message;
|
|
558
|
+
},
|
|
559
|
+
};
|
|
560
|
+
function createBaseGrpcDtoExchangeRateConvertion() {
|
|
561
|
+
return { amount: 0 };
|
|
562
|
+
}
|
|
563
|
+
export const GrpcDtoExchangeRateConvertion = {
|
|
564
|
+
encode(message, writer = _m0.Writer.create()) {
|
|
565
|
+
if (message.amount !== 0) {
|
|
566
|
+
writer.uint32(13).float(message.amount);
|
|
567
|
+
}
|
|
568
|
+
return writer;
|
|
569
|
+
},
|
|
570
|
+
decode(input, length) {
|
|
571
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
572
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
573
|
+
const message = createBaseGrpcDtoExchangeRateConvertion();
|
|
574
|
+
while (reader.pos < end) {
|
|
575
|
+
const tag = reader.uint32();
|
|
576
|
+
switch (tag >>> 3) {
|
|
577
|
+
case 1:
|
|
578
|
+
if (tag !== 13) {
|
|
579
|
+
break;
|
|
580
|
+
}
|
|
581
|
+
message.amount = reader.float();
|
|
582
|
+
continue;
|
|
583
|
+
}
|
|
584
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
585
|
+
break;
|
|
586
|
+
}
|
|
587
|
+
reader.skipType(tag & 7);
|
|
588
|
+
}
|
|
589
|
+
return message;
|
|
590
|
+
},
|
|
591
|
+
};
|
|
592
|
+
export function BillingServiceControllerMethods() {
|
|
593
|
+
return function (constructor) {
|
|
594
|
+
const grpcMethods = ["rates", "create", "convertion", "clearCache"];
|
|
595
|
+
for (const method of grpcMethods) {
|
|
596
|
+
const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
597
|
+
GrpcMethod("BillingService", method)(constructor.prototype[method], method, descriptor);
|
|
598
|
+
}
|
|
599
|
+
const grpcStreamMethods = [];
|
|
600
|
+
for (const method of grpcStreamMethods) {
|
|
601
|
+
const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
602
|
+
GrpcStreamMethod("BillingService", method)(constructor.prototype[method], method, descriptor);
|
|
603
|
+
}
|
|
604
|
+
};
|
|
605
|
+
}
|
|
606
|
+
export const BILLING_SERVICE_NAME = "BillingService";
|
|
607
|
+
export const BillingServiceService = {
|
|
608
|
+
/** --- Exchange Rate --- */
|
|
609
|
+
rates: {
|
|
610
|
+
path: "/aegis.billing.v1.BillingService/Rates",
|
|
611
|
+
requestStream: false,
|
|
612
|
+
responseStream: false,
|
|
613
|
+
requestSerialize: (value) => Buffer.from(GrpcInputExchangeRates.encode(value).finish()),
|
|
614
|
+
requestDeserialize: (value) => GrpcInputExchangeRates.decode(value),
|
|
615
|
+
responseSerialize: (value) => Buffer.from(GrpcDtoExchangeRates.encode(value).finish()),
|
|
616
|
+
responseDeserialize: (value) => GrpcDtoExchangeRates.decode(value),
|
|
617
|
+
},
|
|
618
|
+
create: {
|
|
619
|
+
path: "/aegis.billing.v1.BillingService/Create",
|
|
620
|
+
requestStream: false,
|
|
621
|
+
responseStream: false,
|
|
622
|
+
requestSerialize: (value) => Buffer.from(GrpcInputExchangeRateCreate.encode(value).finish()),
|
|
623
|
+
requestDeserialize: (value) => GrpcInputExchangeRateCreate.decode(value),
|
|
624
|
+
responseSerialize: (value) => Buffer.from(GrpcDtoExchangeRate.encode(value).finish()),
|
|
625
|
+
responseDeserialize: (value) => GrpcDtoExchangeRate.decode(value),
|
|
626
|
+
},
|
|
627
|
+
convertion: {
|
|
628
|
+
path: "/aegis.billing.v1.BillingService/Convertion",
|
|
629
|
+
requestStream: false,
|
|
630
|
+
responseStream: false,
|
|
631
|
+
requestSerialize: (value) => Buffer.from(GrpcInputExchangeRateConversion.encode(value).finish()),
|
|
632
|
+
requestDeserialize: (value) => GrpcInputExchangeRateConversion.decode(value),
|
|
633
|
+
responseSerialize: (value) => Buffer.from(GrpcDtoExchangeRateConvertion.encode(value).finish()),
|
|
634
|
+
responseDeserialize: (value) => GrpcDtoExchangeRateConvertion.decode(value),
|
|
635
|
+
},
|
|
636
|
+
clearCache: {
|
|
637
|
+
path: "/aegis.billing.v1.BillingService/ClearCache",
|
|
638
|
+
requestStream: false,
|
|
639
|
+
responseStream: false,
|
|
640
|
+
requestSerialize: (value) => Buffer.from(GrpcInputExchangeRateCacheClear.encode(value).finish()),
|
|
641
|
+
requestDeserialize: (value) => GrpcInputExchangeRateCacheClear.decode(value),
|
|
642
|
+
responseSerialize: (value) => Buffer.from(GrpcDtoMessage.encode(value).finish()),
|
|
643
|
+
responseDeserialize: (value) => GrpcDtoMessage.decode(value),
|
|
644
|
+
},
|
|
645
|
+
};
|
package/dist/src/index.d.ts
CHANGED
|
@@ -4,4 +4,5 @@ export * as v1System from "./gen/system/v1/system";
|
|
|
4
4
|
export * as v1Agent from "./gen/agent/v1/agent";
|
|
5
5
|
export * as v1Analytics from "./gen/analytics/v1/analytics";
|
|
6
6
|
export * as v1Ops from "./gen/ops/v1/ops";
|
|
7
|
+
export * as v1Billing from "./gen/billing/v1/billing";
|
|
7
8
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/src/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,QAAQ,MAAM,wBAAwB,CAAC;AACnD,OAAO,KAAK,MAAM,MAAM,oBAAoB,CAAC;AAC7C,OAAO,KAAK,QAAQ,MAAM,wBAAwB,CAAC;AACnD,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAC;AAChD,OAAO,KAAK,WAAW,MAAM,8BAA8B,CAAC;AAC5D,OAAO,KAAK,KAAK,MAAM,kBAAkB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,QAAQ,MAAM,wBAAwB,CAAC;AACnD,OAAO,KAAK,MAAM,MAAM,oBAAoB,CAAC;AAC7C,OAAO,KAAK,QAAQ,MAAM,wBAAwB,CAAC;AACnD,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAC;AAChD,OAAO,KAAK,WAAW,MAAM,8BAA8B,CAAC;AAC5D,OAAO,KAAK,KAAK,MAAM,kBAAkB,CAAC;AAC1C,OAAO,KAAK,SAAS,MAAM,0BAA0B,CAAC"}
|
package/dist/src/index.js
CHANGED
package/package.json
CHANGED
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
package aegis.billing.v1;
|
|
4
|
+
|
|
5
|
+
option java_multiple_files = true;
|
|
6
|
+
|
|
7
|
+
import "google/protobuf/timestamp.proto";
|
|
8
|
+
// import "shared/v1/shared.proto";
|
|
9
|
+
|
|
10
|
+
// ---- TO BE SHARED ----
|
|
11
|
+
|
|
12
|
+
message GrpcDtoPagination {
|
|
13
|
+
int32 total_items = 1;
|
|
14
|
+
int32 total_pages = 2;
|
|
15
|
+
int32 current_page = 3;
|
|
16
|
+
int32 page_size = 4;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
message GrpcDtoMessage {
|
|
20
|
+
string message = 1;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
// ---- CURRENCY ----
|
|
24
|
+
message GrpcDtoCurrency {
|
|
25
|
+
string publicId = 1;
|
|
26
|
+
string code = 2;
|
|
27
|
+
string name = 3;
|
|
28
|
+
string symbol = 4;
|
|
29
|
+
bool isActive = 5;
|
|
30
|
+
float exchangeRate = 6;
|
|
31
|
+
google.protobuf.Timestamp createdAt = 7;
|
|
32
|
+
google.protobuf.Timestamp updatedAt = 8;
|
|
33
|
+
google.protobuf.Timestamp deletedAt = 9;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
// ---- EXCHANGE RATE ----
|
|
37
|
+
message GrpcInputExchangeRates {
|
|
38
|
+
optional string baseCurrencyPublicId = 1;
|
|
39
|
+
optional string quoteCurrencyPublicId = 2;
|
|
40
|
+
optional string search = 3;
|
|
41
|
+
optional int32 page = 4;
|
|
42
|
+
optional int32 pageSize = 5;
|
|
43
|
+
optional string sortBy = 6;
|
|
44
|
+
optional string sortOrder = 7;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
message GrpcInputExchangeRateCreate {
|
|
48
|
+
string baseCurrencyPublicId = 1;
|
|
49
|
+
string quoteCurrencyPublicId = 2;
|
|
50
|
+
string rate = 3;
|
|
51
|
+
string source = 4;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
message GrpcInputExchangeRateCacheClear {
|
|
55
|
+
// optional string servicePublicId = 1;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
message GrpcInputExchangeRateConversion {
|
|
59
|
+
string fromCode = 1;
|
|
60
|
+
string toCode = 2;
|
|
61
|
+
string amount = 3;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
message GrpcDtoExchangeRate {
|
|
65
|
+
string publicId = 1;
|
|
66
|
+
optional GrpcDtoCurrency baseCurrency = 2;
|
|
67
|
+
optional GrpcDtoCurrency quoteCurrency = 3;
|
|
68
|
+
string rate = 4;
|
|
69
|
+
string source = 5;
|
|
70
|
+
google.protobuf.Timestamp createdAt = 6;
|
|
71
|
+
google.protobuf.Timestamp updatedAt = 7;
|
|
72
|
+
google.protobuf.Timestamp deletedAt = 8;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
message GrpcDtoExchangeRates {
|
|
76
|
+
repeated GrpcDtoExchangeRate items = 1;
|
|
77
|
+
GrpcDtoPagination meta = 2;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
message GrpcDtoExchangeRateConvertion {
|
|
81
|
+
float amount = 1;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
service BillingService {
|
|
85
|
+
// --- Exchange Rate ---
|
|
86
|
+
rpc Rates (GrpcInputExchangeRates) returns (GrpcDtoExchangeRates);
|
|
87
|
+
rpc Create (GrpcInputExchangeRateCreate) returns (GrpcDtoExchangeRate);
|
|
88
|
+
rpc Convertion (GrpcInputExchangeRateConversion) returns (GrpcDtoExchangeRateConvertion);
|
|
89
|
+
rpc ClearCache (GrpcInputExchangeRateCacheClear) returns (GrpcDtoMessage);
|
|
90
|
+
}
|