@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 +4 -487
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -487
- package/dist/index.d.ts +2 -487
- package/dist/index.js +4 -445
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/.openapi-generator/FILES +0 -8
- package/src/client.ts +3 -0
- package/src/src/apis/DomainsApi.ts +2 -250
- package/src/src/models/index.ts +0 -8
- package/src/src/models/DeleteDomainResponse.ts +0 -90
- package/src/src/models/DeleteDomainResponseData.ts +0 -75
- package/src/src/models/GetDomain200Response.ts +0 -88
- package/src/src/models/GetDomain200ResponseMeta.ts +0 -65
- package/src/src/models/VerificationStatusResponse.ts +0 -90
- package/src/src/models/VerificationStatusResponseData.ts +0 -148
- package/src/src/models/VerifyDomainResponse.ts +0 -90
- package/src/src/models/VerifyDomainResponseData.ts +0 -103
package/dist/index.js
CHANGED
|
@@ -2945,95 +2945,6 @@ function CreateWebhookRequestToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
2945
2945
|
};
|
|
2946
2946
|
}
|
|
2947
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
|
-
|
|
3037
2948
|
// src/src/models/DeleteResultData.ts
|
|
3038
2949
|
function instanceOfDeleteResultData(value) {
|
|
3039
2950
|
return true;
|
|
@@ -4393,35 +4304,6 @@ function GenerateWaaSPortalToken201ResponseToJSONTyped(value, ignoreDiscriminato
|
|
|
4393
4304
|
};
|
|
4394
4305
|
}
|
|
4395
4306
|
|
|
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
|
-
|
|
4425
4307
|
// src/src/models/WaaSEndpoint.ts
|
|
4426
4308
|
var WaaSEndpointStatusEnum = {
|
|
4427
4309
|
ACTIVE: "active",
|
|
@@ -11408,161 +11290,6 @@ function ValidateResetTokenResponseToJSONTyped(value, ignoreDiscriminator = fals
|
|
|
11408
11290
|
};
|
|
11409
11291
|
}
|
|
11410
11292
|
|
|
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
|
-
|
|
11566
11293
|
// src/src/models/VerifySmsConfigData.ts
|
|
11567
11294
|
function instanceOfVerifySmsConfigData(value) {
|
|
11568
11295
|
return true;
|
|
@@ -15808,7 +15535,7 @@ var DomainsApi = class extends BaseAPI {
|
|
|
15808
15535
|
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key");
|
|
15809
15536
|
}
|
|
15810
15537
|
const response = await this.request({
|
|
15811
|
-
path: `/
|
|
15538
|
+
path: `/domains`,
|
|
15812
15539
|
method: "POST",
|
|
15813
15540
|
headers: headerParameters,
|
|
15814
15541
|
query: queryParameters,
|
|
@@ -15824,102 +15551,6 @@ var DomainsApi = class extends BaseAPI {
|
|
|
15824
15551
|
const response = await this.addDomainRaw({ addDomainRequest }, initOverrides);
|
|
15825
15552
|
return await response.value();
|
|
15826
15553
|
}
|
|
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
15554
|
/**
|
|
15924
15555
|
* List sending domains on the current project, with verification status and DNS records.
|
|
15925
15556
|
* List sending domains
|
|
@@ -15931,7 +15562,7 @@ var DomainsApi = class extends BaseAPI {
|
|
|
15931
15562
|
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key");
|
|
15932
15563
|
}
|
|
15933
15564
|
const response = await this.request({
|
|
15934
|
-
path: `/
|
|
15565
|
+
path: `/domains`,
|
|
15935
15566
|
method: "GET",
|
|
15936
15567
|
headers: headerParameters,
|
|
15937
15568
|
query: queryParameters
|
|
@@ -15946,38 +15577,6 @@ var DomainsApi = class extends BaseAPI {
|
|
|
15946
15577
|
const response = await this.listDomainsRaw(initOverrides);
|
|
15947
15578
|
return await response.value();
|
|
15948
15579
|
}
|
|
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
15580
|
};
|
|
15982
15581
|
|
|
15983
15582
|
// src/src/apis/EmailsApi.ts
|
|
@@ -21009,6 +20608,7 @@ var Zyphr = class {
|
|
|
21009
20608
|
webhooks;
|
|
21010
20609
|
topics;
|
|
21011
20610
|
devices;
|
|
20611
|
+
domains;
|
|
21012
20612
|
waas;
|
|
21013
20613
|
auth;
|
|
21014
20614
|
options;
|
|
@@ -21033,6 +20633,7 @@ var Zyphr = class {
|
|
|
21033
20633
|
this.webhooks = new WebhooksApi(config);
|
|
21034
20634
|
this.topics = new TopicsApi(config);
|
|
21035
20635
|
this.devices = new DevicesApi(config);
|
|
20636
|
+
this.domains = new DomainsApi(config);
|
|
21036
20637
|
this.waas = {
|
|
21037
20638
|
applications: new WaaSApplicationsApi(config),
|
|
21038
20639
|
eventTypes: new WaaSEventTypesApi(config),
|
|
@@ -21388,14 +20989,6 @@ export {
|
|
|
21388
20989
|
CreateWebhookRequestToJSON,
|
|
21389
20990
|
CreateWebhookRequestToJSONTyped,
|
|
21390
20991
|
DefaultConfig,
|
|
21391
|
-
DeleteDomainResponseDataFromJSON,
|
|
21392
|
-
DeleteDomainResponseDataFromJSONTyped,
|
|
21393
|
-
DeleteDomainResponseDataToJSON,
|
|
21394
|
-
DeleteDomainResponseDataToJSONTyped,
|
|
21395
|
-
DeleteDomainResponseFromJSON,
|
|
21396
|
-
DeleteDomainResponseFromJSONTyped,
|
|
21397
|
-
DeleteDomainResponseToJSON,
|
|
21398
|
-
DeleteDomainResponseToJSONTyped,
|
|
21399
20992
|
DeleteResultDataFromJSON,
|
|
21400
20993
|
DeleteResultDataFromJSONTyped,
|
|
21401
20994
|
DeleteResultDataToJSON,
|
|
@@ -21561,14 +21154,6 @@ export {
|
|
|
21561
21154
|
GenerateWaaSPortalToken201ResponseFromJSONTyped,
|
|
21562
21155
|
GenerateWaaSPortalToken201ResponseToJSON,
|
|
21563
21156
|
GenerateWaaSPortalToken201ResponseToJSONTyped,
|
|
21564
|
-
GetDomain200ResponseFromJSON,
|
|
21565
|
-
GetDomain200ResponseFromJSONTyped,
|
|
21566
|
-
GetDomain200ResponseMetaFromJSON,
|
|
21567
|
-
GetDomain200ResponseMetaFromJSONTyped,
|
|
21568
|
-
GetDomain200ResponseMetaToJSON,
|
|
21569
|
-
GetDomain200ResponseMetaToJSONTyped,
|
|
21570
|
-
GetDomain200ResponseToJSON,
|
|
21571
|
-
GetDomain200ResponseToJSONTyped,
|
|
21572
21157
|
GetWaaSEndpoint200ResponseFromJSON,
|
|
21573
21158
|
GetWaaSEndpoint200ResponseFromJSONTyped,
|
|
21574
21159
|
GetWaaSEndpoint200ResponseToJSON,
|
|
@@ -22466,24 +22051,6 @@ export {
|
|
|
22466
22051
|
ValidateResetTokenResponseFromJSONTyped,
|
|
22467
22052
|
ValidateResetTokenResponseToJSON,
|
|
22468
22053
|
ValidateResetTokenResponseToJSONTyped,
|
|
22469
|
-
VerificationStatusResponseDataFromJSON,
|
|
22470
|
-
VerificationStatusResponseDataFromJSONTyped,
|
|
22471
|
-
VerificationStatusResponseDataStatusEnum,
|
|
22472
|
-
VerificationStatusResponseDataToJSON,
|
|
22473
|
-
VerificationStatusResponseDataToJSONTyped,
|
|
22474
|
-
VerificationStatusResponseFromJSON,
|
|
22475
|
-
VerificationStatusResponseFromJSONTyped,
|
|
22476
|
-
VerificationStatusResponseToJSON,
|
|
22477
|
-
VerificationStatusResponseToJSONTyped,
|
|
22478
|
-
VerifyDomainResponseDataFromJSON,
|
|
22479
|
-
VerifyDomainResponseDataFromJSONTyped,
|
|
22480
|
-
VerifyDomainResponseDataStatusEnum,
|
|
22481
|
-
VerifyDomainResponseDataToJSON,
|
|
22482
|
-
VerifyDomainResponseDataToJSONTyped,
|
|
22483
|
-
VerifyDomainResponseFromJSON,
|
|
22484
|
-
VerifyDomainResponseFromJSONTyped,
|
|
22485
|
-
VerifyDomainResponseToJSON,
|
|
22486
|
-
VerifyDomainResponseToJSONTyped,
|
|
22487
22054
|
VerifySmsConfigDataFromJSON,
|
|
22488
22055
|
VerifySmsConfigDataFromJSONTyped,
|
|
22489
22056
|
VerifySmsConfigDataToJSON,
|
|
@@ -22864,8 +22431,6 @@ export {
|
|
|
22864
22431
|
instanceOfCreateWaaSEventType201Response,
|
|
22865
22432
|
instanceOfCreateWaaSEventTypeRequest,
|
|
22866
22433
|
instanceOfCreateWebhookRequest,
|
|
22867
|
-
instanceOfDeleteDomainResponse,
|
|
22868
|
-
instanceOfDeleteDomainResponseData,
|
|
22869
22434
|
instanceOfDeleteResult,
|
|
22870
22435
|
instanceOfDeleteResultData,
|
|
22871
22436
|
instanceOfDevice,
|
|
@@ -22904,8 +22469,6 @@ export {
|
|
|
22904
22469
|
instanceOfGenerateSubscriberToken200ResponseData,
|
|
22905
22470
|
instanceOfGenerateSubscriberTokenRequest,
|
|
22906
22471
|
instanceOfGenerateWaaSPortalToken201Response,
|
|
22907
|
-
instanceOfGetDomain200Response,
|
|
22908
|
-
instanceOfGetDomain200ResponseMeta,
|
|
22909
22472
|
instanceOfGetWaaSEndpoint200Response,
|
|
22910
22473
|
instanceOfGetWaaSUsage200Response,
|
|
22911
22474
|
instanceOfInAppNotification,
|
|
@@ -23118,10 +22681,6 @@ export {
|
|
|
23118
22681
|
instanceOfValidateResetTokenRequest,
|
|
23119
22682
|
instanceOfValidateResetTokenResponse,
|
|
23120
22683
|
instanceOfValidateResetTokenResponseData,
|
|
23121
|
-
instanceOfVerificationStatusResponse,
|
|
23122
|
-
instanceOfVerificationStatusResponseData,
|
|
23123
|
-
instanceOfVerifyDomainResponse,
|
|
23124
|
-
instanceOfVerifyDomainResponseData,
|
|
23125
22684
|
instanceOfVerifySmsConfigData,
|
|
23126
22685
|
instanceOfVerifySmsConfigResponse,
|
|
23127
22686
|
instanceOfWaaSApplication,
|