@amohamud23/notihub 1.1.49 → 1.1.51
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 +5 -26
- package/dist/index.d.cts +1 -7
- package/dist/index.d.ts +1 -7
- package/dist/index.js +5 -26
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1828,12 +1828,7 @@ var StripeSubscription = class _StripeSubscription {
|
|
|
1828
1828
|
throw new Error("Could not fetch stripe subscription");
|
|
1829
1829
|
}
|
|
1830
1830
|
}
|
|
1831
|
-
|
|
1832
|
-
* Retrieves stripe subscriptions by customer ID.
|
|
1833
|
-
* @param customer - The customer ID to retrieve subscriptions for.
|
|
1834
|
-
* @returns A promise that resolves to an array of stripe subscription objects.
|
|
1835
|
-
*/
|
|
1836
|
-
static async getStripeSubscriptionsByCustomerId(stripe_customerId) {
|
|
1831
|
+
static async getStripeSubscriptionsByStripeCustomerId(stripe_customerId) {
|
|
1837
1832
|
const command = new import_lib_dynamodb15.QueryCommand({
|
|
1838
1833
|
TableName: _StripeSubscription.TABLE_NAME,
|
|
1839
1834
|
IndexName: "StripeCustomerIdIndex",
|
|
@@ -1842,26 +1837,6 @@ var StripeSubscription = class _StripeSubscription {
|
|
|
1842
1837
|
":stripe_customerId": stripe_customerId
|
|
1843
1838
|
}
|
|
1844
1839
|
});
|
|
1845
|
-
try {
|
|
1846
|
-
const result = await ddbDocClient.send(command);
|
|
1847
|
-
return result.Items || [];
|
|
1848
|
-
} catch (error) {
|
|
1849
|
-
console.error(
|
|
1850
|
-
`Error fetching stripe subscriptions for stripe_customerId: ${stripe_customerId}`,
|
|
1851
|
-
error
|
|
1852
|
-
);
|
|
1853
|
-
throw new Error("Could not fetch stripe subscriptions by customerId");
|
|
1854
|
-
}
|
|
1855
|
-
}
|
|
1856
|
-
static async getStripeSubscriptionsByStripeCustomerId(stripeCustomerId) {
|
|
1857
|
-
const command = new import_lib_dynamodb15.QueryCommand({
|
|
1858
|
-
TableName: _StripeSubscription.TABLE_NAME,
|
|
1859
|
-
IndexName: "StripeCustomerIdIndex",
|
|
1860
|
-
KeyConditionExpression: "stripe_customerId = :stripeCustomerId",
|
|
1861
|
-
ExpressionAttributeValues: {
|
|
1862
|
-
":stripeCustomerId": stripeCustomerId
|
|
1863
|
-
}
|
|
1864
|
-
});
|
|
1865
1840
|
try {
|
|
1866
1841
|
const result = await ddbDocClient.send(command);
|
|
1867
1842
|
if (!result.Items || result.Items.length === 0) {
|
|
@@ -1986,6 +1961,10 @@ var PaymentSession = class _PaymentSession {
|
|
|
1986
1961
|
TableName: _PaymentSession.TABLE_NAME,
|
|
1987
1962
|
Key: { sessionId },
|
|
1988
1963
|
UpdateExpression: "set #status = :status, #updatedAt = :updatedAt",
|
|
1964
|
+
ExpressionAttributeNames: {
|
|
1965
|
+
"#status": "status",
|
|
1966
|
+
"#updatedAt": "updatedAt"
|
|
1967
|
+
},
|
|
1989
1968
|
ExpressionAttributeValues: {
|
|
1990
1969
|
":status": intent,
|
|
1991
1970
|
":updatedAt": (/* @__PURE__ */ new Date()).toISOString()
|
package/dist/index.d.cts
CHANGED
|
@@ -727,13 +727,7 @@ declare class StripeSubscription {
|
|
|
727
727
|
* @returns A promise that resolves to the stripe subscription object or null if not found.
|
|
728
728
|
*/
|
|
729
729
|
static getStripeSubscriptionById(id: string): Promise<INotiHubStripeSubscription | null>;
|
|
730
|
-
|
|
731
|
-
* Retrieves stripe subscriptions by customer ID.
|
|
732
|
-
* @param customer - The customer ID to retrieve subscriptions for.
|
|
733
|
-
* @returns A promise that resolves to an array of stripe subscription objects.
|
|
734
|
-
*/
|
|
735
|
-
static getStripeSubscriptionsByCustomerId(stripe_customerId: string): Promise<INotiHubStripeSubscription[]>;
|
|
736
|
-
static getStripeSubscriptionsByStripeCustomerId(stripeCustomerId: string): Promise<INotiHubStripeSubscription | null>;
|
|
730
|
+
static getStripeSubscriptionsByStripeCustomerId(stripe_customerId: string): Promise<INotiHubStripeSubscription | null>;
|
|
737
731
|
/**
|
|
738
732
|
* Creates a new stripe subscription.
|
|
739
733
|
* @param stripeSubscription - The stripe subscription object to create.
|
package/dist/index.d.ts
CHANGED
|
@@ -727,13 +727,7 @@ declare class StripeSubscription {
|
|
|
727
727
|
* @returns A promise that resolves to the stripe subscription object or null if not found.
|
|
728
728
|
*/
|
|
729
729
|
static getStripeSubscriptionById(id: string): Promise<INotiHubStripeSubscription | null>;
|
|
730
|
-
|
|
731
|
-
* Retrieves stripe subscriptions by customer ID.
|
|
732
|
-
* @param customer - The customer ID to retrieve subscriptions for.
|
|
733
|
-
* @returns A promise that resolves to an array of stripe subscription objects.
|
|
734
|
-
*/
|
|
735
|
-
static getStripeSubscriptionsByCustomerId(stripe_customerId: string): Promise<INotiHubStripeSubscription[]>;
|
|
736
|
-
static getStripeSubscriptionsByStripeCustomerId(stripeCustomerId: string): Promise<INotiHubStripeSubscription | null>;
|
|
730
|
+
static getStripeSubscriptionsByStripeCustomerId(stripe_customerId: string): Promise<INotiHubStripeSubscription | null>;
|
|
737
731
|
/**
|
|
738
732
|
* Creates a new stripe subscription.
|
|
739
733
|
* @param stripeSubscription - The stripe subscription object to create.
|
package/dist/index.js
CHANGED
|
@@ -1858,12 +1858,7 @@ var StripeSubscription = class _StripeSubscription {
|
|
|
1858
1858
|
throw new Error("Could not fetch stripe subscription");
|
|
1859
1859
|
}
|
|
1860
1860
|
}
|
|
1861
|
-
|
|
1862
|
-
* Retrieves stripe subscriptions by customer ID.
|
|
1863
|
-
* @param customer - The customer ID to retrieve subscriptions for.
|
|
1864
|
-
* @returns A promise that resolves to an array of stripe subscription objects.
|
|
1865
|
-
*/
|
|
1866
|
-
static async getStripeSubscriptionsByCustomerId(stripe_customerId) {
|
|
1861
|
+
static async getStripeSubscriptionsByStripeCustomerId(stripe_customerId) {
|
|
1867
1862
|
const command = new QueryCommand13({
|
|
1868
1863
|
TableName: _StripeSubscription.TABLE_NAME,
|
|
1869
1864
|
IndexName: "StripeCustomerIdIndex",
|
|
@@ -1872,26 +1867,6 @@ var StripeSubscription = class _StripeSubscription {
|
|
|
1872
1867
|
":stripe_customerId": stripe_customerId
|
|
1873
1868
|
}
|
|
1874
1869
|
});
|
|
1875
|
-
try {
|
|
1876
|
-
const result = await ddbDocClient.send(command);
|
|
1877
|
-
return result.Items || [];
|
|
1878
|
-
} catch (error) {
|
|
1879
|
-
console.error(
|
|
1880
|
-
`Error fetching stripe subscriptions for stripe_customerId: ${stripe_customerId}`,
|
|
1881
|
-
error
|
|
1882
|
-
);
|
|
1883
|
-
throw new Error("Could not fetch stripe subscriptions by customerId");
|
|
1884
|
-
}
|
|
1885
|
-
}
|
|
1886
|
-
static async getStripeSubscriptionsByStripeCustomerId(stripeCustomerId) {
|
|
1887
|
-
const command = new QueryCommand13({
|
|
1888
|
-
TableName: _StripeSubscription.TABLE_NAME,
|
|
1889
|
-
IndexName: "StripeCustomerIdIndex",
|
|
1890
|
-
KeyConditionExpression: "stripe_customerId = :stripeCustomerId",
|
|
1891
|
-
ExpressionAttributeValues: {
|
|
1892
|
-
":stripeCustomerId": stripeCustomerId
|
|
1893
|
-
}
|
|
1894
|
-
});
|
|
1895
1870
|
try {
|
|
1896
1871
|
const result = await ddbDocClient.send(command);
|
|
1897
1872
|
if (!result.Items || result.Items.length === 0) {
|
|
@@ -2020,6 +1995,10 @@ var PaymentSession = class _PaymentSession {
|
|
|
2020
1995
|
TableName: _PaymentSession.TABLE_NAME,
|
|
2021
1996
|
Key: { sessionId },
|
|
2022
1997
|
UpdateExpression: "set #status = :status, #updatedAt = :updatedAt",
|
|
1998
|
+
ExpressionAttributeNames: {
|
|
1999
|
+
"#status": "status",
|
|
2000
|
+
"#updatedAt": "updatedAt"
|
|
2001
|
+
},
|
|
2023
2002
|
ExpressionAttributeValues: {
|
|
2024
2003
|
":status": intent,
|
|
2025
2004
|
":updatedAt": (/* @__PURE__ */ new Date()).toISOString()
|