@parra/parra-js-sdk 0.3.114 → 0.3.115
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 +12 -3
- package/dist/ParraAPI.js +15 -0
- package/package.json +1 -1
package/dist/ParraAPI.d.ts
CHANGED
|
@@ -73,13 +73,14 @@ export interface TenantUserCollectionStub {
|
|
|
73
73
|
email?: string | null;
|
|
74
74
|
email_verified?: boolean | null;
|
|
75
75
|
phone_number?: string | null;
|
|
76
|
-
phone_number_verified?: boolean;
|
|
76
|
+
phone_number_verified?: boolean | null;
|
|
77
77
|
first_name?: string | null;
|
|
78
78
|
last_name?: string | null;
|
|
79
79
|
locale?: string | null;
|
|
80
80
|
signed_up_at?: string | null;
|
|
81
81
|
last_updated_at?: string | null;
|
|
82
82
|
last_seen_at?: string | null;
|
|
83
|
+
last_login_at?: string | null;
|
|
83
84
|
}
|
|
84
85
|
export interface TenantUser {
|
|
85
86
|
id: string;
|
|
@@ -93,13 +94,14 @@ export interface TenantUser {
|
|
|
93
94
|
email?: string | null;
|
|
94
95
|
email_verified?: boolean | null;
|
|
95
96
|
phone_number?: string | null;
|
|
96
|
-
phone_number_verified?: boolean;
|
|
97
|
+
phone_number_verified?: boolean | null;
|
|
97
98
|
first_name?: string | null;
|
|
98
99
|
last_name?: string | null;
|
|
99
100
|
locale?: string | null;
|
|
100
101
|
signed_up_at?: string | null;
|
|
101
102
|
last_updated_at?: string | null;
|
|
102
103
|
last_seen_at?: string | null;
|
|
104
|
+
last_login_at?: string | null;
|
|
103
105
|
properties: object;
|
|
104
106
|
identities?: Array<Identity> | null;
|
|
105
107
|
}
|
|
@@ -1398,6 +1400,10 @@ export interface UpdateChannelRequestBody {
|
|
|
1398
1400
|
apns?: UpdateApnsChannelRequestBody;
|
|
1399
1401
|
inbox?: UpdateInboxChannelRequestBody;
|
|
1400
1402
|
}
|
|
1403
|
+
export interface TenantUserInfo {
|
|
1404
|
+
roles: Array<string>;
|
|
1405
|
+
user: TenantUser;
|
|
1406
|
+
}
|
|
1401
1407
|
export declare enum GrantType {
|
|
1402
1408
|
authorizationCode = "authorization_code",
|
|
1403
1409
|
clientCredentials = "client_credentials",
|
|
@@ -1424,12 +1430,12 @@ export interface JwtConfiguration {
|
|
|
1424
1430
|
}
|
|
1425
1431
|
export interface RefreshTokenConfiguration {
|
|
1426
1432
|
expiration_type: string;
|
|
1433
|
+
rotation_type: string;
|
|
1427
1434
|
idle_token_lifetime: number;
|
|
1428
1435
|
infinite_idle_token_lifetime: boolean;
|
|
1429
1436
|
infinite_token_lifetime: boolean;
|
|
1430
1437
|
leeway: number;
|
|
1431
1438
|
token_lifetime: number;
|
|
1432
|
-
rotation_type: string;
|
|
1433
1439
|
}
|
|
1434
1440
|
export interface Client {
|
|
1435
1441
|
id: string;
|
|
@@ -2039,6 +2045,9 @@ declare class ParraAPI {
|
|
|
2039
2045
|
createChannelForNotificationTemplate: (tenant_id: string, notification_template_id: string, body: CreateChannelRequestBody) => Promise<Channel>;
|
|
2040
2046
|
updateChannelForNotificationTemplate: (tenant_id: string, notification_template_id: string, channel_id: string, body: UpdateChannelRequestBody) => Promise<Channel>;
|
|
2041
2047
|
deleteChannelForNotificationTemplate: (tenant_id: string, notification_template_id: string, channel_id: string) => Promise<Response>;
|
|
2048
|
+
loginUserForTenant: (tenant_id: string) => Promise<TenantUserInfo>;
|
|
2049
|
+
getTenantUserInfo: (tenant_id: string) => Promise<TenantUserInfo>;
|
|
2050
|
+
logoutUserForTenant: (tenant_id: string) => Promise<Response>;
|
|
2042
2051
|
getClientForTenantApplication: (tenant_id: string, application_id: string) => Promise<Client>;
|
|
2043
2052
|
createClientForTenantApplication: (tenant_id: string, application_id: string) => Promise<Client>;
|
|
2044
2053
|
updateClientForTenantApplication: (tenant_id: string, application_id: string, body?: UpdateClientRequestBody) => Promise<Client>;
|
package/dist/ParraAPI.js
CHANGED
|
@@ -915,6 +915,21 @@ var ParraAPI = /** @class */ (function () {
|
|
|
915
915
|
method: "delete",
|
|
916
916
|
});
|
|
917
917
|
};
|
|
918
|
+
this.loginUserForTenant = function (tenant_id) {
|
|
919
|
+
return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/auth/login"), {
|
|
920
|
+
method: "post",
|
|
921
|
+
});
|
|
922
|
+
};
|
|
923
|
+
this.getTenantUserInfo = function (tenant_id) {
|
|
924
|
+
return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/auth/user-info"), {
|
|
925
|
+
method: "post",
|
|
926
|
+
});
|
|
927
|
+
};
|
|
928
|
+
this.logoutUserForTenant = function (tenant_id) {
|
|
929
|
+
return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/auth/logout"), {
|
|
930
|
+
method: "post",
|
|
931
|
+
});
|
|
932
|
+
};
|
|
918
933
|
this.getClientForTenantApplication = function (tenant_id, application_id) {
|
|
919
934
|
return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/applications/").concat(application_id, "/client"), {
|
|
920
935
|
method: "get",
|