@parra/parra-js-sdk 0.3.125 → 0.3.127

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.
@@ -1879,6 +1879,11 @@ export interface CreatePolicyDocumentRequestBody {
1879
1879
  type: PolicyDocumentType;
1880
1880
  self_hosted: boolean;
1881
1881
  }
1882
+ export declare enum PolicyDocumentStatus {
1883
+ live = "live",
1884
+ draft = "draft",
1885
+ hosted = "hosted"
1886
+ }
1882
1887
  export declare enum PolicyDocumentVersionStatus {
1883
1888
  pristine = "pristine",
1884
1889
  draft = "draft",
@@ -1891,8 +1896,6 @@ export interface PolicyDocumentVersionStub {
1891
1896
  deleted_at?: string | null;
1892
1897
  version: string;
1893
1898
  title: string | null;
1894
- tenant_id: string;
1895
- policy_document_id: string;
1896
1899
  status: PolicyDocumentVersionStatus;
1897
1900
  }
1898
1901
  export interface PolicyDocumentVersion {
@@ -1902,17 +1905,12 @@ export interface PolicyDocumentVersion {
1902
1905
  deleted_at?: string | null;
1903
1906
  version: string;
1904
1907
  title: string | null;
1908
+ status: PolicyDocumentVersionStatus;
1905
1909
  tenant_id: string;
1906
1910
  policy_document_id: string;
1907
- status: PolicyDocumentVersionStatus;
1908
1911
  content: string | null;
1909
1912
  }
1910
- export declare enum PolicyDocumentStatus {
1911
- live = "live",
1912
- draft = "draft",
1913
- hosted = "hosted"
1914
- }
1915
- export interface PolicyDocumentCollectionStub {
1913
+ export interface PolicyDocument {
1916
1914
  id: string;
1917
1915
  created_at: string;
1918
1916
  updated_at: string;
@@ -1921,8 +1919,11 @@ export interface PolicyDocumentCollectionStub {
1921
1919
  status: PolicyDocumentStatus;
1922
1920
  title: string | null;
1923
1921
  url: string;
1922
+ tenant_id: string;
1923
+ published_version?: PolicyDocumentVersion | null;
1924
+ draft_version?: PolicyDocumentVersion | null;
1924
1925
  }
1925
- export interface PolicyDocument {
1926
+ export interface PolicyDocumentCollectionStub {
1926
1927
  id: string;
1927
1928
  created_at: string;
1928
1929
  updated_at: string;
@@ -1931,9 +1932,8 @@ export interface PolicyDocument {
1931
1932
  status: PolicyDocumentStatus;
1932
1933
  title: string | null;
1933
1934
  url: string;
1934
- tenant_id: string;
1935
- published_version?: PolicyDocumentVersion | null;
1936
- draft_version?: PolicyDocumentVersion | null;
1935
+ published_version?: PolicyDocumentVersionStub | null;
1936
+ draft_version?: PolicyDocumentVersionStub | null;
1937
1937
  }
1938
1938
  export interface PolicyDocumentCollectionResponse {
1939
1939
  page: number;
@@ -1942,6 +1942,11 @@ export interface PolicyDocumentCollectionResponse {
1942
1942
  total_count: number;
1943
1943
  data: Array<PolicyDocumentCollectionStub>;
1944
1944
  }
1945
+ export interface UpdatePolicyDocumentVersionRequestBody {
1946
+ title?: string | null;
1947
+ version?: string | null;
1948
+ content?: string | null;
1949
+ }
1945
1950
  export interface UpdateUserRequestBody {
1946
1951
  first_name: string;
1947
1952
  last_name: string;
@@ -2275,6 +2280,9 @@ declare class ParraAPI {
2275
2280
  getPolicyDocumentByIdForTenantById: (tenant_id: string, policy_document_id: string, options?: Options) => Promise<PolicyDocument>;
2276
2281
  updatePolicyDocumentByIdForTenantById: (tenant_id: string, policy_document_id: string, body?: UpdatePolicyDocumentRequestBody, options?: Options) => Promise<PolicyDocument>;
2277
2282
  deletePolicyDocumentByIdForTenantById: (tenant_id: string, policy_document_id: string, options?: Options) => Promise<Response>;
2283
+ getPolicyDocumentVersionForTenantById: (tenant_id: string, policy_document_id: string, policy_document_version_id: string, options?: Options) => Promise<PolicyDocumentVersion>;
2284
+ updatePolicyDocumentVersionForTenantById: (tenant_id: string, policy_document_id: string, policy_document_version_id: string, body?: UpdatePolicyDocumentVersionRequestBody, options?: Options) => Promise<PolicyDocumentVersion>;
2285
+ publishPolicyDocumentVersionForTenantById: (tenant_id: string, policy_document_id: string, policy_document_version_id: string, options?: Options) => Promise<PolicyDocumentVersion>;
2278
2286
  getUserById: (user_id: string, options?: Options) => Promise<UserResponse>;
2279
2287
  updateUserById: (user_id: string, body: UpdateUserRequestBody, options?: Options) => Promise<UserResponse>;
2280
2288
  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.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;
14
+ exports.PolicyDocumentVersionStatus = exports.PolicyDocumentStatus = 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";
@@ -247,18 +247,18 @@ var PolicyDocumentType;
247
247
  PolicyDocumentType["privacy"] = "privacy";
248
248
  PolicyDocumentType["cookie"] = "cookie";
249
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
250
  var PolicyDocumentStatus;
257
251
  (function (PolicyDocumentStatus) {
258
252
  PolicyDocumentStatus["live"] = "live";
259
253
  PolicyDocumentStatus["draft"] = "draft";
260
254
  PolicyDocumentStatus["hosted"] = "hosted";
261
255
  })(PolicyDocumentStatus || (exports.PolicyDocumentStatus = PolicyDocumentStatus = {}));
256
+ var PolicyDocumentVersionStatus;
257
+ (function (PolicyDocumentVersionStatus) {
258
+ PolicyDocumentVersionStatus["pristine"] = "pristine";
259
+ PolicyDocumentVersionStatus["draft"] = "draft";
260
+ PolicyDocumentVersionStatus["published"] = "published";
261
+ })(PolicyDocumentVersionStatus || (exports.PolicyDocumentVersionStatus = PolicyDocumentVersionStatus = {}));
262
262
  var ParraAPI = /** @class */ (function () {
263
263
  function ParraAPI(http, options) {
264
264
  var _this = this;
@@ -977,6 +977,20 @@ var ParraAPI = /** @class */ (function () {
977
977
  if (options === void 0) { options = {}; }
978
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
979
  };
980
+ this.getPolicyDocumentVersionForTenantById = function (tenant_id, policy_document_id, policy_document_version_id, options) {
981
+ if (options === void 0) { options = {}; }
982
+ return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/policy-documents/").concat(policy_document_id, "/versions/").concat(policy_document_version_id), __assign({ method: "get" }, options));
983
+ };
984
+ this.updatePolicyDocumentVersionForTenantById = function (tenant_id, policy_document_id, policy_document_version_id, body, options) {
985
+ if (options === void 0) { options = {}; }
986
+ return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/policy-documents/").concat(policy_document_id, "/versions/").concat(policy_document_version_id), __assign({ method: "put", body: JSON.stringify(body), headers: {
987
+ "content-type": "application/json",
988
+ } }, options));
989
+ };
990
+ this.publishPolicyDocumentVersionForTenantById = function (tenant_id, policy_document_id, policy_document_version_id, options) {
991
+ if (options === void 0) { options = {}; }
992
+ return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/policy-documents/").concat(policy_document_id, "/versions/").concat(policy_document_version_id, "/publish"), __assign({ method: "post" }, options));
993
+ };
980
994
  this.getUserById = function (user_id, options) {
981
995
  if (options === void 0) { options = {}; }
982
996
  return _this.http.execute("".concat(_this.options.baseUrl, "/v1/users/").concat(user_id), __assign({ method: "get" }, options));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@parra/parra-js-sdk",
3
- "version": "0.3.125",
3
+ "version": "0.3.127",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",