@parra/parra-js-sdk 0.3.374 → 0.3.376
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/ParraAPI.d.ts +15 -13
- package/dist/ParraAPI.js +8 -2
- package/package.json +1 -1
package/dist/ParraAPI.d.ts
CHANGED
@@ -713,10 +713,15 @@ export interface UserEntitlement {
|
|
713
713
|
entitlement_id: string;
|
714
714
|
key: string;
|
715
715
|
title: string;
|
716
|
+
note?: string | null;
|
716
717
|
}
|
717
718
|
export interface AppPurchaseResponseBody {
|
718
719
|
entitlements: Array<UserEntitlement>;
|
719
720
|
}
|
721
|
+
export interface CreateUserEntitlementRequestBody {
|
722
|
+
entitlement_ids?: Array<string>;
|
723
|
+
note?: string | null;
|
724
|
+
}
|
720
725
|
export declare enum BillingSourceType {
|
721
726
|
stripe = "stripe",
|
722
727
|
paypal = "paypal",
|
@@ -3622,24 +3627,20 @@ export interface UpdateRoleRequestBody {
|
|
3622
3627
|
key?: string;
|
3623
3628
|
description?: string | null;
|
3624
3629
|
}
|
3625
|
-
export interface
|
3626
|
-
role_id
|
3627
|
-
|
3628
|
-
export interface UserRole {
|
3629
|
-
id: string;
|
3630
|
-
created_at: string;
|
3631
|
-
updated_at: string;
|
3632
|
-
deleted_at?: string | null;
|
3633
|
-
name: string;
|
3634
|
-
key: string;
|
3635
|
-
user_id: string;
|
3636
|
-
role_id: string;
|
3630
|
+
export interface AddRolesToUserRequestBody {
|
3631
|
+
role_id?: string | null;
|
3632
|
+
role_ids?: Array<string> | null;
|
3637
3633
|
}
|
3638
3634
|
export interface UpdateTenantUserRequestBody {
|
3639
3635
|
identity?: string | null;
|
3640
3636
|
name?: string | null;
|
3641
3637
|
first_name?: string | null;
|
3642
3638
|
last_name?: string | null;
|
3639
|
+
verified?: boolean | null;
|
3640
|
+
is_blocked?: boolean | null;
|
3641
|
+
is_anonymous?: boolean | null;
|
3642
|
+
is_internal?: boolean | null;
|
3643
|
+
is_test?: boolean | null;
|
3643
3644
|
properties?: object | null;
|
3644
3645
|
}
|
3645
3646
|
export interface UserDevice {
|
@@ -4091,6 +4092,7 @@ declare class ParraAPI {
|
|
4091
4092
|
context?: string;
|
4092
4093
|
}, options?: Options) => Promise<AppPaywall>;
|
4093
4094
|
createPurchaseForTenantApplication: (tenant_id: string, application_id: string, body?: CreateAppPurchaseRequestBody, options?: Options) => Promise<AppPurchaseResponseBody>;
|
4095
|
+
createEntitlementForTenantUserById: (tenant_id: string, user_id: string, body: CreateUserEntitlementRequestBody, options?: Options) => Promise<Response>;
|
4094
4096
|
listEntitlementsForTenantUserById: (tenant_id: string, user_id: string, options?: Options) => Promise<Array<UserEntitlement>>;
|
4095
4097
|
createBillingSource: (tenant_id: string, body: CreateBillingSourceRequestBody, options?: Options) => Promise<BillingSource>;
|
4096
4098
|
listBillingSources: (tenant_id: string, options?: Options) => Promise<Array<BillingSource>>;
|
@@ -4553,7 +4555,7 @@ declare class ParraAPI {
|
|
4553
4555
|
getRoleById: (tenant_id: string, role_id: string, options?: Options) => Promise<Role>;
|
4554
4556
|
updateRoleById: (tenant_id: string, role_id: string, body?: UpdateRoleRequestBody, options?: Options) => Promise<Role>;
|
4555
4557
|
deleteRoleById: (tenant_id: string, role_id: string, options?: Options) => Promise<Response>;
|
4556
|
-
|
4558
|
+
addRolesToUser: (tenant_id: string, user_id: string, body?: AddRolesToUserRequestBody, options?: Options) => Promise<Response>;
|
4557
4559
|
removeRoleFromUser: (tenant_id: string, user_id: string, user_role_id: string, options?: Options) => Promise<Response>;
|
4558
4560
|
getUserForTenantById: (tenant_id: string, user_id: string, query?: {
|
4559
4561
|
include?: string;
|
package/dist/ParraAPI.js
CHANGED
@@ -535,6 +535,12 @@ var ParraAPI = /** @class */ (function () {
|
|
535
535
|
"content-type": "application/json",
|
536
536
|
} }, options));
|
537
537
|
};
|
538
|
+
this.createEntitlementForTenantUserById = function (tenant_id, user_id, body, options) {
|
539
|
+
if (options === void 0) { options = {}; }
|
540
|
+
return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/users/").concat(user_id, "/entitlements"), __assign({ method: "post", body: JSON.stringify(body), headers: {
|
541
|
+
"content-type": "application/json",
|
542
|
+
}, raw: true }, options));
|
543
|
+
};
|
538
544
|
this.listEntitlementsForTenantUserById = function (tenant_id, user_id, options) {
|
539
545
|
if (options === void 0) { options = {}; }
|
540
546
|
return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/users/").concat(user_id, "/entitlements"), __assign({ method: "get" }, options));
|
@@ -1723,11 +1729,11 @@ var ParraAPI = /** @class */ (function () {
|
|
1723
1729
|
if (options === void 0) { options = {}; }
|
1724
1730
|
return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/roles/").concat(role_id), __assign({ method: "delete" }, options));
|
1725
1731
|
};
|
1726
|
-
this.
|
1732
|
+
this.addRolesToUser = function (tenant_id, user_id, body, options) {
|
1727
1733
|
if (options === void 0) { options = {}; }
|
1728
1734
|
return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/users/").concat(user_id, "/roles"), __assign({ method: "post", body: JSON.stringify(body), headers: {
|
1729
1735
|
"content-type": "application/json",
|
1730
|
-
} }, options));
|
1736
|
+
}, raw: true }, options));
|
1731
1737
|
};
|
1732
1738
|
this.removeRoleFromUser = function (tenant_id, user_id, user_role_id, options) {
|
1733
1739
|
if (options === void 0) { options = {}; }
|