@amohamud23/notihub 1.1.49 → 1.1.50

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 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) {
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) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@amohamud23/notihub",
3
- "version": "1.1.49",
3
+ "version": "1.1.50",
4
4
  "description": "Notihub Package",
5
5
  "main": "./dist/index.cjs",
6
6
  "types": "./dist/index.d.cts",