@myapihq/sdk 1.0.40 → 1.0.41

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,7 +23,7 @@ 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 assignDomain(apiKey: string, orgId: string, domain: string, targetOrgId: string): Promise<DomainRecord>;
26
+ export declare function assignDomain(apiKey: string, orgId: string, domain: string): Promise<DomainRecord>;
27
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: {
package/dist/domain.js CHANGED
@@ -27,9 +27,8 @@ 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 assignDomain(apiKey, orgId, domain, targetOrgId) {
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 });
30
+ async function assignDomain(apiKey, orgId, domain) {
31
+ return (0, client_1.request)('POST', `${BASE_URL}/domain/orgs/${encodeURIComponent(orgId)}/${encodeURIComponent(domain)}/assign`, apiKey, { org_id: orgId });
33
32
  }
34
33
  async function unassignDomain(apiKey, orgId, domain) {
35
34
  return (0, client_1.request)('POST', `${BASE_URL}/domain/orgs/${encodeURIComponent(orgId)}/${encodeURIComponent(domain)}/assign`, apiKey, { org_id: null });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@myapihq/sdk",
3
- "version": "1.0.40",
3
+ "version": "1.0.41",
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,9 +38,8 @@ 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 assignDomain(apiKey: string, orgId: string, domain: string, targetOrgId: string): Promise<DomainRecord> {
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 });
41
+ export async function assignDomain(apiKey: string, orgId: string, domain: string): Promise<DomainRecord> {
42
+ return request('POST', `${BASE_URL}/domain/orgs/${encodeURIComponent(orgId)}/${encodeURIComponent(domain)}/assign`, apiKey, { org_id: orgId });
44
43
  }
45
44
 
46
45
  export async function unassignDomain(apiKey: string, orgId: string, domain: string): Promise<DomainRecord> {