@zyphr-dev/node-sdk 0.1.31 → 0.1.32
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 +507 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +528 -2
- package/dist/index.d.ts +528 -2
- package/dist/index.js +463 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/.openapi-generator/FILES +8 -0
- package/src/src/apis/DomainsApi.ts +248 -0
- package/src/src/models/DeleteDomainResponse.ts +90 -0
- package/src/src/models/DeleteDomainResponseData.ts +75 -0
- package/src/src/models/DomainResponse.ts +47 -1
- package/src/src/models/GetDomain200Response.ts +88 -0
- package/src/src/models/GetDomain200ResponseMeta.ts +65 -0
- package/src/src/models/VerificationStatusResponse.ts +90 -0
- package/src/src/models/VerificationStatusResponseData.ts +148 -0
- package/src/src/models/VerifyDomainResponse.ts +90 -0
- package/src/src/models/VerifyDomainResponseData.ts +103 -0
- package/src/src/models/index.ts +8 -0
package/dist/index.js
CHANGED
|
@@ -345,6 +345,20 @@ var DomainResponseStatusEnum = {
|
|
|
345
345
|
VERIFIED: "verified",
|
|
346
346
|
FAILED: "failed"
|
|
347
347
|
};
|
|
348
|
+
var DomainResponseSesIdentityStatusEnum = {
|
|
349
|
+
PENDING: "pending",
|
|
350
|
+
SUCCESS: "success",
|
|
351
|
+
FAILED: "failed",
|
|
352
|
+
TEMPORARY_FAILURE: "temporary_failure",
|
|
353
|
+
NOT_STARTED: "not_started"
|
|
354
|
+
};
|
|
355
|
+
var DomainResponseSesDkimStatusEnum = {
|
|
356
|
+
PENDING: "pending",
|
|
357
|
+
SUCCESS: "success",
|
|
358
|
+
FAILED: "failed",
|
|
359
|
+
TEMPORARY_FAILURE: "temporary_failure",
|
|
360
|
+
NOT_STARTED: "not_started"
|
|
361
|
+
};
|
|
348
362
|
function instanceOfDomainResponse(value) {
|
|
349
363
|
if (!("id" in value) || value["id"] === void 0) return false;
|
|
350
364
|
if (!("domain" in value) || value["domain"] === void 0) return false;
|
|
@@ -370,6 +384,8 @@ function DomainResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
370
384
|
"recordsVerified": json["records_verified"],
|
|
371
385
|
"recordsTotal": json["records_total"],
|
|
372
386
|
"verificationToken": json["verification_token"] == null ? void 0 : json["verification_token"],
|
|
387
|
+
"sesIdentityStatus": json["ses_identity_status"] == null ? void 0 : json["ses_identity_status"],
|
|
388
|
+
"sesDkimStatus": json["ses_dkim_status"] == null ? void 0 : json["ses_dkim_status"],
|
|
373
389
|
"verifiedAt": json["verified_at"] == null ? void 0 : new Date(json["verified_at"]),
|
|
374
390
|
"lastCheckedAt": json["last_checked_at"] == null ? void 0 : new Date(json["last_checked_at"]),
|
|
375
391
|
"createdAt": new Date(json["created_at"]),
|
|
@@ -391,6 +407,8 @@ function DomainResponseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
391
407
|
"records_verified": value["recordsVerified"],
|
|
392
408
|
"records_total": value["recordsTotal"],
|
|
393
409
|
"verification_token": value["verificationToken"],
|
|
410
|
+
"ses_identity_status": value["sesIdentityStatus"],
|
|
411
|
+
"ses_dkim_status": value["sesDkimStatus"],
|
|
394
412
|
"verified_at": value["verifiedAt"] == null ? void 0 : value["verifiedAt"].toISOString(),
|
|
395
413
|
"last_checked_at": value["lastCheckedAt"] == null ? void 0 : value["lastCheckedAt"].toISOString(),
|
|
396
414
|
"created_at": value["createdAt"].toISOString(),
|
|
@@ -2945,6 +2963,95 @@ function CreateWebhookRequestToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
2945
2963
|
};
|
|
2946
2964
|
}
|
|
2947
2965
|
|
|
2966
|
+
// src/src/models/GetDomain200ResponseMeta.ts
|
|
2967
|
+
function instanceOfGetDomain200ResponseMeta(value) {
|
|
2968
|
+
return true;
|
|
2969
|
+
}
|
|
2970
|
+
function GetDomain200ResponseMetaFromJSON(json) {
|
|
2971
|
+
return GetDomain200ResponseMetaFromJSONTyped(json, false);
|
|
2972
|
+
}
|
|
2973
|
+
function GetDomain200ResponseMetaFromJSONTyped(json, ignoreDiscriminator) {
|
|
2974
|
+
if (json == null) {
|
|
2975
|
+
return json;
|
|
2976
|
+
}
|
|
2977
|
+
return {
|
|
2978
|
+
"requestId": json["request_id"] == null ? void 0 : json["request_id"]
|
|
2979
|
+
};
|
|
2980
|
+
}
|
|
2981
|
+
function GetDomain200ResponseMetaToJSON(json) {
|
|
2982
|
+
return GetDomain200ResponseMetaToJSONTyped(json, false);
|
|
2983
|
+
}
|
|
2984
|
+
function GetDomain200ResponseMetaToJSONTyped(value, ignoreDiscriminator = false) {
|
|
2985
|
+
if (value == null) {
|
|
2986
|
+
return value;
|
|
2987
|
+
}
|
|
2988
|
+
return {
|
|
2989
|
+
"request_id": value["requestId"]
|
|
2990
|
+
};
|
|
2991
|
+
}
|
|
2992
|
+
|
|
2993
|
+
// src/src/models/DeleteDomainResponseData.ts
|
|
2994
|
+
function instanceOfDeleteDomainResponseData(value) {
|
|
2995
|
+
if (!("id" in value) || value["id"] === void 0) return false;
|
|
2996
|
+
if (!("deleted" in value) || value["deleted"] === void 0) return false;
|
|
2997
|
+
return true;
|
|
2998
|
+
}
|
|
2999
|
+
function DeleteDomainResponseDataFromJSON(json) {
|
|
3000
|
+
return DeleteDomainResponseDataFromJSONTyped(json, false);
|
|
3001
|
+
}
|
|
3002
|
+
function DeleteDomainResponseDataFromJSONTyped(json, ignoreDiscriminator) {
|
|
3003
|
+
if (json == null) {
|
|
3004
|
+
return json;
|
|
3005
|
+
}
|
|
3006
|
+
return {
|
|
3007
|
+
"id": json["id"],
|
|
3008
|
+
"deleted": json["deleted"]
|
|
3009
|
+
};
|
|
3010
|
+
}
|
|
3011
|
+
function DeleteDomainResponseDataToJSON(json) {
|
|
3012
|
+
return DeleteDomainResponseDataToJSONTyped(json, false);
|
|
3013
|
+
}
|
|
3014
|
+
function DeleteDomainResponseDataToJSONTyped(value, ignoreDiscriminator = false) {
|
|
3015
|
+
if (value == null) {
|
|
3016
|
+
return value;
|
|
3017
|
+
}
|
|
3018
|
+
return {
|
|
3019
|
+
"id": value["id"],
|
|
3020
|
+
"deleted": value["deleted"]
|
|
3021
|
+
};
|
|
3022
|
+
}
|
|
3023
|
+
|
|
3024
|
+
// src/src/models/DeleteDomainResponse.ts
|
|
3025
|
+
function instanceOfDeleteDomainResponse(value) {
|
|
3026
|
+
if (!("data" in value) || value["data"] === void 0) return false;
|
|
3027
|
+
if (!("meta" in value) || value["meta"] === void 0) return false;
|
|
3028
|
+
return true;
|
|
3029
|
+
}
|
|
3030
|
+
function DeleteDomainResponseFromJSON(json) {
|
|
3031
|
+
return DeleteDomainResponseFromJSONTyped(json, false);
|
|
3032
|
+
}
|
|
3033
|
+
function DeleteDomainResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
3034
|
+
if (json == null) {
|
|
3035
|
+
return json;
|
|
3036
|
+
}
|
|
3037
|
+
return {
|
|
3038
|
+
"data": DeleteDomainResponseDataFromJSON(json["data"]),
|
|
3039
|
+
"meta": GetDomain200ResponseMetaFromJSON(json["meta"])
|
|
3040
|
+
};
|
|
3041
|
+
}
|
|
3042
|
+
function DeleteDomainResponseToJSON(json) {
|
|
3043
|
+
return DeleteDomainResponseToJSONTyped(json, false);
|
|
3044
|
+
}
|
|
3045
|
+
function DeleteDomainResponseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
3046
|
+
if (value == null) {
|
|
3047
|
+
return value;
|
|
3048
|
+
}
|
|
3049
|
+
return {
|
|
3050
|
+
"data": DeleteDomainResponseDataToJSON(value["data"]),
|
|
3051
|
+
"meta": GetDomain200ResponseMetaToJSON(value["meta"])
|
|
3052
|
+
};
|
|
3053
|
+
}
|
|
3054
|
+
|
|
2948
3055
|
// src/src/models/DeleteResultData.ts
|
|
2949
3056
|
function instanceOfDeleteResultData(value) {
|
|
2950
3057
|
return true;
|
|
@@ -4304,6 +4411,35 @@ function GenerateWaaSPortalToken201ResponseToJSONTyped(value, ignoreDiscriminato
|
|
|
4304
4411
|
};
|
|
4305
4412
|
}
|
|
4306
4413
|
|
|
4414
|
+
// src/src/models/GetDomain200Response.ts
|
|
4415
|
+
function instanceOfGetDomain200Response(value) {
|
|
4416
|
+
return true;
|
|
4417
|
+
}
|
|
4418
|
+
function GetDomain200ResponseFromJSON(json) {
|
|
4419
|
+
return GetDomain200ResponseFromJSONTyped(json, false);
|
|
4420
|
+
}
|
|
4421
|
+
function GetDomain200ResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
4422
|
+
if (json == null) {
|
|
4423
|
+
return json;
|
|
4424
|
+
}
|
|
4425
|
+
return {
|
|
4426
|
+
"data": json["data"] == null ? void 0 : DomainResponseFromJSON(json["data"]),
|
|
4427
|
+
"meta": json["meta"] == null ? void 0 : GetDomain200ResponseMetaFromJSON(json["meta"])
|
|
4428
|
+
};
|
|
4429
|
+
}
|
|
4430
|
+
function GetDomain200ResponseToJSON(json) {
|
|
4431
|
+
return GetDomain200ResponseToJSONTyped(json, false);
|
|
4432
|
+
}
|
|
4433
|
+
function GetDomain200ResponseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
4434
|
+
if (value == null) {
|
|
4435
|
+
return value;
|
|
4436
|
+
}
|
|
4437
|
+
return {
|
|
4438
|
+
"data": DomainResponseToJSON(value["data"]),
|
|
4439
|
+
"meta": GetDomain200ResponseMetaToJSON(value["meta"])
|
|
4440
|
+
};
|
|
4441
|
+
}
|
|
4442
|
+
|
|
4307
4443
|
// src/src/models/WaaSEndpoint.ts
|
|
4308
4444
|
var WaaSEndpointStatusEnum = {
|
|
4309
4445
|
ACTIVE: "active",
|
|
@@ -11290,6 +11426,161 @@ function ValidateResetTokenResponseToJSONTyped(value, ignoreDiscriminator = fals
|
|
|
11290
11426
|
};
|
|
11291
11427
|
}
|
|
11292
11428
|
|
|
11429
|
+
// src/src/models/VerificationStatusResponseData.ts
|
|
11430
|
+
var VerificationStatusResponseDataStatusEnum = {
|
|
11431
|
+
PENDING: "pending",
|
|
11432
|
+
VERIFYING: "verifying",
|
|
11433
|
+
VERIFIED: "verified",
|
|
11434
|
+
FAILED: "failed"
|
|
11435
|
+
};
|
|
11436
|
+
function instanceOfVerificationStatusResponseData(value) {
|
|
11437
|
+
if (!("domainId" in value) || value["domainId"] === void 0) return false;
|
|
11438
|
+
if (!("domain" in value) || value["domain"] === void 0) return false;
|
|
11439
|
+
if (!("status" in value) || value["status"] === void 0) return false;
|
|
11440
|
+
if (!("recordsVerified" in value) || value["recordsVerified"] === void 0) return false;
|
|
11441
|
+
if (!("recordsTotal" in value) || value["recordsTotal"] === void 0) return false;
|
|
11442
|
+
if (!("dnsRecords" in value) || value["dnsRecords"] === void 0) return false;
|
|
11443
|
+
return true;
|
|
11444
|
+
}
|
|
11445
|
+
function VerificationStatusResponseDataFromJSON(json) {
|
|
11446
|
+
return VerificationStatusResponseDataFromJSONTyped(json, false);
|
|
11447
|
+
}
|
|
11448
|
+
function VerificationStatusResponseDataFromJSONTyped(json, ignoreDiscriminator) {
|
|
11449
|
+
if (json == null) {
|
|
11450
|
+
return json;
|
|
11451
|
+
}
|
|
11452
|
+
return {
|
|
11453
|
+
"domainId": json["domain_id"],
|
|
11454
|
+
"domain": json["domain"],
|
|
11455
|
+
"status": json["status"],
|
|
11456
|
+
"recordsVerified": json["records_verified"],
|
|
11457
|
+
"recordsTotal": json["records_total"],
|
|
11458
|
+
"progress": json["progress"] == null ? void 0 : json["progress"],
|
|
11459
|
+
"dnsRecords": json["dns_records"].map(DnsRecordFromJSON),
|
|
11460
|
+
"lastCheckedAt": json["last_checked_at"] == null ? void 0 : new Date(json["last_checked_at"])
|
|
11461
|
+
};
|
|
11462
|
+
}
|
|
11463
|
+
function VerificationStatusResponseDataToJSON(json) {
|
|
11464
|
+
return VerificationStatusResponseDataToJSONTyped(json, false);
|
|
11465
|
+
}
|
|
11466
|
+
function VerificationStatusResponseDataToJSONTyped(value, ignoreDiscriminator = false) {
|
|
11467
|
+
if (value == null) {
|
|
11468
|
+
return value;
|
|
11469
|
+
}
|
|
11470
|
+
return {
|
|
11471
|
+
"domain_id": value["domainId"],
|
|
11472
|
+
"domain": value["domain"],
|
|
11473
|
+
"status": value["status"],
|
|
11474
|
+
"records_verified": value["recordsVerified"],
|
|
11475
|
+
"records_total": value["recordsTotal"],
|
|
11476
|
+
"progress": value["progress"],
|
|
11477
|
+
"dns_records": value["dnsRecords"].map(DnsRecordToJSON),
|
|
11478
|
+
"last_checked_at": value["lastCheckedAt"] == null ? void 0 : value["lastCheckedAt"].toISOString()
|
|
11479
|
+
};
|
|
11480
|
+
}
|
|
11481
|
+
|
|
11482
|
+
// src/src/models/VerificationStatusResponse.ts
|
|
11483
|
+
function instanceOfVerificationStatusResponse(value) {
|
|
11484
|
+
if (!("data" in value) || value["data"] === void 0) return false;
|
|
11485
|
+
if (!("meta" in value) || value["meta"] === void 0) return false;
|
|
11486
|
+
return true;
|
|
11487
|
+
}
|
|
11488
|
+
function VerificationStatusResponseFromJSON(json) {
|
|
11489
|
+
return VerificationStatusResponseFromJSONTyped(json, false);
|
|
11490
|
+
}
|
|
11491
|
+
function VerificationStatusResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
11492
|
+
if (json == null) {
|
|
11493
|
+
return json;
|
|
11494
|
+
}
|
|
11495
|
+
return {
|
|
11496
|
+
"data": VerificationStatusResponseDataFromJSON(json["data"]),
|
|
11497
|
+
"meta": GetDomain200ResponseMetaFromJSON(json["meta"])
|
|
11498
|
+
};
|
|
11499
|
+
}
|
|
11500
|
+
function VerificationStatusResponseToJSON(json) {
|
|
11501
|
+
return VerificationStatusResponseToJSONTyped(json, false);
|
|
11502
|
+
}
|
|
11503
|
+
function VerificationStatusResponseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
11504
|
+
if (value == null) {
|
|
11505
|
+
return value;
|
|
11506
|
+
}
|
|
11507
|
+
return {
|
|
11508
|
+
"data": VerificationStatusResponseDataToJSON(value["data"]),
|
|
11509
|
+
"meta": GetDomain200ResponseMetaToJSON(value["meta"])
|
|
11510
|
+
};
|
|
11511
|
+
}
|
|
11512
|
+
|
|
11513
|
+
// src/src/models/VerifyDomainResponseData.ts
|
|
11514
|
+
var VerifyDomainResponseDataStatusEnum = {
|
|
11515
|
+
VERIFYING: "verifying"
|
|
11516
|
+
};
|
|
11517
|
+
function instanceOfVerifyDomainResponseData(value) {
|
|
11518
|
+
if (!("jobId" in value) || value["jobId"] === void 0) return false;
|
|
11519
|
+
if (!("domainId" in value) || value["domainId"] === void 0) return false;
|
|
11520
|
+
if (!("domain" in value) || value["domain"] === void 0) return false;
|
|
11521
|
+
if (!("status" in value) || value["status"] === void 0) return false;
|
|
11522
|
+
return true;
|
|
11523
|
+
}
|
|
11524
|
+
function VerifyDomainResponseDataFromJSON(json) {
|
|
11525
|
+
return VerifyDomainResponseDataFromJSONTyped(json, false);
|
|
11526
|
+
}
|
|
11527
|
+
function VerifyDomainResponseDataFromJSONTyped(json, ignoreDiscriminator) {
|
|
11528
|
+
if (json == null) {
|
|
11529
|
+
return json;
|
|
11530
|
+
}
|
|
11531
|
+
return {
|
|
11532
|
+
"jobId": json["job_id"],
|
|
11533
|
+
"domainId": json["domain_id"],
|
|
11534
|
+
"domain": json["domain"],
|
|
11535
|
+
"status": json["status"]
|
|
11536
|
+
};
|
|
11537
|
+
}
|
|
11538
|
+
function VerifyDomainResponseDataToJSON(json) {
|
|
11539
|
+
return VerifyDomainResponseDataToJSONTyped(json, false);
|
|
11540
|
+
}
|
|
11541
|
+
function VerifyDomainResponseDataToJSONTyped(value, ignoreDiscriminator = false) {
|
|
11542
|
+
if (value == null) {
|
|
11543
|
+
return value;
|
|
11544
|
+
}
|
|
11545
|
+
return {
|
|
11546
|
+
"job_id": value["jobId"],
|
|
11547
|
+
"domain_id": value["domainId"],
|
|
11548
|
+
"domain": value["domain"],
|
|
11549
|
+
"status": value["status"]
|
|
11550
|
+
};
|
|
11551
|
+
}
|
|
11552
|
+
|
|
11553
|
+
// src/src/models/VerifyDomainResponse.ts
|
|
11554
|
+
function instanceOfVerifyDomainResponse(value) {
|
|
11555
|
+
if (!("data" in value) || value["data"] === void 0) return false;
|
|
11556
|
+
if (!("meta" in value) || value["meta"] === void 0) return false;
|
|
11557
|
+
return true;
|
|
11558
|
+
}
|
|
11559
|
+
function VerifyDomainResponseFromJSON(json) {
|
|
11560
|
+
return VerifyDomainResponseFromJSONTyped(json, false);
|
|
11561
|
+
}
|
|
11562
|
+
function VerifyDomainResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
11563
|
+
if (json == null) {
|
|
11564
|
+
return json;
|
|
11565
|
+
}
|
|
11566
|
+
return {
|
|
11567
|
+
"data": VerifyDomainResponseDataFromJSON(json["data"]),
|
|
11568
|
+
"meta": AddDomain200ResponseMetaFromJSON(json["meta"])
|
|
11569
|
+
};
|
|
11570
|
+
}
|
|
11571
|
+
function VerifyDomainResponseToJSON(json) {
|
|
11572
|
+
return VerifyDomainResponseToJSONTyped(json, false);
|
|
11573
|
+
}
|
|
11574
|
+
function VerifyDomainResponseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
11575
|
+
if (value == null) {
|
|
11576
|
+
return value;
|
|
11577
|
+
}
|
|
11578
|
+
return {
|
|
11579
|
+
"data": VerifyDomainResponseDataToJSON(value["data"]),
|
|
11580
|
+
"meta": AddDomain200ResponseMetaToJSON(value["meta"])
|
|
11581
|
+
};
|
|
11582
|
+
}
|
|
11583
|
+
|
|
11293
11584
|
// src/src/models/VerifySmsConfigData.ts
|
|
11294
11585
|
function instanceOfVerifySmsConfigData(value) {
|
|
11295
11586
|
return true;
|
|
@@ -15551,6 +15842,102 @@ var DomainsApi = class extends BaseAPI {
|
|
|
15551
15842
|
const response = await this.addDomainRaw({ addDomainRequest }, initOverrides);
|
|
15552
15843
|
return await response.value();
|
|
15553
15844
|
}
|
|
15845
|
+
/**
|
|
15846
|
+
* 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.
|
|
15847
|
+
* Remove a sending domain
|
|
15848
|
+
*/
|
|
15849
|
+
async deleteDomainRaw(requestParameters, initOverrides) {
|
|
15850
|
+
if (requestParameters["id"] == null) {
|
|
15851
|
+
throw new RequiredError(
|
|
15852
|
+
"id",
|
|
15853
|
+
'Required parameter "id" was null or undefined when calling deleteDomain().'
|
|
15854
|
+
);
|
|
15855
|
+
}
|
|
15856
|
+
const queryParameters = {};
|
|
15857
|
+
const headerParameters = {};
|
|
15858
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
15859
|
+
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key");
|
|
15860
|
+
}
|
|
15861
|
+
const response = await this.request({
|
|
15862
|
+
path: `/domains/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters["id"]))),
|
|
15863
|
+
method: "DELETE",
|
|
15864
|
+
headers: headerParameters,
|
|
15865
|
+
query: queryParameters
|
|
15866
|
+
}, initOverrides);
|
|
15867
|
+
return new JSONApiResponse(response, (jsonValue) => DeleteDomainResponseFromJSON(jsonValue));
|
|
15868
|
+
}
|
|
15869
|
+
/**
|
|
15870
|
+
* 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.
|
|
15871
|
+
* Remove a sending domain
|
|
15872
|
+
*/
|
|
15873
|
+
async deleteDomain(id, initOverrides) {
|
|
15874
|
+
const response = await this.deleteDomainRaw({ id }, initOverrides);
|
|
15875
|
+
return await response.value();
|
|
15876
|
+
}
|
|
15877
|
+
/**
|
|
15878
|
+
* Retrieve a single sending domain by ID, including DNS records and verification counters.
|
|
15879
|
+
* Get a sending domain
|
|
15880
|
+
*/
|
|
15881
|
+
async getDomainRaw(requestParameters, initOverrides) {
|
|
15882
|
+
if (requestParameters["id"] == null) {
|
|
15883
|
+
throw new RequiredError(
|
|
15884
|
+
"id",
|
|
15885
|
+
'Required parameter "id" was null or undefined when calling getDomain().'
|
|
15886
|
+
);
|
|
15887
|
+
}
|
|
15888
|
+
const queryParameters = {};
|
|
15889
|
+
const headerParameters = {};
|
|
15890
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
15891
|
+
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key");
|
|
15892
|
+
}
|
|
15893
|
+
const response = await this.request({
|
|
15894
|
+
path: `/domains/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters["id"]))),
|
|
15895
|
+
method: "GET",
|
|
15896
|
+
headers: headerParameters,
|
|
15897
|
+
query: queryParameters
|
|
15898
|
+
}, initOverrides);
|
|
15899
|
+
return new JSONApiResponse(response, (jsonValue) => GetDomain200ResponseFromJSON(jsonValue));
|
|
15900
|
+
}
|
|
15901
|
+
/**
|
|
15902
|
+
* Retrieve a single sending domain by ID, including DNS records and verification counters.
|
|
15903
|
+
* Get a sending domain
|
|
15904
|
+
*/
|
|
15905
|
+
async getDomain(id, initOverrides) {
|
|
15906
|
+
const response = await this.getDomainRaw({ id }, initOverrides);
|
|
15907
|
+
return await response.value();
|
|
15908
|
+
}
|
|
15909
|
+
/**
|
|
15910
|
+
* 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).
|
|
15911
|
+
* Get domain verification status
|
|
15912
|
+
*/
|
|
15913
|
+
async getDomainVerificationStatusRaw(requestParameters, initOverrides) {
|
|
15914
|
+
if (requestParameters["id"] == null) {
|
|
15915
|
+
throw new RequiredError(
|
|
15916
|
+
"id",
|
|
15917
|
+
'Required parameter "id" was null or undefined when calling getDomainVerificationStatus().'
|
|
15918
|
+
);
|
|
15919
|
+
}
|
|
15920
|
+
const queryParameters = {};
|
|
15921
|
+
const headerParameters = {};
|
|
15922
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
15923
|
+
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key");
|
|
15924
|
+
}
|
|
15925
|
+
const response = await this.request({
|
|
15926
|
+
path: `/domains/{id}/verification-status`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters["id"]))),
|
|
15927
|
+
method: "GET",
|
|
15928
|
+
headers: headerParameters,
|
|
15929
|
+
query: queryParameters
|
|
15930
|
+
}, initOverrides);
|
|
15931
|
+
return new JSONApiResponse(response, (jsonValue) => VerificationStatusResponseFromJSON(jsonValue));
|
|
15932
|
+
}
|
|
15933
|
+
/**
|
|
15934
|
+
* 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).
|
|
15935
|
+
* Get domain verification status
|
|
15936
|
+
*/
|
|
15937
|
+
async getDomainVerificationStatus(id, initOverrides) {
|
|
15938
|
+
const response = await this.getDomainVerificationStatusRaw({ id }, initOverrides);
|
|
15939
|
+
return await response.value();
|
|
15940
|
+
}
|
|
15554
15941
|
/**
|
|
15555
15942
|
* List sending domains on the current project, with verification status and DNS records.
|
|
15556
15943
|
* List sending domains
|
|
@@ -15577,6 +15964,38 @@ var DomainsApi = class extends BaseAPI {
|
|
|
15577
15964
|
const response = await this.listDomainsRaw(initOverrides);
|
|
15578
15965
|
return await response.value();
|
|
15579
15966
|
}
|
|
15967
|
+
/**
|
|
15968
|
+
* 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).
|
|
15969
|
+
* Trigger domain verification
|
|
15970
|
+
*/
|
|
15971
|
+
async verifyDomainRaw(requestParameters, initOverrides) {
|
|
15972
|
+
if (requestParameters["id"] == null) {
|
|
15973
|
+
throw new RequiredError(
|
|
15974
|
+
"id",
|
|
15975
|
+
'Required parameter "id" was null or undefined when calling verifyDomain().'
|
|
15976
|
+
);
|
|
15977
|
+
}
|
|
15978
|
+
const queryParameters = {};
|
|
15979
|
+
const headerParameters = {};
|
|
15980
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
15981
|
+
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key");
|
|
15982
|
+
}
|
|
15983
|
+
const response = await this.request({
|
|
15984
|
+
path: `/domains/{id}/verify`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters["id"]))),
|
|
15985
|
+
method: "POST",
|
|
15986
|
+
headers: headerParameters,
|
|
15987
|
+
query: queryParameters
|
|
15988
|
+
}, initOverrides);
|
|
15989
|
+
return new JSONApiResponse(response, (jsonValue) => VerifyDomainResponseFromJSON(jsonValue));
|
|
15990
|
+
}
|
|
15991
|
+
/**
|
|
15992
|
+
* 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).
|
|
15993
|
+
* Trigger domain verification
|
|
15994
|
+
*/
|
|
15995
|
+
async verifyDomain(id, initOverrides) {
|
|
15996
|
+
const response = await this.verifyDomainRaw({ id }, initOverrides);
|
|
15997
|
+
return await response.value();
|
|
15998
|
+
}
|
|
15580
15999
|
};
|
|
15581
16000
|
|
|
15582
16001
|
// src/src/apis/EmailsApi.ts
|
|
@@ -20989,6 +21408,14 @@ export {
|
|
|
20989
21408
|
CreateWebhookRequestToJSON,
|
|
20990
21409
|
CreateWebhookRequestToJSONTyped,
|
|
20991
21410
|
DefaultConfig,
|
|
21411
|
+
DeleteDomainResponseDataFromJSON,
|
|
21412
|
+
DeleteDomainResponseDataFromJSONTyped,
|
|
21413
|
+
DeleteDomainResponseDataToJSON,
|
|
21414
|
+
DeleteDomainResponseDataToJSONTyped,
|
|
21415
|
+
DeleteDomainResponseFromJSON,
|
|
21416
|
+
DeleteDomainResponseFromJSONTyped,
|
|
21417
|
+
DeleteDomainResponseToJSON,
|
|
21418
|
+
DeleteDomainResponseToJSONTyped,
|
|
20992
21419
|
DeleteResultDataFromJSON,
|
|
20993
21420
|
DeleteResultDataFromJSONTyped,
|
|
20994
21421
|
DeleteResultDataToJSON,
|
|
@@ -21047,6 +21474,8 @@ export {
|
|
|
21047
21474
|
DomainListResponseToJSONTyped,
|
|
21048
21475
|
DomainResponseFromJSON,
|
|
21049
21476
|
DomainResponseFromJSONTyped,
|
|
21477
|
+
DomainResponseSesDkimStatusEnum,
|
|
21478
|
+
DomainResponseSesIdentityStatusEnum,
|
|
21050
21479
|
DomainResponseStatusEnum,
|
|
21051
21480
|
DomainResponseToJSON,
|
|
21052
21481
|
DomainResponseToJSONTyped,
|
|
@@ -21154,6 +21583,14 @@ export {
|
|
|
21154
21583
|
GenerateWaaSPortalToken201ResponseFromJSONTyped,
|
|
21155
21584
|
GenerateWaaSPortalToken201ResponseToJSON,
|
|
21156
21585
|
GenerateWaaSPortalToken201ResponseToJSONTyped,
|
|
21586
|
+
GetDomain200ResponseFromJSON,
|
|
21587
|
+
GetDomain200ResponseFromJSONTyped,
|
|
21588
|
+
GetDomain200ResponseMetaFromJSON,
|
|
21589
|
+
GetDomain200ResponseMetaFromJSONTyped,
|
|
21590
|
+
GetDomain200ResponseMetaToJSON,
|
|
21591
|
+
GetDomain200ResponseMetaToJSONTyped,
|
|
21592
|
+
GetDomain200ResponseToJSON,
|
|
21593
|
+
GetDomain200ResponseToJSONTyped,
|
|
21157
21594
|
GetWaaSEndpoint200ResponseFromJSON,
|
|
21158
21595
|
GetWaaSEndpoint200ResponseFromJSONTyped,
|
|
21159
21596
|
GetWaaSEndpoint200ResponseToJSON,
|
|
@@ -22051,6 +22488,24 @@ export {
|
|
|
22051
22488
|
ValidateResetTokenResponseFromJSONTyped,
|
|
22052
22489
|
ValidateResetTokenResponseToJSON,
|
|
22053
22490
|
ValidateResetTokenResponseToJSONTyped,
|
|
22491
|
+
VerificationStatusResponseDataFromJSON,
|
|
22492
|
+
VerificationStatusResponseDataFromJSONTyped,
|
|
22493
|
+
VerificationStatusResponseDataStatusEnum,
|
|
22494
|
+
VerificationStatusResponseDataToJSON,
|
|
22495
|
+
VerificationStatusResponseDataToJSONTyped,
|
|
22496
|
+
VerificationStatusResponseFromJSON,
|
|
22497
|
+
VerificationStatusResponseFromJSONTyped,
|
|
22498
|
+
VerificationStatusResponseToJSON,
|
|
22499
|
+
VerificationStatusResponseToJSONTyped,
|
|
22500
|
+
VerifyDomainResponseDataFromJSON,
|
|
22501
|
+
VerifyDomainResponseDataFromJSONTyped,
|
|
22502
|
+
VerifyDomainResponseDataStatusEnum,
|
|
22503
|
+
VerifyDomainResponseDataToJSON,
|
|
22504
|
+
VerifyDomainResponseDataToJSONTyped,
|
|
22505
|
+
VerifyDomainResponseFromJSON,
|
|
22506
|
+
VerifyDomainResponseFromJSONTyped,
|
|
22507
|
+
VerifyDomainResponseToJSON,
|
|
22508
|
+
VerifyDomainResponseToJSONTyped,
|
|
22054
22509
|
VerifySmsConfigDataFromJSON,
|
|
22055
22510
|
VerifySmsConfigDataFromJSONTyped,
|
|
22056
22511
|
VerifySmsConfigDataToJSON,
|
|
@@ -22431,6 +22886,8 @@ export {
|
|
|
22431
22886
|
instanceOfCreateWaaSEventType201Response,
|
|
22432
22887
|
instanceOfCreateWaaSEventTypeRequest,
|
|
22433
22888
|
instanceOfCreateWebhookRequest,
|
|
22889
|
+
instanceOfDeleteDomainResponse,
|
|
22890
|
+
instanceOfDeleteDomainResponseData,
|
|
22434
22891
|
instanceOfDeleteResult,
|
|
22435
22892
|
instanceOfDeleteResultData,
|
|
22436
22893
|
instanceOfDevice,
|
|
@@ -22469,6 +22926,8 @@ export {
|
|
|
22469
22926
|
instanceOfGenerateSubscriberToken200ResponseData,
|
|
22470
22927
|
instanceOfGenerateSubscriberTokenRequest,
|
|
22471
22928
|
instanceOfGenerateWaaSPortalToken201Response,
|
|
22929
|
+
instanceOfGetDomain200Response,
|
|
22930
|
+
instanceOfGetDomain200ResponseMeta,
|
|
22472
22931
|
instanceOfGetWaaSEndpoint200Response,
|
|
22473
22932
|
instanceOfGetWaaSUsage200Response,
|
|
22474
22933
|
instanceOfInAppNotification,
|
|
@@ -22681,6 +23140,10 @@ export {
|
|
|
22681
23140
|
instanceOfValidateResetTokenRequest,
|
|
22682
23141
|
instanceOfValidateResetTokenResponse,
|
|
22683
23142
|
instanceOfValidateResetTokenResponseData,
|
|
23143
|
+
instanceOfVerificationStatusResponse,
|
|
23144
|
+
instanceOfVerificationStatusResponseData,
|
|
23145
|
+
instanceOfVerifyDomainResponse,
|
|
23146
|
+
instanceOfVerifyDomainResponseData,
|
|
22684
23147
|
instanceOfVerifySmsConfigData,
|
|
22685
23148
|
instanceOfVerifySmsConfigResponse,
|
|
22686
23149
|
instanceOfWaaSApplication,
|