@parra/parra-js-sdk 0.3.3 → 0.3.9

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.
@@ -66,7 +66,7 @@ export interface Price {
66
66
  export interface UnitPrice {
67
67
  currency: Currency;
68
68
  amount: number;
69
- interval?: Interval;
69
+ interval: Interval;
70
70
  }
71
71
  export interface Plan {
72
72
  id: string;
@@ -935,7 +935,7 @@ export interface TemplateCollectionResponse {
935
935
  total_count: number;
936
936
  data: Array<Template>;
937
937
  }
938
- export type TemplateResponse = Array<Template>;
938
+ export type TemplateListResponse = Array<Template>;
939
939
  export interface UpdateTemplateTagRequestBody {
940
940
  description?: string | null;
941
941
  }
@@ -1395,6 +1395,7 @@ declare class ParraAPI {
1395
1395
  $expand?: string;
1396
1396
  $search?: string;
1397
1397
  }) => Promise<TemplateCollectionResponse>;
1398
+ cloneTemplateForTenantById: (tenant_id: string, template_id: string) => Promise<Template>;
1398
1399
  createApplicationForTenantById: (tenant_id: string, body?: CreateApplicationRequestBody) => Promise<Application>;
1399
1400
  paginateApplicationsForTenantById: (tenant_id: string) => Promise<ApplicationCollectionResponse>;
1400
1401
  getApplicationByIdForTenantById: (tenant_id: string, application_id: string, query?: {
package/dist/ParraAPI.js CHANGED
@@ -4,12 +4,12 @@ exports.ChannelType = exports.ApnsPushType = exports.ApnsEnvironment = exports.A
4
4
  var Currency;
5
5
  (function (Currency) {
6
6
  Currency["usd"] = "usd";
7
- })(Currency = exports.Currency || (exports.Currency = {}));
7
+ })(Currency || (exports.Currency = Currency = {}));
8
8
  var Interval;
9
9
  (function (Interval) {
10
10
  Interval["monthly"] = "monthly";
11
11
  Interval["annual"] = "annual";
12
- })(Interval = exports.Interval || (exports.Interval = {}));
12
+ })(Interval || (exports.Interval = Interval = {}));
13
13
  var SubscriptionStatus;
14
14
  (function (SubscriptionStatus) {
15
15
  SubscriptionStatus["incomplete"] = "incomplete";
@@ -19,7 +19,7 @@ var SubscriptionStatus;
19
19
  SubscriptionStatus["pastDue"] = "past_due";
20
20
  SubscriptionStatus["canceled"] = "canceled";
21
21
  SubscriptionStatus["unpaid"] = "unpaid";
22
- })(SubscriptionStatus = exports.SubscriptionStatus || (exports.SubscriptionStatus = {}));
22
+ })(SubscriptionStatus || (exports.SubscriptionStatus = SubscriptionStatus = {}));
23
23
  var CampaignStatus;
24
24
  (function (CampaignStatus) {
25
25
  CampaignStatus["active"] = "active";
@@ -29,32 +29,32 @@ var CampaignStatus;
29
29
  CampaignStatus["complete"] = "complete";
30
30
  CampaignStatus["closed"] = "closed";
31
31
  CampaignStatus["archived"] = "archived";
32
- })(CampaignStatus = exports.CampaignStatus || (exports.CampaignStatus = {}));
32
+ })(CampaignStatus || (exports.CampaignStatus = CampaignStatus = {}));
33
33
  var CampaignActionType;
34
34
  (function (CampaignActionType) {
35
35
  CampaignActionType["question"] = "question";
36
36
  CampaignActionType["notification"] = "notification";
37
- })(CampaignActionType = exports.CampaignActionType || (exports.CampaignActionType = {}));
37
+ })(CampaignActionType || (exports.CampaignActionType = CampaignActionType = {}));
38
38
  var CampaignActionDisplayType;
39
39
  (function (CampaignActionDisplayType) {
40
40
  CampaignActionDisplayType["popup"] = "popup";
41
41
  CampaignActionDisplayType["inline"] = "inline";
42
- })(CampaignActionDisplayType = exports.CampaignActionDisplayType || (exports.CampaignActionDisplayType = {}));
42
+ })(CampaignActionDisplayType || (exports.CampaignActionDisplayType = CampaignActionDisplayType = {}));
43
43
  var FeedbackFormFieldType;
44
44
  (function (FeedbackFormFieldType) {
45
45
  FeedbackFormFieldType["text"] = "text";
46
46
  FeedbackFormFieldType["input"] = "input";
47
47
  FeedbackFormFieldType["select"] = "select";
48
- })(FeedbackFormFieldType = exports.FeedbackFormFieldType || (exports.FeedbackFormFieldType = {}));
48
+ })(FeedbackFormFieldType || (exports.FeedbackFormFieldType = FeedbackFormFieldType = {}));
49
49
  var CardItemDisplayType;
50
50
  (function (CardItemDisplayType) {
51
51
  CardItemDisplayType["inline"] = "inline";
52
52
  CardItemDisplayType["popup"] = "popup";
53
- })(CardItemDisplayType = exports.CardItemDisplayType || (exports.CardItemDisplayType = {}));
53
+ })(CardItemDisplayType || (exports.CardItemDisplayType = CardItemDisplayType = {}));
54
54
  var CardItemType;
55
55
  (function (CardItemType) {
56
56
  CardItemType["question"] = "question";
57
- })(CardItemType = exports.CardItemType || (exports.CardItemType = {}));
57
+ })(CardItemType || (exports.CardItemType = CardItemType = {}));
58
58
  var QuestionType;
59
59
  (function (QuestionType) {
60
60
  QuestionType["choice"] = "choice";
@@ -62,7 +62,7 @@ var QuestionType;
62
62
  QuestionType["rating"] = "rating";
63
63
  QuestionType["text"] = "text";
64
64
  QuestionType["rankedChoice"] = "ranked-choice";
65
- })(QuestionType = exports.QuestionType || (exports.QuestionType = {}));
65
+ })(QuestionType || (exports.QuestionType = QuestionType = {}));
66
66
  var QuestionKind;
67
67
  (function (QuestionKind) {
68
68
  QuestionKind["radio"] = "radio";
@@ -77,20 +77,20 @@ var QuestionKind;
77
77
  QuestionKind["slider"] = "slider";
78
78
  QuestionKind["rankedChoice"] = "ranked-choice";
79
79
  QuestionKind["tag"] = "tag";
80
- })(QuestionKind = exports.QuestionKind || (exports.QuestionKind = {}));
80
+ })(QuestionKind || (exports.QuestionKind = QuestionKind = {}));
81
81
  var TemplateType;
82
82
  (function (TemplateType) {
83
83
  TemplateType["question"] = "question";
84
- })(TemplateType = exports.TemplateType || (exports.TemplateType = {}));
84
+ })(TemplateType || (exports.TemplateType = TemplateType = {}));
85
85
  var ApplicationType;
86
86
  (function (ApplicationType) {
87
87
  ApplicationType["ios"] = "ios";
88
- })(ApplicationType = exports.ApplicationType || (exports.ApplicationType = {}));
88
+ })(ApplicationType || (exports.ApplicationType = ApplicationType = {}));
89
89
  var ApnsEnvironment;
90
90
  (function (ApnsEnvironment) {
91
91
  ApnsEnvironment["production"] = "production";
92
92
  ApnsEnvironment["sandbox"] = "sandbox";
93
- })(ApnsEnvironment = exports.ApnsEnvironment || (exports.ApnsEnvironment = {}));
93
+ })(ApnsEnvironment || (exports.ApnsEnvironment = ApnsEnvironment = {}));
94
94
  var ApnsPushType;
95
95
  (function (ApnsPushType) {
96
96
  ApnsPushType["alert"] = "alert";
@@ -102,12 +102,12 @@ var ApnsPushType;
102
102
  ApnsPushType["pushtotalk"] = "pushtotalk";
103
103
  ApnsPushType["voip"] = "voip";
104
104
  ApnsPushType["mdm"] = "mdm";
105
- })(ApnsPushType = exports.ApnsPushType || (exports.ApnsPushType = {}));
105
+ })(ApnsPushType || (exports.ApnsPushType = ApnsPushType = {}));
106
106
  var ChannelType;
107
107
  (function (ChannelType) {
108
108
  ChannelType["apns"] = "apns";
109
109
  ChannelType["inbox"] = "inbox";
110
- })(ChannelType = exports.ChannelType || (exports.ChannelType = {}));
110
+ })(ChannelType || (exports.ChannelType = ChannelType = {}));
111
111
  var ParraAPI = /** @class */ (function () {
112
112
  function ParraAPI(http, options) {
113
113
  var _this = this;
@@ -553,6 +553,11 @@ var ParraAPI = /** @class */ (function () {
553
553
  query: query,
554
554
  });
555
555
  };
556
+ this.cloneTemplateForTenantById = function (tenant_id, template_id) {
557
+ return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/templates/").concat(template_id, "/clone"), {
558
+ method: "post",
559
+ });
560
+ };
556
561
  this.createApplicationForTenantById = function (tenant_id, body) {
557
562
  return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/applications"), {
558
563
  method: "post",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@parra/parra-js-sdk",
3
- "version": "0.3.3",
3
+ "version": "0.3.9",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -18,6 +18,7 @@
18
18
  "author": "Parra",
19
19
  "license": "ISC",
20
20
  "devDependencies": {
21
+ "@types/node": "^20.8.7",
21
22
  "prettier": "^3.0.3",
22
23
  "typescript": "^5.2.2"
23
24
  },