revenuecat-api 1.0.4 → 1.1.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/__generated/revenuecat-api-v2.d.ts +416 -39
- package/package.json +10 -10
|
@@ -229,6 +229,31 @@ export interface paths {
|
|
|
229
229
|
patch?: never;
|
|
230
230
|
trace?: never;
|
|
231
231
|
};
|
|
232
|
+
"/projects/{project_id}/products/{product_id}/create_in_store": {
|
|
233
|
+
parameters: {
|
|
234
|
+
query?: never;
|
|
235
|
+
header?: never;
|
|
236
|
+
path?: never;
|
|
237
|
+
cookie?: never;
|
|
238
|
+
};
|
|
239
|
+
get?: never;
|
|
240
|
+
put?: never;
|
|
241
|
+
/**
|
|
242
|
+
* Push a product to the store
|
|
243
|
+
* @description Push a product to the App Store.
|
|
244
|
+
*
|
|
245
|
+
* **For subscription products**: You must provide store information including duration and subscription group details.
|
|
246
|
+
*
|
|
247
|
+
* **For in-app purchase products** (consumable, non-consumable, non-renewing subscription): No request body is required.
|
|
248
|
+
* This endpoint requires the following permission(s): <code>project_configuration:products:read_write</code>.
|
|
249
|
+
*/
|
|
250
|
+
post: operations["create-product-in-store"];
|
|
251
|
+
delete?: never;
|
|
252
|
+
options?: never;
|
|
253
|
+
head?: never;
|
|
254
|
+
patch?: never;
|
|
255
|
+
trace?: never;
|
|
256
|
+
};
|
|
232
257
|
"/projects/{project_id}/products": {
|
|
233
258
|
parameters: {
|
|
234
259
|
query?: never;
|
|
@@ -819,6 +844,66 @@ export interface paths {
|
|
|
819
844
|
patch?: never;
|
|
820
845
|
trace?: never;
|
|
821
846
|
};
|
|
847
|
+
"/projects/{project_id}/customers/{customer_id}/virtual_currencies": {
|
|
848
|
+
parameters: {
|
|
849
|
+
query?: never;
|
|
850
|
+
header?: never;
|
|
851
|
+
path?: never;
|
|
852
|
+
cookie?: never;
|
|
853
|
+
};
|
|
854
|
+
/**
|
|
855
|
+
* Get a list of customer's virtual currencies balances
|
|
856
|
+
* @description This endpoint requires the following permission(s): <code>customer_information:purchases:read</code>.
|
|
857
|
+
*/
|
|
858
|
+
get: operations["list-virtual-currencies-balances"];
|
|
859
|
+
put?: never;
|
|
860
|
+
post?: never;
|
|
861
|
+
delete?: never;
|
|
862
|
+
options?: never;
|
|
863
|
+
head?: never;
|
|
864
|
+
patch?: never;
|
|
865
|
+
trace?: never;
|
|
866
|
+
};
|
|
867
|
+
"/projects/{project_id}/customers/{customer_id}/virtual_currencies/transactions": {
|
|
868
|
+
parameters: {
|
|
869
|
+
query?: never;
|
|
870
|
+
header?: never;
|
|
871
|
+
path?: never;
|
|
872
|
+
cookie?: never;
|
|
873
|
+
};
|
|
874
|
+
get?: never;
|
|
875
|
+
put?: never;
|
|
876
|
+
/**
|
|
877
|
+
* Create a virtual currencies transaction
|
|
878
|
+
* @description This endpoint requires the following permission(s): <code>customer_information:purchases:read_write</code>.
|
|
879
|
+
*/
|
|
880
|
+
post: operations["create-virtual-currencies-transaction"];
|
|
881
|
+
delete?: never;
|
|
882
|
+
options?: never;
|
|
883
|
+
head?: never;
|
|
884
|
+
patch?: never;
|
|
885
|
+
trace?: never;
|
|
886
|
+
};
|
|
887
|
+
"/projects/{project_id}/customers/{customer_id}/virtual_currencies/update_balance": {
|
|
888
|
+
parameters: {
|
|
889
|
+
query?: never;
|
|
890
|
+
header?: never;
|
|
891
|
+
path?: never;
|
|
892
|
+
cookie?: never;
|
|
893
|
+
};
|
|
894
|
+
get?: never;
|
|
895
|
+
put?: never;
|
|
896
|
+
/**
|
|
897
|
+
* Update a virtual currencies balance without creating a transaction
|
|
898
|
+
* @description This endpoint requires the following permission(s): <code>customer_information:purchases:read_write</code>.
|
|
899
|
+
*/
|
|
900
|
+
post: operations["update-virtual-currencies-balance"];
|
|
901
|
+
delete?: never;
|
|
902
|
+
options?: never;
|
|
903
|
+
head?: never;
|
|
904
|
+
patch?: never;
|
|
905
|
+
trace?: never;
|
|
906
|
+
};
|
|
822
907
|
"/projects/{project_id}/customers/{customer_id}/attributes": {
|
|
823
908
|
parameters: {
|
|
824
909
|
query?: never;
|
|
@@ -970,6 +1055,8 @@ export interface components {
|
|
|
970
1055
|
};
|
|
971
1056
|
};
|
|
972
1057
|
App: {
|
|
1058
|
+
[key: string]: unknown;
|
|
1059
|
+
} & ({
|
|
973
1060
|
/**
|
|
974
1061
|
* @description String representing the object's type. Objects of the same type share the same value.
|
|
975
1062
|
* @enum {string}
|
|
@@ -999,14 +1086,13 @@ export interface components {
|
|
|
999
1086
|
* @example proj1a2b3c4
|
|
1000
1087
|
*/
|
|
1001
1088
|
project_id: string;
|
|
1002
|
-
} & components["schemas"]["AmazonApp"] & components["schemas"]["AppStoreApp"] & components["schemas"]["MacAppStoreApp"] & components["schemas"]["PlayStoreApp"] & components["schemas"]["StripeApp"] & components["schemas"]["RCBillingApp"] & components["schemas"]["RokuApp"] & components["schemas"]["PaddleApp"];
|
|
1089
|
+
} & components["schemas"]["AmazonApp"] & components["schemas"]["AppStoreApp"] & components["schemas"]["MacAppStoreApp"] & components["schemas"]["PlayStoreApp"] & components["schemas"]["StripeApp"] & components["schemas"]["RCBillingApp"] & components["schemas"]["RokuApp"] & components["schemas"]["PaddleApp"]);
|
|
1003
1090
|
AppCreate: {
|
|
1004
1091
|
/** @description The name of the app */
|
|
1005
1092
|
name: string;
|
|
1006
1093
|
/**
|
|
1007
1094
|
* @description The platform of the app.
|
|
1008
1095
|
* Mac App Store is disabled by default. See [Legacy Mac Apps](https://www.revenuecat.com/docs/legacy-mac-apps) for more details.
|
|
1009
|
-
*
|
|
1010
1096
|
* @enum {string}
|
|
1011
1097
|
*/
|
|
1012
1098
|
type: "amazon" | "app_store" | "mac_app_store" | "play_store" | "stripe" | "rc_billing" | "roku" | "paddle";
|
|
@@ -1025,14 +1111,15 @@ export interface components {
|
|
|
1025
1111
|
bundle_id: string;
|
|
1026
1112
|
/** @description The shared secret of the app */
|
|
1027
1113
|
shared_secret?: string;
|
|
1028
|
-
/**
|
|
1114
|
+
/**
|
|
1115
|
+
* @description PKCS /#8 In App Key downloaded from App Store Connect in PEM format. Copy the contents
|
|
1029
1116
|
* of the file in this field. See instructions on how to get it in:
|
|
1030
1117
|
* https://www.revenuecat.com/docs/in-app-purchase-key-configuration
|
|
1031
|
-
|
|
1118
|
+
*/
|
|
1032
1119
|
subscription_private_key?: string;
|
|
1033
1120
|
/** @description In App Key id. The ID of the downloaded in app key. You can get it from App Store Connect */
|
|
1034
1121
|
subscription_key_id?: string;
|
|
1035
|
-
/** @description The key Issuer id. See instructions on how to obtain this in: https://www.revenuecat.com/docs/in-app-purchase-key-configuration#3-providing-the-issuer-id-to-revenuecat
|
|
1122
|
+
/** @description The key Issuer id. See instructions on how to obtain this in: https://www.revenuecat.com/docs/in-app-purchase-key-configuration#3-providing-the-issuer-id-to-revenuecat */
|
|
1036
1123
|
subscription_key_issuer?: string;
|
|
1037
1124
|
};
|
|
1038
1125
|
};
|
|
@@ -1053,13 +1140,26 @@ export interface components {
|
|
|
1053
1140
|
* @example US
|
|
1054
1141
|
* @enum {string|null}
|
|
1055
1142
|
*/
|
|
1056
|
-
Country:
|
|
1143
|
+
Country: string | null;
|
|
1144
|
+
/** @description In-app purchase products do not require any additional information */
|
|
1145
|
+
CreateAppStoreConnectInAppPurchaseInput: Record<string, never>;
|
|
1146
|
+
CreateAppStoreConnectSubscriptionInput: {
|
|
1147
|
+
/**
|
|
1148
|
+
* @description The subscription duration period
|
|
1149
|
+
* @enum {string}
|
|
1150
|
+
*/
|
|
1151
|
+
duration: "ONE_WEEK" | "ONE_MONTH" | "TWO_MONTHS" | "THREE_MONTHS" | "SIX_MONTHS" | "ONE_YEAR";
|
|
1152
|
+
/** @description The name of the subscription group */
|
|
1153
|
+
subscription_group_name: string;
|
|
1154
|
+
/** @description The ID of the subscription group (optional) */
|
|
1155
|
+
subscription_group_id?: string | null;
|
|
1156
|
+
};
|
|
1057
1157
|
/**
|
|
1058
1158
|
* @description ISO 4217 currency code
|
|
1059
1159
|
* @example USD
|
|
1060
1160
|
* @enum {string}
|
|
1061
1161
|
*/
|
|
1062
|
-
Currency:
|
|
1162
|
+
Currency: string;
|
|
1063
1163
|
Customer: {
|
|
1064
1164
|
/**
|
|
1065
1165
|
* @description String representing the object's type. Objects of the same type share the same value.
|
|
@@ -1154,7 +1254,7 @@ export interface components {
|
|
|
1154
1254
|
* @example $email
|
|
1155
1255
|
* @enum {string}
|
|
1156
1256
|
*/
|
|
1157
|
-
CustomerAttributeReservedName:
|
|
1257
|
+
CustomerAttributeReservedName: string;
|
|
1158
1258
|
CustomerEntitlement: {
|
|
1159
1259
|
/**
|
|
1160
1260
|
* @description String representing the object's type. Objects of the same type share the same value.
|
|
@@ -1251,7 +1351,7 @@ export interface components {
|
|
|
1251
1351
|
* @example production
|
|
1252
1352
|
* @enum {string}
|
|
1253
1353
|
*/
|
|
1254
|
-
Environment:
|
|
1354
|
+
Environment: string;
|
|
1255
1355
|
Error: {
|
|
1256
1356
|
/**
|
|
1257
1357
|
* @description String representing the object's type. Objects of the same type share the same value.
|
|
@@ -1671,6 +1771,26 @@ export interface components {
|
|
|
1671
1771
|
*/
|
|
1672
1772
|
url: string;
|
|
1673
1773
|
};
|
|
1774
|
+
/** VirtualCurrenciesBalancesList */
|
|
1775
|
+
ListVirtualCurrenciesBalances: {
|
|
1776
|
+
/**
|
|
1777
|
+
* @description String representing the object's type. Objects of the same type share the same value.
|
|
1778
|
+
* @enum {string}
|
|
1779
|
+
*/
|
|
1780
|
+
object: "list";
|
|
1781
|
+
/** @description Details about each object. */
|
|
1782
|
+
items: components["schemas"]["VirtualCurrencyBalance"][];
|
|
1783
|
+
/**
|
|
1784
|
+
* @description URL to access the next page of the customer's balances. If not present / null, there is no next page
|
|
1785
|
+
* @example /v2/projects/proj1ab2c3d4/customers/19b8de26-77c1-49f1-aa18-019a391603e2/virtual_currencies?starting_after=9fjeja8fjed
|
|
1786
|
+
*/
|
|
1787
|
+
next_page: string | null;
|
|
1788
|
+
/**
|
|
1789
|
+
* @description The URL where this list can be accessed.
|
|
1790
|
+
* @example /v2/projects/proj1ab2c3d4/customers/19b8de26-77c1-49f1-aa18-019a391603e2/virtual_currencies
|
|
1791
|
+
*/
|
|
1792
|
+
url: string;
|
|
1793
|
+
};
|
|
1674
1794
|
MacAppStoreApp: {
|
|
1675
1795
|
/** @description Legacy Mac App Store type details */
|
|
1676
1796
|
mac_app_store?: {
|
|
@@ -1847,7 +1967,7 @@ export interface components {
|
|
|
1847
1967
|
* @example purchased
|
|
1848
1968
|
* @enum {string}
|
|
1849
1969
|
*/
|
|
1850
|
-
Ownership:
|
|
1970
|
+
Ownership: string;
|
|
1851
1971
|
Package: {
|
|
1852
1972
|
/**
|
|
1853
1973
|
* @description String representing the object's type. Objects of the same type share the same value.
|
|
@@ -1927,10 +2047,12 @@ export interface components {
|
|
|
1927
2047
|
/** @description Paddle Server-side API key provided on the Paddle dashboard. */
|
|
1928
2048
|
paddle_api_key?: string | null;
|
|
1929
2049
|
/**
|
|
1930
|
-
* @description Whether the app is tied to the sandbox environment.
|
|
2050
|
+
* @description [Deprecated] Whether the app is tied to the sandbox environment.
|
|
2051
|
+
* This field is deprecated and will be removed in the future.
|
|
2052
|
+
* The environment is determined by the `paddle_api_key` format.
|
|
1931
2053
|
* @example true
|
|
1932
2054
|
*/
|
|
1933
|
-
paddle_is_sandbox?: boolean;
|
|
2055
|
+
paddle_is_sandbox?: boolean | null;
|
|
1934
2056
|
} | null;
|
|
1935
2057
|
};
|
|
1936
2058
|
Paywall: {
|
|
@@ -2023,7 +2145,7 @@ export interface components {
|
|
|
2023
2145
|
display_name: string | null;
|
|
2024
2146
|
};
|
|
2025
2147
|
/** @enum {string} */
|
|
2026
|
-
ProductType:
|
|
2148
|
+
ProductType: string;
|
|
2027
2149
|
/** ProductsFromEntitlementList */
|
|
2028
2150
|
ProductsFromEntitlement: {
|
|
2029
2151
|
/**
|
|
@@ -2224,7 +2346,7 @@ export interface components {
|
|
|
2224
2346
|
* @description The company support email. This field is deprecated. Please, use `support_email` instead.
|
|
2225
2347
|
*/
|
|
2226
2348
|
seller_company_support_email?: string | null;
|
|
2227
|
-
/** @description Used as the `reply to` address in all emails sent to customers, to allow them to receive support.
|
|
2349
|
+
/** @description Used as the `reply to` address in all emails sent to customers, to allow them to receive support. */
|
|
2228
2350
|
support_email?: string | null;
|
|
2229
2351
|
/** @description The default currency to be used for the app. */
|
|
2230
2352
|
default_currency: components["schemas"]["RCBillingCurrency"];
|
|
@@ -2247,7 +2369,7 @@ export interface components {
|
|
|
2247
2369
|
* @example USD
|
|
2248
2370
|
* @enum {string}
|
|
2249
2371
|
*/
|
|
2250
|
-
RCBillingCurrency:
|
|
2372
|
+
RCBillingCurrency: string;
|
|
2251
2373
|
RokuApp: {
|
|
2252
2374
|
/** @description Roku Channel Store type details */
|
|
2253
2375
|
roku?: {
|
|
@@ -2280,6 +2402,28 @@ export interface components {
|
|
|
2280
2402
|
[key: string]: unknown;
|
|
2281
2403
|
};
|
|
2282
2404
|
};
|
|
2405
|
+
StoreProduct: {
|
|
2406
|
+
/**
|
|
2407
|
+
* @description String representing the object's type. Objects of the same type share the same value.
|
|
2408
|
+
* @enum {string}
|
|
2409
|
+
*/
|
|
2410
|
+
object: "store_product";
|
|
2411
|
+
/**
|
|
2412
|
+
* @description The unique identifier of the product in the store (e.g., App Store Connect product ID)
|
|
2413
|
+
* @example 1234567890
|
|
2414
|
+
*/
|
|
2415
|
+
id: string;
|
|
2416
|
+
/**
|
|
2417
|
+
* @description The name of the store product
|
|
2418
|
+
* @example Premium Monthly Subscription
|
|
2419
|
+
*/
|
|
2420
|
+
name?: string | null;
|
|
2421
|
+
/**
|
|
2422
|
+
* @description The product identifier used in the store
|
|
2423
|
+
* @example com.example.premium_monthly
|
|
2424
|
+
*/
|
|
2425
|
+
product_identifier: string;
|
|
2426
|
+
};
|
|
2283
2427
|
StripeApp: {
|
|
2284
2428
|
/** @description Stripe type details */
|
|
2285
2429
|
stripe?: {
|
|
@@ -2338,6 +2482,12 @@ export interface components {
|
|
|
2338
2482
|
* @example 1658399423658
|
|
2339
2483
|
*/
|
|
2340
2484
|
current_period_ends_at: number | null;
|
|
2485
|
+
/**
|
|
2486
|
+
* Format: int64
|
|
2487
|
+
* @description The date when the latest subscription billing period is expected to end in ms since epoch. It will only be different from `current_period_ends_at` if `auto_renewal_status` is `has_already_renewed`, in which case it indicates the end of the next billing period. Can be null if the subscription is paused until an indefinite date.
|
|
2488
|
+
* @example 1658399423658
|
|
2489
|
+
*/
|
|
2490
|
+
ends_at: number | null;
|
|
2341
2491
|
/**
|
|
2342
2492
|
* @description Determines whether the customer should currently be provided access to the entitlements associated with the subscription
|
|
2343
2493
|
* @example true
|
|
@@ -2350,14 +2500,12 @@ export interface components {
|
|
|
2350
2500
|
pending_payment: boolean;
|
|
2351
2501
|
/**
|
|
2352
2502
|
* @description The auto renewal status of a subscription.<br><br>Possible values:<br>• `will_renew`: the subscription is currently set to automatically renew<br>• `will_not_renew`: the subscription is currently set to expire at the end of the period<br>• `will_change_product`: the subscription is currently set to change product at the end of the period (which might start a new subscription)<br>• `will_pause`: the subscription is currently set to pause at the end of the current period<br>• `requires_price_increase_consent`: the subscription will expire at the end of the current period unless the customer consents to the price increase<br>• `has_already_renewed`: the customer has already been charged for the upcoming renewal (so the renewal will take place even if the customer opts out of auto-renewal before the end of the period)
|
|
2353
|
-
*
|
|
2354
2503
|
* @example will_renew
|
|
2355
2504
|
* @enum {string}
|
|
2356
2505
|
*/
|
|
2357
2506
|
auto_renewal_status: "will_renew" | "will_not_renew" | "will_change_product" | "will_pause" | "requires_price_increase_consent" | "has_already_renewed";
|
|
2358
2507
|
/**
|
|
2359
2508
|
* @description The status of a subscription. Please note that additional states might be added in the future. To determine whether or not a subscription currently provides access to any associated entitlements, use the _gives_access_ field.<br><br>Possible values:<br>• `trialing`: the subscription is in a free trial period<br>• `active`: the subscription is active, in a paid period<br>• `expired`: the subscription is expired and no longer active<br>• `in_grace_period`: the subscription is past its regular expiry date and experienced a billing issue, but is currently still in an access-granting grace period<br>• `in_billing_retry`: the subscription has experienced a billing issue. Billing is being retried, access is suspended.-paused: the subscription is currently paused and should not provide access.<br>• `unknown`: the subscription is in an unknown state. Refer to the _gives_access_ field to determine whether or not to grant access.<br>• `incomplete`: the subscription is in an incomplete state, maybe due to incorrect billing details or because it's scheduled to start in the future.
|
|
2360
|
-
*
|
|
2361
2509
|
* @example trialing
|
|
2362
2510
|
* @enum {string}
|
|
2363
2511
|
*/
|
|
@@ -2459,6 +2607,22 @@ export interface components {
|
|
|
2459
2607
|
/** @description The target customer after the transfer */
|
|
2460
2608
|
target_customer: components["schemas"]["Customer"];
|
|
2461
2609
|
};
|
|
2610
|
+
/** VirtualCurrencyBalance */
|
|
2611
|
+
VirtualCurrencyBalance: {
|
|
2612
|
+
/**
|
|
2613
|
+
* @description String representing the object's type. Objects of the same type share the same value.
|
|
2614
|
+
* @enum {string}
|
|
2615
|
+
*/
|
|
2616
|
+
object: "virtual_currency_balance";
|
|
2617
|
+
/** @description The code of the virtual currency. */
|
|
2618
|
+
currency_code: string;
|
|
2619
|
+
/** @description The balance of the virtual currency. */
|
|
2620
|
+
balance: number;
|
|
2621
|
+
/** @description The description of the virtual currency. */
|
|
2622
|
+
description?: string;
|
|
2623
|
+
/** @description The name of the virtual currency. */
|
|
2624
|
+
name?: string;
|
|
2625
|
+
};
|
|
2462
2626
|
};
|
|
2463
2627
|
responses: {
|
|
2464
2628
|
/** @description Bad request */
|
|
@@ -2611,7 +2775,6 @@ export interface operations {
|
|
|
2611
2775
|
"application/json": {
|
|
2612
2776
|
/**
|
|
2613
2777
|
* @description The ID of the offering the paywall will be created for.
|
|
2614
|
-
*
|
|
2615
2778
|
* @example ofrng123456789a
|
|
2616
2779
|
*/
|
|
2617
2780
|
offering_id: string;
|
|
@@ -3097,8 +3260,10 @@ export interface operations {
|
|
|
3097
3260
|
"get-customer": {
|
|
3098
3261
|
parameters: {
|
|
3099
3262
|
query?: {
|
|
3100
|
-
/**
|
|
3101
|
-
*
|
|
3263
|
+
/**
|
|
3264
|
+
* @description Specifies which fields in the response should be expanded.
|
|
3265
|
+
* Accepted values are: `attributes` (requires `customer_information:customers:read` permission).
|
|
3266
|
+
*/
|
|
3102
3267
|
expand?: "attributes"[];
|
|
3103
3268
|
};
|
|
3104
3269
|
header?: never;
|
|
@@ -3155,11 +3320,13 @@ export interface operations {
|
|
|
3155
3320
|
[name: string]: unknown;
|
|
3156
3321
|
};
|
|
3157
3322
|
content: {
|
|
3158
|
-
/**
|
|
3323
|
+
/**
|
|
3324
|
+
* @example {
|
|
3159
3325
|
* "object": "customer",
|
|
3160
3326
|
* "id": "b5b7bfd2-66fb-4091-af50-7c3cdccfdf24",
|
|
3161
3327
|
* "deleted_at": 1658399423658
|
|
3162
|
-
* }
|
|
3328
|
+
* }
|
|
3329
|
+
*/
|
|
3163
3330
|
"application/json": components["schemas"]["DeletedObject"];
|
|
3164
3331
|
};
|
|
3165
3332
|
};
|
|
@@ -3224,8 +3391,10 @@ export interface operations {
|
|
|
3224
3391
|
"get-product": {
|
|
3225
3392
|
parameters: {
|
|
3226
3393
|
query?: {
|
|
3227
|
-
/**
|
|
3228
|
-
*
|
|
3394
|
+
/**
|
|
3395
|
+
* @description Specifies which fields in the response should be expanded.
|
|
3396
|
+
* Accepted values are: `app` (requires `project_configuration:apps:read` permission).
|
|
3397
|
+
*/
|
|
3229
3398
|
expand?: "app"[];
|
|
3230
3399
|
};
|
|
3231
3400
|
header?: never;
|
|
@@ -3297,6 +3466,56 @@ export interface operations {
|
|
|
3297
3466
|
503: components["responses"]["InternalError"];
|
|
3298
3467
|
};
|
|
3299
3468
|
};
|
|
3469
|
+
"create-product-in-store": {
|
|
3470
|
+
parameters: {
|
|
3471
|
+
query?: never;
|
|
3472
|
+
header?: never;
|
|
3473
|
+
path: {
|
|
3474
|
+
/** @description ID of the project */
|
|
3475
|
+
project_id: string;
|
|
3476
|
+
/** @description ID of the product */
|
|
3477
|
+
product_id: string;
|
|
3478
|
+
};
|
|
3479
|
+
cookie?: never;
|
|
3480
|
+
};
|
|
3481
|
+
/**
|
|
3482
|
+
* @description Store-specific information. Only required for subscription products.
|
|
3483
|
+
* For in-app purchase products, send an empty body or omit the request body entirely.
|
|
3484
|
+
*/
|
|
3485
|
+
requestBody?: {
|
|
3486
|
+
content: {
|
|
3487
|
+
"application/json": {
|
|
3488
|
+
/** @description Store-specific information for creating the product in the store */
|
|
3489
|
+
store_information?: components["schemas"]["CreateAppStoreConnectSubscriptionInput"] | components["schemas"]["CreateAppStoreConnectInAppPurchaseInput"];
|
|
3490
|
+
};
|
|
3491
|
+
};
|
|
3492
|
+
};
|
|
3493
|
+
responses: {
|
|
3494
|
+
/** @description Success. The product was pushed to the store */
|
|
3495
|
+
201: {
|
|
3496
|
+
headers: {
|
|
3497
|
+
"RevenueCat-Rate-Limit-Current-Usage": components["headers"]["RateLimitCurrentUsage"];
|
|
3498
|
+
"RevenueCat-Rate-Limit-Current-Limit": components["headers"]["RateLimitCurrentLimit"];
|
|
3499
|
+
[name: string]: unknown;
|
|
3500
|
+
};
|
|
3501
|
+
content: {
|
|
3502
|
+
"application/json": {
|
|
3503
|
+
created_product: components["schemas"]["StoreProduct"];
|
|
3504
|
+
};
|
|
3505
|
+
};
|
|
3506
|
+
};
|
|
3507
|
+
400: components["responses"]["BadRequest"];
|
|
3508
|
+
401: components["responses"]["Unauthorized"];
|
|
3509
|
+
403: components["responses"]["Forbidden"];
|
|
3510
|
+
404: components["responses"]["NotFound"];
|
|
3511
|
+
409: components["responses"]["Conflict"];
|
|
3512
|
+
422: components["responses"]["UnprocessableEntity"];
|
|
3513
|
+
423: components["responses"]["Locked"];
|
|
3514
|
+
429: components["responses"]["RateLimited"];
|
|
3515
|
+
500: components["responses"]["InternalError"];
|
|
3516
|
+
503: components["responses"]["InternalError"];
|
|
3517
|
+
};
|
|
3518
|
+
};
|
|
3300
3519
|
"list-products": {
|
|
3301
3520
|
parameters: {
|
|
3302
3521
|
query?: {
|
|
@@ -3304,8 +3523,10 @@ export interface operations {
|
|
|
3304
3523
|
app_id?: string;
|
|
3305
3524
|
starting_after?: string;
|
|
3306
3525
|
limit?: number;
|
|
3307
|
-
/**
|
|
3308
|
-
*
|
|
3526
|
+
/**
|
|
3527
|
+
* @description Specifies which fields in the response should be expanded.
|
|
3528
|
+
* Accepted values are: `items.app` (requires `project_configuration:apps:read` permission).
|
|
3529
|
+
*/
|
|
3309
3530
|
expand?: "items.app"[];
|
|
3310
3531
|
};
|
|
3311
3532
|
header?: never;
|
|
@@ -3358,7 +3579,6 @@ export interface operations {
|
|
|
3358
3579
|
* - For Stripe, the product identifier that always starts with "prod_"
|
|
3359
3580
|
* - For Amazon, if it's a subscription, the term SKU of the subscription. If it's a one-time purchase, the SKU of the product.
|
|
3360
3581
|
* - For Roku, this is the product identifier of the subscription or one-time purchase product.
|
|
3361
|
-
*
|
|
3362
3582
|
* @example com.revenuecat.magicweather.monthly
|
|
3363
3583
|
*/
|
|
3364
3584
|
store_identifier: string;
|
|
@@ -3404,8 +3624,10 @@ export interface operations {
|
|
|
3404
3624
|
"get-entitlement": {
|
|
3405
3625
|
parameters: {
|
|
3406
3626
|
query?: {
|
|
3407
|
-
/**
|
|
3408
|
-
*
|
|
3627
|
+
/**
|
|
3628
|
+
* @description Specifies which fields in the response should be expanded.
|
|
3629
|
+
* Accepted values are: `product` (requires `project_configuration:products:read` permission).
|
|
3630
|
+
*/
|
|
3409
3631
|
expand?: "product"[];
|
|
3410
3632
|
};
|
|
3411
3633
|
header?: never;
|
|
@@ -3529,8 +3751,10 @@ export interface operations {
|
|
|
3529
3751
|
query?: {
|
|
3530
3752
|
starting_after?: string;
|
|
3531
3753
|
limit?: number;
|
|
3532
|
-
/**
|
|
3533
|
-
*
|
|
3754
|
+
/**
|
|
3755
|
+
* @description Specifies which fields in the response should be expanded.
|
|
3756
|
+
* Accepted values are: `items.product` (requires `project_configuration:products:read` permission).
|
|
3757
|
+
*/
|
|
3534
3758
|
expand?: "items.product"[];
|
|
3535
3759
|
};
|
|
3536
3760
|
header?: never;
|
|
@@ -3742,8 +3966,10 @@ export interface operations {
|
|
|
3742
3966
|
"get-offering": {
|
|
3743
3967
|
parameters: {
|
|
3744
3968
|
query?: {
|
|
3745
|
-
/**
|
|
3746
|
-
*
|
|
3969
|
+
/**
|
|
3970
|
+
* @description Specifies which fields in the response should be expanded.
|
|
3971
|
+
* Accepted values are: `package` (requires `project_configuration:packages:read` permission), `package.product` (requires `project_configuration:products:read` permission).
|
|
3972
|
+
*/
|
|
3747
3973
|
expand?: ("package" | "package.product")[];
|
|
3748
3974
|
};
|
|
3749
3975
|
header?: never;
|
|
@@ -3874,8 +4100,10 @@ export interface operations {
|
|
|
3874
4100
|
query?: {
|
|
3875
4101
|
starting_after?: string;
|
|
3876
4102
|
limit?: number;
|
|
3877
|
-
/**
|
|
3878
|
-
*
|
|
4103
|
+
/**
|
|
4104
|
+
* @description Specifies which fields in the response should be expanded.
|
|
4105
|
+
* Accepted values are: `items.package` (requires `project_configuration:packages:read` permission), `items.package.product` (requires `project_configuration:products:read` permission).
|
|
4106
|
+
*/
|
|
3879
4107
|
expand?: ("items.package" | "items.package.product")[];
|
|
3880
4108
|
};
|
|
3881
4109
|
header?: never;
|
|
@@ -3963,8 +4191,10 @@ export interface operations {
|
|
|
3963
4191
|
"get-package": {
|
|
3964
4192
|
parameters: {
|
|
3965
4193
|
query?: {
|
|
3966
|
-
/**
|
|
3967
|
-
*
|
|
4194
|
+
/**
|
|
4195
|
+
* @description Specifies which fields in the response should be expanded.
|
|
4196
|
+
* Accepted values are: `product` (requires `project_configuration:products:read` permission).
|
|
4197
|
+
*/
|
|
3968
4198
|
expand?: "product"[];
|
|
3969
4199
|
};
|
|
3970
4200
|
header?: never;
|
|
@@ -4093,8 +4323,10 @@ export interface operations {
|
|
|
4093
4323
|
query?: {
|
|
4094
4324
|
starting_after?: string;
|
|
4095
4325
|
limit?: number;
|
|
4096
|
-
/**
|
|
4097
|
-
*
|
|
4326
|
+
/**
|
|
4327
|
+
* @description Specifies which fields in the response should be expanded.
|
|
4328
|
+
* Accepted values are: `items.product` (requires `project_configuration:products:read` permission).
|
|
4329
|
+
*/
|
|
4098
4330
|
expand?: "items.product"[];
|
|
4099
4331
|
};
|
|
4100
4332
|
header?: never;
|
|
@@ -4834,6 +5066,151 @@ export interface operations {
|
|
|
4834
5066
|
503: components["responses"]["InternalError"];
|
|
4835
5067
|
};
|
|
4836
5068
|
};
|
|
5069
|
+
"list-virtual-currencies-balances": {
|
|
5070
|
+
parameters: {
|
|
5071
|
+
query?: {
|
|
5072
|
+
include_empty_balances?: boolean;
|
|
5073
|
+
starting_after?: string;
|
|
5074
|
+
limit?: number;
|
|
5075
|
+
};
|
|
5076
|
+
header?: never;
|
|
5077
|
+
path: {
|
|
5078
|
+
/** @description ID of the project */
|
|
5079
|
+
project_id: string;
|
|
5080
|
+
/** @description ID of the customer */
|
|
5081
|
+
customer_id: string;
|
|
5082
|
+
};
|
|
5083
|
+
cookie?: never;
|
|
5084
|
+
};
|
|
5085
|
+
requestBody?: never;
|
|
5086
|
+
responses: {
|
|
5087
|
+
/** @description Success */
|
|
5088
|
+
200: {
|
|
5089
|
+
headers: {
|
|
5090
|
+
"RevenueCat-Rate-Limit-Current-Usage": components["headers"]["RateLimitCurrentUsage"];
|
|
5091
|
+
"RevenueCat-Rate-Limit-Current-Limit": components["headers"]["RateLimitCurrentLimit"];
|
|
5092
|
+
[name: string]: unknown;
|
|
5093
|
+
};
|
|
5094
|
+
content: {
|
|
5095
|
+
"application/json": components["schemas"]["ListVirtualCurrenciesBalances"];
|
|
5096
|
+
};
|
|
5097
|
+
};
|
|
5098
|
+
400: components["responses"]["BadRequest"];
|
|
5099
|
+
401: components["responses"]["Unauthorized"];
|
|
5100
|
+
403: components["responses"]["Forbidden"];
|
|
5101
|
+
404: components["responses"]["NotFound"];
|
|
5102
|
+
423: components["responses"]["Locked"];
|
|
5103
|
+
429: components["responses"]["RateLimited"];
|
|
5104
|
+
500: components["responses"]["InternalError"];
|
|
5105
|
+
503: components["responses"]["InternalError"];
|
|
5106
|
+
};
|
|
5107
|
+
};
|
|
5108
|
+
"create-virtual-currencies-transaction": {
|
|
5109
|
+
parameters: {
|
|
5110
|
+
query?: {
|
|
5111
|
+
include_empty_balances?: boolean;
|
|
5112
|
+
};
|
|
5113
|
+
header?: {
|
|
5114
|
+
/** @description This is an optional idempotency key to ensure exactly once execution of the request. */
|
|
5115
|
+
"Idempotency-Key"?: string;
|
|
5116
|
+
};
|
|
5117
|
+
path: {
|
|
5118
|
+
/** @description ID of the project */
|
|
5119
|
+
project_id: string;
|
|
5120
|
+
/** @description ID of the customer */
|
|
5121
|
+
customer_id: string;
|
|
5122
|
+
};
|
|
5123
|
+
cookie?: never;
|
|
5124
|
+
};
|
|
5125
|
+
requestBody: {
|
|
5126
|
+
content: {
|
|
5127
|
+
"application/json": {
|
|
5128
|
+
/** @description The adjustments to the virtual currencies */
|
|
5129
|
+
adjustments: {
|
|
5130
|
+
[key: string]: number;
|
|
5131
|
+
};
|
|
5132
|
+
/** @description The reference of the transaction */
|
|
5133
|
+
reference?: string | null;
|
|
5134
|
+
};
|
|
5135
|
+
};
|
|
5136
|
+
};
|
|
5137
|
+
responses: {
|
|
5138
|
+
/** @description Success */
|
|
5139
|
+
200: {
|
|
5140
|
+
headers: {
|
|
5141
|
+
"RevenueCat-Rate-Limit-Current-Usage": components["headers"]["RateLimitCurrentUsage"];
|
|
5142
|
+
"RevenueCat-Rate-Limit-Current-Limit": components["headers"]["RateLimitCurrentLimit"];
|
|
5143
|
+
[name: string]: unknown;
|
|
5144
|
+
};
|
|
5145
|
+
content: {
|
|
5146
|
+
"application/json": components["schemas"]["ListVirtualCurrenciesBalances"];
|
|
5147
|
+
};
|
|
5148
|
+
};
|
|
5149
|
+
400: components["responses"]["BadRequest"];
|
|
5150
|
+
401: components["responses"]["Unauthorized"];
|
|
5151
|
+
403: components["responses"]["Forbidden"];
|
|
5152
|
+
404: components["responses"]["NotFound"];
|
|
5153
|
+
409: components["responses"]["Conflict"];
|
|
5154
|
+
422: components["responses"]["UnprocessableEntity"];
|
|
5155
|
+
423: components["responses"]["Locked"];
|
|
5156
|
+
429: components["responses"]["RateLimited"];
|
|
5157
|
+
500: components["responses"]["InternalError"];
|
|
5158
|
+
503: components["responses"]["InternalError"];
|
|
5159
|
+
};
|
|
5160
|
+
};
|
|
5161
|
+
"update-virtual-currencies-balance": {
|
|
5162
|
+
parameters: {
|
|
5163
|
+
query?: {
|
|
5164
|
+
include_empty_balances?: boolean;
|
|
5165
|
+
};
|
|
5166
|
+
header?: {
|
|
5167
|
+
/** @description This is an optional idempotency key to ensure exactly once execution of the request. */
|
|
5168
|
+
"Idempotency-Key"?: string;
|
|
5169
|
+
};
|
|
5170
|
+
path: {
|
|
5171
|
+
/** @description ID of the project */
|
|
5172
|
+
project_id: string;
|
|
5173
|
+
/** @description ID of the customer */
|
|
5174
|
+
customer_id: string;
|
|
5175
|
+
};
|
|
5176
|
+
cookie?: never;
|
|
5177
|
+
};
|
|
5178
|
+
requestBody: {
|
|
5179
|
+
content: {
|
|
5180
|
+
"application/json": {
|
|
5181
|
+
/** @description The adjustments to the virtual currencies */
|
|
5182
|
+
adjustments: {
|
|
5183
|
+
[key: string]: number;
|
|
5184
|
+
};
|
|
5185
|
+
/** @description The reference of the transaction */
|
|
5186
|
+
reference?: string | null;
|
|
5187
|
+
};
|
|
5188
|
+
};
|
|
5189
|
+
};
|
|
5190
|
+
responses: {
|
|
5191
|
+
/** @description Success */
|
|
5192
|
+
200: {
|
|
5193
|
+
headers: {
|
|
5194
|
+
"RevenueCat-Rate-Limit-Current-Usage": components["headers"]["RateLimitCurrentUsage"];
|
|
5195
|
+
"RevenueCat-Rate-Limit-Current-Limit": components["headers"]["RateLimitCurrentLimit"];
|
|
5196
|
+
[name: string]: unknown;
|
|
5197
|
+
};
|
|
5198
|
+
content: {
|
|
5199
|
+
"application/json": components["schemas"]["ListVirtualCurrenciesBalances"];
|
|
5200
|
+
};
|
|
5201
|
+
};
|
|
5202
|
+
400: components["responses"]["BadRequest"];
|
|
5203
|
+
401: components["responses"]["Unauthorized"];
|
|
5204
|
+
403: components["responses"]["Forbidden"];
|
|
5205
|
+
404: components["responses"]["NotFound"];
|
|
5206
|
+
409: components["responses"]["Conflict"];
|
|
5207
|
+
422: components["responses"]["UnprocessableEntity"];
|
|
5208
|
+
423: components["responses"]["Locked"];
|
|
5209
|
+
429: components["responses"]["RateLimited"];
|
|
5210
|
+
500: components["responses"]["InternalError"];
|
|
5211
|
+
503: components["responses"]["InternalError"];
|
|
5212
|
+
};
|
|
5213
|
+
};
|
|
4837
5214
|
"list-customer-attributes": {
|
|
4838
5215
|
parameters: {
|
|
4839
5216
|
query?: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "revenuecat-api",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.1.1",
|
|
4
4
|
"description": "Type-safe RevenueCat API client using fetch with automatic rate limiting",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -19,17 +19,17 @@
|
|
|
19
19
|
"url": "git+https://github.com/idolize/revenuecat-api.git"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"openapi-fetch": "^0.
|
|
22
|
+
"openapi-fetch": "^0.15.0"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
|
-
"@eslint/js": "^9.
|
|
26
|
-
"@types/node": "^24.1
|
|
27
|
-
"eslint": "^9.
|
|
28
|
-
"globals": "^16.
|
|
29
|
-
"openapi-typescript": "^7.
|
|
30
|
-
"typescript": "^5.
|
|
31
|
-
"typescript-eslint": "^8.
|
|
32
|
-
"vitest": "^
|
|
25
|
+
"@eslint/js": "^9.38.0",
|
|
26
|
+
"@types/node": "^24.9.1",
|
|
27
|
+
"eslint": "^9.38.0",
|
|
28
|
+
"globals": "^16.4.0",
|
|
29
|
+
"openapi-typescript": "^7.10.1",
|
|
30
|
+
"typescript": "^5.9.3",
|
|
31
|
+
"typescript-eslint": "^8.46.2",
|
|
32
|
+
"vitest": "^4.0.3"
|
|
33
33
|
},
|
|
34
34
|
"scripts": {
|
|
35
35
|
"test": "vitest --no-watch",
|