@kommerz/ts-client 1.137.0 → 1.138.0

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.
@@ -10,6 +10,9 @@
10
10
  */
11
11
  import * as runtime from '../runtime';
12
12
  import type { ColamdaPageable, EmailDto, GetAllInboxEmails200Response } from '../models/index';
13
+ export interface CreateInboxEmailRequest {
14
+ emailDto: EmailDto;
15
+ }
13
16
  export interface DeleteInboxEmailRequest {
14
17
  id: string;
15
18
  }
@@ -24,6 +27,14 @@ export interface GetInboxEmailRequest {
24
27
  *
25
28
  */
26
29
  export declare class InboxEmailsApi extends runtime.BaseAPI {
30
+ /**
31
+ * send email
32
+ */
33
+ createInboxEmailRaw(requestParameters: CreateInboxEmailRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<EmailDto>>;
34
+ /**
35
+ * send email
36
+ */
37
+ createInboxEmail(requestParameters: CreateInboxEmailRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<EmailDto>;
27
38
  /**
28
39
  * delete single inboxEmail
29
40
  */
@@ -74,6 +74,52 @@ var InboxEmailsApi = /** @class */ (function (_super) {
74
74
  function InboxEmailsApi() {
75
75
  return _super !== null && _super.apply(this, arguments) || this;
76
76
  }
77
+ /**
78
+ * send email
79
+ */
80
+ InboxEmailsApi.prototype.createInboxEmailRaw = function (requestParameters, initOverrides) {
81
+ return __awaiter(this, void 0, void 0, function () {
82
+ var queryParameters, headerParameters, response;
83
+ return __generator(this, function (_a) {
84
+ switch (_a.label) {
85
+ case 0:
86
+ if (requestParameters.emailDto === null || requestParameters.emailDto === undefined) {
87
+ throw new runtime.RequiredError('emailDto', 'Required parameter requestParameters.emailDto was null or undefined when calling createInboxEmail.');
88
+ }
89
+ queryParameters = {};
90
+ headerParameters = {};
91
+ headerParameters['Content-Type'] = 'application/json';
92
+ return [4 /*yield*/, this.request({
93
+ path: "/ui/email/v1/inbox",
94
+ method: 'POST',
95
+ headers: headerParameters,
96
+ query: queryParameters,
97
+ body: (0, index_1.EmailDtoToJSON)(requestParameters.emailDto),
98
+ }, initOverrides)];
99
+ case 1:
100
+ response = _a.sent();
101
+ return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.EmailDtoFromJSON)(jsonValue); })];
102
+ }
103
+ });
104
+ });
105
+ };
106
+ /**
107
+ * send email
108
+ */
109
+ InboxEmailsApi.prototype.createInboxEmail = function (requestParameters, initOverrides) {
110
+ return __awaiter(this, void 0, void 0, function () {
111
+ var response;
112
+ return __generator(this, function (_a) {
113
+ switch (_a.label) {
114
+ case 0: return [4 /*yield*/, this.createInboxEmailRaw(requestParameters, initOverrides)];
115
+ case 1:
116
+ response = _a.sent();
117
+ return [4 /*yield*/, response.value()];
118
+ case 2: return [2 /*return*/, _a.sent()];
119
+ }
120
+ });
121
+ });
122
+ };
77
123
  /**
78
124
  * delete single inboxEmail
79
125
  */
@@ -44,6 +44,12 @@ export interface EmailDto {
44
44
  * @memberof EmailDto
45
45
  */
46
46
  cc?: Array<string>;
47
+ /**
48
+ *
49
+ * @type {Array<string>}
50
+ * @memberof EmailDto
51
+ */
52
+ bcc?: Array<string>;
47
53
  /**
48
54
  *
49
55
  * @type {string}
@@ -68,6 +74,24 @@ export interface EmailDto {
68
74
  * @memberof EmailDto
69
75
  */
70
76
  body?: string;
77
+ /**
78
+ * imap like folder structure (might be refactored in future)
79
+ * @type {string}
80
+ * @memberof EmailDto
81
+ */
82
+ folder?: EmailDtoFolderEnum;
83
+ /**
84
+ *
85
+ * @type {string}
86
+ * @memberof EmailDto
87
+ */
88
+ designTemplateId?: string;
89
+ /**
90
+ *
91
+ * @type {object}
92
+ * @memberof EmailDto
93
+ */
94
+ contextMap?: object;
71
95
  /**
72
96
  *
73
97
  * @type {Array<string>}
@@ -75,6 +99,15 @@ export interface EmailDto {
75
99
  */
76
100
  attachmentIds?: Array<string>;
77
101
  }
102
+ /**
103
+ * @export
104
+ */
105
+ export declare const EmailDtoFolderEnum: {
106
+ readonly Inbox: "INBOX";
107
+ readonly Outbox: "OUTBOX";
108
+ readonly Sent: "SENT";
109
+ };
110
+ export type EmailDtoFolderEnum = typeof EmailDtoFolderEnum[keyof typeof EmailDtoFolderEnum];
78
111
  /**
79
112
  * Check if a given object implements the EmailDto interface.
80
113
  */
@@ -12,8 +12,16 @@
12
12
  * Do not edit the class manually.
13
13
  */
14
14
  Object.defineProperty(exports, "__esModule", { value: true });
15
- exports.EmailDtoToJSON = exports.EmailDtoFromJSONTyped = exports.EmailDtoFromJSON = exports.instanceOfEmailDto = void 0;
15
+ exports.EmailDtoToJSON = exports.EmailDtoFromJSONTyped = exports.EmailDtoFromJSON = exports.instanceOfEmailDto = exports.EmailDtoFolderEnum = void 0;
16
16
  var runtime_1 = require("../runtime");
17
+ /**
18
+ * @export
19
+ */
20
+ exports.EmailDtoFolderEnum = {
21
+ Inbox: 'INBOX',
22
+ Outbox: 'OUTBOX',
23
+ Sent: 'SENT'
24
+ };
17
25
  /**
18
26
  * Check if a given object implements the EmailDto interface.
19
27
  */
@@ -36,10 +44,14 @@ function EmailDtoFromJSONTyped(json, ignoreDiscriminator) {
36
44
  'from': !(0, runtime_1.exists)(json, 'from') ? undefined : json['from'],
37
45
  'to': !(0, runtime_1.exists)(json, 'to') ? undefined : json['to'],
38
46
  'cc': !(0, runtime_1.exists)(json, 'cc') ? undefined : json['cc'],
47
+ 'bcc': !(0, runtime_1.exists)(json, 'bcc') ? undefined : json['bcc'],
39
48
  'subject': !(0, runtime_1.exists)(json, 'subject') ? undefined : json['subject'],
40
49
  'replyTo': !(0, runtime_1.exists)(json, 'replyTo') ? undefined : json['replyTo'],
41
50
  'sentDate': !(0, runtime_1.exists)(json, 'sentDate') ? undefined : (new Date(json['sentDate'])),
42
51
  'body': !(0, runtime_1.exists)(json, 'body') ? undefined : json['body'],
52
+ 'folder': !(0, runtime_1.exists)(json, 'folder') ? undefined : json['folder'],
53
+ 'designTemplateId': !(0, runtime_1.exists)(json, 'designTemplateId') ? undefined : json['designTemplateId'],
54
+ 'contextMap': !(0, runtime_1.exists)(json, 'contextMap') ? undefined : json['contextMap'],
43
55
  'attachmentIds': !(0, runtime_1.exists)(json, 'attachmentIds') ? undefined : json['attachmentIds'],
44
56
  };
45
57
  }
@@ -57,10 +69,14 @@ function EmailDtoToJSON(value) {
57
69
  'from': value.from,
58
70
  'to': value.to,
59
71
  'cc': value.cc,
72
+ 'bcc': value.bcc,
60
73
  'subject': value.subject,
61
74
  'replyTo': value.replyTo,
62
75
  'sentDate': value.sentDate === undefined ? undefined : (value.sentDate.toISOString()),
63
76
  'body': value.body,
77
+ 'folder': value.folder,
78
+ 'designTemplateId': value.designTemplateId,
79
+ 'contextMap': value.contextMap,
64
80
  'attachmentIds': value.attachmentIds,
65
81
  };
66
82
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kommerz/ts-client",
3
- "version": "1.137.0",
3
+ "version": "1.138.0",
4
4
  "description": "Typescript client for Kommerz API",
5
5
  "author": "Kommerz.App",
6
6
  "license": "MIT",