@cosmosapp/pay_sdk 1.0.0 → 1.0.1

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.d.cts CHANGED
@@ -458,7 +458,8 @@ type FetchLike = typeof fetch;
458
458
  interface RESTOptions {
459
459
  /**
460
460
  * Base URL of the Cosmos Pay gateway (no trailing slash), e.g.
461
- * `https://gateway.example.com`. The version segment is appended automatically.
461
+ * `https://api.cosmospay.lat/cosmos-api`. The version segment is appended
462
+ * automatically.
462
463
  */
463
464
  baseURL: string;
464
465
  /**
@@ -1087,8 +1088,8 @@ declare class Client extends EventEmitter {
1087
1088
  static readonly version = "1.0.0";
1088
1089
  /**
1089
1090
  * Process-wide shared defaults maintained by Cosmos Pay (gateway URL, version,
1090
- * internal secrets). Mutate once at startup to change them for every client:
1091
- * `Client.shared.baseURL = 'https://staging.cosmospay.io'`.
1091
+ * internal secrets). Mutate once at startup to change them for every client
1092
+ * (e.g. self-hosting): `Client.shared.baseURL = 'https://gateway.your-domain.com'`.
1092
1093
  */
1093
1094
  static readonly shared: SharedConfig;
1094
1095
  /** Resolved shared configuration for this client instance. */
@@ -1219,8 +1220,13 @@ declare const version = "1.0.0";
1219
1220
  * Default base URL of the Cosmos Pay gateway. Maintained by Cosmos Pay — users
1220
1221
  * never need to set this; it's part of the {@link shared} configuration. Override
1221
1222
  * only when self-hosting or pointing at a staging gateway.
1223
+ *
1224
+ * This is the public APISIX gateway: requests under `/cosmos-api/*` are
1225
+ * authenticated (API key) and proxied to the Payments API. The version segment
1226
+ * (`/v1`, see {@link DEFAULT_VERSION}) is appended by the REST layer, producing
1227
+ * e.g. `https://api.cosmospay.lat/cosmos-api/v1/payment-intents/pay`.
1222
1228
  */
1223
- declare const DEFAULT_BASE_URL = "https://api.cosmospay.io";
1229
+ declare const DEFAULT_BASE_URL = "https://api.cosmospay.lat/cosmos-api";
1224
1230
  /** Default API version segment prefixed to every route (`/v1/...`). */
1225
1231
  declare const DEFAULT_VERSION = "v1";
1226
1232
  /** Default request timeout in milliseconds. */
package/dist/index.d.ts CHANGED
@@ -458,7 +458,8 @@ type FetchLike = typeof fetch;
458
458
  interface RESTOptions {
459
459
  /**
460
460
  * Base URL of the Cosmos Pay gateway (no trailing slash), e.g.
461
- * `https://gateway.example.com`. The version segment is appended automatically.
461
+ * `https://api.cosmospay.lat/cosmos-api`. The version segment is appended
462
+ * automatically.
462
463
  */
463
464
  baseURL: string;
464
465
  /**
@@ -1087,8 +1088,8 @@ declare class Client extends EventEmitter {
1087
1088
  static readonly version = "1.0.0";
1088
1089
  /**
1089
1090
  * Process-wide shared defaults maintained by Cosmos Pay (gateway URL, version,
1090
- * internal secrets). Mutate once at startup to change them for every client:
1091
- * `Client.shared.baseURL = 'https://staging.cosmospay.io'`.
1091
+ * internal secrets). Mutate once at startup to change them for every client
1092
+ * (e.g. self-hosting): `Client.shared.baseURL = 'https://gateway.your-domain.com'`.
1092
1093
  */
1093
1094
  static readonly shared: SharedConfig;
1094
1095
  /** Resolved shared configuration for this client instance. */
@@ -1219,8 +1220,13 @@ declare const version = "1.0.0";
1219
1220
  * Default base URL of the Cosmos Pay gateway. Maintained by Cosmos Pay — users
1220
1221
  * never need to set this; it's part of the {@link shared} configuration. Override
1221
1222
  * only when self-hosting or pointing at a staging gateway.
1223
+ *
1224
+ * This is the public APISIX gateway: requests under `/cosmos-api/*` are
1225
+ * authenticated (API key) and proxied to the Payments API. The version segment
1226
+ * (`/v1`, see {@link DEFAULT_VERSION}) is appended by the REST layer, producing
1227
+ * e.g. `https://api.cosmospay.lat/cosmos-api/v1/payment-intents/pay`.
1222
1228
  */
1223
- declare const DEFAULT_BASE_URL = "https://api.cosmospay.io";
1229
+ declare const DEFAULT_BASE_URL = "https://api.cosmospay.lat/cosmos-api";
1224
1230
  /** Default API version segment prefixed to every route (`/v1/...`). */
1225
1231
  declare const DEFAULT_VERSION = "v1";
1226
1232
  /** Default request timeout in milliseconds. */
package/dist/index.js CHANGED
@@ -596,7 +596,7 @@ var WebhookEndpoint = class extends Base {
596
596
 
597
597
  // src/util/Constants.ts
598
598
  var version = "1.0.0";
599
- var DEFAULT_BASE_URL = "https://api.cosmospay.io";
599
+ var DEFAULT_BASE_URL = "https://api.cosmospay.lat/cosmos-api";
600
600
  var DEFAULT_VERSION = "v1";
601
601
  var DEFAULT_TIMEOUT = 3e4;
602
602
  var DEFAULT_RETRIES = 2;
@@ -1110,8 +1110,8 @@ var Client = class extends EventEmitter {
1110
1110
  static {
1111
1111
  /**
1112
1112
  * Process-wide shared defaults maintained by Cosmos Pay (gateway URL, version,
1113
- * internal secrets). Mutate once at startup to change them for every client:
1114
- * `Client.shared.baseURL = 'https://staging.cosmospay.io'`.
1113
+ * internal secrets). Mutate once at startup to change them for every client
1114
+ * (e.g. self-hosting): `Client.shared.baseURL = 'https://gateway.your-domain.com'`.
1115
1115
  */
1116
1116
  this.shared = shared;
1117
1117
  }