@parra/parra-js-sdk 0.2.136 → 0.2.138

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.
@@ -959,6 +959,7 @@ export interface Application {
959
959
  description?: string | null;
960
960
  type: ApplicationType;
961
961
  tenant_id: string;
962
+ apns?: ApnsConfiguration | null;
962
963
  }
963
964
  export interface ApplicationCollectionResponse {
964
965
  page: number;
@@ -968,6 +969,30 @@ export interface ApplicationCollectionResponse {
968
969
  data: Array<Application>;
969
970
  }
970
971
  export declare type ApplicationListResponse = Array<Application>;
972
+ export declare enum ApnsConfigurationEnvironment {
973
+ production = "production",
974
+ sandbox = "sandbox"
975
+ }
976
+ export interface UpdateApnsConfigurationRequestBody {
977
+ environment: ApnsConfigurationEnvironment;
978
+ name: string;
979
+ description?: string | null;
980
+ team_id: string;
981
+ key_id: string;
982
+ key: string;
983
+ }
984
+ export interface ApnsConfiguration {
985
+ id: string;
986
+ created_at: string;
987
+ updated_at: string;
988
+ deleted_at?: string | null;
989
+ environment: ApnsConfigurationEnvironment;
990
+ name: string;
991
+ description?: string | null;
992
+ team_id: string;
993
+ key_id: string;
994
+ key: string;
995
+ }
971
996
  export interface NotificationRecipient {
972
997
  user_id?: string | null;
973
998
  }
@@ -1232,9 +1257,12 @@ declare class ParraAPI {
1232
1257
  } | undefined) => Promise<TenantUserCollectionResponse>;
1233
1258
  createApplicationForTenantById: (tenant_id: string, body?: CreateApplicationRequestBody | undefined) => Promise<Application>;
1234
1259
  paginateApplicationsForTenantById: (tenant_id: string) => Promise<ApplicationCollectionResponse>;
1235
- getApplicationByIdForTenantById: (tenant_id: string, application_id: string) => Promise<Application>;
1260
+ getApplicationByIdForTenantById: (tenant_id: string, application_id: string, query?: {
1261
+ include?: string | undefined;
1262
+ } | undefined) => Promise<Application>;
1236
1263
  updateApplicationByIdForTenantById: (tenant_id: string, application_id: string, body?: UpdateApplicationRequestBody | undefined) => Promise<Application>;
1237
1264
  deleteApplicationByIdForTenantById: (tenant_id: string, application_id: string) => Promise<Response>;
1265
+ updateApnsConfigurationForTenantApplication: (tenant_id: string, application_id: string, body?: UpdateApnsConfigurationRequestBody | undefined) => Promise<ApnsConfiguration>;
1238
1266
  createUser: (body: CreateUserRequestBody) => Promise<UserResponse>;
1239
1267
  listUsers: (query?: {
1240
1268
  $select?: string | undefined;
package/dist/ParraAPI.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ApplicationType = exports.TemplateType = exports.QuestionKind = exports.QuestionType = exports.CardItemType = exports.CardItemDisplayType = exports.CampaignActionDisplayType = exports.CampaignActionType = exports.CampaignStatus = exports.SubscriptionStatus = exports.Interval = exports.Currency = void 0;
3
+ exports.ApnsConfigurationEnvironment = exports.ApplicationType = exports.TemplateType = exports.QuestionKind = exports.QuestionType = exports.CardItemType = exports.CardItemDisplayType = exports.CampaignActionDisplayType = exports.CampaignActionType = exports.CampaignStatus = exports.SubscriptionStatus = exports.Interval = exports.Currency = void 0;
4
4
  var Currency;
5
5
  (function (Currency) {
6
6
  Currency["usd"] = "usd";
@@ -79,6 +79,11 @@ var ApplicationType;
79
79
  (function (ApplicationType) {
80
80
  ApplicationType["ios"] = "ios";
81
81
  })(ApplicationType = exports.ApplicationType || (exports.ApplicationType = {}));
82
+ var ApnsConfigurationEnvironment;
83
+ (function (ApnsConfigurationEnvironment) {
84
+ ApnsConfigurationEnvironment["production"] = "production";
85
+ ApnsConfigurationEnvironment["sandbox"] = "sandbox";
86
+ })(ApnsConfigurationEnvironment = exports.ApnsConfigurationEnvironment || (exports.ApnsConfigurationEnvironment = {}));
82
87
  var ParraAPI = /** @class */ (function () {
83
88
  function ParraAPI(http, options) {
84
89
  var _this = this;
@@ -533,9 +538,10 @@ var ParraAPI = /** @class */ (function () {
533
538
  method: "get",
534
539
  });
535
540
  };
536
- this.getApplicationByIdForTenantById = function (tenant_id, application_id) {
541
+ this.getApplicationByIdForTenantById = function (tenant_id, application_id, query) {
537
542
  return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/applications/").concat(application_id), {
538
543
  method: "get",
544
+ query: query,
539
545
  });
540
546
  };
541
547
  this.updateApplicationByIdForTenantById = function (tenant_id, application_id, body) {
@@ -552,6 +558,15 @@ var ParraAPI = /** @class */ (function () {
552
558
  method: "delete",
553
559
  });
554
560
  };
561
+ this.updateApnsConfigurationForTenantApplication = function (tenant_id, application_id, body) {
562
+ return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/applications/").concat(application_id, "/apns"), {
563
+ method: "post",
564
+ body: JSON.stringify(body),
565
+ headers: {
566
+ "content-type": "application/json",
567
+ },
568
+ });
569
+ };
555
570
  this.createUser = function (body) {
556
571
  return _this.http.execute("".concat(_this.options.baseUrl, "/v1/users"), {
557
572
  method: "post",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@parra/parra-js-sdk",
3
- "version": "0.2.136",
3
+ "version": "0.2.138",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",