@myapihq/sdk 1.0.10 → 1.0.11
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.js +2 -1
- package/package.json +1 -1
- package/src/domain.ts +2 -1
package/dist/domain.js
CHANGED
|
@@ -28,7 +28,8 @@ async function getDomainStatus(apiKey, orgId, domain) {
|
|
|
28
28
|
return (0, client_1.request)('GET', `${BASE_URL}/domain/orgs/${encodeURIComponent(orgId)}/${encodeURIComponent(domain)}/status`, apiKey);
|
|
29
29
|
}
|
|
30
30
|
async function assignDomain(apiKey, orgId, domain, targetOrgId) {
|
|
31
|
-
|
|
31
|
+
const org_id_payload = targetOrgId === 'null' ? null : targetOrgId;
|
|
32
|
+
return (0, client_1.request)('POST', `${BASE_URL}/domain/orgs/${encodeURIComponent(orgId)}/${encodeURIComponent(domain)}/assign`, apiKey, { org_id: org_id_payload });
|
|
32
33
|
}
|
|
33
34
|
async function unassignDomain(apiKey, orgId, domain) {
|
|
34
35
|
return (0, client_1.request)('POST', `${BASE_URL}/domain/orgs/${encodeURIComponent(orgId)}/${encodeURIComponent(domain)}/assign`, apiKey, { org_id: null });
|
package/package.json
CHANGED
package/src/domain.ts
CHANGED
|
@@ -39,7 +39,8 @@ export async function getDomainStatus(apiKey: string, orgId: string, domain: str
|
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
export async function assignDomain(apiKey: string, orgId: string, domain: string, targetOrgId: string): Promise<DomainRecord> {
|
|
42
|
-
|
|
42
|
+
const org_id_payload = targetOrgId === 'null' ? null : targetOrgId;
|
|
43
|
+
return request('POST', `${BASE_URL}/domain/orgs/${encodeURIComponent(orgId)}/${encodeURIComponent(domain)}/assign`, apiKey, { org_id: org_id_payload });
|
|
43
44
|
}
|
|
44
45
|
|
|
45
46
|
export async function unassignDomain(apiKey: string, orgId: string, domain: string): Promise<DomainRecord> {
|