@myapihq/sdk 1.1.0-wip.4 → 1.2.0
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/audience.d.ts +71 -0
- package/dist/audience.js +54 -0
- package/dist/client.d.ts +1 -1
- package/dist/client.js +8 -1
- package/dist/company.d.ts +20 -0
- package/dist/company.js +25 -0
- package/dist/config.d.ts +6 -0
- package/dist/config.js +20 -2
- package/dist/crm.d.ts +122 -0
- package/dist/crm.js +84 -0
- package/dist/database.d.ts +36 -0
- package/dist/database.js +65 -0
- package/dist/domain.d.ts +19 -1
- package/dist/domain.js +22 -2
- package/dist/email-verify.d.ts +30 -0
- package/dist/email-verify.js +17 -0
- package/dist/email.d.ts +33 -0
- package/dist/email.js +53 -0
- package/dist/exposes.d.ts +2 -0
- package/dist/exposes.js +14 -0
- package/dist/funnel.d.ts +10 -0
- package/dist/funnel.js +20 -0
- package/dist/hq.d.ts +10 -0
- package/dist/hq.js +28 -0
- package/dist/image.d.ts +14 -0
- package/dist/image.js +12 -0
- package/dist/index.d.ts +6 -1
- package/dist/index.js +13 -2
- package/dist/llm.d.ts +50 -0
- package/dist/llm.js +27 -0
- package/dist/people.d.ts +54 -0
- package/dist/people.js +22 -0
- package/dist/pixel.d.ts +3 -0
- package/dist/pixel.js +15 -0
- package/dist/services.d.ts +17 -0
- package/dist/services.js +190 -0
- package/dist/storage.d.ts +3 -1
- package/dist/storage.js +7 -0
- package/dist/url.d.ts +2 -0
- package/dist/url.js +4 -0
- package/dist/webhook.d.ts +8 -1
- package/dist/webhook.js +14 -2
- package/dist/workflow.d.ts +2 -0
- package/dist/workflow.js +12 -0
- package/package.json +2 -1
- package/scripts/scaffold-sdk.js +501 -0
- package/src/audience.ts +162 -0
- package/src/client.ts +9 -1
- package/src/company.ts +48 -0
- package/src/config.ts +21 -1
- package/src/crm.ts +235 -0
- package/src/database.ts +103 -0
- package/src/domain.ts +44 -2
- package/src/email.ts +84 -0
- package/src/exposes.ts +16 -0
- package/src/funnel.ts +34 -0
- package/src/hq.ts +41 -0
- package/src/image.ts +31 -0
- package/src/index.ts +12 -1
- package/src/llm.ts +86 -0
- package/src/people.ts +84 -0
- package/src/pixel.ts +16 -0
- package/src/services.ts +220 -0
- package/src/storage.ts +15 -6
- package/src/url.ts +5 -0
- package/src/webhook.ts +25 -2
- package/src/workflow.ts +13 -0
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import type { Exposes } from './exposes';
|
|
2
|
+
import type { Person } from './people';
|
|
3
|
+
import type { Company } from './company';
|
|
4
|
+
export declare const EXPOSES: Exposes;
|
|
5
|
+
export interface SearchFilter {
|
|
6
|
+
confidence?: ('high' | 'low' | 'very_low')[];
|
|
7
|
+
country?: string[];
|
|
8
|
+
country_consistent?: boolean;
|
|
9
|
+
email_type?: ('corporate' | 'freemail' | 'role_based' | 'other_corporate')[];
|
|
10
|
+
has_c_level?: boolean;
|
|
11
|
+
has_careers_page?: boolean;
|
|
12
|
+
has_decision_maker?: boolean;
|
|
13
|
+
has_investors_page?: boolean;
|
|
14
|
+
has_shop_page?: boolean;
|
|
15
|
+
is_registered_entity?: boolean;
|
|
16
|
+
keyword?: string;
|
|
17
|
+
limit?: number;
|
|
18
|
+
offset?: number;
|
|
19
|
+
min_headcount?: number;
|
|
20
|
+
min_link_confidence?: number;
|
|
21
|
+
min_source_count?: number;
|
|
22
|
+
seniority?: ('c_level' | 'vp_director' | 'manager' | 'senior_ic' | 'ic')[];
|
|
23
|
+
tld_class?: ('cctld' | 'generic' | 'vanity' | 'low_trust' | 'other')[];
|
|
24
|
+
}
|
|
25
|
+
export type AudienceSource = 'people' | 'company';
|
|
26
|
+
export interface Audience {
|
|
27
|
+
id: string;
|
|
28
|
+
org_id: string;
|
|
29
|
+
name: string;
|
|
30
|
+
description?: string;
|
|
31
|
+
source: AudienceSource;
|
|
32
|
+
filter: SearchFilter;
|
|
33
|
+
member_count: number;
|
|
34
|
+
created_at: string;
|
|
35
|
+
updated_at: string;
|
|
36
|
+
}
|
|
37
|
+
export interface AudienceMembers {
|
|
38
|
+
total: number;
|
|
39
|
+
limit: number;
|
|
40
|
+
offset: number;
|
|
41
|
+
has_more: boolean;
|
|
42
|
+
people?: Person[];
|
|
43
|
+
companies?: Company[];
|
|
44
|
+
}
|
|
45
|
+
export interface AudienceRefreshResult {
|
|
46
|
+
total: number;
|
|
47
|
+
previous: number;
|
|
48
|
+
delta: number;
|
|
49
|
+
refreshed_at: string;
|
|
50
|
+
}
|
|
51
|
+
export interface CreateAudienceInput {
|
|
52
|
+
name: string;
|
|
53
|
+
source: AudienceSource;
|
|
54
|
+
filter: SearchFilter;
|
|
55
|
+
description?: string;
|
|
56
|
+
}
|
|
57
|
+
export interface UpdateAudienceInput {
|
|
58
|
+
name?: string;
|
|
59
|
+
description?: string;
|
|
60
|
+
filter?: SearchFilter;
|
|
61
|
+
}
|
|
62
|
+
export declare function createAudience(apiKey: string, orgId: string, input: CreateAudienceInput): Promise<Audience>;
|
|
63
|
+
export declare function listAudiences(apiKey: string, orgId: string): Promise<Audience[]>;
|
|
64
|
+
export declare function getAudience(apiKey: string, orgId: string, audienceId: string): Promise<Audience>;
|
|
65
|
+
export declare function updateAudience(apiKey: string, orgId: string, audienceId: string, patch: UpdateAudienceInput): Promise<Audience>;
|
|
66
|
+
export declare function deleteAudience(apiKey: string, orgId: string, audienceId: string): Promise<void>;
|
|
67
|
+
export declare function getAudienceMembers(apiKey: string, orgId: string, audienceId: string, opts: {
|
|
68
|
+
limit?: number;
|
|
69
|
+
offset?: number;
|
|
70
|
+
}): Promise<AudienceMembers>;
|
|
71
|
+
export declare function refreshAudience(apiKey: string, orgId: string, audienceId: string): Promise<AudienceRefreshResult>;
|
package/dist/audience.js
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
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.createAudience = createAudience;
|
|
10
|
+
exports.listAudiences = listAudiences;
|
|
11
|
+
exports.getAudience = getAudience;
|
|
12
|
+
exports.updateAudience = updateAudience;
|
|
13
|
+
exports.deleteAudience = deleteAudience;
|
|
14
|
+
exports.getAudienceMembers = getAudienceMembers;
|
|
15
|
+
exports.refreshAudience = refreshAudience;
|
|
16
|
+
const client_1 = require("./client");
|
|
17
|
+
const config_1 = require("./config");
|
|
18
|
+
exports.EXPOSES = [
|
|
19
|
+
'POST /audience/orgs/{org_id}/audiences',
|
|
20
|
+
'GET /audience/orgs/{org_id}/audiences',
|
|
21
|
+
'GET /audience/orgs/{org_id}/audiences/{audience_id}',
|
|
22
|
+
'PATCH /audience/orgs/{org_id}/audiences/{audience_id}',
|
|
23
|
+
'DELETE /audience/orgs/{org_id}/audiences/{audience_id}',
|
|
24
|
+
'GET /audience/orgs/{org_id}/audiences/{audience_id}/members',
|
|
25
|
+
'POST /audience/orgs/{org_id}/audiences/{audience_id}/refresh',
|
|
26
|
+
];
|
|
27
|
+
async function createAudience(apiKey, orgId, input) {
|
|
28
|
+
return (0, client_1.request)('POST', `${config_1.AUDIENCE_BASE}/audience/orgs/${encodeURIComponent(orgId)}/audiences`, apiKey, input);
|
|
29
|
+
}
|
|
30
|
+
async function listAudiences(apiKey, orgId) {
|
|
31
|
+
return (0, client_1.request)('GET', `${config_1.AUDIENCE_BASE}/audience/orgs/${encodeURIComponent(orgId)}/audiences`, apiKey);
|
|
32
|
+
}
|
|
33
|
+
async function getAudience(apiKey, orgId, audienceId) {
|
|
34
|
+
return (0, client_1.request)('GET', `${config_1.AUDIENCE_BASE}/audience/orgs/${encodeURIComponent(orgId)}/audiences/${encodeURIComponent(audienceId)}`, apiKey);
|
|
35
|
+
}
|
|
36
|
+
async function updateAudience(apiKey, orgId, audienceId, patch) {
|
|
37
|
+
return (0, client_1.request)('PATCH', `${config_1.AUDIENCE_BASE}/audience/orgs/${encodeURIComponent(orgId)}/audiences/${encodeURIComponent(audienceId)}`, apiKey, patch);
|
|
38
|
+
}
|
|
39
|
+
async function deleteAudience(apiKey, orgId, audienceId) {
|
|
40
|
+
return (0, client_1.request)('DELETE', `${config_1.AUDIENCE_BASE}/audience/orgs/${encodeURIComponent(orgId)}/audiences/${encodeURIComponent(audienceId)}`, apiKey);
|
|
41
|
+
}
|
|
42
|
+
async function getAudienceMembers(apiKey, orgId, audienceId, opts) {
|
|
43
|
+
const _q = new URLSearchParams();
|
|
44
|
+
for (const [k, v] of Object.entries(opts)) {
|
|
45
|
+
if (v != null)
|
|
46
|
+
_q.append(k, String(v));
|
|
47
|
+
}
|
|
48
|
+
const _qs = _q.toString();
|
|
49
|
+
const _url = _qs ? `${config_1.AUDIENCE_BASE}/audience/orgs/${encodeURIComponent(orgId)}/audiences/${encodeURIComponent(audienceId)}/members?${_qs}` : `${config_1.AUDIENCE_BASE}/audience/orgs/${encodeURIComponent(orgId)}/audiences/${encodeURIComponent(audienceId)}/members`;
|
|
50
|
+
return (0, client_1.request)('GET', _url, apiKey);
|
|
51
|
+
}
|
|
52
|
+
async function refreshAudience(apiKey, orgId, audienceId) {
|
|
53
|
+
return (0, client_1.request)('POST', `${config_1.AUDIENCE_BASE}/audience/orgs/${encodeURIComponent(orgId)}/audiences/${encodeURIComponent(audienceId)}/refresh`, apiKey);
|
|
54
|
+
}
|
package/dist/client.d.ts
CHANGED
|
@@ -4,4 +4,4 @@ export declare class MyApiError extends Error {
|
|
|
4
4
|
detail?: string | undefined;
|
|
5
5
|
constructor(code: string, status: number, detail?: string | undefined);
|
|
6
6
|
}
|
|
7
|
-
export declare function request<T>(method: string, url: string, apiKey?: string, body?: unknown): Promise<T>;
|
|
7
|
+
export declare function request<T>(method: string, url: string, apiKey?: string, body?: unknown, extraHeaders?: Record<string, string>): Promise<T>;
|
package/dist/client.js
CHANGED
|
@@ -17,7 +17,7 @@ class MyApiError extends Error {
|
|
|
17
17
|
}
|
|
18
18
|
}
|
|
19
19
|
exports.MyApiError = MyApiError;
|
|
20
|
-
async function request(method, url, apiKey, body) {
|
|
20
|
+
async function request(method, url, apiKey, body, extraHeaders) {
|
|
21
21
|
const headers = {};
|
|
22
22
|
if (apiKey) {
|
|
23
23
|
headers['Authorization'] = `Bearer ${apiKey}`;
|
|
@@ -25,6 +25,13 @@ async function request(method, url, apiKey, body) {
|
|
|
25
25
|
if (body !== undefined) {
|
|
26
26
|
headers['Content-Type'] = 'application/json';
|
|
27
27
|
}
|
|
28
|
+
// Caller-supplied headers (e.g. CAS via If-Match) win over the defaults
|
|
29
|
+
// above. Keep this near the top so route logic later doesn't accidentally
|
|
30
|
+
// overwrite something the caller passed in.
|
|
31
|
+
if (extraHeaders) {
|
|
32
|
+
for (const [k, v] of Object.entries(extraHeaders))
|
|
33
|
+
headers[k] = v;
|
|
34
|
+
}
|
|
28
35
|
const options = {
|
|
29
36
|
method,
|
|
30
37
|
headers,
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { Exposes } from './exposes';
|
|
2
|
+
import type { SearchFilter } from './audience';
|
|
3
|
+
import type { Person } from './people';
|
|
4
|
+
export declare const EXPOSES: Exposes;
|
|
5
|
+
import type { PersonCompany } from './people';
|
|
6
|
+
export interface Company extends PersonCompany {
|
|
7
|
+
people?: Person[];
|
|
8
|
+
}
|
|
9
|
+
export interface CompanySearchResult {
|
|
10
|
+
companies: Company[];
|
|
11
|
+
total: number;
|
|
12
|
+
limit: number;
|
|
13
|
+
offset: number;
|
|
14
|
+
has_more: boolean;
|
|
15
|
+
}
|
|
16
|
+
export interface CompanySearchOptions extends SearchFilter {
|
|
17
|
+
include_people?: number;
|
|
18
|
+
}
|
|
19
|
+
export declare function searchCompanies(apiKey: string, orgId: string, options: CompanySearchOptions): Promise<CompanySearchResult>;
|
|
20
|
+
export declare function getCompany(apiKey: string, orgId: string, companyId: string, include_people?: number): Promise<Company>;
|
package/dist/company.js
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
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.searchCompanies = searchCompanies;
|
|
10
|
+
exports.getCompany = getCompany;
|
|
11
|
+
const client_1 = require("./client");
|
|
12
|
+
const config_1 = require("./config");
|
|
13
|
+
exports.EXPOSES = [
|
|
14
|
+
'POST /company/orgs/{org_id}/search',
|
|
15
|
+
'GET /company/orgs/{org_id}/{company_id}',
|
|
16
|
+
];
|
|
17
|
+
async function searchCompanies(apiKey, orgId, options) {
|
|
18
|
+
return (0, client_1.request)('POST', `${config_1.COMPANY_BASE}/company/orgs/${encodeURIComponent(orgId)}/search`, apiKey, options);
|
|
19
|
+
}
|
|
20
|
+
async function getCompany(apiKey, orgId, companyId, include_people) {
|
|
21
|
+
const _url = include_people != null
|
|
22
|
+
? `${config_1.COMPANY_BASE}/company/orgs/${encodeURIComponent(orgId)}/${encodeURIComponent(companyId)}?include_people=${encodeURIComponent(String(include_people))}`
|
|
23
|
+
: `${config_1.COMPANY_BASE}/company/orgs/${encodeURIComponent(orgId)}/${encodeURIComponent(companyId)}`;
|
|
24
|
+
return (0, client_1.request)('GET', _url, apiKey);
|
|
25
|
+
}
|
package/dist/config.d.ts
CHANGED
|
@@ -8,3 +8,9 @@ export declare const EMAIL_BASE: string;
|
|
|
8
8
|
export declare const STORAGE_BASE: string;
|
|
9
9
|
export declare const URL_BASE: string;
|
|
10
10
|
export declare const PIXEL_BASE: string;
|
|
11
|
+
export declare const PEOPLE_BASE: string;
|
|
12
|
+
export declare const COMPANY_BASE: string;
|
|
13
|
+
export declare const AUDIENCE_BASE: string;
|
|
14
|
+
export declare const LLM_BASE: string;
|
|
15
|
+
export declare const DATABASE_BASE: string;
|
|
16
|
+
export declare const CRM_BASE: string;
|
package/dist/config.js
CHANGED
|
@@ -1,7 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
// Service base URLs. Today's reality: all primitives are served from the
|
|
3
|
+
// single `api.myapihq.com` gateway; per-service brand hosts
|
|
4
|
+
// (e.g. api.myllmapi.com) are aspirational and only some are wired in DNS
|
|
5
|
+
// + routed correctly. We default to the working hosts where they exist,
|
|
6
|
+
// and to the gateway where they don't (LLM, DATABASE, CRM, PEOPLE,
|
|
7
|
+
// COMPANY, AUDIENCE). The MYAPI_*_URL env vars stay as overrides for
|
|
8
|
+
// local dev — `source scripts/local-env.sh` still points everything at
|
|
9
|
+
// localhost:8080 regardless of the prod default.
|
|
2
10
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.PIXEL_BASE = exports.URL_BASE = exports.STORAGE_BASE = exports.EMAIL_BASE = exports.WORKFLOW_BASE = exports.WEBHOOK_BASE = exports.IMAGE_BASE = exports.FUNNEL_BASE = exports.DOMAIN_BASE = exports.HQ_BASE = void 0;
|
|
4
|
-
|
|
11
|
+
exports.CRM_BASE = exports.DATABASE_BASE = exports.LLM_BASE = exports.AUDIENCE_BASE = exports.COMPANY_BASE = exports.PEOPLE_BASE = exports.PIXEL_BASE = exports.URL_BASE = exports.STORAGE_BASE = exports.EMAIL_BASE = exports.WORKFLOW_BASE = exports.WEBHOOK_BASE = exports.IMAGE_BASE = exports.FUNNEL_BASE = exports.DOMAIN_BASE = exports.HQ_BASE = void 0;
|
|
12
|
+
const GATEWAY = 'https://api.myapihq.com';
|
|
13
|
+
exports.HQ_BASE = process.env.MYAPI_HQ_URL ?? process.env.MYAPI_API_BASE ?? GATEWAY;
|
|
5
14
|
exports.DOMAIN_BASE = process.env.MYAPI_DOMAIN_URL ?? 'https://api.mydomainapi.com';
|
|
6
15
|
exports.FUNNEL_BASE = process.env.MYAPI_FUNNEL_URL ?? 'https://api.myfunnelapi.com';
|
|
7
16
|
exports.IMAGE_BASE = process.env.MYAPI_IMAGE_URL ?? 'https://api.myimageapi.com';
|
|
@@ -11,3 +20,12 @@ exports.EMAIL_BASE = process.env.MYAPI_EMAIL_URL ?? 'https://api.myemailapi.com'
|
|
|
11
20
|
exports.STORAGE_BASE = process.env.MYAPI_STORAGE_URL ?? 'https://api.mystorageapi.com';
|
|
12
21
|
exports.URL_BASE = process.env.MYAPI_URL_URL ?? 'https://api.myurlto.com';
|
|
13
22
|
exports.PIXEL_BASE = process.env.MYAPI_PIXEL_URL ?? 'https://api.mypixelapi.com';
|
|
23
|
+
// Per-service hosts below either don't resolve in DNS or 404 the routes;
|
|
24
|
+
// served via the gateway until backend wires the brand routing. Flip back
|
|
25
|
+
// to per-service hosts when DNS is sound and routes verified there.
|
|
26
|
+
exports.PEOPLE_BASE = process.env.MYAPI_PEOPLE_URL ?? GATEWAY;
|
|
27
|
+
exports.COMPANY_BASE = process.env.MYAPI_COMPANY_URL ?? GATEWAY;
|
|
28
|
+
exports.AUDIENCE_BASE = process.env.MYAPI_AUDIENCE_URL ?? GATEWAY;
|
|
29
|
+
exports.LLM_BASE = process.env.MYAPI_LLM_URL ?? GATEWAY;
|
|
30
|
+
exports.DATABASE_BASE = process.env.MYAPI_DATABASE_URL ?? GATEWAY;
|
|
31
|
+
exports.CRM_BASE = process.env.MYAPI_CRM_URL ?? GATEWAY;
|
package/dist/crm.d.ts
ADDED
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import type { Exposes } from './exposes';
|
|
2
|
+
export declare const EXPOSES: Exposes;
|
|
3
|
+
export type LifecycleStage = 'cold' | 'warm' | 'qualified' | 'customer' | 'churned';
|
|
4
|
+
export type ContactSource = 'goldfox' | 'email' | 'pixel' | 'webhook' | 'manual';
|
|
5
|
+
export type EventKind = 'created' | 'promoted' | 'stage_changed' | 'email_sent' | 'email_opened' | 'email_clicked' | 'email_replied' | 'pixel_visit' | 'webhook_received';
|
|
6
|
+
export interface Contact {
|
|
7
|
+
id: string;
|
|
8
|
+
org_id: string;
|
|
9
|
+
email: string | null;
|
|
10
|
+
first_name: string | null;
|
|
11
|
+
last_name: string | null;
|
|
12
|
+
company_id: string | null;
|
|
13
|
+
lifecycle_stage: LifecycleStage;
|
|
14
|
+
custom: Record<string, unknown>;
|
|
15
|
+
source: ContactSource;
|
|
16
|
+
goldfox_person_id: string | null;
|
|
17
|
+
goldfox_person?: unknown | null;
|
|
18
|
+
created_at: string;
|
|
19
|
+
updated_at: string;
|
|
20
|
+
last_engagement_at?: string | null;
|
|
21
|
+
deleted_at?: string | null;
|
|
22
|
+
}
|
|
23
|
+
export interface Company {
|
|
24
|
+
id: string;
|
|
25
|
+
org_id: string;
|
|
26
|
+
domain: string | null;
|
|
27
|
+
name: string | null;
|
|
28
|
+
lifecycle_stage: LifecycleStage;
|
|
29
|
+
custom: Record<string, unknown>;
|
|
30
|
+
source: ContactSource;
|
|
31
|
+
goldfox_company_id: string | null;
|
|
32
|
+
goldfox_company?: unknown | null;
|
|
33
|
+
created_at: string;
|
|
34
|
+
updated_at: string;
|
|
35
|
+
deleted_at?: string | null;
|
|
36
|
+
}
|
|
37
|
+
export interface ContactEvent {
|
|
38
|
+
id: string;
|
|
39
|
+
contact_id: string;
|
|
40
|
+
kind: EventKind;
|
|
41
|
+
payload: Record<string, unknown>;
|
|
42
|
+
at: string;
|
|
43
|
+
}
|
|
44
|
+
export interface CreateContactInput {
|
|
45
|
+
email?: string | null;
|
|
46
|
+
first_name?: string;
|
|
47
|
+
last_name?: string;
|
|
48
|
+
company_id?: string;
|
|
49
|
+
lifecycle_stage?: LifecycleStage;
|
|
50
|
+
custom?: Record<string, unknown>;
|
|
51
|
+
source?: ContactSource;
|
|
52
|
+
}
|
|
53
|
+
export interface UpdateContactInput {
|
|
54
|
+
first_name?: string | null;
|
|
55
|
+
last_name?: string | null;
|
|
56
|
+
company_id?: string | null;
|
|
57
|
+
lifecycle_stage?: LifecycleStage;
|
|
58
|
+
custom?: Record<string, unknown>;
|
|
59
|
+
deleted_at?: null;
|
|
60
|
+
}
|
|
61
|
+
export interface ContactSearchFilter {
|
|
62
|
+
lifecycle_stage?: LifecycleStage[];
|
|
63
|
+
source?: ContactSource[];
|
|
64
|
+
email?: string;
|
|
65
|
+
company_id?: string;
|
|
66
|
+
min_last_engagement_days?: number;
|
|
67
|
+
max_last_engagement_days?: number;
|
|
68
|
+
include_deleted?: boolean;
|
|
69
|
+
limit?: number;
|
|
70
|
+
offset?: number;
|
|
71
|
+
}
|
|
72
|
+
export interface ContactSearchResult {
|
|
73
|
+
contacts: Contact[];
|
|
74
|
+
total: number;
|
|
75
|
+
}
|
|
76
|
+
export interface CreateCompanyInput {
|
|
77
|
+
domain?: string | null;
|
|
78
|
+
name?: string;
|
|
79
|
+
lifecycle_stage?: LifecycleStage;
|
|
80
|
+
custom?: Record<string, unknown>;
|
|
81
|
+
source?: ContactSource;
|
|
82
|
+
}
|
|
83
|
+
export interface UpdateCompanyInput {
|
|
84
|
+
name?: string | null;
|
|
85
|
+
lifecycle_stage?: LifecycleStage;
|
|
86
|
+
custom?: Record<string, unknown>;
|
|
87
|
+
deleted_at?: null;
|
|
88
|
+
}
|
|
89
|
+
export interface CompanySearchFilter {
|
|
90
|
+
lifecycle_stage?: LifecycleStage[];
|
|
91
|
+
source?: ContactSource[];
|
|
92
|
+
domain?: string;
|
|
93
|
+
include_deleted?: boolean;
|
|
94
|
+
limit?: number;
|
|
95
|
+
offset?: number;
|
|
96
|
+
}
|
|
97
|
+
export interface CompanySearchResult {
|
|
98
|
+
companies: Company[];
|
|
99
|
+
total: number;
|
|
100
|
+
}
|
|
101
|
+
export interface EventsResponse {
|
|
102
|
+
events: ContactEvent[];
|
|
103
|
+
next_cursor?: string;
|
|
104
|
+
}
|
|
105
|
+
export interface ListEventsOptions {
|
|
106
|
+
limit?: number;
|
|
107
|
+
cursor?: string;
|
|
108
|
+
kind?: EventKind;
|
|
109
|
+
}
|
|
110
|
+
export declare function createContact(apiKey: string, orgId: string, input: CreateContactInput): Promise<Contact>;
|
|
111
|
+
export declare function getContact(apiKey: string, orgId: string, id: string): Promise<Contact>;
|
|
112
|
+
export declare function updateContact(apiKey: string, orgId: string, id: string, patch: UpdateContactInput): Promise<Contact>;
|
|
113
|
+
export declare function deleteContact(apiKey: string, orgId: string, id: string): Promise<void>;
|
|
114
|
+
export declare function searchContacts(apiKey: string, orgId: string, filter?: ContactSearchFilter): Promise<ContactSearchResult>;
|
|
115
|
+
export declare function promoteContact(apiKey: string, orgId: string, goldfoxPersonId: string): Promise<Contact>;
|
|
116
|
+
export declare function getContactEvents(apiKey: string, orgId: string, id: string, opts?: ListEventsOptions): Promise<EventsResponse>;
|
|
117
|
+
export declare function createCompany(apiKey: string, orgId: string, input: CreateCompanyInput): Promise<Company>;
|
|
118
|
+
export declare function getCompany(apiKey: string, orgId: string, id: string): Promise<Company>;
|
|
119
|
+
export declare function updateCompany(apiKey: string, orgId: string, id: string, patch: UpdateCompanyInput): Promise<Company>;
|
|
120
|
+
export declare function deleteCompany(apiKey: string, orgId: string, id: string): Promise<void>;
|
|
121
|
+
export declare function searchCompanies(apiKey: string, orgId: string, filter?: CompanySearchFilter): Promise<CompanySearchResult>;
|
|
122
|
+
export declare function promoteCompany(apiKey: string, orgId: string, domain: string): Promise<Company>;
|
package/dist/crm.js
ADDED
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.EXPOSES = void 0;
|
|
4
|
+
exports.createContact = createContact;
|
|
5
|
+
exports.getContact = getContact;
|
|
6
|
+
exports.updateContact = updateContact;
|
|
7
|
+
exports.deleteContact = deleteContact;
|
|
8
|
+
exports.searchContacts = searchContacts;
|
|
9
|
+
exports.promoteContact = promoteContact;
|
|
10
|
+
exports.getContactEvents = getContactEvents;
|
|
11
|
+
exports.createCompany = createCompany;
|
|
12
|
+
exports.getCompany = getCompany;
|
|
13
|
+
exports.updateCompany = updateCompany;
|
|
14
|
+
exports.deleteCompany = deleteCompany;
|
|
15
|
+
exports.searchCompanies = searchCompanies;
|
|
16
|
+
exports.promoteCompany = promoteCompany;
|
|
17
|
+
const client_1 = require("./client");
|
|
18
|
+
const config_1 = require("./config");
|
|
19
|
+
exports.EXPOSES = [
|
|
20
|
+
'POST /crm/orgs/{org_id}/contacts',
|
|
21
|
+
'POST /crm/orgs/{org_id}/contacts/promote',
|
|
22
|
+
'POST /crm/orgs/{org_id}/contacts/search',
|
|
23
|
+
'GET /crm/orgs/{org_id}/contacts/{id}',
|
|
24
|
+
'PATCH /crm/orgs/{org_id}/contacts/{id}',
|
|
25
|
+
'DELETE /crm/orgs/{org_id}/contacts/{id}',
|
|
26
|
+
'GET /crm/orgs/{org_id}/contacts/{id}/events',
|
|
27
|
+
'POST /crm/orgs/{org_id}/companies',
|
|
28
|
+
'POST /crm/orgs/{org_id}/companies/promote',
|
|
29
|
+
'POST /crm/orgs/{org_id}/companies/search',
|
|
30
|
+
'GET /crm/orgs/{org_id}/companies/{id}',
|
|
31
|
+
'PATCH /crm/orgs/{org_id}/companies/{id}',
|
|
32
|
+
'DELETE /crm/orgs/{org_id}/companies/{id}',
|
|
33
|
+
];
|
|
34
|
+
// ── Contacts ──────────────────────────────────────────────────────────────
|
|
35
|
+
async function createContact(apiKey, orgId, input) {
|
|
36
|
+
return (0, client_1.request)('POST', `${config_1.CRM_BASE}/crm/orgs/${encodeURIComponent(orgId)}/contacts`, apiKey, input);
|
|
37
|
+
}
|
|
38
|
+
async function getContact(apiKey, orgId, id) {
|
|
39
|
+
return (0, client_1.request)('GET', `${config_1.CRM_BASE}/crm/orgs/${encodeURIComponent(orgId)}/contacts/${encodeURIComponent(id)}`, apiKey);
|
|
40
|
+
}
|
|
41
|
+
async function updateContact(apiKey, orgId, id, patch) {
|
|
42
|
+
return (0, client_1.request)('PATCH', `${config_1.CRM_BASE}/crm/orgs/${encodeURIComponent(orgId)}/contacts/${encodeURIComponent(id)}`, apiKey, patch);
|
|
43
|
+
}
|
|
44
|
+
async function deleteContact(apiKey, orgId, id) {
|
|
45
|
+
return (0, client_1.request)('DELETE', `${config_1.CRM_BASE}/crm/orgs/${encodeURIComponent(orgId)}/contacts/${encodeURIComponent(id)}`, apiKey);
|
|
46
|
+
}
|
|
47
|
+
async function searchContacts(apiKey, orgId, filter = {}) {
|
|
48
|
+
return (0, client_1.request)('POST', `${config_1.CRM_BASE}/crm/orgs/${encodeURIComponent(orgId)}/contacts/search`, apiKey, filter);
|
|
49
|
+
}
|
|
50
|
+
async function promoteContact(apiKey, orgId, goldfoxPersonId) {
|
|
51
|
+
return (0, client_1.request)('POST', `${config_1.CRM_BASE}/crm/orgs/${encodeURIComponent(orgId)}/contacts/promote`, apiKey, { goldfox_person_id: goldfoxPersonId });
|
|
52
|
+
}
|
|
53
|
+
async function getContactEvents(apiKey, orgId, id, opts = {}) {
|
|
54
|
+
const qs = new URLSearchParams();
|
|
55
|
+
if (opts.limit != null)
|
|
56
|
+
qs.append('limit', String(opts.limit));
|
|
57
|
+
if (opts.cursor != null)
|
|
58
|
+
qs.append('cursor', opts.cursor);
|
|
59
|
+
if (opts.kind != null)
|
|
60
|
+
qs.append('kind', opts.kind);
|
|
61
|
+
const q = qs.toString();
|
|
62
|
+
const url = `${config_1.CRM_BASE}/crm/orgs/${encodeURIComponent(orgId)}/contacts/${encodeURIComponent(id)}/events${q ? `?${q}` : ''}`;
|
|
63
|
+
return (0, client_1.request)('GET', url, apiKey);
|
|
64
|
+
}
|
|
65
|
+
// ── Companies ─────────────────────────────────────────────────────────────
|
|
66
|
+
async function createCompany(apiKey, orgId, input) {
|
|
67
|
+
return (0, client_1.request)('POST', `${config_1.CRM_BASE}/crm/orgs/${encodeURIComponent(orgId)}/companies`, apiKey, input);
|
|
68
|
+
}
|
|
69
|
+
async function getCompany(apiKey, orgId, id) {
|
|
70
|
+
return (0, client_1.request)('GET', `${config_1.CRM_BASE}/crm/orgs/${encodeURIComponent(orgId)}/companies/${encodeURIComponent(id)}`, apiKey);
|
|
71
|
+
}
|
|
72
|
+
async function updateCompany(apiKey, orgId, id, patch) {
|
|
73
|
+
return (0, client_1.request)('PATCH', `${config_1.CRM_BASE}/crm/orgs/${encodeURIComponent(orgId)}/companies/${encodeURIComponent(id)}`, apiKey, patch);
|
|
74
|
+
}
|
|
75
|
+
async function deleteCompany(apiKey, orgId, id) {
|
|
76
|
+
return (0, client_1.request)('DELETE', `${config_1.CRM_BASE}/crm/orgs/${encodeURIComponent(orgId)}/companies/${encodeURIComponent(id)}`, apiKey);
|
|
77
|
+
}
|
|
78
|
+
async function searchCompanies(apiKey, orgId, filter = {}) {
|
|
79
|
+
return (0, client_1.request)('POST', `${config_1.CRM_BASE}/crm/orgs/${encodeURIComponent(orgId)}/companies/search`, apiKey, filter);
|
|
80
|
+
}
|
|
81
|
+
// Goldfox company id IS its domain (Simon's note in routes.md).
|
|
82
|
+
async function promoteCompany(apiKey, orgId, domain) {
|
|
83
|
+
return (0, client_1.request)('POST', `${config_1.CRM_BASE}/crm/orgs/${encodeURIComponent(orgId)}/companies/promote`, apiKey, { goldfox_company_id: domain });
|
|
84
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type { Exposes } from './exposes';
|
|
2
|
+
export declare const EXPOSES: Exposes;
|
|
3
|
+
export declare const MAX_VALUE_BYTES: number;
|
|
4
|
+
export interface Namespace {
|
|
5
|
+
name: string;
|
|
6
|
+
org_id: string;
|
|
7
|
+
key_count: number;
|
|
8
|
+
created_at: string;
|
|
9
|
+
}
|
|
10
|
+
export interface KeyEntry {
|
|
11
|
+
key: string;
|
|
12
|
+
value?: unknown;
|
|
13
|
+
etag: string;
|
|
14
|
+
updated_at: string;
|
|
15
|
+
}
|
|
16
|
+
export interface ListKeysOptions {
|
|
17
|
+
prefix?: string;
|
|
18
|
+
limit?: number;
|
|
19
|
+
cursor?: string;
|
|
20
|
+
values?: boolean;
|
|
21
|
+
}
|
|
22
|
+
export interface ListKeysResponse {
|
|
23
|
+
keys: KeyEntry[];
|
|
24
|
+
next_cursor?: string;
|
|
25
|
+
}
|
|
26
|
+
export interface ListNamespacesResponse {
|
|
27
|
+
namespaces: Namespace[];
|
|
28
|
+
}
|
|
29
|
+
export declare function listNamespaces(apiKey: string, orgId: string): Promise<ListNamespacesResponse>;
|
|
30
|
+
export declare function createNamespace(apiKey: string, orgId: string, name: string): Promise<Namespace>;
|
|
31
|
+
export declare function getNamespace(apiKey: string, orgId: string, name: string): Promise<Namespace>;
|
|
32
|
+
export declare function deleteNamespace(apiKey: string, orgId: string, name: string): Promise<void>;
|
|
33
|
+
export declare function listKeys(apiKey: string, orgId: string, ns: string, opts?: ListKeysOptions): Promise<ListKeysResponse>;
|
|
34
|
+
export declare function getKey(apiKey: string, orgId: string, ns: string, key: string): Promise<KeyEntry>;
|
|
35
|
+
export declare function putKey(apiKey: string, orgId: string, ns: string, key: string, value: unknown, ifMatch?: string): Promise<KeyEntry>;
|
|
36
|
+
export declare function deleteKey(apiKey: string, orgId: string, ns: string, key: string, ifMatch?: string): Promise<void>;
|
package/dist/database.js
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MAX_VALUE_BYTES = exports.EXPOSES = void 0;
|
|
4
|
+
exports.listNamespaces = listNamespaces;
|
|
5
|
+
exports.createNamespace = createNamespace;
|
|
6
|
+
exports.getNamespace = getNamespace;
|
|
7
|
+
exports.deleteNamespace = deleteNamespace;
|
|
8
|
+
exports.listKeys = listKeys;
|
|
9
|
+
exports.getKey = getKey;
|
|
10
|
+
exports.putKey = putKey;
|
|
11
|
+
exports.deleteKey = deleteKey;
|
|
12
|
+
const client_1 = require("./client");
|
|
13
|
+
const config_1 = require("./config");
|
|
14
|
+
exports.EXPOSES = [
|
|
15
|
+
'GET /database/orgs/{org_id}/namespaces',
|
|
16
|
+
'POST /database/orgs/{org_id}/namespaces',
|
|
17
|
+
'GET /database/orgs/{org_id}/namespaces/{ns}',
|
|
18
|
+
'DELETE /database/orgs/{org_id}/namespaces/{ns}',
|
|
19
|
+
'GET /database/orgs/{org_id}/namespaces/{ns}/keys',
|
|
20
|
+
'GET /database/orgs/{org_id}/namespaces/{ns}/keys/{key}',
|
|
21
|
+
'PUT /database/orgs/{org_id}/namespaces/{ns}/keys/{key}',
|
|
22
|
+
'DELETE /database/orgs/{org_id}/namespaces/{ns}/keys/{key}',
|
|
23
|
+
];
|
|
24
|
+
// Per-value JSON size cap. Mirrored server-side. Surfaced here so the CLI
|
|
25
|
+
// can fail fast before round-trip.
|
|
26
|
+
exports.MAX_VALUE_BYTES = 256 * 1024;
|
|
27
|
+
async function listNamespaces(apiKey, orgId) {
|
|
28
|
+
return (0, client_1.request)('GET', `${config_1.DATABASE_BASE}/database/orgs/${encodeURIComponent(orgId)}/namespaces`, apiKey);
|
|
29
|
+
}
|
|
30
|
+
async function createNamespace(apiKey, orgId, name) {
|
|
31
|
+
return (0, client_1.request)('POST', `${config_1.DATABASE_BASE}/database/orgs/${encodeURIComponent(orgId)}/namespaces`, apiKey, { name });
|
|
32
|
+
}
|
|
33
|
+
async function getNamespace(apiKey, orgId, name) {
|
|
34
|
+
return (0, client_1.request)('GET', `${config_1.DATABASE_BASE}/database/orgs/${encodeURIComponent(orgId)}/namespaces/${encodeURIComponent(name)}`, apiKey);
|
|
35
|
+
}
|
|
36
|
+
async function deleteNamespace(apiKey, orgId, name) {
|
|
37
|
+
return (0, client_1.request)('DELETE', `${config_1.DATABASE_BASE}/database/orgs/${encodeURIComponent(orgId)}/namespaces/${encodeURIComponent(name)}`, apiKey);
|
|
38
|
+
}
|
|
39
|
+
async function listKeys(apiKey, orgId, ns, opts = {}) {
|
|
40
|
+
const qs = new URLSearchParams();
|
|
41
|
+
if (opts.prefix != null)
|
|
42
|
+
qs.append('prefix', opts.prefix);
|
|
43
|
+
if (opts.limit != null)
|
|
44
|
+
qs.append('limit', String(opts.limit));
|
|
45
|
+
if (opts.cursor != null)
|
|
46
|
+
qs.append('cursor', opts.cursor);
|
|
47
|
+
if (opts.values)
|
|
48
|
+
qs.append('values', 'true');
|
|
49
|
+
const q = qs.toString();
|
|
50
|
+
const url = `${config_1.DATABASE_BASE}/database/orgs/${encodeURIComponent(orgId)}/namespaces/${encodeURIComponent(ns)}/keys${q ? `?${q}` : ''}`;
|
|
51
|
+
return (0, client_1.request)('GET', url, apiKey);
|
|
52
|
+
}
|
|
53
|
+
async function getKey(apiKey, orgId, ns, key) {
|
|
54
|
+
return (0, client_1.request)('GET', `${config_1.DATABASE_BASE}/database/orgs/${encodeURIComponent(orgId)}/namespaces/${encodeURIComponent(ns)}/keys/${encodeURIComponent(key)}`, apiKey);
|
|
55
|
+
}
|
|
56
|
+
// `ifMatch` enables compare-and-swap: server returns 412 ETAG_MISMATCH when
|
|
57
|
+
// the stored etag differs. Omit for last-write-wins.
|
|
58
|
+
async function putKey(apiKey, orgId, ns, key, value, ifMatch) {
|
|
59
|
+
const headers = ifMatch ? { 'If-Match': ifMatch } : undefined;
|
|
60
|
+
return (0, client_1.request)('PUT', `${config_1.DATABASE_BASE}/database/orgs/${encodeURIComponent(orgId)}/namespaces/${encodeURIComponent(ns)}/keys/${encodeURIComponent(key)}`, apiKey, { value }, headers);
|
|
61
|
+
}
|
|
62
|
+
async function deleteKey(apiKey, orgId, ns, key, ifMatch) {
|
|
63
|
+
const headers = ifMatch ? { 'If-Match': ifMatch } : undefined;
|
|
64
|
+
return (0, client_1.request)('DELETE', `${config_1.DATABASE_BASE}/database/orgs/${encodeURIComponent(orgId)}/namespaces/${encodeURIComponent(ns)}/keys/${encodeURIComponent(key)}`, apiKey, undefined, headers);
|
|
65
|
+
}
|
package/dist/domain.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import type { Exposes } from './exposes';
|
|
2
|
+
export declare const EXPOSES: Exposes;
|
|
1
3
|
export interface DomainRecord {
|
|
2
4
|
domain: string;
|
|
3
5
|
status: string;
|
|
@@ -14,11 +16,27 @@ export interface DomainSettings {
|
|
|
14
16
|
ai_bots_protection: string;
|
|
15
17
|
is_robots_txt_managed: boolean;
|
|
16
18
|
}
|
|
19
|
+
export interface Registrant {
|
|
20
|
+
name: string;
|
|
21
|
+
email: string;
|
|
22
|
+
phone: string;
|
|
23
|
+
street: string;
|
|
24
|
+
city: string;
|
|
25
|
+
state?: string;
|
|
26
|
+
postal_code: string;
|
|
27
|
+
country_code: string;
|
|
28
|
+
organization?: string;
|
|
29
|
+
}
|
|
30
|
+
export interface RegisterDomainInput {
|
|
31
|
+
years?: number;
|
|
32
|
+
registrant: Registrant;
|
|
33
|
+
}
|
|
17
34
|
export declare function checkDomain(apiKey: string, orgId: string, domain: string): Promise<{
|
|
18
35
|
available: boolean;
|
|
19
36
|
price_cents: number;
|
|
20
37
|
}>;
|
|
21
|
-
export declare function registerDomain(apiKey: string, orgId: string, domain: string,
|
|
38
|
+
export declare function registerDomain(apiKey: string, orgId: string, domain: string, input: RegisterDomainInput): Promise<DomainRecord>;
|
|
39
|
+
export declare function renewDomain(apiKey: string, orgId: string, domain: string): Promise<DomainRecord>;
|
|
22
40
|
export declare function importDomain(apiKey: string, orgId: string, payload: {
|
|
23
41
|
domain: string;
|
|
24
42
|
namecheap_api_user?: string;
|
package/dist/domain.js
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.EXPOSES = void 0;
|
|
3
4
|
exports.checkDomain = checkDomain;
|
|
4
5
|
exports.registerDomain = registerDomain;
|
|
6
|
+
exports.renewDomain = renewDomain;
|
|
5
7
|
exports.importDomain = importDomain;
|
|
6
8
|
exports.listDomains = listDomains;
|
|
7
9
|
exports.getDomainStatus = getDomainStatus;
|
|
@@ -11,11 +13,29 @@ exports.getDomainSettings = getDomainSettings;
|
|
|
11
13
|
exports.updateDomainSettings = updateDomainSettings;
|
|
12
14
|
const client_1 = require("./client");
|
|
13
15
|
const config_1 = require("./config");
|
|
16
|
+
exports.EXPOSES = [
|
|
17
|
+
'GET /domain/orgs/{org_id}/list',
|
|
18
|
+
'GET /domain/orgs/{org_id}/check/available/{name}',
|
|
19
|
+
'POST /domain/orgs/{org_id}/register',
|
|
20
|
+
'POST /domain/orgs/{org_id}/import',
|
|
21
|
+
'POST /domain/orgs/{org_id}/{domain}/assign',
|
|
22
|
+
'POST /domain/orgs/{org_id}/{domain}/renew',
|
|
23
|
+
'GET /domain/orgs/{org_id}/{domain}/settings',
|
|
24
|
+
'POST /domain/orgs/{org_id}/{domain}/settings',
|
|
25
|
+
'GET /domain/orgs/{org_id}/{domain}/status',
|
|
26
|
+
];
|
|
14
27
|
async function checkDomain(apiKey, orgId, domain) {
|
|
15
28
|
return (0, client_1.request)('GET', `${config_1.DOMAIN_BASE}/domain/orgs/${encodeURIComponent(orgId)}/check/available/${encodeURIComponent(domain)}`, apiKey);
|
|
16
29
|
}
|
|
17
|
-
async function registerDomain(apiKey, orgId, domain,
|
|
18
|
-
return (0, client_1.request)('POST', `${config_1.DOMAIN_BASE}/domain/orgs/${encodeURIComponent(orgId)}/register`, apiKey, {
|
|
30
|
+
async function registerDomain(apiKey, orgId, domain, input) {
|
|
31
|
+
return (0, client_1.request)('POST', `${config_1.DOMAIN_BASE}/domain/orgs/${encodeURIComponent(orgId)}/register`, apiKey, {
|
|
32
|
+
domain,
|
|
33
|
+
years: input.years,
|
|
34
|
+
registrant: input.registrant,
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
async function renewDomain(apiKey, orgId, domain) {
|
|
38
|
+
return (0, client_1.request)('POST', `${config_1.DOMAIN_BASE}/domain/orgs/${encodeURIComponent(orgId)}/${encodeURIComponent(domain)}/renew`, apiKey);
|
|
19
39
|
}
|
|
20
40
|
async function importDomain(apiKey, orgId, payload) {
|
|
21
41
|
return (0, client_1.request)('POST', `${config_1.DOMAIN_BASE}/domain/orgs/${encodeURIComponent(orgId)}/import`, apiKey, payload);
|