@myapihq/sdk 1.0.8 → 1.0.9

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 CHANGED
@@ -23,8 +23,8 @@ export declare function importDomain(apiKey: string, orgId: string, payload: {
23
23
  }): Promise<DomainRecord>;
24
24
  export declare function listDomains(apiKey: string, orgId: string, filter?: string): Promise<DomainRecord[]>;
25
25
  export declare function getDomainStatus(apiKey: string, orgId: string, domain: string): Promise<DomainRecord>;
26
- export declare function renewDomain(apiKey: string, orgId: string, domain: string, years?: number): Promise<DomainRecord>;
27
26
  export declare function assignDomain(apiKey: string, orgId: string, domain: string, targetOrgId: string): Promise<DomainRecord>;
27
+ export declare function unassignDomain(apiKey: string, orgId: string, domain: string): Promise<DomainRecord>;
28
28
  export declare function getDomainSettings(apiKey: string, orgId: string, domain: string): Promise<DomainSettings>;
29
29
  export declare function updateDomainSettings(apiKey: string, orgId: string, domain: string, payload: {
30
30
  security_level?: 'essentially_off' | 'medium' | 'high' | 'under_attack';
package/dist/domain.js CHANGED
@@ -5,8 +5,8 @@ exports.registerDomain = registerDomain;
5
5
  exports.importDomain = importDomain;
6
6
  exports.listDomains = listDomains;
7
7
  exports.getDomainStatus = getDomainStatus;
8
- exports.renewDomain = renewDomain;
9
8
  exports.assignDomain = assignDomain;
9
+ exports.unassignDomain = unassignDomain;
10
10
  exports.getDomainSettings = getDomainSettings;
11
11
  exports.updateDomainSettings = updateDomainSettings;
12
12
  const client_1 = require("./client");
@@ -27,12 +27,12 @@ async function listDomains(apiKey, orgId, filter) {
27
27
  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
- async function renewDomain(apiKey, orgId, domain, years) {
31
- return (0, client_1.request)('POST', `${BASE_URL}/domain/orgs/${encodeURIComponent(orgId)}/${encodeURIComponent(domain)}/renew`, apiKey, { years });
32
- }
33
30
  async function assignDomain(apiKey, orgId, domain, targetOrgId) {
34
31
  return (0, client_1.request)('POST', `${BASE_URL}/domain/orgs/${encodeURIComponent(orgId)}/${encodeURIComponent(domain)}/assign`, apiKey, { org_id: targetOrgId });
35
32
  }
33
+ async function unassignDomain(apiKey, orgId, domain) {
34
+ return (0, client_1.request)('POST', `${BASE_URL}/domain/orgs/${encodeURIComponent(orgId)}/${encodeURIComponent(domain)}/assign`, apiKey, { org_id: null });
35
+ }
36
36
  async function getDomainSettings(apiKey, orgId, domain) {
37
37
  return (0, client_1.request)('GET', `${BASE_URL}/domain/orgs/${encodeURIComponent(orgId)}/${encodeURIComponent(domain)}/settings`, apiKey);
38
38
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@myapihq/sdk",
3
- "version": "1.0.8",
3
+ "version": "1.0.9",
4
4
  "description": "TypeScript SDK for the MyAPI ecosystem",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
package/src/domain.ts CHANGED
@@ -38,14 +38,14 @@ export async function getDomainStatus(apiKey: string, orgId: string, domain: str
38
38
  return request('GET', `${BASE_URL}/domain/orgs/${encodeURIComponent(orgId)}/${encodeURIComponent(domain)}/status`, apiKey);
39
39
  }
40
40
 
41
- export async function renewDomain(apiKey: string, orgId: string, domain: string, years?: number): Promise<DomainRecord> {
42
- return request('POST', `${BASE_URL}/domain/orgs/${encodeURIComponent(orgId)}/${encodeURIComponent(domain)}/renew`, apiKey, { years });
43
- }
44
-
45
41
  export async function assignDomain(apiKey: string, orgId: string, domain: string, targetOrgId: string): Promise<DomainRecord> {
46
42
  return request('POST', `${BASE_URL}/domain/orgs/${encodeURIComponent(orgId)}/${encodeURIComponent(domain)}/assign`, apiKey, { org_id: targetOrgId });
47
43
  }
48
44
 
45
+ export async function unassignDomain(apiKey: string, orgId: string, domain: string): Promise<DomainRecord> {
46
+ return request('POST', `${BASE_URL}/domain/orgs/${encodeURIComponent(orgId)}/${encodeURIComponent(domain)}/assign`, apiKey, { org_id: null });
47
+ }
48
+
49
49
  export async function getDomainSettings(apiKey: string, orgId: string, domain: string): Promise<DomainSettings> {
50
50
  return request('GET', `${BASE_URL}/domain/orgs/${encodeURIComponent(orgId)}/${encodeURIComponent(domain)}/settings`, apiKey);
51
51
  }