@parra/parra-js-sdk 0.2.134 → 0.2.136
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.
- package/dist/ParraAPI.d.ts +35 -0
- package/dist/ParraAPI.js +38 -1
- package/package.json +1 -1
package/dist/ParraAPI.d.ts
CHANGED
|
@@ -938,6 +938,36 @@ 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>;
|
|
941
971
|
export interface NotificationRecipient {
|
|
942
972
|
user_id?: string | null;
|
|
943
973
|
}
|
|
@@ -1200,6 +1230,11 @@ declare class ParraAPI {
|
|
|
1200
1230
|
$expand?: string | undefined;
|
|
1201
1231
|
$search?: string | undefined;
|
|
1202
1232
|
} | undefined) => Promise<TenantUserCollectionResponse>;
|
|
1233
|
+
createApplicationForTenantById: (tenant_id: string, body?: CreateApplicationRequestBody | undefined) => Promise<Application>;
|
|
1234
|
+
paginateApplicationsForTenantById: (tenant_id: string) => Promise<ApplicationCollectionResponse>;
|
|
1235
|
+
getApplicationByIdForTenantById: (tenant_id: string, application_id: string) => Promise<Application>;
|
|
1236
|
+
updateApplicationByIdForTenantById: (tenant_id: string, application_id: string, body?: UpdateApplicationRequestBody | undefined) => Promise<Application>;
|
|
1237
|
+
deleteApplicationByIdForTenantById: (tenant_id: string, application_id: string) => Promise<Response>;
|
|
1203
1238
|
createUser: (body: CreateUserRequestBody) => Promise<UserResponse>;
|
|
1204
1239
|
listUsers: (query?: {
|
|
1205
1240
|
$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.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,10 @@ 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 = {}));
|
|
78
82
|
var ParraAPI = /** @class */ (function () {
|
|
79
83
|
function ParraAPI(http, options) {
|
|
80
84
|
var _this = this;
|
|
@@ -515,6 +519,39 @@ var ParraAPI = /** @class */ (function () {
|
|
|
515
519
|
query: query,
|
|
516
520
|
});
|
|
517
521
|
};
|
|
522
|
+
this.createApplicationForTenantById = function (tenant_id, body) {
|
|
523
|
+
return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/applications"), {
|
|
524
|
+
method: "post",
|
|
525
|
+
body: JSON.stringify(body),
|
|
526
|
+
headers: {
|
|
527
|
+
"content-type": "application/json",
|
|
528
|
+
},
|
|
529
|
+
});
|
|
530
|
+
};
|
|
531
|
+
this.paginateApplicationsForTenantById = function (tenant_id) {
|
|
532
|
+
return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/applications"), {
|
|
533
|
+
method: "get",
|
|
534
|
+
});
|
|
535
|
+
};
|
|
536
|
+
this.getApplicationByIdForTenantById = function (tenant_id, application_id) {
|
|
537
|
+
return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/applications/").concat(application_id), {
|
|
538
|
+
method: "get",
|
|
539
|
+
});
|
|
540
|
+
};
|
|
541
|
+
this.updateApplicationByIdForTenantById = function (tenant_id, application_id, body) {
|
|
542
|
+
return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/applications/").concat(application_id), {
|
|
543
|
+
method: "put",
|
|
544
|
+
body: JSON.stringify(body),
|
|
545
|
+
headers: {
|
|
546
|
+
"content-type": "application/json",
|
|
547
|
+
},
|
|
548
|
+
});
|
|
549
|
+
};
|
|
550
|
+
this.deleteApplicationByIdForTenantById = function (tenant_id, application_id) {
|
|
551
|
+
return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/applications/").concat(application_id), {
|
|
552
|
+
method: "delete",
|
|
553
|
+
});
|
|
554
|
+
};
|
|
518
555
|
this.createUser = function (body) {
|
|
519
556
|
return _this.http.execute("".concat(_this.options.baseUrl, "/v1/users"), {
|
|
520
557
|
method: "post",
|