@parra/parra-js-sdk 0.3.345 → 0.3.346
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/ParraAPI.d.ts +50 -42
- package/dist/ParraAPI.js +12 -0
- package/package.json +1 -1
package/dist/ParraAPI.d.ts
CHANGED
@@ -624,6 +624,54 @@ export interface BillingPortalSession {
|
|
624
624
|
export interface CreateEmailSubscriberRequestBody {
|
625
625
|
email: string;
|
626
626
|
}
|
627
|
+
export interface UpdateAppleInAppPurchaseRequestBody {
|
628
|
+
product_id?: string | null;
|
629
|
+
}
|
630
|
+
export interface ProductStub {
|
631
|
+
id: string;
|
632
|
+
created_at: string;
|
633
|
+
updated_at: string;
|
634
|
+
deleted_at?: string | null;
|
635
|
+
tenant_id: string;
|
636
|
+
title: string;
|
637
|
+
key: string;
|
638
|
+
description?: string | null;
|
639
|
+
disabled: boolean;
|
640
|
+
}
|
641
|
+
export interface AppleInAppPurchase {
|
642
|
+
id: string;
|
643
|
+
created_at: string;
|
644
|
+
updated_at: string;
|
645
|
+
deleted_at?: string | null;
|
646
|
+
tenant_id: string;
|
647
|
+
application_id: string;
|
648
|
+
source_id: string;
|
649
|
+
product_id?: string | null;
|
650
|
+
sku: string;
|
651
|
+
reference_name: string;
|
652
|
+
in_app_purchase_id: string;
|
653
|
+
type: string;
|
654
|
+
product?: ProductStub | null;
|
655
|
+
}
|
656
|
+
export interface UpdateAppleSubscriptionRequestBody {
|
657
|
+
product_id?: string | null;
|
658
|
+
}
|
659
|
+
export interface AppleSubscription {
|
660
|
+
id: string;
|
661
|
+
created_at: string;
|
662
|
+
updated_at: string;
|
663
|
+
deleted_at?: string | null;
|
664
|
+
tenant_id: string;
|
665
|
+
application_id: string;
|
666
|
+
source_id: string;
|
667
|
+
product_id?: string | null;
|
668
|
+
sku: string;
|
669
|
+
reference_name: string;
|
670
|
+
subscription_id: string;
|
671
|
+
subscription_group_id: string;
|
672
|
+
group_level: number;
|
673
|
+
product?: ProductStub | null;
|
674
|
+
}
|
627
675
|
export interface ApplePaywallMarketingContent {
|
628
676
|
title: string;
|
629
677
|
subtitle?: string | null;
|
@@ -683,48 +731,6 @@ export interface AppleSubscriptionGroup {
|
|
683
731
|
subscription_group_id: string;
|
684
732
|
reference_name: string;
|
685
733
|
}
|
686
|
-
export interface ProductStub {
|
687
|
-
id: string;
|
688
|
-
created_at: string;
|
689
|
-
updated_at: string;
|
690
|
-
deleted_at?: string | null;
|
691
|
-
tenant_id: string;
|
692
|
-
title: string;
|
693
|
-
key: string;
|
694
|
-
description?: string | null;
|
695
|
-
disabled: boolean;
|
696
|
-
}
|
697
|
-
export interface AppleSubscription {
|
698
|
-
id: string;
|
699
|
-
created_at: string;
|
700
|
-
updated_at: string;
|
701
|
-
deleted_at?: string | null;
|
702
|
-
tenant_id: string;
|
703
|
-
application_id: string;
|
704
|
-
source_id: string;
|
705
|
-
product_id?: string | null;
|
706
|
-
sku: string;
|
707
|
-
reference_name: string;
|
708
|
-
subscription_id: string;
|
709
|
-
subscription_group_id: string;
|
710
|
-
group_level: number;
|
711
|
-
product?: ProductStub | null;
|
712
|
-
}
|
713
|
-
export interface AppleInAppPurchase {
|
714
|
-
id: string;
|
715
|
-
created_at: string;
|
716
|
-
updated_at: string;
|
717
|
-
deleted_at?: string | null;
|
718
|
-
tenant_id: string;
|
719
|
-
application_id: string;
|
720
|
-
source_id: string;
|
721
|
-
product_id?: string | null;
|
722
|
-
sku: string;
|
723
|
-
reference_name: string;
|
724
|
-
in_app_purchase_id: string;
|
725
|
-
type: string;
|
726
|
-
product?: ProductStub | null;
|
727
|
-
}
|
728
734
|
export interface BillingSourceAppleData {
|
729
735
|
app_store_connect_api_connection_id: string;
|
730
736
|
app_store_server_notification_production_url: string;
|
@@ -3778,6 +3784,8 @@ declare class ParraAPI {
|
|
3778
3784
|
getPlansForTenantById: (tenant_id: string, options?: Options) => Promise<TenantPlansResponse>;
|
3779
3785
|
createBillingPortalSession: (tenant_id: string, options?: Options) => Promise<BillingPortalSession>;
|
3780
3786
|
createSubscriberForEmailAudienceById: (email_audience_id: string, body: CreateEmailSubscriberRequestBody, options?: Options) => Promise<Response>;
|
3787
|
+
updateAppleInAppPurchase: (tenant_id: string, billing_source_id: string, apple_in_app_purchase_id: string, body?: UpdateAppleInAppPurchaseRequestBody, options?: Options) => Promise<AppleInAppPurchase>;
|
3788
|
+
updateAppleSubscription: (tenant_id: string, billing_source_id: string, apple_subscription_id: string, body?: UpdateAppleSubscriptionRequestBody, options?: Options) => Promise<AppleSubscription>;
|
3781
3789
|
getAppPaywall: (tenant_id: string, application_id: string, query?: {
|
3782
3790
|
entitlement?: string;
|
3783
3791
|
context?: string;
|
package/dist/ParraAPI.js
CHANGED
@@ -497,6 +497,18 @@ var ParraAPI = /** @class */ (function () {
|
|
497
497
|
"content-type": "application/json",
|
498
498
|
}, raw: true }, options));
|
499
499
|
};
|
500
|
+
this.updateAppleInAppPurchase = function (tenant_id, billing_source_id, apple_in_app_purchase_id, body, options) {
|
501
|
+
if (options === void 0) { options = {}; }
|
502
|
+
return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/billing/sources/").concat(billing_source_id, "/apple/in-app-purchases/").concat(apple_in_app_purchase_id), __assign({ method: "put", body: JSON.stringify(body), headers: {
|
503
|
+
"content-type": "application/json",
|
504
|
+
} }, options));
|
505
|
+
};
|
506
|
+
this.updateAppleSubscription = function (tenant_id, billing_source_id, apple_subscription_id, body, options) {
|
507
|
+
if (options === void 0) { options = {}; }
|
508
|
+
return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/billing/sources/").concat(billing_source_id, "/apple/subscriptions/").concat(apple_subscription_id), __assign({ method: "put", body: JSON.stringify(body), headers: {
|
509
|
+
"content-type": "application/json",
|
510
|
+
} }, options));
|
511
|
+
};
|
500
512
|
this.getAppPaywall = function (tenant_id, application_id, query, options) {
|
501
513
|
if (options === void 0) { options = {}; }
|
502
514
|
return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/applications/").concat(application_id, "/paywall"), __assign({ method: "get", query: query }, options));
|