@parra/parra-js-sdk 0.2.134 → 0.2.137

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.
@@ -938,6 +938,60 @@ export interface TenantUserCollectionResponse {
938
938
  total_count: number;
939
939
  data: Array<TenantUserStub>;
940
940
  }
941
+ export interface UpdateApplicationRequestBody {
942
+ name: string;
943
+ description?: string | null;
944
+ }
945
+ export interface CreateApplicationRequestBody {
946
+ name: string;
947
+ description?: string | null;
948
+ type: ApplicationType;
949
+ }
950
+ export declare enum ApplicationType {
951
+ ios = "ios"
952
+ }
953
+ export interface Application {
954
+ id: string;
955
+ created_at: string;
956
+ updated_at: string;
957
+ deleted_at?: string | null;
958
+ name: string;
959
+ description?: string | null;
960
+ type: ApplicationType;
961
+ tenant_id: string;
962
+ }
963
+ export interface ApplicationCollectionResponse {
964
+ page: number;
965
+ page_count: number;
966
+ page_size: number;
967
+ total_count: number;
968
+ data: Array<Application>;
969
+ }
970
+ export declare type ApplicationListResponse = Array<Application>;
971
+ export declare enum ApnsConfigurationEnvironment {
972
+ production = "production",
973
+ sandbox = "sandbox"
974
+ }
975
+ export interface UpdateApnsConfigurationRequestBody {
976
+ environment: ApnsConfigurationEnvironment;
977
+ name: string;
978
+ description?: string | null;
979
+ team_id: string;
980
+ key_id: string;
981
+ key: string;
982
+ }
983
+ export interface ApnsConfiguration {
984
+ id: string;
985
+ created_at: string;
986
+ updated_at: string;
987
+ deleted_at?: string | null;
988
+ environment: ApnsConfigurationEnvironment;
989
+ name: string;
990
+ description?: string | null;
991
+ team_id: string;
992
+ key_id: string;
993
+ key: string;
994
+ }
941
995
  export interface NotificationRecipient {
942
996
  user_id?: string | null;
943
997
  }
@@ -1200,6 +1254,12 @@ declare class ParraAPI {
1200
1254
  $expand?: string | undefined;
1201
1255
  $search?: string | undefined;
1202
1256
  } | undefined) => Promise<TenantUserCollectionResponse>;
1257
+ createApplicationForTenantById: (tenant_id: string, body?: CreateApplicationRequestBody | undefined) => Promise<Application>;
1258
+ paginateApplicationsForTenantById: (tenant_id: string) => Promise<ApplicationCollectionResponse>;
1259
+ getApplicationByIdForTenantById: (tenant_id: string, application_id: string) => Promise<Application>;
1260
+ updateApplicationByIdForTenantById: (tenant_id: string, application_id: string, body?: UpdateApplicationRequestBody | undefined) => Promise<Application>;
1261
+ deleteApplicationByIdForTenantById: (tenant_id: string, application_id: string) => Promise<Response>;
1262
+ updateApnsConfigurationForTenantApplication: (tenant_id: string, application_id: string, body?: UpdateApnsConfigurationRequestBody | undefined) => Promise<ApnsConfiguration>;
1203
1263
  createUser: (body: CreateUserRequestBody) => Promise<UserResponse>;
1204
1264
  listUsers: (query?: {
1205
1265
  $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.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";
@@ -75,6 +75,15 @@ var TemplateType;
75
75
  (function (TemplateType) {
76
76
  TemplateType["question"] = "question";
77
77
  })(TemplateType = exports.TemplateType || (exports.TemplateType = {}));
78
+ var ApplicationType;
79
+ (function (ApplicationType) {
80
+ ApplicationType["ios"] = "ios";
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 = {}));
78
87
  var ParraAPI = /** @class */ (function () {
79
88
  function ParraAPI(http, options) {
80
89
  var _this = this;
@@ -515,6 +524,48 @@ var ParraAPI = /** @class */ (function () {
515
524
  query: query,
516
525
  });
517
526
  };
527
+ this.createApplicationForTenantById = function (tenant_id, body) {
528
+ return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/applications"), {
529
+ method: "post",
530
+ body: JSON.stringify(body),
531
+ headers: {
532
+ "content-type": "application/json",
533
+ },
534
+ });
535
+ };
536
+ this.paginateApplicationsForTenantById = function (tenant_id) {
537
+ return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/applications"), {
538
+ method: "get",
539
+ });
540
+ };
541
+ this.getApplicationByIdForTenantById = function (tenant_id, application_id) {
542
+ return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/applications/").concat(application_id), {
543
+ method: "get",
544
+ });
545
+ };
546
+ this.updateApplicationByIdForTenantById = function (tenant_id, application_id, body) {
547
+ return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/applications/").concat(application_id), {
548
+ method: "put",
549
+ body: JSON.stringify(body),
550
+ headers: {
551
+ "content-type": "application/json",
552
+ },
553
+ });
554
+ };
555
+ this.deleteApplicationByIdForTenantById = function (tenant_id, application_id) {
556
+ return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/applications/").concat(application_id), {
557
+ method: "delete",
558
+ });
559
+ };
560
+ this.updateApnsConfigurationForTenantApplication = function (tenant_id, application_id, body) {
561
+ return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/applications/").concat(application_id, "/apns"), {
562
+ method: "post",
563
+ body: JSON.stringify(body),
564
+ headers: {
565
+ "content-type": "application/json",
566
+ },
567
+ });
568
+ };
518
569
  this.createUser = function (body) {
519
570
  return _this.http.execute("".concat(_this.options.baseUrl, "/v1/users"), {
520
571
  method: "post",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@parra/parra-js-sdk",
3
- "version": "0.2.134",
3
+ "version": "0.2.137",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",