@devline-smart-taxi/common 2.3.47 → 2.3.49

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/index.d.ts CHANGED
@@ -41,3 +41,4 @@ export * from './dto/update-car-model.dto';
41
41
  export * from './proto/wallet-proto-path';
42
42
  export * from './proto/bonus-campaign-proto-path';
43
43
  export * from './proto/support-contact-proto-path';
44
+ export * from './proto/legal-document-proto-path';
package/dist/index.js CHANGED
@@ -58,3 +58,4 @@ __exportStar(require("./dto/update-car-model.dto"), exports);
58
58
  __exportStar(require("./proto/wallet-proto-path"), exports);
59
59
  __exportStar(require("./proto/bonus-campaign-proto-path"), exports);
60
60
  __exportStar(require("./proto/support-contact-proto-path"), exports);
61
+ __exportStar(require("./proto/legal-document-proto-path"), exports);
@@ -0,0 +1 @@
1
+ export declare const legalDocumentProtoPath: string;
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.legalDocumentProtoPath = void 0;
4
+ exports.legalDocumentProtoPath = `${__dirname}/legal-document.proto`;
@@ -0,0 +1,3 @@
1
+ declare const __dirname: string;
2
+
3
+ export const legalDocumentProtoPath = `${__dirname}/legal-document.proto`;
@@ -0,0 +1,63 @@
1
+ syntax = "proto3";
2
+
3
+ package legal_document;
4
+
5
+ import "common.proto";
6
+
7
+ // ==========================================
8
+ // 1. SERVICES
9
+ // ==========================================
10
+ service LegalDocumentService {
11
+ rpc Create (CreateLegalDocumentRequest) returns (LegalDocumentResponse);
12
+ rpc Update (UpdateLegalDocumentRequest) returns (LegalDocumentResponse);
13
+ rpc Delete (common.IdRequest) returns (common.SuccessResponseResult);
14
+ // Public — type bo'yicha active hujjatni olish
15
+ rpc GetByType (GetByTypeRequest) returns (LegalDocumentResponse);
16
+ // Admin — hammasi
17
+ rpc GetAllAdmin (common.NoParams) returns (LegalDocumentListResponse);
18
+ rpc GetById (common.IdRequest) returns (LegalDocumentResponse);
19
+ }
20
+
21
+ // ==========================================
22
+ // 2. REQUESTS
23
+ // ==========================================
24
+ message CreateLegalDocumentRequest {
25
+ string type = 1;
26
+ string title = 2;
27
+ string fileUrl = 3;
28
+ }
29
+
30
+ message GetByTypeRequest {
31
+ string type = 1;
32
+ }
33
+
34
+ message UpdateLegalDocumentRequest {
35
+ string id = 1;
36
+ optional string title = 2;
37
+ optional string fileUrl = 3;
38
+ }
39
+
40
+ // ==========================================
41
+ // 3. RESPONSES
42
+ // ==========================================
43
+ message LegalDocumentData {
44
+ string id = 1;
45
+ string type = 2;
46
+ string title = 3;
47
+ string fileUrl = 4;
48
+ int32 version = 5;
49
+ bool isActive = 6;
50
+ string createdAt = 7;
51
+ }
52
+
53
+ message LegalDocumentResponse {
54
+ int32 statusCode = 1;
55
+ string message = 2;
56
+ LegalDocumentData data = 3;
57
+ }
58
+
59
+ message LegalDocumentListResponse {
60
+ int32 statusCode = 1;
61
+ string message = 2;
62
+ repeated LegalDocumentData data = 3;
63
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@devline-smart-taxi/common",
3
- "version": "2.3.47",
3
+ "version": "2.3.49",
4
4
  "description": "Reusable NestJS common library",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",