@parra/parra-js-sdk 0.2.52 → 0.2.57

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.
@@ -179,6 +179,25 @@ export interface ApiKeyCollectionResponse {
179
179
  total_count: number;
180
180
  data: Array<ApiKey>;
181
181
  }
182
+ export interface InviteTeamMemberRequestBody {
183
+ name: string;
184
+ email: string;
185
+ }
186
+ export interface UpdateTeamMemberUserRequestBody {
187
+ user_id: string;
188
+ }
189
+ export interface TeamMember {
190
+ id: string;
191
+ created_at: string;
192
+ updated_at: string;
193
+ deleted_at?: string | null;
194
+ tenant_id: string;
195
+ user_id?: string | null;
196
+ name: string;
197
+ email: string;
198
+ avatar_url?: string;
199
+ }
200
+ export declare type TeamMemberListResponse = Array<Tenant>;
182
201
  export interface AnswerData {
183
202
  }
184
203
  export interface FeedbackMetrics {
@@ -448,6 +467,10 @@ declare class ParraAPI {
448
467
  getApiKeysForTenantById: (tenant_id: string) => Promise<ApiKeyCollectionResponse>;
449
468
  deleteApiKeyForTenantById: (tenant_id: string, api_key_id: string) => Promise<Response>;
450
469
  getTenantForApiKeyById: (api_key_id: string) => Promise<Tenant>;
470
+ getTeamMembersForTenantById: (tenant_id: string) => Promise<TeamMemberListResponse>;
471
+ inviteTeamMemberForTenantById: (tenant_id: string, body?: InviteTeamMemberRequestBody | undefined) => Promise<TeamMember>;
472
+ deleteTeamMemberForTenantById: (tenant_id: string, team_member_id: string) => Promise<Response>;
473
+ updateTeamMemberUserForTenantById: (tenant_id: string, team_member_id: string) => Promise<Response>;
451
474
  getCards: () => Promise<CardsResponse>;
452
475
  createQuestion: (body?: CreateQuestionRequestBody | undefined) => Promise<Question>;
453
476
  paginateQuestions: (query?: {
package/dist/ParraAPI.js CHANGED
@@ -140,6 +140,30 @@ var ParraAPI = /** @class */ (function () {
140
140
  method: "get",
141
141
  });
142
142
  };
143
+ this.getTeamMembersForTenantById = function (tenant_id) {
144
+ return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/team-members"), {
145
+ method: "get",
146
+ });
147
+ };
148
+ this.inviteTeamMemberForTenantById = function (tenant_id, body) {
149
+ return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/team-members"), {
150
+ method: "post",
151
+ body: JSON.stringify(body),
152
+ headers: {
153
+ "content-type": "application/json",
154
+ },
155
+ });
156
+ };
157
+ this.deleteTeamMemberForTenantById = function (tenant_id, team_member_id) {
158
+ return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/team-members/").concat(team_member_id), {
159
+ method: "delete",
160
+ });
161
+ };
162
+ this.updateTeamMemberUserForTenantById = function (tenant_id, team_member_id) {
163
+ return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/team-members/").concat(team_member_id, "/user"), {
164
+ method: "post",
165
+ });
166
+ };
143
167
  this.getCards = function () {
144
168
  return _this.http.execute("".concat(_this.options.baseUrl, "/v1/cards"), {
145
169
  method: "get",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@parra/parra-js-sdk",
3
- "version": "0.2.52",
3
+ "version": "0.2.57",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",