@chotot/ct-logic-uni-rev-order-v1 1.197.0 → 1.202.0

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.
@@ -16,13 +16,14 @@ message RequestChangeOrderStatusRequest {
16
16
  }];
17
17
  string payment_method = 3 [(validate.rules).string = {
18
18
  min_len: 1,
19
- in: ["virtual_account"],
19
+ in: ["virtual_account", "virtual_account_cake", "bank_transfer"],
20
20
  }];
21
21
  string customer_ticket_id = 4 [(validate.rules).string = {min_len: 1}];
22
22
  string admin_id = 5 [(validate.rules).string = {min_len: 1}];
23
23
  optional string remark = 6;
24
24
  optional string transaction_id = 7;
25
25
  repeated string credentials = 8;
26
+ int64 amount = 9;
26
27
  }
27
28
 
28
29
  message RequestChangeOrderStatusResponse {}
@@ -52,6 +52,11 @@ export declare class RequestChangeOrderStatusRequest extends Message<RequestChan
52
52
  */
53
53
  credentials: string[];
54
54
 
55
+ /**
56
+ * @generated from field: int64 amount = 9;
57
+ */
58
+ amount: bigint;
59
+
55
60
  constructor(data?: PartialMessage<RequestChangeOrderStatusRequest>);
56
61
 
57
62
  static readonly runtime: typeof proto3;
@@ -21,6 +21,7 @@ export const RequestChangeOrderStatusRequest = proto3.makeMessageType(
21
21
  { no: 6, name: "remark", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
22
22
  { no: 7, name: "transaction_id", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
23
23
  { no: 8, name: "credentials", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true },
24
+ { no: 9, name: "amount", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
24
25
  ],
25
26
  );
26
27
 
@@ -27,6 +27,7 @@ message CreateOnbehalfOrderRequest {
27
27
  repeated CreateOnbehalfOrderServiceRequest services = 5 [(validate.rules).repeated = {min_items: 1}];
28
28
  bool is_active = 6;
29
29
  string full_name = 7;
30
+ string payment_method = 8; // e.g. credit, credit_biz
30
31
  }
31
32
 
32
33
  message CreateOnbehalfOrderServiceRequest {
@@ -70,6 +70,13 @@ export declare class CreateOnbehalfOrderRequest extends Message<CreateOnbehalfOr
70
70
  */
71
71
  fullName: string;
72
72
 
73
+ /**
74
+ * e.g. credit, credit_biz
75
+ *
76
+ * @generated from field: string payment_method = 8;
77
+ */
78
+ paymentMethod: string;
79
+
73
80
  constructor(data?: PartialMessage<CreateOnbehalfOrderRequest>);
74
81
 
75
82
  static readonly runtime: typeof proto3;
@@ -31,6 +31,7 @@ export const CreateOnbehalfOrderRequest = proto3.makeMessageType(
31
31
  { no: 5, name: "services", kind: "message", T: CreateOnbehalfOrderServiceRequest, repeated: true },
32
32
  { no: 6, name: "is_active", kind: "scalar", T: 8 /* ScalarType.BOOL */ },
33
33
  { no: 7, name: "full_name", kind: "scalar", T: 9 /* ScalarType.STRING */ },
34
+ { no: 8, name: "payment_method", kind: "scalar", T: 9 /* ScalarType.STRING */ },
34
35
  ],
35
36
  );
36
37
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chotot/ct-logic-uni-rev-order-v1",
3
- "version": "1.197.0",
3
+ "version": "1.202.0",
4
4
  "dependencies": {
5
5
  "@bufbuild/protobuf": "1.3.1",
6
6
  "@connectrpc/connect": "1.0.0",
@@ -140,8 +140,15 @@ message WarningPopup {
140
140
  }
141
141
 
142
142
  message GetOrderInfoCheckoutRequest {
143
- string payment_code = 1 [ (validate.rules).string = {min_len : 1} ];
143
+ string payment_code = 1 [(validate.rules).string = {
144
+ ignore_empty: true,
145
+ min_len: 1,
146
+ }];
144
147
  int64 account_id = 2 [ (validate.rules).int64 = {gte : 0} ];
148
+ int64 order_id = 3 [(validate.rules).int64 = {
149
+ ignore_empty: true,
150
+ gt: 0,
151
+ }];
145
152
  }
146
153
 
147
154
  message GetOrderInfoCheckoutResponse {
@@ -558,6 +558,11 @@ export declare class GetOrderInfoCheckoutRequest extends Message<GetOrderInfoChe
558
558
  */
559
559
  accountId: bigint;
560
560
 
561
+ /**
562
+ * @generated from field: int64 order_id = 3;
563
+ */
564
+ orderId: bigint;
565
+
561
566
  constructor(data?: PartialMessage<GetOrderInfoCheckoutRequest>);
562
567
 
563
568
  static readonly runtime: typeof proto3;
@@ -196,6 +196,7 @@ export const GetOrderInfoCheckoutRequest = proto3.makeMessageType(
196
196
  () => [
197
197
  { no: 1, name: "payment_code", kind: "scalar", T: 9 /* ScalarType.STRING */ },
198
198
  { no: 2, name: "account_id", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
199
+ { no: 3, name: "order_id", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
199
200
  ],
200
201
  );
201
202
 
@@ -1,50 +0,0 @@
1
- const fs = require('fs').promises;
2
- const path = require('path');
3
-
4
- async function modifyPackageJson() {
5
- const args = process.argv.slice(2);
6
- if (args.length < 4) {
7
- console.error('Usage: node modify_package_json.js <packageExtractPath> <newName> <newVersion> <verdaccioHostname>');
8
- process.exit(1);
9
- }
10
-
11
- const packageExtractPath = args[0]; // e.g., /tmp/npm-migration-xxxxxx/package
12
- const newName = args[1];
13
- const newVersion = args[2];
14
- const verdaccioHostname = args[3]; // e.g., npmjs.cmco.io
15
-
16
- const packageJsonPath = path.join(packageExtractPath, 'package.json');
17
-
18
- try {
19
- console.log(`Reading package.json from: ${packageJsonPath}`);
20
- let packageJsonContent = await fs.readFile(packageJsonPath, 'utf8');
21
- let packageJson = JSON.parse(packageJsonContent);
22
-
23
- console.log(`Original name: ${packageJson.name}, version: ${packageJson.version}`);
24
-
25
- packageJson.name = newName;
26
- packageJson.version = newVersion;
27
-
28
- // Remove publishConfig if it points to the old Verdaccio registry
29
- if (packageJson.publishConfig && packageJson.publishConfig.registry) {
30
- try {
31
- const publishRegistryUrl = new URL(packageJson.publishConfig.registry);
32
- if (publishRegistryUrl.hostname === verdaccioHostname) {
33
- delete packageJson.publishConfig;
34
- console.log(`Removed publishConfig pointing to ${verdaccioHostname}`);
35
- }
36
- } catch (e) {
37
- console.warn(`Could not parse publishConfig.registry: ${packageJson.publishConfig.registry}. Skipping removal.`);
38
- }
39
- }
40
-
41
- await fs.writeFile(packageJsonPath, JSON.stringify(packageJson, null, 2));
42
- console.log(`Successfully modified package.json. New name: ${packageJson.name}, new version: ${packageJson.version}`);
43
-
44
- } catch (error) {
45
- console.error(`Error modifying package.json at ${packageJsonPath}:`, error);
46
- process.exit(1);
47
- }
48
- }
49
-
50
- modifyPackageJson();