@parra/parra-js-sdk 0.3.122 → 0.3.125
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 +91 -0
- package/dist/ParraAPI.js +43 -1
- package/package.json +1 -1
package/dist/ParraAPI.d.ts
CHANGED
|
@@ -1864,6 +1864,84 @@ export interface CreateTenantForUserRequestBody {
|
|
|
1864
1864
|
subdomain?: string | null;
|
|
1865
1865
|
is_test: boolean;
|
|
1866
1866
|
}
|
|
1867
|
+
export declare enum PolicyDocumentType {
|
|
1868
|
+
terms = "terms",
|
|
1869
|
+
privacy = "privacy",
|
|
1870
|
+
cookie = "cookie"
|
|
1871
|
+
}
|
|
1872
|
+
export interface UpdatePolicyDocumentRequestBody {
|
|
1873
|
+
title?: string | null;
|
|
1874
|
+
url?: string | null;
|
|
1875
|
+
}
|
|
1876
|
+
export interface CreatePolicyDocumentRequestBody {
|
|
1877
|
+
title?: string | null;
|
|
1878
|
+
url?: string | null;
|
|
1879
|
+
type: PolicyDocumentType;
|
|
1880
|
+
self_hosted: boolean;
|
|
1881
|
+
}
|
|
1882
|
+
export declare enum PolicyDocumentVersionStatus {
|
|
1883
|
+
pristine = "pristine",
|
|
1884
|
+
draft = "draft",
|
|
1885
|
+
published = "published"
|
|
1886
|
+
}
|
|
1887
|
+
export interface PolicyDocumentVersionStub {
|
|
1888
|
+
id: string;
|
|
1889
|
+
created_at: string;
|
|
1890
|
+
updated_at: string;
|
|
1891
|
+
deleted_at?: string | null;
|
|
1892
|
+
version: string;
|
|
1893
|
+
title: string | null;
|
|
1894
|
+
tenant_id: string;
|
|
1895
|
+
policy_document_id: string;
|
|
1896
|
+
status: PolicyDocumentVersionStatus;
|
|
1897
|
+
}
|
|
1898
|
+
export interface PolicyDocumentVersion {
|
|
1899
|
+
id: string;
|
|
1900
|
+
created_at: string;
|
|
1901
|
+
updated_at: string;
|
|
1902
|
+
deleted_at?: string | null;
|
|
1903
|
+
version: string;
|
|
1904
|
+
title: string | null;
|
|
1905
|
+
tenant_id: string;
|
|
1906
|
+
policy_document_id: string;
|
|
1907
|
+
status: PolicyDocumentVersionStatus;
|
|
1908
|
+
content: string | null;
|
|
1909
|
+
}
|
|
1910
|
+
export declare enum PolicyDocumentStatus {
|
|
1911
|
+
live = "live",
|
|
1912
|
+
draft = "draft",
|
|
1913
|
+
hosted = "hosted"
|
|
1914
|
+
}
|
|
1915
|
+
export interface PolicyDocumentCollectionStub {
|
|
1916
|
+
id: string;
|
|
1917
|
+
created_at: string;
|
|
1918
|
+
updated_at: string;
|
|
1919
|
+
deleted_at?: string | null;
|
|
1920
|
+
type: PolicyDocumentType;
|
|
1921
|
+
status: PolicyDocumentStatus;
|
|
1922
|
+
title: string | null;
|
|
1923
|
+
url: string;
|
|
1924
|
+
}
|
|
1925
|
+
export interface PolicyDocument {
|
|
1926
|
+
id: string;
|
|
1927
|
+
created_at: string;
|
|
1928
|
+
updated_at: string;
|
|
1929
|
+
deleted_at?: string | null;
|
|
1930
|
+
type: PolicyDocumentType;
|
|
1931
|
+
status: PolicyDocumentStatus;
|
|
1932
|
+
title: string | null;
|
|
1933
|
+
url: string;
|
|
1934
|
+
tenant_id: string;
|
|
1935
|
+
published_version?: PolicyDocumentVersion | null;
|
|
1936
|
+
draft_version?: PolicyDocumentVersion | null;
|
|
1937
|
+
}
|
|
1938
|
+
export interface PolicyDocumentCollectionResponse {
|
|
1939
|
+
page: number;
|
|
1940
|
+
page_count: number;
|
|
1941
|
+
page_size: number;
|
|
1942
|
+
total_count: number;
|
|
1943
|
+
data: Array<PolicyDocumentCollectionStub>;
|
|
1944
|
+
}
|
|
1867
1945
|
export interface UpdateUserRequestBody {
|
|
1868
1946
|
first_name: string;
|
|
1869
1947
|
last_name: string;
|
|
@@ -2184,6 +2262,19 @@ declare class ParraAPI {
|
|
|
2184
2262
|
createTenant: (body: CreateTenantRequestBody, options?: Options) => Promise<Tenant>;
|
|
2185
2263
|
createTenantForUserById: (user_id: string, body: CreateTenantForUserRequestBody, options?: Options) => Promise<Tenant>;
|
|
2186
2264
|
getTenantsForUserById: (user_id: string, options?: Options) => Promise<Array<Tenant>>;
|
|
2265
|
+
createPolicyDocumentForTenantById: (tenant_id: string, body: CreatePolicyDocumentRequestBody, options?: Options) => Promise<PolicyDocument>;
|
|
2266
|
+
paginatePolicyDocumentsForTenantById: (tenant_id: string, query?: {
|
|
2267
|
+
$select?: string;
|
|
2268
|
+
$top?: number;
|
|
2269
|
+
$skip?: number;
|
|
2270
|
+
$orderby?: string;
|
|
2271
|
+
$filter?: string;
|
|
2272
|
+
$expand?: string;
|
|
2273
|
+
$search?: string;
|
|
2274
|
+
}, options?: Options) => Promise<PolicyDocumentCollectionResponse>;
|
|
2275
|
+
getPolicyDocumentByIdForTenantById: (tenant_id: string, policy_document_id: string, options?: Options) => Promise<PolicyDocument>;
|
|
2276
|
+
updatePolicyDocumentByIdForTenantById: (tenant_id: string, policy_document_id: string, body?: UpdatePolicyDocumentRequestBody, options?: Options) => Promise<PolicyDocument>;
|
|
2277
|
+
deletePolicyDocumentByIdForTenantById: (tenant_id: string, policy_document_id: string, options?: Options) => Promise<Response>;
|
|
2187
2278
|
getUserById: (user_id: string, options?: Options) => Promise<UserResponse>;
|
|
2188
2279
|
updateUserById: (user_id: string, body: UpdateUserRequestBody, options?: Options) => Promise<UserResponse>;
|
|
2189
2280
|
deleteUserById: (user_id: string, options?: Options) => Promise<Response>;
|
package/dist/ParraAPI.js
CHANGED
|
@@ -11,7 +11,7 @@ var __assign = (this && this.__assign) || function () {
|
|
|
11
11
|
return __assign.apply(this, arguments);
|
|
12
12
|
};
|
|
13
13
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
-
exports.IntegrationScope = exports.IntegrationConnectionStatus = exports.IntegrationType = exports.ConnectedAppConnectionStatus = exports.ConnectedAppType = exports.ApplicationType = exports.RefreshTokenRotationType = exports.RefreshTokenExpirationType = 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 = exports.IdentityType = void 0;
|
|
14
|
+
exports.PolicyDocumentStatus = exports.PolicyDocumentVersionStatus = exports.PolicyDocumentType = exports.IntegrationScope = exports.IntegrationConnectionStatus = exports.IntegrationType = exports.ConnectedAppConnectionStatus = exports.ConnectedAppType = exports.ApplicationType = exports.RefreshTokenRotationType = exports.RefreshTokenExpirationType = 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 = exports.IdentityType = void 0;
|
|
15
15
|
var IdentityType;
|
|
16
16
|
(function (IdentityType) {
|
|
17
17
|
IdentityType["username"] = "username";
|
|
@@ -241,6 +241,24 @@ var IntegrationScope;
|
|
|
241
241
|
IntegrationScope["collection"] = "collection";
|
|
242
242
|
IntegrationScope["resource"] = "resource";
|
|
243
243
|
})(IntegrationScope || (exports.IntegrationScope = IntegrationScope = {}));
|
|
244
|
+
var PolicyDocumentType;
|
|
245
|
+
(function (PolicyDocumentType) {
|
|
246
|
+
PolicyDocumentType["terms"] = "terms";
|
|
247
|
+
PolicyDocumentType["privacy"] = "privacy";
|
|
248
|
+
PolicyDocumentType["cookie"] = "cookie";
|
|
249
|
+
})(PolicyDocumentType || (exports.PolicyDocumentType = PolicyDocumentType = {}));
|
|
250
|
+
var PolicyDocumentVersionStatus;
|
|
251
|
+
(function (PolicyDocumentVersionStatus) {
|
|
252
|
+
PolicyDocumentVersionStatus["pristine"] = "pristine";
|
|
253
|
+
PolicyDocumentVersionStatus["draft"] = "draft";
|
|
254
|
+
PolicyDocumentVersionStatus["published"] = "published";
|
|
255
|
+
})(PolicyDocumentVersionStatus || (exports.PolicyDocumentVersionStatus = PolicyDocumentVersionStatus = {}));
|
|
256
|
+
var PolicyDocumentStatus;
|
|
257
|
+
(function (PolicyDocumentStatus) {
|
|
258
|
+
PolicyDocumentStatus["live"] = "live";
|
|
259
|
+
PolicyDocumentStatus["draft"] = "draft";
|
|
260
|
+
PolicyDocumentStatus["hosted"] = "hosted";
|
|
261
|
+
})(PolicyDocumentStatus || (exports.PolicyDocumentStatus = PolicyDocumentStatus = {}));
|
|
244
262
|
var ParraAPI = /** @class */ (function () {
|
|
245
263
|
function ParraAPI(http, options) {
|
|
246
264
|
var _this = this;
|
|
@@ -935,6 +953,30 @@ var ParraAPI = /** @class */ (function () {
|
|
|
935
953
|
if (options === void 0) { options = {}; }
|
|
936
954
|
return _this.http.execute("".concat(_this.options.baseUrl, "/v1/users/").concat(user_id, "/tenants"), __assign({ method: "get" }, options));
|
|
937
955
|
};
|
|
956
|
+
this.createPolicyDocumentForTenantById = function (tenant_id, body, options) {
|
|
957
|
+
if (options === void 0) { options = {}; }
|
|
958
|
+
return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/policy-documents"), __assign({ method: "post", body: JSON.stringify(body), headers: {
|
|
959
|
+
"content-type": "application/json",
|
|
960
|
+
} }, options));
|
|
961
|
+
};
|
|
962
|
+
this.paginatePolicyDocumentsForTenantById = function (tenant_id, query, options) {
|
|
963
|
+
if (options === void 0) { options = {}; }
|
|
964
|
+
return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/policy-documents"), __assign({ method: "get", query: query }, options));
|
|
965
|
+
};
|
|
966
|
+
this.getPolicyDocumentByIdForTenantById = function (tenant_id, policy_document_id, options) {
|
|
967
|
+
if (options === void 0) { options = {}; }
|
|
968
|
+
return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/policy-documents/").concat(policy_document_id), __assign({ method: "get" }, options));
|
|
969
|
+
};
|
|
970
|
+
this.updatePolicyDocumentByIdForTenantById = function (tenant_id, policy_document_id, body, options) {
|
|
971
|
+
if (options === void 0) { options = {}; }
|
|
972
|
+
return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/policy-documents/").concat(policy_document_id), __assign({ method: "put", body: JSON.stringify(body), headers: {
|
|
973
|
+
"content-type": "application/json",
|
|
974
|
+
} }, options));
|
|
975
|
+
};
|
|
976
|
+
this.deletePolicyDocumentByIdForTenantById = function (tenant_id, policy_document_id, options) {
|
|
977
|
+
if (options === void 0) { options = {}; }
|
|
978
|
+
return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/policy-documents/").concat(policy_document_id), __assign({ method: "delete" }, options));
|
|
979
|
+
};
|
|
938
980
|
this.getUserById = function (user_id, options) {
|
|
939
981
|
if (options === void 0) { options = {}; }
|
|
940
982
|
return _this.http.execute("".concat(_this.options.baseUrl, "/v1/users/").concat(user_id), __assign({ method: "get" }, options));
|