@wenlarge/communication 1.4.1 → 1.4.2

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.
@@ -52,6 +52,23 @@ export interface CancelGrantRequest {
52
52
  grantId: string;
53
53
  companyId: string;
54
54
  }
55
+ export interface FindManyEntitlementGrantRequest {
56
+ skip: number;
57
+ take: number;
58
+ }
59
+ export interface FindManyEntitlementGrantResponse {
60
+ data: EntitlementGrantInfo[];
61
+ total: number;
62
+ }
63
+ export interface EntitlementGrantInfo {
64
+ grantId: string;
65
+ grantType: string;
66
+ status: string;
67
+ nodeAllowance: number;
68
+ used: number;
69
+ validFrom: string;
70
+ validUntil: string;
71
+ }
55
72
  export declare const BILLING_PACKAGE_NAME = "billing";
56
73
  export interface BillingServiceClient {
57
74
  assignWelcomeGrant(request: AssignWelcomeGrantRequest, metadata?: Metadata): Observable<Empty>;
@@ -60,6 +77,7 @@ export interface BillingServiceClient {
60
77
  findManyPlan(request: Empty, metadata?: Metadata): Observable<FindManyPlanResponse>;
61
78
  createCheckoutSession(request: CreateCheckoutSessionRequest, metadata?: Metadata): Observable<CreateCheckoutSessionResponse>;
62
79
  cancelGrant(request: CancelGrantRequest, metadata?: Metadata): Observable<Empty>;
80
+ findManyEntitlementGrant(request: FindManyEntitlementGrantRequest, metadata?: Metadata): Observable<FindManyEntitlementGrantResponse>;
63
81
  }
64
82
  export interface BillingServiceController {
65
83
  assignWelcomeGrant(request: AssignWelcomeGrantRequest, metadata?: Metadata): void;
@@ -68,6 +86,7 @@ export interface BillingServiceController {
68
86
  findManyPlan(request: Empty, metadata?: Metadata): Promise<FindManyPlanResponse> | Observable<FindManyPlanResponse> | FindManyPlanResponse;
69
87
  createCheckoutSession(request: CreateCheckoutSessionRequest, metadata?: Metadata): Promise<CreateCheckoutSessionResponse> | Observable<CreateCheckoutSessionResponse> | CreateCheckoutSessionResponse;
70
88
  cancelGrant(request: CancelGrantRequest, metadata?: Metadata): void;
89
+ findManyEntitlementGrant(request: FindManyEntitlementGrantRequest, metadata?: Metadata): Promise<FindManyEntitlementGrantResponse> | Observable<FindManyEntitlementGrantResponse> | FindManyEntitlementGrantResponse;
71
90
  }
72
91
  export declare function BillingServiceControllerMethods(): (constructor: Function) => void;
73
92
  export declare const BILLING_SERVICE_NAME = "BillingService";
@@ -19,6 +19,7 @@ function BillingServiceControllerMethods() {
19
19
  "findManyPlan",
20
20
  "createCheckoutSession",
21
21
  "cancelGrant",
22
+ "findManyEntitlementGrant",
22
23
  ];
23
24
  for (const method of grpcMethods) {
24
25
  const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wenlarge/communication",
3
- "version": "1.4.1",
3
+ "version": "1.4.2",
4
4
  "description": "Shared gRPC proto interfaces and generated clients for Wenlarge microservices.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -10,6 +10,7 @@ service BillingService {
10
10
  rpc FindManyPlan (google.protobuf.Empty) returns (FindManyPlanResponse);
11
11
  rpc CreateCheckoutSession(CreateCheckoutSessionRequest) returns (CreateCheckoutSessionResponse);
12
12
  rpc CancelGrant(CancelGrantRequest) returns (google.protobuf.Empty);
13
+ rpc FindManyEntitlementGrant(FindManyEntitlementGrantRequest) returns (FindManyEntitlementGrantResponse);
13
14
  }
14
15
 
15
16
  message AssignWelcomeGrantRequest {
@@ -70,4 +71,24 @@ message CreateCheckoutSessionResponse {
70
71
  message CancelGrantRequest {
71
72
  string grantId = 1;
72
73
  string companyId = 2;
74
+ }
75
+
76
+ message FindManyEntitlementGrantRequest {
77
+ int32 skip = 1;
78
+ int32 take = 2;
79
+ }
80
+
81
+ message FindManyEntitlementGrantResponse {
82
+ repeated EntitlementGrantInfo data = 1;
83
+ int32 total = 2;
84
+ }
85
+
86
+ message EntitlementGrantInfo {
87
+ string grantId = 1;
88
+ string grantType = 2;
89
+ string status = 3;
90
+ int32 nodeAllowance = 4;
91
+ int32 used = 5;
92
+ string validFrom = 6;
93
+ string validUntil = 7;
73
94
  }
@@ -72,6 +72,26 @@ export interface CancelGrantRequest {
72
72
  companyId: string;
73
73
  }
74
74
 
75
+ export interface FindManyEntitlementGrantRequest {
76
+ skip: number;
77
+ take: number;
78
+ }
79
+
80
+ export interface FindManyEntitlementGrantResponse {
81
+ data: EntitlementGrantInfo[];
82
+ total: number;
83
+ }
84
+
85
+ export interface EntitlementGrantInfo {
86
+ grantId: string;
87
+ grantType: string;
88
+ status: string;
89
+ nodeAllowance: number;
90
+ used: number;
91
+ validFrom: string;
92
+ validUntil: string;
93
+ }
94
+
75
95
  export const BILLING_PACKAGE_NAME = "billing";
76
96
 
77
97
  export interface BillingServiceClient {
@@ -89,6 +109,11 @@ export interface BillingServiceClient {
89
109
  ): Observable<CreateCheckoutSessionResponse>;
90
110
 
91
111
  cancelGrant(request: CancelGrantRequest, metadata?: Metadata): Observable<Empty>;
112
+
113
+ findManyEntitlementGrant(
114
+ request: FindManyEntitlementGrantRequest,
115
+ metadata?: Metadata,
116
+ ): Observable<FindManyEntitlementGrantResponse>;
92
117
  }
93
118
 
94
119
  export interface BillingServiceController {
@@ -112,6 +137,14 @@ export interface BillingServiceController {
112
137
  ): Promise<CreateCheckoutSessionResponse> | Observable<CreateCheckoutSessionResponse> | CreateCheckoutSessionResponse;
113
138
 
114
139
  cancelGrant(request: CancelGrantRequest, metadata?: Metadata): void;
140
+
141
+ findManyEntitlementGrant(
142
+ request: FindManyEntitlementGrantRequest,
143
+ metadata?: Metadata,
144
+ ):
145
+ | Promise<FindManyEntitlementGrantResponse>
146
+ | Observable<FindManyEntitlementGrantResponse>
147
+ | FindManyEntitlementGrantResponse;
115
148
  }
116
149
 
117
150
  export function BillingServiceControllerMethods() {
@@ -123,6 +156,7 @@ export function BillingServiceControllerMethods() {
123
156
  "findManyPlan",
124
157
  "createCheckoutSession",
125
158
  "cancelGrant",
159
+ "findManyEntitlementGrant",
126
160
  ];
127
161
  for (const method of grpcMethods) {
128
162
  const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);