@revenuecat/purchases-js 0.3.4 → 0.4.0
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/README.md +1 -1
- package/dist/Purchases.es.d.ts +19 -1
- package/dist/Purchases.es.js +531 -502
- package/dist/Purchases.umd.js +4 -4
- package/package.json +1 -1
package/README.md
CHANGED
package/dist/Purchases.es.d.ts
CHANGED
|
@@ -170,6 +170,23 @@ export declare enum ErrorCode {
|
|
|
170
170
|
InvalidEmailError = 38
|
|
171
171
|
}
|
|
172
172
|
|
|
173
|
+
/**
|
|
174
|
+
* Parameters used to customise the http requests executed by purchases-js.
|
|
175
|
+
* @public
|
|
176
|
+
*/
|
|
177
|
+
export declare interface HttpConfig {
|
|
178
|
+
/**
|
|
179
|
+
* Additional headers to include in all HTTP requests.
|
|
180
|
+
*/
|
|
181
|
+
additionalHeaders?: Record<string, string>;
|
|
182
|
+
/**
|
|
183
|
+
* Set this property to your proxy URL *only* if you've received a proxy
|
|
184
|
+
* key value from your RevenueCat contact. This value should never end with
|
|
185
|
+
* a trailing slash.
|
|
186
|
+
*/
|
|
187
|
+
proxyURL?: string;
|
|
188
|
+
}
|
|
189
|
+
|
|
173
190
|
/**
|
|
174
191
|
* Possible levels to log in the console.
|
|
175
192
|
* @public
|
|
@@ -541,9 +558,10 @@ export declare class Purchases {
|
|
|
541
558
|
* keep the returned instance around for use throughout your application.
|
|
542
559
|
* @param apiKey - RevenueCat API Key. Can be obtained from the RevenueCat dashboard.
|
|
543
560
|
* @param appUserId - Your unique id for identifying the user.
|
|
561
|
+
* @param httpConfig - Advanced http configuration to customise the SDK usage {@link HttpConfig}.
|
|
544
562
|
* @throws {@link PurchasesError} if the API key or user id are invalid.
|
|
545
563
|
*/
|
|
546
|
-
static configure(apiKey: string, appUserId: string): Purchases;
|
|
564
|
+
static configure(apiKey: string, appUserId: string, httpConfig?: HttpConfig): Purchases;
|
|
547
565
|
/**
|
|
548
566
|
* Fetch the configured offerings for this user. You can configure these
|
|
549
567
|
* in the RevenueCat dashboard.
|