@parra/parra-js-sdk 0.2.51 → 0.2.56

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,26 @@ export interface ApiKeyCollectionResponse {
179
179
  total_count: number;
180
180
  data: Array<ApiKey>;
181
181
  }
182
+ export interface InviteTeamMemberRequestBody {
183
+ id?: string;
184
+ name: string;
185
+ email: string;
186
+ }
187
+ export interface UpdateTeamMemberUserRequestBody {
188
+ user_id: string;
189
+ }
190
+ export interface TeamMember {
191
+ id: string;
192
+ created_at: string;
193
+ updated_at: string;
194
+ deleted_at?: string | null;
195
+ tenant_id: string;
196
+ user_id?: string | null;
197
+ name: string;
198
+ email: string;
199
+ avatar_url?: string;
200
+ }
201
+ export declare type TeamMemberListResponse = Array<Tenant>;
182
202
  export interface AnswerData {
183
203
  }
184
204
  export interface FeedbackMetrics {
@@ -448,6 +468,10 @@ declare class ParraAPI {
448
468
  getApiKeysForTenantById: (tenant_id: string) => Promise<ApiKeyCollectionResponse>;
449
469
  deleteApiKeyForTenantById: (tenant_id: string, api_key_id: string) => Promise<Response>;
450
470
  getTenantForApiKeyById: (api_key_id: string) => Promise<Tenant>;
471
+ getTeamMembersForTenantById: (tenant_id: string) => Promise<TeamMemberListResponse>;
472
+ inviteTeamMemberForTenantById: (tenant_id: string, body?: InviteTeamMemberRequestBody | undefined) => Promise<TeamMember>;
473
+ deleteTeamMemberForTenantById: (tenant_id: string, team_member_id: string) => Promise<Response>;
474
+ updateTeamMemberUserForTenantById: (tenant_id: string, team_member_id: string) => Promise<Response>;
451
475
  getCards: () => Promise<CardsResponse>;
452
476
  createQuestion: (body?: CreateQuestionRequestBody | undefined) => Promise<Question>;
453
477
  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.51",
3
+ "version": "0.2.56",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",