@zyphr-dev/node-sdk 0.1.0 → 0.1.1

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 (202) hide show
  1. package/dist/client.d.ts +9 -1
  2. package/dist/client.d.ts.map +1 -1
  3. package/dist/client.js +10 -1
  4. package/dist/client.js.map +1 -1
  5. package/dist/src/apis/WaaSApplicationsApi.d.ts +204 -0
  6. package/dist/src/apis/WaaSApplicationsApi.d.ts.map +1 -0
  7. package/dist/src/apis/WaaSApplicationsApi.js +215 -0
  8. package/dist/src/apis/WaaSApplicationsApi.js.map +1 -0
  9. package/dist/src/apis/WaaSDeliveriesApi.d.ts +169 -0
  10. package/dist/src/apis/WaaSDeliveriesApi.d.ts.map +1 -0
  11. package/dist/src/apis/WaaSDeliveriesApi.js +179 -0
  12. package/dist/src/apis/WaaSDeliveriesApi.js.map +1 -0
  13. package/dist/src/apis/WaaSEndpointsApi.d.ts +299 -0
  14. package/dist/src/apis/WaaSEndpointsApi.d.ts.map +1 -0
  15. package/dist/src/apis/WaaSEndpointsApi.js +323 -0
  16. package/dist/src/apis/WaaSEndpointsApi.js.map +1 -0
  17. package/dist/src/apis/WaaSEventTypesApi.d.ts +211 -0
  18. package/dist/src/apis/WaaSEventTypesApi.d.ts.map +1 -0
  19. package/dist/src/apis/WaaSEventTypesApi.js +229 -0
  20. package/dist/src/apis/WaaSEventTypesApi.js.map +1 -0
  21. package/dist/src/apis/WaaSEventsApi.d.ts +85 -0
  22. package/dist/src/apis/WaaSEventsApi.d.ts.map +1 -0
  23. package/dist/src/apis/WaaSEventsApi.js +89 -0
  24. package/dist/src/apis/WaaSEventsApi.js.map +1 -0
  25. package/dist/src/apis/WaaSPortalApi.d.ts +56 -0
  26. package/dist/src/apis/WaaSPortalApi.d.ts.map +1 -0
  27. package/dist/src/apis/WaaSPortalApi.js +55 -0
  28. package/dist/src/apis/WaaSPortalApi.js.map +1 -0
  29. package/dist/src/apis/index.d.ts +6 -0
  30. package/dist/src/apis/index.d.ts.map +1 -1
  31. package/dist/src/apis/index.js +6 -0
  32. package/dist/src/apis/index.js.map +1 -1
  33. package/dist/src/models/BatchPublishWaaSEvents201Response.d.ts +34 -0
  34. package/dist/src/models/BatchPublishWaaSEvents201Response.d.ts.map +1 -0
  35. package/dist/src/models/BatchPublishWaaSEvents201Response.js +43 -0
  36. package/dist/src/models/BatchPublishWaaSEvents201Response.js.map +1 -0
  37. package/dist/src/models/CreateWaaSApplication201Response.d.ts +34 -0
  38. package/dist/src/models/CreateWaaSApplication201Response.d.ts.map +1 -0
  39. package/dist/src/models/CreateWaaSApplication201Response.js +43 -0
  40. package/dist/src/models/CreateWaaSApplication201Response.js.map +1 -0
  41. package/dist/src/models/CreateWaaSApplicationRequest.d.ts +45 -0
  42. package/dist/src/models/CreateWaaSApplicationRequest.d.ts.map +1 -0
  43. package/dist/src/models/CreateWaaSApplicationRequest.js +50 -0
  44. package/dist/src/models/CreateWaaSApplicationRequest.js.map +1 -0
  45. package/dist/src/models/CreateWaaSEndpoint201Response.d.ts +34 -0
  46. package/dist/src/models/CreateWaaSEndpoint201Response.d.ts.map +1 -0
  47. package/dist/src/models/CreateWaaSEndpoint201Response.js +43 -0
  48. package/dist/src/models/CreateWaaSEndpoint201Response.js.map +1 -0
  49. package/dist/src/models/CreateWaaSEndpointRequest.d.ts +45 -0
  50. package/dist/src/models/CreateWaaSEndpointRequest.d.ts.map +1 -0
  51. package/dist/src/models/CreateWaaSEndpointRequest.js +52 -0
  52. package/dist/src/models/CreateWaaSEndpointRequest.js.map +1 -0
  53. package/dist/src/models/CreateWaaSEndpointResponse.d.ts +69 -0
  54. package/dist/src/models/CreateWaaSEndpointResponse.d.ts.map +1 -0
  55. package/dist/src/models/CreateWaaSEndpointResponse.js +54 -0
  56. package/dist/src/models/CreateWaaSEndpointResponse.js.map +1 -0
  57. package/dist/src/models/CreateWaaSEventType201Response.d.ts +34 -0
  58. package/dist/src/models/CreateWaaSEventType201Response.d.ts.map +1 -0
  59. package/dist/src/models/CreateWaaSEventType201Response.js +43 -0
  60. package/dist/src/models/CreateWaaSEventType201Response.js.map +1 -0
  61. package/dist/src/models/CreateWaaSEventTypeRequest.d.ts +57 -0
  62. package/dist/src/models/CreateWaaSEventTypeRequest.d.ts.map +1 -0
  63. package/dist/src/models/CreateWaaSEventTypeRequest.js +54 -0
  64. package/dist/src/models/CreateWaaSEventTypeRequest.js.map +1 -0
  65. package/dist/src/models/GenerateWaaSPortalToken201Response.d.ts +34 -0
  66. package/dist/src/models/GenerateWaaSPortalToken201Response.d.ts.map +1 -0
  67. package/dist/src/models/GenerateWaaSPortalToken201Response.js +43 -0
  68. package/dist/src/models/GenerateWaaSPortalToken201Response.js.map +1 -0
  69. package/dist/src/models/GetWaaSEndpoint200Response.d.ts +34 -0
  70. package/dist/src/models/GetWaaSEndpoint200Response.d.ts.map +1 -0
  71. package/dist/src/models/GetWaaSEndpoint200Response.js +43 -0
  72. package/dist/src/models/GetWaaSEndpoint200Response.js.map +1 -0
  73. package/dist/src/models/GetWaaSUsage200Response.d.ts +34 -0
  74. package/dist/src/models/GetWaaSUsage200Response.d.ts.map +1 -0
  75. package/dist/src/models/GetWaaSUsage200Response.js +43 -0
  76. package/dist/src/models/GetWaaSUsage200Response.js.map +1 -0
  77. package/dist/src/models/ListWaaSApplications200Response.d.ts +34 -0
  78. package/dist/src/models/ListWaaSApplications200Response.d.ts.map +1 -0
  79. package/dist/src/models/ListWaaSApplications200Response.js +43 -0
  80. package/dist/src/models/ListWaaSApplications200Response.js.map +1 -0
  81. package/dist/src/models/ListWaaSEndpointDeliveries200Response.d.ts +34 -0
  82. package/dist/src/models/ListWaaSEndpointDeliveries200Response.d.ts.map +1 -0
  83. package/dist/src/models/ListWaaSEndpointDeliveries200Response.js +43 -0
  84. package/dist/src/models/ListWaaSEndpointDeliveries200Response.js.map +1 -0
  85. package/dist/src/models/ListWaaSEndpoints200Response.d.ts +34 -0
  86. package/dist/src/models/ListWaaSEndpoints200Response.d.ts.map +1 -0
  87. package/dist/src/models/ListWaaSEndpoints200Response.js +43 -0
  88. package/dist/src/models/ListWaaSEndpoints200Response.js.map +1 -0
  89. package/dist/src/models/ListWaaSEventTypes200Response.d.ts +34 -0
  90. package/dist/src/models/ListWaaSEventTypes200Response.d.ts.map +1 -0
  91. package/dist/src/models/ListWaaSEventTypes200Response.js +43 -0
  92. package/dist/src/models/ListWaaSEventTypes200Response.js.map +1 -0
  93. package/dist/src/models/PublishWaaSEvent201Response.d.ts +34 -0
  94. package/dist/src/models/PublishWaaSEvent201Response.d.ts.map +1 -0
  95. package/dist/src/models/PublishWaaSEvent201Response.js +43 -0
  96. package/dist/src/models/PublishWaaSEvent201Response.js.map +1 -0
  97. package/dist/src/models/UpdateWaaSApplicationRequest.d.ts +54 -0
  98. package/dist/src/models/UpdateWaaSApplicationRequest.d.ts.map +1 -0
  99. package/dist/src/models/UpdateWaaSApplicationRequest.js +54 -0
  100. package/dist/src/models/UpdateWaaSApplicationRequest.js.map +1 -0
  101. package/dist/src/models/UpdateWaaSEndpointRequest.d.ts +54 -0
  102. package/dist/src/models/UpdateWaaSEndpointRequest.d.ts.map +1 -0
  103. package/dist/src/models/UpdateWaaSEndpointRequest.js +54 -0
  104. package/dist/src/models/UpdateWaaSEndpointRequest.js.map +1 -0
  105. package/dist/src/models/UpdateWaaSEventTypeRequest.d.ts +51 -0
  106. package/dist/src/models/UpdateWaaSEventTypeRequest.d.ts.map +1 -0
  107. package/dist/src/models/UpdateWaaSEventTypeRequest.js +48 -0
  108. package/dist/src/models/UpdateWaaSEventTypeRequest.js.map +1 -0
  109. package/dist/src/models/WaaSApplication.d.ts +84 -0
  110. package/dist/src/models/WaaSApplication.d.ts.map +1 -0
  111. package/dist/src/models/WaaSApplication.js +64 -0
  112. package/dist/src/models/WaaSApplication.js.map +1 -0
  113. package/dist/src/models/WaaSBatchPublishRequest.d.ts +34 -0
  114. package/dist/src/models/WaaSBatchPublishRequest.d.ts.map +1 -0
  115. package/dist/src/models/WaaSBatchPublishRequest.js +45 -0
  116. package/dist/src/models/WaaSBatchPublishRequest.js.map +1 -0
  117. package/dist/src/models/WaaSBatchPublishResponse.d.ts +45 -0
  118. package/dist/src/models/WaaSBatchPublishResponse.d.ts.map +1 -0
  119. package/dist/src/models/WaaSBatchPublishResponse.js +46 -0
  120. package/dist/src/models/WaaSBatchPublishResponse.js.map +1 -0
  121. package/dist/src/models/WaaSDelivery.d.ts +105 -0
  122. package/dist/src/models/WaaSDelivery.d.ts.map +1 -0
  123. package/dist/src/models/WaaSDelivery.js +73 -0
  124. package/dist/src/models/WaaSDelivery.js.map +1 -0
  125. package/dist/src/models/WaaSEndpoint.d.ts +84 -0
  126. package/dist/src/models/WaaSEndpoint.d.ts.map +1 -0
  127. package/dist/src/models/WaaSEndpoint.js +64 -0
  128. package/dist/src/models/WaaSEndpoint.js.map +1 -0
  129. package/dist/src/models/WaaSEventType.d.ts +95 -0
  130. package/dist/src/models/WaaSEventType.d.ts.map +1 -0
  131. package/dist/src/models/WaaSEventType.js +67 -0
  132. package/dist/src/models/WaaSEventType.js.map +1 -0
  133. package/dist/src/models/WaaSPortalTokenRequest.d.ts +52 -0
  134. package/dist/src/models/WaaSPortalTokenRequest.d.ts.map +1 -0
  135. package/dist/src/models/WaaSPortalTokenRequest.js +51 -0
  136. package/dist/src/models/WaaSPortalTokenRequest.js.map +1 -0
  137. package/dist/src/models/WaaSPortalTokenRequestTheme.d.ts +47 -0
  138. package/dist/src/models/WaaSPortalTokenRequestTheme.d.ts.map +1 -0
  139. package/dist/src/models/WaaSPortalTokenRequestTheme.js +51 -0
  140. package/dist/src/models/WaaSPortalTokenRequestTheme.js.map +1 -0
  141. package/dist/src/models/WaaSPortalTokenResponse.d.ts +39 -0
  142. package/dist/src/models/WaaSPortalTokenResponse.d.ts.map +1 -0
  143. package/dist/src/models/WaaSPortalTokenResponse.js +44 -0
  144. package/dist/src/models/WaaSPortalTokenResponse.js.map +1 -0
  145. package/dist/src/models/WaaSPublishEventRequest.d.ts +51 -0
  146. package/dist/src/models/WaaSPublishEventRequest.d.ts.map +1 -0
  147. package/dist/src/models/WaaSPublishEventRequest.js +54 -0
  148. package/dist/src/models/WaaSPublishEventRequest.js.map +1 -0
  149. package/dist/src/models/WaaSPublishEventResponse.d.ts +57 -0
  150. package/dist/src/models/WaaSPublishEventResponse.d.ts.map +1 -0
  151. package/dist/src/models/WaaSPublishEventResponse.js +50 -0
  152. package/dist/src/models/WaaSPublishEventResponse.js.map +1 -0
  153. package/dist/src/models/WaaSUsageResponse.d.ts +63 -0
  154. package/dist/src/models/WaaSUsageResponse.d.ts.map +1 -0
  155. package/dist/src/models/WaaSUsageResponse.js +52 -0
  156. package/dist/src/models/WaaSUsageResponse.js.map +1 -0
  157. package/dist/src/models/index.d.ts +31 -0
  158. package/dist/src/models/index.d.ts.map +1 -1
  159. package/dist/src/models/index.js +31 -0
  160. package/dist/src/models/index.js.map +1 -1
  161. package/package.json +1 -1
  162. package/src/.openapi-generator/FILES +37 -0
  163. package/src/client.ts +24 -0
  164. package/src/src/apis/WaaSApplicationsApi.ts +438 -0
  165. package/src/src/apis/WaaSDeliveriesApi.ts +361 -0
  166. package/src/src/apis/WaaSEndpointsApi.ts +691 -0
  167. package/src/src/apis/WaaSEventTypesApi.ts +486 -0
  168. package/src/src/apis/WaaSEventsApi.ts +190 -0
  169. package/src/src/apis/WaaSPortalApi.ts +113 -0
  170. package/src/src/apis/index.ts +6 -0
  171. package/src/src/models/BatchPublishWaaSEvents201Response.ts +73 -0
  172. package/src/src/models/CreateWaaSApplication201Response.ts +73 -0
  173. package/src/src/models/CreateWaaSApplicationRequest.ts +83 -0
  174. package/src/src/models/CreateWaaSEndpoint201Response.ts +73 -0
  175. package/src/src/models/CreateWaaSEndpointRequest.ts +84 -0
  176. package/src/src/models/CreateWaaSEndpointResponse.ts +113 -0
  177. package/src/src/models/CreateWaaSEventType201Response.ts +73 -0
  178. package/src/src/models/CreateWaaSEventTypeRequest.ts +99 -0
  179. package/src/src/models/GenerateWaaSPortalToken201Response.ts +73 -0
  180. package/src/src/models/GetWaaSEndpoint200Response.ts +73 -0
  181. package/src/src/models/GetWaaSUsage200Response.ts +73 -0
  182. package/src/src/models/ListWaaSApplications200Response.ts +73 -0
  183. package/src/src/models/ListWaaSEndpointDeliveries200Response.ts +73 -0
  184. package/src/src/models/ListWaaSEndpoints200Response.ts +73 -0
  185. package/src/src/models/ListWaaSEventTypes200Response.ts +73 -0
  186. package/src/src/models/PublishWaaSEvent201Response.ts +73 -0
  187. package/src/src/models/UpdateWaaSApplicationRequest.ts +93 -0
  188. package/src/src/models/UpdateWaaSEndpointRequest.ts +93 -0
  189. package/src/src/models/UpdateWaaSEventTypeRequest.ts +89 -0
  190. package/src/src/models/WaaSApplication.ts +133 -0
  191. package/src/src/models/WaaSBatchPublishRequest.ts +74 -0
  192. package/src/src/models/WaaSBatchPublishResponse.ts +81 -0
  193. package/src/src/models/WaaSDelivery.ts +160 -0
  194. package/src/src/models/WaaSEndpoint.ts +133 -0
  195. package/src/src/models/WaaSEventType.ts +148 -0
  196. package/src/src/models/WaaSPortalTokenRequest.ts +98 -0
  197. package/src/src/models/WaaSPortalTokenRequestTheme.ts +84 -0
  198. package/src/src/models/WaaSPortalTokenResponse.ts +73 -0
  199. package/src/src/models/WaaSPublishEventRequest.ts +92 -0
  200. package/src/src/models/WaaSPublishEventResponse.ts +97 -0
  201. package/src/src/models/WaaSUsageResponse.ts +105 -0
  202. package/src/src/models/index.ts +31 -0
@@ -0,0 +1,486 @@
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 ## 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
+
16
+ import * as runtime from '../runtime';
17
+ import type {
18
+ CreateWaaSEventType201Response,
19
+ CreateWaaSEventTypeRequest,
20
+ ListWaaSEventTypes200Response,
21
+ UpdateWaaSEventTypeRequest,
22
+ } from '../models/index';
23
+ import {
24
+ CreateWaaSEventType201ResponseFromJSON,
25
+ CreateWaaSEventType201ResponseToJSON,
26
+ CreateWaaSEventTypeRequestFromJSON,
27
+ CreateWaaSEventTypeRequestToJSON,
28
+ ListWaaSEventTypes200ResponseFromJSON,
29
+ ListWaaSEventTypes200ResponseToJSON,
30
+ UpdateWaaSEventTypeRequestFromJSON,
31
+ UpdateWaaSEventTypeRequestToJSON,
32
+ } from '../models/index';
33
+
34
+ export interface WaaSEventTypesApiCreateWaaSEventTypeOperationRequest {
35
+ appId: string;
36
+ createWaaSEventTypeRequest: CreateWaaSEventTypeRequest;
37
+ }
38
+
39
+ export interface WaaSEventTypesApiDeleteWaaSEventTypeRequest {
40
+ appId: string;
41
+ eventTypeId: string;
42
+ }
43
+
44
+ export interface WaaSEventTypesApiDeprecateWaaSEventTypeRequest {
45
+ appId: string;
46
+ eventTypeId: string;
47
+ }
48
+
49
+ export interface WaaSEventTypesApiGetWaaSEventTypeRequest {
50
+ appId: string;
51
+ eventTypeId: string;
52
+ }
53
+
54
+ export interface WaaSEventTypesApiListWaaSEventTypesRequest {
55
+ appId: string;
56
+ limit?: number;
57
+ offset?: number;
58
+ category?: string;
59
+ status?: ListWaaSEventTypesStatusEnum;
60
+ }
61
+
62
+ export interface WaaSEventTypesApiUpdateWaaSEventTypeOperationRequest {
63
+ appId: string;
64
+ eventTypeId: string;
65
+ updateWaaSEventTypeRequest: UpdateWaaSEventTypeRequest;
66
+ }
67
+
68
+ /**
69
+ * WaaSEventTypesApi - interface
70
+ *
71
+ * @export
72
+ * @interface WaaSEventTypesApiInterface
73
+ */
74
+ export interface WaaSEventTypesApiInterface {
75
+ /**
76
+ * Register a new custom event type for a WaaS application.
77
+ * @summary Register an event type
78
+ * @param {string} appId
79
+ * @param {CreateWaaSEventTypeRequest} createWaaSEventTypeRequest
80
+ * @param {*} [options] Override http request option.
81
+ * @throws {RequiredError}
82
+ * @memberof WaaSEventTypesApiInterface
83
+ */
84
+ createWaaSEventTypeRaw(requestParameters: WaaSEventTypesApiCreateWaaSEventTypeOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CreateWaaSEventType201Response>>;
85
+
86
+ /**
87
+ * Register a new custom event type for a WaaS application.
88
+ * Register an event type
89
+ */
90
+ createWaaSEventType(appId: string, createWaaSEventTypeRequest: CreateWaaSEventTypeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CreateWaaSEventType201Response>;
91
+
92
+ /**
93
+ * Permanently delete an event type. Endpoints subscribed to this type will stop receiving deliveries.
94
+ * @summary Delete an event type
95
+ * @param {string} appId
96
+ * @param {string} eventTypeId
97
+ * @param {*} [options] Override http request option.
98
+ * @throws {RequiredError}
99
+ * @memberof WaaSEventTypesApiInterface
100
+ */
101
+ deleteWaaSEventTypeRaw(requestParameters: WaaSEventTypesApiDeleteWaaSEventTypeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
102
+
103
+ /**
104
+ * Permanently delete an event type. Endpoints subscribed to this type will stop receiving deliveries.
105
+ * Delete an event type
106
+ */
107
+ deleteWaaSEventType(appId: string, eventTypeId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
108
+
109
+ /**
110
+ * Mark an event type as deprecated. Existing subscriptions continue to receive deliveries, but new subscriptions are blocked.
111
+ * @summary Deprecate an event type
112
+ * @param {string} appId
113
+ * @param {string} eventTypeId
114
+ * @param {*} [options] Override http request option.
115
+ * @throws {RequiredError}
116
+ * @memberof WaaSEventTypesApiInterface
117
+ */
118
+ deprecateWaaSEventTypeRaw(requestParameters: WaaSEventTypesApiDeprecateWaaSEventTypeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
119
+
120
+ /**
121
+ * Mark an event type as deprecated. Existing subscriptions continue to receive deliveries, but new subscriptions are blocked.
122
+ * Deprecate an event type
123
+ */
124
+ deprecateWaaSEventType(appId: string, eventTypeId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
125
+
126
+ /**
127
+ *
128
+ * @summary Get an event type
129
+ * @param {string} appId
130
+ * @param {string} eventTypeId
131
+ * @param {*} [options] Override http request option.
132
+ * @throws {RequiredError}
133
+ * @memberof WaaSEventTypesApiInterface
134
+ */
135
+ getWaaSEventTypeRaw(requestParameters: WaaSEventTypesApiGetWaaSEventTypeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CreateWaaSEventType201Response>>;
136
+
137
+ /**
138
+ * Get an event type
139
+ */
140
+ getWaaSEventType(appId: string, eventTypeId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CreateWaaSEventType201Response>;
141
+
142
+ /**
143
+ * List all event types registered for a WaaS application.
144
+ * @summary List event types
145
+ * @param {string} appId
146
+ * @param {number} [limit]
147
+ * @param {number} [offset]
148
+ * @param {string} [category]
149
+ * @param {'active' | 'deprecated'} [status]
150
+ * @param {*} [options] Override http request option.
151
+ * @throws {RequiredError}
152
+ * @memberof WaaSEventTypesApiInterface
153
+ */
154
+ listWaaSEventTypesRaw(requestParameters: WaaSEventTypesApiListWaaSEventTypesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ListWaaSEventTypes200Response>>;
155
+
156
+ /**
157
+ * List all event types registered for a WaaS application.
158
+ * List event types
159
+ */
160
+ listWaaSEventTypes(appId: string, limit?: number, offset?: number, category?: string, status?: ListWaaSEventTypesStatusEnum, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ListWaaSEventTypes200Response>;
161
+
162
+ /**
163
+ *
164
+ * @summary Update an event type
165
+ * @param {string} appId
166
+ * @param {string} eventTypeId
167
+ * @param {UpdateWaaSEventTypeRequest} updateWaaSEventTypeRequest
168
+ * @param {*} [options] Override http request option.
169
+ * @throws {RequiredError}
170
+ * @memberof WaaSEventTypesApiInterface
171
+ */
172
+ updateWaaSEventTypeRaw(requestParameters: WaaSEventTypesApiUpdateWaaSEventTypeOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
173
+
174
+ /**
175
+ * Update an event type
176
+ */
177
+ updateWaaSEventType(appId: string, eventTypeId: string, updateWaaSEventTypeRequest: UpdateWaaSEventTypeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
178
+
179
+ }
180
+
181
+ /**
182
+ *
183
+ */
184
+ export class WaaSEventTypesApi extends runtime.BaseAPI implements WaaSEventTypesApiInterface {
185
+
186
+ /**
187
+ * Register a new custom event type for a WaaS application.
188
+ * Register an event type
189
+ */
190
+ async createWaaSEventTypeRaw(requestParameters: WaaSEventTypesApiCreateWaaSEventTypeOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CreateWaaSEventType201Response>> {
191
+ if (requestParameters['appId'] == null) {
192
+ throw new runtime.RequiredError(
193
+ 'appId',
194
+ 'Required parameter "appId" was null or undefined when calling createWaaSEventType().'
195
+ );
196
+ }
197
+
198
+ if (requestParameters['createWaaSEventTypeRequest'] == null) {
199
+ throw new runtime.RequiredError(
200
+ 'createWaaSEventTypeRequest',
201
+ 'Required parameter "createWaaSEventTypeRequest" was null or undefined when calling createWaaSEventType().'
202
+ );
203
+ }
204
+
205
+ const queryParameters: any = {};
206
+
207
+ const headerParameters: runtime.HTTPHeaders = {};
208
+
209
+ headerParameters['Content-Type'] = 'application/json';
210
+
211
+ if (this.configuration && this.configuration.apiKey) {
212
+ headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
213
+ }
214
+
215
+ const response = await this.request({
216
+ path: `/v1/waas/applications/{appId}/event-types`.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters['appId']))),
217
+ method: 'POST',
218
+ headers: headerParameters,
219
+ query: queryParameters,
220
+ body: CreateWaaSEventTypeRequestToJSON(requestParameters['createWaaSEventTypeRequest']),
221
+ }, initOverrides);
222
+
223
+ return new runtime.JSONApiResponse(response, (jsonValue) => CreateWaaSEventType201ResponseFromJSON(jsonValue));
224
+ }
225
+
226
+ /**
227
+ * Register a new custom event type for a WaaS application.
228
+ * Register an event type
229
+ */
230
+ async createWaaSEventType(appId: string, createWaaSEventTypeRequest: CreateWaaSEventTypeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CreateWaaSEventType201Response> {
231
+ const response = await this.createWaaSEventTypeRaw({ appId: appId, createWaaSEventTypeRequest: createWaaSEventTypeRequest }, initOverrides);
232
+ return await response.value();
233
+ }
234
+
235
+ /**
236
+ * Permanently delete an event type. Endpoints subscribed to this type will stop receiving deliveries.
237
+ * Delete an event type
238
+ */
239
+ async deleteWaaSEventTypeRaw(requestParameters: WaaSEventTypesApiDeleteWaaSEventTypeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
240
+ if (requestParameters['appId'] == null) {
241
+ throw new runtime.RequiredError(
242
+ 'appId',
243
+ 'Required parameter "appId" was null or undefined when calling deleteWaaSEventType().'
244
+ );
245
+ }
246
+
247
+ if (requestParameters['eventTypeId'] == null) {
248
+ throw new runtime.RequiredError(
249
+ 'eventTypeId',
250
+ 'Required parameter "eventTypeId" was null or undefined when calling deleteWaaSEventType().'
251
+ );
252
+ }
253
+
254
+ const queryParameters: any = {};
255
+
256
+ const headerParameters: runtime.HTTPHeaders = {};
257
+
258
+ if (this.configuration && this.configuration.apiKey) {
259
+ headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
260
+ }
261
+
262
+ const response = await this.request({
263
+ path: `/v1/waas/applications/{appId}/event-types/{eventTypeId}`.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters['appId']))).replace(`{${"eventTypeId"}}`, encodeURIComponent(String(requestParameters['eventTypeId']))),
264
+ method: 'DELETE',
265
+ headers: headerParameters,
266
+ query: queryParameters,
267
+ }, initOverrides);
268
+
269
+ return new runtime.VoidApiResponse(response);
270
+ }
271
+
272
+ /**
273
+ * Permanently delete an event type. Endpoints subscribed to this type will stop receiving deliveries.
274
+ * Delete an event type
275
+ */
276
+ async deleteWaaSEventType(appId: string, eventTypeId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
277
+ await this.deleteWaaSEventTypeRaw({ appId: appId, eventTypeId: eventTypeId }, initOverrides);
278
+ }
279
+
280
+ /**
281
+ * Mark an event type as deprecated. Existing subscriptions continue to receive deliveries, but new subscriptions are blocked.
282
+ * Deprecate an event type
283
+ */
284
+ async deprecateWaaSEventTypeRaw(requestParameters: WaaSEventTypesApiDeprecateWaaSEventTypeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
285
+ if (requestParameters['appId'] == null) {
286
+ throw new runtime.RequiredError(
287
+ 'appId',
288
+ 'Required parameter "appId" was null or undefined when calling deprecateWaaSEventType().'
289
+ );
290
+ }
291
+
292
+ if (requestParameters['eventTypeId'] == null) {
293
+ throw new runtime.RequiredError(
294
+ 'eventTypeId',
295
+ 'Required parameter "eventTypeId" was null or undefined when calling deprecateWaaSEventType().'
296
+ );
297
+ }
298
+
299
+ const queryParameters: any = {};
300
+
301
+ const headerParameters: runtime.HTTPHeaders = {};
302
+
303
+ if (this.configuration && this.configuration.apiKey) {
304
+ headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
305
+ }
306
+
307
+ const response = await this.request({
308
+ path: `/v1/waas/applications/{appId}/event-types/{eventTypeId}/deprecate`.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters['appId']))).replace(`{${"eventTypeId"}}`, encodeURIComponent(String(requestParameters['eventTypeId']))),
309
+ method: 'POST',
310
+ headers: headerParameters,
311
+ query: queryParameters,
312
+ }, initOverrides);
313
+
314
+ return new runtime.VoidApiResponse(response);
315
+ }
316
+
317
+ /**
318
+ * Mark an event type as deprecated. Existing subscriptions continue to receive deliveries, but new subscriptions are blocked.
319
+ * Deprecate an event type
320
+ */
321
+ async deprecateWaaSEventType(appId: string, eventTypeId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
322
+ await this.deprecateWaaSEventTypeRaw({ appId: appId, eventTypeId: eventTypeId }, initOverrides);
323
+ }
324
+
325
+ /**
326
+ * Get an event type
327
+ */
328
+ async getWaaSEventTypeRaw(requestParameters: WaaSEventTypesApiGetWaaSEventTypeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CreateWaaSEventType201Response>> {
329
+ if (requestParameters['appId'] == null) {
330
+ throw new runtime.RequiredError(
331
+ 'appId',
332
+ 'Required parameter "appId" was null or undefined when calling getWaaSEventType().'
333
+ );
334
+ }
335
+
336
+ if (requestParameters['eventTypeId'] == null) {
337
+ throw new runtime.RequiredError(
338
+ 'eventTypeId',
339
+ 'Required parameter "eventTypeId" was null or undefined when calling getWaaSEventType().'
340
+ );
341
+ }
342
+
343
+ const queryParameters: any = {};
344
+
345
+ const headerParameters: runtime.HTTPHeaders = {};
346
+
347
+ if (this.configuration && this.configuration.apiKey) {
348
+ headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
349
+ }
350
+
351
+ const response = await this.request({
352
+ path: `/v1/waas/applications/{appId}/event-types/{eventTypeId}`.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters['appId']))).replace(`{${"eventTypeId"}}`, encodeURIComponent(String(requestParameters['eventTypeId']))),
353
+ method: 'GET',
354
+ headers: headerParameters,
355
+ query: queryParameters,
356
+ }, initOverrides);
357
+
358
+ return new runtime.JSONApiResponse(response, (jsonValue) => CreateWaaSEventType201ResponseFromJSON(jsonValue));
359
+ }
360
+
361
+ /**
362
+ * Get an event type
363
+ */
364
+ async getWaaSEventType(appId: string, eventTypeId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CreateWaaSEventType201Response> {
365
+ const response = await this.getWaaSEventTypeRaw({ appId: appId, eventTypeId: eventTypeId }, initOverrides);
366
+ return await response.value();
367
+ }
368
+
369
+ /**
370
+ * List all event types registered for a WaaS application.
371
+ * List event types
372
+ */
373
+ async listWaaSEventTypesRaw(requestParameters: WaaSEventTypesApiListWaaSEventTypesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ListWaaSEventTypes200Response>> {
374
+ if (requestParameters['appId'] == null) {
375
+ throw new runtime.RequiredError(
376
+ 'appId',
377
+ 'Required parameter "appId" was null or undefined when calling listWaaSEventTypes().'
378
+ );
379
+ }
380
+
381
+ const queryParameters: any = {};
382
+
383
+ if (requestParameters['limit'] != null) {
384
+ queryParameters['limit'] = requestParameters['limit'];
385
+ }
386
+
387
+ if (requestParameters['offset'] != null) {
388
+ queryParameters['offset'] = requestParameters['offset'];
389
+ }
390
+
391
+ if (requestParameters['category'] != null) {
392
+ queryParameters['category'] = requestParameters['category'];
393
+ }
394
+
395
+ if (requestParameters['status'] != null) {
396
+ queryParameters['status'] = requestParameters['status'];
397
+ }
398
+
399
+ const headerParameters: runtime.HTTPHeaders = {};
400
+
401
+ if (this.configuration && this.configuration.apiKey) {
402
+ headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
403
+ }
404
+
405
+ const response = await this.request({
406
+ path: `/v1/waas/applications/{appId}/event-types`.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters['appId']))),
407
+ method: 'GET',
408
+ headers: headerParameters,
409
+ query: queryParameters,
410
+ }, initOverrides);
411
+
412
+ return new runtime.JSONApiResponse(response, (jsonValue) => ListWaaSEventTypes200ResponseFromJSON(jsonValue));
413
+ }
414
+
415
+ /**
416
+ * List all event types registered for a WaaS application.
417
+ * List event types
418
+ */
419
+ async listWaaSEventTypes(appId: string, limit?: number, offset?: number, category?: string, status?: ListWaaSEventTypesStatusEnum, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ListWaaSEventTypes200Response> {
420
+ const response = await this.listWaaSEventTypesRaw({ appId: appId, limit: limit, offset: offset, category: category, status: status }, initOverrides);
421
+ return await response.value();
422
+ }
423
+
424
+ /**
425
+ * Update an event type
426
+ */
427
+ async updateWaaSEventTypeRaw(requestParameters: WaaSEventTypesApiUpdateWaaSEventTypeOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
428
+ if (requestParameters['appId'] == null) {
429
+ throw new runtime.RequiredError(
430
+ 'appId',
431
+ 'Required parameter "appId" was null or undefined when calling updateWaaSEventType().'
432
+ );
433
+ }
434
+
435
+ if (requestParameters['eventTypeId'] == null) {
436
+ throw new runtime.RequiredError(
437
+ 'eventTypeId',
438
+ 'Required parameter "eventTypeId" was null or undefined when calling updateWaaSEventType().'
439
+ );
440
+ }
441
+
442
+ if (requestParameters['updateWaaSEventTypeRequest'] == null) {
443
+ throw new runtime.RequiredError(
444
+ 'updateWaaSEventTypeRequest',
445
+ 'Required parameter "updateWaaSEventTypeRequest" was null or undefined when calling updateWaaSEventType().'
446
+ );
447
+ }
448
+
449
+ const queryParameters: any = {};
450
+
451
+ const headerParameters: runtime.HTTPHeaders = {};
452
+
453
+ headerParameters['Content-Type'] = 'application/json';
454
+
455
+ if (this.configuration && this.configuration.apiKey) {
456
+ headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
457
+ }
458
+
459
+ const response = await this.request({
460
+ path: `/v1/waas/applications/{appId}/event-types/{eventTypeId}`.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters['appId']))).replace(`{${"eventTypeId"}}`, encodeURIComponent(String(requestParameters['eventTypeId']))),
461
+ method: 'PUT',
462
+ headers: headerParameters,
463
+ query: queryParameters,
464
+ body: UpdateWaaSEventTypeRequestToJSON(requestParameters['updateWaaSEventTypeRequest']),
465
+ }, initOverrides);
466
+
467
+ return new runtime.VoidApiResponse(response);
468
+ }
469
+
470
+ /**
471
+ * Update an event type
472
+ */
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);
475
+ }
476
+
477
+ }
478
+
479
+ /**
480
+ * @export
481
+ */
482
+ export const ListWaaSEventTypesStatusEnum = {
483
+ ACTIVE: 'active',
484
+ DEPRECATED: 'deprecated'
485
+ } as const;
486
+ export type ListWaaSEventTypesStatusEnum = typeof ListWaaSEventTypesStatusEnum[keyof typeof ListWaaSEventTypesStatusEnum];
@@ -0,0 +1,190 @@
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 ## 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
+
16
+ import * as runtime from '../runtime';
17
+ import type {
18
+ BatchPublishWaaSEvents201Response,
19
+ PublishWaaSEvent201Response,
20
+ WaaSBatchPublishRequest,
21
+ WaaSPublishEventRequest,
22
+ } from '../models/index';
23
+ import {
24
+ BatchPublishWaaSEvents201ResponseFromJSON,
25
+ BatchPublishWaaSEvents201ResponseToJSON,
26
+ PublishWaaSEvent201ResponseFromJSON,
27
+ PublishWaaSEvent201ResponseToJSON,
28
+ WaaSBatchPublishRequestFromJSON,
29
+ WaaSBatchPublishRequestToJSON,
30
+ WaaSPublishEventRequestFromJSON,
31
+ WaaSPublishEventRequestToJSON,
32
+ } from '../models/index';
33
+
34
+ export interface WaaSEventsApiBatchPublishWaaSEventsRequest {
35
+ appId: string;
36
+ waaSBatchPublishRequest: WaaSBatchPublishRequest;
37
+ }
38
+
39
+ export interface WaaSEventsApiPublishWaaSEventRequest {
40
+ appId: string;
41
+ waaSPublishEventRequest: WaaSPublishEventRequest;
42
+ }
43
+
44
+ /**
45
+ * WaaSEventsApi - interface
46
+ *
47
+ * @export
48
+ * @interface WaaSEventsApiInterface
49
+ */
50
+ export interface WaaSEventsApiInterface {
51
+ /**
52
+ * Publish up to 100 events in a single request. Requires Starter plan or higher.
53
+ * @summary Batch publish events
54
+ * @param {string} appId
55
+ * @param {WaaSBatchPublishRequest} waaSBatchPublishRequest
56
+ * @param {*} [options] Override http request option.
57
+ * @throws {RequiredError}
58
+ * @memberof WaaSEventsApiInterface
59
+ */
60
+ batchPublishWaaSEventsRaw(requestParameters: WaaSEventsApiBatchPublishWaaSEventsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<BatchPublishWaaSEvents201Response>>;
61
+
62
+ /**
63
+ * Publish up to 100 events in a single request. Requires Starter plan or higher.
64
+ * Batch publish events
65
+ */
66
+ batchPublishWaaSEvents(appId: string, waaSBatchPublishRequest: WaaSBatchPublishRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<BatchPublishWaaSEvents201Response>;
67
+
68
+ /**
69
+ * Publish an event to all subscribed endpoints for the specified tenant. Zyphr creates delivery records and queues them for delivery.
70
+ * @summary Publish an event
71
+ * @param {string} appId
72
+ * @param {WaaSPublishEventRequest} waaSPublishEventRequest
73
+ * @param {*} [options] Override http request option.
74
+ * @throws {RequiredError}
75
+ * @memberof WaaSEventsApiInterface
76
+ */
77
+ publishWaaSEventRaw(requestParameters: WaaSEventsApiPublishWaaSEventRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PublishWaaSEvent201Response>>;
78
+
79
+ /**
80
+ * Publish an event to all subscribed endpoints for the specified tenant. Zyphr creates delivery records and queues them for delivery.
81
+ * Publish an event
82
+ */
83
+ publishWaaSEvent(appId: string, waaSPublishEventRequest: WaaSPublishEventRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PublishWaaSEvent201Response>;
84
+
85
+ }
86
+
87
+ /**
88
+ *
89
+ */
90
+ export class WaaSEventsApi extends runtime.BaseAPI implements WaaSEventsApiInterface {
91
+
92
+ /**
93
+ * Publish up to 100 events in a single request. Requires Starter plan or higher.
94
+ * Batch publish events
95
+ */
96
+ async batchPublishWaaSEventsRaw(requestParameters: WaaSEventsApiBatchPublishWaaSEventsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<BatchPublishWaaSEvents201Response>> {
97
+ if (requestParameters['appId'] == null) {
98
+ throw new runtime.RequiredError(
99
+ 'appId',
100
+ 'Required parameter "appId" was null or undefined when calling batchPublishWaaSEvents().'
101
+ );
102
+ }
103
+
104
+ if (requestParameters['waaSBatchPublishRequest'] == null) {
105
+ throw new runtime.RequiredError(
106
+ 'waaSBatchPublishRequest',
107
+ 'Required parameter "waaSBatchPublishRequest" was null or undefined when calling batchPublishWaaSEvents().'
108
+ );
109
+ }
110
+
111
+ const queryParameters: any = {};
112
+
113
+ const headerParameters: runtime.HTTPHeaders = {};
114
+
115
+ headerParameters['Content-Type'] = 'application/json';
116
+
117
+ if (this.configuration && this.configuration.apiKey) {
118
+ headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
119
+ }
120
+
121
+ const response = await this.request({
122
+ path: `/v1/waas/applications/{appId}/events/batch`.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters['appId']))),
123
+ method: 'POST',
124
+ headers: headerParameters,
125
+ query: queryParameters,
126
+ body: WaaSBatchPublishRequestToJSON(requestParameters['waaSBatchPublishRequest']),
127
+ }, initOverrides);
128
+
129
+ return new runtime.JSONApiResponse(response, (jsonValue) => BatchPublishWaaSEvents201ResponseFromJSON(jsonValue));
130
+ }
131
+
132
+ /**
133
+ * Publish up to 100 events in a single request. Requires Starter plan or higher.
134
+ * Batch publish events
135
+ */
136
+ async batchPublishWaaSEvents(appId: string, waaSBatchPublishRequest: WaaSBatchPublishRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<BatchPublishWaaSEvents201Response> {
137
+ const response = await this.batchPublishWaaSEventsRaw({ appId: appId, waaSBatchPublishRequest: waaSBatchPublishRequest }, initOverrides);
138
+ return await response.value();
139
+ }
140
+
141
+ /**
142
+ * Publish an event to all subscribed endpoints for the specified tenant. Zyphr creates delivery records and queues them for delivery.
143
+ * Publish an event
144
+ */
145
+ async publishWaaSEventRaw(requestParameters: WaaSEventsApiPublishWaaSEventRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PublishWaaSEvent201Response>> {
146
+ if (requestParameters['appId'] == null) {
147
+ throw new runtime.RequiredError(
148
+ 'appId',
149
+ 'Required parameter "appId" was null or undefined when calling publishWaaSEvent().'
150
+ );
151
+ }
152
+
153
+ if (requestParameters['waaSPublishEventRequest'] == null) {
154
+ throw new runtime.RequiredError(
155
+ 'waaSPublishEventRequest',
156
+ 'Required parameter "waaSPublishEventRequest" was null or undefined when calling publishWaaSEvent().'
157
+ );
158
+ }
159
+
160
+ const queryParameters: any = {};
161
+
162
+ const headerParameters: runtime.HTTPHeaders = {};
163
+
164
+ headerParameters['Content-Type'] = 'application/json';
165
+
166
+ if (this.configuration && this.configuration.apiKey) {
167
+ headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
168
+ }
169
+
170
+ const response = await this.request({
171
+ path: `/v1/waas/applications/{appId}/events`.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters['appId']))),
172
+ method: 'POST',
173
+ headers: headerParameters,
174
+ query: queryParameters,
175
+ body: WaaSPublishEventRequestToJSON(requestParameters['waaSPublishEventRequest']),
176
+ }, initOverrides);
177
+
178
+ return new runtime.JSONApiResponse(response, (jsonValue) => PublishWaaSEvent201ResponseFromJSON(jsonValue));
179
+ }
180
+
181
+ /**
182
+ * Publish an event to all subscribed endpoints for the specified tenant. Zyphr creates delivery records and queues them for delivery.
183
+ * Publish an event
184
+ */
185
+ async publishWaaSEvent(appId: string, waaSPublishEventRequest: WaaSPublishEventRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PublishWaaSEvent201Response> {
186
+ const response = await this.publishWaaSEventRaw({ appId: appId, waaSPublishEventRequest: waaSPublishEventRequest }, initOverrides);
187
+ return await response.value();
188
+ }
189
+
190
+ }