@parra/parra-js-sdk 0.3.162 → 0.3.164

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.
@@ -2287,6 +2287,41 @@ export interface CreateTenantForUserRequestBody {
2287
2287
  subdomain?: string | null;
2288
2288
  is_test: boolean;
2289
2289
  }
2290
+ export interface CreateMailSenderRequestBody {
2291
+ name?: string | null;
2292
+ description?: string | null;
2293
+ from_name: string;
2294
+ from_address?: string;
2295
+ reply_to?: string | null;
2296
+ }
2297
+ export interface MailSender {
2298
+ id: string;
2299
+ created_at: string;
2300
+ updated_at: string;
2301
+ deleted_at?: string | null;
2302
+ name?: string | null;
2303
+ description?: string | null;
2304
+ from_name: string;
2305
+ from_address?: string;
2306
+ reply_to?: string | null;
2307
+ tenant_id: string;
2308
+ connected_app_connection_id?: string | null;
2309
+ internal: boolean;
2310
+ }
2311
+ export interface MailSenderCollectionResponse {
2312
+ page: number;
2313
+ page_count: number;
2314
+ page_size: number;
2315
+ total_count: number;
2316
+ data: Array<MailSender>;
2317
+ }
2318
+ export interface UpdateMailSenderRequestBody {
2319
+ name?: string | null;
2320
+ description?: string | null;
2321
+ from_name?: string;
2322
+ from_address?: string;
2323
+ reply_to?: string | null;
2324
+ }
2290
2325
  export interface UpdatePolicyDocumentRequestBody {
2291
2326
  title?: string | null;
2292
2327
  url?: string | null;
@@ -2704,6 +2739,19 @@ declare class ParraAPI {
2704
2739
  createTenant: (body: CreateTenantRequestBody, options?: Options) => Promise<Tenant>;
2705
2740
  createTenantForUserById: (user_id: string, body: CreateTenantForUserRequestBody, options?: Options) => Promise<Tenant>;
2706
2741
  getTenantsForUserById: (user_id: string, options?: Options) => Promise<Array<Tenant>>;
2742
+ createMailSenderForTenantById: (tenant_id: string, body: CreateMailSenderRequestBody, options?: Options) => Promise<MailSender>;
2743
+ paginateMailSendersForTenantById: (tenant_id: string, query?: {
2744
+ $select?: string;
2745
+ $top?: number;
2746
+ $skip?: number;
2747
+ $orderby?: string;
2748
+ $filter?: string;
2749
+ $expand?: string;
2750
+ $search?: string;
2751
+ }, options?: Options) => Promise<MailSenderCollectionResponse>;
2752
+ getMailSenderByIdForTenantById: (tenant_id: string, mail_sender_id: string, options?: Options) => Promise<MailSender>;
2753
+ updateMailSenderByIdForTenantById: (tenant_id: string, mail_sender_id: string, body?: UpdateMailSenderRequestBody, options?: Options) => Promise<MailSender>;
2754
+ deleteMailSenderByIdForTenantById: (tenant_id: string, mail_sender_id: string, options?: Options) => Promise<Response>;
2707
2755
  createPolicyDocumentForTenantById: (tenant_id: string, body: CreatePolicyDocumentRequestBody, options?: Options) => Promise<PolicyDocument>;
2708
2756
  paginatePolicyDocumentsForTenantById: (tenant_id: string, query?: {
2709
2757
  $select?: string;
package/dist/ParraAPI.js CHANGED
@@ -1083,6 +1083,30 @@ var ParraAPI = /** @class */ (function () {
1083
1083
  if (options === void 0) { options = {}; }
1084
1084
  return _this.http.execute("".concat(_this.options.baseUrl, "/v1/users/").concat(user_id, "/tenants"), __assign({ method: "get" }, options));
1085
1085
  };
1086
+ this.createMailSenderForTenantById = function (tenant_id, body, options) {
1087
+ if (options === void 0) { options = {}; }
1088
+ return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/mail/senders"), __assign({ method: "post", body: JSON.stringify(body), headers: {
1089
+ "content-type": "application/json",
1090
+ } }, options));
1091
+ };
1092
+ this.paginateMailSendersForTenantById = function (tenant_id, query, options) {
1093
+ if (options === void 0) { options = {}; }
1094
+ return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/mail/senders"), __assign({ method: "get", query: query }, options));
1095
+ };
1096
+ this.getMailSenderByIdForTenantById = function (tenant_id, mail_sender_id, options) {
1097
+ if (options === void 0) { options = {}; }
1098
+ return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/mail/senders/").concat(mail_sender_id), __assign({ method: "get" }, options));
1099
+ };
1100
+ this.updateMailSenderByIdForTenantById = function (tenant_id, mail_sender_id, body, options) {
1101
+ if (options === void 0) { options = {}; }
1102
+ return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/mail/senders/").concat(mail_sender_id), __assign({ method: "put", body: JSON.stringify(body), headers: {
1103
+ "content-type": "application/json",
1104
+ } }, options));
1105
+ };
1106
+ this.deleteMailSenderByIdForTenantById = function (tenant_id, mail_sender_id, options) {
1107
+ if (options === void 0) { options = {}; }
1108
+ return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/mail/senders/").concat(mail_sender_id), __assign({ method: "delete" }, options));
1109
+ };
1086
1110
  this.createPolicyDocumentForTenantById = function (tenant_id, body, options) {
1087
1111
  if (options === void 0) { options = {}; }
1088
1112
  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.162",
3
+ "version": "0.3.164",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",