@parra/parra-js-sdk 0.3.179 → 0.3.181

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.
@@ -2365,7 +2365,7 @@ export interface MailTemplateStub {
2365
2365
  slug?: string | null;
2366
2366
  status: MailTemplateStatus;
2367
2367
  sender: MailSender;
2368
- connected_app_connection?: ConnectedAppConnectionStub;
2368
+ connected_app_connection: ConnectedAppConnectionStub;
2369
2369
  }
2370
2370
  export interface MailTemplateCollectionStub {
2371
2371
  id: string;
@@ -2380,7 +2380,7 @@ export interface MailTemplateCollectionStub {
2380
2380
  slug?: string | null;
2381
2381
  status: MailTemplateStatus;
2382
2382
  sender: MailSender;
2383
- connected_app_connection?: ConnectedAppConnectionStub;
2383
+ connected_app_connection: ConnectedAppConnectionStub;
2384
2384
  versions: Array<MailTemplateVersionStub>;
2385
2385
  }
2386
2386
  export interface MailTemplate {
@@ -2396,7 +2396,7 @@ export interface MailTemplate {
2396
2396
  slug?: string | null;
2397
2397
  status: MailTemplateStatus;
2398
2398
  sender: MailSender;
2399
- connected_app_connection?: ConnectedAppConnectionStub;
2399
+ connected_app_connection: ConnectedAppConnectionStub;
2400
2400
  versions: Array<MailTemplateVersionStub>;
2401
2401
  }
2402
2402
  export interface MailTemplateCollectionResponse {
@@ -2416,6 +2416,7 @@ export interface UpdateMailTemplateRequestBody {
2416
2416
  export interface CreateMailTemplateVersionRequestBody {
2417
2417
  title: string;
2418
2418
  version: string;
2419
+ subject?: string;
2419
2420
  text_content?: string | null;
2420
2421
  html_content?: string | null;
2421
2422
  }
@@ -2442,6 +2443,7 @@ export interface MailTemplateVersion {
2442
2443
  export interface UpdateMailTemplateVersionRequestBody {
2443
2444
  title?: string;
2444
2445
  version?: string;
2446
+ subject?: string;
2445
2447
  automatically_generate_text_content?: boolean;
2446
2448
  test_data?: object | null;
2447
2449
  test_subject?: string | null;
@@ -2449,6 +2451,32 @@ export interface UpdateMailTemplateVersionRequestBody {
2449
2451
  text_content?: string | null;
2450
2452
  html_content?: string | null;
2451
2453
  }
2454
+ export interface TestMailTemplateVersionRequestBody {
2455
+ title?: string;
2456
+ version?: string;
2457
+ subject: string;
2458
+ automatically_generate_text_content?: boolean;
2459
+ test_data: object | null;
2460
+ test_subject?: string | null;
2461
+ test_recipient?: string | null;
2462
+ text_content?: string | null;
2463
+ html_content?: string | null;
2464
+ }
2465
+ export interface GenerateMailTemplateVersionContentRequestBody {
2466
+ title?: string;
2467
+ version?: string;
2468
+ subject?: string;
2469
+ text_content?: string | null;
2470
+ html_content?: string | null;
2471
+ test_data?: object | null;
2472
+ user_prompt: string;
2473
+ }
2474
+ export interface GenerateMailTemplateVersionContentResponseBody {
2475
+ title?: string | null;
2476
+ subject?: string | null;
2477
+ text_content?: string | null;
2478
+ html_content?: string | null;
2479
+ }
2452
2480
  export interface UpdatePolicyDocumentRequestBody {
2453
2481
  title?: string | null;
2454
2482
  url?: string | null;
@@ -2897,6 +2925,8 @@ declare class ParraAPI {
2897
2925
  updateMailTemplateVersionForTenantById: (tenant_id: string, mail_template_id: string, mail_template_version_id: string, body?: UpdateMailTemplateVersionRequestBody, options?: Options) => Promise<MailTemplateVersion>;
2898
2926
  deleteMailTemplateVersionForTenantById: (tenant_id: string, mail_template_id: string, mail_template_version_id: string, options?: Options) => Promise<Response>;
2899
2927
  publishMailTemplateVersionForTenantById: (tenant_id: string, mail_template_id: string, mail_template_version_id: string, body?: UpdateMailTemplateVersionRequestBody, options?: Options) => Promise<MailTemplateVersion>;
2928
+ testMailTemplateVersionForTenantById: (tenant_id: string, mail_template_id: string, mail_template_version_id: string, body: TestMailTemplateVersionRequestBody, options?: Options) => Promise<Response>;
2929
+ generateContentForMailTemplateVersion: (tenant_id: string, mail_template_id: string, mail_template_version_id: string, body: GenerateMailTemplateVersionContentRequestBody, options?: Options) => Promise<GenerateMailTemplateVersionContentResponseBody>;
2900
2930
  createPolicyDocumentForTenantById: (tenant_id: string, body: CreatePolicyDocumentRequestBody, options?: Options) => Promise<PolicyDocument>;
2901
2931
  paginatePolicyDocumentsForTenantById: (tenant_id: string, query?: {
2902
2932
  $select?: string;
package/dist/ParraAPI.js CHANGED
@@ -1155,6 +1155,18 @@ var ParraAPI = /** @class */ (function () {
1155
1155
  "content-type": "application/json",
1156
1156
  } }, options));
1157
1157
  };
1158
+ this.testMailTemplateVersionForTenantById = function (tenant_id, mail_template_id, mail_template_version_id, body, options) {
1159
+ if (options === void 0) { options = {}; }
1160
+ 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, "/test"), __assign({ method: "post", body: JSON.stringify(body), headers: {
1161
+ "content-type": "application/json",
1162
+ }, raw: true }, options));
1163
+ };
1164
+ this.generateContentForMailTemplateVersion = function (tenant_id, mail_template_id, mail_template_version_id, body, options) {
1165
+ if (options === void 0) { options = {}; }
1166
+ 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, "/content/generate"), __assign({ method: "post", body: JSON.stringify(body), headers: {
1167
+ "content-type": "application/json",
1168
+ } }, options));
1169
+ };
1158
1170
  this.createPolicyDocumentForTenantById = function (tenant_id, body, options) {
1159
1171
  if (options === void 0) { options = {}; }
1160
1172
  return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/policy-documents"), __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.179",
3
+ "version": "0.3.181",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",