@zyphr-dev/node-sdk 0.1.56 → 0.1.58
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.
- package/dist/index.cjs +1879 -317
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +8 -10
- package/dist/index.d.ts +8 -10
- package/dist/index.js +1879 -317
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/clientAuth.ts +15 -4
- package/src/src/apis/AuthApplicationApi.ts +32 -4
- package/src/src/apis/AuthEmailOTPApi.ts +72 -9
- package/src/src/apis/AuthEmailTemplatesApi.ts +160 -20
- package/src/src/apis/AuthEmailVerificationApi.ts +52 -10
- package/src/src/apis/AuthLoginApi.ts +16 -2
- package/src/src/apis/AuthMFAApi.ts +112 -14
- package/src/src/apis/AuthMagicLinksApi.ts +32 -4
- package/src/src/apis/AuthOAuthApi.ts +88 -11
- package/src/src/apis/AuthOrganizationsApi.ts +176 -22
- package/src/src/apis/AuthPasswordResetApi.ts +48 -6
- package/src/src/apis/AuthPhoneApi.ts +72 -9
- package/src/src/apis/AuthRegistrationApi.ts +40 -5
- package/src/src/apis/AuthSessionsApi.ts +56 -7
- package/src/src/apis/AuthUserDirectoryApi.ts +144 -18
- package/src/src/apis/AuthUserProfileApi.ts +32 -4
- package/src/src/apis/AuthWebAuthnApi.ts +96 -12
- package/src/src/apis/DevicesApi.ts +52 -10
- package/src/src/apis/DomainsApi.ts +56 -7
- package/src/src/apis/EmailsApi.ts +48 -6
- package/src/src/apis/ExecutionsApi.ts +24 -3
- package/src/src/apis/InboundEmailApi.ts +24 -3
- package/src/src/apis/InboxApi.ts +88 -11
- package/src/src/apis/PushApi.ts +72 -9
- package/src/src/apis/SMSApi.ts +80 -10
- package/src/src/apis/SlackApi.ts +24 -3
- package/src/src/apis/SubscribersApi.ts +160 -20
- package/src/src/apis/TemplatesApi.ts +48 -6
- package/src/src/apis/TopicsApi.ts +72 -9
- package/src/src/apis/UtilityApi.ts +16 -2
- package/src/src/apis/WaaSApplicationsApi.ts +48 -6
- package/src/src/apis/WaaSDeliveriesApi.ts +32 -4
- package/src/src/apis/WaaSEndpointsApi.ts +72 -9
- package/src/src/apis/WaaSEventTypesApi.ts +48 -6
- package/src/src/apis/WaaSEventsApi.ts +16 -2
- package/src/src/apis/WaaSPortalApi.ts +8 -1
- package/src/src/apis/WebhooksApi.ts +176 -22
- package/src/src/apis/WorkflowsApi.ts +96 -12
package/package.json
CHANGED
package/src/clientAuth.ts
CHANGED
|
@@ -49,7 +49,6 @@ import {
|
|
|
49
49
|
AuthSessionsApi,
|
|
50
50
|
AuthUserProfileApi,
|
|
51
51
|
AuthWebAuthnApi,
|
|
52
|
-
DevicesApi,
|
|
53
52
|
UtilityApi,
|
|
54
53
|
} from './src/apis/index.js';
|
|
55
54
|
import { parseErrorResponse } from './errors.js';
|
|
@@ -136,8 +135,21 @@ export class ZyphrClient {
|
|
|
136
135
|
readonly webauthn: AuthWebAuthnApi;
|
|
137
136
|
};
|
|
138
137
|
|
|
139
|
-
|
|
140
|
-
|
|
138
|
+
// NOTE: `devices` is deliberately NOT exposed here (sc-8045).
|
|
139
|
+
//
|
|
140
|
+
// The device API authenticates with the account-scoped secret key
|
|
141
|
+
// (`X-API-Key`), which must never ship inside a client bundle. ZyphrClient
|
|
142
|
+
// only ever resolves the publishable `X-Application-Key`, so every call
|
|
143
|
+
// sent an empty `X-API-Key` header and could only ever 401.
|
|
144
|
+
//
|
|
145
|
+
// Register devices from your own backend with the server-side `Zyphr`
|
|
146
|
+
// client instead:
|
|
147
|
+
//
|
|
148
|
+
// const zyphr = new Zyphr({ apiKey: process.env.ZYPHR_API_KEY });
|
|
149
|
+
// await zyphr.devices.registerDevice({ userId, platform, token });
|
|
150
|
+
//
|
|
151
|
+
// Derive `userId` from your authenticated session server-side — never from
|
|
152
|
+
// client-supplied input.
|
|
141
153
|
|
|
142
154
|
/**
|
|
143
155
|
* Utility endpoints that are publishable-key-safe: the application's password
|
|
@@ -203,7 +215,6 @@ export class ZyphrClient {
|
|
|
203
215
|
profile: new AuthUserProfileApi(config),
|
|
204
216
|
webauthn: new AuthWebAuthnApi(config),
|
|
205
217
|
};
|
|
206
|
-
this.devices = new DevicesApi(config);
|
|
207
218
|
this.utility = new UtilityApi(config);
|
|
208
219
|
}
|
|
209
220
|
|
|
@@ -150,11 +150,25 @@ export class AuthApplicationApi extends runtime.BaseAPI implements AuthApplicati
|
|
|
150
150
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
151
151
|
|
|
152
152
|
if (this.configuration && this.configuration.apiKey) {
|
|
153
|
-
|
|
153
|
+
// An unresolved credential must produce NO header, not an empty one (sc-8162).
|
|
154
|
+
{
|
|
155
|
+
const apiKeyValue = await this.configuration.apiKey("X-Application-Secret"); // ApplicationSecret authentication
|
|
156
|
+
|
|
157
|
+
if (apiKeyValue) {
|
|
158
|
+
headerParameters["X-Application-Secret"] = apiKeyValue;
|
|
159
|
+
}
|
|
160
|
+
}
|
|
154
161
|
}
|
|
155
162
|
|
|
156
163
|
if (this.configuration && this.configuration.apiKey) {
|
|
157
|
-
|
|
164
|
+
// An unresolved credential must produce NO header, not an empty one (sc-8162).
|
|
165
|
+
{
|
|
166
|
+
const apiKeyValue = await this.configuration.apiKey("X-Application-Key"); // ApplicationPublicKey authentication
|
|
167
|
+
|
|
168
|
+
if (apiKeyValue) {
|
|
169
|
+
headerParameters["X-Application-Key"] = apiKeyValue;
|
|
170
|
+
}
|
|
171
|
+
}
|
|
158
172
|
}
|
|
159
173
|
|
|
160
174
|
const response = await this.request({
|
|
@@ -195,11 +209,25 @@ export class AuthApplicationApi extends runtime.BaseAPI implements AuthApplicati
|
|
|
195
209
|
headerParameters['Content-Type'] = 'application/json';
|
|
196
210
|
|
|
197
211
|
if (this.configuration && this.configuration.apiKey) {
|
|
198
|
-
|
|
212
|
+
// An unresolved credential must produce NO header, not an empty one (sc-8162).
|
|
213
|
+
{
|
|
214
|
+
const apiKeyValue = await this.configuration.apiKey("X-Application-Secret"); // ApplicationSecret authentication
|
|
215
|
+
|
|
216
|
+
if (apiKeyValue) {
|
|
217
|
+
headerParameters["X-Application-Secret"] = apiKeyValue;
|
|
218
|
+
}
|
|
219
|
+
}
|
|
199
220
|
}
|
|
200
221
|
|
|
201
222
|
if (this.configuration && this.configuration.apiKey) {
|
|
202
|
-
|
|
223
|
+
// An unresolved credential must produce NO header, not an empty one (sc-8162).
|
|
224
|
+
{
|
|
225
|
+
const apiKeyValue = await this.configuration.apiKey("X-Application-Key"); // ApplicationPublicKey authentication
|
|
226
|
+
|
|
227
|
+
if (apiKeyValue) {
|
|
228
|
+
headerParameters["X-Application-Key"] = apiKeyValue;
|
|
229
|
+
}
|
|
230
|
+
}
|
|
203
231
|
}
|
|
204
232
|
|
|
205
233
|
const response = await this.request({
|
|
@@ -162,7 +162,14 @@ export class AuthEmailOTPApi extends runtime.BaseAPI implements AuthEmailOTPApiI
|
|
|
162
162
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
163
163
|
|
|
164
164
|
if (this.configuration && this.configuration.apiKey) {
|
|
165
|
-
|
|
165
|
+
// An unresolved credential must produce NO header, not an empty one (sc-8162).
|
|
166
|
+
{
|
|
167
|
+
const apiKeyValue = await this.configuration.apiKey("X-Application-Key"); // ApplicationPublicKey authentication
|
|
168
|
+
|
|
169
|
+
if (apiKeyValue) {
|
|
170
|
+
headerParameters["X-Application-Key"] = apiKeyValue;
|
|
171
|
+
}
|
|
172
|
+
}
|
|
166
173
|
}
|
|
167
174
|
|
|
168
175
|
const response = await this.request({
|
|
@@ -203,11 +210,25 @@ export class AuthEmailOTPApi extends runtime.BaseAPI implements AuthEmailOTPApiI
|
|
|
203
210
|
headerParameters['Content-Type'] = 'application/json';
|
|
204
211
|
|
|
205
212
|
if (this.configuration && this.configuration.apiKey) {
|
|
206
|
-
|
|
213
|
+
// An unresolved credential must produce NO header, not an empty one (sc-8162).
|
|
214
|
+
{
|
|
215
|
+
const apiKeyValue = await this.configuration.apiKey("X-Application-Secret"); // ApplicationSecret authentication
|
|
216
|
+
|
|
217
|
+
if (apiKeyValue) {
|
|
218
|
+
headerParameters["X-Application-Secret"] = apiKeyValue;
|
|
219
|
+
}
|
|
220
|
+
}
|
|
207
221
|
}
|
|
208
222
|
|
|
209
223
|
if (this.configuration && this.configuration.apiKey) {
|
|
210
|
-
|
|
224
|
+
// An unresolved credential must produce NO header, not an empty one (sc-8162).
|
|
225
|
+
{
|
|
226
|
+
const apiKeyValue = await this.configuration.apiKey("X-Application-Key"); // ApplicationPublicKey authentication
|
|
227
|
+
|
|
228
|
+
if (apiKeyValue) {
|
|
229
|
+
headerParameters["X-Application-Key"] = apiKeyValue;
|
|
230
|
+
}
|
|
231
|
+
}
|
|
211
232
|
}
|
|
212
233
|
|
|
213
234
|
const response = await this.request({
|
|
@@ -249,11 +270,25 @@ export class AuthEmailOTPApi extends runtime.BaseAPI implements AuthEmailOTPApiI
|
|
|
249
270
|
headerParameters['Content-Type'] = 'application/json';
|
|
250
271
|
|
|
251
272
|
if (this.configuration && this.configuration.apiKey) {
|
|
252
|
-
|
|
273
|
+
// An unresolved credential must produce NO header, not an empty one (sc-8162).
|
|
274
|
+
{
|
|
275
|
+
const apiKeyValue = await this.configuration.apiKey("X-Application-Secret"); // ApplicationSecret authentication
|
|
276
|
+
|
|
277
|
+
if (apiKeyValue) {
|
|
278
|
+
headerParameters["X-Application-Secret"] = apiKeyValue;
|
|
279
|
+
}
|
|
280
|
+
}
|
|
253
281
|
}
|
|
254
282
|
|
|
255
283
|
if (this.configuration && this.configuration.apiKey) {
|
|
256
|
-
|
|
284
|
+
// An unresolved credential must produce NO header, not an empty one (sc-8162).
|
|
285
|
+
{
|
|
286
|
+
const apiKeyValue = await this.configuration.apiKey("X-Application-Key"); // ApplicationPublicKey authentication
|
|
287
|
+
|
|
288
|
+
if (apiKeyValue) {
|
|
289
|
+
headerParameters["X-Application-Key"] = apiKeyValue;
|
|
290
|
+
}
|
|
291
|
+
}
|
|
257
292
|
}
|
|
258
293
|
|
|
259
294
|
const response = await this.request({
|
|
@@ -295,11 +330,25 @@ export class AuthEmailOTPApi extends runtime.BaseAPI implements AuthEmailOTPApiI
|
|
|
295
330
|
headerParameters['Content-Type'] = 'application/json';
|
|
296
331
|
|
|
297
332
|
if (this.configuration && this.configuration.apiKey) {
|
|
298
|
-
|
|
333
|
+
// An unresolved credential must produce NO header, not an empty one (sc-8162).
|
|
334
|
+
{
|
|
335
|
+
const apiKeyValue = await this.configuration.apiKey("X-Application-Secret"); // ApplicationSecret authentication
|
|
336
|
+
|
|
337
|
+
if (apiKeyValue) {
|
|
338
|
+
headerParameters["X-Application-Secret"] = apiKeyValue;
|
|
339
|
+
}
|
|
340
|
+
}
|
|
299
341
|
}
|
|
300
342
|
|
|
301
343
|
if (this.configuration && this.configuration.apiKey) {
|
|
302
|
-
|
|
344
|
+
// An unresolved credential must produce NO header, not an empty one (sc-8162).
|
|
345
|
+
{
|
|
346
|
+
const apiKeyValue = await this.configuration.apiKey("X-Application-Key"); // ApplicationPublicKey authentication
|
|
347
|
+
|
|
348
|
+
if (apiKeyValue) {
|
|
349
|
+
headerParameters["X-Application-Key"] = apiKeyValue;
|
|
350
|
+
}
|
|
351
|
+
}
|
|
303
352
|
}
|
|
304
353
|
|
|
305
354
|
const response = await this.request({
|
|
@@ -341,11 +390,25 @@ export class AuthEmailOTPApi extends runtime.BaseAPI implements AuthEmailOTPApiI
|
|
|
341
390
|
headerParameters['Content-Type'] = 'application/json';
|
|
342
391
|
|
|
343
392
|
if (this.configuration && this.configuration.apiKey) {
|
|
344
|
-
|
|
393
|
+
// An unresolved credential must produce NO header, not an empty one (sc-8162).
|
|
394
|
+
{
|
|
395
|
+
const apiKeyValue = await this.configuration.apiKey("X-Application-Secret"); // ApplicationSecret authentication
|
|
396
|
+
|
|
397
|
+
if (apiKeyValue) {
|
|
398
|
+
headerParameters["X-Application-Secret"] = apiKeyValue;
|
|
399
|
+
}
|
|
400
|
+
}
|
|
345
401
|
}
|
|
346
402
|
|
|
347
403
|
if (this.configuration && this.configuration.apiKey) {
|
|
348
|
-
|
|
404
|
+
// An unresolved credential must produce NO header, not an empty one (sc-8162).
|
|
405
|
+
{
|
|
406
|
+
const apiKeyValue = await this.configuration.apiKey("X-Application-Key"); // ApplicationPublicKey authentication
|
|
407
|
+
|
|
408
|
+
if (apiKeyValue) {
|
|
409
|
+
headerParameters["X-Application-Key"] = apiKeyValue;
|
|
410
|
+
}
|
|
411
|
+
}
|
|
349
412
|
}
|
|
350
413
|
|
|
351
414
|
const response = await this.request({
|
|
@@ -299,11 +299,25 @@ export class AuthEmailTemplatesApi extends runtime.BaseAPI implements AuthEmailT
|
|
|
299
299
|
headerParameters['Content-Type'] = 'application/json';
|
|
300
300
|
|
|
301
301
|
if (this.configuration && this.configuration.apiKey) {
|
|
302
|
-
|
|
302
|
+
// An unresolved credential must produce NO header, not an empty one (sc-8162).
|
|
303
|
+
{
|
|
304
|
+
const apiKeyValue = await this.configuration.apiKey("X-Application-Secret"); // ApplicationSecret authentication
|
|
305
|
+
|
|
306
|
+
if (apiKeyValue) {
|
|
307
|
+
headerParameters["X-Application-Secret"] = apiKeyValue;
|
|
308
|
+
}
|
|
309
|
+
}
|
|
303
310
|
}
|
|
304
311
|
|
|
305
312
|
if (this.configuration && this.configuration.apiKey) {
|
|
306
|
-
|
|
313
|
+
// An unresolved credential must produce NO header, not an empty one (sc-8162).
|
|
314
|
+
{
|
|
315
|
+
const apiKeyValue = await this.configuration.apiKey("X-Application-Key"); // ApplicationPublicKey authentication
|
|
316
|
+
|
|
317
|
+
if (apiKeyValue) {
|
|
318
|
+
headerParameters["X-Application-Key"] = apiKeyValue;
|
|
319
|
+
}
|
|
320
|
+
}
|
|
307
321
|
}
|
|
308
322
|
|
|
309
323
|
const response = await this.request({
|
|
@@ -343,11 +357,25 @@ export class AuthEmailTemplatesApi extends runtime.BaseAPI implements AuthEmailT
|
|
|
343
357
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
344
358
|
|
|
345
359
|
if (this.configuration && this.configuration.apiKey) {
|
|
346
|
-
|
|
360
|
+
// An unresolved credential must produce NO header, not an empty one (sc-8162).
|
|
361
|
+
{
|
|
362
|
+
const apiKeyValue = await this.configuration.apiKey("X-Application-Secret"); // ApplicationSecret authentication
|
|
363
|
+
|
|
364
|
+
if (apiKeyValue) {
|
|
365
|
+
headerParameters["X-Application-Secret"] = apiKeyValue;
|
|
366
|
+
}
|
|
367
|
+
}
|
|
347
368
|
}
|
|
348
369
|
|
|
349
370
|
if (this.configuration && this.configuration.apiKey) {
|
|
350
|
-
|
|
371
|
+
// An unresolved credential must produce NO header, not an empty one (sc-8162).
|
|
372
|
+
{
|
|
373
|
+
const apiKeyValue = await this.configuration.apiKey("X-Application-Key"); // ApplicationPublicKey authentication
|
|
374
|
+
|
|
375
|
+
if (apiKeyValue) {
|
|
376
|
+
headerParameters["X-Application-Key"] = apiKeyValue;
|
|
377
|
+
}
|
|
378
|
+
}
|
|
351
379
|
}
|
|
352
380
|
|
|
353
381
|
const response = await this.request({
|
|
@@ -386,11 +414,25 @@ export class AuthEmailTemplatesApi extends runtime.BaseAPI implements AuthEmailT
|
|
|
386
414
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
387
415
|
|
|
388
416
|
if (this.configuration && this.configuration.apiKey) {
|
|
389
|
-
|
|
417
|
+
// An unresolved credential must produce NO header, not an empty one (sc-8162).
|
|
418
|
+
{
|
|
419
|
+
const apiKeyValue = await this.configuration.apiKey("X-Application-Secret"); // ApplicationSecret authentication
|
|
420
|
+
|
|
421
|
+
if (apiKeyValue) {
|
|
422
|
+
headerParameters["X-Application-Secret"] = apiKeyValue;
|
|
423
|
+
}
|
|
424
|
+
}
|
|
390
425
|
}
|
|
391
426
|
|
|
392
427
|
if (this.configuration && this.configuration.apiKey) {
|
|
393
|
-
|
|
428
|
+
// An unresolved credential must produce NO header, not an empty one (sc-8162).
|
|
429
|
+
{
|
|
430
|
+
const apiKeyValue = await this.configuration.apiKey("X-Application-Key"); // ApplicationPublicKey authentication
|
|
431
|
+
|
|
432
|
+
if (apiKeyValue) {
|
|
433
|
+
headerParameters["X-Application-Key"] = apiKeyValue;
|
|
434
|
+
}
|
|
435
|
+
}
|
|
394
436
|
}
|
|
395
437
|
|
|
396
438
|
const response = await this.request({
|
|
@@ -429,11 +471,25 @@ export class AuthEmailTemplatesApi extends runtime.BaseAPI implements AuthEmailT
|
|
|
429
471
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
430
472
|
|
|
431
473
|
if (this.configuration && this.configuration.apiKey) {
|
|
432
|
-
|
|
474
|
+
// An unresolved credential must produce NO header, not an empty one (sc-8162).
|
|
475
|
+
{
|
|
476
|
+
const apiKeyValue = await this.configuration.apiKey("X-Application-Secret"); // ApplicationSecret authentication
|
|
477
|
+
|
|
478
|
+
if (apiKeyValue) {
|
|
479
|
+
headerParameters["X-Application-Secret"] = apiKeyValue;
|
|
480
|
+
}
|
|
481
|
+
}
|
|
433
482
|
}
|
|
434
483
|
|
|
435
484
|
if (this.configuration && this.configuration.apiKey) {
|
|
436
|
-
|
|
485
|
+
// An unresolved credential must produce NO header, not an empty one (sc-8162).
|
|
486
|
+
{
|
|
487
|
+
const apiKeyValue = await this.configuration.apiKey("X-Application-Key"); // ApplicationPublicKey authentication
|
|
488
|
+
|
|
489
|
+
if (apiKeyValue) {
|
|
490
|
+
headerParameters["X-Application-Key"] = apiKeyValue;
|
|
491
|
+
}
|
|
492
|
+
}
|
|
437
493
|
}
|
|
438
494
|
|
|
439
495
|
const response = await this.request({
|
|
@@ -471,11 +527,25 @@ export class AuthEmailTemplatesApi extends runtime.BaseAPI implements AuthEmailT
|
|
|
471
527
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
472
528
|
|
|
473
529
|
if (this.configuration && this.configuration.apiKey) {
|
|
474
|
-
|
|
530
|
+
// An unresolved credential must produce NO header, not an empty one (sc-8162).
|
|
531
|
+
{
|
|
532
|
+
const apiKeyValue = await this.configuration.apiKey("X-Application-Secret"); // ApplicationSecret authentication
|
|
533
|
+
|
|
534
|
+
if (apiKeyValue) {
|
|
535
|
+
headerParameters["X-Application-Secret"] = apiKeyValue;
|
|
536
|
+
}
|
|
537
|
+
}
|
|
475
538
|
}
|
|
476
539
|
|
|
477
540
|
if (this.configuration && this.configuration.apiKey) {
|
|
478
|
-
|
|
541
|
+
// An unresolved credential must produce NO header, not an empty one (sc-8162).
|
|
542
|
+
{
|
|
543
|
+
const apiKeyValue = await this.configuration.apiKey("X-Application-Key"); // ApplicationPublicKey authentication
|
|
544
|
+
|
|
545
|
+
if (apiKeyValue) {
|
|
546
|
+
headerParameters["X-Application-Key"] = apiKeyValue;
|
|
547
|
+
}
|
|
548
|
+
}
|
|
479
549
|
}
|
|
480
550
|
|
|
481
551
|
const response = await this.request({
|
|
@@ -506,11 +576,25 @@ export class AuthEmailTemplatesApi extends runtime.BaseAPI implements AuthEmailT
|
|
|
506
576
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
507
577
|
|
|
508
578
|
if (this.configuration && this.configuration.apiKey) {
|
|
509
|
-
|
|
579
|
+
// An unresolved credential must produce NO header, not an empty one (sc-8162).
|
|
580
|
+
{
|
|
581
|
+
const apiKeyValue = await this.configuration.apiKey("X-Application-Secret"); // ApplicationSecret authentication
|
|
582
|
+
|
|
583
|
+
if (apiKeyValue) {
|
|
584
|
+
headerParameters["X-Application-Secret"] = apiKeyValue;
|
|
585
|
+
}
|
|
586
|
+
}
|
|
510
587
|
}
|
|
511
588
|
|
|
512
589
|
if (this.configuration && this.configuration.apiKey) {
|
|
513
|
-
|
|
590
|
+
// An unresolved credential must produce NO header, not an empty one (sc-8162).
|
|
591
|
+
{
|
|
592
|
+
const apiKeyValue = await this.configuration.apiKey("X-Application-Key"); // ApplicationPublicKey authentication
|
|
593
|
+
|
|
594
|
+
if (apiKeyValue) {
|
|
595
|
+
headerParameters["X-Application-Key"] = apiKeyValue;
|
|
596
|
+
}
|
|
597
|
+
}
|
|
514
598
|
}
|
|
515
599
|
|
|
516
600
|
const response = await this.request({
|
|
@@ -551,11 +635,25 @@ export class AuthEmailTemplatesApi extends runtime.BaseAPI implements AuthEmailT
|
|
|
551
635
|
headerParameters['Content-Type'] = 'application/json';
|
|
552
636
|
|
|
553
637
|
if (this.configuration && this.configuration.apiKey) {
|
|
554
|
-
|
|
638
|
+
// An unresolved credential must produce NO header, not an empty one (sc-8162).
|
|
639
|
+
{
|
|
640
|
+
const apiKeyValue = await this.configuration.apiKey("X-Application-Secret"); // ApplicationSecret authentication
|
|
641
|
+
|
|
642
|
+
if (apiKeyValue) {
|
|
643
|
+
headerParameters["X-Application-Secret"] = apiKeyValue;
|
|
644
|
+
}
|
|
645
|
+
}
|
|
555
646
|
}
|
|
556
647
|
|
|
557
648
|
if (this.configuration && this.configuration.apiKey) {
|
|
558
|
-
|
|
649
|
+
// An unresolved credential must produce NO header, not an empty one (sc-8162).
|
|
650
|
+
{
|
|
651
|
+
const apiKeyValue = await this.configuration.apiKey("X-Application-Key"); // ApplicationPublicKey authentication
|
|
652
|
+
|
|
653
|
+
if (apiKeyValue) {
|
|
654
|
+
headerParameters["X-Application-Key"] = apiKeyValue;
|
|
655
|
+
}
|
|
656
|
+
}
|
|
559
657
|
}
|
|
560
658
|
|
|
561
659
|
const response = await this.request({
|
|
@@ -602,11 +700,25 @@ export class AuthEmailTemplatesApi extends runtime.BaseAPI implements AuthEmailT
|
|
|
602
700
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
603
701
|
|
|
604
702
|
if (this.configuration && this.configuration.apiKey) {
|
|
605
|
-
|
|
703
|
+
// An unresolved credential must produce NO header, not an empty one (sc-8162).
|
|
704
|
+
{
|
|
705
|
+
const apiKeyValue = await this.configuration.apiKey("X-Application-Secret"); // ApplicationSecret authentication
|
|
706
|
+
|
|
707
|
+
if (apiKeyValue) {
|
|
708
|
+
headerParameters["X-Application-Secret"] = apiKeyValue;
|
|
709
|
+
}
|
|
710
|
+
}
|
|
606
711
|
}
|
|
607
712
|
|
|
608
713
|
if (this.configuration && this.configuration.apiKey) {
|
|
609
|
-
|
|
714
|
+
// An unresolved credential must produce NO header, not an empty one (sc-8162).
|
|
715
|
+
{
|
|
716
|
+
const apiKeyValue = await this.configuration.apiKey("X-Application-Key"); // ApplicationPublicKey authentication
|
|
717
|
+
|
|
718
|
+
if (apiKeyValue) {
|
|
719
|
+
headerParameters["X-Application-Key"] = apiKeyValue;
|
|
720
|
+
}
|
|
721
|
+
}
|
|
610
722
|
}
|
|
611
723
|
|
|
612
724
|
const response = await this.request({
|
|
@@ -654,11 +766,25 @@ export class AuthEmailTemplatesApi extends runtime.BaseAPI implements AuthEmailT
|
|
|
654
766
|
headerParameters['Content-Type'] = 'application/json';
|
|
655
767
|
|
|
656
768
|
if (this.configuration && this.configuration.apiKey) {
|
|
657
|
-
|
|
769
|
+
// An unresolved credential must produce NO header, not an empty one (sc-8162).
|
|
770
|
+
{
|
|
771
|
+
const apiKeyValue = await this.configuration.apiKey("X-Application-Secret"); // ApplicationSecret authentication
|
|
772
|
+
|
|
773
|
+
if (apiKeyValue) {
|
|
774
|
+
headerParameters["X-Application-Secret"] = apiKeyValue;
|
|
775
|
+
}
|
|
776
|
+
}
|
|
658
777
|
}
|
|
659
778
|
|
|
660
779
|
if (this.configuration && this.configuration.apiKey) {
|
|
661
|
-
|
|
780
|
+
// An unresolved credential must produce NO header, not an empty one (sc-8162).
|
|
781
|
+
{
|
|
782
|
+
const apiKeyValue = await this.configuration.apiKey("X-Application-Key"); // ApplicationPublicKey authentication
|
|
783
|
+
|
|
784
|
+
if (apiKeyValue) {
|
|
785
|
+
headerParameters["X-Application-Key"] = apiKeyValue;
|
|
786
|
+
}
|
|
787
|
+
}
|
|
662
788
|
}
|
|
663
789
|
|
|
664
790
|
const response = await this.request({
|
|
@@ -707,11 +833,25 @@ export class AuthEmailTemplatesApi extends runtime.BaseAPI implements AuthEmailT
|
|
|
707
833
|
headerParameters['Content-Type'] = 'application/json';
|
|
708
834
|
|
|
709
835
|
if (this.configuration && this.configuration.apiKey) {
|
|
710
|
-
|
|
836
|
+
// An unresolved credential must produce NO header, not an empty one (sc-8162).
|
|
837
|
+
{
|
|
838
|
+
const apiKeyValue = await this.configuration.apiKey("X-Application-Secret"); // ApplicationSecret authentication
|
|
839
|
+
|
|
840
|
+
if (apiKeyValue) {
|
|
841
|
+
headerParameters["X-Application-Secret"] = apiKeyValue;
|
|
842
|
+
}
|
|
843
|
+
}
|
|
711
844
|
}
|
|
712
845
|
|
|
713
846
|
if (this.configuration && this.configuration.apiKey) {
|
|
714
|
-
|
|
847
|
+
// An unresolved credential must produce NO header, not an empty one (sc-8162).
|
|
848
|
+
{
|
|
849
|
+
const apiKeyValue = await this.configuration.apiKey("X-Application-Key"); // ApplicationPublicKey authentication
|
|
850
|
+
|
|
851
|
+
if (apiKeyValue) {
|
|
852
|
+
headerParameters["X-Application-Key"] = apiKeyValue;
|
|
853
|
+
}
|
|
854
|
+
}
|
|
715
855
|
}
|
|
716
856
|
|
|
717
857
|
const response = await this.request({
|