@myapihq/sdk 1.2.8 → 1.2.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/config.d.ts CHANGED
@@ -4,6 +4,7 @@ export declare const FUNNEL_BASE: string;
4
4
  export declare const FUNCTION_BASE: string;
5
5
  export declare const PAYMENTS_BASE: string;
6
6
  export declare const CONTAINER_BASE: string;
7
+ export declare const GIT_BASE: string;
7
8
  export declare const IMAGE_BASE: string;
8
9
  export declare const WEBHOOK_BASE: string;
9
10
  export declare const WORKFLOW_BASE: string;
package/dist/config.js CHANGED
@@ -8,7 +8,7 @@
8
8
  // local dev — `source scripts/local-env.sh` still points everything at
9
9
  // localhost:8080 regardless of the prod default.
10
10
  Object.defineProperty(exports, "__esModule", { value: true });
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.CONTAINER_BASE = exports.PAYMENTS_BASE = exports.FUNCTION_BASE = exports.FUNNEL_BASE = exports.DOMAIN_BASE = exports.HQ_BASE = void 0;
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.GIT_BASE = exports.CONTAINER_BASE = exports.PAYMENTS_BASE = exports.FUNCTION_BASE = exports.FUNNEL_BASE = exports.DOMAIN_BASE = exports.HQ_BASE = void 0;
12
12
  const GATEWAY = 'https://api.myapihq.com';
13
13
  exports.HQ_BASE = process.env.MYAPI_HQ_URL ?? process.env.MYAPI_API_BASE ?? GATEWAY;
14
14
  exports.DOMAIN_BASE = process.env.MYAPI_DOMAIN_URL ?? 'https://api.mydomainapi.com';
@@ -18,6 +18,7 @@ exports.FUNNEL_BASE = process.env.MYAPI_FUNNEL_URL ?? 'https://api.myfunnelapi.c
18
18
  exports.FUNCTION_BASE = process.env.MYAPI_FUNCTION_URL ?? GATEWAY;
19
19
  exports.PAYMENTS_BASE = process.env.MYAPI_PAYMENTS_URL ?? GATEWAY;
20
20
  exports.CONTAINER_BASE = process.env.MYAPI_CONTAINER_URL ?? GATEWAY;
21
+ exports.GIT_BASE = process.env.MYAPI_GIT_URL ?? GATEWAY;
21
22
  exports.IMAGE_BASE = process.env.MYAPI_IMAGE_URL ?? 'https://api.myimageapi.com';
22
23
  exports.WEBHOOK_BASE = process.env.MYAPI_WEBHOOK_URL ?? 'https://api.mywebhookapi.com';
23
24
  exports.WORKFLOW_BASE = process.env.MYAPI_WORKFLOW_URL ?? 'https://api.myworkflowapi.com';
package/dist/email.d.ts CHANGED
@@ -80,6 +80,28 @@ export interface VerifyResult {
80
80
  elapsed_ms: number;
81
81
  }
82
82
  export declare function verifyEmail(apiKey: string, orgId: string, email: string): Promise<VerifyResult>;
83
+ export interface BulkVerifyResult {
84
+ email: string;
85
+ verdict: string;
86
+ confidence: number;
87
+ source: string;
88
+ classification?: string;
89
+ mx?: string;
90
+ rcpt_code?: number;
91
+ catch_all?: boolean;
92
+ detail?: string;
93
+ }
94
+ export interface VerifyJob {
95
+ job_id: string;
96
+ status: string;
97
+ total: number;
98
+ completed?: number;
99
+ catch_all?: boolean;
100
+ results?: BulkVerifyResult[];
101
+ error?: string;
102
+ }
103
+ export declare function verifyBulk(apiKey: string, orgId: string, emails: string[], catchAll?: boolean): Promise<VerifyJob>;
104
+ export declare function getVerifyJob(apiKey: string, orgId: string, jobId: string): Promise<VerifyJob>;
83
105
  export declare function createMailbox(apiKey: string, domain: string, username: string, displayName?: string): Promise<{
84
106
  address: string;
85
107
  created_at: string;
package/dist/email.js CHANGED
@@ -2,6 +2,8 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.EXPOSES = void 0;
4
4
  exports.verifyEmail = verifyEmail;
5
+ exports.verifyBulk = verifyBulk;
6
+ exports.getVerifyJob = getVerifyJob;
5
7
  exports.createMailbox = createMailbox;
6
8
  exports.listMailboxes = listMailboxes;
7
9
  exports.activateSending = activateSending;
@@ -78,10 +80,25 @@ exports.EXPOSES = [
78
80
  'GET /email/orgs/{org_id}/campaigns/{campaign_id}/stats',
79
81
  // Verify
80
82
  'POST /email/orgs/{org_id}/verify',
83
+ 'POST /email/orgs/{org_id}/verify-bulk',
84
+ 'GET /email/orgs/{org_id}/verify-jobs/{id}',
81
85
  ];
82
86
  async function verifyEmail(apiKey, orgId, email) {
83
87
  return (0, client_1.request)('POST', `${config_1.EMAIL_BASE}/email/orgs/${encodeURIComponent(orgId)}/verify`, apiKey, { email });
84
88
  }
89
+ // verifyBulk kicks off an asynchronous bulk verification (1-500 addresses)
90
+ // and returns immediately with a job_id. `catchAll` toggles the catch-all
91
+ // check on SMTP-probed addresses (default true). Poll getVerifyJob for
92
+ // status + results.
93
+ async function verifyBulk(apiKey, orgId, emails, catchAll) {
94
+ const body = { emails };
95
+ if (catchAll !== undefined)
96
+ body.catch_all = catchAll;
97
+ return (0, client_1.request)('POST', `${config_1.EMAIL_BASE}/email/orgs/${encodeURIComponent(orgId)}/verify-bulk`, apiKey, body);
98
+ }
99
+ async function getVerifyJob(apiKey, orgId, jobId) {
100
+ return (0, client_1.request)('GET', `${config_1.EMAIL_BASE}/email/orgs/${encodeURIComponent(orgId)}/verify-jobs/${encodeURIComponent(jobId)}`, apiKey);
101
+ }
85
102
  // ── Mailbox ops (account-scoped) ─────────────────────────────────────────────
86
103
  async function createMailbox(apiKey, domain, username, displayName) {
87
104
  return (0, client_1.request)('POST', `${config_1.EMAIL_BASE}/email/mailboxes/create`, apiKey, { domain, username, display_name: displayName });
package/dist/git.d.ts ADDED
@@ -0,0 +1,96 @@
1
+ import type { Exposes } from './exposes';
2
+ export declare const EXPOSES: Exposes;
3
+ export interface RepoSummary {
4
+ name: string;
5
+ }
6
+ export interface Repo {
7
+ name: string;
8
+ default_branch: string;
9
+ branches: number;
10
+ tags: number;
11
+ }
12
+ export interface RefInfo {
13
+ name: string;
14
+ sha: string;
15
+ }
16
+ export interface Refs {
17
+ head: string;
18
+ branches: RefInfo[];
19
+ tags: RefInfo[];
20
+ }
21
+ export interface TreeEntry {
22
+ name: string;
23
+ path: string;
24
+ type: 'file' | 'dir';
25
+ mode: string;
26
+ sha: string;
27
+ size: number;
28
+ }
29
+ export interface CommitInfo {
30
+ sha: string;
31
+ message: string;
32
+ author: string;
33
+ email: string;
34
+ when: string;
35
+ parents: string[];
36
+ }
37
+ export interface CommitResult {
38
+ sha: string;
39
+ tree: string;
40
+ branch: string;
41
+ }
42
+ export interface RepackResult {
43
+ packs_before: number;
44
+ packs_after: number;
45
+ objects: number;
46
+ }
47
+ export interface Blob {
48
+ path: string;
49
+ size: number;
50
+ content_base64: string;
51
+ }
52
+ export interface FileChange {
53
+ path: string;
54
+ content?: string;
55
+ content_base64?: string;
56
+ delete?: boolean;
57
+ mode?: string;
58
+ }
59
+ export interface CommitPayload {
60
+ branch: string;
61
+ base?: string;
62
+ message: string;
63
+ author?: {
64
+ name: string;
65
+ email: string;
66
+ };
67
+ changes: FileChange[];
68
+ }
69
+ export declare function createRepo(apiKey: string, orgId: string, name: string, defaultBranch?: string): Promise<{
70
+ name: string;
71
+ default_branch: string;
72
+ }>;
73
+ export declare function listRepos(apiKey: string, orgId: string): Promise<RepoSummary[]>;
74
+ export declare function getRepo(apiKey: string, orgId: string, repo: string): Promise<Repo>;
75
+ export declare function deleteRepo(apiKey: string, orgId: string, repo: string): Promise<void>;
76
+ export declare function listRefs(apiKey: string, orgId: string, repo: string): Promise<Refs>;
77
+ export declare function listCommits(apiKey: string, orgId: string, repo: string, opts?: {
78
+ ref?: string;
79
+ limit?: number;
80
+ }): Promise<CommitInfo[]>;
81
+ export declare function getCommit(apiKey: string, orgId: string, repo: string, sha: string): Promise<CommitInfo>;
82
+ export declare function getDiff(apiKey: string, orgId: string, repo: string, base: string, head: string): Promise<string>;
83
+ export declare function listTree(apiKey: string, orgId: string, repo: string, ref: string, path?: string): Promise<TreeEntry[]>;
84
+ export declare function readBlob(apiKey: string, orgId: string, repo: string, ref: string, path: string): Promise<Blob>;
85
+ export declare function commit(apiKey: string, orgId: string, repo: string, payload: CommitPayload): Promise<CommitResult>;
86
+ export declare function createBranch(apiKey: string, orgId: string, repo: string, name: string, from: string): Promise<{
87
+ name: string;
88
+ }>;
89
+ export declare function deleteBranch(apiKey: string, orgId: string, repo: string, branch: string): Promise<void>;
90
+ export declare function createTag(apiKey: string, orgId: string, repo: string, name: string, ref: string): Promise<{
91
+ name: string;
92
+ }>;
93
+ export declare function merge(apiKey: string, orgId: string, repo: string, target: string, source: string): Promise<{
94
+ sha: string;
95
+ }>;
96
+ export declare function repack(apiKey: string, orgId: string, repo: string): Promise<RepackResult>;
package/dist/git.js ADDED
@@ -0,0 +1,121 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.EXPOSES = void 0;
4
+ exports.createRepo = createRepo;
5
+ exports.listRepos = listRepos;
6
+ exports.getRepo = getRepo;
7
+ exports.deleteRepo = deleteRepo;
8
+ exports.listRefs = listRefs;
9
+ exports.listCommits = listCommits;
10
+ exports.getCommit = getCommit;
11
+ exports.getDiff = getDiff;
12
+ exports.listTree = listTree;
13
+ exports.readBlob = readBlob;
14
+ exports.commit = commit;
15
+ exports.createBranch = createBranch;
16
+ exports.deleteBranch = deleteBranch;
17
+ exports.createTag = createTag;
18
+ exports.merge = merge;
19
+ exports.repack = repack;
20
+ const client_1 = require("./client");
21
+ const config_1 = require("./config");
22
+ // Backend: my-git-api per myapi-hq/internal/routes/git/. A stateless
23
+ // git-over-HTTP surface — repositories, refs, commits, and history served
24
+ // by a go-git engine (objects in GCS packfiles, refs in Postgres).
25
+ exports.EXPOSES = [
26
+ 'POST /git/orgs/{org_id}/repos',
27
+ 'GET /git/orgs/{org_id}/repos',
28
+ 'GET /git/orgs/{org_id}/repos/{repo}',
29
+ 'DELETE /git/orgs/{org_id}/repos/{repo}',
30
+ 'GET /git/orgs/{org_id}/repos/{repo}/refs',
31
+ 'GET /git/orgs/{org_id}/repos/{repo}/tree/{ref}',
32
+ 'GET /git/orgs/{org_id}/repos/{repo}/blob/{ref}/{path}',
33
+ 'GET /git/orgs/{org_id}/repos/{repo}/commits',
34
+ 'GET /git/orgs/{org_id}/repos/{repo}/commits/{sha}',
35
+ 'GET /git/orgs/{org_id}/repos/{repo}/diff',
36
+ 'POST /git/orgs/{org_id}/repos/{repo}/commits',
37
+ 'POST /git/orgs/{org_id}/repos/{repo}/branches',
38
+ 'DELETE /git/orgs/{org_id}/repos/{repo}/branches/{branch}',
39
+ 'POST /git/orgs/{org_id}/repos/{repo}/tags',
40
+ 'POST /git/orgs/{org_id}/repos/{repo}/merges',
41
+ 'POST /git/orgs/{org_id}/repos/{repo}/repack',
42
+ ];
43
+ function repoBase(orgId, repo) {
44
+ return `${config_1.GIT_BASE}/git/orgs/${encodeURIComponent(orgId)}/repos/${encodeURIComponent(repo)}`;
45
+ }
46
+ // ── Repos ────────────────────────────────────────────────────────────────────
47
+ async function createRepo(apiKey, orgId, name, defaultBranch) {
48
+ const body = { name };
49
+ if (defaultBranch)
50
+ body.default_branch = defaultBranch;
51
+ return (0, client_1.request)('POST', `${config_1.GIT_BASE}/git/orgs/${encodeURIComponent(orgId)}/repos`, apiKey, body);
52
+ }
53
+ async function listRepos(apiKey, orgId) {
54
+ const res = await (0, client_1.request)('GET', `${config_1.GIT_BASE}/git/orgs/${encodeURIComponent(orgId)}/repos`, apiKey);
55
+ return res?.repos ?? [];
56
+ }
57
+ async function getRepo(apiKey, orgId, repo) {
58
+ return (0, client_1.request)('GET', repoBase(orgId, repo), apiKey);
59
+ }
60
+ async function deleteRepo(apiKey, orgId, repo) {
61
+ return (0, client_1.request)('DELETE', repoBase(orgId, repo), apiKey);
62
+ }
63
+ // ── Refs / history ───────────────────────────────────────────────────────────
64
+ async function listRefs(apiKey, orgId, repo) {
65
+ return (0, client_1.request)('GET', `${repoBase(orgId, repo)}/refs`, apiKey);
66
+ }
67
+ // listCommits walks history from `ref` (default HEAD); `limit` is 1-500.
68
+ async function listCommits(apiKey, orgId, repo, opts = {}) {
69
+ const q = new URLSearchParams();
70
+ if (opts.ref)
71
+ q.set('ref', opts.ref);
72
+ if (opts.limit !== undefined)
73
+ q.set('limit', String(opts.limit));
74
+ const qs = q.toString();
75
+ const res = await (0, client_1.request)('GET', `${repoBase(orgId, repo)}/commits${qs ? `?${qs}` : ''}`, apiKey);
76
+ return res?.commits ?? [];
77
+ }
78
+ async function getCommit(apiKey, orgId, repo, sha) {
79
+ return (0, client_1.request)('GET', `${repoBase(orgId, repo)}/commits/${encodeURIComponent(sha)}`, apiKey);
80
+ }
81
+ // getDiff returns the unified diff text between two refs.
82
+ async function getDiff(apiKey, orgId, repo, base, head) {
83
+ const q = new URLSearchParams({ base, head });
84
+ const res = await (0, client_1.request)('GET', `${repoBase(orgId, repo)}/diff?${q}`, apiKey);
85
+ return res?.diff ?? '';
86
+ }
87
+ // listTree lists a ref's tree; `path` scopes it to a subdirectory.
88
+ async function listTree(apiKey, orgId, repo, ref, path) {
89
+ const qs = path ? `?path=${encodeURIComponent(path)}` : '';
90
+ const res = await (0, client_1.request)('GET', `${repoBase(orgId, repo)}/tree/${encodeURIComponent(ref)}${qs}`, apiKey);
91
+ return res?.entries ?? [];
92
+ }
93
+ // readBlob returns a file's content (base64-encoded — safe for binary).
94
+ async function readBlob(apiKey, orgId, repo, ref, path) {
95
+ // The backend route is /blob/{ref}/{path...} — a catch-all — so slashes
96
+ // in the path must survive; encode each segment, not the separators.
97
+ const encPath = path.split('/').map(encodeURIComponent).join('/');
98
+ return (0, client_1.request)('GET', `${repoBase(orgId, repo)}/blob/${encodeURIComponent(ref)}/${encPath}`, apiKey);
99
+ }
100
+ // ── Writes ───────────────────────────────────────────────────────────────────
101
+ // commit applies all `changes` atomically onto `branch`.
102
+ async function commit(apiKey, orgId, repo, payload) {
103
+ return (0, client_1.request)('POST', `${repoBase(orgId, repo)}/commits`, apiKey, payload);
104
+ }
105
+ async function createBranch(apiKey, orgId, repo, name, from) {
106
+ return (0, client_1.request)('POST', `${repoBase(orgId, repo)}/branches`, apiKey, { name, from });
107
+ }
108
+ async function deleteBranch(apiKey, orgId, repo, branch) {
109
+ return (0, client_1.request)('DELETE', `${repoBase(orgId, repo)}/branches/${encodeURIComponent(branch)}`, apiKey);
110
+ }
111
+ async function createTag(apiKey, orgId, repo, name, ref) {
112
+ return (0, client_1.request)('POST', `${repoBase(orgId, repo)}/tags`, apiKey, { name, ref });
113
+ }
114
+ // merge fast-forwards `target` to `source` (fast-forward only).
115
+ async function merge(apiKey, orgId, repo, target, source) {
116
+ return (0, client_1.request)('POST', `${repoBase(orgId, repo)}/merges`, apiKey, { target, source });
117
+ }
118
+ // repack compacts the repository's incremental packfiles into one.
119
+ async function repack(apiKey, orgId, repo) {
120
+ return (0, client_1.request)('POST', `${repoBase(orgId, repo)}/repack`, apiKey);
121
+ }
package/dist/index.d.ts CHANGED
@@ -19,3 +19,4 @@ export * as crm from './crm';
19
19
  export * as fn from './function';
20
20
  export * as payments from './payments';
21
21
  export * as container from './container';
22
+ export * as git from './git';
package/dist/index.js CHANGED
@@ -36,7 +36,7 @@ var __importStar = (this && this.__importStar) || (function () {
36
36
  };
37
37
  })();
38
38
  Object.defineProperty(exports, "__esModule", { value: true });
39
- exports.container = exports.payments = exports.fn = exports.crm = exports.database = exports.llm = exports.audience = exports.company = exports.people = exports.url = exports.workflow = exports.webhook = exports.storage = exports.pixel = exports.image = exports.funnel = exports.email = exports.domain = exports.hq = void 0;
39
+ exports.git = exports.container = exports.payments = exports.fn = exports.crm = exports.database = exports.llm = exports.audience = exports.company = exports.people = exports.url = exports.workflow = exports.webhook = exports.storage = exports.pixel = exports.image = exports.funnel = exports.email = exports.domain = exports.hq = void 0;
40
40
  __exportStar(require("./types"), exports);
41
41
  __exportStar(require("./client"), exports);
42
42
  // Note: config constants (STORAGE_BASE etc.) are NOT re-exported from the
@@ -64,3 +64,4 @@ exports.crm = __importStar(require("./crm"));
64
64
  exports.fn = __importStar(require("./function"));
65
65
  exports.payments = __importStar(require("./payments"));
66
66
  exports.container = __importStar(require("./container"));
67
+ exports.git = __importStar(require("./git"));
package/dist/pixel.d.ts CHANGED
@@ -56,7 +56,7 @@ export declare function getEvents(apiKey: string, orgId: string, params: {
56
56
  limit: number;
57
57
  offset: number;
58
58
  }>;
59
- export declare function getIdentity(apiKey: string, orgId: string, pixelId: string): Promise<{
59
+ export declare function getIdentity(apiKey: string, orgId: string, pixelId: string, website: string): Promise<{
60
60
  uuid: string;
61
61
  is_resolved: boolean;
62
62
  nodes: Record<string, {
package/dist/pixel.js CHANGED
@@ -48,8 +48,10 @@ async function getEvents(apiKey, orgId, params) {
48
48
  const url = `${config_1.PIXEL_BASE}/pixel/orgs/${encodeURIComponent(orgId)}/events${queryString ? `?${queryString}` : ''}`;
49
49
  return (0, client_1.request)('GET', url, apiKey);
50
50
  }
51
- async function getIdentity(apiKey, orgId, pixelId) {
52
- return (0, client_1.request)('GET', `${config_1.PIXEL_BASE}/pixel/orgs/${encodeURIComponent(orgId)}/identity/${encodeURIComponent(pixelId)}`, apiKey);
51
+ // getIdentity resolves a pixel's identity graph. `website` is required —
52
+ // the backend scopes the lookup to a domain the org owns.
53
+ async function getIdentity(apiKey, orgId, pixelId, website) {
54
+ return (0, client_1.request)('GET', `${config_1.PIXEL_BASE}/pixel/orgs/${encodeURIComponent(orgId)}/identity/${encodeURIComponent(pixelId)}?website=${encodeURIComponent(website)}`, apiKey);
53
55
  }
54
56
  // Sample of geographic distribution of the org's pixel audience. Backend
55
57
  // returns whatever shape it wants; we type as record-of-unknowns and let
package/dist/services.js CHANGED
@@ -39,16 +39,16 @@ exports.SERVICES = [
39
39
  },
40
40
  // ── send ────────────────────────────────────────────────────────────
41
41
  {
42
- // Customer-facing email surface (mailboxes, campaigns, templates,
43
- // warmup) is gated pre-launch — 503 SERVICE_NOT_LAUNCHED. Sibling
44
- // `my-email-verify-api` stays GA and remains the discoverable entry
45
- // point for the email primitive today.
42
+ // Customer-facing email surface mailboxes, campaigns, templates,
43
+ // warmup. Launched 2026-05-17: the backend lifted the pre-launch gate
44
+ // (the [disabled, pre-launch] / 503 SERVICE_NOT_LAUNCHED state is gone).
45
+ // Sibling `my-email-verify-api` is the sync single-address verifier.
46
46
  module: 'email',
47
47
  skill: 'my-email-api',
48
48
  domain: 'myemailapi.com',
49
49
  description: 'Send transactional and bulk email from your own domain. Mailboxes, AI templates, drip campaigns, and warmup.',
50
50
  category: 'send',
51
- status: 'preview',
51
+ status: 'ga',
52
52
  keywords: k('email', 'transactional', 'campaign', 'smtp'),
53
53
  },
54
54
  {
@@ -236,4 +236,16 @@ exports.SERVICES = [
236
236
  status: 'preview',
237
237
  keywords: k('container', 'cloud-run', 'service', 'worker', 'job'),
238
238
  },
239
+ {
240
+ // CLI top-level command + SDK namespace are both `git`; skill directory
241
+ // is `my-git-api`. A stateless git-over-HTTP surface (go-git engine;
242
+ // objects in GCS, refs in Postgres) — repos, commits, branches, history.
243
+ module: 'git',
244
+ skill: 'my-git-api',
245
+ domain: 'mygitapi.com',
246
+ description: 'Hosted git repositories over HTTP — create repos, commit files, manage branches and tags, read trees, blobs, history, and diffs. No local clone required.',
247
+ category: 'store',
248
+ status: 'preview',
249
+ keywords: k('git', 'repository', 'version-control', 'commit', 'scm'),
250
+ },
239
251
  ];
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@myapihq/sdk",
3
3
  "license": "Apache-2.0",
4
- "version": "1.2.8",
4
+ "version": "1.2.9",
5
5
  "description": "TypeScript SDK for the MyAPI ecosystem",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",
package/src/config.ts CHANGED
@@ -17,6 +17,7 @@ export const FUNNEL_BASE = process.env.MYAPI_FUNNEL_URL ?? 'https://api.myfunn
17
17
  export const FUNCTION_BASE= process.env.MYAPI_FUNCTION_URL?? GATEWAY;
18
18
  export const PAYMENTS_BASE= process.env.MYAPI_PAYMENTS_URL?? GATEWAY;
19
19
  export const CONTAINER_BASE=process.env.MYAPI_CONTAINER_URL?? GATEWAY;
20
+ export const GIT_BASE = process.env.MYAPI_GIT_URL ?? GATEWAY;
20
21
  export const IMAGE_BASE = process.env.MYAPI_IMAGE_URL ?? 'https://api.myimageapi.com';
21
22
  export const WEBHOOK_BASE = process.env.MYAPI_WEBHOOK_URL ?? 'https://api.mywebhookapi.com';
22
23
  export const WORKFLOW_BASE= process.env.MYAPI_WORKFLOW_URL?? 'https://api.myworkflowapi.com';
package/src/email.ts CHANGED
@@ -43,6 +43,8 @@ export const EXPOSES: Exposes = [
43
43
  'GET /email/orgs/{org_id}/campaigns/{campaign_id}/stats',
44
44
  // Verify
45
45
  'POST /email/orgs/{org_id}/verify',
46
+ 'POST /email/orgs/{org_id}/verify-bulk',
47
+ 'GET /email/orgs/{org_id}/verify-jobs/{id}',
46
48
  ];
47
49
 
48
50
  export interface EmailMessage { message_id: string; from: string; subject: string; body?: string; received_at: string }
@@ -90,6 +92,43 @@ export async function verifyEmail(apiKey: string, orgId: string, email: string):
90
92
  return request('POST', `${BASE_URL}/email/orgs/${encodeURIComponent(orgId)}/verify`, apiKey, { email });
91
93
  }
92
94
 
95
+ // One address's outcome in a bulk-verification job.
96
+ export interface BulkVerifyResult {
97
+ email: string;
98
+ verdict: string; // deliverable | undeliverable | risky | unknown
99
+ confidence: number;
100
+ source: string; // phase1 | strategist | smtp
101
+ classification?: string;
102
+ mx?: string;
103
+ rcpt_code?: number;
104
+ catch_all?: boolean;
105
+ detail?: string;
106
+ }
107
+
108
+ export interface VerifyJob {
109
+ job_id: string;
110
+ status: string; // pending | running | done | failed
111
+ total: number;
112
+ completed?: number;
113
+ catch_all?: boolean;
114
+ results?: BulkVerifyResult[];
115
+ error?: string;
116
+ }
117
+
118
+ // verifyBulk kicks off an asynchronous bulk verification (1-500 addresses)
119
+ // and returns immediately with a job_id. `catchAll` toggles the catch-all
120
+ // check on SMTP-probed addresses (default true). Poll getVerifyJob for
121
+ // status + results.
122
+ export async function verifyBulk(apiKey: string, orgId: string, emails: string[], catchAll?: boolean): Promise<VerifyJob> {
123
+ const body: { emails: string[]; catch_all?: boolean } = { emails };
124
+ if (catchAll !== undefined) body.catch_all = catchAll;
125
+ return request('POST', `${BASE_URL}/email/orgs/${encodeURIComponent(orgId)}/verify-bulk`, apiKey, body);
126
+ }
127
+
128
+ export async function getVerifyJob(apiKey: string, orgId: string, jobId: string): Promise<VerifyJob> {
129
+ return request('GET', `${BASE_URL}/email/orgs/${encodeURIComponent(orgId)}/verify-jobs/${encodeURIComponent(jobId)}`, apiKey);
130
+ }
131
+
93
132
  // ── Mailbox ops (account-scoped) ─────────────────────────────────────────────
94
133
 
95
134
  export async function createMailbox(apiKey: string, domain: string, username: string, displayName?: string): Promise<{ address: string; created_at: string }> {
package/src/git.ts ADDED
@@ -0,0 +1,171 @@
1
+ import { request } from './client';
2
+ import { GIT_BASE as BASE_URL } from './config';
3
+ import type { Exposes } from './exposes';
4
+
5
+ // Backend: my-git-api per myapi-hq/internal/routes/git/. A stateless
6
+ // git-over-HTTP surface — repositories, refs, commits, and history served
7
+ // by a go-git engine (objects in GCS packfiles, refs in Postgres).
8
+ export const EXPOSES: Exposes = [
9
+ 'POST /git/orgs/{org_id}/repos',
10
+ 'GET /git/orgs/{org_id}/repos',
11
+ 'GET /git/orgs/{org_id}/repos/{repo}',
12
+ 'DELETE /git/orgs/{org_id}/repos/{repo}',
13
+ 'GET /git/orgs/{org_id}/repos/{repo}/refs',
14
+ 'GET /git/orgs/{org_id}/repos/{repo}/tree/{ref}',
15
+ 'GET /git/orgs/{org_id}/repos/{repo}/blob/{ref}/{path}',
16
+ 'GET /git/orgs/{org_id}/repos/{repo}/commits',
17
+ 'GET /git/orgs/{org_id}/repos/{repo}/commits/{sha}',
18
+ 'GET /git/orgs/{org_id}/repos/{repo}/diff',
19
+ 'POST /git/orgs/{org_id}/repos/{repo}/commits',
20
+ 'POST /git/orgs/{org_id}/repos/{repo}/branches',
21
+ 'DELETE /git/orgs/{org_id}/repos/{repo}/branches/{branch}',
22
+ 'POST /git/orgs/{org_id}/repos/{repo}/tags',
23
+ 'POST /git/orgs/{org_id}/repos/{repo}/merges',
24
+ 'POST /git/orgs/{org_id}/repos/{repo}/repack',
25
+ ];
26
+
27
+ export interface RepoSummary { name: string }
28
+ export interface Repo {
29
+ name: string;
30
+ default_branch: string;
31
+ branches: number;
32
+ tags: number;
33
+ }
34
+ export interface RefInfo { name: string; sha: string }
35
+ export interface Refs {
36
+ head: string; // symbolic HEAD target, e.g. "refs/heads/main"
37
+ branches: RefInfo[];
38
+ tags: RefInfo[];
39
+ }
40
+ export interface TreeEntry {
41
+ name: string;
42
+ path: string;
43
+ type: 'file' | 'dir';
44
+ mode: string;
45
+ sha: string;
46
+ size: number;
47
+ }
48
+ export interface CommitInfo {
49
+ sha: string;
50
+ message: string;
51
+ author: string;
52
+ email: string;
53
+ when: string;
54
+ parents: string[];
55
+ }
56
+ export interface CommitResult { sha: string; tree: string; branch: string }
57
+ export interface RepackResult { packs_before: number; packs_after: number; objects: number }
58
+ export interface Blob { path: string; size: number; content_base64: string }
59
+
60
+ // One file edit in an atomic commit. Either `content` (UTF-8 text) or
61
+ // `content_base64` (binary); set `delete` to remove the path instead.
62
+ export interface FileChange {
63
+ path: string;
64
+ content?: string;
65
+ content_base64?: string;
66
+ delete?: boolean;
67
+ mode?: string; // "100644" (default), "100755" (exec), "120000" (symlink)
68
+ }
69
+ export interface CommitPayload {
70
+ branch: string; // required — short name or full ref
71
+ base?: string; // expected branch tip; "" => branch must not exist
72
+ message: string;
73
+ author?: { name: string; email: string };
74
+ changes: FileChange[];
75
+ }
76
+
77
+ function repoBase(orgId: string, repo: string): string {
78
+ return `${BASE_URL}/git/orgs/${encodeURIComponent(orgId)}/repos/${encodeURIComponent(repo)}`;
79
+ }
80
+
81
+ // ── Repos ────────────────────────────────────────────────────────────────────
82
+
83
+ export async function createRepo(apiKey: string, orgId: string, name: string, defaultBranch?: string): Promise<{ name: string; default_branch: string }> {
84
+ const body: Record<string, string> = { name };
85
+ if (defaultBranch) body.default_branch = defaultBranch;
86
+ return request('POST', `${BASE_URL}/git/orgs/${encodeURIComponent(orgId)}/repos`, apiKey, body);
87
+ }
88
+
89
+ export async function listRepos(apiKey: string, orgId: string): Promise<RepoSummary[]> {
90
+ const res = await request<{ repos?: RepoSummary[] }>('GET', `${BASE_URL}/git/orgs/${encodeURIComponent(orgId)}/repos`, apiKey);
91
+ return res?.repos ?? [];
92
+ }
93
+
94
+ export async function getRepo(apiKey: string, orgId: string, repo: string): Promise<Repo> {
95
+ return request('GET', repoBase(orgId, repo), apiKey);
96
+ }
97
+
98
+ export async function deleteRepo(apiKey: string, orgId: string, repo: string): Promise<void> {
99
+ return request('DELETE', repoBase(orgId, repo), apiKey);
100
+ }
101
+
102
+ // ── Refs / history ───────────────────────────────────────────────────────────
103
+
104
+ export async function listRefs(apiKey: string, orgId: string, repo: string): Promise<Refs> {
105
+ return request('GET', `${repoBase(orgId, repo)}/refs`, apiKey);
106
+ }
107
+
108
+ // listCommits walks history from `ref` (default HEAD); `limit` is 1-500.
109
+ export async function listCommits(apiKey: string, orgId: string, repo: string, opts: { ref?: string; limit?: number } = {}): Promise<CommitInfo[]> {
110
+ const q = new URLSearchParams();
111
+ if (opts.ref) q.set('ref', opts.ref);
112
+ if (opts.limit !== undefined) q.set('limit', String(opts.limit));
113
+ const qs = q.toString();
114
+ const res = await request<{ commits?: CommitInfo[] }>('GET', `${repoBase(orgId, repo)}/commits${qs ? `?${qs}` : ''}`, apiKey);
115
+ return res?.commits ?? [];
116
+ }
117
+
118
+ export async function getCommit(apiKey: string, orgId: string, repo: string, sha: string): Promise<CommitInfo> {
119
+ return request('GET', `${repoBase(orgId, repo)}/commits/${encodeURIComponent(sha)}`, apiKey);
120
+ }
121
+
122
+ // getDiff returns the unified diff text between two refs.
123
+ export async function getDiff(apiKey: string, orgId: string, repo: string, base: string, head: string): Promise<string> {
124
+ const q = new URLSearchParams({ base, head });
125
+ const res = await request<{ diff?: string }>('GET', `${repoBase(orgId, repo)}/diff?${q}`, apiKey);
126
+ return res?.diff ?? '';
127
+ }
128
+
129
+ // listTree lists a ref's tree; `path` scopes it to a subdirectory.
130
+ export async function listTree(apiKey: string, orgId: string, repo: string, ref: string, path?: string): Promise<TreeEntry[]> {
131
+ const qs = path ? `?path=${encodeURIComponent(path)}` : '';
132
+ const res = await request<{ entries?: TreeEntry[] }>('GET', `${repoBase(orgId, repo)}/tree/${encodeURIComponent(ref)}${qs}`, apiKey);
133
+ return res?.entries ?? [];
134
+ }
135
+
136
+ // readBlob returns a file's content (base64-encoded — safe for binary).
137
+ export async function readBlob(apiKey: string, orgId: string, repo: string, ref: string, path: string): Promise<Blob> {
138
+ // The backend route is /blob/{ref}/{path...} — a catch-all — so slashes
139
+ // in the path must survive; encode each segment, not the separators.
140
+ const encPath = path.split('/').map(encodeURIComponent).join('/');
141
+ return request('GET', `${repoBase(orgId, repo)}/blob/${encodeURIComponent(ref)}/${encPath}`, apiKey);
142
+ }
143
+
144
+ // ── Writes ───────────────────────────────────────────────────────────────────
145
+
146
+ // commit applies all `changes` atomically onto `branch`.
147
+ export async function commit(apiKey: string, orgId: string, repo: string, payload: CommitPayload): Promise<CommitResult> {
148
+ return request('POST', `${repoBase(orgId, repo)}/commits`, apiKey, payload);
149
+ }
150
+
151
+ export async function createBranch(apiKey: string, orgId: string, repo: string, name: string, from: string): Promise<{ name: string }> {
152
+ return request('POST', `${repoBase(orgId, repo)}/branches`, apiKey, { name, from });
153
+ }
154
+
155
+ export async function deleteBranch(apiKey: string, orgId: string, repo: string, branch: string): Promise<void> {
156
+ return request('DELETE', `${repoBase(orgId, repo)}/branches/${encodeURIComponent(branch)}`, apiKey);
157
+ }
158
+
159
+ export async function createTag(apiKey: string, orgId: string, repo: string, name: string, ref: string): Promise<{ name: string }> {
160
+ return request('POST', `${repoBase(orgId, repo)}/tags`, apiKey, { name, ref });
161
+ }
162
+
163
+ // merge fast-forwards `target` to `source` (fast-forward only).
164
+ export async function merge(apiKey: string, orgId: string, repo: string, target: string, source: string): Promise<{ sha: string }> {
165
+ return request('POST', `${repoBase(orgId, repo)}/merges`, apiKey, { target, source });
166
+ }
167
+
168
+ // repack compacts the repository's incremental packfiles into one.
169
+ export async function repack(apiKey: string, orgId: string, repo: string): Promise<RepackResult> {
170
+ return request('POST', `${repoBase(orgId, repo)}/repack`, apiKey);
171
+ }
package/src/index.ts CHANGED
@@ -25,3 +25,4 @@ export * as crm from './crm';
25
25
  export * as fn from './function';
26
26
  export * as payments from './payments';
27
27
  export * as container from './container';
28
+ export * as git from './git';
package/src/pixel.ts CHANGED
@@ -66,8 +66,10 @@ export async function getEvents(apiKey: string, orgId: string, params: { campaig
66
66
  return request('GET', url, apiKey);
67
67
  }
68
68
 
69
- export async function getIdentity(apiKey: string, orgId: string, pixelId: string): Promise<{ uuid: string; is_resolved: boolean; nodes: Record<string, { type: string; probability: number }>; latency_ms: number }> {
70
- return request('GET', `${BASE_URL}/pixel/orgs/${encodeURIComponent(orgId)}/identity/${encodeURIComponent(pixelId)}`, apiKey);
69
+ // getIdentity resolves a pixel's identity graph. `website` is required
70
+ // the backend scopes the lookup to a domain the org owns.
71
+ export async function getIdentity(apiKey: string, orgId: string, pixelId: string, website: string): Promise<{ uuid: string; is_resolved: boolean; nodes: Record<string, { type: string; probability: number }>; latency_ms: number }> {
72
+ return request('GET', `${BASE_URL}/pixel/orgs/${encodeURIComponent(orgId)}/identity/${encodeURIComponent(pixelId)}?website=${encodeURIComponent(website)}`, apiKey);
71
73
  }
72
74
 
73
75
  // Sample of geographic distribution of the org's pixel audience. Backend
package/src/services.ts CHANGED
@@ -65,16 +65,16 @@ export const SERVICES: readonly ServiceMeta[] = [
65
65
 
66
66
  // ── send ────────────────────────────────────────────────────────────
67
67
  {
68
- // Customer-facing email surface (mailboxes, campaigns, templates,
69
- // warmup) is gated pre-launch — 503 SERVICE_NOT_LAUNCHED. Sibling
70
- // `my-email-verify-api` stays GA and remains the discoverable entry
71
- // point for the email primitive today.
68
+ // Customer-facing email surface mailboxes, campaigns, templates,
69
+ // warmup. Launched 2026-05-17: the backend lifted the pre-launch gate
70
+ // (the [disabled, pre-launch] / 503 SERVICE_NOT_LAUNCHED state is gone).
71
+ // Sibling `my-email-verify-api` is the sync single-address verifier.
72
72
  module: 'email',
73
73
  skill: 'my-email-api',
74
74
  domain: 'myemailapi.com',
75
75
  description: 'Send transactional and bulk email from your own domain. Mailboxes, AI templates, drip campaigns, and warmup.',
76
76
  category: 'send',
77
- status: 'preview',
77
+ status: 'ga',
78
78
  keywords: k('email', 'transactional', 'campaign', 'smtp'),
79
79
  },
80
80
  {
@@ -266,4 +266,16 @@ export const SERVICES: readonly ServiceMeta[] = [
266
266
  status: 'preview',
267
267
  keywords: k('container', 'cloud-run', 'service', 'worker', 'job'),
268
268
  },
269
+ {
270
+ // CLI top-level command + SDK namespace are both `git`; skill directory
271
+ // is `my-git-api`. A stateless git-over-HTTP surface (go-git engine;
272
+ // objects in GCS, refs in Postgres) — repos, commits, branches, history.
273
+ module: 'git',
274
+ skill: 'my-git-api',
275
+ domain: 'mygitapi.com',
276
+ description: 'Hosted git repositories over HTTP — create repos, commit files, manage branches and tags, read trees, blobs, history, and diffs. No local clone required.',
277
+ category: 'store',
278
+ status: 'preview',
279
+ keywords: k('git', 'repository', 'version-control', 'commit', 'scm'),
280
+ },
269
281
  ] as const;