@parra/parra-js-sdk 0.3.173 → 0.3.175

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.
@@ -2331,6 +2331,7 @@ export interface MailTemplateVersionStub {
2331
2331
  updated_at: string;
2332
2332
  deleted_at?: string | null;
2333
2333
  tenant_id: string;
2334
+ mail_template_id: string;
2334
2335
  status: MailTemplateVersionStatus;
2335
2336
  version: string;
2336
2337
  title: string | null;
@@ -2375,25 +2376,32 @@ export interface UpdateMailTemplateRequestBody {
2375
2376
  sender_id?: string;
2376
2377
  connected_app_connection_id?: string;
2377
2378
  }
2379
+ export interface CreateMailTemplateVersionRequestBody {
2380
+ title: string;
2381
+ version: string;
2382
+ text_content?: string | null;
2383
+ json_content?: string | null;
2384
+ html_content?: string | null;
2385
+ }
2378
2386
  export interface MailTemplateVersion {
2379
2387
  id: string;
2380
2388
  created_at: string;
2381
2389
  updated_at: string;
2382
2390
  deleted_at?: string | null;
2383
2391
  tenant_id: string;
2392
+ mail_template_id: string;
2384
2393
  status: MailTemplateVersionStatus;
2385
2394
  version: string;
2386
2395
  title: string | null;
2387
2396
  description?: string | null;
2388
2397
  slug?: string | null;
2389
- mail_template_id: string;
2390
2398
  text_content?: string | null;
2391
2399
  json_content?: string | null;
2392
2400
  html_content?: string | null;
2393
2401
  }
2394
2402
  export interface UpdateMailTemplateVersionRequestBody {
2395
- title?: string | null;
2396
- version?: string | null;
2403
+ title?: string;
2404
+ version?: string;
2397
2405
  text_content?: string | null;
2398
2406
  json_content?: string | null;
2399
2407
  html_content?: string | null;
@@ -2841,8 +2849,10 @@ declare class ParraAPI {
2841
2849
  getMailTemplateByIdForTenantById: (tenant_id: string, mail_template_id: string, options?: Options) => Promise<MailTemplate>;
2842
2850
  updateMailTemplateByIdForTenantById: (tenant_id: string, mail_template_id: string, body?: UpdateMailTemplateRequestBody, options?: Options) => Promise<MailTemplate>;
2843
2851
  deleteMailTemplateByIdForTenantById: (tenant_id: string, mail_template_id: string, options?: Options) => Promise<Response>;
2852
+ createVersionForMailTemplateByIdForTenantById: (tenant_id: string, mail_template_id: string, body: CreateMailTemplateVersionRequestBody, options?: Options) => Promise<MailTemplateVersion>;
2844
2853
  getMailTemplateVersionForTenantById: (tenant_id: string, mail_template_id: string, mail_template_version_id: string, options?: Options) => Promise<MailTemplateVersion>;
2845
2854
  updateMailTemplateVersionForTenantById: (tenant_id: string, mail_template_id: string, mail_template_version_id: string, body?: UpdateMailTemplateVersionRequestBody, options?: Options) => Promise<MailTemplateVersion>;
2855
+ deleteMailTemplateVersionForTenantById: (tenant_id: string, mail_template_id: string, mail_template_version_id: string, options?: Options) => Promise<Response>;
2846
2856
  publishMailTemplateVersionForTenantById: (tenant_id: string, mail_template_id: string, mail_template_version_id: string, body?: UpdateMailTemplateVersionRequestBody, options?: Options) => Promise<MailTemplateVersion>;
2847
2857
  createPolicyDocumentForTenantById: (tenant_id: string, body: CreatePolicyDocumentRequestBody, options?: Options) => Promise<PolicyDocument>;
2848
2858
  paginatePolicyDocumentsForTenantById: (tenant_id: string, query?: {
package/dist/ParraAPI.js CHANGED
@@ -1129,6 +1129,12 @@ var ParraAPI = /** @class */ (function () {
1129
1129
  if (options === void 0) { options = {}; }
1130
1130
  return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/mail/templates/").concat(mail_template_id), __assign({ method: "delete" }, options));
1131
1131
  };
1132
+ this.createVersionForMailTemplateByIdForTenantById = function (tenant_id, mail_template_id, body, options) {
1133
+ if (options === void 0) { options = {}; }
1134
+ return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/mail/templates/").concat(mail_template_id, "/versions"), __assign({ method: "post", body: JSON.stringify(body), headers: {
1135
+ "content-type": "application/json",
1136
+ } }, options));
1137
+ };
1132
1138
  this.getMailTemplateVersionForTenantById = function (tenant_id, mail_template_id, mail_template_version_id, options) {
1133
1139
  if (options === void 0) { options = {}; }
1134
1140
  return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/mail/templates/").concat(mail_template_id, "/versions/").concat(mail_template_version_id), __assign({ method: "get" }, options));
@@ -1139,6 +1145,10 @@ var ParraAPI = /** @class */ (function () {
1139
1145
  "content-type": "application/json",
1140
1146
  } }, options));
1141
1147
  };
1148
+ this.deleteMailTemplateVersionForTenantById = function (tenant_id, mail_template_id, mail_template_version_id, options) {
1149
+ if (options === void 0) { options = {}; }
1150
+ return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/mail/templates/").concat(mail_template_id, "/versions/").concat(mail_template_version_id), __assign({ method: "delete" }, options));
1151
+ };
1142
1152
  this.publishMailTemplateVersionForTenantById = function (tenant_id, mail_template_id, mail_template_version_id, body, options) {
1143
1153
  if (options === void 0) { options = {}; }
1144
1154
  return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/mail/templates/").concat(mail_template_id, "/versions/").concat(mail_template_version_id, "/publish"), __assign({ method: "post", body: JSON.stringify(body), headers: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@parra/parra-js-sdk",
3
- "version": "0.3.173",
3
+ "version": "0.3.175",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",