@amohamud23/notihub 1.1.47 → 1.1.48
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 -5
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +5 -5
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1833,13 +1833,13 @@ var StripeSubscription = class _StripeSubscription {
|
|
|
1833
1833
|
* @param customer - The customer ID to retrieve subscriptions for.
|
|
1834
1834
|
* @returns A promise that resolves to an array of stripe subscription objects.
|
|
1835
1835
|
*/
|
|
1836
|
-
static async getStripeSubscriptionsByCustomerId(
|
|
1836
|
+
static async getStripeSubscriptionsByCustomerId(stripe_customerId) {
|
|
1837
1837
|
const command = new import_lib_dynamodb15.QueryCommand({
|
|
1838
1838
|
TableName: _StripeSubscription.TABLE_NAME,
|
|
1839
|
-
IndexName: "
|
|
1840
|
-
KeyConditionExpression: "
|
|
1839
|
+
IndexName: "StripeCustomerIdIndex",
|
|
1840
|
+
KeyConditionExpression: "stripe_customerId = :stripe_customerId",
|
|
1841
1841
|
ExpressionAttributeValues: {
|
|
1842
|
-
":
|
|
1842
|
+
":stripe_customerId": stripe_customerId
|
|
1843
1843
|
}
|
|
1844
1844
|
});
|
|
1845
1845
|
try {
|
|
@@ -1847,7 +1847,7 @@ var StripeSubscription = class _StripeSubscription {
|
|
|
1847
1847
|
return result.Items || [];
|
|
1848
1848
|
} catch (error) {
|
|
1849
1849
|
console.error(
|
|
1850
|
-
`Error fetching stripe subscriptions for
|
|
1850
|
+
`Error fetching stripe subscriptions for stripe_customerId: ${stripe_customerId}`,
|
|
1851
1851
|
error
|
|
1852
1852
|
);
|
|
1853
1853
|
throw new Error("Could not fetch stripe subscriptions by customerId");
|
package/dist/index.d.cts
CHANGED
|
@@ -732,7 +732,7 @@ declare class StripeSubscription {
|
|
|
732
732
|
* @param customer - The customer ID to retrieve subscriptions for.
|
|
733
733
|
* @returns A promise that resolves to an array of stripe subscription objects.
|
|
734
734
|
*/
|
|
735
|
-
static getStripeSubscriptionsByCustomerId(
|
|
735
|
+
static getStripeSubscriptionsByCustomerId(stripe_customerId: string): Promise<INotiHubStripeSubscription[]>;
|
|
736
736
|
static getStripeSubscriptionsByStripeCustomerId(stripeCustomerId: string): Promise<INotiHubStripeSubscription | null>;
|
|
737
737
|
/**
|
|
738
738
|
* Creates a new stripe subscription.
|
package/dist/index.d.ts
CHANGED
|
@@ -732,7 +732,7 @@ declare class StripeSubscription {
|
|
|
732
732
|
* @param customer - The customer ID to retrieve subscriptions for.
|
|
733
733
|
* @returns A promise that resolves to an array of stripe subscription objects.
|
|
734
734
|
*/
|
|
735
|
-
static getStripeSubscriptionsByCustomerId(
|
|
735
|
+
static getStripeSubscriptionsByCustomerId(stripe_customerId: string): Promise<INotiHubStripeSubscription[]>;
|
|
736
736
|
static getStripeSubscriptionsByStripeCustomerId(stripeCustomerId: string): Promise<INotiHubStripeSubscription | null>;
|
|
737
737
|
/**
|
|
738
738
|
* Creates a new stripe subscription.
|
package/dist/index.js
CHANGED
|
@@ -1863,13 +1863,13 @@ var StripeSubscription = class _StripeSubscription {
|
|
|
1863
1863
|
* @param customer - The customer ID to retrieve subscriptions for.
|
|
1864
1864
|
* @returns A promise that resolves to an array of stripe subscription objects.
|
|
1865
1865
|
*/
|
|
1866
|
-
static async getStripeSubscriptionsByCustomerId(
|
|
1866
|
+
static async getStripeSubscriptionsByCustomerId(stripe_customerId) {
|
|
1867
1867
|
const command = new QueryCommand13({
|
|
1868
1868
|
TableName: _StripeSubscription.TABLE_NAME,
|
|
1869
|
-
IndexName: "
|
|
1870
|
-
KeyConditionExpression: "
|
|
1869
|
+
IndexName: "StripeCustomerIdIndex",
|
|
1870
|
+
KeyConditionExpression: "stripe_customerId = :stripe_customerId",
|
|
1871
1871
|
ExpressionAttributeValues: {
|
|
1872
|
-
":
|
|
1872
|
+
":stripe_customerId": stripe_customerId
|
|
1873
1873
|
}
|
|
1874
1874
|
});
|
|
1875
1875
|
try {
|
|
@@ -1877,7 +1877,7 @@ var StripeSubscription = class _StripeSubscription {
|
|
|
1877
1877
|
return result.Items || [];
|
|
1878
1878
|
} catch (error) {
|
|
1879
1879
|
console.error(
|
|
1880
|
-
`Error fetching stripe subscriptions for
|
|
1880
|
+
`Error fetching stripe subscriptions for stripe_customerId: ${stripe_customerId}`,
|
|
1881
1881
|
error
|
|
1882
1882
|
);
|
|
1883
1883
|
throw new Error("Could not fetch stripe subscriptions by customerId");
|