@addn/sdk 1.0.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/auth/storage.d.ts +25 -0
- package/dist/auth/storage.d.ts.map +1 -0
- package/dist/auth/storage.js +72 -0
- package/dist/auth/storage.js.map +1 -0
- package/dist/auth/token-manager.d.ts +39 -0
- package/dist/auth/token-manager.d.ts.map +1 -0
- package/dist/auth/token-manager.js +98 -0
- package/dist/auth/token-manager.js.map +1 -0
- package/dist/client.d.ts +31 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/client.js +39 -0
- package/dist/client.js.map +1 -0
- package/dist/http/errors.d.ts +51 -0
- package/dist/http/errors.d.ts.map +1 -0
- package/dist/http/errors.js +92 -0
- package/dist/http/errors.js.map +1 -0
- package/dist/http/http-client.d.ts +18 -0
- package/dist/http/http-client.d.ts.map +1 -0
- package/dist/http/http-client.js +221 -0
- package/dist/http/http-client.js.map +1 -0
- package/dist/http/types.d.ts +27 -0
- package/dist/http/types.d.ts.map +1 -0
- package/dist/http/types.js +3 -0
- package/dist/http/types.js.map +1 -0
- package/dist/index.d.ts +18 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +36 -0
- package/dist/index.js.map +1 -0
- package/dist/modules/accounts.module.d.ts +15 -0
- package/dist/modules/accounts.module.d.ts.map +1 -0
- package/dist/modules/accounts.module.js +57 -0
- package/dist/modules/accounts.module.js.map +1 -0
- package/dist/modules/analytics.module.d.ts +14 -0
- package/dist/modules/analytics.module.d.ts.map +1 -0
- package/dist/modules/analytics.module.js +24 -0
- package/dist/modules/analytics.module.js.map +1 -0
- package/dist/modules/auth.module.d.ts +18 -0
- package/dist/modules/auth.module.d.ts.map +1 -0
- package/dist/modules/auth.module.js +113 -0
- package/dist/modules/auth.module.js.map +1 -0
- package/dist/modules/content-plans.module.d.ts +58 -0
- package/dist/modules/content-plans.module.d.ts.map +1 -0
- package/dist/modules/content-plans.module.js +125 -0
- package/dist/modules/content-plans.module.js.map +1 -0
- package/dist/modules/customers.module.d.ts +12 -0
- package/dist/modules/customers.module.d.ts.map +1 -0
- package/dist/modules/customers.module.js +43 -0
- package/dist/modules/customers.module.js.map +1 -0
- package/dist/modules/notifications.module.d.ts +20 -0
- package/dist/modules/notifications.module.d.ts.map +1 -0
- package/dist/modules/notifications.module.js +37 -0
- package/dist/modules/notifications.module.js.map +1 -0
- package/dist/modules/orgs.module.d.ts +23 -0
- package/dist/modules/orgs.module.d.ts.map +1 -0
- package/dist/modules/orgs.module.js +112 -0
- package/dist/modules/orgs.module.js.map +1 -0
- package/dist/modules/projects.module.d.ts +26 -0
- package/dist/modules/projects.module.d.ts.map +1 -0
- package/dist/modules/projects.module.js +88 -0
- package/dist/modules/projects.module.js.map +1 -0
- package/dist/modules/scheduling.module.d.ts +13 -0
- package/dist/modules/scheduling.module.d.ts.map +1 -0
- package/dist/modules/scheduling.module.js +32 -0
- package/dist/modules/scheduling.module.js.map +1 -0
- package/dist/modules/storage.module.d.ts +36 -0
- package/dist/modules/storage.module.d.ts.map +1 -0
- package/dist/modules/storage.module.js +100 -0
- package/dist/modules/storage.module.js.map +1 -0
- package/dist/modules/subscriptions.module.d.ts +25 -0
- package/dist/modules/subscriptions.module.d.ts.map +1 -0
- package/dist/modules/subscriptions.module.js +62 -0
- package/dist/modules/subscriptions.module.js.map +1 -0
- package/dist/types/account.types.d.ts +17 -0
- package/dist/types/account.types.d.ts.map +1 -0
- package/dist/types/account.types.js +3 -0
- package/dist/types/account.types.js.map +1 -0
- package/dist/types/analytics.types.d.ts +15 -0
- package/dist/types/analytics.types.d.ts.map +1 -0
- package/dist/types/analytics.types.js +3 -0
- package/dist/types/analytics.types.js.map +1 -0
- package/dist/types/api.types.d.ts +20 -0
- package/dist/types/api.types.d.ts.map +1 -0
- package/dist/types/api.types.js +3 -0
- package/dist/types/api.types.js.map +1 -0
- package/dist/types/auth.types.d.ts +40 -0
- package/dist/types/auth.types.d.ts.map +1 -0
- package/dist/types/auth.types.js +3 -0
- package/dist/types/auth.types.js.map +1 -0
- package/dist/types/content-plan.types.d.ts +27 -0
- package/dist/types/content-plan.types.d.ts.map +1 -0
- package/dist/types/content-plan.types.js +3 -0
- package/dist/types/content-plan.types.js.map +1 -0
- package/dist/types/customer.types.d.ts +25 -0
- package/dist/types/customer.types.d.ts.map +1 -0
- package/dist/types/customer.types.js +3 -0
- package/dist/types/customer.types.js.map +1 -0
- package/dist/types/index.d.ts +585 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +6 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/notification.types.d.ts +11 -0
- package/dist/types/notification.types.d.ts.map +1 -0
- package/dist/types/notification.types.js +3 -0
- package/dist/types/notification.types.js.map +1 -0
- package/dist/types/org.types.d.ts +25 -0
- package/dist/types/org.types.d.ts.map +1 -0
- package/dist/types/org.types.js +3 -0
- package/dist/types/org.types.js.map +1 -0
- package/dist/types/project.types.d.ts +20 -0
- package/dist/types/project.types.d.ts.map +1 -0
- package/dist/types/project.types.js +3 -0
- package/dist/types/project.types.js.map +1 -0
- package/dist/types/scheduling.types.d.ts +31 -0
- package/dist/types/scheduling.types.d.ts.map +1 -0
- package/dist/types/scheduling.types.js +3 -0
- package/dist/types/scheduling.types.js.map +1 -0
- package/dist/types/storage.types.d.ts +8 -0
- package/dist/types/storage.types.d.ts.map +1 -0
- package/dist/types/storage.types.js +3 -0
- package/dist/types/storage.types.js.map +1 -0
- package/dist/types/subscription.types.d.ts +19 -0
- package/dist/types/subscription.types.d.ts.map +1 -0
- package/dist/types/subscription.types.js +3 -0
- package/dist/types/subscription.types.js.map +1 -0
- package/package.json +27 -0
- package/src/auth/storage.ts +75 -0
- package/src/auth/token-manager.ts +107 -0
- package/src/client.ts +51 -0
- package/src/http/errors.ts +97 -0
- package/src/http/http-client.ts +263 -0
- package/src/http/types.ts +32 -0
- package/src/index.ts +17 -0
- package/src/modules/accounts.module.ts +61 -0
- package/src/modules/analytics.module.ts +26 -0
- package/src/modules/auth.module.ts +129 -0
- package/src/modules/content-plans.module.ts +170 -0
- package/src/modules/customers.module.ts +48 -0
- package/src/modules/notifications.module.ts +41 -0
- package/src/modules/orgs.module.ts +122 -0
- package/src/modules/projects.module.ts +97 -0
- package/src/modules/scheduling.module.ts +35 -0
- package/src/modules/storage.module.ts +121 -0
- package/src/modules/subscriptions.module.ts +82 -0
- package/src/types/account.types.ts +17 -0
- package/src/types/analytics.types.ts +15 -0
- package/src/types/api.types.ts +21 -0
- package/src/types/auth.types.ts +45 -0
- package/src/types/content-plan.types.ts +28 -0
- package/src/types/customer.types.ts +25 -0
- package/src/types/index.ts +682 -0
- package/src/types/notification.types.ts +10 -0
- package/src/types/org.types.ts +27 -0
- package/src/types/project.types.ts +21 -0
- package/src/types/scheduling.types.ts +32 -0
- package/src/types/storage.types.ts +7 -0
- package/src/types/subscription.types.ts +19 -0
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export interface Organization {
|
|
2
|
+
id: string;
|
|
3
|
+
name: string;
|
|
4
|
+
slug?: string;
|
|
5
|
+
logo_url?: string | null;
|
|
6
|
+
owner_id: string;
|
|
7
|
+
member_count?: number;
|
|
8
|
+
created_at: string;
|
|
9
|
+
updated_at: string;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export interface OrganizationMember {
|
|
13
|
+
user_id: string;
|
|
14
|
+
email: string;
|
|
15
|
+
full_name: string;
|
|
16
|
+
role: string;
|
|
17
|
+
joined_at: string;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export interface CreateOrgPayload {
|
|
21
|
+
name: string;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export interface InviteMemberPayload {
|
|
25
|
+
email: string;
|
|
26
|
+
role: "org_admin" | "member" | "viewer";
|
|
27
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export interface Project {
|
|
2
|
+
id: string;
|
|
3
|
+
organization_id: string;
|
|
4
|
+
customer_id?: string | null;
|
|
5
|
+
name: string;
|
|
6
|
+
description?: string;
|
|
7
|
+
status: "active" | "archived" | "draft";
|
|
8
|
+
created_by: string;
|
|
9
|
+
created_at: string;
|
|
10
|
+
updated_at: string;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export interface CreateProjectPayload {
|
|
14
|
+
name: string;
|
|
15
|
+
customer_id?: string;
|
|
16
|
+
description?: string;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export interface UpdateProjectPayload extends Partial<CreateProjectPayload> {
|
|
20
|
+
status?: "active" | "archived" | "draft";
|
|
21
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export interface ScheduledPost {
|
|
2
|
+
id: string;
|
|
3
|
+
post_id: string;
|
|
4
|
+
account_id: string;
|
|
5
|
+
platform: "instagram" | "facebook" | "linkedin";
|
|
6
|
+
caption: string;
|
|
7
|
+
media_urls: string[];
|
|
8
|
+
scheduled_time: string;
|
|
9
|
+
status: "scheduled" | "processing" | "published" | "failed";
|
|
10
|
+
error_message?: string;
|
|
11
|
+
approval_token?: string;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export interface PublicApprovalView {
|
|
15
|
+
token: string;
|
|
16
|
+
project_name: string;
|
|
17
|
+
posts: Array<{
|
|
18
|
+
id: string;
|
|
19
|
+
title: string;
|
|
20
|
+
caption: string;
|
|
21
|
+
media_urls: string[];
|
|
22
|
+
post_type: string;
|
|
23
|
+
status: string;
|
|
24
|
+
}>;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export interface SubmitApprovalPayload {
|
|
28
|
+
token: string;
|
|
29
|
+
post_id: string;
|
|
30
|
+
action: "approve" | "reject";
|
|
31
|
+
comment?: string;
|
|
32
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export interface SubscriptionPlan {
|
|
2
|
+
id: string;
|
|
3
|
+
name: string;
|
|
4
|
+
price_monthly: number;
|
|
5
|
+
price_yearly: number;
|
|
6
|
+
features: string[];
|
|
7
|
+
max_projects: number;
|
|
8
|
+
max_members: number;
|
|
9
|
+
max_social_accounts: number;
|
|
10
|
+
is_active: boolean;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export interface UserSubscription {
|
|
14
|
+
id: string;
|
|
15
|
+
organization_id: string;
|
|
16
|
+
plan_id: string;
|
|
17
|
+
status: "active" | "canceled" | "past_due" | "trialing";
|
|
18
|
+
current_period_end: string;
|
|
19
|
+
}
|