@parra/parra-js-sdk 0.3.325 → 0.3.327
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 +104 -1
- package/dist/ParraAPI.js +94 -2
- package/package.json +1 -1
package/dist/ParraAPI.d.ts
CHANGED
|
@@ -617,6 +617,85 @@ export interface BillingPortalSession {
|
|
|
617
617
|
export interface CreateEmailSubscriberRequestBody {
|
|
618
618
|
email: string;
|
|
619
619
|
}
|
|
620
|
+
export declare enum BillingSourceType {
|
|
621
|
+
stripe = "stripe",
|
|
622
|
+
paypal = "paypal",
|
|
623
|
+
apple = "apple",
|
|
624
|
+
google = "google",
|
|
625
|
+
amazon = "amazon",
|
|
626
|
+
microsoft = "microsoft",
|
|
627
|
+
other = "other"
|
|
628
|
+
}
|
|
629
|
+
export interface CreateBillingSourceAppleData {
|
|
630
|
+
app_store_connect_api_connection_id: string;
|
|
631
|
+
}
|
|
632
|
+
export type CreateBillingSourceBillingSourceData = CreateBillingSourceAppleData;
|
|
633
|
+
export interface CreateBillingSourceRequestBody {
|
|
634
|
+
title: string;
|
|
635
|
+
type: BillingSourceType;
|
|
636
|
+
description?: string | null;
|
|
637
|
+
application_id: string;
|
|
638
|
+
data: CreateBillingSourceBillingSourceData;
|
|
639
|
+
}
|
|
640
|
+
export interface BillingSource {
|
|
641
|
+
id: string;
|
|
642
|
+
created_at: string;
|
|
643
|
+
updated_at: string;
|
|
644
|
+
deleted_at?: string | null;
|
|
645
|
+
tenant_id: string;
|
|
646
|
+
title: string;
|
|
647
|
+
type: BillingSourceType;
|
|
648
|
+
description?: string | null;
|
|
649
|
+
application_id: string;
|
|
650
|
+
data: CreateBillingSourceBillingSourceData;
|
|
651
|
+
}
|
|
652
|
+
export interface UpdateBillingSourceRequestBody {
|
|
653
|
+
title: string;
|
|
654
|
+
description?: string | null;
|
|
655
|
+
}
|
|
656
|
+
export interface UpdateEntitlementRequestBody {
|
|
657
|
+
title: string;
|
|
658
|
+
key: string;
|
|
659
|
+
description?: string | null;
|
|
660
|
+
}
|
|
661
|
+
export interface CreateEntitlementRequestBody {
|
|
662
|
+
title: string;
|
|
663
|
+
key: string;
|
|
664
|
+
description?: string | null;
|
|
665
|
+
}
|
|
666
|
+
export interface UpdateProductRequestBody {
|
|
667
|
+
title: string;
|
|
668
|
+
key: string;
|
|
669
|
+
description?: string | null;
|
|
670
|
+
}
|
|
671
|
+
export interface CreateProductRequestBody {
|
|
672
|
+
title: string;
|
|
673
|
+
key: string;
|
|
674
|
+
description?: string | null;
|
|
675
|
+
}
|
|
676
|
+
export interface ProductEntitlement {
|
|
677
|
+
id: string;
|
|
678
|
+
title: string;
|
|
679
|
+
key: string;
|
|
680
|
+
product_id: string;
|
|
681
|
+
entitlement_id: string;
|
|
682
|
+
entitlement?: Entitlement;
|
|
683
|
+
}
|
|
684
|
+
export interface Product {
|
|
685
|
+
id: string;
|
|
686
|
+
created_at: string;
|
|
687
|
+
updated_at: string;
|
|
688
|
+
deleted_at?: string | null;
|
|
689
|
+
tenant_id: string;
|
|
690
|
+
title: string;
|
|
691
|
+
key: string;
|
|
692
|
+
description?: string | null;
|
|
693
|
+
disabled: boolean;
|
|
694
|
+
entitlements?: Array<ProductEntitlement> | null;
|
|
695
|
+
}
|
|
696
|
+
export interface CreateProductEntitlementRequestBody {
|
|
697
|
+
entitlement_id: string;
|
|
698
|
+
}
|
|
620
699
|
export interface AppFaq {
|
|
621
700
|
id: string;
|
|
622
701
|
created_at: string;
|
|
@@ -808,11 +887,17 @@ export interface CreatorUpdateAttachmentStub {
|
|
|
808
887
|
id: string;
|
|
809
888
|
image?: ImageAssetStub | null;
|
|
810
889
|
}
|
|
890
|
+
export interface EntitlementStub {
|
|
891
|
+
id: string;
|
|
892
|
+
title: string;
|
|
893
|
+
key: string;
|
|
894
|
+
}
|
|
811
895
|
export declare enum CreatorUpdateVisibilityType {
|
|
812
896
|
public = "public",
|
|
813
897
|
private = "private"
|
|
814
898
|
}
|
|
815
899
|
export interface CreatorUpdateVisibility {
|
|
900
|
+
entitlement?: EntitlementStub;
|
|
816
901
|
post_visibility: CreatorUpdateVisibilityType;
|
|
817
902
|
attachment_visibility?: CreatorUpdateVisibilityType | null;
|
|
818
903
|
}
|
|
@@ -864,7 +949,8 @@ export interface CreatorUpdateCollectionResponse {
|
|
|
864
949
|
}
|
|
865
950
|
export interface UpdateCreatorUpdateRequestBody {
|
|
866
951
|
title?: string;
|
|
867
|
-
body?: string;
|
|
952
|
+
body?: string | null;
|
|
953
|
+
entitlement_id?: string | null;
|
|
868
954
|
post_visibility?: CreatorUpdateVisibilityType;
|
|
869
955
|
attachment_visibility?: CreatorUpdateVisibilityType;
|
|
870
956
|
}
|
|
@@ -3569,6 +3655,23 @@ declare class ParraAPI {
|
|
|
3569
3655
|
getPlansForTenantById: (tenant_id: string, options?: Options) => Promise<TenantPlansResponse>;
|
|
3570
3656
|
createBillingPortalSession: (tenant_id: string, options?: Options) => Promise<BillingPortalSession>;
|
|
3571
3657
|
createSubscriberForEmailAudienceById: (email_audience_id: string, body: CreateEmailSubscriberRequestBody, options?: Options) => Promise<Response>;
|
|
3658
|
+
createBillingSource: (tenant_id: string, body: CreateBillingSourceRequestBody, options?: Options) => Promise<BillingSource>;
|
|
3659
|
+
listBillingSources: (tenant_id: string, options?: Options) => Promise<Array<BillingSource>>;
|
|
3660
|
+
getBillingSourceById: (tenant_id: string, billing_source_id: string, options?: Options) => Promise<BillingSource>;
|
|
3661
|
+
updateBillingSourceById: (tenant_id: string, billing_source_id: string, body: UpdateBillingSourceRequestBody, options?: Options) => Promise<BillingSource>;
|
|
3662
|
+
deleteBillingSourceById: (tenant_id: string, billing_source_id: string, options?: Options) => Promise<Response>;
|
|
3663
|
+
createEntitlement: (tenant_id: string, body?: CreateEntitlementRequestBody, options?: Options) => Promise<Entitlement>;
|
|
3664
|
+
listEntitlements: (tenant_id: string, options?: Options) => Promise<Array<Entitlement>>;
|
|
3665
|
+
getEntitlementById: (tenant_id: string, entitlement_id: string, options?: Options) => Promise<Entitlement>;
|
|
3666
|
+
updateEntitlementById: (tenant_id: string, entitlement_id: string, body: UpdateEntitlementRequestBody, options?: Options) => Promise<Entitlement>;
|
|
3667
|
+
deleteEntitlementById: (tenant_id: string, entitlement_id: string, options?: Options) => Promise<Response>;
|
|
3668
|
+
createProduct: (tenant_id: string, body?: CreateProductRequestBody, options?: Options) => Promise<Product>;
|
|
3669
|
+
listProducts: (tenant_id: string, options?: Options) => Promise<Array<Product>>;
|
|
3670
|
+
getProductById: (tenant_id: string, product_id: string, options?: Options) => Promise<Product>;
|
|
3671
|
+
updateProductById: (tenant_id: string, product_id: string, body: UpdateProductRequestBody, options?: Options) => Promise<Product>;
|
|
3672
|
+
deleteProductById: (tenant_id: string, product_id: string, options?: Options) => Promise<Response>;
|
|
3673
|
+
addEntitlementToProduct: (tenant_id: string, product_id: string, body: CreateProductEntitlementRequestBody, options?: Options) => Promise<ProductEntitlement>;
|
|
3674
|
+
deleteProductEntitlement: (tenant_id: string, product_id: string, product_entitlement_id: string, options?: Options) => Promise<Response>;
|
|
3572
3675
|
listAppFaqs: (tenant_id: string, application_id: string, query?: {
|
|
3573
3676
|
app_area_id?: string;
|
|
3574
3677
|
}, options?: Options) => Promise<AppFaqView>;
|
package/dist/ParraAPI.js
CHANGED
|
@@ -11,8 +11,8 @@ var __assign = (this && this.__assign) || function () {
|
|
|
11
11
|
return __assign.apply(this, arguments);
|
|
12
12
|
};
|
|
13
13
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
-
exports.
|
|
15
|
-
exports.PolicyDocumentVersionStatus = exports.PolicyDocumentStatus = exports.MailTemplateStatus = void 0;
|
|
14
|
+
exports.MailTemplateType = exports.IntegrationScope = exports.IntegrationConnectionStatus = exports.IntegrationType = exports.ConnectedAppConnectionStatus = exports.ConnectedAppType = exports.TenantOnboardingGoal = exports.DashboardChecklistItemStatus = exports.DashboardChecklistItemType = exports.RefreshTokenRotationType = exports.RefreshTokenExpirationType = exports.JwtAlgorithm = exports.GrantType = exports.PasswordlessStrategy = exports.SettingsItemType = exports.ApnsPushType = exports.ApnsEnvironment = exports.ChannelType = exports.AppVersionStatus = exports.TicketDisplayStatus = exports.UserNoteStatus = exports.TicketLinkType = exports.TemplateType = exports.CampaignStatus = exports.CampaignActionDisplayType = exports.CampaignActionType = exports.CardItemDisplayType = exports.CardItemType = exports.QuestionKind = exports.QuestionType = exports.FeedItemType = exports.CreatorUpdateChannelType = exports.CreatorUpdateVisibilityType = exports.CreatorUpdateStatus = exports.FeedbackFormFieldType = exports.BillingSourceType = exports.SubscriptionStatus = exports.Interval = exports.Currency = exports.IdentityType = exports.PolicyDocumentType = exports.DomainStatus = exports.DomainType = exports.ApplicationType = exports.ReleaseType = exports.ReleaseStatus = exports.TicketIconType = exports.TicketPriority = exports.TicketStatus = exports.TicketType = void 0;
|
|
15
|
+
exports.PolicyDocumentVersionStatus = exports.PolicyDocumentStatus = exports.MailTemplateStatus = exports.MailTemplateVersionStatus = void 0;
|
|
16
16
|
var TicketType;
|
|
17
17
|
(function (TicketType) {
|
|
18
18
|
TicketType["bug"] = "bug";
|
|
@@ -114,6 +114,16 @@ var SubscriptionStatus;
|
|
|
114
114
|
SubscriptionStatus["canceled"] = "canceled";
|
|
115
115
|
SubscriptionStatus["unpaid"] = "unpaid";
|
|
116
116
|
})(SubscriptionStatus || (exports.SubscriptionStatus = SubscriptionStatus = {}));
|
|
117
|
+
var BillingSourceType;
|
|
118
|
+
(function (BillingSourceType) {
|
|
119
|
+
BillingSourceType["stripe"] = "stripe";
|
|
120
|
+
BillingSourceType["paypal"] = "paypal";
|
|
121
|
+
BillingSourceType["apple"] = "apple";
|
|
122
|
+
BillingSourceType["google"] = "google";
|
|
123
|
+
BillingSourceType["amazon"] = "amazon";
|
|
124
|
+
BillingSourceType["microsoft"] = "microsoft";
|
|
125
|
+
BillingSourceType["other"] = "other";
|
|
126
|
+
})(BillingSourceType || (exports.BillingSourceType = BillingSourceType = {}));
|
|
117
127
|
var FeedbackFormFieldType;
|
|
118
128
|
(function (FeedbackFormFieldType) {
|
|
119
129
|
FeedbackFormFieldType["text"] = "text";
|
|
@@ -487,6 +497,88 @@ var ParraAPI = /** @class */ (function () {
|
|
|
487
497
|
"content-type": "application/json",
|
|
488
498
|
}, raw: true }, options));
|
|
489
499
|
};
|
|
500
|
+
this.createBillingSource = function (tenant_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"), __assign({ method: "post", body: JSON.stringify(body), headers: {
|
|
503
|
+
"content-type": "application/json",
|
|
504
|
+
} }, options));
|
|
505
|
+
};
|
|
506
|
+
this.listBillingSources = function (tenant_id, options) {
|
|
507
|
+
if (options === void 0) { options = {}; }
|
|
508
|
+
return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/billing/sources"), __assign({ method: "get" }, options));
|
|
509
|
+
};
|
|
510
|
+
this.getBillingSourceById = function (tenant_id, billing_source_id, options) {
|
|
511
|
+
if (options === void 0) { options = {}; }
|
|
512
|
+
return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/billing/sources/").concat(billing_source_id), __assign({ method: "get" }, options));
|
|
513
|
+
};
|
|
514
|
+
this.updateBillingSourceById = function (tenant_id, billing_source_id, body, options) {
|
|
515
|
+
if (options === void 0) { options = {}; }
|
|
516
|
+
return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/billing/sources/").concat(billing_source_id), __assign({ method: "put", body: JSON.stringify(body), headers: {
|
|
517
|
+
"content-type": "application/json",
|
|
518
|
+
} }, options));
|
|
519
|
+
};
|
|
520
|
+
this.deleteBillingSourceById = function (tenant_id, billing_source_id, options) {
|
|
521
|
+
if (options === void 0) { options = {}; }
|
|
522
|
+
return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/billing/sources/").concat(billing_source_id), __assign({ method: "delete" }, options));
|
|
523
|
+
};
|
|
524
|
+
this.createEntitlement = function (tenant_id, body, options) {
|
|
525
|
+
if (options === void 0) { options = {}; }
|
|
526
|
+
return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/billing/entitlements"), __assign({ method: "post", body: JSON.stringify(body), headers: {
|
|
527
|
+
"content-type": "application/json",
|
|
528
|
+
} }, options));
|
|
529
|
+
};
|
|
530
|
+
this.listEntitlements = function (tenant_id, options) {
|
|
531
|
+
if (options === void 0) { options = {}; }
|
|
532
|
+
return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/billing/entitlements"), __assign({ method: "get" }, options));
|
|
533
|
+
};
|
|
534
|
+
this.getEntitlementById = function (tenant_id, entitlement_id, options) {
|
|
535
|
+
if (options === void 0) { options = {}; }
|
|
536
|
+
return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/billing/entitlements/").concat(entitlement_id), __assign({ method: "get" }, options));
|
|
537
|
+
};
|
|
538
|
+
this.updateEntitlementById = function (tenant_id, entitlement_id, body, options) {
|
|
539
|
+
if (options === void 0) { options = {}; }
|
|
540
|
+
return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/billing/entitlements/").concat(entitlement_id), __assign({ method: "put", body: JSON.stringify(body), headers: {
|
|
541
|
+
"content-type": "application/json",
|
|
542
|
+
} }, options));
|
|
543
|
+
};
|
|
544
|
+
this.deleteEntitlementById = function (tenant_id, entitlement_id, options) {
|
|
545
|
+
if (options === void 0) { options = {}; }
|
|
546
|
+
return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/billing/entitlements/").concat(entitlement_id), __assign({ method: "delete" }, options));
|
|
547
|
+
};
|
|
548
|
+
this.createProduct = function (tenant_id, body, options) {
|
|
549
|
+
if (options === void 0) { options = {}; }
|
|
550
|
+
return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/billing/products"), __assign({ method: "post", body: JSON.stringify(body), headers: {
|
|
551
|
+
"content-type": "application/json",
|
|
552
|
+
} }, options));
|
|
553
|
+
};
|
|
554
|
+
this.listProducts = function (tenant_id, options) {
|
|
555
|
+
if (options === void 0) { options = {}; }
|
|
556
|
+
return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/billing/products"), __assign({ method: "get" }, options));
|
|
557
|
+
};
|
|
558
|
+
this.getProductById = function (tenant_id, product_id, options) {
|
|
559
|
+
if (options === void 0) { options = {}; }
|
|
560
|
+
return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/billing/products/").concat(product_id), __assign({ method: "get" }, options));
|
|
561
|
+
};
|
|
562
|
+
this.updateProductById = function (tenant_id, product_id, body, options) {
|
|
563
|
+
if (options === void 0) { options = {}; }
|
|
564
|
+
return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/billing/products/").concat(product_id), __assign({ method: "put", body: JSON.stringify(body), headers: {
|
|
565
|
+
"content-type": "application/json",
|
|
566
|
+
} }, options));
|
|
567
|
+
};
|
|
568
|
+
this.deleteProductById = function (tenant_id, product_id, options) {
|
|
569
|
+
if (options === void 0) { options = {}; }
|
|
570
|
+
return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/billing/products/").concat(product_id), __assign({ method: "delete" }, options));
|
|
571
|
+
};
|
|
572
|
+
this.addEntitlementToProduct = function (tenant_id, product_id, body, options) {
|
|
573
|
+
if (options === void 0) { options = {}; }
|
|
574
|
+
return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/billing/products/").concat(product_id, "/entitlements"), __assign({ method: "post", body: JSON.stringify(body), headers: {
|
|
575
|
+
"content-type": "application/json",
|
|
576
|
+
} }, options));
|
|
577
|
+
};
|
|
578
|
+
this.deleteProductEntitlement = function (tenant_id, product_id, product_entitlement_id, options) {
|
|
579
|
+
if (options === void 0) { options = {}; }
|
|
580
|
+
return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/billing/products/").concat(product_id, "/entitlements/").concat(product_entitlement_id), __assign({ method: "delete" }, options));
|
|
581
|
+
};
|
|
490
582
|
this.listAppFaqs = function (tenant_id, application_id, query, options) {
|
|
491
583
|
if (options === void 0) { options = {}; }
|
|
492
584
|
return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/applications/").concat(application_id, "/faqs"), __assign({ method: "get", query: query }, options));
|