@zyphr-dev/node-sdk 0.1.28 → 0.1.31

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 CHANGED
@@ -321,14 +321,6 @@ __export(index_exports, {
321
321
  CreateWebhookRequestToJSON: () => CreateWebhookRequestToJSON,
322
322
  CreateWebhookRequestToJSONTyped: () => CreateWebhookRequestToJSONTyped,
323
323
  DefaultConfig: () => DefaultConfig,
324
- DeleteDomainResponseDataFromJSON: () => DeleteDomainResponseDataFromJSON,
325
- DeleteDomainResponseDataFromJSONTyped: () => DeleteDomainResponseDataFromJSONTyped,
326
- DeleteDomainResponseDataToJSON: () => DeleteDomainResponseDataToJSON,
327
- DeleteDomainResponseDataToJSONTyped: () => DeleteDomainResponseDataToJSONTyped,
328
- DeleteDomainResponseFromJSON: () => DeleteDomainResponseFromJSON,
329
- DeleteDomainResponseFromJSONTyped: () => DeleteDomainResponseFromJSONTyped,
330
- DeleteDomainResponseToJSON: () => DeleteDomainResponseToJSON,
331
- DeleteDomainResponseToJSONTyped: () => DeleteDomainResponseToJSONTyped,
332
324
  DeleteResultDataFromJSON: () => DeleteResultDataFromJSON,
333
325
  DeleteResultDataFromJSONTyped: () => DeleteResultDataFromJSONTyped,
334
326
  DeleteResultDataToJSON: () => DeleteResultDataToJSON,
@@ -494,14 +486,6 @@ __export(index_exports, {
494
486
  GenerateWaaSPortalToken201ResponseFromJSONTyped: () => GenerateWaaSPortalToken201ResponseFromJSONTyped,
495
487
  GenerateWaaSPortalToken201ResponseToJSON: () => GenerateWaaSPortalToken201ResponseToJSON,
496
488
  GenerateWaaSPortalToken201ResponseToJSONTyped: () => GenerateWaaSPortalToken201ResponseToJSONTyped,
497
- GetDomain200ResponseFromJSON: () => GetDomain200ResponseFromJSON,
498
- GetDomain200ResponseFromJSONTyped: () => GetDomain200ResponseFromJSONTyped,
499
- GetDomain200ResponseMetaFromJSON: () => GetDomain200ResponseMetaFromJSON,
500
- GetDomain200ResponseMetaFromJSONTyped: () => GetDomain200ResponseMetaFromJSONTyped,
501
- GetDomain200ResponseMetaToJSON: () => GetDomain200ResponseMetaToJSON,
502
- GetDomain200ResponseMetaToJSONTyped: () => GetDomain200ResponseMetaToJSONTyped,
503
- GetDomain200ResponseToJSON: () => GetDomain200ResponseToJSON,
504
- GetDomain200ResponseToJSONTyped: () => GetDomain200ResponseToJSONTyped,
505
489
  GetWaaSEndpoint200ResponseFromJSON: () => GetWaaSEndpoint200ResponseFromJSON,
506
490
  GetWaaSEndpoint200ResponseFromJSONTyped: () => GetWaaSEndpoint200ResponseFromJSONTyped,
507
491
  GetWaaSEndpoint200ResponseToJSON: () => GetWaaSEndpoint200ResponseToJSON,
@@ -1399,24 +1383,6 @@ __export(index_exports, {
1399
1383
  ValidateResetTokenResponseFromJSONTyped: () => ValidateResetTokenResponseFromJSONTyped,
1400
1384
  ValidateResetTokenResponseToJSON: () => ValidateResetTokenResponseToJSON,
1401
1385
  ValidateResetTokenResponseToJSONTyped: () => ValidateResetTokenResponseToJSONTyped,
1402
- VerificationStatusResponseDataFromJSON: () => VerificationStatusResponseDataFromJSON,
1403
- VerificationStatusResponseDataFromJSONTyped: () => VerificationStatusResponseDataFromJSONTyped,
1404
- VerificationStatusResponseDataStatusEnum: () => VerificationStatusResponseDataStatusEnum,
1405
- VerificationStatusResponseDataToJSON: () => VerificationStatusResponseDataToJSON,
1406
- VerificationStatusResponseDataToJSONTyped: () => VerificationStatusResponseDataToJSONTyped,
1407
- VerificationStatusResponseFromJSON: () => VerificationStatusResponseFromJSON,
1408
- VerificationStatusResponseFromJSONTyped: () => VerificationStatusResponseFromJSONTyped,
1409
- VerificationStatusResponseToJSON: () => VerificationStatusResponseToJSON,
1410
- VerificationStatusResponseToJSONTyped: () => VerificationStatusResponseToJSONTyped,
1411
- VerifyDomainResponseDataFromJSON: () => VerifyDomainResponseDataFromJSON,
1412
- VerifyDomainResponseDataFromJSONTyped: () => VerifyDomainResponseDataFromJSONTyped,
1413
- VerifyDomainResponseDataStatusEnum: () => VerifyDomainResponseDataStatusEnum,
1414
- VerifyDomainResponseDataToJSON: () => VerifyDomainResponseDataToJSON,
1415
- VerifyDomainResponseDataToJSONTyped: () => VerifyDomainResponseDataToJSONTyped,
1416
- VerifyDomainResponseFromJSON: () => VerifyDomainResponseFromJSON,
1417
- VerifyDomainResponseFromJSONTyped: () => VerifyDomainResponseFromJSONTyped,
1418
- VerifyDomainResponseToJSON: () => VerifyDomainResponseToJSON,
1419
- VerifyDomainResponseToJSONTyped: () => VerifyDomainResponseToJSONTyped,
1420
1386
  VerifySmsConfigDataFromJSON: () => VerifySmsConfigDataFromJSON,
1421
1387
  VerifySmsConfigDataFromJSONTyped: () => VerifySmsConfigDataFromJSONTyped,
1422
1388
  VerifySmsConfigDataToJSON: () => VerifySmsConfigDataToJSON,
@@ -1797,8 +1763,6 @@ __export(index_exports, {
1797
1763
  instanceOfCreateWaaSEventType201Response: () => instanceOfCreateWaaSEventType201Response,
1798
1764
  instanceOfCreateWaaSEventTypeRequest: () => instanceOfCreateWaaSEventTypeRequest,
1799
1765
  instanceOfCreateWebhookRequest: () => instanceOfCreateWebhookRequest,
1800
- instanceOfDeleteDomainResponse: () => instanceOfDeleteDomainResponse,
1801
- instanceOfDeleteDomainResponseData: () => instanceOfDeleteDomainResponseData,
1802
1766
  instanceOfDeleteResult: () => instanceOfDeleteResult,
1803
1767
  instanceOfDeleteResultData: () => instanceOfDeleteResultData,
1804
1768
  instanceOfDevice: () => instanceOfDevice,
@@ -1837,8 +1801,6 @@ __export(index_exports, {
1837
1801
  instanceOfGenerateSubscriberToken200ResponseData: () => instanceOfGenerateSubscriberToken200ResponseData,
1838
1802
  instanceOfGenerateSubscriberTokenRequest: () => instanceOfGenerateSubscriberTokenRequest,
1839
1803
  instanceOfGenerateWaaSPortalToken201Response: () => instanceOfGenerateWaaSPortalToken201Response,
1840
- instanceOfGetDomain200Response: () => instanceOfGetDomain200Response,
1841
- instanceOfGetDomain200ResponseMeta: () => instanceOfGetDomain200ResponseMeta,
1842
1804
  instanceOfGetWaaSEndpoint200Response: () => instanceOfGetWaaSEndpoint200Response,
1843
1805
  instanceOfGetWaaSUsage200Response: () => instanceOfGetWaaSUsage200Response,
1844
1806
  instanceOfInAppNotification: () => instanceOfInAppNotification,
@@ -2051,10 +2013,6 @@ __export(index_exports, {
2051
2013
  instanceOfValidateResetTokenRequest: () => instanceOfValidateResetTokenRequest,
2052
2014
  instanceOfValidateResetTokenResponse: () => instanceOfValidateResetTokenResponse,
2053
2015
  instanceOfValidateResetTokenResponseData: () => instanceOfValidateResetTokenResponseData,
2054
- instanceOfVerificationStatusResponse: () => instanceOfVerificationStatusResponse,
2055
- instanceOfVerificationStatusResponseData: () => instanceOfVerificationStatusResponseData,
2056
- instanceOfVerifyDomainResponse: () => instanceOfVerifyDomainResponse,
2057
- instanceOfVerifyDomainResponseData: () => instanceOfVerifyDomainResponseData,
2058
2016
  instanceOfVerifySmsConfigData: () => instanceOfVerifySmsConfigData,
2059
2017
  instanceOfVerifySmsConfigResponse: () => instanceOfVerifySmsConfigResponse,
2060
2018
  instanceOfWaaSApplication: () => instanceOfWaaSApplication,
@@ -5078,95 +5036,6 @@ function CreateWebhookRequestToJSONTyped(value, ignoreDiscriminator = false) {
5078
5036
  };
5079
5037
  }
5080
5038
 
5081
- // src/src/models/GetDomain200ResponseMeta.ts
5082
- function instanceOfGetDomain200ResponseMeta(value) {
5083
- return true;
5084
- }
5085
- function GetDomain200ResponseMetaFromJSON(json) {
5086
- return GetDomain200ResponseMetaFromJSONTyped(json, false);
5087
- }
5088
- function GetDomain200ResponseMetaFromJSONTyped(json, ignoreDiscriminator) {
5089
- if (json == null) {
5090
- return json;
5091
- }
5092
- return {
5093
- "requestId": json["request_id"] == null ? void 0 : json["request_id"]
5094
- };
5095
- }
5096
- function GetDomain200ResponseMetaToJSON(json) {
5097
- return GetDomain200ResponseMetaToJSONTyped(json, false);
5098
- }
5099
- function GetDomain200ResponseMetaToJSONTyped(value, ignoreDiscriminator = false) {
5100
- if (value == null) {
5101
- return value;
5102
- }
5103
- return {
5104
- "request_id": value["requestId"]
5105
- };
5106
- }
5107
-
5108
- // src/src/models/DeleteDomainResponseData.ts
5109
- function instanceOfDeleteDomainResponseData(value) {
5110
- if (!("id" in value) || value["id"] === void 0) return false;
5111
- if (!("deleted" in value) || value["deleted"] === void 0) return false;
5112
- return true;
5113
- }
5114
- function DeleteDomainResponseDataFromJSON(json) {
5115
- return DeleteDomainResponseDataFromJSONTyped(json, false);
5116
- }
5117
- function DeleteDomainResponseDataFromJSONTyped(json, ignoreDiscriminator) {
5118
- if (json == null) {
5119
- return json;
5120
- }
5121
- return {
5122
- "id": json["id"],
5123
- "deleted": json["deleted"]
5124
- };
5125
- }
5126
- function DeleteDomainResponseDataToJSON(json) {
5127
- return DeleteDomainResponseDataToJSONTyped(json, false);
5128
- }
5129
- function DeleteDomainResponseDataToJSONTyped(value, ignoreDiscriminator = false) {
5130
- if (value == null) {
5131
- return value;
5132
- }
5133
- return {
5134
- "id": value["id"],
5135
- "deleted": value["deleted"]
5136
- };
5137
- }
5138
-
5139
- // src/src/models/DeleteDomainResponse.ts
5140
- function instanceOfDeleteDomainResponse(value) {
5141
- if (!("data" in value) || value["data"] === void 0) return false;
5142
- if (!("meta" in value) || value["meta"] === void 0) return false;
5143
- return true;
5144
- }
5145
- function DeleteDomainResponseFromJSON(json) {
5146
- return DeleteDomainResponseFromJSONTyped(json, false);
5147
- }
5148
- function DeleteDomainResponseFromJSONTyped(json, ignoreDiscriminator) {
5149
- if (json == null) {
5150
- return json;
5151
- }
5152
- return {
5153
- "data": DeleteDomainResponseDataFromJSON(json["data"]),
5154
- "meta": GetDomain200ResponseMetaFromJSON(json["meta"])
5155
- };
5156
- }
5157
- function DeleteDomainResponseToJSON(json) {
5158
- return DeleteDomainResponseToJSONTyped(json, false);
5159
- }
5160
- function DeleteDomainResponseToJSONTyped(value, ignoreDiscriminator = false) {
5161
- if (value == null) {
5162
- return value;
5163
- }
5164
- return {
5165
- "data": DeleteDomainResponseDataToJSON(value["data"]),
5166
- "meta": GetDomain200ResponseMetaToJSON(value["meta"])
5167
- };
5168
- }
5169
-
5170
5039
  // src/src/models/DeleteResultData.ts
5171
5040
  function instanceOfDeleteResultData(value) {
5172
5041
  return true;
@@ -6526,35 +6395,6 @@ function GenerateWaaSPortalToken201ResponseToJSONTyped(value, ignoreDiscriminato
6526
6395
  };
6527
6396
  }
6528
6397
 
6529
- // src/src/models/GetDomain200Response.ts
6530
- function instanceOfGetDomain200Response(value) {
6531
- return true;
6532
- }
6533
- function GetDomain200ResponseFromJSON(json) {
6534
- return GetDomain200ResponseFromJSONTyped(json, false);
6535
- }
6536
- function GetDomain200ResponseFromJSONTyped(json, ignoreDiscriminator) {
6537
- if (json == null) {
6538
- return json;
6539
- }
6540
- return {
6541
- "data": json["data"] == null ? void 0 : DomainResponseFromJSON(json["data"]),
6542
- "meta": json["meta"] == null ? void 0 : GetDomain200ResponseMetaFromJSON(json["meta"])
6543
- };
6544
- }
6545
- function GetDomain200ResponseToJSON(json) {
6546
- return GetDomain200ResponseToJSONTyped(json, false);
6547
- }
6548
- function GetDomain200ResponseToJSONTyped(value, ignoreDiscriminator = false) {
6549
- if (value == null) {
6550
- return value;
6551
- }
6552
- return {
6553
- "data": DomainResponseToJSON(value["data"]),
6554
- "meta": GetDomain200ResponseMetaToJSON(value["meta"])
6555
- };
6556
- }
6557
-
6558
6398
  // src/src/models/WaaSEndpoint.ts
6559
6399
  var WaaSEndpointStatusEnum = {
6560
6400
  ACTIVE: "active",
@@ -13541,161 +13381,6 @@ function ValidateResetTokenResponseToJSONTyped(value, ignoreDiscriminator = fals
13541
13381
  };
13542
13382
  }
13543
13383
 
13544
- // src/src/models/VerificationStatusResponseData.ts
13545
- var VerificationStatusResponseDataStatusEnum = {
13546
- PENDING: "pending",
13547
- VERIFYING: "verifying",
13548
- VERIFIED: "verified",
13549
- FAILED: "failed"
13550
- };
13551
- function instanceOfVerificationStatusResponseData(value) {
13552
- if (!("domainId" in value) || value["domainId"] === void 0) return false;
13553
- if (!("domain" in value) || value["domain"] === void 0) return false;
13554
- if (!("status" in value) || value["status"] === void 0) return false;
13555
- if (!("recordsVerified" in value) || value["recordsVerified"] === void 0) return false;
13556
- if (!("recordsTotal" in value) || value["recordsTotal"] === void 0) return false;
13557
- if (!("dnsRecords" in value) || value["dnsRecords"] === void 0) return false;
13558
- return true;
13559
- }
13560
- function VerificationStatusResponseDataFromJSON(json) {
13561
- return VerificationStatusResponseDataFromJSONTyped(json, false);
13562
- }
13563
- function VerificationStatusResponseDataFromJSONTyped(json, ignoreDiscriminator) {
13564
- if (json == null) {
13565
- return json;
13566
- }
13567
- return {
13568
- "domainId": json["domain_id"],
13569
- "domain": json["domain"],
13570
- "status": json["status"],
13571
- "recordsVerified": json["records_verified"],
13572
- "recordsTotal": json["records_total"],
13573
- "progress": json["progress"] == null ? void 0 : json["progress"],
13574
- "dnsRecords": json["dns_records"].map(DnsRecordFromJSON),
13575
- "lastCheckedAt": json["last_checked_at"] == null ? void 0 : new Date(json["last_checked_at"])
13576
- };
13577
- }
13578
- function VerificationStatusResponseDataToJSON(json) {
13579
- return VerificationStatusResponseDataToJSONTyped(json, false);
13580
- }
13581
- function VerificationStatusResponseDataToJSONTyped(value, ignoreDiscriminator = false) {
13582
- if (value == null) {
13583
- return value;
13584
- }
13585
- return {
13586
- "domain_id": value["domainId"],
13587
- "domain": value["domain"],
13588
- "status": value["status"],
13589
- "records_verified": value["recordsVerified"],
13590
- "records_total": value["recordsTotal"],
13591
- "progress": value["progress"],
13592
- "dns_records": value["dnsRecords"].map(DnsRecordToJSON),
13593
- "last_checked_at": value["lastCheckedAt"] == null ? void 0 : value["lastCheckedAt"].toISOString()
13594
- };
13595
- }
13596
-
13597
- // src/src/models/VerificationStatusResponse.ts
13598
- function instanceOfVerificationStatusResponse(value) {
13599
- if (!("data" in value) || value["data"] === void 0) return false;
13600
- if (!("meta" in value) || value["meta"] === void 0) return false;
13601
- return true;
13602
- }
13603
- function VerificationStatusResponseFromJSON(json) {
13604
- return VerificationStatusResponseFromJSONTyped(json, false);
13605
- }
13606
- function VerificationStatusResponseFromJSONTyped(json, ignoreDiscriminator) {
13607
- if (json == null) {
13608
- return json;
13609
- }
13610
- return {
13611
- "data": VerificationStatusResponseDataFromJSON(json["data"]),
13612
- "meta": GetDomain200ResponseMetaFromJSON(json["meta"])
13613
- };
13614
- }
13615
- function VerificationStatusResponseToJSON(json) {
13616
- return VerificationStatusResponseToJSONTyped(json, false);
13617
- }
13618
- function VerificationStatusResponseToJSONTyped(value, ignoreDiscriminator = false) {
13619
- if (value == null) {
13620
- return value;
13621
- }
13622
- return {
13623
- "data": VerificationStatusResponseDataToJSON(value["data"]),
13624
- "meta": GetDomain200ResponseMetaToJSON(value["meta"])
13625
- };
13626
- }
13627
-
13628
- // src/src/models/VerifyDomainResponseData.ts
13629
- var VerifyDomainResponseDataStatusEnum = {
13630
- VERIFYING: "verifying"
13631
- };
13632
- function instanceOfVerifyDomainResponseData(value) {
13633
- if (!("jobId" in value) || value["jobId"] === void 0) return false;
13634
- if (!("domainId" in value) || value["domainId"] === void 0) return false;
13635
- if (!("domain" in value) || value["domain"] === void 0) return false;
13636
- if (!("status" in value) || value["status"] === void 0) return false;
13637
- return true;
13638
- }
13639
- function VerifyDomainResponseDataFromJSON(json) {
13640
- return VerifyDomainResponseDataFromJSONTyped(json, false);
13641
- }
13642
- function VerifyDomainResponseDataFromJSONTyped(json, ignoreDiscriminator) {
13643
- if (json == null) {
13644
- return json;
13645
- }
13646
- return {
13647
- "jobId": json["job_id"],
13648
- "domainId": json["domain_id"],
13649
- "domain": json["domain"],
13650
- "status": json["status"]
13651
- };
13652
- }
13653
- function VerifyDomainResponseDataToJSON(json) {
13654
- return VerifyDomainResponseDataToJSONTyped(json, false);
13655
- }
13656
- function VerifyDomainResponseDataToJSONTyped(value, ignoreDiscriminator = false) {
13657
- if (value == null) {
13658
- return value;
13659
- }
13660
- return {
13661
- "job_id": value["jobId"],
13662
- "domain_id": value["domainId"],
13663
- "domain": value["domain"],
13664
- "status": value["status"]
13665
- };
13666
- }
13667
-
13668
- // src/src/models/VerifyDomainResponse.ts
13669
- function instanceOfVerifyDomainResponse(value) {
13670
- if (!("data" in value) || value["data"] === void 0) return false;
13671
- if (!("meta" in value) || value["meta"] === void 0) return false;
13672
- return true;
13673
- }
13674
- function VerifyDomainResponseFromJSON(json) {
13675
- return VerifyDomainResponseFromJSONTyped(json, false);
13676
- }
13677
- function VerifyDomainResponseFromJSONTyped(json, ignoreDiscriminator) {
13678
- if (json == null) {
13679
- return json;
13680
- }
13681
- return {
13682
- "data": VerifyDomainResponseDataFromJSON(json["data"]),
13683
- "meta": AddDomain200ResponseMetaFromJSON(json["meta"])
13684
- };
13685
- }
13686
- function VerifyDomainResponseToJSON(json) {
13687
- return VerifyDomainResponseToJSONTyped(json, false);
13688
- }
13689
- function VerifyDomainResponseToJSONTyped(value, ignoreDiscriminator = false) {
13690
- if (value == null) {
13691
- return value;
13692
- }
13693
- return {
13694
- "data": VerifyDomainResponseDataToJSON(value["data"]),
13695
- "meta": AddDomain200ResponseMetaToJSON(value["meta"])
13696
- };
13697
- }
13698
-
13699
13384
  // src/src/models/VerifySmsConfigData.ts
13700
13385
  function instanceOfVerifySmsConfigData(value) {
13701
13386
  return true;
@@ -17941,7 +17626,7 @@ var DomainsApi = class extends BaseAPI {
17941
17626
  headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key");
17942
17627
  }
17943
17628
  const response = await this.request({
17944
- path: `/v1/domains`,
17629
+ path: `/domains`,
17945
17630
  method: "POST",
17946
17631
  headers: headerParameters,
17947
17632
  query: queryParameters,
@@ -17957,102 +17642,6 @@ var DomainsApi = class extends BaseAPI {
17957
17642
  const response = await this.addDomainRaw({ addDomainRequest }, initOverrides);
17958
17643
  return await response.value();
17959
17644
  }
17960
- /**
17961
- * 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.
17962
- * Remove a sending domain
17963
- */
17964
- async deleteDomainRaw(requestParameters, initOverrides) {
17965
- if (requestParameters["id"] == null) {
17966
- throw new RequiredError(
17967
- "id",
17968
- 'Required parameter "id" was null or undefined when calling deleteDomain().'
17969
- );
17970
- }
17971
- const queryParameters = {};
17972
- const headerParameters = {};
17973
- if (this.configuration && this.configuration.apiKey) {
17974
- headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key");
17975
- }
17976
- const response = await this.request({
17977
- path: `/v1/domains/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters["id"]))),
17978
- method: "DELETE",
17979
- headers: headerParameters,
17980
- query: queryParameters
17981
- }, initOverrides);
17982
- return new JSONApiResponse(response, (jsonValue) => DeleteDomainResponseFromJSON(jsonValue));
17983
- }
17984
- /**
17985
- * 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.
17986
- * Remove a sending domain
17987
- */
17988
- async deleteDomain(id, initOverrides) {
17989
- const response = await this.deleteDomainRaw({ id }, initOverrides);
17990
- return await response.value();
17991
- }
17992
- /**
17993
- * Retrieve a single sending domain by ID, including DNS records and verification counters.
17994
- * Get a sending domain
17995
- */
17996
- async getDomainRaw(requestParameters, initOverrides) {
17997
- if (requestParameters["id"] == null) {
17998
- throw new RequiredError(
17999
- "id",
18000
- 'Required parameter "id" was null or undefined when calling getDomain().'
18001
- );
18002
- }
18003
- const queryParameters = {};
18004
- const headerParameters = {};
18005
- if (this.configuration && this.configuration.apiKey) {
18006
- headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key");
18007
- }
18008
- const response = await this.request({
18009
- path: `/v1/domains/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters["id"]))),
18010
- method: "GET",
18011
- headers: headerParameters,
18012
- query: queryParameters
18013
- }, initOverrides);
18014
- return new JSONApiResponse(response, (jsonValue) => GetDomain200ResponseFromJSON(jsonValue));
18015
- }
18016
- /**
18017
- * Retrieve a single sending domain by ID, including DNS records and verification counters.
18018
- * Get a sending domain
18019
- */
18020
- async getDomain(id, initOverrides) {
18021
- const response = await this.getDomainRaw({ id }, initOverrides);
18022
- return await response.value();
18023
- }
18024
- /**
18025
- * 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).
18026
- * Get domain verification status
18027
- */
18028
- async getDomainVerificationStatusRaw(requestParameters, initOverrides) {
18029
- if (requestParameters["id"] == null) {
18030
- throw new RequiredError(
18031
- "id",
18032
- 'Required parameter "id" was null or undefined when calling getDomainVerificationStatus().'
18033
- );
18034
- }
18035
- const queryParameters = {};
18036
- const headerParameters = {};
18037
- if (this.configuration && this.configuration.apiKey) {
18038
- headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key");
18039
- }
18040
- const response = await this.request({
18041
- path: `/v1/domains/{id}/verification-status`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters["id"]))),
18042
- method: "GET",
18043
- headers: headerParameters,
18044
- query: queryParameters
18045
- }, initOverrides);
18046
- return new JSONApiResponse(response, (jsonValue) => VerificationStatusResponseFromJSON(jsonValue));
18047
- }
18048
- /**
18049
- * 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).
18050
- * Get domain verification status
18051
- */
18052
- async getDomainVerificationStatus(id, initOverrides) {
18053
- const response = await this.getDomainVerificationStatusRaw({ id }, initOverrides);
18054
- return await response.value();
18055
- }
18056
17645
  /**
18057
17646
  * List sending domains on the current project, with verification status and DNS records.
18058
17647
  * List sending domains
@@ -18064,7 +17653,7 @@ var DomainsApi = class extends BaseAPI {
18064
17653
  headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key");
18065
17654
  }
18066
17655
  const response = await this.request({
18067
- path: `/v1/domains`,
17656
+ path: `/domains`,
18068
17657
  method: "GET",
18069
17658
  headers: headerParameters,
18070
17659
  query: queryParameters
@@ -18079,38 +17668,6 @@ var DomainsApi = class extends BaseAPI {
18079
17668
  const response = await this.listDomainsRaw(initOverrides);
18080
17669
  return await response.value();
18081
17670
  }
18082
- /**
18083
- * 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).
18084
- * Trigger domain verification
18085
- */
18086
- async verifyDomainRaw(requestParameters, initOverrides) {
18087
- if (requestParameters["id"] == null) {
18088
- throw new RequiredError(
18089
- "id",
18090
- 'Required parameter "id" was null or undefined when calling verifyDomain().'
18091
- );
18092
- }
18093
- const queryParameters = {};
18094
- const headerParameters = {};
18095
- if (this.configuration && this.configuration.apiKey) {
18096
- headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key");
18097
- }
18098
- const response = await this.request({
18099
- path: `/v1/domains/{id}/verify`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters["id"]))),
18100
- method: "POST",
18101
- headers: headerParameters,
18102
- query: queryParameters
18103
- }, initOverrides);
18104
- return new JSONApiResponse(response, (jsonValue) => VerifyDomainResponseFromJSON(jsonValue));
18105
- }
18106
- /**
18107
- * 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).
18108
- * Trigger domain verification
18109
- */
18110
- async verifyDomain(id, initOverrides) {
18111
- const response = await this.verifyDomainRaw({ id }, initOverrides);
18112
- return await response.value();
18113
- }
18114
17671
  };
18115
17672
 
18116
17673
  // src/src/apis/EmailsApi.ts
@@ -23142,6 +22699,7 @@ var Zyphr = class {
23142
22699
  webhooks;
23143
22700
  topics;
23144
22701
  devices;
22702
+ domains;
23145
22703
  waas;
23146
22704
  auth;
23147
22705
  options;
@@ -23166,6 +22724,7 @@ var Zyphr = class {
23166
22724
  this.webhooks = new WebhooksApi(config);
23167
22725
  this.topics = new TopicsApi(config);
23168
22726
  this.devices = new DevicesApi(config);
22727
+ this.domains = new DomainsApi(config);
23169
22728
  this.waas = {
23170
22729
  applications: new WaaSApplicationsApi(config),
23171
22730
  eventTypes: new WaaSEventTypesApi(config),
@@ -23522,14 +23081,6 @@ var SDK_VERSION = "0.1.0";
23522
23081
  CreateWebhookRequestToJSON,
23523
23082
  CreateWebhookRequestToJSONTyped,
23524
23083
  DefaultConfig,
23525
- DeleteDomainResponseDataFromJSON,
23526
- DeleteDomainResponseDataFromJSONTyped,
23527
- DeleteDomainResponseDataToJSON,
23528
- DeleteDomainResponseDataToJSONTyped,
23529
- DeleteDomainResponseFromJSON,
23530
- DeleteDomainResponseFromJSONTyped,
23531
- DeleteDomainResponseToJSON,
23532
- DeleteDomainResponseToJSONTyped,
23533
23084
  DeleteResultDataFromJSON,
23534
23085
  DeleteResultDataFromJSONTyped,
23535
23086
  DeleteResultDataToJSON,
@@ -23695,14 +23246,6 @@ var SDK_VERSION = "0.1.0";
23695
23246
  GenerateWaaSPortalToken201ResponseFromJSONTyped,
23696
23247
  GenerateWaaSPortalToken201ResponseToJSON,
23697
23248
  GenerateWaaSPortalToken201ResponseToJSONTyped,
23698
- GetDomain200ResponseFromJSON,
23699
- GetDomain200ResponseFromJSONTyped,
23700
- GetDomain200ResponseMetaFromJSON,
23701
- GetDomain200ResponseMetaFromJSONTyped,
23702
- GetDomain200ResponseMetaToJSON,
23703
- GetDomain200ResponseMetaToJSONTyped,
23704
- GetDomain200ResponseToJSON,
23705
- GetDomain200ResponseToJSONTyped,
23706
23249
  GetWaaSEndpoint200ResponseFromJSON,
23707
23250
  GetWaaSEndpoint200ResponseFromJSONTyped,
23708
23251
  GetWaaSEndpoint200ResponseToJSON,
@@ -24600,24 +24143,6 @@ var SDK_VERSION = "0.1.0";
24600
24143
  ValidateResetTokenResponseFromJSONTyped,
24601
24144
  ValidateResetTokenResponseToJSON,
24602
24145
  ValidateResetTokenResponseToJSONTyped,
24603
- VerificationStatusResponseDataFromJSON,
24604
- VerificationStatusResponseDataFromJSONTyped,
24605
- VerificationStatusResponseDataStatusEnum,
24606
- VerificationStatusResponseDataToJSON,
24607
- VerificationStatusResponseDataToJSONTyped,
24608
- VerificationStatusResponseFromJSON,
24609
- VerificationStatusResponseFromJSONTyped,
24610
- VerificationStatusResponseToJSON,
24611
- VerificationStatusResponseToJSONTyped,
24612
- VerifyDomainResponseDataFromJSON,
24613
- VerifyDomainResponseDataFromJSONTyped,
24614
- VerifyDomainResponseDataStatusEnum,
24615
- VerifyDomainResponseDataToJSON,
24616
- VerifyDomainResponseDataToJSONTyped,
24617
- VerifyDomainResponseFromJSON,
24618
- VerifyDomainResponseFromJSONTyped,
24619
- VerifyDomainResponseToJSON,
24620
- VerifyDomainResponseToJSONTyped,
24621
24146
  VerifySmsConfigDataFromJSON,
24622
24147
  VerifySmsConfigDataFromJSONTyped,
24623
24148
  VerifySmsConfigDataToJSON,
@@ -24998,8 +24523,6 @@ var SDK_VERSION = "0.1.0";
24998
24523
  instanceOfCreateWaaSEventType201Response,
24999
24524
  instanceOfCreateWaaSEventTypeRequest,
25000
24525
  instanceOfCreateWebhookRequest,
25001
- instanceOfDeleteDomainResponse,
25002
- instanceOfDeleteDomainResponseData,
25003
24526
  instanceOfDeleteResult,
25004
24527
  instanceOfDeleteResultData,
25005
24528
  instanceOfDevice,
@@ -25038,8 +24561,6 @@ var SDK_VERSION = "0.1.0";
25038
24561
  instanceOfGenerateSubscriberToken200ResponseData,
25039
24562
  instanceOfGenerateSubscriberTokenRequest,
25040
24563
  instanceOfGenerateWaaSPortalToken201Response,
25041
- instanceOfGetDomain200Response,
25042
- instanceOfGetDomain200ResponseMeta,
25043
24564
  instanceOfGetWaaSEndpoint200Response,
25044
24565
  instanceOfGetWaaSUsage200Response,
25045
24566
  instanceOfInAppNotification,
@@ -25252,10 +24773,6 @@ var SDK_VERSION = "0.1.0";
25252
24773
  instanceOfValidateResetTokenRequest,
25253
24774
  instanceOfValidateResetTokenResponse,
25254
24775
  instanceOfValidateResetTokenResponseData,
25255
- instanceOfVerificationStatusResponse,
25256
- instanceOfVerificationStatusResponseData,
25257
- instanceOfVerifyDomainResponse,
25258
- instanceOfVerifyDomainResponseData,
25259
24776
  instanceOfVerifySmsConfigData,
25260
24777
  instanceOfVerifySmsConfigResponse,
25261
24778
  instanceOfWaaSApplication,