@wenlarge/communication 1.4.2 → 1.4.3

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.
@@ -2,17 +2,6 @@ import { Metadata } from "@grpc/grpc-js";
2
2
  import { Observable } from "rxjs";
3
3
  import { Empty } from "./google/protobuf/empty";
4
4
  export declare const protobufPackage = "billing";
5
- export interface AssignWelcomeGrantRequest {
6
- companyId: string;
7
- }
8
- export interface CheckQuotaRequest {
9
- companyId: string;
10
- workflowId: string;
11
- nodeId: string;
12
- }
13
- export interface GetBillingStatusRequest {
14
- companyId: string;
15
- }
16
5
  export interface GetBillingStatusResponse {
17
6
  totalAllowance: number;
18
7
  used: number;
@@ -40,7 +29,6 @@ export interface PlanInfo {
40
29
  stripePriceId: string;
41
30
  }
42
31
  export interface CreateCheckoutSessionRequest {
43
- companyId: string;
44
32
  planSlug: string;
45
33
  successUrl: string;
46
34
  cancelUrl: string;
@@ -50,7 +38,6 @@ export interface CreateCheckoutSessionResponse {
50
38
  }
51
39
  export interface CancelGrantRequest {
52
40
  grantId: string;
53
- companyId: string;
54
41
  }
55
42
  export interface FindManyEntitlementGrantRequest {
56
43
  skip: number;
@@ -71,18 +58,18 @@ export interface EntitlementGrantInfo {
71
58
  }
72
59
  export declare const BILLING_PACKAGE_NAME = "billing";
73
60
  export interface BillingServiceClient {
74
- assignWelcomeGrant(request: AssignWelcomeGrantRequest, metadata?: Metadata): Observable<Empty>;
75
- checkQuota(request: CheckQuotaRequest, metadata?: Metadata): Observable<Empty>;
76
- getBillingStatus(request: GetBillingStatusRequest, metadata?: Metadata): Observable<GetBillingStatusResponse>;
61
+ assignWelcomeGrant(request: Empty, metadata?: Metadata): Observable<Empty>;
62
+ checkQuota(request: Empty, metadata?: Metadata): Observable<Empty>;
63
+ getBillingStatus(request: Empty, metadata?: Metadata): Observable<GetBillingStatusResponse>;
77
64
  findManyPlan(request: Empty, metadata?: Metadata): Observable<FindManyPlanResponse>;
78
65
  createCheckoutSession(request: CreateCheckoutSessionRequest, metadata?: Metadata): Observable<CreateCheckoutSessionResponse>;
79
66
  cancelGrant(request: CancelGrantRequest, metadata?: Metadata): Observable<Empty>;
80
67
  findManyEntitlementGrant(request: FindManyEntitlementGrantRequest, metadata?: Metadata): Observable<FindManyEntitlementGrantResponse>;
81
68
  }
82
69
  export interface BillingServiceController {
83
- assignWelcomeGrant(request: AssignWelcomeGrantRequest, metadata?: Metadata): void;
84
- checkQuota(request: CheckQuotaRequest, metadata?: Metadata): void;
85
- getBillingStatus(request: GetBillingStatusRequest, metadata?: Metadata): Promise<GetBillingStatusResponse> | Observable<GetBillingStatusResponse> | GetBillingStatusResponse;
70
+ assignWelcomeGrant(request: Empty, metadata?: Metadata): void;
71
+ checkQuota(request: Empty, metadata?: Metadata): void;
72
+ getBillingStatus(request: Empty, metadata?: Metadata): Promise<GetBillingStatusResponse> | Observable<GetBillingStatusResponse> | GetBillingStatusResponse;
86
73
  findManyPlan(request: Empty, metadata?: Metadata): Promise<FindManyPlanResponse> | Observable<FindManyPlanResponse> | FindManyPlanResponse;
87
74
  createCheckoutSession(request: CreateCheckoutSessionRequest, metadata?: Metadata): Promise<CreateCheckoutSessionResponse> | Observable<CreateCheckoutSessionResponse> | CreateCheckoutSessionResponse;
88
75
  cancelGrant(request: CancelGrantRequest, metadata?: Metadata): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wenlarge/communication",
3
- "version": "1.4.2",
3
+ "version": "1.4.3",
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",
@@ -4,29 +4,15 @@ import "google/protobuf/empty.proto";
4
4
  package billing;
5
5
 
6
6
  service BillingService {
7
- rpc AssignWelcomeGrant(AssignWelcomeGrantRequest) returns (google.protobuf.Empty);
8
- rpc CheckQuota(CheckQuotaRequest) returns (google.protobuf.Empty);
9
- rpc GetBillingStatus(GetBillingStatusRequest) returns (GetBillingStatusResponse);
7
+ rpc AssignWelcomeGrant(google.protobuf.Empty) returns (google.protobuf.Empty);
8
+ rpc CheckQuota(google.protobuf.Empty) returns (google.protobuf.Empty);
9
+ rpc GetBillingStatus(google.protobuf.Empty) returns (GetBillingStatusResponse);
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
13
  rpc FindManyEntitlementGrant(FindManyEntitlementGrantRequest) returns (FindManyEntitlementGrantResponse);
14
14
  }
15
15
 
16
- message AssignWelcomeGrantRequest {
17
- string companyId = 1;
18
- }
19
-
20
- message CheckQuotaRequest {
21
- string companyId = 1;
22
- string workflowId = 2;
23
- string nodeId = 3;
24
- }
25
-
26
- message GetBillingStatusRequest {
27
- string companyId = 1;
28
- }
29
-
30
16
  message GetBillingStatusResponse {
31
17
  int32 totalAllowance = 1;
32
18
  int32 used = 2;
@@ -58,10 +44,9 @@ message PlanInfo {
58
44
  }
59
45
 
60
46
  message CreateCheckoutSessionRequest {
61
- string companyId = 1;
62
- string planSlug = 2;
63
- string successUrl = 3;
64
- string cancelUrl = 4;
47
+ string planSlug = 1;
48
+ string successUrl = 2;
49
+ string cancelUrl = 3;
65
50
  }
66
51
 
67
52
  message CreateCheckoutSessionResponse {
@@ -70,7 +55,6 @@ message CreateCheckoutSessionResponse {
70
55
 
71
56
  message CancelGrantRequest {
72
57
  string grantId = 1;
73
- string companyId = 2;
74
58
  }
75
59
 
76
60
  message FindManyEntitlementGrantRequest {
@@ -12,20 +12,6 @@ import { Empty } from "./google/protobuf/empty";
12
12
 
13
13
  export const protobufPackage = "billing";
14
14
 
15
- export interface AssignWelcomeGrantRequest {
16
- companyId: string;
17
- }
18
-
19
- export interface CheckQuotaRequest {
20
- companyId: string;
21
- workflowId: string;
22
- nodeId: string;
23
- }
24
-
25
- export interface GetBillingStatusRequest {
26
- companyId: string;
27
- }
28
-
29
15
  export interface GetBillingStatusResponse {
30
16
  totalAllowance: number;
31
17
  used: number;
@@ -57,7 +43,6 @@ export interface PlanInfo {
57
43
  }
58
44
 
59
45
  export interface CreateCheckoutSessionRequest {
60
- companyId: string;
61
46
  planSlug: string;
62
47
  successUrl: string;
63
48
  cancelUrl: string;
@@ -69,7 +54,6 @@ export interface CreateCheckoutSessionResponse {
69
54
 
70
55
  export interface CancelGrantRequest {
71
56
  grantId: string;
72
- companyId: string;
73
57
  }
74
58
 
75
59
  export interface FindManyEntitlementGrantRequest {
@@ -95,11 +79,11 @@ export interface EntitlementGrantInfo {
95
79
  export const BILLING_PACKAGE_NAME = "billing";
96
80
 
97
81
  export interface BillingServiceClient {
98
- assignWelcomeGrant(request: AssignWelcomeGrantRequest, metadata?: Metadata): Observable<Empty>;
82
+ assignWelcomeGrant(request: Empty, metadata?: Metadata): Observable<Empty>;
99
83
 
100
- checkQuota(request: CheckQuotaRequest, metadata?: Metadata): Observable<Empty>;
84
+ checkQuota(request: Empty, metadata?: Metadata): Observable<Empty>;
101
85
 
102
- getBillingStatus(request: GetBillingStatusRequest, metadata?: Metadata): Observable<GetBillingStatusResponse>;
86
+ getBillingStatus(request: Empty, metadata?: Metadata): Observable<GetBillingStatusResponse>;
103
87
 
104
88
  findManyPlan(request: Empty, metadata?: Metadata): Observable<FindManyPlanResponse>;
105
89
 
@@ -117,12 +101,12 @@ export interface BillingServiceClient {
117
101
  }
118
102
 
119
103
  export interface BillingServiceController {
120
- assignWelcomeGrant(request: AssignWelcomeGrantRequest, metadata?: Metadata): void;
104
+ assignWelcomeGrant(request: Empty, metadata?: Metadata): void;
121
105
 
122
- checkQuota(request: CheckQuotaRequest, metadata?: Metadata): void;
106
+ checkQuota(request: Empty, metadata?: Metadata): void;
123
107
 
124
108
  getBillingStatus(
125
- request: GetBillingStatusRequest,
109
+ request: Empty,
126
110
  metadata?: Metadata,
127
111
  ): Promise<GetBillingStatusResponse> | Observable<GetBillingStatusResponse> | GetBillingStatusResponse;
128
112