@omnibase/core-js 0.4.0 → 0.4.2

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.
@@ -31,9 +31,9 @@ module.exports = __toCommonJS(payments_exports);
31
31
 
32
32
  // src/payments/config.ts
33
33
  async function getStripeConfig() {
34
- const baseUrl = process.env.OMNIBASE_AUTH_URL;
34
+ const baseUrl = process.env.OMNIBASE_API_URL;
35
35
  if (!baseUrl) {
36
- throw new Error("OMNIBASE_AUTH_URL is not configured");
36
+ throw new Error("OMNIBASE_API_URL is not configured");
37
37
  }
38
38
  try {
39
39
  const response = await fetch(`${baseUrl}/api/v1/stripe/config`, {
@@ -95,7 +95,7 @@ interface ProductWithPricingUI extends Product {
95
95
  *
96
96
  * @returns Promise resolving to the current Stripe configuration
97
97
  *
98
- * @throws {Error} When OMNIBASE_AUTH_URL environment variable is not configured
98
+ * @throws {Error} When OMNIBASE_API_URL environment variable is not configured
99
99
  * @throws {Error} When the API request fails due to network issues
100
100
  * @throws {Error} When the server returns an error response (4xx, 5xx status codes)
101
101
  *
@@ -160,11 +160,11 @@ declare function getAvailableProducts(): Promise<ProductWithPricingUI[]>;
160
160
  declare function getProduct(productId: string): Promise<Product | null>;
161
161
 
162
162
  type CheckoutOptions = {
163
- priceId: string;
163
+ price_id: string;
164
164
  mode: "payment" | "subscription";
165
- successUrl: string;
166
- cancelUrl: string;
167
- customerId?: string;
165
+ success_url: string;
166
+ cancel_url: string;
167
+ customer_id?: string;
168
168
  };
169
169
  type CreateCheckoutResponse = ApiResponse<{
170
170
  url: string;
@@ -95,7 +95,7 @@ interface ProductWithPricingUI extends Product {
95
95
  *
96
96
  * @returns Promise resolving to the current Stripe configuration
97
97
  *
98
- * @throws {Error} When OMNIBASE_AUTH_URL environment variable is not configured
98
+ * @throws {Error} When OMNIBASE_API_URL environment variable is not configured
99
99
  * @throws {Error} When the API request fails due to network issues
100
100
  * @throws {Error} When the server returns an error response (4xx, 5xx status codes)
101
101
  *
@@ -160,11 +160,11 @@ declare function getAvailableProducts(): Promise<ProductWithPricingUI[]>;
160
160
  declare function getProduct(productId: string): Promise<Product | null>;
161
161
 
162
162
  type CheckoutOptions = {
163
- priceId: string;
163
+ price_id: string;
164
164
  mode: "payment" | "subscription";
165
- successUrl: string;
166
- cancelUrl: string;
167
- customerId?: string;
165
+ success_url: string;
166
+ cancel_url: string;
167
+ customer_id?: string;
168
168
  };
169
169
  type CreateCheckoutResponse = ApiResponse<{
170
170
  url: string;
@@ -1,8 +1,8 @@
1
1
  // src/payments/config.ts
2
2
  async function getStripeConfig() {
3
- const baseUrl = process.env.OMNIBASE_AUTH_URL;
3
+ const baseUrl = process.env.OMNIBASE_API_URL;
4
4
  if (!baseUrl) {
5
- throw new Error("OMNIBASE_AUTH_URL is not configured");
5
+ throw new Error("OMNIBASE_API_URL is not configured");
6
6
  }
7
7
  try {
8
8
  const response = await fetch(`${baseUrl}/api/v1/stripe/config`, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@omnibase/core-js",
3
- "version": "0.4.0",
3
+ "version": "0.4.2",
4
4
  "description": "OmniBase core Javascript SDK - framework agnostic",
5
5
  "files": [
6
6
  "dist/**/*"