@emilgroup/notification-sdk 0.8.1-beta.7 → 0.8.1-beta.70

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.
Files changed (122) hide show
  1. package/.openapi-generator/FILES +25 -0
  2. package/README.md +2 -2
  3. package/api/email-mailboxes-api.ts +153 -0
  4. package/api/email-messages-api.ts +197 -40
  5. package/api/email-subscriptions-api.ts +799 -0
  6. package/api/email-tracking-api.ts +313 -52
  7. package/api/email-verifications-api.ts +32 -14
  8. package/api/health-api.ts +1 -1
  9. package/api/layouts-api.ts +96 -51
  10. package/api/msgraph-webhooks-api.ts +278 -0
  11. package/api/notification-templates-api.ts +96 -51
  12. package/api/notifications-api.ts +128 -7
  13. package/api.ts +6 -0
  14. package/base.ts +239 -43
  15. package/common.ts +3 -2
  16. package/configuration.ts +20 -0
  17. package/dist/api/email-mailboxes-api.d.ts +87 -0
  18. package/dist/api/email-mailboxes-api.js +225 -0
  19. package/dist/api/email-messages-api.d.ts +110 -32
  20. package/dist/api/email-messages-api.js +199 -56
  21. package/dist/api/email-subscriptions-api.d.ts +432 -0
  22. package/dist/api/email-subscriptions-api.js +761 -0
  23. package/dist/api/email-tracking-api.d.ts +174 -44
  24. package/dist/api/email-tracking-api.js +299 -64
  25. package/dist/api/email-verifications-api.d.ts +18 -10
  26. package/dist/api/email-verifications-api.js +46 -24
  27. package/dist/api/health-api.d.ts +1 -1
  28. package/dist/api/health-api.js +1 -1
  29. package/dist/api/layouts-api.d.ts +61 -41
  30. package/dist/api/layouts-api.js +119 -70
  31. package/dist/api/msgraph-webhooks-api.d.ts +168 -0
  32. package/dist/api/msgraph-webhooks-api.js +305 -0
  33. package/dist/api/notification-templates-api.d.ts +61 -41
  34. package/dist/api/notification-templates-api.js +119 -70
  35. package/dist/api/notifications-api.d.ts +66 -5
  36. package/dist/api/notifications-api.js +123 -12
  37. package/dist/api.d.ts +3 -0
  38. package/dist/api.js +3 -0
  39. package/dist/base.d.ts +26 -0
  40. package/dist/base.js +243 -60
  41. package/dist/common.d.ts +1 -1
  42. package/dist/common.js +1 -0
  43. package/dist/configuration.d.ts +17 -0
  44. package/dist/configuration.js +2 -0
  45. package/dist/models/assign-email-thread-entity-body-dto.d.ts +43 -0
  46. package/dist/models/assign-email-thread-entity-body-dto.js +22 -0
  47. package/dist/models/assign-email-thread-entity-response-class.d.ts +25 -0
  48. package/dist/models/assign-email-thread-entity-response-class.js +15 -0
  49. package/dist/models/catch-up-email-subscription-response-class.d.ts +24 -0
  50. package/dist/models/catch-up-email-subscription-response-class.js +15 -0
  51. package/dist/models/catch-up-email-subscriptions-request-dto.d.ts +24 -0
  52. package/dist/models/catch-up-email-subscriptions-request-dto.js +15 -0
  53. package/dist/models/catch-up-email-subscriptions-response-class.d.ts +30 -0
  54. package/dist/models/catch-up-email-subscriptions-response-class.js +15 -0
  55. package/dist/models/email-mailbox-class.d.ts +47 -0
  56. package/dist/models/email-mailbox-class.js +20 -0
  57. package/dist/models/email-message-class.d.ts +102 -7
  58. package/dist/models/email-message-class.js +25 -2
  59. package/dist/models/email-message-summary-class.d.ts +121 -0
  60. package/dist/models/email-message-summary-class.js +37 -0
  61. package/dist/models/email-subscription-class.d.ts +110 -0
  62. package/dist/models/email-subscription-class.js +23 -0
  63. package/dist/models/email-thread-class.d.ts +37 -5
  64. package/dist/models/entity-ref-class.d.ts +37 -0
  65. package/dist/models/entity-ref-class.js +22 -0
  66. package/dist/models/get-email-subscription-response-class.d.ts +25 -0
  67. package/dist/models/get-email-subscription-response-class.js +15 -0
  68. package/dist/models/grpc-send-email-request-dto.d.ts +137 -0
  69. package/dist/models/grpc-send-email-request-dto.js +22 -0
  70. package/dist/models/index.d.ts +22 -0
  71. package/dist/models/index.js +22 -0
  72. package/dist/models/inline-attachment-dto.d.ts +36 -0
  73. package/dist/models/inline-attachment-dto.js +15 -0
  74. package/dist/models/list-email-mailboxes-response-class.d.ts +43 -0
  75. package/dist/models/list-email-mailboxes-response-class.js +15 -0
  76. package/dist/models/list-email-subscriptions-response-class.d.ts +43 -0
  77. package/dist/models/list-email-subscriptions-response-class.js +15 -0
  78. package/dist/models/reconcile-email-subscriptions-request-dto.d.ts +24 -0
  79. package/dist/models/reconcile-email-subscriptions-request-dto.js +15 -0
  80. package/dist/models/reconcile-email-subscriptions-response-class.d.ts +48 -0
  81. package/dist/models/reconcile-email-subscriptions-response-class.js +15 -0
  82. package/dist/models/renew-email-subscription-response-class.d.ts +25 -0
  83. package/dist/models/renew-email-subscription-response-class.js +15 -0
  84. package/dist/models/resend-email-message-body-dto.d.ts +30 -0
  85. package/dist/models/resend-email-message-body-dto.js +15 -0
  86. package/dist/models/resend-email-message-response-class.d.ts +25 -0
  87. package/dist/models/resend-email-message-response-class.js +15 -0
  88. package/dist/models/send-email-request-dto.d.ts +131 -0
  89. package/dist/models/send-email-request-dto.js +22 -0
  90. package/dist/models/send-email-response-class.d.ts +24 -0
  91. package/dist/models/send-email-response-class.js +15 -0
  92. package/dist/models/send-notification-request-dto.d.ts +10 -1
  93. package/dist/models/send-notification-request-dto.js +2 -1
  94. package/dist/models/unassign-email-thread-entity-response-class.d.ts +25 -0
  95. package/dist/models/unassign-email-thread-entity-response-class.js +15 -0
  96. package/models/assign-email-thread-entity-body-dto.ts +52 -0
  97. package/models/assign-email-thread-entity-response-class.ts +31 -0
  98. package/models/catch-up-email-subscription-response-class.ts +30 -0
  99. package/models/catch-up-email-subscriptions-request-dto.ts +30 -0
  100. package/models/catch-up-email-subscriptions-response-class.ts +36 -0
  101. package/models/email-mailbox-class.ts +56 -0
  102. package/models/email-message-class.ts +108 -8
  103. package/models/email-message-summary-class.ts +133 -0
  104. package/models/email-subscription-class.ts +119 -0
  105. package/models/email-thread-class.ts +37 -5
  106. package/models/entity-ref-class.ts +46 -0
  107. package/models/get-email-subscription-response-class.ts +31 -0
  108. package/models/grpc-send-email-request-dto.ts +144 -0
  109. package/models/index.ts +22 -0
  110. package/models/inline-attachment-dto.ts +42 -0
  111. package/models/list-email-mailboxes-response-class.ts +49 -0
  112. package/models/list-email-subscriptions-response-class.ts +49 -0
  113. package/models/reconcile-email-subscriptions-request-dto.ts +30 -0
  114. package/models/reconcile-email-subscriptions-response-class.ts +54 -0
  115. package/models/renew-email-subscription-response-class.ts +31 -0
  116. package/models/resend-email-message-body-dto.ts +36 -0
  117. package/models/resend-email-message-response-class.ts +31 -0
  118. package/models/send-email-request-dto.ts +138 -0
  119. package/models/send-email-response-class.ts +30 -0
  120. package/models/send-notification-request-dto.ts +9 -2
  121. package/models/unassign-email-thread-entity-response-class.ts +31 -0
  122. package/package.json +2 -2
@@ -0,0 +1,278 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * EMIL NotificationService
5
+ * The EMIL NotificationService API description
6
+ *
7
+ * The version of the OpenAPI document: 1.0
8
+ * Contact: kontakt@emil.de
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+
16
+ import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
17
+ import { Configuration } from '../configuration';
18
+ // Some imports not used depending on template conditions
19
+ // @ts-ignore
20
+ import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common';
21
+ // @ts-ignore
22
+ import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base';
23
+ /**
24
+ * MSGraphWebhooksApi - axios parameter creator
25
+ * @export
26
+ */
27
+ export const MSGraphWebhooksApiAxiosParamCreator = function (configuration?: Configuration) {
28
+ return {
29
+ /**
30
+ * Public route called by Microsoft Graph. Echoes `validationToken` as text/plain, otherwise enqueues the lifecycle events and answers 202. See docs/webhooks/msgraph.md. **Required Permissions** none
31
+ * @summary Receive Microsoft Graph subscription lifecycle notifications
32
+ * @param {string} tenantSlug Unique slug identifier representing a tenant.
33
+ * @param {string} [validationToken] Echoed back as text/plain when present.
34
+ * @param {object} [body] Graph lifecycle collection `{ \"value\": [...] }`.
35
+ * @param {*} [options] Override http request option.
36
+ * @throws {RequiredError}
37
+ */
38
+ receiveLifecycle: async (tenantSlug: string, validationToken?: string, body?: object, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
39
+ // verify required parameter 'tenantSlug' is not null or undefined
40
+ assertParamExists('receiveLifecycle', 'tenantSlug', tenantSlug)
41
+ const localVarPath = `/notificationservice/v1/webhooks/msgraph/{tenantSlug}/lifecycle`
42
+ .replace(`{${"tenantSlug"}}`, encodeURIComponent(String(tenantSlug)));
43
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
44
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
45
+ let baseOptions;
46
+ let baseAccessToken;
47
+ if (configuration) {
48
+ baseOptions = configuration.baseOptions;
49
+ baseAccessToken = configuration.accessToken;
50
+ }
51
+
52
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
53
+ const localVarHeaderParameter = {} as any;
54
+ const localVarQueryParameter = {} as any;
55
+
56
+ if (validationToken !== undefined) {
57
+ localVarQueryParameter['validationToken'] = validationToken;
58
+ }
59
+
60
+
61
+
62
+ localVarHeaderParameter['Content-Type'] = 'application/json';
63
+
64
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
65
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
66
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
67
+ localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration)
68
+
69
+ return {
70
+ url: toPathString(localVarUrlObj),
71
+ options: localVarRequestOptions,
72
+ };
73
+ },
74
+ /**
75
+ * Public route called by Microsoft Graph. Echoes `validationToken` as text/plain, otherwise enqueues the notifications and answers 202. See docs/webhooks/msgraph.md. **Required Permissions** none
76
+ * @summary Receive Microsoft Graph change notifications
77
+ * @param {string} tenantSlug Unique slug identifier representing a tenant.
78
+ * @param {string} [validationToken] Echoed back as text/plain when present.
79
+ * @param {object} [body] Graph change-notification collection: &#x60;{ \&quot;value\&quot;: [ ... ] }&#x60;.
80
+ * @param {*} [options] Override http request option.
81
+ * @throws {RequiredError}
82
+ */
83
+ receiveNotifications: async (tenantSlug: string, validationToken?: string, body?: object, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
84
+ // verify required parameter 'tenantSlug' is not null or undefined
85
+ assertParamExists('receiveNotifications', 'tenantSlug', tenantSlug)
86
+ const localVarPath = `/notificationservice/v1/webhooks/msgraph/{tenantSlug}/notifications`
87
+ .replace(`{${"tenantSlug"}}`, encodeURIComponent(String(tenantSlug)));
88
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
89
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
90
+ let baseOptions;
91
+ let baseAccessToken;
92
+ if (configuration) {
93
+ baseOptions = configuration.baseOptions;
94
+ baseAccessToken = configuration.accessToken;
95
+ }
96
+
97
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
98
+ const localVarHeaderParameter = {} as any;
99
+ const localVarQueryParameter = {} as any;
100
+
101
+ if (validationToken !== undefined) {
102
+ localVarQueryParameter['validationToken'] = validationToken;
103
+ }
104
+
105
+
106
+
107
+ localVarHeaderParameter['Content-Type'] = 'application/json';
108
+
109
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
110
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
111
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
112
+ localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration)
113
+
114
+ return {
115
+ url: toPathString(localVarUrlObj),
116
+ options: localVarRequestOptions,
117
+ };
118
+ },
119
+ }
120
+ };
121
+
122
+ /**
123
+ * MSGraphWebhooksApi - functional programming interface
124
+ * @export
125
+ */
126
+ export const MSGraphWebhooksApiFp = function(configuration?: Configuration) {
127
+ const localVarAxiosParamCreator = MSGraphWebhooksApiAxiosParamCreator(configuration)
128
+ return {
129
+ /**
130
+ * Public route called by Microsoft Graph. Echoes `validationToken` as text/plain, otherwise enqueues the lifecycle events and answers 202. See docs/webhooks/msgraph.md. **Required Permissions** none
131
+ * @summary Receive Microsoft Graph subscription lifecycle notifications
132
+ * @param {string} tenantSlug Unique slug identifier representing a tenant.
133
+ * @param {string} [validationToken] Echoed back as text/plain when present.
134
+ * @param {object} [body] Graph lifecycle collection &#x60;{ \&quot;value\&quot;: [...] }&#x60;.
135
+ * @param {*} [options] Override http request option.
136
+ * @throws {RequiredError}
137
+ */
138
+ async receiveLifecycle(tenantSlug: string, validationToken?: string, body?: object, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
139
+ const localVarAxiosArgs = await localVarAxiosParamCreator.receiveLifecycle(tenantSlug, validationToken, body, options);
140
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
141
+ },
142
+ /**
143
+ * Public route called by Microsoft Graph. Echoes `validationToken` as text/plain, otherwise enqueues the notifications and answers 202. See docs/webhooks/msgraph.md. **Required Permissions** none
144
+ * @summary Receive Microsoft Graph change notifications
145
+ * @param {string} tenantSlug Unique slug identifier representing a tenant.
146
+ * @param {string} [validationToken] Echoed back as text/plain when present.
147
+ * @param {object} [body] Graph change-notification collection: &#x60;{ \&quot;value\&quot;: [ ... ] }&#x60;.
148
+ * @param {*} [options] Override http request option.
149
+ * @throws {RequiredError}
150
+ */
151
+ async receiveNotifications(tenantSlug: string, validationToken?: string, body?: object, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
152
+ const localVarAxiosArgs = await localVarAxiosParamCreator.receiveNotifications(tenantSlug, validationToken, body, options);
153
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
154
+ },
155
+ }
156
+ };
157
+
158
+ /**
159
+ * MSGraphWebhooksApi - factory interface
160
+ * @export
161
+ */
162
+ export const MSGraphWebhooksApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
163
+ const localVarFp = MSGraphWebhooksApiFp(configuration)
164
+ return {
165
+ /**
166
+ * Public route called by Microsoft Graph. Echoes `validationToken` as text/plain, otherwise enqueues the lifecycle events and answers 202. See docs/webhooks/msgraph.md. **Required Permissions** none
167
+ * @summary Receive Microsoft Graph subscription lifecycle notifications
168
+ * @param {string} tenantSlug Unique slug identifier representing a tenant.
169
+ * @param {string} [validationToken] Echoed back as text/plain when present.
170
+ * @param {object} [body] Graph lifecycle collection &#x60;{ \&quot;value\&quot;: [...] }&#x60;.
171
+ * @param {*} [options] Override http request option.
172
+ * @throws {RequiredError}
173
+ */
174
+ receiveLifecycle(tenantSlug: string, validationToken?: string, body?: object, options?: any): AxiosPromise<void> {
175
+ return localVarFp.receiveLifecycle(tenantSlug, validationToken, body, options).then((request) => request(axios, basePath));
176
+ },
177
+ /**
178
+ * Public route called by Microsoft Graph. Echoes `validationToken` as text/plain, otherwise enqueues the notifications and answers 202. See docs/webhooks/msgraph.md. **Required Permissions** none
179
+ * @summary Receive Microsoft Graph change notifications
180
+ * @param {string} tenantSlug Unique slug identifier representing a tenant.
181
+ * @param {string} [validationToken] Echoed back as text/plain when present.
182
+ * @param {object} [body] Graph change-notification collection: &#x60;{ \&quot;value\&quot;: [ ... ] }&#x60;.
183
+ * @param {*} [options] Override http request option.
184
+ * @throws {RequiredError}
185
+ */
186
+ receiveNotifications(tenantSlug: string, validationToken?: string, body?: object, options?: any): AxiosPromise<void> {
187
+ return localVarFp.receiveNotifications(tenantSlug, validationToken, body, options).then((request) => request(axios, basePath));
188
+ },
189
+ };
190
+ };
191
+
192
+ /**
193
+ * Request parameters for receiveLifecycle operation in MSGraphWebhooksApi.
194
+ * @export
195
+ * @interface MSGraphWebhooksApiReceiveLifecycleRequest
196
+ */
197
+ export interface MSGraphWebhooksApiReceiveLifecycleRequest {
198
+ /**
199
+ * Unique slug identifier representing a tenant.
200
+ * @type {string}
201
+ * @memberof MSGraphWebhooksApiReceiveLifecycle
202
+ */
203
+ readonly tenantSlug: string
204
+
205
+ /**
206
+ * Echoed back as text/plain when present.
207
+ * @type {string}
208
+ * @memberof MSGraphWebhooksApiReceiveLifecycle
209
+ */
210
+ readonly validationToken?: string
211
+
212
+ /**
213
+ * Graph lifecycle collection &#x60;{ \&quot;value\&quot;: [...] }&#x60;.
214
+ * @type {object}
215
+ * @memberof MSGraphWebhooksApiReceiveLifecycle
216
+ */
217
+ readonly body?: object
218
+ }
219
+
220
+ /**
221
+ * Request parameters for receiveNotifications operation in MSGraphWebhooksApi.
222
+ * @export
223
+ * @interface MSGraphWebhooksApiReceiveNotificationsRequest
224
+ */
225
+ export interface MSGraphWebhooksApiReceiveNotificationsRequest {
226
+ /**
227
+ * Unique slug identifier representing a tenant.
228
+ * @type {string}
229
+ * @memberof MSGraphWebhooksApiReceiveNotifications
230
+ */
231
+ readonly tenantSlug: string
232
+
233
+ /**
234
+ * Echoed back as text/plain when present.
235
+ * @type {string}
236
+ * @memberof MSGraphWebhooksApiReceiveNotifications
237
+ */
238
+ readonly validationToken?: string
239
+
240
+ /**
241
+ * Graph change-notification collection: &#x60;{ \&quot;value\&quot;: [ ... ] }&#x60;.
242
+ * @type {object}
243
+ * @memberof MSGraphWebhooksApiReceiveNotifications
244
+ */
245
+ readonly body?: object
246
+ }
247
+
248
+ /**
249
+ * MSGraphWebhooksApi - object-oriented interface
250
+ * @export
251
+ * @class MSGraphWebhooksApi
252
+ * @extends {BaseAPI}
253
+ */
254
+ export class MSGraphWebhooksApi extends BaseAPI {
255
+ /**
256
+ * Public route called by Microsoft Graph. Echoes `validationToken` as text/plain, otherwise enqueues the lifecycle events and answers 202. See docs/webhooks/msgraph.md. **Required Permissions** none
257
+ * @summary Receive Microsoft Graph subscription lifecycle notifications
258
+ * @param {MSGraphWebhooksApiReceiveLifecycleRequest} requestParameters Request parameters.
259
+ * @param {*} [options] Override http request option.
260
+ * @throws {RequiredError}
261
+ * @memberof MSGraphWebhooksApi
262
+ */
263
+ public receiveLifecycle(requestParameters: MSGraphWebhooksApiReceiveLifecycleRequest, options?: AxiosRequestConfig) {
264
+ return MSGraphWebhooksApiFp(this.configuration).receiveLifecycle(requestParameters.tenantSlug, requestParameters.validationToken, requestParameters.body, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
265
+ }
266
+
267
+ /**
268
+ * Public route called by Microsoft Graph. Echoes `validationToken` as text/plain, otherwise enqueues the notifications and answers 202. See docs/webhooks/msgraph.md. **Required Permissions** none
269
+ * @summary Receive Microsoft Graph change notifications
270
+ * @param {MSGraphWebhooksApiReceiveNotificationsRequest} requestParameters Request parameters.
271
+ * @param {*} [options] Override http request option.
272
+ * @throws {RequiredError}
273
+ * @memberof MSGraphWebhooksApi
274
+ */
275
+ public receiveNotifications(requestParameters: MSGraphWebhooksApiReceiveNotificationsRequest, options?: AxiosRequestConfig) {
276
+ return MSGraphWebhooksApiFp(this.configuration).receiveNotifications(requestParameters.tenantSlug, requestParameters.validationToken, requestParameters.body, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
277
+ }
278
+ }