@zyphr-dev/node-sdk 0.1.27 → 0.1.30

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.js CHANGED
@@ -288,6 +288,202 @@ var TextApiResponse = class {
288
288
  }
289
289
  };
290
290
 
291
+ // src/src/models/DnsRecord.ts
292
+ var DnsRecordTypeEnum = {
293
+ TXT: "TXT",
294
+ CNAME: "CNAME"
295
+ };
296
+ var DnsRecordPurposeEnum = {
297
+ DOMAIN_VERIFICATION: "domain_verification",
298
+ SPF: "spf",
299
+ DMARC: "dmarc",
300
+ DKIM: "dkim"
301
+ };
302
+ function instanceOfDnsRecord(value) {
303
+ if (!("type" in value) || value["type"] === void 0) return false;
304
+ if (!("name" in value) || value["name"] === void 0) return false;
305
+ if (!("value" in value) || value["value"] === void 0) return false;
306
+ if (!("purpose" in value) || value["purpose"] === void 0) return false;
307
+ if (!("verified" in value) || value["verified"] === void 0) return false;
308
+ return true;
309
+ }
310
+ function DnsRecordFromJSON(json) {
311
+ return DnsRecordFromJSONTyped(json, false);
312
+ }
313
+ function DnsRecordFromJSONTyped(json, ignoreDiscriminator) {
314
+ if (json == null) {
315
+ return json;
316
+ }
317
+ return {
318
+ "type": json["type"],
319
+ "name": json["name"],
320
+ "value": json["value"],
321
+ "purpose": json["purpose"],
322
+ "verified": json["verified"]
323
+ };
324
+ }
325
+ function DnsRecordToJSON(json) {
326
+ return DnsRecordToJSONTyped(json, false);
327
+ }
328
+ function DnsRecordToJSONTyped(value, ignoreDiscriminator = false) {
329
+ if (value == null) {
330
+ return value;
331
+ }
332
+ return {
333
+ "type": value["type"],
334
+ "name": value["name"],
335
+ "value": value["value"],
336
+ "purpose": value["purpose"],
337
+ "verified": value["verified"]
338
+ };
339
+ }
340
+
341
+ // src/src/models/DomainResponse.ts
342
+ var DomainResponseStatusEnum = {
343
+ PENDING: "pending",
344
+ VERIFYING: "verifying",
345
+ VERIFIED: "verified",
346
+ FAILED: "failed"
347
+ };
348
+ function instanceOfDomainResponse(value) {
349
+ if (!("id" in value) || value["id"] === void 0) return false;
350
+ if (!("domain" in value) || value["domain"] === void 0) return false;
351
+ if (!("status" in value) || value["status"] === void 0) return false;
352
+ if (!("dnsRecords" in value) || value["dnsRecords"] === void 0) return false;
353
+ if (!("recordsVerified" in value) || value["recordsVerified"] === void 0) return false;
354
+ if (!("recordsTotal" in value) || value["recordsTotal"] === void 0) return false;
355
+ if (!("createdAt" in value) || value["createdAt"] === void 0) return false;
356
+ return true;
357
+ }
358
+ function DomainResponseFromJSON(json) {
359
+ return DomainResponseFromJSONTyped(json, false);
360
+ }
361
+ function DomainResponseFromJSONTyped(json, ignoreDiscriminator) {
362
+ if (json == null) {
363
+ return json;
364
+ }
365
+ return {
366
+ "id": json["id"],
367
+ "domain": json["domain"],
368
+ "status": json["status"],
369
+ "dnsRecords": json["dns_records"].map(DnsRecordFromJSON),
370
+ "recordsVerified": json["records_verified"],
371
+ "recordsTotal": json["records_total"],
372
+ "verificationToken": json["verification_token"] == null ? void 0 : json["verification_token"],
373
+ "verifiedAt": json["verified_at"] == null ? void 0 : new Date(json["verified_at"]),
374
+ "lastCheckedAt": json["last_checked_at"] == null ? void 0 : new Date(json["last_checked_at"]),
375
+ "createdAt": new Date(json["created_at"]),
376
+ "updatedAt": json["updated_at"] == null ? void 0 : new Date(json["updated_at"])
377
+ };
378
+ }
379
+ function DomainResponseToJSON(json) {
380
+ return DomainResponseToJSONTyped(json, false);
381
+ }
382
+ function DomainResponseToJSONTyped(value, ignoreDiscriminator = false) {
383
+ if (value == null) {
384
+ return value;
385
+ }
386
+ return {
387
+ "id": value["id"],
388
+ "domain": value["domain"],
389
+ "status": value["status"],
390
+ "dns_records": value["dnsRecords"].map(DnsRecordToJSON),
391
+ "records_verified": value["recordsVerified"],
392
+ "records_total": value["recordsTotal"],
393
+ "verification_token": value["verificationToken"],
394
+ "verified_at": value["verifiedAt"] == null ? void 0 : value["verifiedAt"].toISOString(),
395
+ "last_checked_at": value["lastCheckedAt"] == null ? void 0 : value["lastCheckedAt"].toISOString(),
396
+ "created_at": value["createdAt"].toISOString(),
397
+ "updated_at": value["updatedAt"] == null ? void 0 : value["updatedAt"].toISOString()
398
+ };
399
+ }
400
+
401
+ // src/src/models/AddDomain200ResponseMeta.ts
402
+ function instanceOfAddDomain200ResponseMeta(value) {
403
+ return true;
404
+ }
405
+ function AddDomain200ResponseMetaFromJSON(json) {
406
+ return AddDomain200ResponseMetaFromJSONTyped(json, false);
407
+ }
408
+ function AddDomain200ResponseMetaFromJSONTyped(json, ignoreDiscriminator) {
409
+ if (json == null) {
410
+ return json;
411
+ }
412
+ return {
413
+ "requestId": json["request_id"] == null ? void 0 : json["request_id"],
414
+ "message": json["message"] == null ? void 0 : json["message"]
415
+ };
416
+ }
417
+ function AddDomain200ResponseMetaToJSON(json) {
418
+ return AddDomain200ResponseMetaToJSONTyped(json, false);
419
+ }
420
+ function AddDomain200ResponseMetaToJSONTyped(value, ignoreDiscriminator = false) {
421
+ if (value == null) {
422
+ return value;
423
+ }
424
+ return {
425
+ "request_id": value["requestId"],
426
+ "message": value["message"]
427
+ };
428
+ }
429
+
430
+ // src/src/models/AddDomain200Response.ts
431
+ function instanceOfAddDomain200Response(value) {
432
+ return true;
433
+ }
434
+ function AddDomain200ResponseFromJSON(json) {
435
+ return AddDomain200ResponseFromJSONTyped(json, false);
436
+ }
437
+ function AddDomain200ResponseFromJSONTyped(json, ignoreDiscriminator) {
438
+ if (json == null) {
439
+ return json;
440
+ }
441
+ return {
442
+ "data": json["data"] == null ? void 0 : DomainResponseFromJSON(json["data"]),
443
+ "meta": json["meta"] == null ? void 0 : AddDomain200ResponseMetaFromJSON(json["meta"])
444
+ };
445
+ }
446
+ function AddDomain200ResponseToJSON(json) {
447
+ return AddDomain200ResponseToJSONTyped(json, false);
448
+ }
449
+ function AddDomain200ResponseToJSONTyped(value, ignoreDiscriminator = false) {
450
+ if (value == null) {
451
+ return value;
452
+ }
453
+ return {
454
+ "data": DomainResponseToJSON(value["data"]),
455
+ "meta": AddDomain200ResponseMetaToJSON(value["meta"])
456
+ };
457
+ }
458
+
459
+ // src/src/models/AddDomainRequest.ts
460
+ function instanceOfAddDomainRequest(value) {
461
+ if (!("domain" in value) || value["domain"] === void 0) return false;
462
+ return true;
463
+ }
464
+ function AddDomainRequestFromJSON(json) {
465
+ return AddDomainRequestFromJSONTyped(json, false);
466
+ }
467
+ function AddDomainRequestFromJSONTyped(json, ignoreDiscriminator) {
468
+ if (json == null) {
469
+ return json;
470
+ }
471
+ return {
472
+ "domain": json["domain"]
473
+ };
474
+ }
475
+ function AddDomainRequestToJSON(json) {
476
+ return AddDomainRequestToJSONTyped(json, false);
477
+ }
478
+ function AddDomainRequestToJSONTyped(value, ignoreDiscriminator = false) {
479
+ if (value == null) {
480
+ return value;
481
+ }
482
+ return {
483
+ "domain": value["domain"]
484
+ };
485
+ }
486
+
291
487
  // src/src/models/AddTopicSubscribersRequest.ts
292
488
  function instanceOfAddTopicSubscribersRequest(value) {
293
489
  if (!("subscriberIds" in value) || value["subscriberIds"] === void 0) return false;
@@ -2749,6 +2945,95 @@ function CreateWebhookRequestToJSONTyped(value, ignoreDiscriminator = false) {
2749
2945
  };
2750
2946
  }
2751
2947
 
2948
+ // src/src/models/GetDomain200ResponseMeta.ts
2949
+ function instanceOfGetDomain200ResponseMeta(value) {
2950
+ return true;
2951
+ }
2952
+ function GetDomain200ResponseMetaFromJSON(json) {
2953
+ return GetDomain200ResponseMetaFromJSONTyped(json, false);
2954
+ }
2955
+ function GetDomain200ResponseMetaFromJSONTyped(json, ignoreDiscriminator) {
2956
+ if (json == null) {
2957
+ return json;
2958
+ }
2959
+ return {
2960
+ "requestId": json["request_id"] == null ? void 0 : json["request_id"]
2961
+ };
2962
+ }
2963
+ function GetDomain200ResponseMetaToJSON(json) {
2964
+ return GetDomain200ResponseMetaToJSONTyped(json, false);
2965
+ }
2966
+ function GetDomain200ResponseMetaToJSONTyped(value, ignoreDiscriminator = false) {
2967
+ if (value == null) {
2968
+ return value;
2969
+ }
2970
+ return {
2971
+ "request_id": value["requestId"]
2972
+ };
2973
+ }
2974
+
2975
+ // src/src/models/DeleteDomainResponseData.ts
2976
+ function instanceOfDeleteDomainResponseData(value) {
2977
+ if (!("id" in value) || value["id"] === void 0) return false;
2978
+ if (!("deleted" in value) || value["deleted"] === void 0) return false;
2979
+ return true;
2980
+ }
2981
+ function DeleteDomainResponseDataFromJSON(json) {
2982
+ return DeleteDomainResponseDataFromJSONTyped(json, false);
2983
+ }
2984
+ function DeleteDomainResponseDataFromJSONTyped(json, ignoreDiscriminator) {
2985
+ if (json == null) {
2986
+ return json;
2987
+ }
2988
+ return {
2989
+ "id": json["id"],
2990
+ "deleted": json["deleted"]
2991
+ };
2992
+ }
2993
+ function DeleteDomainResponseDataToJSON(json) {
2994
+ return DeleteDomainResponseDataToJSONTyped(json, false);
2995
+ }
2996
+ function DeleteDomainResponseDataToJSONTyped(value, ignoreDiscriminator = false) {
2997
+ if (value == null) {
2998
+ return value;
2999
+ }
3000
+ return {
3001
+ "id": value["id"],
3002
+ "deleted": value["deleted"]
3003
+ };
3004
+ }
3005
+
3006
+ // src/src/models/DeleteDomainResponse.ts
3007
+ function instanceOfDeleteDomainResponse(value) {
3008
+ if (!("data" in value) || value["data"] === void 0) return false;
3009
+ if (!("meta" in value) || value["meta"] === void 0) return false;
3010
+ return true;
3011
+ }
3012
+ function DeleteDomainResponseFromJSON(json) {
3013
+ return DeleteDomainResponseFromJSONTyped(json, false);
3014
+ }
3015
+ function DeleteDomainResponseFromJSONTyped(json, ignoreDiscriminator) {
3016
+ if (json == null) {
3017
+ return json;
3018
+ }
3019
+ return {
3020
+ "data": DeleteDomainResponseDataFromJSON(json["data"]),
3021
+ "meta": GetDomain200ResponseMetaFromJSON(json["meta"])
3022
+ };
3023
+ }
3024
+ function DeleteDomainResponseToJSON(json) {
3025
+ return DeleteDomainResponseToJSONTyped(json, false);
3026
+ }
3027
+ function DeleteDomainResponseToJSONTyped(value, ignoreDiscriminator = false) {
3028
+ if (value == null) {
3029
+ return value;
3030
+ }
3031
+ return {
3032
+ "data": DeleteDomainResponseDataToJSON(value["data"]),
3033
+ "meta": GetDomain200ResponseMetaToJSON(value["meta"])
3034
+ };
3035
+ }
3036
+
2752
3037
  // src/src/models/DeleteResultData.ts
2753
3038
  function instanceOfDeleteResultData(value) {
2754
3039
  return true;
@@ -3060,6 +3345,70 @@ function DeviceStatsResponseToJSONTyped(value, ignoreDiscriminator = false) {
3060
3345
  };
3061
3346
  }
3062
3347
 
3348
+ // src/src/models/DomainListResponseMeta.ts
3349
+ function instanceOfDomainListResponseMeta(value) {
3350
+ return true;
3351
+ }
3352
+ function DomainListResponseMetaFromJSON(json) {
3353
+ return DomainListResponseMetaFromJSONTyped(json, false);
3354
+ }
3355
+ function DomainListResponseMetaFromJSONTyped(json, ignoreDiscriminator) {
3356
+ if (json == null) {
3357
+ return json;
3358
+ }
3359
+ return {
3360
+ "requestId": json["request_id"] == null ? void 0 : json["request_id"],
3361
+ "count": json["count"] == null ? void 0 : json["count"],
3362
+ "limit": json["limit"] == null ? void 0 : json["limit"],
3363
+ "plan": json["plan"] == null ? void 0 : json["plan"]
3364
+ };
3365
+ }
3366
+ function DomainListResponseMetaToJSON(json) {
3367
+ return DomainListResponseMetaToJSONTyped(json, false);
3368
+ }
3369
+ function DomainListResponseMetaToJSONTyped(value, ignoreDiscriminator = false) {
3370
+ if (value == null) {
3371
+ return value;
3372
+ }
3373
+ return {
3374
+ "request_id": value["requestId"],
3375
+ "count": value["count"],
3376
+ "limit": value["limit"],
3377
+ "plan": value["plan"]
3378
+ };
3379
+ }
3380
+
3381
+ // src/src/models/DomainListResponse.ts
3382
+ function instanceOfDomainListResponse(value) {
3383
+ if (!("data" in value) || value["data"] === void 0) return false;
3384
+ if (!("meta" in value) || value["meta"] === void 0) return false;
3385
+ return true;
3386
+ }
3387
+ function DomainListResponseFromJSON(json) {
3388
+ return DomainListResponseFromJSONTyped(json, false);
3389
+ }
3390
+ function DomainListResponseFromJSONTyped(json, ignoreDiscriminator) {
3391
+ if (json == null) {
3392
+ return json;
3393
+ }
3394
+ return {
3395
+ "data": json["data"].map(DomainResponseFromJSON),
3396
+ "meta": DomainListResponseMetaFromJSON(json["meta"])
3397
+ };
3398
+ }
3399
+ function DomainListResponseToJSON(json) {
3400
+ return DomainListResponseToJSONTyped(json, false);
3401
+ }
3402
+ function DomainListResponseToJSONTyped(value, ignoreDiscriminator = false) {
3403
+ if (value == null) {
3404
+ return value;
3405
+ }
3406
+ return {
3407
+ "data": value["data"].map(DomainResponseToJSON),
3408
+ "meta": DomainListResponseMetaToJSON(value["meta"])
3409
+ };
3410
+ }
3411
+
3063
3412
  // src/src/models/EmailAddress.ts
3064
3413
  function instanceOfEmailAddress(value) {
3065
3414
  return true;
@@ -4044,6 +4393,35 @@ function GenerateWaaSPortalToken201ResponseToJSONTyped(value, ignoreDiscriminato
4044
4393
  };
4045
4394
  }
4046
4395
 
4396
+ // src/src/models/GetDomain200Response.ts
4397
+ function instanceOfGetDomain200Response(value) {
4398
+ return true;
4399
+ }
4400
+ function GetDomain200ResponseFromJSON(json) {
4401
+ return GetDomain200ResponseFromJSONTyped(json, false);
4402
+ }
4403
+ function GetDomain200ResponseFromJSONTyped(json, ignoreDiscriminator) {
4404
+ if (json == null) {
4405
+ return json;
4406
+ }
4407
+ return {
4408
+ "data": json["data"] == null ? void 0 : DomainResponseFromJSON(json["data"]),
4409
+ "meta": json["meta"] == null ? void 0 : GetDomain200ResponseMetaFromJSON(json["meta"])
4410
+ };
4411
+ }
4412
+ function GetDomain200ResponseToJSON(json) {
4413
+ return GetDomain200ResponseToJSONTyped(json, false);
4414
+ }
4415
+ function GetDomain200ResponseToJSONTyped(value, ignoreDiscriminator = false) {
4416
+ if (value == null) {
4417
+ return value;
4418
+ }
4419
+ return {
4420
+ "data": DomainResponseToJSON(value["data"]),
4421
+ "meta": GetDomain200ResponseMetaToJSON(value["meta"])
4422
+ };
4423
+ }
4424
+
4047
4425
  // src/src/models/WaaSEndpoint.ts
4048
4426
  var WaaSEndpointStatusEnum = {
4049
4427
  ACTIVE: "active",
@@ -11030,6 +11408,161 @@ function ValidateResetTokenResponseToJSONTyped(value, ignoreDiscriminator = fals
11030
11408
  };
11031
11409
  }
11032
11410
 
11411
+ // src/src/models/VerificationStatusResponseData.ts
11412
+ var VerificationStatusResponseDataStatusEnum = {
11413
+ PENDING: "pending",
11414
+ VERIFYING: "verifying",
11415
+ VERIFIED: "verified",
11416
+ FAILED: "failed"
11417
+ };
11418
+ function instanceOfVerificationStatusResponseData(value) {
11419
+ if (!("domainId" in value) || value["domainId"] === void 0) return false;
11420
+ if (!("domain" in value) || value["domain"] === void 0) return false;
11421
+ if (!("status" in value) || value["status"] === void 0) return false;
11422
+ if (!("recordsVerified" in value) || value["recordsVerified"] === void 0) return false;
11423
+ if (!("recordsTotal" in value) || value["recordsTotal"] === void 0) return false;
11424
+ if (!("dnsRecords" in value) || value["dnsRecords"] === void 0) return false;
11425
+ return true;
11426
+ }
11427
+ function VerificationStatusResponseDataFromJSON(json) {
11428
+ return VerificationStatusResponseDataFromJSONTyped(json, false);
11429
+ }
11430
+ function VerificationStatusResponseDataFromJSONTyped(json, ignoreDiscriminator) {
11431
+ if (json == null) {
11432
+ return json;
11433
+ }
11434
+ return {
11435
+ "domainId": json["domain_id"],
11436
+ "domain": json["domain"],
11437
+ "status": json["status"],
11438
+ "recordsVerified": json["records_verified"],
11439
+ "recordsTotal": json["records_total"],
11440
+ "progress": json["progress"] == null ? void 0 : json["progress"],
11441
+ "dnsRecords": json["dns_records"].map(DnsRecordFromJSON),
11442
+ "lastCheckedAt": json["last_checked_at"] == null ? void 0 : new Date(json["last_checked_at"])
11443
+ };
11444
+ }
11445
+ function VerificationStatusResponseDataToJSON(json) {
11446
+ return VerificationStatusResponseDataToJSONTyped(json, false);
11447
+ }
11448
+ function VerificationStatusResponseDataToJSONTyped(value, ignoreDiscriminator = false) {
11449
+ if (value == null) {
11450
+ return value;
11451
+ }
11452
+ return {
11453
+ "domain_id": value["domainId"],
11454
+ "domain": value["domain"],
11455
+ "status": value["status"],
11456
+ "records_verified": value["recordsVerified"],
11457
+ "records_total": value["recordsTotal"],
11458
+ "progress": value["progress"],
11459
+ "dns_records": value["dnsRecords"].map(DnsRecordToJSON),
11460
+ "last_checked_at": value["lastCheckedAt"] == null ? void 0 : value["lastCheckedAt"].toISOString()
11461
+ };
11462
+ }
11463
+
11464
+ // src/src/models/VerificationStatusResponse.ts
11465
+ function instanceOfVerificationStatusResponse(value) {
11466
+ if (!("data" in value) || value["data"] === void 0) return false;
11467
+ if (!("meta" in value) || value["meta"] === void 0) return false;
11468
+ return true;
11469
+ }
11470
+ function VerificationStatusResponseFromJSON(json) {
11471
+ return VerificationStatusResponseFromJSONTyped(json, false);
11472
+ }
11473
+ function VerificationStatusResponseFromJSONTyped(json, ignoreDiscriminator) {
11474
+ if (json == null) {
11475
+ return json;
11476
+ }
11477
+ return {
11478
+ "data": VerificationStatusResponseDataFromJSON(json["data"]),
11479
+ "meta": GetDomain200ResponseMetaFromJSON(json["meta"])
11480
+ };
11481
+ }
11482
+ function VerificationStatusResponseToJSON(json) {
11483
+ return VerificationStatusResponseToJSONTyped(json, false);
11484
+ }
11485
+ function VerificationStatusResponseToJSONTyped(value, ignoreDiscriminator = false) {
11486
+ if (value == null) {
11487
+ return value;
11488
+ }
11489
+ return {
11490
+ "data": VerificationStatusResponseDataToJSON(value["data"]),
11491
+ "meta": GetDomain200ResponseMetaToJSON(value["meta"])
11492
+ };
11493
+ }
11494
+
11495
+ // src/src/models/VerifyDomainResponseData.ts
11496
+ var VerifyDomainResponseDataStatusEnum = {
11497
+ VERIFYING: "verifying"
11498
+ };
11499
+ function instanceOfVerifyDomainResponseData(value) {
11500
+ if (!("jobId" in value) || value["jobId"] === void 0) return false;
11501
+ if (!("domainId" in value) || value["domainId"] === void 0) return false;
11502
+ if (!("domain" in value) || value["domain"] === void 0) return false;
11503
+ if (!("status" in value) || value["status"] === void 0) return false;
11504
+ return true;
11505
+ }
11506
+ function VerifyDomainResponseDataFromJSON(json) {
11507
+ return VerifyDomainResponseDataFromJSONTyped(json, false);
11508
+ }
11509
+ function VerifyDomainResponseDataFromJSONTyped(json, ignoreDiscriminator) {
11510
+ if (json == null) {
11511
+ return json;
11512
+ }
11513
+ return {
11514
+ "jobId": json["job_id"],
11515
+ "domainId": json["domain_id"],
11516
+ "domain": json["domain"],
11517
+ "status": json["status"]
11518
+ };
11519
+ }
11520
+ function VerifyDomainResponseDataToJSON(json) {
11521
+ return VerifyDomainResponseDataToJSONTyped(json, false);
11522
+ }
11523
+ function VerifyDomainResponseDataToJSONTyped(value, ignoreDiscriminator = false) {
11524
+ if (value == null) {
11525
+ return value;
11526
+ }
11527
+ return {
11528
+ "job_id": value["jobId"],
11529
+ "domain_id": value["domainId"],
11530
+ "domain": value["domain"],
11531
+ "status": value["status"]
11532
+ };
11533
+ }
11534
+
11535
+ // src/src/models/VerifyDomainResponse.ts
11536
+ function instanceOfVerifyDomainResponse(value) {
11537
+ if (!("data" in value) || value["data"] === void 0) return false;
11538
+ if (!("meta" in value) || value["meta"] === void 0) return false;
11539
+ return true;
11540
+ }
11541
+ function VerifyDomainResponseFromJSON(json) {
11542
+ return VerifyDomainResponseFromJSONTyped(json, false);
11543
+ }
11544
+ function VerifyDomainResponseFromJSONTyped(json, ignoreDiscriminator) {
11545
+ if (json == null) {
11546
+ return json;
11547
+ }
11548
+ return {
11549
+ "data": VerifyDomainResponseDataFromJSON(json["data"]),
11550
+ "meta": AddDomain200ResponseMetaFromJSON(json["meta"])
11551
+ };
11552
+ }
11553
+ function VerifyDomainResponseToJSON(json) {
11554
+ return VerifyDomainResponseToJSONTyped(json, false);
11555
+ }
11556
+ function VerifyDomainResponseToJSONTyped(value, ignoreDiscriminator = false) {
11557
+ if (value == null) {
11558
+ return value;
11559
+ }
11560
+ return {
11561
+ "data": VerifyDomainResponseDataToJSON(value["data"]),
11562
+ "meta": AddDomain200ResponseMetaToJSON(value["meta"])
11563
+ };
11564
+ }
11565
+
11033
11566
  // src/src/models/VerifySmsConfigData.ts
11034
11567
  function instanceOfVerifySmsConfigData(value) {
11035
11568
  return true;
@@ -15255,6 +15788,198 @@ var ListDevicesPlatformEnum = {
15255
15788
  WEB: "web"
15256
15789
  };
15257
15790
 
15791
+ // src/src/apis/DomainsApi.ts
15792
+ var DomainsApi = class extends BaseAPI {
15793
+ /**
15794
+ * Register a new sending domain on the account. Returns the full set of DNS records that must be published before email can send from this domain. **Idempotent:** calling this with a domain already registered on the current project returns the existing domain (200) instead of erroring, so re-runs from IaC tooling are safe.
15795
+ * Add a sending domain
15796
+ */
15797
+ async addDomainRaw(requestParameters, initOverrides) {
15798
+ if (requestParameters["addDomainRequest"] == null) {
15799
+ throw new RequiredError(
15800
+ "addDomainRequest",
15801
+ 'Required parameter "addDomainRequest" was null or undefined when calling addDomain().'
15802
+ );
15803
+ }
15804
+ const queryParameters = {};
15805
+ const headerParameters = {};
15806
+ headerParameters["Content-Type"] = "application/json";
15807
+ if (this.configuration && this.configuration.apiKey) {
15808
+ headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key");
15809
+ }
15810
+ const response = await this.request({
15811
+ path: `/v1/domains`,
15812
+ method: "POST",
15813
+ headers: headerParameters,
15814
+ query: queryParameters,
15815
+ body: AddDomainRequestToJSON(requestParameters["addDomainRequest"])
15816
+ }, initOverrides);
15817
+ return new JSONApiResponse(response, (jsonValue) => AddDomain200ResponseFromJSON(jsonValue));
15818
+ }
15819
+ /**
15820
+ * Register a new sending domain on the account. Returns the full set of DNS records that must be published before email can send from this domain. **Idempotent:** calling this with a domain already registered on the current project returns the existing domain (200) instead of erroring, so re-runs from IaC tooling are safe.
15821
+ * Add a sending domain
15822
+ */
15823
+ async addDomain(addDomainRequest, initOverrides) {
15824
+ const response = await this.addDomainRaw({ addDomainRequest }, initOverrides);
15825
+ return await response.value();
15826
+ }
15827
+ /**
15828
+ * Remove a sending domain from the project. The domain is also detached from any SES identity that was provisioned for it. Returns 409 if the domain is still referenced by other resources (templates, scheduled sends, etc.) — those must be removed first.
15829
+ * Remove a sending domain
15830
+ */
15831
+ async deleteDomainRaw(requestParameters, initOverrides) {
15832
+ if (requestParameters["id"] == null) {
15833
+ throw new RequiredError(
15834
+ "id",
15835
+ 'Required parameter "id" was null or undefined when calling deleteDomain().'
15836
+ );
15837
+ }
15838
+ const queryParameters = {};
15839
+ const headerParameters = {};
15840
+ if (this.configuration && this.configuration.apiKey) {
15841
+ headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key");
15842
+ }
15843
+ const response = await this.request({
15844
+ path: `/v1/domains/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters["id"]))),
15845
+ method: "DELETE",
15846
+ headers: headerParameters,
15847
+ query: queryParameters
15848
+ }, initOverrides);
15849
+ return new JSONApiResponse(response, (jsonValue) => DeleteDomainResponseFromJSON(jsonValue));
15850
+ }
15851
+ /**
15852
+ * Remove a sending domain from the project. The domain is also detached from any SES identity that was provisioned for it. Returns 409 if the domain is still referenced by other resources (templates, scheduled sends, etc.) — those must be removed first.
15853
+ * Remove a sending domain
15854
+ */
15855
+ async deleteDomain(id, initOverrides) {
15856
+ const response = await this.deleteDomainRaw({ id }, initOverrides);
15857
+ return await response.value();
15858
+ }
15859
+ /**
15860
+ * Retrieve a single sending domain by ID, including DNS records and verification counters.
15861
+ * Get a sending domain
15862
+ */
15863
+ async getDomainRaw(requestParameters, initOverrides) {
15864
+ if (requestParameters["id"] == null) {
15865
+ throw new RequiredError(
15866
+ "id",
15867
+ 'Required parameter "id" was null or undefined when calling getDomain().'
15868
+ );
15869
+ }
15870
+ const queryParameters = {};
15871
+ const headerParameters = {};
15872
+ if (this.configuration && this.configuration.apiKey) {
15873
+ headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key");
15874
+ }
15875
+ const response = await this.request({
15876
+ path: `/v1/domains/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters["id"]))),
15877
+ method: "GET",
15878
+ headers: headerParameters,
15879
+ query: queryParameters
15880
+ }, initOverrides);
15881
+ return new JSONApiResponse(response, (jsonValue) => GetDomain200ResponseFromJSON(jsonValue));
15882
+ }
15883
+ /**
15884
+ * Retrieve a single sending domain by ID, including DNS records and verification counters.
15885
+ * Get a sending domain
15886
+ */
15887
+ async getDomain(id, initOverrides) {
15888
+ const response = await this.getDomainRaw({ id }, initOverrides);
15889
+ return await response.value();
15890
+ }
15891
+ /**
15892
+ * Returns the current verification status with per-record `verified` flags and aggregate counters. Useful when polling for terminal status from an AI agent (the recommended pattern is to subscribe to the `domain.verified` webhook event instead — see sc-5444).
15893
+ * Get domain verification status
15894
+ */
15895
+ async getDomainVerificationStatusRaw(requestParameters, initOverrides) {
15896
+ if (requestParameters["id"] == null) {
15897
+ throw new RequiredError(
15898
+ "id",
15899
+ 'Required parameter "id" was null or undefined when calling getDomainVerificationStatus().'
15900
+ );
15901
+ }
15902
+ const queryParameters = {};
15903
+ const headerParameters = {};
15904
+ if (this.configuration && this.configuration.apiKey) {
15905
+ headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key");
15906
+ }
15907
+ const response = await this.request({
15908
+ path: `/v1/domains/{id}/verification-status`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters["id"]))),
15909
+ method: "GET",
15910
+ headers: headerParameters,
15911
+ query: queryParameters
15912
+ }, initOverrides);
15913
+ return new JSONApiResponse(response, (jsonValue) => VerificationStatusResponseFromJSON(jsonValue));
15914
+ }
15915
+ /**
15916
+ * Returns the current verification status with per-record `verified` flags and aggregate counters. Useful when polling for terminal status from an AI agent (the recommended pattern is to subscribe to the `domain.verified` webhook event instead — see sc-5444).
15917
+ * Get domain verification status
15918
+ */
15919
+ async getDomainVerificationStatus(id, initOverrides) {
15920
+ const response = await this.getDomainVerificationStatusRaw({ id }, initOverrides);
15921
+ return await response.value();
15922
+ }
15923
+ /**
15924
+ * List sending domains on the current project, with verification status and DNS records.
15925
+ * List sending domains
15926
+ */
15927
+ async listDomainsRaw(initOverrides) {
15928
+ const queryParameters = {};
15929
+ const headerParameters = {};
15930
+ if (this.configuration && this.configuration.apiKey) {
15931
+ headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key");
15932
+ }
15933
+ const response = await this.request({
15934
+ path: `/v1/domains`,
15935
+ method: "GET",
15936
+ headers: headerParameters,
15937
+ query: queryParameters
15938
+ }, initOverrides);
15939
+ return new JSONApiResponse(response, (jsonValue) => DomainListResponseFromJSON(jsonValue));
15940
+ }
15941
+ /**
15942
+ * List sending domains on the current project, with verification status and DNS records.
15943
+ * List sending domains
15944
+ */
15945
+ async listDomains(initOverrides) {
15946
+ const response = await this.listDomainsRaw(initOverrides);
15947
+ return await response.value();
15948
+ }
15949
+ /**
15950
+ * Queue an asynchronous DNS verification check. Returns immediately with a `job_id`. Poll `GET /v1/domains/{id}/verification-status` (or the higher-level `GET /v1/domains/{id}`) for the result, or subscribe to the `domain.verified` webhook event when sc-5444 ships. Returns 409 if a verification is already in progress for this domain (within the last 2 minutes).
15951
+ * Trigger domain verification
15952
+ */
15953
+ async verifyDomainRaw(requestParameters, initOverrides) {
15954
+ if (requestParameters["id"] == null) {
15955
+ throw new RequiredError(
15956
+ "id",
15957
+ 'Required parameter "id" was null or undefined when calling verifyDomain().'
15958
+ );
15959
+ }
15960
+ const queryParameters = {};
15961
+ const headerParameters = {};
15962
+ if (this.configuration && this.configuration.apiKey) {
15963
+ headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key");
15964
+ }
15965
+ const response = await this.request({
15966
+ path: `/v1/domains/{id}/verify`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters["id"]))),
15967
+ method: "POST",
15968
+ headers: headerParameters,
15969
+ query: queryParameters
15970
+ }, initOverrides);
15971
+ return new JSONApiResponse(response, (jsonValue) => VerifyDomainResponseFromJSON(jsonValue));
15972
+ }
15973
+ /**
15974
+ * Queue an asynchronous DNS verification check. Returns immediately with a `job_id`. Poll `GET /v1/domains/{id}/verification-status` (or the higher-level `GET /v1/domains/{id}`) for the result, or subscribe to the `domain.verified` webhook event when sc-5444 ships. Returns 409 if a verification is already in progress for this domain (within the last 2 minutes).
15975
+ * Trigger domain verification
15976
+ */
15977
+ async verifyDomain(id, initOverrides) {
15978
+ const response = await this.verifyDomainRaw({ id }, initOverrides);
15979
+ return await response.value();
15980
+ }
15981
+ };
15982
+
15258
15983
  // src/src/apis/EmailsApi.ts
15259
15984
  var EmailsApi = class extends BaseAPI {
15260
15985
  /**
@@ -20284,6 +21009,7 @@ var Zyphr = class {
20284
21009
  webhooks;
20285
21010
  topics;
20286
21011
  devices;
21012
+ domains;
20287
21013
  waas;
20288
21014
  auth;
20289
21015
  options;
@@ -20308,6 +21034,7 @@ var Zyphr = class {
20308
21034
  this.webhooks = new WebhooksApi(config);
20309
21035
  this.topics = new TopicsApi(config);
20310
21036
  this.devices = new DevicesApi(config);
21037
+ this.domains = new DomainsApi(config);
20311
21038
  this.waas = {
20312
21039
  applications: new WaaSApplicationsApi(config),
20313
21040
  eventTypes: new WaaSEventTypesApi(config),
@@ -20362,6 +21089,18 @@ var Zyphr = class {
20362
21089
  // src/index.ts
20363
21090
  var SDK_VERSION = "0.1.0";
20364
21091
  export {
21092
+ AddDomain200ResponseFromJSON,
21093
+ AddDomain200ResponseFromJSONTyped,
21094
+ AddDomain200ResponseMetaFromJSON,
21095
+ AddDomain200ResponseMetaFromJSONTyped,
21096
+ AddDomain200ResponseMetaToJSON,
21097
+ AddDomain200ResponseMetaToJSONTyped,
21098
+ AddDomain200ResponseToJSON,
21099
+ AddDomain200ResponseToJSONTyped,
21100
+ AddDomainRequestFromJSON,
21101
+ AddDomainRequestFromJSONTyped,
21102
+ AddDomainRequestToJSON,
21103
+ AddDomainRequestToJSONTyped,
20365
21104
  AddTopicSubscribersRequestFromJSON,
20366
21105
  AddTopicSubscribersRequestFromJSONTyped,
20367
21106
  AddTopicSubscribersRequestToJSON,
@@ -20651,6 +21390,14 @@ export {
20651
21390
  CreateWebhookRequestToJSON,
20652
21391
  CreateWebhookRequestToJSONTyped,
20653
21392
  DefaultConfig,
21393
+ DeleteDomainResponseDataFromJSON,
21394
+ DeleteDomainResponseDataFromJSONTyped,
21395
+ DeleteDomainResponseDataToJSON,
21396
+ DeleteDomainResponseDataToJSONTyped,
21397
+ DeleteDomainResponseFromJSON,
21398
+ DeleteDomainResponseFromJSONTyped,
21399
+ DeleteDomainResponseToJSON,
21400
+ DeleteDomainResponseToJSONTyped,
20654
21401
  DeleteResultDataFromJSON,
20655
21402
  DeleteResultDataFromJSONTyped,
20656
21403
  DeleteResultDataToJSON,
@@ -20693,6 +21440,26 @@ export {
20693
21440
  DeviceToJSON,
20694
21441
  DeviceToJSONTyped,
20695
21442
  DevicesApi,
21443
+ DnsRecordFromJSON,
21444
+ DnsRecordFromJSONTyped,
21445
+ DnsRecordPurposeEnum,
21446
+ DnsRecordToJSON,
21447
+ DnsRecordToJSONTyped,
21448
+ DnsRecordTypeEnum,
21449
+ DomainListResponseFromJSON,
21450
+ DomainListResponseFromJSONTyped,
21451
+ DomainListResponseMetaFromJSON,
21452
+ DomainListResponseMetaFromJSONTyped,
21453
+ DomainListResponseMetaToJSON,
21454
+ DomainListResponseMetaToJSONTyped,
21455
+ DomainListResponseToJSON,
21456
+ DomainListResponseToJSONTyped,
21457
+ DomainResponseFromJSON,
21458
+ DomainResponseFromJSONTyped,
21459
+ DomainResponseStatusEnum,
21460
+ DomainResponseToJSON,
21461
+ DomainResponseToJSONTyped,
21462
+ DomainsApi,
20696
21463
  EmailAddressFromJSON,
20697
21464
  EmailAddressFromJSONTyped,
20698
21465
  EmailAddressToJSON,
@@ -20796,6 +21563,14 @@ export {
20796
21563
  GenerateWaaSPortalToken201ResponseFromJSONTyped,
20797
21564
  GenerateWaaSPortalToken201ResponseToJSON,
20798
21565
  GenerateWaaSPortalToken201ResponseToJSONTyped,
21566
+ GetDomain200ResponseFromJSON,
21567
+ GetDomain200ResponseFromJSONTyped,
21568
+ GetDomain200ResponseMetaFromJSON,
21569
+ GetDomain200ResponseMetaFromJSONTyped,
21570
+ GetDomain200ResponseMetaToJSON,
21571
+ GetDomain200ResponseMetaToJSONTyped,
21572
+ GetDomain200ResponseToJSON,
21573
+ GetDomain200ResponseToJSONTyped,
20799
21574
  GetWaaSEndpoint200ResponseFromJSON,
20800
21575
  GetWaaSEndpoint200ResponseFromJSONTyped,
20801
21576
  GetWaaSEndpoint200ResponseToJSON,
@@ -21693,6 +22468,24 @@ export {
21693
22468
  ValidateResetTokenResponseFromJSONTyped,
21694
22469
  ValidateResetTokenResponseToJSON,
21695
22470
  ValidateResetTokenResponseToJSONTyped,
22471
+ VerificationStatusResponseDataFromJSON,
22472
+ VerificationStatusResponseDataFromJSONTyped,
22473
+ VerificationStatusResponseDataStatusEnum,
22474
+ VerificationStatusResponseDataToJSON,
22475
+ VerificationStatusResponseDataToJSONTyped,
22476
+ VerificationStatusResponseFromJSON,
22477
+ VerificationStatusResponseFromJSONTyped,
22478
+ VerificationStatusResponseToJSON,
22479
+ VerificationStatusResponseToJSONTyped,
22480
+ VerifyDomainResponseDataFromJSON,
22481
+ VerifyDomainResponseDataFromJSONTyped,
22482
+ VerifyDomainResponseDataStatusEnum,
22483
+ VerifyDomainResponseDataToJSON,
22484
+ VerifyDomainResponseDataToJSONTyped,
22485
+ VerifyDomainResponseFromJSON,
22486
+ VerifyDomainResponseFromJSONTyped,
22487
+ VerifyDomainResponseToJSON,
22488
+ VerifyDomainResponseToJSONTyped,
21696
22489
  VerifySmsConfigDataFromJSON,
21697
22490
  VerifySmsConfigDataFromJSONTyped,
21698
22491
  VerifySmsConfigDataToJSON,
@@ -22005,6 +22798,9 @@ export {
22005
22798
  ZyphrWebhookVerificationError,
22006
22799
  canConsumeForm,
22007
22800
  exists,
22801
+ instanceOfAddDomain200Response,
22802
+ instanceOfAddDomain200ResponseMeta,
22803
+ instanceOfAddDomainRequest,
22008
22804
  instanceOfAddTopicSubscribersRequest,
22009
22805
  instanceOfApiError,
22010
22806
  instanceOfApiErrorError,
@@ -22070,6 +22866,8 @@ export {
22070
22866
  instanceOfCreateWaaSEventType201Response,
22071
22867
  instanceOfCreateWaaSEventTypeRequest,
22072
22868
  instanceOfCreateWebhookRequest,
22869
+ instanceOfDeleteDomainResponse,
22870
+ instanceOfDeleteDomainResponseData,
22073
22871
  instanceOfDeleteResult,
22074
22872
  instanceOfDeleteResultData,
22075
22873
  instanceOfDevice,
@@ -22080,6 +22878,10 @@ export {
22080
22878
  instanceOfDeviceResponse,
22081
22879
  instanceOfDeviceStats,
22082
22880
  instanceOfDeviceStatsResponse,
22881
+ instanceOfDnsRecord,
22882
+ instanceOfDomainListResponse,
22883
+ instanceOfDomainListResponseMeta,
22884
+ instanceOfDomainResponse,
22083
22885
  instanceOfEmailAddress,
22084
22886
  instanceOfEmailAttachment,
22085
22887
  instanceOfEmailEvent,
@@ -22104,6 +22906,8 @@ export {
22104
22906
  instanceOfGenerateSubscriberToken200ResponseData,
22105
22907
  instanceOfGenerateSubscriberTokenRequest,
22106
22908
  instanceOfGenerateWaaSPortalToken201Response,
22909
+ instanceOfGetDomain200Response,
22910
+ instanceOfGetDomain200ResponseMeta,
22107
22911
  instanceOfGetWaaSEndpoint200Response,
22108
22912
  instanceOfGetWaaSUsage200Response,
22109
22913
  instanceOfInAppNotification,
@@ -22316,6 +23120,10 @@ export {
22316
23120
  instanceOfValidateResetTokenRequest,
22317
23121
  instanceOfValidateResetTokenResponse,
22318
23122
  instanceOfValidateResetTokenResponseData,
23123
+ instanceOfVerificationStatusResponse,
23124
+ instanceOfVerificationStatusResponseData,
23125
+ instanceOfVerifyDomainResponse,
23126
+ instanceOfVerifyDomainResponseData,
22319
23127
  instanceOfVerifySmsConfigData,
22320
23128
  instanceOfVerifySmsConfigResponse,
22321
23129
  instanceOfWaaSApplication,