@parra/parra-js-sdk 0.3.112 → 0.3.114

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.
@@ -1398,6 +1398,75 @@ export interface UpdateChannelRequestBody {
1398
1398
  apns?: UpdateApnsChannelRequestBody;
1399
1399
  inbox?: UpdateInboxChannelRequestBody;
1400
1400
  }
1401
+ export declare enum GrantType {
1402
+ authorizationCode = "authorization_code",
1403
+ clientCredentials = "client_credentials",
1404
+ implicit = "implicit",
1405
+ password = "password",
1406
+ refreshToken = "refresh_token"
1407
+ }
1408
+ export interface Grant {
1409
+ id: GrantType;
1410
+ title: string;
1411
+ }
1412
+ export interface ClientGrant {
1413
+ id: GrantType;
1414
+ title: string;
1415
+ enabled: boolean;
1416
+ }
1417
+ export declare enum JwtAlgorithm {
1418
+ rs256 = "RS256"
1419
+ }
1420
+ export interface JwtConfiguration {
1421
+ alg: JwtAlgorithm;
1422
+ lifetime_in_seconds: number;
1423
+ secret_encoded: boolean;
1424
+ }
1425
+ export interface RefreshTokenConfiguration {
1426
+ expiration_type: string;
1427
+ idle_token_lifetime: number;
1428
+ infinite_idle_token_lifetime: boolean;
1429
+ infinite_token_lifetime: boolean;
1430
+ leeway: number;
1431
+ token_lifetime: number;
1432
+ rotation_type: string;
1433
+ }
1434
+ export interface Client {
1435
+ id: string;
1436
+ created_at: string;
1437
+ updated_at: string;
1438
+ deleted_at?: string | null;
1439
+ type: string;
1440
+ is_first_party: boolean;
1441
+ client_id: string;
1442
+ client_secret: string;
1443
+ allowed_origins: Array<string>;
1444
+ allowed_web_origins: Array<string>;
1445
+ allowed_callbacks: Array<string>;
1446
+ allowed_logout_urls: Array<string>;
1447
+ grants: Array<ClientGrant>;
1448
+ jwt: JwtConfiguration;
1449
+ refresh_token: RefreshTokenConfiguration;
1450
+ }
1451
+ export interface UpdateClientRequestBody {
1452
+ name?: string;
1453
+ description?: string | null;
1454
+ allowed_origins?: Array<string>;
1455
+ allowed_web_origins?: Array<string>;
1456
+ allowed_callbacks?: Array<string>;
1457
+ allowed_logout_urls?: Array<string>;
1458
+ grants?: Array<GrantType>;
1459
+ refresh_token_expiration_type?: string;
1460
+ refresh_token_idle_token_lifetime?: number;
1461
+ refresh_token_infinite_idle_token_lifetime?: boolean;
1462
+ refresh_token_infinite_token_lifetime?: boolean;
1463
+ refresh_token_leeway?: number;
1464
+ refresh_token_token_lifetime?: number;
1465
+ refresh_token_rotation_type?: string;
1466
+ jwt_alg?: JwtAlgorithm;
1467
+ jwt_lifetime_in_seconds?: number;
1468
+ jwt_secret_encoded?: boolean;
1469
+ }
1401
1470
  export declare enum ApplicationType {
1402
1471
  ios = "ios"
1403
1472
  }
@@ -1970,6 +2039,10 @@ declare class ParraAPI {
1970
2039
  createChannelForNotificationTemplate: (tenant_id: string, notification_template_id: string, body: CreateChannelRequestBody) => Promise<Channel>;
1971
2040
  updateChannelForNotificationTemplate: (tenant_id: string, notification_template_id: string, channel_id: string, body: UpdateChannelRequestBody) => Promise<Channel>;
1972
2041
  deleteChannelForNotificationTemplate: (tenant_id: string, notification_template_id: string, channel_id: string) => Promise<Response>;
2042
+ getClientForTenantApplication: (tenant_id: string, application_id: string) => Promise<Client>;
2043
+ createClientForTenantApplication: (tenant_id: string, application_id: string) => Promise<Client>;
2044
+ updateClientForTenantApplication: (tenant_id: string, application_id: string, body?: UpdateClientRequestBody) => Promise<Client>;
2045
+ deleteClientForTenantApplication: (tenant_id: string, application_id: string) => Promise<Response>;
1973
2046
  createApplicationForTenantById: (tenant_id: string, body: CreateApplicationRequestBody) => Promise<Application>;
1974
2047
  paginateApplicationsForTenantById: (tenant_id: string, query?: {
1975
2048
  $select?: string;
package/dist/ParraAPI.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.IntegrationScope = exports.IntegrationConnectionStatus = exports.IntegrationType = exports.ConnectedAppConnectionStatus = exports.ConnectedAppType = exports.ApplicationType = exports.ApnsPushType = exports.ApnsEnvironment = exports.ChannelType = exports.AppVersionStatus = exports.TicketDisplayStatus = exports.UserNoteStatus = exports.ReleaseType = exports.ReleaseStatus = exports.TicketIconType = exports.TicketPriority = exports.TicketStatus = exports.TicketType = exports.TemplateType = exports.CampaignStatus = exports.CampaignActionDisplayType = exports.CampaignActionType = 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.ApplicationType = exports.JwtAlgorithm = exports.GrantType = exports.ApnsPushType = exports.ApnsEnvironment = exports.ChannelType = exports.AppVersionStatus = exports.TicketDisplayStatus = exports.UserNoteStatus = exports.ReleaseType = exports.ReleaseStatus = exports.TicketIconType = exports.TicketPriority = exports.TicketStatus = exports.TicketType = exports.TemplateType = exports.CampaignStatus = exports.CampaignActionDisplayType = exports.CampaignActionType = 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";
@@ -163,6 +163,18 @@ var ApnsPushType;
163
163
  ApnsPushType["voip"] = "voip";
164
164
  ApnsPushType["mdm"] = "mdm";
165
165
  })(ApnsPushType || (exports.ApnsPushType = ApnsPushType = {}));
166
+ var GrantType;
167
+ (function (GrantType) {
168
+ GrantType["authorizationCode"] = "authorization_code";
169
+ GrantType["clientCredentials"] = "client_credentials";
170
+ GrantType["implicit"] = "implicit";
171
+ GrantType["password"] = "password";
172
+ GrantType["refreshToken"] = "refresh_token";
173
+ })(GrantType || (exports.GrantType = GrantType = {}));
174
+ var JwtAlgorithm;
175
+ (function (JwtAlgorithm) {
176
+ JwtAlgorithm["rs256"] = "RS256";
177
+ })(JwtAlgorithm || (exports.JwtAlgorithm = JwtAlgorithm = {}));
166
178
  var ApplicationType;
167
179
  (function (ApplicationType) {
168
180
  ApplicationType["ios"] = "ios";
@@ -903,6 +915,30 @@ var ParraAPI = /** @class */ (function () {
903
915
  method: "delete",
904
916
  });
905
917
  };
918
+ this.getClientForTenantApplication = function (tenant_id, application_id) {
919
+ return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/applications/").concat(application_id, "/client"), {
920
+ method: "get",
921
+ });
922
+ };
923
+ this.createClientForTenantApplication = function (tenant_id, application_id) {
924
+ return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/applications/").concat(application_id, "/client"), {
925
+ method: "post",
926
+ });
927
+ };
928
+ this.updateClientForTenantApplication = function (tenant_id, application_id, body) {
929
+ return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/applications/").concat(application_id, "/client"), {
930
+ method: "put",
931
+ body: JSON.stringify(body),
932
+ headers: {
933
+ "content-type": "application/json",
934
+ },
935
+ });
936
+ };
937
+ this.deleteClientForTenantApplication = function (tenant_id, application_id) {
938
+ return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/applications/").concat(application_id, "/client"), {
939
+ method: "delete",
940
+ });
941
+ };
906
942
  this.createApplicationForTenantById = function (tenant_id, body) {
907
943
  return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/applications"), {
908
944
  method: "post",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@parra/parra-js-sdk",
3
- "version": "0.3.112",
3
+ "version": "0.3.114",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",