@parra/parra-js-sdk 0.3.345 → 0.3.347
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 +53 -42
- package/dist/ParraAPI.js +16 -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;
|
@@ -745,6 +751,8 @@ export interface BillingSource {
|
|
745
751
|
description?: string | null;
|
746
752
|
application_id: string;
|
747
753
|
data: BillingSourceData;
|
754
|
+
last_synced_at?: string | null;
|
755
|
+
last_manual_sync_attempt_at?: string | null;
|
748
756
|
}
|
749
757
|
export interface UpdateBillingSourceRequestBody {
|
750
758
|
title: string;
|
@@ -3778,6 +3786,8 @@ declare class ParraAPI {
|
|
3778
3786
|
getPlansForTenantById: (tenant_id: string, options?: Options) => Promise<TenantPlansResponse>;
|
3779
3787
|
createBillingPortalSession: (tenant_id: string, options?: Options) => Promise<BillingPortalSession>;
|
3780
3788
|
createSubscriberForEmailAudienceById: (email_audience_id: string, body: CreateEmailSubscriberRequestBody, options?: Options) => Promise<Response>;
|
3789
|
+
updateAppleInAppPurchase: (tenant_id: string, billing_source_id: string, apple_in_app_purchase_id: string, body?: UpdateAppleInAppPurchaseRequestBody, options?: Options) => Promise<AppleInAppPurchase>;
|
3790
|
+
updateAppleSubscription: (tenant_id: string, billing_source_id: string, apple_subscription_id: string, body?: UpdateAppleSubscriptionRequestBody, options?: Options) => Promise<AppleSubscription>;
|
3781
3791
|
getAppPaywall: (tenant_id: string, application_id: string, query?: {
|
3782
3792
|
entitlement?: string;
|
3783
3793
|
context?: string;
|
@@ -3790,6 +3800,7 @@ declare class ParraAPI {
|
|
3790
3800
|
updateBillingSourceById: (tenant_id: string, billing_source_id: string, body: UpdateBillingSourceRequestBody, options?: Options) => Promise<BillingSource>;
|
3791
3801
|
deleteBillingSourceById: (tenant_id: string, billing_source_id: string, options?: Options) => Promise<Response>;
|
3792
3802
|
setupAppStoreServerNotificationsForAppleBillingSource: (tenant_id: string, billing_source_id: string, options?: Options) => Promise<Response>;
|
3803
|
+
syncAppStoreForAppleBillingSource: (tenant_id: string, billing_source_id: string, options?: Options) => Promise<BillingSource>;
|
3793
3804
|
testAppStoreServerNotificationsForAppleBillingSource: (tenant_id: string, billing_source_id: string, options?: Options) => Promise<Response>;
|
3794
3805
|
createEntitlement: (tenant_id: string, body?: CreateEntitlementRequestBody, options?: Options) => Promise<Entitlement>;
|
3795
3806
|
listEntitlements: (tenant_id: string, options?: Options) => Promise<Array<Entitlement>>;
|
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));
|
@@ -539,6 +551,10 @@ var ParraAPI = /** @class */ (function () {
|
|
539
551
|
if (options === void 0) { options = {}; }
|
540
552
|
return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/billing/sources/").concat(billing_source_id, "/apple/app-store-server-notifications/setup"), __assign({ method: "post" }, options));
|
541
553
|
};
|
554
|
+
this.syncAppStoreForAppleBillingSource = function (tenant_id, billing_source_id, options) {
|
555
|
+
if (options === void 0) { options = {}; }
|
556
|
+
return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/billing/sources/").concat(billing_source_id, "/apple/app-store/sync"), __assign({ method: "post" }, options));
|
557
|
+
};
|
542
558
|
this.testAppStoreServerNotificationsForAppleBillingSource = function (tenant_id, billing_source_id, options) {
|
543
559
|
if (options === void 0) { options = {}; }
|
544
560
|
return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/billing/sources/").concat(billing_source_id, "/apple/app-store-server-notifications/test"), __assign({ method: "post" }, options));
|