@chotot/ct-logic-uni-rev-payment-v1 1.144.0 → 1.145.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.
- package/crepro_campaign.proto +6 -1
- package/crepro_campaign_pb.d.ts +31 -2
- package/crepro_campaign_pb.js +12 -1
- package/package.json +1 -1
- package/scripts/modify_package_json.js +0 -50
package/crepro_campaign.proto
CHANGED
|
@@ -187,12 +187,17 @@ message AssignCreditPromotionCodeRequest {
|
|
|
187
187
|
int64 campaign_id = 1 [(validate.rules).int64 = {
|
|
188
188
|
gt: 0
|
|
189
189
|
}];
|
|
190
|
-
repeated
|
|
190
|
+
repeated AccountWithCodeValue list_assignments = 2 [(validate.rules).repeated = {
|
|
191
191
|
max_items: 1000
|
|
192
192
|
}];
|
|
193
193
|
string action_by = 3;
|
|
194
194
|
}
|
|
195
195
|
|
|
196
|
+
message AccountWithCodeValue {
|
|
197
|
+
int64 account_id = 1;
|
|
198
|
+
string code = 2;
|
|
199
|
+
}
|
|
200
|
+
|
|
196
201
|
message AssignCreditPromotionCodeResponse {
|
|
197
202
|
string status = 1;
|
|
198
203
|
int64 quantity = 2;
|
package/crepro_campaign_pb.d.ts
CHANGED
|
@@ -770,9 +770,9 @@ export declare class AssignCreditPromotionCodeRequest extends Message<AssignCred
|
|
|
770
770
|
campaignId: bigint;
|
|
771
771
|
|
|
772
772
|
/**
|
|
773
|
-
* @generated from field: repeated
|
|
773
|
+
* @generated from field: repeated ct_logic_uni_rev_payment.v1.AccountWithCodeValue list_assignments = 2;
|
|
774
774
|
*/
|
|
775
|
-
|
|
775
|
+
listAssignments: AccountWithCodeValue[];
|
|
776
776
|
|
|
777
777
|
/**
|
|
778
778
|
* @generated from field: string action_by = 3;
|
|
@@ -794,6 +794,35 @@ export declare class AssignCreditPromotionCodeRequest extends Message<AssignCred
|
|
|
794
794
|
static equals(a: AssignCreditPromotionCodeRequest | PlainMessage<AssignCreditPromotionCodeRequest> | undefined, b: AssignCreditPromotionCodeRequest | PlainMessage<AssignCreditPromotionCodeRequest> | undefined): boolean;
|
|
795
795
|
}
|
|
796
796
|
|
|
797
|
+
/**
|
|
798
|
+
* @generated from message ct_logic_uni_rev_payment.v1.AccountWithCodeValue
|
|
799
|
+
*/
|
|
800
|
+
export declare class AccountWithCodeValue extends Message<AccountWithCodeValue> {
|
|
801
|
+
/**
|
|
802
|
+
* @generated from field: int64 account_id = 1;
|
|
803
|
+
*/
|
|
804
|
+
accountId: bigint;
|
|
805
|
+
|
|
806
|
+
/**
|
|
807
|
+
* @generated from field: string code = 2;
|
|
808
|
+
*/
|
|
809
|
+
code: string;
|
|
810
|
+
|
|
811
|
+
constructor(data?: PartialMessage<AccountWithCodeValue>);
|
|
812
|
+
|
|
813
|
+
static readonly runtime: typeof proto3;
|
|
814
|
+
static readonly typeName = "ct_logic_uni_rev_payment.v1.AccountWithCodeValue";
|
|
815
|
+
static readonly fields: FieldList;
|
|
816
|
+
|
|
817
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): AccountWithCodeValue;
|
|
818
|
+
|
|
819
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): AccountWithCodeValue;
|
|
820
|
+
|
|
821
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): AccountWithCodeValue;
|
|
822
|
+
|
|
823
|
+
static equals(a: AccountWithCodeValue | PlainMessage<AccountWithCodeValue> | undefined, b: AccountWithCodeValue | PlainMessage<AccountWithCodeValue> | undefined): boolean;
|
|
824
|
+
}
|
|
825
|
+
|
|
797
826
|
/**
|
|
798
827
|
* @generated from message ct_logic_uni_rev_payment.v1.AssignCreditPromotionCodeResponse
|
|
799
828
|
*/
|
package/crepro_campaign_pb.js
CHANGED
|
@@ -258,11 +258,22 @@ export const AssignCreditPromotionCodeRequest = proto3.makeMessageType(
|
|
|
258
258
|
"ct_logic_uni_rev_payment.v1.AssignCreditPromotionCodeRequest",
|
|
259
259
|
() => [
|
|
260
260
|
{ no: 1, name: "campaign_id", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
|
|
261
|
-
{ no: 2, name: "
|
|
261
|
+
{ no: 2, name: "list_assignments", kind: "message", T: AccountWithCodeValue, repeated: true },
|
|
262
262
|
{ no: 3, name: "action_by", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
263
263
|
],
|
|
264
264
|
);
|
|
265
265
|
|
|
266
|
+
/**
|
|
267
|
+
* @generated from message ct_logic_uni_rev_payment.v1.AccountWithCodeValue
|
|
268
|
+
*/
|
|
269
|
+
export const AccountWithCodeValue = proto3.makeMessageType(
|
|
270
|
+
"ct_logic_uni_rev_payment.v1.AccountWithCodeValue",
|
|
271
|
+
() => [
|
|
272
|
+
{ no: 1, name: "account_id", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
|
|
273
|
+
{ no: 2, name: "code", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
274
|
+
],
|
|
275
|
+
);
|
|
276
|
+
|
|
266
277
|
/**
|
|
267
278
|
* @generated from message ct_logic_uni_rev_payment.v1.AssignCreditPromotionCodeResponse
|
|
268
279
|
*/
|
package/package.json
CHANGED
|
@@ -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();
|