@myapihq/sdk 1.2.0 → 1.2.1
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/domain.d.ts +16 -4
- package/dist/domain.js +2 -2
- package/package.json +1 -1
- package/src/domain.ts +23 -2
- package/dist/email-verify.d.ts +0 -30
- package/dist/email-verify.js +0 -17
package/dist/domain.d.ts
CHANGED
|
@@ -37,11 +37,23 @@ export declare function checkDomain(apiKey: string, orgId: string, domain: strin
|
|
|
37
37
|
}>;
|
|
38
38
|
export declare function registerDomain(apiKey: string, orgId: string, domain: string, input: RegisterDomainInput): Promise<DomainRecord>;
|
|
39
39
|
export declare function renewDomain(apiKey: string, orgId: string, domain: string): Promise<DomainRecord>;
|
|
40
|
-
export
|
|
40
|
+
export interface PreservedRecord {
|
|
41
|
+
type: string;
|
|
42
|
+
name: string;
|
|
43
|
+
content: string;
|
|
44
|
+
ttl: number;
|
|
45
|
+
}
|
|
46
|
+
export interface ImportDomainResponse {
|
|
41
47
|
domain: string;
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
48
|
+
domain_id: string;
|
|
49
|
+
status: string;
|
|
50
|
+
nameservers: string[];
|
|
51
|
+
preserved_records: PreservedRecord[];
|
|
52
|
+
preserved_count: number;
|
|
53
|
+
probe_warning: string;
|
|
54
|
+
next_step: string;
|
|
55
|
+
}
|
|
56
|
+
export declare function importDomain(apiKey: string, orgId: string, domain: string): Promise<ImportDomainResponse>;
|
|
45
57
|
export declare function listDomains(apiKey: string, orgId: string, filter?: string): Promise<DomainRecord[]>;
|
|
46
58
|
export declare function getDomainStatus(apiKey: string, orgId: string, domain: string): Promise<DomainRecord>;
|
|
47
59
|
export declare function assignDomain(apiKey: string, orgId: string, domain: string): Promise<DomainRecord>;
|
package/dist/domain.js
CHANGED
|
@@ -37,8 +37,8 @@ async function registerDomain(apiKey, orgId, domain, input) {
|
|
|
37
37
|
async function renewDomain(apiKey, orgId, domain) {
|
|
38
38
|
return (0, client_1.request)('POST', `${config_1.DOMAIN_BASE}/domain/orgs/${encodeURIComponent(orgId)}/${encodeURIComponent(domain)}/renew`, apiKey);
|
|
39
39
|
}
|
|
40
|
-
async function importDomain(apiKey, orgId,
|
|
41
|
-
return (0, client_1.request)('POST', `${config_1.DOMAIN_BASE}/domain/orgs/${encodeURIComponent(orgId)}/import`, apiKey,
|
|
40
|
+
async function importDomain(apiKey, orgId, domain) {
|
|
41
|
+
return (0, client_1.request)('POST', `${config_1.DOMAIN_BASE}/domain/orgs/${encodeURIComponent(orgId)}/import`, apiKey, { domain });
|
|
42
42
|
}
|
|
43
43
|
async function listDomains(apiKey, orgId, filter) {
|
|
44
44
|
const query = filter ? `?filter=${encodeURIComponent(filter)}` : '';
|
package/package.json
CHANGED
package/src/domain.ts
CHANGED
|
@@ -71,8 +71,29 @@ export async function renewDomain(apiKey: string, orgId: string, domain: string)
|
|
|
71
71
|
return request('POST', `${BASE_URL}/domain/orgs/${encodeURIComponent(orgId)}/${encodeURIComponent(domain)}/renew`, apiKey);
|
|
72
72
|
}
|
|
73
73
|
|
|
74
|
-
|
|
75
|
-
|
|
74
|
+
// BYOD import — registrar-agnostic. Backend uses CF zone creation + best-effort
|
|
75
|
+
// public DNS probe to snapshot existing records before the NS swap. Customer's
|
|
76
|
+
// next action is changing NS at their current registrar to the returned values.
|
|
77
|
+
export interface PreservedRecord {
|
|
78
|
+
type: string;
|
|
79
|
+
name: string;
|
|
80
|
+
content: string;
|
|
81
|
+
ttl: number;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export interface ImportDomainResponse {
|
|
85
|
+
domain: string;
|
|
86
|
+
domain_id: string;
|
|
87
|
+
status: string; // 'pending_ns_change' initially
|
|
88
|
+
nameservers: string[];
|
|
89
|
+
preserved_records: PreservedRecord[];
|
|
90
|
+
preserved_count: number;
|
|
91
|
+
probe_warning: string;
|
|
92
|
+
next_step: string;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
export async function importDomain(apiKey: string, orgId: string, domain: string): Promise<ImportDomainResponse> {
|
|
96
|
+
return request('POST', `${BASE_URL}/domain/orgs/${encodeURIComponent(orgId)}/import`, apiKey, { domain });
|
|
76
97
|
}
|
|
77
98
|
|
|
78
99
|
export async function listDomains(apiKey: string, orgId: string, filter?: string): Promise<DomainRecord[]> {
|
package/dist/email-verify.d.ts
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import type { Exposes } from './exposes';
|
|
2
|
-
export declare const EXPOSES: Exposes;
|
|
3
|
-
export type VerifyVerdict = 'deliverable' | 'undeliverable' | 'unknown';
|
|
4
|
-
export interface VerifyChecks {
|
|
5
|
-
syntax: {
|
|
6
|
-
valid: boolean;
|
|
7
|
-
detail?: string;
|
|
8
|
-
};
|
|
9
|
-
dns?: {
|
|
10
|
-
valid: boolean;
|
|
11
|
-
mx_records?: string[];
|
|
12
|
-
};
|
|
13
|
-
microsoft?: {
|
|
14
|
-
verdict: string;
|
|
15
|
-
if_exists_result: number;
|
|
16
|
-
domain_type: number;
|
|
17
|
-
federated: boolean;
|
|
18
|
-
};
|
|
19
|
-
}
|
|
20
|
-
export interface VerifyResult {
|
|
21
|
-
email: string;
|
|
22
|
-
verdict: VerifyVerdict;
|
|
23
|
-
confidence: number;
|
|
24
|
-
smtp_recommended: boolean;
|
|
25
|
-
checks: VerifyChecks;
|
|
26
|
-
elapsed_ms: number;
|
|
27
|
-
}
|
|
28
|
-
export declare function verifyEmail(apiKey: string, orgId: string, { email }: {
|
|
29
|
-
email: string;
|
|
30
|
-
}): Promise<VerifyResult>;
|
package/dist/email-verify.js
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// Scaffolded from schema by scripts/scaffold-sdk.js — DO NOT remove the
|
|
3
|
-
// EXPOSES array (the coverage tool verifies it against the live schema).
|
|
4
|
-
// Types and function names ARE editable; re-running the scaffolder against
|
|
5
|
-
// a service whose config has been changed will diff vs. existing file
|
|
6
|
-
// (use --dry-run to inspect).
|
|
7
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
-
exports.EXPOSES = void 0;
|
|
9
|
-
exports.verifyEmail = verifyEmail;
|
|
10
|
-
const client_1 = require("./client");
|
|
11
|
-
const config_1 = require("./config");
|
|
12
|
-
exports.EXPOSES = [
|
|
13
|
-
'POST /email-verify/orgs/{org_id}/verify',
|
|
14
|
-
];
|
|
15
|
-
async function verifyEmail(apiKey, orgId, { email }) {
|
|
16
|
-
return (0, client_1.request)('POST', `${config_1.EMAIL_VERIFY_BASE}/email-verify/orgs/${encodeURIComponent(orgId)}/verify`, apiKey, { email });
|
|
17
|
-
}
|