@myapihq/sdk 1.0.19 → 1.0.21
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/funnel.d.ts +7 -2
- package/package.json +1 -1
- package/src/funnel.ts +3 -2
package/dist/funnel.d.ts
CHANGED
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
export interface Funnel {
|
|
2
2
|
id: string;
|
|
3
3
|
org_id: string;
|
|
4
|
-
domain: string;
|
|
5
4
|
created_at: string;
|
|
5
|
+
updated_at: string;
|
|
6
|
+
}
|
|
7
|
+
export interface CreateFunnelResponse {
|
|
8
|
+
funnel: Funnel;
|
|
9
|
+
subdomain_url?: string;
|
|
10
|
+
domain_url?: string;
|
|
6
11
|
}
|
|
7
12
|
export interface VerifyResult {
|
|
8
13
|
pages?: Array<{
|
|
@@ -17,7 +22,7 @@ export interface VerifyTest {
|
|
|
17
22
|
passed: boolean;
|
|
18
23
|
details: string;
|
|
19
24
|
}
|
|
20
|
-
export declare function createFunnel(apiKey: string, orgId: string): Promise<
|
|
25
|
+
export declare function createFunnel(apiKey: string, orgId: string): Promise<CreateFunnelResponse>;
|
|
21
26
|
export declare function getFunnel(apiKey: string, orgId: string, funnelId: string): Promise<Funnel>;
|
|
22
27
|
export declare function listFunnels(apiKey: string, orgId: string): Promise<Funnel[]>;
|
|
23
28
|
export declare function deleteFunnel(apiKey: string, orgId: string, funnelId: string): Promise<void>;
|
package/package.json
CHANGED
package/src/funnel.ts
CHANGED
|
@@ -2,14 +2,15 @@ import { request } from './client';
|
|
|
2
2
|
|
|
3
3
|
const BASE_URL = 'https://api.myfunnelapi.com';
|
|
4
4
|
|
|
5
|
-
export interface Funnel { id: string; org_id: string;
|
|
5
|
+
export interface Funnel { id: string; org_id: string; created_at: string; updated_at: string }
|
|
6
|
+
export interface CreateFunnelResponse { funnel: Funnel; subdomain_url?: string; domain_url?: string }
|
|
6
7
|
export interface VerifyResult {
|
|
7
8
|
pages?: Array<{ slug: string; tests: VerifyTest[] }>;
|
|
8
9
|
tests?: VerifyTest[];
|
|
9
10
|
}
|
|
10
11
|
export interface VerifyTest { type: 'link' | 'webhook'; url: string; passed: boolean; details: string }
|
|
11
12
|
|
|
12
|
-
export async function createFunnel(apiKey: string, orgId: string): Promise<
|
|
13
|
+
export async function createFunnel(apiKey: string, orgId: string): Promise<CreateFunnelResponse> {
|
|
13
14
|
return request('POST', `${BASE_URL}/funnel/orgs/${encodeURIComponent(orgId)}/funnels`, apiKey, {});
|
|
14
15
|
}
|
|
15
16
|
export async function getFunnel(apiKey: string, orgId: string, funnelId: string): Promise<Funnel> {
|