@parra/parra-js-sdk 0.2.58 → 0.2.61
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 +23 -4
- package/dist/ParraAPI.js +19 -4
- 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,12 +182,26 @@ export interface ApiKeyCollectionResponse {
|
|
|
179
182
|
total_count: number;
|
|
180
183
|
data: Array<ApiKey>;
|
|
181
184
|
}
|
|
182
|
-
export interface
|
|
185
|
+
export interface TenantInvitationRequestBody {
|
|
183
186
|
name: string;
|
|
184
187
|
email: string;
|
|
185
188
|
}
|
|
186
|
-
export interface
|
|
187
|
-
|
|
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;
|
|
188
205
|
}
|
|
189
206
|
export interface TeamMember {
|
|
190
207
|
id: string;
|
|
@@ -467,8 +484,10 @@ declare class ParraAPI {
|
|
|
467
484
|
getApiKeysForTenantById: (tenant_id: string) => Promise<ApiKeyCollectionResponse>;
|
|
468
485
|
deleteApiKeyForTenantById: (tenant_id: string, api_key_id: string) => Promise<Response>;
|
|
469
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>;
|
|
470
490
|
getTeamMembersForTenantById: (tenant_id: string) => Promise<TeamMemberListResponse>;
|
|
471
|
-
inviteTeamMemberForTenantById: (tenant_id: string, body?: InviteTeamMemberRequestBody | undefined) => Promise<TeamMember>;
|
|
472
491
|
deleteTeamMemberForTenantById: (tenant_id: string, team_member_id: string) => Promise<Response>;
|
|
473
492
|
updateTeamMemberUserForTenantById: (tenant_id: string, team_member_id: string) => Promise<Response>;
|
|
474
493
|
getCards: () => Promise<CardsResponse>;
|
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) {
|