@amohamud23/notihub 1.1.48 → 1.1.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.cjs +11 -4
- package/dist/index.d.cts +7 -1
- package/dist/index.d.ts +7 -1
- package/dist/index.js +11 -4
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1975,13 +1975,20 @@ var PaymentSession = class _PaymentSession {
|
|
|
1975
1975
|
throw new Error("Could not fetch payment session");
|
|
1976
1976
|
}
|
|
1977
1977
|
}
|
|
1978
|
-
|
|
1978
|
+
/**
|
|
1979
|
+
* Updates a payment session.
|
|
1980
|
+
* @param id - The ID of the payment session to update.
|
|
1981
|
+
* @param intent - The intent of the payment session to update.
|
|
1982
|
+
* @returns A promise that resolves when the payment session is updated.
|
|
1983
|
+
*/
|
|
1984
|
+
static async updatePaymentSession(sessionId, intent) {
|
|
1979
1985
|
const command = new import_lib_dynamodb16.UpdateCommand({
|
|
1980
1986
|
TableName: _PaymentSession.TABLE_NAME,
|
|
1981
|
-
Key: {
|
|
1982
|
-
UpdateExpression: "set #status = :status",
|
|
1987
|
+
Key: { sessionId },
|
|
1988
|
+
UpdateExpression: "set #status = :status, #updatedAt = :updatedAt",
|
|
1983
1989
|
ExpressionAttributeValues: {
|
|
1984
|
-
":status": intent
|
|
1990
|
+
":status": intent,
|
|
1991
|
+
":updatedAt": (/* @__PURE__ */ new Date()).toISOString()
|
|
1985
1992
|
}
|
|
1986
1993
|
});
|
|
1987
1994
|
try {
|
package/dist/index.d.cts
CHANGED
|
@@ -760,7 +760,13 @@ declare class PaymentSession {
|
|
|
760
760
|
static TABLE_NAME: string;
|
|
761
761
|
static createPaymentSession(paymentSession: INotiHubPaymentSession): Promise<INotiHubPaymentSession>;
|
|
762
762
|
static getPaymentSessionById(sessionId: string): Promise<INotiHubPaymentSession>;
|
|
763
|
-
|
|
763
|
+
/**
|
|
764
|
+
* Updates a payment session.
|
|
765
|
+
* @param id - The ID of the payment session to update.
|
|
766
|
+
* @param intent - The intent of the payment session to update.
|
|
767
|
+
* @returns A promise that resolves when the payment session is updated.
|
|
768
|
+
*/
|
|
769
|
+
static updatePaymentSession(sessionId: string, intent: string): Promise<void>;
|
|
764
770
|
}
|
|
765
771
|
|
|
766
772
|
declare const TABLES: {
|
package/dist/index.d.ts
CHANGED
|
@@ -760,7 +760,13 @@ declare class PaymentSession {
|
|
|
760
760
|
static TABLE_NAME: string;
|
|
761
761
|
static createPaymentSession(paymentSession: INotiHubPaymentSession): Promise<INotiHubPaymentSession>;
|
|
762
762
|
static getPaymentSessionById(sessionId: string): Promise<INotiHubPaymentSession>;
|
|
763
|
-
|
|
763
|
+
/**
|
|
764
|
+
* Updates a payment session.
|
|
765
|
+
* @param id - The ID of the payment session to update.
|
|
766
|
+
* @param intent - The intent of the payment session to update.
|
|
767
|
+
* @returns A promise that resolves when the payment session is updated.
|
|
768
|
+
*/
|
|
769
|
+
static updatePaymentSession(sessionId: string, intent: string): Promise<void>;
|
|
764
770
|
}
|
|
765
771
|
|
|
766
772
|
declare const TABLES: {
|
package/dist/index.js
CHANGED
|
@@ -2009,13 +2009,20 @@ var PaymentSession = class _PaymentSession {
|
|
|
2009
2009
|
throw new Error("Could not fetch payment session");
|
|
2010
2010
|
}
|
|
2011
2011
|
}
|
|
2012
|
-
|
|
2012
|
+
/**
|
|
2013
|
+
* Updates a payment session.
|
|
2014
|
+
* @param id - The ID of the payment session to update.
|
|
2015
|
+
* @param intent - The intent of the payment session to update.
|
|
2016
|
+
* @returns A promise that resolves when the payment session is updated.
|
|
2017
|
+
*/
|
|
2018
|
+
static async updatePaymentSession(sessionId, intent) {
|
|
2013
2019
|
const command = new UpdateCommand14({
|
|
2014
2020
|
TableName: _PaymentSession.TABLE_NAME,
|
|
2015
|
-
Key: {
|
|
2016
|
-
UpdateExpression: "set #status = :status",
|
|
2021
|
+
Key: { sessionId },
|
|
2022
|
+
UpdateExpression: "set #status = :status, #updatedAt = :updatedAt",
|
|
2017
2023
|
ExpressionAttributeValues: {
|
|
2018
|
-
":status": intent
|
|
2024
|
+
":status": intent,
|
|
2025
|
+
":updatedAt": (/* @__PURE__ */ new Date()).toISOString()
|
|
2019
2026
|
}
|
|
2020
2027
|
});
|
|
2021
2028
|
try {
|