@parra/parra-js-sdk 0.3.344 → 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.
@@ -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,33 +731,6 @@ export interface AppleSubscriptionGroup {
683
731
  subscription_group_id: string;
684
732
  reference_name: string;
685
733
  }
686
- export interface AppleSubscription {
687
- id: string;
688
- created_at: string;
689
- updated_at: string;
690
- deleted_at?: string | null;
691
- tenant_id: string;
692
- application_id: string;
693
- source_id: string;
694
- sku: string;
695
- reference_name: string;
696
- subscription_id: string;
697
- subscription_group_id: string;
698
- group_level: number;
699
- }
700
- export interface AppleInAppPurchase {
701
- id: string;
702
- created_at: string;
703
- updated_at: string;
704
- deleted_at?: string | null;
705
- tenant_id: string;
706
- application_id: string;
707
- source_id: string;
708
- sku: string;
709
- reference_name: string;
710
- in_app_purchase_id: string;
711
- type: string;
712
- }
713
734
  export interface BillingSourceAppleData {
714
735
  app_store_connect_api_connection_id: string;
715
736
  app_store_server_notification_production_url: string;
@@ -3763,6 +3784,8 @@ declare class ParraAPI {
3763
3784
  getPlansForTenantById: (tenant_id: string, options?: Options) => Promise<TenantPlansResponse>;
3764
3785
  createBillingPortalSession: (tenant_id: string, options?: Options) => Promise<BillingPortalSession>;
3765
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>;
3766
3789
  getAppPaywall: (tenant_id: string, application_id: string, query?: {
3767
3790
  entitlement?: string;
3768
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));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@parra/parra-js-sdk",
3
- "version": "0.3.344",
3
+ "version": "0.3.346",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",