@lyxa.ai/core 1.3.197 → 1.3.198
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.
|
@@ -18,4 +18,8 @@ export interface ICashSettlementService {
|
|
|
18
18
|
markSettlementAsPaid(reference: string): Promise<boolean>;
|
|
19
19
|
hasPendingSettlements(reference: string): Promise<boolean>;
|
|
20
20
|
getLastSettlement(reference: string): Promise<ISettlementInfo | null>;
|
|
21
|
+
markSettlementAsPaidBySettlementId(settlementId: mongoose.Types.ObjectId): Promise<boolean>;
|
|
22
|
+
revokeRiderSettlements(rider: mongoose.Types.ObjectId): Promise<boolean>;
|
|
23
|
+
hasPendingRiderSettlements(riderId: mongoose.Types.ObjectId): Promise<boolean>;
|
|
24
|
+
getLastRiderSettlement(rider: mongoose.Types.ObjectId): Promise<ISettlementInfo | null>;
|
|
21
25
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ICashSettlement.js","sourceRoot":"/","sources":["libraries/cash-settlement/interfaces/ICashSettlement.ts"],"names":[],"mappings":";;;AAEA,IAAY,iBAIX;AAJD,WAAY,iBAAiB;IAC5B,0CAAqB,CAAA;IACrB,kCAAa,CAAA;IACb,wCAAmB,CAAA;AACpB,CAAC,EAJW,iBAAiB,iCAAjB,iBAAiB,QAI5B","sourcesContent":["import { mongoose } from '@typegoose/typegoose';\n\nexport enum ISettlementStatus {\n\tNOT_PAID = 'not_paid',\n\tPAID = 'paid',\n\tREVOKED = 'revoked',\n}\n\nexport type ISettlementInfo = {\n\tamount: number;\n\tcurrency: string;\n\tstatus: ISettlementStatus;\n\tcreatedAt: Date;\n\tupdatedAt: Date;\n\treferenceNumber: string;\n};\n\nexport interface ICashSettlementService {\n\t/**\n\t * Initiates a cash settlement process\n\t *\n\t * @param amount - The amount to be settled\n\t * @param currency - The currency of the amount\n\t * @param reference - A unique reference for the settlement\n\t * @param firstName - The first name of the settler\n\t * @param lastName - The last name of the settler\n\t * @param location - Optional location of the settler\n\t * @returns Confirmation of the settlement initiation\n\t */\n\tinitiateSettlement(\n\t\tamount: number,\n\t\tcurrency: string,\n\t\treference: string,\n\t\tfirstName: string,\n\t\tlastName: string,\n\t\triderId: mongoose.Types.ObjectId,\n\t\tlocation?: string\n\t): Promise<boolean>;\n\n\t/**\n\t * Revokes a cash settlement\n\t *\n\t * @param reference - The reference ID of the settlement to revoke\n\t * @returns Confirmation of the revocation\n\t */\n\trevokeSettlement(reference: string): Promise<boolean>;\n\n\t/**\n\t * Mark a settlement as paid\n\t *\n\t * @param reference - The reference ID of the settlement to update\n\t * @returns Confirmation of the update\n\t */\n\tmarkSettlementAsPaid(reference: string): Promise<boolean>;\n\n\t/**\n\t * Check if there are pending settlements\n\t *\n\t * @param reference - The reference ID of the settlement to check\n\t * @returns true if there are pending settlements, false otherwise\n\t */\n\thasPendingSettlements(reference: string): Promise<boolean>;\n\n\t/**\n\t * Get latest settlement info\n\t *\n\t * @param reference - The reference ID of the settlement to check\n\t * @returns the latest settlement if it exists, null otherwise\n\t */\n\tgetLastSettlement(reference: string): Promise<ISettlementInfo | null>;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"ICashSettlement.js","sourceRoot":"/","sources":["libraries/cash-settlement/interfaces/ICashSettlement.ts"],"names":[],"mappings":";;;AAEA,IAAY,iBAIX;AAJD,WAAY,iBAAiB;IAC5B,0CAAqB,CAAA;IACrB,kCAAa,CAAA;IACb,wCAAmB,CAAA;AACpB,CAAC,EAJW,iBAAiB,iCAAjB,iBAAiB,QAI5B","sourcesContent":["import { mongoose } from '@typegoose/typegoose';\n\nexport enum ISettlementStatus {\n\tNOT_PAID = 'not_paid',\n\tPAID = 'paid',\n\tREVOKED = 'revoked',\n}\n\nexport type ISettlementInfo = {\n\tamount: number;\n\tcurrency: string;\n\tstatus: ISettlementStatus;\n\tcreatedAt: Date;\n\tupdatedAt: Date;\n\treferenceNumber: string;\n};\n\nexport interface ICashSettlementService {\n\t/**\n\t * Initiates a cash settlement process\n\t *\n\t * @param amount - The amount to be settled\n\t * @param currency - The currency of the amount\n\t * @param reference - A unique reference for the settlement\n\t * @param firstName - The first name of the settler\n\t * @param lastName - The last name of the settler\n\t * @param location - Optional location of the settler\n\t * @returns Confirmation of the settlement initiation\n\t */\n\tinitiateSettlement(\n\t\tamount: number,\n\t\tcurrency: string,\n\t\treference: string,\n\t\tfirstName: string,\n\t\tlastName: string,\n\t\triderId: mongoose.Types.ObjectId,\n\t\tlocation?: string\n\t): Promise<boolean>;\n\n\t/**\n\t * Revokes a cash settlement\n\t *\n\t * @param reference - The reference ID of the settlement to revoke\n\t * @returns Confirmation of the revocation\n\t */\n\trevokeSettlement(reference: string): Promise<boolean>;\n\n\t/**\n\t * Mark a settlement as paid\n\t *\n\t * @param reference - The reference ID of the settlement to update\n\t * @returns Confirmation of the update\n\t */\n\tmarkSettlementAsPaid(reference: string): Promise<boolean>;\n\n\t/**\n\t * Check if there are pending settlements\n\t *\n\t * @param reference - The reference ID of the settlement to check\n\t * @returns true if there are pending settlements, false otherwise\n\t */\n\thasPendingSettlements(reference: string): Promise<boolean>;\n\n\t/**\n\t * Get latest settlement info\n\t *\n\t * @param reference - The reference ID of the settlement to check\n\t * @returns the latest settlement if it exists, null otherwise\n\t */\n\tgetLastSettlement(reference: string): Promise<ISettlementInfo | null>;\n\n\t/**\n\t * Mark a settlement as paid\n\t *\n\t * @param settlementId - The ID of the settlement to update\n\t * @returns Confirmation of the update\n\t */\n\tmarkSettlementAsPaidBySettlementId(settlementId: mongoose.Types.ObjectId): Promise<boolean>;\n\n\t/**\n\t * Revokes a cash settlement\n\t *\n\t * @param reference - The reference ID of the settlement to revoke\n\t * @returns Confirmation of the revocation\n\t */\n\trevokeRiderSettlements(rider: mongoose.Types.ObjectId): Promise<boolean>;\n\n\t/**\n\t * Check if there are pending settlements\n\t *\n\t * @param riderId - The ID of the rider to check\n\t * @returns true if there are pending settlements, false otherwise\n\t */\n\thasPendingRiderSettlements(riderId: mongoose.Types.ObjectId): Promise<boolean>;\n\n\t/**\n\t * Get latest settlement info\n\t *\n\t * @param riderId - The ID of the rider to check\n\t * @returns the latest settlement if it exists, null otherwise\n\t */\n\tgetLastRiderSettlement(rider: mongoose.Types.ObjectId): Promise<ISettlementInfo | null>;\n}\n"]}
|
package/dist/types/README.md
CHANGED
package/dist/types/package.json
CHANGED