@zyphr-dev/node-sdk 0.1.41 → 0.1.43

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 (56) hide show
  1. package/dist/index.cjs +1912 -392
  2. package/dist/index.cjs.map +1 -1
  3. package/dist/index.d.cts +2055 -501
  4. package/dist/index.d.ts +2055 -501
  5. package/dist/index.js +1721 -387
  6. package/dist/index.js.map +1 -1
  7. package/package.json +1 -1
  8. package/src/.openapi-generator/FILES +37 -1
  9. package/src/client.ts +4 -0
  10. package/src/src/apis/AuthUserDirectoryApi.ts +68 -46
  11. package/src/src/apis/DomainsApi.ts +7 -6
  12. package/src/src/apis/InboxApi.ts +82 -58
  13. package/src/src/apis/TemplatesApi.ts +10 -6
  14. package/src/src/apis/WaaSDeliveriesApi.ts +17 -12
  15. package/src/src/apis/WaaSEndpointsApi.ts +50 -30
  16. package/src/src/apis/WaaSEventTypesApi.ts +17 -12
  17. package/src/src/models/CloseWaaSEndpointCircuit200Response.ts +88 -0
  18. package/src/src/models/CloseWaaSEndpointCircuit200ResponseData.ts +76 -0
  19. package/src/src/models/GetEndUserById200Response.ts +88 -0
  20. package/src/src/models/GetEndUserClaims200Response.ts +88 -0
  21. package/src/src/models/GetEndUserClaims200ResponseData.ts +65 -0
  22. package/src/src/models/GetSubscriberInboxPreferences200Response.ts +73 -0
  23. package/src/src/models/GetSubscriberInboxPreferences200ResponseData.ts +88 -0
  24. package/src/src/models/GetSubscriberInboxPreferences200ResponseDataCategoriesInner.ts +88 -0
  25. package/src/src/models/GetSubscriberInboxPreferences200ResponseDataCategoriesInnerCategory.ts +97 -0
  26. package/src/src/models/GetSubscriberInboxPreferences200ResponseDataGlobal.ts +73 -0
  27. package/src/src/models/GetSubscriberInboxPreferences200ResponseDataGlobalChannelsInner.ts +94 -0
  28. package/src/src/models/GetSubscriberNotification200Response.ts +73 -0
  29. package/src/src/models/GetSubscriberUnreadCount200Response.ts +73 -0
  30. package/src/src/models/GetWaaSDelivery200Response.ts +88 -0
  31. package/src/src/models/GetWaaSEndpointCircuit200Response.ts +88 -0
  32. package/src/src/models/GetWaaSEndpointCircuit200ResponseData.ts +123 -0
  33. package/src/src/models/GetWaaSEndpointMetrics200Response.ts +88 -0
  34. package/src/src/models/GetWaaSEndpointMetrics200ResponseData.ts +99 -0
  35. package/src/src/models/GetWaaSEndpointMetrics200ResponseDataHealth.ts +87 -0
  36. package/src/src/models/GetWaaSEndpointMetrics200ResponseDataWindowsValue.ts +126 -0
  37. package/src/src/models/InviteEndUser200Response.ts +88 -0
  38. package/src/src/models/InviteEndUser200ResponseData.ts +81 -0
  39. package/src/src/models/ListEndUsers200Response.ts +88 -0
  40. package/src/src/models/{ListWorkflowExecutions200ResponseMeta.ts → ListEndUsers200ResponseMeta.ts} +15 -15
  41. package/src/src/models/ListWorkflowExecutions200Response.ts +11 -11
  42. package/src/src/models/MarkAllSubscriberNotificationsRead200Response.ts +73 -0
  43. package/src/src/models/RotateWaaSEndpointSecret200Response.ts +88 -0
  44. package/src/src/models/RotateWaaSEndpointSecret200ResponseData.ts +66 -0
  45. package/src/src/models/SendTemplateTestEmail202Response.ts +90 -0
  46. package/src/src/models/SendTemplateTestEmail202ResponseData.ts +120 -0
  47. package/src/src/models/SendTemplateTestEmail202ResponseMeta.ts +66 -0
  48. package/src/src/models/SetEndUserClaims200Response.ts +73 -0
  49. package/src/src/models/SetEndUserClaims200ResponseData.ts +73 -0
  50. package/src/src/models/SmsListResponse.ts +10 -10
  51. package/src/src/models/UpdateSubscriberPreferences200Response.ts +73 -0
  52. package/src/src/models/UpdateSubscriberPreferences200ResponseData.ts +81 -0
  53. package/src/src/models/UpdateSubscriberPreferences200ResponseDataPreferencesInner.ts +102 -0
  54. package/src/src/models/UpdateWaaSEndpoint200Response.ts +88 -0
  55. package/src/src/models/UpdateWaaSEventType200Response.ts +88 -0
  56. package/src/src/models/index.ts +37 -1
@@ -15,21 +15,36 @@
15
15
 
16
16
  import * as runtime from '../runtime';
17
17
  import type {
18
+ CloseWaaSEndpointCircuit200Response,
18
19
  CreateWaaSEndpoint201Response,
19
20
  CreateWaaSEndpointRequest,
20
21
  GetWaaSEndpoint200Response,
22
+ GetWaaSEndpointCircuit200Response,
23
+ GetWaaSEndpointMetrics200Response,
21
24
  ListWaaSEndpoints200Response,
25
+ RotateWaaSEndpointSecret200Response,
26
+ UpdateWaaSEndpoint200Response,
22
27
  UpdateWaaSEndpointRequest,
23
28
  } from '../models/index';
24
29
  import {
30
+ CloseWaaSEndpointCircuit200ResponseFromJSON,
31
+ CloseWaaSEndpointCircuit200ResponseToJSON,
25
32
  CreateWaaSEndpoint201ResponseFromJSON,
26
33
  CreateWaaSEndpoint201ResponseToJSON,
27
34
  CreateWaaSEndpointRequestFromJSON,
28
35
  CreateWaaSEndpointRequestToJSON,
29
36
  GetWaaSEndpoint200ResponseFromJSON,
30
37
  GetWaaSEndpoint200ResponseToJSON,
38
+ GetWaaSEndpointCircuit200ResponseFromJSON,
39
+ GetWaaSEndpointCircuit200ResponseToJSON,
40
+ GetWaaSEndpointMetrics200ResponseFromJSON,
41
+ GetWaaSEndpointMetrics200ResponseToJSON,
31
42
  ListWaaSEndpoints200ResponseFromJSON,
32
43
  ListWaaSEndpoints200ResponseToJSON,
44
+ RotateWaaSEndpointSecret200ResponseFromJSON,
45
+ RotateWaaSEndpointSecret200ResponseToJSON,
46
+ UpdateWaaSEndpoint200ResponseFromJSON,
47
+ UpdateWaaSEndpoint200ResponseToJSON,
33
48
  UpdateWaaSEndpointRequestFromJSON,
34
49
  UpdateWaaSEndpointRequestToJSON,
35
50
  } from '../models/index';
@@ -99,13 +114,13 @@ export interface WaaSEndpointsApiInterface {
99
114
  * @throws {RequiredError}
100
115
  * @memberof WaaSEndpointsApiInterface
101
116
  */
102
- closeWaaSEndpointCircuitRaw(requestParameters: WaaSEndpointsApiCloseWaaSEndpointCircuitRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
117
+ closeWaaSEndpointCircuitRaw(requestParameters: WaaSEndpointsApiCloseWaaSEndpointCircuitRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CloseWaaSEndpointCircuit200Response>>;
103
118
 
104
119
  /**
105
120
  * Force the circuit breaker to close, resuming deliveries to the endpoint.
106
121
  * Force-close circuit breaker
107
122
  */
108
- closeWaaSEndpointCircuit(appId: string, endpointId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
123
+ closeWaaSEndpointCircuit(appId: string, endpointId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CloseWaaSEndpointCircuit200Response>;
109
124
 
110
125
  /**
111
126
  * Create a webhook endpoint for a specific tenant. The signing secret is returned only on creation.
@@ -166,13 +181,13 @@ export interface WaaSEndpointsApiInterface {
166
181
  * @throws {RequiredError}
167
182
  * @memberof WaaSEndpointsApiInterface
168
183
  */
169
- getWaaSEndpointCircuitRaw(requestParameters: WaaSEndpointsApiGetWaaSEndpointCircuitRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
184
+ getWaaSEndpointCircuitRaw(requestParameters: WaaSEndpointsApiGetWaaSEndpointCircuitRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetWaaSEndpointCircuit200Response>>;
170
185
 
171
186
  /**
172
187
  * Get the circuit breaker state for an endpoint (closed, open, or half-open).
173
188
  * Get circuit breaker state
174
189
  */
175
- getWaaSEndpointCircuit(appId: string, endpointId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
190
+ getWaaSEndpointCircuit(appId: string, endpointId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetWaaSEndpointCircuit200Response>;
176
191
 
177
192
  /**
178
193
  * Get delivery success rate, latency, and health metrics for an endpoint.
@@ -183,13 +198,13 @@ export interface WaaSEndpointsApiInterface {
183
198
  * @throws {RequiredError}
184
199
  * @memberof WaaSEndpointsApiInterface
185
200
  */
186
- getWaaSEndpointMetricsRaw(requestParameters: WaaSEndpointsApiGetWaaSEndpointMetricsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
201
+ getWaaSEndpointMetricsRaw(requestParameters: WaaSEndpointsApiGetWaaSEndpointMetricsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetWaaSEndpointMetrics200Response>>;
187
202
 
188
203
  /**
189
204
  * Get delivery success rate, latency, and health metrics for an endpoint.
190
205
  * Get endpoint metrics
191
206
  */
192
- getWaaSEndpointMetrics(appId: string, endpointId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
207
+ getWaaSEndpointMetrics(appId: string, endpointId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetWaaSEndpointMetrics200Response>;
193
208
 
194
209
  /**
195
210
  * List all endpoints for a WaaS application. Optionally filter by tenant ID or status.
@@ -220,13 +235,13 @@ export interface WaaSEndpointsApiInterface {
220
235
  * @throws {RequiredError}
221
236
  * @memberof WaaSEndpointsApiInterface
222
237
  */
223
- rotateWaaSEndpointSecretRaw(requestParameters: WaaSEndpointsApiRotateWaaSEndpointSecretRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
238
+ rotateWaaSEndpointSecretRaw(requestParameters: WaaSEndpointsApiRotateWaaSEndpointSecretRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<RotateWaaSEndpointSecret200Response>>;
224
239
 
225
240
  /**
226
241
  * Rotate the signing secret for an endpoint. During rotation, deliveries are signed with both old and new secrets.
227
242
  * Rotate endpoint secret
228
243
  */
229
- rotateWaaSEndpointSecret(appId: string, endpointId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
244
+ rotateWaaSEndpointSecret(appId: string, endpointId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<RotateWaaSEndpointSecret200Response>;
230
245
 
231
246
  /**
232
247
  *
@@ -238,12 +253,12 @@ export interface WaaSEndpointsApiInterface {
238
253
  * @throws {RequiredError}
239
254
  * @memberof WaaSEndpointsApiInterface
240
255
  */
241
- updateWaaSEndpointRaw(requestParameters: WaaSEndpointsApiUpdateWaaSEndpointOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
256
+ updateWaaSEndpointRaw(requestParameters: WaaSEndpointsApiUpdateWaaSEndpointOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<UpdateWaaSEndpoint200Response>>;
242
257
 
243
258
  /**
244
259
  * Update an endpoint
245
260
  */
246
- updateWaaSEndpoint(appId: string, endpointId: string, updateWaaSEndpointRequest: UpdateWaaSEndpointRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
261
+ updateWaaSEndpoint(appId: string, endpointId: string, updateWaaSEndpointRequest: UpdateWaaSEndpointRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UpdateWaaSEndpoint200Response>;
247
262
 
248
263
  }
249
264
 
@@ -256,7 +271,7 @@ export class WaaSEndpointsApi extends runtime.BaseAPI implements WaaSEndpointsAp
256
271
  * Force the circuit breaker to close, resuming deliveries to the endpoint.
257
272
  * Force-close circuit breaker
258
273
  */
259
- async closeWaaSEndpointCircuitRaw(requestParameters: WaaSEndpointsApiCloseWaaSEndpointCircuitRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
274
+ async closeWaaSEndpointCircuitRaw(requestParameters: WaaSEndpointsApiCloseWaaSEndpointCircuitRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CloseWaaSEndpointCircuit200Response>> {
260
275
  if (requestParameters['appId'] == null) {
261
276
  throw new runtime.RequiredError(
262
277
  'appId',
@@ -286,15 +301,16 @@ export class WaaSEndpointsApi extends runtime.BaseAPI implements WaaSEndpointsAp
286
301
  query: queryParameters,
287
302
  }, initOverrides);
288
303
 
289
- return new runtime.VoidApiResponse(response);
304
+ return new runtime.JSONApiResponse(response, (jsonValue) => CloseWaaSEndpointCircuit200ResponseFromJSON(jsonValue));
290
305
  }
291
306
 
292
307
  /**
293
308
  * Force the circuit breaker to close, resuming deliveries to the endpoint.
294
309
  * Force-close circuit breaker
295
310
  */
296
- async closeWaaSEndpointCircuit(appId: string, endpointId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
297
- await this.closeWaaSEndpointCircuitRaw({ appId: appId, endpointId: endpointId }, initOverrides);
311
+ async closeWaaSEndpointCircuit(appId: string, endpointId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CloseWaaSEndpointCircuit200Response> {
312
+ const response = await this.closeWaaSEndpointCircuitRaw({ appId: appId, endpointId: endpointId }, initOverrides);
313
+ return await response.value();
298
314
  }
299
315
 
300
316
  /**
@@ -439,7 +455,7 @@ export class WaaSEndpointsApi extends runtime.BaseAPI implements WaaSEndpointsAp
439
455
  * Get the circuit breaker state for an endpoint (closed, open, or half-open).
440
456
  * Get circuit breaker state
441
457
  */
442
- async getWaaSEndpointCircuitRaw(requestParameters: WaaSEndpointsApiGetWaaSEndpointCircuitRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
458
+ async getWaaSEndpointCircuitRaw(requestParameters: WaaSEndpointsApiGetWaaSEndpointCircuitRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetWaaSEndpointCircuit200Response>> {
443
459
  if (requestParameters['appId'] == null) {
444
460
  throw new runtime.RequiredError(
445
461
  'appId',
@@ -469,22 +485,23 @@ export class WaaSEndpointsApi extends runtime.BaseAPI implements WaaSEndpointsAp
469
485
  query: queryParameters,
470
486
  }, initOverrides);
471
487
 
472
- return new runtime.VoidApiResponse(response);
488
+ return new runtime.JSONApiResponse(response, (jsonValue) => GetWaaSEndpointCircuit200ResponseFromJSON(jsonValue));
473
489
  }
474
490
 
475
491
  /**
476
492
  * Get the circuit breaker state for an endpoint (closed, open, or half-open).
477
493
  * Get circuit breaker state
478
494
  */
479
- async getWaaSEndpointCircuit(appId: string, endpointId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
480
- await this.getWaaSEndpointCircuitRaw({ appId: appId, endpointId: endpointId }, initOverrides);
495
+ async getWaaSEndpointCircuit(appId: string, endpointId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetWaaSEndpointCircuit200Response> {
496
+ const response = await this.getWaaSEndpointCircuitRaw({ appId: appId, endpointId: endpointId }, initOverrides);
497
+ return await response.value();
481
498
  }
482
499
 
483
500
  /**
484
501
  * Get delivery success rate, latency, and health metrics for an endpoint.
485
502
  * Get endpoint metrics
486
503
  */
487
- async getWaaSEndpointMetricsRaw(requestParameters: WaaSEndpointsApiGetWaaSEndpointMetricsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
504
+ async getWaaSEndpointMetricsRaw(requestParameters: WaaSEndpointsApiGetWaaSEndpointMetricsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetWaaSEndpointMetrics200Response>> {
488
505
  if (requestParameters['appId'] == null) {
489
506
  throw new runtime.RequiredError(
490
507
  'appId',
@@ -514,15 +531,16 @@ export class WaaSEndpointsApi extends runtime.BaseAPI implements WaaSEndpointsAp
514
531
  query: queryParameters,
515
532
  }, initOverrides);
516
533
 
517
- return new runtime.VoidApiResponse(response);
534
+ return new runtime.JSONApiResponse(response, (jsonValue) => GetWaaSEndpointMetrics200ResponseFromJSON(jsonValue));
518
535
  }
519
536
 
520
537
  /**
521
538
  * Get delivery success rate, latency, and health metrics for an endpoint.
522
539
  * Get endpoint metrics
523
540
  */
524
- async getWaaSEndpointMetrics(appId: string, endpointId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
525
- await this.getWaaSEndpointMetricsRaw({ appId: appId, endpointId: endpointId }, initOverrides);
541
+ async getWaaSEndpointMetrics(appId: string, endpointId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetWaaSEndpointMetrics200Response> {
542
+ const response = await this.getWaaSEndpointMetricsRaw({ appId: appId, endpointId: endpointId }, initOverrides);
543
+ return await response.value();
526
544
  }
527
545
 
528
546
  /**
@@ -584,7 +602,7 @@ export class WaaSEndpointsApi extends runtime.BaseAPI implements WaaSEndpointsAp
584
602
  * Rotate the signing secret for an endpoint. During rotation, deliveries are signed with both old and new secrets.
585
603
  * Rotate endpoint secret
586
604
  */
587
- async rotateWaaSEndpointSecretRaw(requestParameters: WaaSEndpointsApiRotateWaaSEndpointSecretRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
605
+ async rotateWaaSEndpointSecretRaw(requestParameters: WaaSEndpointsApiRotateWaaSEndpointSecretRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<RotateWaaSEndpointSecret200Response>> {
588
606
  if (requestParameters['appId'] == null) {
589
607
  throw new runtime.RequiredError(
590
608
  'appId',
@@ -614,21 +632,22 @@ export class WaaSEndpointsApi extends runtime.BaseAPI implements WaaSEndpointsAp
614
632
  query: queryParameters,
615
633
  }, initOverrides);
616
634
 
617
- return new runtime.VoidApiResponse(response);
635
+ return new runtime.JSONApiResponse(response, (jsonValue) => RotateWaaSEndpointSecret200ResponseFromJSON(jsonValue));
618
636
  }
619
637
 
620
638
  /**
621
639
  * Rotate the signing secret for an endpoint. During rotation, deliveries are signed with both old and new secrets.
622
640
  * Rotate endpoint secret
623
641
  */
624
- async rotateWaaSEndpointSecret(appId: string, endpointId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
625
- await this.rotateWaaSEndpointSecretRaw({ appId: appId, endpointId: endpointId }, initOverrides);
642
+ async rotateWaaSEndpointSecret(appId: string, endpointId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<RotateWaaSEndpointSecret200Response> {
643
+ const response = await this.rotateWaaSEndpointSecretRaw({ appId: appId, endpointId: endpointId }, initOverrides);
644
+ return await response.value();
626
645
  }
627
646
 
628
647
  /**
629
648
  * Update an endpoint
630
649
  */
631
- async updateWaaSEndpointRaw(requestParameters: WaaSEndpointsApiUpdateWaaSEndpointOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
650
+ async updateWaaSEndpointRaw(requestParameters: WaaSEndpointsApiUpdateWaaSEndpointOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<UpdateWaaSEndpoint200Response>> {
632
651
  if (requestParameters['appId'] == null) {
633
652
  throw new runtime.RequiredError(
634
653
  'appId',
@@ -668,14 +687,15 @@ export class WaaSEndpointsApi extends runtime.BaseAPI implements WaaSEndpointsAp
668
687
  body: UpdateWaaSEndpointRequestToJSON(requestParameters['updateWaaSEndpointRequest']),
669
688
  }, initOverrides);
670
689
 
671
- return new runtime.VoidApiResponse(response);
690
+ return new runtime.JSONApiResponse(response, (jsonValue) => UpdateWaaSEndpoint200ResponseFromJSON(jsonValue));
672
691
  }
673
692
 
674
693
  /**
675
694
  * Update an endpoint
676
695
  */
677
- async updateWaaSEndpoint(appId: string, endpointId: string, updateWaaSEndpointRequest: UpdateWaaSEndpointRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
678
- await this.updateWaaSEndpointRaw({ appId: appId, endpointId: endpointId, updateWaaSEndpointRequest: updateWaaSEndpointRequest }, initOverrides);
696
+ async updateWaaSEndpoint(appId: string, endpointId: string, updateWaaSEndpointRequest: UpdateWaaSEndpointRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UpdateWaaSEndpoint200Response> {
697
+ const response = await this.updateWaaSEndpointRaw({ appId: appId, endpointId: endpointId, updateWaaSEndpointRequest: updateWaaSEndpointRequest }, initOverrides);
698
+ return await response.value();
679
699
  }
680
700
 
681
701
  }
@@ -18,6 +18,7 @@ import type {
18
18
  CreateWaaSEventType201Response,
19
19
  CreateWaaSEventTypeRequest,
20
20
  ListWaaSEventTypes200Response,
21
+ UpdateWaaSEventType200Response,
21
22
  UpdateWaaSEventTypeRequest,
22
23
  } from '../models/index';
23
24
  import {
@@ -27,6 +28,8 @@ import {
27
28
  CreateWaaSEventTypeRequestToJSON,
28
29
  ListWaaSEventTypes200ResponseFromJSON,
29
30
  ListWaaSEventTypes200ResponseToJSON,
31
+ UpdateWaaSEventType200ResponseFromJSON,
32
+ UpdateWaaSEventType200ResponseToJSON,
30
33
  UpdateWaaSEventTypeRequestFromJSON,
31
34
  UpdateWaaSEventTypeRequestToJSON,
32
35
  } from '../models/index';
@@ -115,13 +118,13 @@ export interface WaaSEventTypesApiInterface {
115
118
  * @throws {RequiredError}
116
119
  * @memberof WaaSEventTypesApiInterface
117
120
  */
118
- deprecateWaaSEventTypeRaw(requestParameters: WaaSEventTypesApiDeprecateWaaSEventTypeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
121
+ deprecateWaaSEventTypeRaw(requestParameters: WaaSEventTypesApiDeprecateWaaSEventTypeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<UpdateWaaSEventType200Response>>;
119
122
 
120
123
  /**
121
124
  * Mark an event type as deprecated. Existing subscriptions continue to receive deliveries, but new subscriptions are blocked.
122
125
  * Deprecate an event type
123
126
  */
124
- deprecateWaaSEventType(appId: string, eventTypeId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
127
+ deprecateWaaSEventType(appId: string, eventTypeId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UpdateWaaSEventType200Response>;
125
128
 
126
129
  /**
127
130
  *
@@ -169,12 +172,12 @@ export interface WaaSEventTypesApiInterface {
169
172
  * @throws {RequiredError}
170
173
  * @memberof WaaSEventTypesApiInterface
171
174
  */
172
- updateWaaSEventTypeRaw(requestParameters: WaaSEventTypesApiUpdateWaaSEventTypeOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
175
+ updateWaaSEventTypeRaw(requestParameters: WaaSEventTypesApiUpdateWaaSEventTypeOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<UpdateWaaSEventType200Response>>;
173
176
 
174
177
  /**
175
178
  * Update an event type
176
179
  */
177
- updateWaaSEventType(appId: string, eventTypeId: string, updateWaaSEventTypeRequest: UpdateWaaSEventTypeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
180
+ updateWaaSEventType(appId: string, eventTypeId: string, updateWaaSEventTypeRequest: UpdateWaaSEventTypeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UpdateWaaSEventType200Response>;
178
181
 
179
182
  }
180
183
 
@@ -281,7 +284,7 @@ export class WaaSEventTypesApi extends runtime.BaseAPI implements WaaSEventTypes
281
284
  * Mark an event type as deprecated. Existing subscriptions continue to receive deliveries, but new subscriptions are blocked.
282
285
  * Deprecate an event type
283
286
  */
284
- async deprecateWaaSEventTypeRaw(requestParameters: WaaSEventTypesApiDeprecateWaaSEventTypeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
287
+ async deprecateWaaSEventTypeRaw(requestParameters: WaaSEventTypesApiDeprecateWaaSEventTypeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<UpdateWaaSEventType200Response>> {
285
288
  if (requestParameters['appId'] == null) {
286
289
  throw new runtime.RequiredError(
287
290
  'appId',
@@ -311,15 +314,16 @@ export class WaaSEventTypesApi extends runtime.BaseAPI implements WaaSEventTypes
311
314
  query: queryParameters,
312
315
  }, initOverrides);
313
316
 
314
- return new runtime.VoidApiResponse(response);
317
+ return new runtime.JSONApiResponse(response, (jsonValue) => UpdateWaaSEventType200ResponseFromJSON(jsonValue));
315
318
  }
316
319
 
317
320
  /**
318
321
  * Mark an event type as deprecated. Existing subscriptions continue to receive deliveries, but new subscriptions are blocked.
319
322
  * Deprecate an event type
320
323
  */
321
- async deprecateWaaSEventType(appId: string, eventTypeId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
322
- await this.deprecateWaaSEventTypeRaw({ appId: appId, eventTypeId: eventTypeId }, initOverrides);
324
+ async deprecateWaaSEventType(appId: string, eventTypeId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UpdateWaaSEventType200Response> {
325
+ const response = await this.deprecateWaaSEventTypeRaw({ appId: appId, eventTypeId: eventTypeId }, initOverrides);
326
+ return await response.value();
323
327
  }
324
328
 
325
329
  /**
@@ -424,7 +428,7 @@ export class WaaSEventTypesApi extends runtime.BaseAPI implements WaaSEventTypes
424
428
  /**
425
429
  * Update an event type
426
430
  */
427
- async updateWaaSEventTypeRaw(requestParameters: WaaSEventTypesApiUpdateWaaSEventTypeOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
431
+ async updateWaaSEventTypeRaw(requestParameters: WaaSEventTypesApiUpdateWaaSEventTypeOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<UpdateWaaSEventType200Response>> {
428
432
  if (requestParameters['appId'] == null) {
429
433
  throw new runtime.RequiredError(
430
434
  'appId',
@@ -464,14 +468,15 @@ export class WaaSEventTypesApi extends runtime.BaseAPI implements WaaSEventTypes
464
468
  body: UpdateWaaSEventTypeRequestToJSON(requestParameters['updateWaaSEventTypeRequest']),
465
469
  }, initOverrides);
466
470
 
467
- return new runtime.VoidApiResponse(response);
471
+ return new runtime.JSONApiResponse(response, (jsonValue) => UpdateWaaSEventType200ResponseFromJSON(jsonValue));
468
472
  }
469
473
 
470
474
  /**
471
475
  * Update an event type
472
476
  */
473
- async updateWaaSEventType(appId: string, eventTypeId: string, updateWaaSEventTypeRequest: UpdateWaaSEventTypeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
474
- await this.updateWaaSEventTypeRaw({ appId: appId, eventTypeId: eventTypeId, updateWaaSEventTypeRequest: updateWaaSEventTypeRequest }, initOverrides);
477
+ async updateWaaSEventType(appId: string, eventTypeId: string, updateWaaSEventTypeRequest: UpdateWaaSEventTypeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UpdateWaaSEventType200Response> {
478
+ const response = await this.updateWaaSEventTypeRaw({ appId: appId, eventTypeId: eventTypeId, updateWaaSEventTypeRequest: updateWaaSEventTypeRequest }, initOverrides);
479
+ return await response.value();
475
480
  }
476
481
 
477
482
  }
@@ -0,0 +1,88 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Zyphr API
5
+ * Zyphr is a multi-channel notification platform that enables developers to send emails, push notifications, SMS, and in-app messages through a unified API. ## Authentication All API requests require authentication using an API key. Include your API key in the `X-API-Key` header: ``` X-API-Key: zy_live_xxxxxxxxxxxx ``` API keys can be created in the Zyphr Dashboard. Use `zy_test_*` keys for testing and `zy_live_*` keys for production. ## Rate Limiting The API implements rate limiting to ensure fair usage. Rate limit information is included in response headers: - `X-RateLimit-Limit`: Maximum requests per window - `X-RateLimit-Remaining`: Remaining requests in current window - `X-RateLimit-Reset`: Unix timestamp when the window resets ## Account Sending Status Every authenticated response carries the account\'s current sending state so you can surface it in your own tooling without a separate call: - `X-Account-Sending-Status`: `active`, `throttled`, or `frozen` - `X-Account-Sending-Status-Reason`: human-readable reason (present only when the status is `throttled` or `frozen`) This header is informational and non-blocking on non-send endpoints (reads, billing, and deliverability stay available). Send-capable endpoints additionally enforce the state: a frozen account receives `403 account_frozen` and a throttled account receives `429 account_throttled`, both with the reason in the error message. ## Errors All errors follow a consistent format: ```json { \"error\": { \"code\": \"error_code\", \"message\": \"Human readable message\", \"details\": {} }, \"meta\": { \"request_id\": \"req_xxxx\" } } ```
6
+ *
7
+ * The version of the OpenAPI document: 1.0.0
8
+ * Contact: support@zyphr.dev
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
+ import { mapValues } from '../runtime';
16
+ import type { GetDomain200ResponseMeta } from './GetDomain200ResponseMeta';
17
+ import {
18
+ GetDomain200ResponseMetaFromJSON,
19
+ GetDomain200ResponseMetaFromJSONTyped,
20
+ GetDomain200ResponseMetaToJSON,
21
+ GetDomain200ResponseMetaToJSONTyped,
22
+ } from './GetDomain200ResponseMeta';
23
+ import type { CloseWaaSEndpointCircuit200ResponseData } from './CloseWaaSEndpointCircuit200ResponseData';
24
+ import {
25
+ CloseWaaSEndpointCircuit200ResponseDataFromJSON,
26
+ CloseWaaSEndpointCircuit200ResponseDataFromJSONTyped,
27
+ CloseWaaSEndpointCircuit200ResponseDataToJSON,
28
+ CloseWaaSEndpointCircuit200ResponseDataToJSONTyped,
29
+ } from './CloseWaaSEndpointCircuit200ResponseData';
30
+
31
+ /**
32
+ *
33
+ * @export
34
+ * @interface CloseWaaSEndpointCircuit200Response
35
+ */
36
+ export interface CloseWaaSEndpointCircuit200Response {
37
+ /**
38
+ *
39
+ * @type {CloseWaaSEndpointCircuit200ResponseData}
40
+ * @memberof CloseWaaSEndpointCircuit200Response
41
+ */
42
+ data?: CloseWaaSEndpointCircuit200ResponseData;
43
+ /**
44
+ *
45
+ * @type {GetDomain200ResponseMeta}
46
+ * @memberof CloseWaaSEndpointCircuit200Response
47
+ */
48
+ meta?: GetDomain200ResponseMeta;
49
+ }
50
+
51
+ /**
52
+ * Check if a given object implements the CloseWaaSEndpointCircuit200Response interface.
53
+ */
54
+ export function instanceOfCloseWaaSEndpointCircuit200Response(value: object): value is CloseWaaSEndpointCircuit200Response {
55
+ return true;
56
+ }
57
+
58
+ export function CloseWaaSEndpointCircuit200ResponseFromJSON(json: any): CloseWaaSEndpointCircuit200Response {
59
+ return CloseWaaSEndpointCircuit200ResponseFromJSONTyped(json, false);
60
+ }
61
+
62
+ export function CloseWaaSEndpointCircuit200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): CloseWaaSEndpointCircuit200Response {
63
+ if (json == null) {
64
+ return json;
65
+ }
66
+ return {
67
+
68
+ 'data': json['data'] == null ? undefined : CloseWaaSEndpointCircuit200ResponseDataFromJSON(json['data']),
69
+ 'meta': json['meta'] == null ? undefined : GetDomain200ResponseMetaFromJSON(json['meta']),
70
+ };
71
+ }
72
+
73
+ export function CloseWaaSEndpointCircuit200ResponseToJSON(json: any): CloseWaaSEndpointCircuit200Response {
74
+ return CloseWaaSEndpointCircuit200ResponseToJSONTyped(json, false);
75
+ }
76
+
77
+ export function CloseWaaSEndpointCircuit200ResponseToJSONTyped(value?: CloseWaaSEndpointCircuit200Response | null, ignoreDiscriminator: boolean = false): any {
78
+ if (value == null) {
79
+ return value;
80
+ }
81
+
82
+ return {
83
+
84
+ 'data': CloseWaaSEndpointCircuit200ResponseDataToJSON(value['data']),
85
+ 'meta': GetDomain200ResponseMetaToJSON(value['meta']),
86
+ };
87
+ }
88
+
@@ -0,0 +1,76 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Zyphr API
5
+ * Zyphr is a multi-channel notification platform that enables developers to send emails, push notifications, SMS, and in-app messages through a unified API. ## Authentication All API requests require authentication using an API key. Include your API key in the `X-API-Key` header: ``` X-API-Key: zy_live_xxxxxxxxxxxx ``` API keys can be created in the Zyphr Dashboard. Use `zy_test_*` keys for testing and `zy_live_*` keys for production. ## Rate Limiting The API implements rate limiting to ensure fair usage. Rate limit information is included in response headers: - `X-RateLimit-Limit`: Maximum requests per window - `X-RateLimit-Remaining`: Remaining requests in current window - `X-RateLimit-Reset`: Unix timestamp when the window resets ## Account Sending Status Every authenticated response carries the account\'s current sending state so you can surface it in your own tooling without a separate call: - `X-Account-Sending-Status`: `active`, `throttled`, or `frozen` - `X-Account-Sending-Status-Reason`: human-readable reason (present only when the status is `throttled` or `frozen`) This header is informational and non-blocking on non-send endpoints (reads, billing, and deliverability stay available). Send-capable endpoints additionally enforce the state: a frozen account receives `403 account_frozen` and a throttled account receives `429 account_throttled`, both with the reason in the error message. ## Errors All errors follow a consistent format: ```json { \"error\": { \"code\": \"error_code\", \"message\": \"Human readable message\", \"details\": {} }, \"meta\": { \"request_id\": \"req_xxxx\" } } ```
6
+ *
7
+ * The version of the OpenAPI document: 1.0.0
8
+ * Contact: support@zyphr.dev
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
+ import { mapValues } from '../runtime';
16
+ /**
17
+ *
18
+ * @export
19
+ * @interface CloseWaaSEndpointCircuit200ResponseData
20
+ */
21
+ export interface CloseWaaSEndpointCircuit200ResponseData {
22
+ /**
23
+ *
24
+ * @type {string}
25
+ * @memberof CloseWaaSEndpointCircuit200ResponseData
26
+ */
27
+ state: CloseWaaSEndpointCircuit200ResponseDataStateEnum;
28
+ }
29
+
30
+
31
+ /**
32
+ * @export
33
+ */
34
+ export const CloseWaaSEndpointCircuit200ResponseDataStateEnum = {
35
+ CLOSED: 'closed'
36
+ } as const;
37
+ export type CloseWaaSEndpointCircuit200ResponseDataStateEnum = typeof CloseWaaSEndpointCircuit200ResponseDataStateEnum[keyof typeof CloseWaaSEndpointCircuit200ResponseDataStateEnum];
38
+
39
+
40
+ /**
41
+ * Check if a given object implements the CloseWaaSEndpointCircuit200ResponseData interface.
42
+ */
43
+ export function instanceOfCloseWaaSEndpointCircuit200ResponseData(value: object): value is CloseWaaSEndpointCircuit200ResponseData {
44
+ if (!('state' in value) || value['state'] === undefined) return false;
45
+ return true;
46
+ }
47
+
48
+ export function CloseWaaSEndpointCircuit200ResponseDataFromJSON(json: any): CloseWaaSEndpointCircuit200ResponseData {
49
+ return CloseWaaSEndpointCircuit200ResponseDataFromJSONTyped(json, false);
50
+ }
51
+
52
+ export function CloseWaaSEndpointCircuit200ResponseDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): CloseWaaSEndpointCircuit200ResponseData {
53
+ if (json == null) {
54
+ return json;
55
+ }
56
+ return {
57
+
58
+ 'state': json['state'],
59
+ };
60
+ }
61
+
62
+ export function CloseWaaSEndpointCircuit200ResponseDataToJSON(json: any): CloseWaaSEndpointCircuit200ResponseData {
63
+ return CloseWaaSEndpointCircuit200ResponseDataToJSONTyped(json, false);
64
+ }
65
+
66
+ export function CloseWaaSEndpointCircuit200ResponseDataToJSONTyped(value?: CloseWaaSEndpointCircuit200ResponseData | null, ignoreDiscriminator: boolean = false): any {
67
+ if (value == null) {
68
+ return value;
69
+ }
70
+
71
+ return {
72
+
73
+ 'state': value['state'],
74
+ };
75
+ }
76
+
@@ -0,0 +1,88 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Zyphr API
5
+ * Zyphr is a multi-channel notification platform that enables developers to send emails, push notifications, SMS, and in-app messages through a unified API. ## Authentication All API requests require authentication using an API key. Include your API key in the `X-API-Key` header: ``` X-API-Key: zy_live_xxxxxxxxxxxx ``` API keys can be created in the Zyphr Dashboard. Use `zy_test_*` keys for testing and `zy_live_*` keys for production. ## Rate Limiting The API implements rate limiting to ensure fair usage. Rate limit information is included in response headers: - `X-RateLimit-Limit`: Maximum requests per window - `X-RateLimit-Remaining`: Remaining requests in current window - `X-RateLimit-Reset`: Unix timestamp when the window resets ## Account Sending Status Every authenticated response carries the account\'s current sending state so you can surface it in your own tooling without a separate call: - `X-Account-Sending-Status`: `active`, `throttled`, or `frozen` - `X-Account-Sending-Status-Reason`: human-readable reason (present only when the status is `throttled` or `frozen`) This header is informational and non-blocking on non-send endpoints (reads, billing, and deliverability stay available). Send-capable endpoints additionally enforce the state: a frozen account receives `403 account_frozen` and a throttled account receives `429 account_throttled`, both with the reason in the error message. ## Errors All errors follow a consistent format: ```json { \"error\": { \"code\": \"error_code\", \"message\": \"Human readable message\", \"details\": {} }, \"meta\": { \"request_id\": \"req_xxxx\" } } ```
6
+ *
7
+ * The version of the OpenAPI document: 1.0.0
8
+ * Contact: support@zyphr.dev
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
+ import { mapValues } from '../runtime';
16
+ import type { AuthUser } from './AuthUser';
17
+ import {
18
+ AuthUserFromJSON,
19
+ AuthUserFromJSONTyped,
20
+ AuthUserToJSON,
21
+ AuthUserToJSONTyped,
22
+ } from './AuthUser';
23
+ import type { GetDomain200ResponseMeta } from './GetDomain200ResponseMeta';
24
+ import {
25
+ GetDomain200ResponseMetaFromJSON,
26
+ GetDomain200ResponseMetaFromJSONTyped,
27
+ GetDomain200ResponseMetaToJSON,
28
+ GetDomain200ResponseMetaToJSONTyped,
29
+ } from './GetDomain200ResponseMeta';
30
+
31
+ /**
32
+ *
33
+ * @export
34
+ * @interface GetEndUserById200Response
35
+ */
36
+ export interface GetEndUserById200Response {
37
+ /**
38
+ *
39
+ * @type {AuthUser}
40
+ * @memberof GetEndUserById200Response
41
+ */
42
+ data?: AuthUser;
43
+ /**
44
+ *
45
+ * @type {GetDomain200ResponseMeta}
46
+ * @memberof GetEndUserById200Response
47
+ */
48
+ meta?: GetDomain200ResponseMeta;
49
+ }
50
+
51
+ /**
52
+ * Check if a given object implements the GetEndUserById200Response interface.
53
+ */
54
+ export function instanceOfGetEndUserById200Response(value: object): value is GetEndUserById200Response {
55
+ return true;
56
+ }
57
+
58
+ export function GetEndUserById200ResponseFromJSON(json: any): GetEndUserById200Response {
59
+ return GetEndUserById200ResponseFromJSONTyped(json, false);
60
+ }
61
+
62
+ export function GetEndUserById200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetEndUserById200Response {
63
+ if (json == null) {
64
+ return json;
65
+ }
66
+ return {
67
+
68
+ 'data': json['data'] == null ? undefined : AuthUserFromJSON(json['data']),
69
+ 'meta': json['meta'] == null ? undefined : GetDomain200ResponseMetaFromJSON(json['meta']),
70
+ };
71
+ }
72
+
73
+ export function GetEndUserById200ResponseToJSON(json: any): GetEndUserById200Response {
74
+ return GetEndUserById200ResponseToJSONTyped(json, false);
75
+ }
76
+
77
+ export function GetEndUserById200ResponseToJSONTyped(value?: GetEndUserById200Response | null, ignoreDiscriminator: boolean = false): any {
78
+ if (value == null) {
79
+ return value;
80
+ }
81
+
82
+ return {
83
+
84
+ 'data': AuthUserToJSON(value['data']),
85
+ 'meta': GetDomain200ResponseMetaToJSON(value['meta']),
86
+ };
87
+ }
88
+