@parra/parra-js-sdk 0.3.61 → 0.3.63

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.
@@ -1375,6 +1375,67 @@ export interface CreateXConnectedAppConnectionRequestBody {
1375
1375
  code_verifier: string;
1376
1376
  }
1377
1377
  export type CreateConnectedAppConnectionRequestBody = CreateSlackConnectedAppConnectionRequestBody | CreateXConnectedAppConnectionRequestBody;
1378
+ export declare enum IntegrationType {
1379
+ parraFeedbackFormBoard = "parra-feedback-form-board",
1380
+ slackFeedbackForm = "slack-feedback-form"
1381
+ }
1382
+ export declare enum IntegrationConnectionStatus {
1383
+ pending = "pending",
1384
+ live = "live",
1385
+ error = "error",
1386
+ disabled = "disabled"
1387
+ }
1388
+ export interface IntegrationConnection {
1389
+ id: string;
1390
+ created_at: string;
1391
+ updated_at: string;
1392
+ deleted_at?: string | null;
1393
+ tenant_id: string;
1394
+ active: boolean;
1395
+ type: IntegrationType;
1396
+ status: IntegrationConnectionStatus;
1397
+ }
1398
+ export declare enum IntegrationScope {
1399
+ global = "global",
1400
+ collection = "collection",
1401
+ resource = "resource"
1402
+ }
1403
+ export interface Integration {
1404
+ id: string;
1405
+ created_at: string;
1406
+ updated_at: string;
1407
+ deleted_at?: string | null;
1408
+ type: IntegrationType;
1409
+ name: string;
1410
+ description: string;
1411
+ scope: IntegrationScope;
1412
+ }
1413
+ export interface TenantIntegration {
1414
+ id: string;
1415
+ created_at: string;
1416
+ updated_at: string;
1417
+ deleted_at?: string | null;
1418
+ type: IntegrationType;
1419
+ name: string;
1420
+ description: string;
1421
+ scope: IntegrationScope;
1422
+ connections: Array<IntegrationConnection>;
1423
+ }
1424
+ export interface UpdateIntegrationConnectionRequestBody {
1425
+ active?: boolean;
1426
+ }
1427
+ export interface CreateSlackFeedbackFormIntegrationConnectionRequestBody {
1428
+ connected_app_id: string;
1429
+ channel: string;
1430
+ message: string;
1431
+ }
1432
+ export interface CreateParraFeedbackFormBoardIntegrationConnectionRequestBody {
1433
+ form_id: string;
1434
+ board_id: string;
1435
+ ticket_title: string;
1436
+ ticket_description?: string;
1437
+ }
1438
+ export type CreateIntegrationConnectionRequestBody = CreateSlackFeedbackFormIntegrationConnectionRequestBody | CreateParraFeedbackFormBoardIntegrationConnectionRequestBody;
1378
1439
  export interface TenantInvitationRequestBody {
1379
1440
  name: string;
1380
1441
  email: string;
@@ -1650,6 +1711,14 @@ declare class ParraAPI {
1650
1711
  updateConnectedAppConnectionById: (tenant_id: string, connected_app_connection_id: string, body?: UpdateConnectedAppConnectionRequestBody) => Promise<ConnectedAppConnection>;
1651
1712
  deleteConnectedAppConnectionById: (tenant_id: string, connected_app_connection_id: string) => Promise<ConnectedAppConnection>;
1652
1713
  createConnectionForConnectedApp: (tenant_id: string, connected_app_id: string, body?: CreateConnectedAppConnectionRequestBody) => Promise<ConnectedAppConnection>;
1714
+ listIntegrationsForTenantById: (tenant_id: string, query?: {
1715
+ include?: string;
1716
+ collection: string;
1717
+ resource_id?: string;
1718
+ }) => Promise<Array<TenantIntegration>>;
1719
+ updateIntegrationConnectionById: (tenant_id: string, integration_connection_id: string, body?: UpdateIntegrationConnectionRequestBody) => Promise<IntegrationConnection>;
1720
+ deleteIntegrationConnectionById: (tenant_id: string, integration_connection_id: string) => Promise<IntegrationConnection>;
1721
+ createConnectionForIntegration: (tenant_id: string, integration_id: string, body?: CreateIntegrationConnectionRequestBody) => Promise<IntegrationConnection>;
1653
1722
  getInvitationsForTenantById: (tenant_id: string) => Promise<Array<TenantInvitation>>;
1654
1723
  createInvitationForTenantById: (tenant_id: string, body: TenantInvitationRequestBody) => Promise<TenantInvitation>;
1655
1724
  getTeamMembersForTenantById: (tenant_id: string) => Promise<Array<TeamMember>>;
package/dist/ParraAPI.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ConnectedAppConnectionStatus = exports.ConnectedAppType = exports.ApnsPushType = exports.ApnsEnvironment = exports.ChannelType = exports.ApplicationType = exports.AppVersionStatus = exports.TicketDisplayStatus = exports.UserNoteStatus = exports.ReleaseType = exports.ReleaseStatus = exports.TicketPriority = exports.TicketStatus = exports.TicketType = exports.TemplateType = exports.CampaignStatus = exports.CampaignActionDisplayType = exports.CampaignActionType = exports.FormIntegrationType = exports.CardItemDisplayType = exports.CardItemType = exports.QuestionKind = exports.QuestionType = exports.FeedbackFormFieldType = exports.SubscriptionStatus = exports.Currency = exports.Interval = void 0;
3
+ exports.IntegrationScope = exports.IntegrationConnectionStatus = exports.IntegrationType = exports.ConnectedAppConnectionStatus = exports.ConnectedAppType = exports.ApnsPushType = exports.ApnsEnvironment = exports.ChannelType = exports.ApplicationType = exports.AppVersionStatus = exports.TicketDisplayStatus = exports.UserNoteStatus = exports.ReleaseType = exports.ReleaseStatus = exports.TicketPriority = exports.TicketStatus = exports.TicketType = exports.TemplateType = exports.CampaignStatus = exports.CampaignActionDisplayType = exports.CampaignActionType = exports.FormIntegrationType = exports.CardItemDisplayType = exports.CardItemType = exports.QuestionKind = exports.QuestionType = exports.FeedbackFormFieldType = exports.SubscriptionStatus = exports.Currency = exports.Interval = void 0;
4
4
  var Interval;
5
5
  (function (Interval) {
6
6
  Interval["monthly"] = "monthly";
@@ -181,6 +181,24 @@ var ConnectedAppConnectionStatus;
181
181
  ConnectedAppConnectionStatus["error"] = "error";
182
182
  ConnectedAppConnectionStatus["disabled"] = "disabled";
183
183
  })(ConnectedAppConnectionStatus || (exports.ConnectedAppConnectionStatus = ConnectedAppConnectionStatus = {}));
184
+ var IntegrationType;
185
+ (function (IntegrationType) {
186
+ IntegrationType["parraFeedbackFormBoard"] = "parra-feedback-form-board";
187
+ IntegrationType["slackFeedbackForm"] = "slack-feedback-form";
188
+ })(IntegrationType || (exports.IntegrationType = IntegrationType = {}));
189
+ var IntegrationConnectionStatus;
190
+ (function (IntegrationConnectionStatus) {
191
+ IntegrationConnectionStatus["pending"] = "pending";
192
+ IntegrationConnectionStatus["live"] = "live";
193
+ IntegrationConnectionStatus["error"] = "error";
194
+ IntegrationConnectionStatus["disabled"] = "disabled";
195
+ })(IntegrationConnectionStatus || (exports.IntegrationConnectionStatus = IntegrationConnectionStatus = {}));
196
+ var IntegrationScope;
197
+ (function (IntegrationScope) {
198
+ IntegrationScope["global"] = "global";
199
+ IntegrationScope["collection"] = "collection";
200
+ IntegrationScope["resource"] = "resource";
201
+ })(IntegrationScope || (exports.IntegrationScope = IntegrationScope = {}));
184
202
  var ParraAPI = /** @class */ (function () {
185
203
  function ParraAPI(http, options) {
186
204
  var _this = this;
@@ -860,6 +878,35 @@ var ParraAPI = /** @class */ (function () {
860
878
  },
861
879
  });
862
880
  };
881
+ this.listIntegrationsForTenantById = function (tenant_id, query) {
882
+ return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/integrations"), {
883
+ method: "get",
884
+ query: query,
885
+ });
886
+ };
887
+ this.updateIntegrationConnectionById = function (tenant_id, integration_connection_id, body) {
888
+ return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/integrations/connections/").concat(integration_connection_id), {
889
+ method: "put",
890
+ body: JSON.stringify(body),
891
+ headers: {
892
+ "content-type": "application/json",
893
+ },
894
+ });
895
+ };
896
+ this.deleteIntegrationConnectionById = function (tenant_id, integration_connection_id) {
897
+ return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/integrations/connections/").concat(integration_connection_id), {
898
+ method: "delete",
899
+ });
900
+ };
901
+ this.createConnectionForIntegration = function (tenant_id, integration_id, body) {
902
+ return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/integrations/").concat(integration_id, "/connections"), {
903
+ method: "post",
904
+ body: JSON.stringify(body),
905
+ headers: {
906
+ "content-type": "application/json",
907
+ },
908
+ });
909
+ };
863
910
  this.getInvitationsForTenantById = function (tenant_id) {
864
911
  return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/invitations"), {
865
912
  method: "get",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@parra/parra-js-sdk",
3
- "version": "0.3.61",
3
+ "version": "0.3.63",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",