@parra/parra-js-sdk 0.3.328 → 0.3.330
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 +58 -16
- package/dist/ParraAPI.js +14 -0
- package/package.json +1 -1
package/dist/ParraAPI.d.ts
CHANGED
|
@@ -403,6 +403,10 @@ export interface Identity {
|
|
|
403
403
|
external_id?: string | null;
|
|
404
404
|
has_password?: boolean | null;
|
|
405
405
|
}
|
|
406
|
+
export interface TenantUserEntitlement {
|
|
407
|
+
id: string;
|
|
408
|
+
key: string;
|
|
409
|
+
}
|
|
406
410
|
export interface TenantUserStub {
|
|
407
411
|
id: string;
|
|
408
412
|
created_at: string;
|
|
@@ -502,6 +506,7 @@ export interface TenantUser {
|
|
|
502
506
|
properties: object;
|
|
503
507
|
metadata: object;
|
|
504
508
|
identities?: Array<Identity> | null;
|
|
509
|
+
entitlements?: Array<TenantUserEntitlement> | null;
|
|
505
510
|
}
|
|
506
511
|
export interface UserInfoResponse {
|
|
507
512
|
roles?: Array<string>;
|
|
@@ -617,6 +622,32 @@ export interface BillingPortalSession {
|
|
|
617
622
|
export interface CreateEmailSubscriberRequestBody {
|
|
618
623
|
email: string;
|
|
619
624
|
}
|
|
625
|
+
export interface ApplePaywallMarketingContent {
|
|
626
|
+
title: string;
|
|
627
|
+
subtitle?: string | null;
|
|
628
|
+
product_image: ImageAssetStub | null;
|
|
629
|
+
}
|
|
630
|
+
export interface ApplePaywall {
|
|
631
|
+
id: string;
|
|
632
|
+
created_at: string;
|
|
633
|
+
updated_at: string;
|
|
634
|
+
deleted_at?: string | null;
|
|
635
|
+
group_id?: string | null;
|
|
636
|
+
product_ids?: Array<string> | null;
|
|
637
|
+
marketing_content?: ApplePaywallMarketingContent | null;
|
|
638
|
+
}
|
|
639
|
+
export type AppPaywall = ApplePaywall;
|
|
640
|
+
export interface CreateAppPurchaseRequestBody {
|
|
641
|
+
apple_receipt?: string;
|
|
642
|
+
apple_receipts?: Array<string>;
|
|
643
|
+
}
|
|
644
|
+
export interface AppEntitlement {
|
|
645
|
+
id: string;
|
|
646
|
+
key: string;
|
|
647
|
+
}
|
|
648
|
+
export interface AppPurchaseResponseBody {
|
|
649
|
+
entitlements: Array<AppEntitlement>;
|
|
650
|
+
}
|
|
620
651
|
export declare enum BillingSourceType {
|
|
621
652
|
stripe = "stripe",
|
|
622
653
|
paypal = "paypal",
|
|
@@ -654,13 +685,13 @@ export interface UpdateBillingSourceRequestBody {
|
|
|
654
685
|
description?: string | null;
|
|
655
686
|
}
|
|
656
687
|
export interface UpdateEntitlementRequestBody {
|
|
657
|
-
title
|
|
658
|
-
key
|
|
688
|
+
title?: string;
|
|
689
|
+
key?: string;
|
|
659
690
|
description?: string | null;
|
|
660
691
|
}
|
|
661
692
|
export interface CreateEntitlementRequestBody {
|
|
662
|
-
title
|
|
663
|
-
key
|
|
693
|
+
title?: string;
|
|
694
|
+
key?: string;
|
|
664
695
|
description?: string | null;
|
|
665
696
|
}
|
|
666
697
|
export interface Entitlement {
|
|
@@ -676,13 +707,13 @@ export interface Entitlement {
|
|
|
676
707
|
is_free: boolean;
|
|
677
708
|
}
|
|
678
709
|
export interface UpdateProductRequestBody {
|
|
679
|
-
title
|
|
680
|
-
key
|
|
710
|
+
title?: string;
|
|
711
|
+
key?: string;
|
|
681
712
|
description?: string | null;
|
|
682
713
|
}
|
|
683
714
|
export interface CreateProductRequestBody {
|
|
684
|
-
title
|
|
685
|
-
key
|
|
715
|
+
title?: string;
|
|
716
|
+
key?: string;
|
|
686
717
|
description?: string | null;
|
|
687
718
|
}
|
|
688
719
|
export interface ProductEntitlement {
|
|
@@ -899,17 +930,12 @@ export interface CreatorUpdateAttachmentStub {
|
|
|
899
930
|
id: string;
|
|
900
931
|
image?: ImageAssetStub | null;
|
|
901
932
|
}
|
|
902
|
-
export interface EntitlementStub {
|
|
903
|
-
id: string;
|
|
904
|
-
title: string;
|
|
905
|
-
key: string;
|
|
906
|
-
}
|
|
907
933
|
export declare enum CreatorUpdateVisibilityType {
|
|
908
934
|
public = "public",
|
|
909
935
|
private = "private"
|
|
910
936
|
}
|
|
911
937
|
export interface CreatorUpdateVisibility {
|
|
912
|
-
|
|
938
|
+
entitlement_id?: string | null;
|
|
913
939
|
post_visibility: CreatorUpdateVisibilityType;
|
|
914
940
|
attachment_visibility?: CreatorUpdateVisibilityType | null;
|
|
915
941
|
}
|
|
@@ -1022,6 +1048,15 @@ export interface ContentCard {
|
|
|
1022
1048
|
description?: string | null;
|
|
1023
1049
|
action?: ContentCardAction | null;
|
|
1024
1050
|
}
|
|
1051
|
+
export interface EntitlementStub {
|
|
1052
|
+
id: string;
|
|
1053
|
+
title: string;
|
|
1054
|
+
key: string;
|
|
1055
|
+
}
|
|
1056
|
+
export interface AppPaywallConfiguration {
|
|
1057
|
+
context?: string | null;
|
|
1058
|
+
entitlement?: EntitlementStub;
|
|
1059
|
+
}
|
|
1025
1060
|
export interface CreatorUpdateAppStub {
|
|
1026
1061
|
id: string;
|
|
1027
1062
|
created_at: string;
|
|
@@ -1031,6 +1066,7 @@ export interface CreatorUpdateAppStub {
|
|
|
1031
1066
|
body?: string;
|
|
1032
1067
|
sender?: CreatorUpdateSenderStub | null;
|
|
1033
1068
|
attachments?: Array<CreatorUpdateAttachmentStub>;
|
|
1069
|
+
attachment_paywall?: AppPaywallConfiguration | null;
|
|
1034
1070
|
}
|
|
1035
1071
|
export type FeedItemData = YoutubeVideo | ContentCard | CreatorUpdateAppStub;
|
|
1036
1072
|
export interface FeedItem {
|
|
@@ -3667,6 +3703,11 @@ declare class ParraAPI {
|
|
|
3667
3703
|
getPlansForTenantById: (tenant_id: string, options?: Options) => Promise<TenantPlansResponse>;
|
|
3668
3704
|
createBillingPortalSession: (tenant_id: string, options?: Options) => Promise<BillingPortalSession>;
|
|
3669
3705
|
createSubscriberForEmailAudienceById: (email_audience_id: string, body: CreateEmailSubscriberRequestBody, options?: Options) => Promise<Response>;
|
|
3706
|
+
getAppPaywall: (tenant_id: string, application_id: string, query?: {
|
|
3707
|
+
entitlement?: string;
|
|
3708
|
+
context?: string;
|
|
3709
|
+
}, options?: Options) => Promise<AppPaywall>;
|
|
3710
|
+
createPurchaseForTenantApplication: (tenant_id: string, application_id: string, body?: CreateAppPurchaseRequestBody, options?: Options) => Promise<AppPurchaseResponseBody>;
|
|
3670
3711
|
createBillingSource: (tenant_id: string, body: CreateBillingSourceRequestBody, options?: Options) => Promise<BillingSource>;
|
|
3671
3712
|
listBillingSources: (tenant_id: string, options?: Options) => Promise<Array<BillingSource>>;
|
|
3672
3713
|
getBillingSourceById: (tenant_id: string, billing_source_id: string, options?: Options) => Promise<BillingSource>;
|
|
@@ -3675,12 +3716,12 @@ declare class ParraAPI {
|
|
|
3675
3716
|
createEntitlement: (tenant_id: string, body?: CreateEntitlementRequestBody, options?: Options) => Promise<Entitlement>;
|
|
3676
3717
|
listEntitlements: (tenant_id: string, options?: Options) => Promise<Array<Entitlement>>;
|
|
3677
3718
|
getEntitlementById: (tenant_id: string, entitlement_id: string, options?: Options) => Promise<Entitlement>;
|
|
3678
|
-
updateEntitlementById: (tenant_id: string, entitlement_id: string, body
|
|
3719
|
+
updateEntitlementById: (tenant_id: string, entitlement_id: string, body?: UpdateEntitlementRequestBody, options?: Options) => Promise<Entitlement>;
|
|
3679
3720
|
deleteEntitlementById: (tenant_id: string, entitlement_id: string, options?: Options) => Promise<Response>;
|
|
3680
3721
|
createProduct: (tenant_id: string, body?: CreateProductRequestBody, options?: Options) => Promise<Product>;
|
|
3681
3722
|
listProducts: (tenant_id: string, options?: Options) => Promise<Array<Product>>;
|
|
3682
3723
|
getProductById: (tenant_id: string, product_id: string, options?: Options) => Promise<Product>;
|
|
3683
|
-
updateProductById: (tenant_id: string, product_id: string, body
|
|
3724
|
+
updateProductById: (tenant_id: string, product_id: string, body?: UpdateProductRequestBody, options?: Options) => Promise<Product>;
|
|
3684
3725
|
deleteProductById: (tenant_id: string, product_id: string, options?: Options) => Promise<Response>;
|
|
3685
3726
|
addEntitlementToProduct: (tenant_id: string, product_id: string, body: CreateProductEntitlementRequestBody, options?: Options) => Promise<ProductEntitlement>;
|
|
3686
3727
|
deleteProductEntitlement: (tenant_id: string, product_id: string, product_entitlement_id: string, options?: Options) => Promise<Response>;
|
|
@@ -4021,6 +4062,7 @@ declare class ParraAPI {
|
|
|
4021
4062
|
group?: string;
|
|
4022
4063
|
type?: string;
|
|
4023
4064
|
}, options?: Options) => Promise<Array<TenantConnectedApp>>;
|
|
4065
|
+
getConnectedAppConnectionById: (tenant_id: string, connected_app_connection_id: string, options?: Options) => Promise<ConnectedAppConnection>;
|
|
4024
4066
|
updateConnectedAppConnectionById: (tenant_id: string, connected_app_connection_id: string, body?: UpdateConnectedAppConnectionRequestBody, options?: Options) => Promise<ConnectedAppConnection>;
|
|
4025
4067
|
deleteConnectedAppConnectionById: (tenant_id: string, connected_app_connection_id: string, options?: Options) => Promise<ConnectedAppConnection>;
|
|
4026
4068
|
createConnectionForConnectedApp: (tenant_id: string, connected_app_id: string, body?: CreateConnectedAppConnectionRequestBody, options?: Options) => Promise<ConnectedAppConnection>;
|
package/dist/ParraAPI.js
CHANGED
|
@@ -497,6 +497,16 @@ var ParraAPI = /** @class */ (function () {
|
|
|
497
497
|
"content-type": "application/json",
|
|
498
498
|
}, raw: true }, options));
|
|
499
499
|
};
|
|
500
|
+
this.getAppPaywall = function (tenant_id, application_id, query, options) {
|
|
501
|
+
if (options === void 0) { options = {}; }
|
|
502
|
+
return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/applications/").concat(application_id, "/paywall"), __assign({ method: "get", query: query }, options));
|
|
503
|
+
};
|
|
504
|
+
this.createPurchaseForTenantApplication = function (tenant_id, application_id, body, options) {
|
|
505
|
+
if (options === void 0) { options = {}; }
|
|
506
|
+
return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/applications/").concat(application_id, "/purchases"), __assign({ method: "post", body: JSON.stringify(body), headers: {
|
|
507
|
+
"content-type": "application/json",
|
|
508
|
+
} }, options));
|
|
509
|
+
};
|
|
500
510
|
this.createBillingSource = function (tenant_id, body, options) {
|
|
501
511
|
if (options === void 0) { options = {}; }
|
|
502
512
|
return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/billing/sources"), __assign({ method: "post", body: JSON.stringify(body), headers: {
|
|
@@ -1437,6 +1447,10 @@ var ParraAPI = /** @class */ (function () {
|
|
|
1437
1447
|
if (options === void 0) { options = {}; }
|
|
1438
1448
|
return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/connected-apps"), __assign({ method: "get", query: query }, options));
|
|
1439
1449
|
};
|
|
1450
|
+
this.getConnectedAppConnectionById = function (tenant_id, connected_app_connection_id, options) {
|
|
1451
|
+
if (options === void 0) { options = {}; }
|
|
1452
|
+
return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/connected-apps/connections/").concat(connected_app_connection_id), __assign({ method: "get" }, options));
|
|
1453
|
+
};
|
|
1440
1454
|
this.updateConnectedAppConnectionById = function (tenant_id, connected_app_connection_id, body, options) {
|
|
1441
1455
|
if (options === void 0) { options = {}; }
|
|
1442
1456
|
return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/connected-apps/connections/").concat(connected_app_connection_id), __assign({ method: "put", body: JSON.stringify(body), headers: {
|