@parra/parra-js-sdk 0.2.56 → 0.2.59
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 +25 -7
- package/dist/ParraAPI.js +20 -5
- package/package.json +1 -1
package/dist/ParraAPI.d.ts
CHANGED
|
@@ -149,6 +149,9 @@ export interface TenantCollectionResponse {
|
|
|
149
149
|
total_count: number;
|
|
150
150
|
data: Array<Tenant>;
|
|
151
151
|
}
|
|
152
|
+
export interface TenantMetrics {
|
|
153
|
+
team_member_count: number;
|
|
154
|
+
}
|
|
152
155
|
export interface CreateApiKeyRequestBody {
|
|
153
156
|
name: string;
|
|
154
157
|
description?: string | null;
|
|
@@ -179,13 +182,26 @@ export interface ApiKeyCollectionResponse {
|
|
|
179
182
|
total_count: number;
|
|
180
183
|
data: Array<ApiKey>;
|
|
181
184
|
}
|
|
182
|
-
export interface
|
|
183
|
-
id?: string;
|
|
185
|
+
export interface TenantInvitationRequestBody {
|
|
184
186
|
name: string;
|
|
185
187
|
email: string;
|
|
186
188
|
}
|
|
187
|
-
export interface
|
|
188
|
-
|
|
189
|
+
export interface TenantInvitation {
|
|
190
|
+
id: string;
|
|
191
|
+
created_at: string;
|
|
192
|
+
updated_at: string;
|
|
193
|
+
deleted_at?: string | null;
|
|
194
|
+
tenant_id: string;
|
|
195
|
+
member_id?: string | null;
|
|
196
|
+
name: string;
|
|
197
|
+
email: string;
|
|
198
|
+
code?: string;
|
|
199
|
+
expires_at?: string;
|
|
200
|
+
accepted_at?: string | null;
|
|
201
|
+
}
|
|
202
|
+
export declare type TenantInvitationListResponse = Array<TenantInvitation>;
|
|
203
|
+
export interface AcceptTenantInvitationRequestBody {
|
|
204
|
+
code: string;
|
|
189
205
|
}
|
|
190
206
|
export interface TeamMember {
|
|
191
207
|
id: string;
|
|
@@ -198,7 +214,7 @@ export interface TeamMember {
|
|
|
198
214
|
email: string;
|
|
199
215
|
avatar_url?: string;
|
|
200
216
|
}
|
|
201
|
-
export declare type TeamMemberListResponse = Array<
|
|
217
|
+
export declare type TeamMemberListResponse = Array<TeamMember>;
|
|
202
218
|
export interface AnswerData {
|
|
203
219
|
}
|
|
204
220
|
export interface FeedbackMetrics {
|
|
@@ -468,8 +484,10 @@ declare class ParraAPI {
|
|
|
468
484
|
getApiKeysForTenantById: (tenant_id: string) => Promise<ApiKeyCollectionResponse>;
|
|
469
485
|
deleteApiKeyForTenantById: (tenant_id: string, api_key_id: string) => Promise<Response>;
|
|
470
486
|
getTenantForApiKeyById: (api_key_id: string) => Promise<Tenant>;
|
|
487
|
+
getInvitationsForTenantById: (tenant_id: string) => Promise<TenantInvitationListResponse>;
|
|
488
|
+
createInvitationForTenantById: (tenant_id: string, body?: TenantInvitationRequestBody | undefined) => Promise<TenantInvitation>;
|
|
489
|
+
acceptInvitationForTenantById: (tenant_id: string, body?: AcceptTenantInvitationRequestBody | undefined) => Promise<Response>;
|
|
471
490
|
getTeamMembersForTenantById: (tenant_id: string) => Promise<TeamMemberListResponse>;
|
|
472
|
-
inviteTeamMemberForTenantById: (tenant_id: string, body?: InviteTeamMemberRequestBody | undefined) => Promise<TeamMember>;
|
|
473
491
|
deleteTeamMemberForTenantById: (tenant_id: string, team_member_id: string) => Promise<Response>;
|
|
474
492
|
updateTeamMemberUserForTenantById: (tenant_id: string, team_member_id: string) => Promise<Response>;
|
|
475
493
|
getCards: () => Promise<CardsResponse>;
|
|
@@ -506,7 +524,7 @@ declare class ParraAPI {
|
|
|
506
524
|
createIdentityForUserById: (user_id: string, body: CreateIdentityRequestBody) => Promise<IdentityResponse>;
|
|
507
525
|
listIdentitiesForUserById: (user_id: string) => Promise<Array<IdentityResponse>>;
|
|
508
526
|
getUserByProviderAndProviderUserId: (provider: string, provider_user_id: string) => Promise<UserResponse>;
|
|
509
|
-
|
|
527
|
+
checkAuthorization1: (body?: CheckAuthorizationRequestBody | undefined) => Promise<CheckAuthorization>;
|
|
510
528
|
getUserInfo: () => Promise<UserInfoResponse>;
|
|
511
529
|
getParraAuthToken: () => Promise<AuthToken>;
|
|
512
530
|
}
|
package/dist/ParraAPI.js
CHANGED
|
@@ -140,18 +140,33 @@ var ParraAPI = /** @class */ (function () {
|
|
|
140
140
|
method: "get",
|
|
141
141
|
});
|
|
142
142
|
};
|
|
143
|
-
this.
|
|
144
|
-
return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/
|
|
143
|
+
this.getInvitationsForTenantById = function (tenant_id) {
|
|
144
|
+
return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/invitations"), {
|
|
145
145
|
method: "get",
|
|
146
146
|
});
|
|
147
147
|
};
|
|
148
|
-
this.
|
|
149
|
-
return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/
|
|
148
|
+
this.createInvitationForTenantById = function (tenant_id, body) {
|
|
149
|
+
return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/invitations"), {
|
|
150
|
+
method: "post",
|
|
151
|
+
body: JSON.stringify(body),
|
|
152
|
+
headers: {
|
|
153
|
+
"content-type": "application/json",
|
|
154
|
+
},
|
|
155
|
+
});
|
|
156
|
+
};
|
|
157
|
+
this.acceptInvitationForTenantById = function (tenant_id, body) {
|
|
158
|
+
return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/invitations/accept"), {
|
|
150
159
|
method: "post",
|
|
151
160
|
body: JSON.stringify(body),
|
|
152
161
|
headers: {
|
|
153
162
|
"content-type": "application/json",
|
|
154
163
|
},
|
|
164
|
+
raw: true,
|
|
165
|
+
});
|
|
166
|
+
};
|
|
167
|
+
this.getTeamMembersForTenantById = function (tenant_id) {
|
|
168
|
+
return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/team-members"), {
|
|
169
|
+
method: "get",
|
|
155
170
|
});
|
|
156
171
|
};
|
|
157
172
|
this.deleteTeamMemberForTenantById = function (tenant_id, team_member_id) {
|
|
@@ -286,7 +301,7 @@ var ParraAPI = /** @class */ (function () {
|
|
|
286
301
|
method: "get",
|
|
287
302
|
});
|
|
288
303
|
};
|
|
289
|
-
this.
|
|
304
|
+
this.checkAuthorization1 = function (body) {
|
|
290
305
|
return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/authorization/check"), {
|
|
291
306
|
method: "post",
|
|
292
307
|
body: JSON.stringify(body),
|