@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.
Files changed (156) hide show
  1. package/dist/auth/storage.d.ts +25 -0
  2. package/dist/auth/storage.d.ts.map +1 -0
  3. package/dist/auth/storage.js +72 -0
  4. package/dist/auth/storage.js.map +1 -0
  5. package/dist/auth/token-manager.d.ts +39 -0
  6. package/dist/auth/token-manager.d.ts.map +1 -0
  7. package/dist/auth/token-manager.js +98 -0
  8. package/dist/auth/token-manager.js.map +1 -0
  9. package/dist/client.d.ts +31 -0
  10. package/dist/client.d.ts.map +1 -0
  11. package/dist/client.js +39 -0
  12. package/dist/client.js.map +1 -0
  13. package/dist/http/errors.d.ts +51 -0
  14. package/dist/http/errors.d.ts.map +1 -0
  15. package/dist/http/errors.js +92 -0
  16. package/dist/http/errors.js.map +1 -0
  17. package/dist/http/http-client.d.ts +18 -0
  18. package/dist/http/http-client.d.ts.map +1 -0
  19. package/dist/http/http-client.js +221 -0
  20. package/dist/http/http-client.js.map +1 -0
  21. package/dist/http/types.d.ts +27 -0
  22. package/dist/http/types.d.ts.map +1 -0
  23. package/dist/http/types.js +3 -0
  24. package/dist/http/types.js.map +1 -0
  25. package/dist/index.d.ts +18 -0
  26. package/dist/index.d.ts.map +1 -0
  27. package/dist/index.js +36 -0
  28. package/dist/index.js.map +1 -0
  29. package/dist/modules/accounts.module.d.ts +15 -0
  30. package/dist/modules/accounts.module.d.ts.map +1 -0
  31. package/dist/modules/accounts.module.js +57 -0
  32. package/dist/modules/accounts.module.js.map +1 -0
  33. package/dist/modules/analytics.module.d.ts +14 -0
  34. package/dist/modules/analytics.module.d.ts.map +1 -0
  35. package/dist/modules/analytics.module.js +24 -0
  36. package/dist/modules/analytics.module.js.map +1 -0
  37. package/dist/modules/auth.module.d.ts +18 -0
  38. package/dist/modules/auth.module.d.ts.map +1 -0
  39. package/dist/modules/auth.module.js +113 -0
  40. package/dist/modules/auth.module.js.map +1 -0
  41. package/dist/modules/content-plans.module.d.ts +58 -0
  42. package/dist/modules/content-plans.module.d.ts.map +1 -0
  43. package/dist/modules/content-plans.module.js +125 -0
  44. package/dist/modules/content-plans.module.js.map +1 -0
  45. package/dist/modules/customers.module.d.ts +12 -0
  46. package/dist/modules/customers.module.d.ts.map +1 -0
  47. package/dist/modules/customers.module.js +43 -0
  48. package/dist/modules/customers.module.js.map +1 -0
  49. package/dist/modules/notifications.module.d.ts +20 -0
  50. package/dist/modules/notifications.module.d.ts.map +1 -0
  51. package/dist/modules/notifications.module.js +37 -0
  52. package/dist/modules/notifications.module.js.map +1 -0
  53. package/dist/modules/orgs.module.d.ts +23 -0
  54. package/dist/modules/orgs.module.d.ts.map +1 -0
  55. package/dist/modules/orgs.module.js +112 -0
  56. package/dist/modules/orgs.module.js.map +1 -0
  57. package/dist/modules/projects.module.d.ts +26 -0
  58. package/dist/modules/projects.module.d.ts.map +1 -0
  59. package/dist/modules/projects.module.js +88 -0
  60. package/dist/modules/projects.module.js.map +1 -0
  61. package/dist/modules/scheduling.module.d.ts +13 -0
  62. package/dist/modules/scheduling.module.d.ts.map +1 -0
  63. package/dist/modules/scheduling.module.js +32 -0
  64. package/dist/modules/scheduling.module.js.map +1 -0
  65. package/dist/modules/storage.module.d.ts +36 -0
  66. package/dist/modules/storage.module.d.ts.map +1 -0
  67. package/dist/modules/storage.module.js +100 -0
  68. package/dist/modules/storage.module.js.map +1 -0
  69. package/dist/modules/subscriptions.module.d.ts +25 -0
  70. package/dist/modules/subscriptions.module.d.ts.map +1 -0
  71. package/dist/modules/subscriptions.module.js +62 -0
  72. package/dist/modules/subscriptions.module.js.map +1 -0
  73. package/dist/types/account.types.d.ts +17 -0
  74. package/dist/types/account.types.d.ts.map +1 -0
  75. package/dist/types/account.types.js +3 -0
  76. package/dist/types/account.types.js.map +1 -0
  77. package/dist/types/analytics.types.d.ts +15 -0
  78. package/dist/types/analytics.types.d.ts.map +1 -0
  79. package/dist/types/analytics.types.js +3 -0
  80. package/dist/types/analytics.types.js.map +1 -0
  81. package/dist/types/api.types.d.ts +20 -0
  82. package/dist/types/api.types.d.ts.map +1 -0
  83. package/dist/types/api.types.js +3 -0
  84. package/dist/types/api.types.js.map +1 -0
  85. package/dist/types/auth.types.d.ts +40 -0
  86. package/dist/types/auth.types.d.ts.map +1 -0
  87. package/dist/types/auth.types.js +3 -0
  88. package/dist/types/auth.types.js.map +1 -0
  89. package/dist/types/content-plan.types.d.ts +27 -0
  90. package/dist/types/content-plan.types.d.ts.map +1 -0
  91. package/dist/types/content-plan.types.js +3 -0
  92. package/dist/types/content-plan.types.js.map +1 -0
  93. package/dist/types/customer.types.d.ts +25 -0
  94. package/dist/types/customer.types.d.ts.map +1 -0
  95. package/dist/types/customer.types.js +3 -0
  96. package/dist/types/customer.types.js.map +1 -0
  97. package/dist/types/index.d.ts +585 -0
  98. package/dist/types/index.d.ts.map +1 -0
  99. package/dist/types/index.js +6 -0
  100. package/dist/types/index.js.map +1 -0
  101. package/dist/types/notification.types.d.ts +11 -0
  102. package/dist/types/notification.types.d.ts.map +1 -0
  103. package/dist/types/notification.types.js +3 -0
  104. package/dist/types/notification.types.js.map +1 -0
  105. package/dist/types/org.types.d.ts +25 -0
  106. package/dist/types/org.types.d.ts.map +1 -0
  107. package/dist/types/org.types.js +3 -0
  108. package/dist/types/org.types.js.map +1 -0
  109. package/dist/types/project.types.d.ts +20 -0
  110. package/dist/types/project.types.d.ts.map +1 -0
  111. package/dist/types/project.types.js +3 -0
  112. package/dist/types/project.types.js.map +1 -0
  113. package/dist/types/scheduling.types.d.ts +31 -0
  114. package/dist/types/scheduling.types.d.ts.map +1 -0
  115. package/dist/types/scheduling.types.js +3 -0
  116. package/dist/types/scheduling.types.js.map +1 -0
  117. package/dist/types/storage.types.d.ts +8 -0
  118. package/dist/types/storage.types.d.ts.map +1 -0
  119. package/dist/types/storage.types.js +3 -0
  120. package/dist/types/storage.types.js.map +1 -0
  121. package/dist/types/subscription.types.d.ts +19 -0
  122. package/dist/types/subscription.types.d.ts.map +1 -0
  123. package/dist/types/subscription.types.js +3 -0
  124. package/dist/types/subscription.types.js.map +1 -0
  125. package/package.json +27 -0
  126. package/src/auth/storage.ts +75 -0
  127. package/src/auth/token-manager.ts +107 -0
  128. package/src/client.ts +51 -0
  129. package/src/http/errors.ts +97 -0
  130. package/src/http/http-client.ts +263 -0
  131. package/src/http/types.ts +32 -0
  132. package/src/index.ts +17 -0
  133. package/src/modules/accounts.module.ts +61 -0
  134. package/src/modules/analytics.module.ts +26 -0
  135. package/src/modules/auth.module.ts +129 -0
  136. package/src/modules/content-plans.module.ts +170 -0
  137. package/src/modules/customers.module.ts +48 -0
  138. package/src/modules/notifications.module.ts +41 -0
  139. package/src/modules/orgs.module.ts +122 -0
  140. package/src/modules/projects.module.ts +97 -0
  141. package/src/modules/scheduling.module.ts +35 -0
  142. package/src/modules/storage.module.ts +121 -0
  143. package/src/modules/subscriptions.module.ts +82 -0
  144. package/src/types/account.types.ts +17 -0
  145. package/src/types/analytics.types.ts +15 -0
  146. package/src/types/api.types.ts +21 -0
  147. package/src/types/auth.types.ts +45 -0
  148. package/src/types/content-plan.types.ts +28 -0
  149. package/src/types/customer.types.ts +25 -0
  150. package/src/types/index.ts +682 -0
  151. package/src/types/notification.types.ts +10 -0
  152. package/src/types/org.types.ts +27 -0
  153. package/src/types/project.types.ts +21 -0
  154. package/src/types/scheduling.types.ts +32 -0
  155. package/src/types/storage.types.ts +7 -0
  156. package/src/types/subscription.types.ts +19 -0
@@ -0,0 +1,58 @@
1
+ import { HttpClient } from "../http/http-client";
2
+ import type { ContentPlan, CreateContentPlanPayload, UpdateContentPlanPayload } from "../types";
3
+ export declare class ContentPlansModule {
4
+ private readonly http;
5
+ constructor(http: HttpClient);
6
+ listContentPlans(params?: {
7
+ project_id?: string;
8
+ status?: string;
9
+ instagram_account_id?: string;
10
+ }): Promise<ContentPlan[]>;
11
+ getContentPlan(planId: string): Promise<ContentPlan>;
12
+ createContentPlan(payload: CreateContentPlanPayload): Promise<ContentPlan>;
13
+ updateContentPlan(planId: string, payload: UpdateContentPlanPayload): Promise<ContentPlan>;
14
+ deleteContentPlan(planId: string): Promise<void>;
15
+ submitForReview(planId: string, approverIds: string[], note?: string): Promise<ContentPlan>;
16
+ approveDirectly(planId: string, note?: string): Promise<ContentPlan>;
17
+ review(planId: string, action: "approved" | "changes_requested", note?: string): Promise<ContentPlan>;
18
+ generateContent(planId: string, outputType: "idea" | "script" | "caption" | "hashtags" | "visual_direction", instructions?: string): Promise<{
19
+ output_type: string;
20
+ content: string;
21
+ }>;
22
+ generateStandalone(payload: {
23
+ output_type: string;
24
+ instructions: string;
25
+ title?: string;
26
+ objective?: string;
27
+ core_idea?: string;
28
+ format?: string;
29
+ }): Promise<{
30
+ output_type: string;
31
+ content: string;
32
+ }>;
33
+ generateFullPlan(payload: {
34
+ content_type: string;
35
+ prompt: string;
36
+ project_id?: string;
37
+ }): Promise<{
38
+ plan: {
39
+ title?: string;
40
+ objective?: string;
41
+ core_idea?: string;
42
+ hook?: string;
43
+ script?: string;
44
+ call_to_action?: string;
45
+ visual_direction?: string;
46
+ caption?: string;
47
+ hashtags?: string;
48
+ content_pillar?: string;
49
+ };
50
+ }>;
51
+ sharePlan(planId: string, message?: string): Promise<{
52
+ recipient_count: number;
53
+ }>;
54
+ getComments(planId: string): Promise<any[]>;
55
+ addComment(planId: string, body: string): Promise<any>;
56
+ getAudit(planId: string): Promise<any[]>;
57
+ }
58
+ //# sourceMappingURL=content-plans.module.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"content-plans.module.d.ts","sourceRoot":"","sources":["../../src/modules/content-plans.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,KAAK,EAAE,WAAW,EAAE,wBAAwB,EAAE,wBAAwB,EAAE,MAAM,UAAU,CAAC;AAEhG,qBAAa,kBAAkB;IAC7B,OAAO,CAAC,QAAQ,C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
+ exports.ContentPlansModule = void 0;
4
+ class ContentPlansModule {
5
+ constructor(http) {
6
+ this.http = http;
7
+ }
8
+ async listContentPlans(params) {
9
+ const res = await this.http.request({
10
+ path: "/api/v1/content-plans",
11
+ method: "GET",
12
+ query: params,
13
+ });
14
+ if (res && Array.isArray(res.content_plans))
15
+ return res.content_plans;
16
+ if (Array.isArray(res))
17
+ return res;
18
+ return [];
19
+ }
20
+ async getContentPlan(planId) {
21
+ const res = await this.http.request({
22
+ path: `/api/v1/content-plans/${planId}`,
23
+ method: "GET",
24
+ });
25
+ return res?.content_plan || res;
26
+ }
27
+ async createContentPlan(payload) {
28
+ const res = await this.http.request({
29
+ path: "/api/v1/content-plans",
30
+ method: "POST",
31
+ body: payload,
32
+ });
33
+ return res?.content_plan || res;
34
+ }
35
+ async updateContentPlan(planId, payload) {
36
+ const res = await this.http.request({
37
+ path: `/api/v1/content-plans/${planId}`,
38
+ method: "PATCH",
39
+ body: payload,
40
+ });
41
+ return res?.content_plan || res;
42
+ }
43
+ async deleteContentPlan(planId) {
44
+ await this.http.request({
45
+ path: `/api/v1/content-plans/${planId}`,
46
+ method: "DELETE",
47
+ });
48
+ }
49
+ async submitForReview(planId, approverIds, note) {
50
+ const res = await this.http.request({
51
+ path: `/api/v1/content-plans/${planId}/submit`,
52
+ method: "POST",
53
+ body: { approver_ids: approverIds, note },
54
+ });
55
+ return res?.content_plan || res;
56
+ }
57
+ async approveDirectly(planId, note) {
58
+ const res = await this.http.request({
59
+ path: `/api/v1/content-plans/${planId}/approve-directly`,
60
+ method: "POST",
61
+ body: { note },
62
+ });
63
+ return res?.content_plan || res;
64
+ }
65
+ async review(planId, action, note) {
66
+ const res = await this.http.request({
67
+ path: `/api/v1/content-plans/${planId}/review`,
68
+ method: "POST",
69
+ body: { action, note },
70
+ });
71
+ return res?.content_plan || res;
72
+ }
73
+ async generateContent(planId, outputType, instructions) {
74
+ return await this.http.request({
75
+ path: `/api/v1/content-plans/${planId}/generate`,
76
+ method: "POST",
77
+ body: { output_type: outputType, instructions },
78
+ });
79
+ }
80
+ async generateStandalone(payload) {
81
+ return await this.http.request({
82
+ path: "/api/v1/content-plans/generate-ai-field",
83
+ method: "POST",
84
+ body: payload,
85
+ });
86
+ }
87
+ async generateFullPlan(payload) {
88
+ return await this.http.request({
89
+ path: "/api/v1/content-plans/generate-full-plan",
90
+ method: "POST",
91
+ body: payload,
92
+ });
93
+ }
94
+ async sharePlan(planId, message) {
95
+ return await this.http.request({
96
+ path: `/api/v1/content-plans/${planId}/share`,
97
+ method: "POST",
98
+ body: { message },
99
+ });
100
+ }
101
+ async getComments(planId) {
102
+ const res = await this.http.request({
103
+ path: `/api/v1/content-plans/${planId}/comments`,
104
+ method: "GET",
105
+ });
106
+ return res?.comments || [];
107
+ }
108
+ async addComment(planId, body) {
109
+ const res = await this.http.request({
110
+ path: `/api/v1/content-plans/${planId}/comments`,
111
+ method: "POST",
112
+ body: { body },
113
+ });
114
+ return res?.comment || res;
115
+ }
116
+ async getAudit(planId) {
117
+ const res = await this.http.request({
118
+ path: `/api/v1/content-plans/${planId}/audit`,
119
+ method: "GET",
120
+ });
121
+ return res?.events || [];
122
+ }
123
+ }
124
+ exports.ContentPlansModule = ContentPlansModule;
125
+ //# sourceMappingURL=content-plans.module.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"content-plans.module.js","sourceRoot":"","sources":["../../src/modules/content-plans.module.ts"],"names":[],"mappings":";;;AAGA,MAAa,kBAAkB;IAG7B,YAAY,IAAgB;QAC1B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACnB,CAAC;IAEM,KAAK,CAAC,gBAAgB,CAAC,MAI7B;QACC,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,OAAO,CAAM;YACvC,IAAI,EAAE,uBAAuB;YAC7B,MAAM,EAAE,KAAK;YACb,KAAK,EAAE,MAAM;SACd,CAAC,CAAC;QACH,IAAI,GAAG,IAAI,KAAK,CAAC,OAAO,CAAC,GA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AAM,IAAI,EAAE,CAAC;IAC3B,CAAC;CACF;AAtKD,gDAsKC"}
@@ -0,0 +1,12 @@
1
+ import { HttpClient } from "../http/http-client";
2
+ import type { Customer, CreateCustomerPayload, UpdateCustomerPayload } from "../types";
3
+ export declare class CustomersModule {
4
+ private readonly http;
5
+ constructor(http: HttpClient);
6
+ listCustomers(orgId?: string): Promise<Customer[]>;
7
+ getCustomer(customerId: string): Promise<Customer>;
8
+ createCustomer(payload: CreateCustomerPayload): Promise<Customer>;
9
+ updateCustomer(customerId: string, payload: UpdateCustomerPayload): Promise<Customer>;
10
+ deleteCustomer(customerId: string): Promise<void>;
11
+ }
12
+ //# sourceMappingURL=customers.module.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"customers.module.d.ts","sourceRoot":"","sources":["../../src/modules/customers.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,KAAK,EAAE,QAAQ,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AAEvF,qBAAa,eAAe;IAC1B,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAa;gBAEtB,IAAI,EAAE,UAAU;IAIf,aAAa,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,QAAQ,EAAE,CAAC;IAQlD,WAAW,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,QAAQ,CAAC;IAOlD,cAAc,CAAC,OAAO,EAAE,qBAAqB,GAAG,OAAO,CAAC,QAAQ,CAAC;IAQjE,cAAc,CAAC,UAAU,EAAE,MAAM,EAAE,OAAO,EAAE,qBAAqB,GAAG,OAAO,CAAC,QAAQ,CAAC;IAQrF,cAAc,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAM/D"}
@@ -0,0 +1,43 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CustomersModule = void 0;
4
+ class CustomersModule {
5
+ constructor(http) {
6
+ this.http = http;
7
+ }
8
+ async listCustomers(orgId) {
9
+ return await this.http.request({
10
+ path: "/api/v1/customers",
11
+ method: "GET",
12
+ query: orgId ? { org_id: orgId } : undefined,
13
+ });
14
+ }
15
+ async getCustomer(customerId) {
16
+ return await this.http.request({
17
+ path: `/api/v1/customers/${customerId}`,
18
+ method: "GET",
19
+ });
20
+ }
21
+ async createCustomer(payload) {
22
+ return await this.http.request({
23
+ path: "/api/v1/customers",
24
+ method: "POST",
25
+ body: payload,
26
+ });
27
+ }
28
+ async updateCustomer(customerId, payload) {
29
+ return await this.http.request({
30
+ path: `/api/v1/customers/${customerId}`,
31
+ method: "PATCH",
32
+ body: payload,
33
+ });
34
+ }
35
+ async deleteCustomer(customerId) {
36
+ await this.http.request({
37
+ path: `/api/v1/customers/${customerId}`,
38
+ method: "DELETE",
39
+ });
40
+ }
41
+ }
42
+ exports.CustomersModule = CustomersModule;
43
+ //# sourceMappingURL=customers.module.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"customers.module.js","sourceRoot":"","sources":["../../src/modules/customers.module.ts"],"names":[],"mappings":";;;AAGA,MAAa,eAAe;IAG1B,YAAY,IAAgB;QAC1B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACnB,CAAC;IAEM,KAAK,CAAC,aAAa,CAAC,KAAc;QACvC,OAAO,MAAM,IAAI,CAAC,IAAI,CAAC,OAAO,CAAa;YACzC,IAAI,EAAE,mBAAmB;YACzB,MAAM,EAAE,KAAK;YACb,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,SAAS;SAC7C,CAAC,CAAC;IACL,CAAC;IAEM,KAAK,CAAC,WAAW,CAAC,UAAkB;QACzC,OAAO,MAAM,IAAI,CAAC,IAAI,CAAC,OAAO,CAAW;YACvC,IAAI,EAAE,qBAAqB,UAAU,EAAE;YACvC,MAAM,EAAE,KAAK;SACd,CAAC,CAAC;IACL,CAAC;IAEM,KAAK,CAAC,cAAc,CAAC,OAA8B;QACxD,OAAO,MAAM,IAAI,CAAC,IAAI,CAAC,OAAO,CAAW;YACvC,IAAI,EAAE,mBAAmB;YACzB,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,OAAO;SACd,CAAC,CAAC;IACL,CAAC;IAEM,KAAK,CAAC,cAAc,CAAC,UAAkB,EAAE,OAA8B;QAC5E,OAAO,MAAM,IAAI,CAAC,IAAI,CAAC,OAAO,CAAW;YACvC,IAAI,EAAE,qBAAqB,UAAU,EAAE;YACvC,MAAM,EAAE,OAAO;YACf,IAAI,EAAE,OAAO;SACd,CAAC,CAAC;IACL,CAAC;IAEM,KAAK,CAAC,cAAc,CAAC,UAAkB;QAC5C,MAAM,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC;YACtB,IAAI,EAAE,qBAAqB,UAAU,EAAE;YACvC,MAAM,EAAE,QAAQ;SACjB,CAAC,CAAC;IACL,CAAC;CACF;AA5CD,0CA4CC"}
@@ -0,0 +1,20 @@
1
+ import { HttpClient } from "../http/http-client";
2
+ import type { NotificationListResponse } from "../types";
3
+ export declare class NotificationsModule {
4
+ private readonly http;
5
+ constructor(http: HttpClient);
6
+ getNotifications(params?: {
7
+ unread_only?: boolean;
8
+ limit?: number;
9
+ offset?: number;
10
+ }): Promise<NotificationListResponse>;
11
+ markAsRead(notificationIds?: string[]): Promise<{
12
+ success: boolean;
13
+ marked_count: number;
14
+ }>;
15
+ deleteNotification(notificationId: string): Promise<{
16
+ deleted: boolean;
17
+ }>;
18
+ registerPushToken(token: string, platform: "web" | "ios" | "android"): Promise<void>;
19
+ }
20
+ //# sourceMappingURL=notifications.module.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"notifications.module.d.ts","sourceRoot":"","sources":["../../src/modules/notifications.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,KAAK,EAAoB,wBAAwB,EAAE,MAAM,UAAU,CAAC;AAE3E,qBAAa,mBAAmB;IAC9B,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAa;gBAEtB,IAAI,EAAE,UAAU;IAIf,gBAAgB,CAAC,MAAM,CAAC,EAAE;QAAE,WAAW,CAAC,EAAE,OAAO,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,wBAAwB,CAAC;IAQxH,UAAU,CAAC,eAAe,CAAC,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC;QAAE,OAAO,EAAE,OAAO,CAAC;QAAC,YAAY,EAAE,MAAM,CAAA;KAAE,CAAC;IAQ3F,kBAAkB,CAAC,cAAc,EAAE,MAAM,GAAG,OAAO,CAAC;QAAE,OAAO,EAAE,OAAO,CAAA;KAAE,CAAC;IAOzE,iBAAiB,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,GAAG,KAAK,GAAG,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC;CAOlG"}
@@ -0,0 +1,37 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.NotificationsModule = void 0;
4
+ class NotificationsModule {
5
+ constructor(http) {
6
+ this.http = http;
7
+ }
8
+ async getNotifications(params) {
9
+ return await this.http.request({
10
+ path: "/api/v1/notifications",
11
+ method: "GET",
12
+ query: params,
13
+ });
14
+ }
15
+ async markAsRead(notificationIds) {
16
+ return await this.http.request({
17
+ path: "/api/v1/notifications/read",
18
+ method: "PATCH",
19
+ query: notificationIds ? { notification_ids: notificationIds } : undefined,
20
+ });
21
+ }
22
+ async deleteNotification(notificationId) {
23
+ return await this.http.request({
24
+ path: `/api/v1/notifications/${notificationId}`,
25
+ method: "DELETE",
26
+ });
27
+ }
28
+ async registerPushToken(token, platform) {
29
+ await this.http.request({
30
+ path: "/api/v1/notifications/push-token",
31
+ method: "POST",
32
+ body: { push_token: token, platform },
33
+ });
34
+ }
35
+ }
36
+ exports.NotificationsModule = NotificationsModule;
37
+ //# sourceMappingURL=notifications.module.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"notifications.module.js","sourceRoot":"","sources":["../../src/modules/notifications.module.ts"],"names":[],"mappings":";;;AAGA,MAAa,mBAAmB;IAG9B,YAAY,IAAgB;QAC1B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACnB,CAAC;IAEM,KAAK,CAAC,gBAAgB,CAAC,MAAmE;QAC/F,OAAO,MAAM,IAAI,CAAC,IAAI,CAAC,OAAO,CAA2B;YACvD,IAAI,EAAE,uBAAuB;YAC7B,MAAM,EAAE,KAAK;YACb,KAAK,EAAE,MAAM;SACd,CAAC,CAAC;IACL,CAAC;IAEM,KAAK,CAAC,UAAU,CAAC,eAA0B;QAChD,OAAO,MAAM,IAAI,CAAC,IAAI,CAAC,OAAO,CAA6C;YACzE,IAAI,EAAE,4BAA4B;YAClC,MAAM,EAAE,OAAO;YACf,KAAK,EAAE,eAAe,CAAC,CAAC,CAAC,EAAE,gBAAgB,EAAE,eAAe,EAAE,CAAC,CAAC,CAAC,SAAS;SAC3E,CAAC,CAAC;IACL,CAAC;IAEM,KAAK,CAAC,kBAAkB,CAAC,cAAsB;QACpD,OAAO,MAAM,IAAI,CAAC,IAAI,CAAC,OAAO,CAAuB;YACnD,IAAI,EAAE,yBAAyB,cAAc,EAAE;YAC/C,MAAM,EAAE,QAAQ;SACjB,CAAC,CAAC;IACL,CAAC;IAEM,KAAK,CAAC,iBAAiB,CAAC,KAAa,EAAE,QAAmC;QAC/E,MAAM,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC;YACtB,IAAI,EAAE,kCAAkC;YACxC,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,EAAE,UAAU,EAAE,KAAK,EAAE,QAAQ,EAAE;SACtC,CAAC,CAAC;IACL,CAAC;CACF;AArCD,kDAqCC"}
@@ -0,0 +1,23 @@
1
+ import { HttpClient } from "../http/http-client";
2
+ import type { Organization, OrganizationMember, CreateOrgPayload, InviteMemberPayload, OrgJoinRequest } from "../types";
3
+ export declare class OrgsModule {
4
+ private readonly http;
5
+ constructor(http: HttpClient);
6
+ getMyOrganizations(): Promise<Organization[]>;
7
+ getOrganization(orgId: string): Promise<Organization>;
8
+ createOrganization(payload: CreateOrgPayload): Promise<Organization>;
9
+ joinOrganization(code: string): Promise<OrgJoinRequest>;
10
+ getMyJoinRequest(): Promise<OrgJoinRequest | null>;
11
+ cancelJoinRequest(): Promise<void>;
12
+ listJoinRequests(): Promise<OrgJoinRequest[]>;
13
+ approveJoinRequest(requestId: string, designation?: string): Promise<void>;
14
+ rejectJoinRequest(requestId: string, reason?: string): Promise<void>;
15
+ getMembers(): Promise<OrganizationMember[]>;
16
+ inviteMember(orgId: string, payload: InviteMemberPayload): Promise<void>;
17
+ removeMember(orgId: string, userId: string): Promise<void>;
18
+ kickMember(memberId: string): Promise<void>;
19
+ rotateCode(): Promise<{
20
+ code: string;
21
+ }>;
22
+ }
23
+ //# sourceMappingURL=orgs.module.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"orgs.module.d.ts","sourceRoot":"","sources":["../../src/modules/orgs.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,KAAK,EAAE,YAAY,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAExH,qBAAa,UAAU;IACrB,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAa;gBAEtB,IAAI,EAAE,UAAU;IAIf,kBAAkB,IAAI,OAAO,CAAC,YAAY,EAAE,CAAC;IAO7C,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC;IAOrD,kBAAkB,CAAC,OAAO,EAAE,gBAAgB,GAAG,OAAO,CAAC,YAAY,CAAC;IASpE,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,CAAC;IASvD,gBAAgB,IAAI,OAAO,CAAC,cAAc,GAAG,IAAI,CAAC;IAQlD,iBAAiB,IAAI,OAAO,CAAC,IAAI,CAAC;IAOlC,gBAAgB,IAAI,OAAO,CAAC,cAAc,EAAE,CAAC;IAU7C,kBAAkB,CAAC,SAAS,EAAE,MAAM,EAAE,WAAW,GAAE,MAAsB,GAAG,OAAO,CAAC,IAAI,CAAC;IAQzF,iBAAiB,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,GAAE,MAAmB,GAAG,OAAO,CAAC,IAAI,CAAC;IAQhF,UAAU,IAAI,OAAO,CAAC,kBAAkB,EAAE,CAAC;IAU3C,YAAY,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,mBAAmB,GAAG,OAAO,CAAC,IAAI,CAAC;IAQxE,YAAY,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAO1D,UAAU,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAO3C,UAAU,IAAI,OAAO,CAAC;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC;CAMrD"}
@@ -0,0 +1,112 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.OrgsModule = void 0;
4
+ class OrgsModule {
5
+ constructor(http) {
6
+ this.http = http;
7
+ }
8
+ async getMyOrganizations() {
9
+ return await this.http.request({
10
+ path: "/api/v1/orgs",
11
+ method: "GET",
12
+ });
13
+ }
14
+ async getOrganization(orgId) {
15
+ return await this.http.request({
16
+ path: `/api/v1/orgs/${orgId}`,
17
+ method: "GET",
18
+ });
19
+ }
20
+ async createOrganization(payload) {
21
+ const res = await this.http.request({
22
+ path: "/api/v1/org/create",
23
+ method: "POST",
24
+ body: payload,
25
+ });
26
+ return res?.organization || res;
27
+ }
28
+ async joinOrganization(code) {
29
+ const res = await this.http.request({
30
+ path: "/api/v1/org/join",
31
+ method: "POST",
32
+ body: { code },
33
+ });
34
+ return res?.request || res;
35
+ }
36
+ async getMyJoinRequest() {
37
+ const res = await this.http.request({
38
+ path: "/api/v1/org/my-join-request",
39
+ method: "GET",
40
+ });
41
+ return res?.request || res || null;
42
+ }
43
+ async cancelJoinRequest() {
44
+ await this.http.request({
45
+ path: "/api/v1/org/my-join-request",
46
+ method: "DELETE",
47
+ });
48
+ }
49
+ async listJoinRequests() {
50
+ const res = await this.http.request({
51
+ path: "/api/v1/org/join-requests",
52
+ method: "GET",
53
+ });
54
+ if (Array.isArray(res))
55
+ return res;
56
+ if (Array.isArray(res?.requests))
57
+ return res.requests;
58
+ return [];
59
+ }
60
+ async approveJoinRequest(requestId, designation = "Team Member") {
61
+ await this.http.request({
62
+ path: `/api/v1/org/join-requests/${requestId}/approve`,
63
+ method: "POST",
64
+ body: { designation },
65
+ });
66
+ }
67
+ async rejectJoinRequest(requestId, reason = "Declined") {
68
+ await this.http.request({
69
+ path: `/api/v1/org/join-requests/${requestId}/reject`,
70
+ method: "POST",
71
+ body: { reason },
72
+ });
73
+ }
74
+ async getMembers() {
75
+ const res = await this.http.request({
76
+ path: "/api/v1/org/members",
77
+ method: "GET",
78
+ });
79
+ if (Array.isArray(res))
80
+ return res;
81
+ if (Array.isArray(res?.members))
82
+ return res.members;
83
+ return [];
84
+ }
85
+ async inviteMember(orgId, payload) {
86
+ await this.http.request({
87
+ path: `/api/v1/orgs/${orgId}/invite`,
88
+ method: "POST",
89
+ body: payload,
90
+ });
91
+ }
92
+ async removeMember(orgId, userId) {
93
+ await this.http.request({
94
+ path: `/api/v1/orgs/${orgId}/members/${userId}`,
95
+ method: "DELETE",
96
+ });
97
+ }
98
+ async kickMember(memberId) {
99
+ await this.http.request({
100
+ path: `/api/v1/org/members/${memberId}/kick`,
101
+ method: "POST",
102
+ });
103
+ }
104
+ async rotateCode() {
105
+ return await this.http.request({
106
+ path: "/api/v1/org/rotate-code",
107
+ method: "POST",
108
+ });
109
+ }
110
+ }
111
+ exports.OrgsModule = OrgsModule;
112
+ //# sourceMappingURL=orgs.module.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"orgs.module.js","sourceRoot":"","sources":["../../src/modules/orgs.module.ts"],"names":[],"mappings":";;;AAGA,MAAa,UAAU;IAGrB,YAAY,IAAgB;QAC1B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACnB,CAAC;IAEM,KAAK,CAAC,kBAAkB;QAC7B,OAAO,MAAM,IAAI,CAAC,IAAI,CAAC,OAAO,CAAiB;YAC7C,IAAI,EAAE,cAAc;YACpB,MAAM,EAAE,KAAK;SACd,CAAC,CAAC;IACL,CAAC;IAEM,KAAK,CAAC,eAAe,CAAC,KAAa;QACxC,OAAO,MAAM,IAAI,CAAC,IAAI,CAAC,OAAO,CAAe;YAC3C,IAAI,EAAE,gBAAgB,KAAK,EAAE;YAC7B,MAAM,EAAE,KAAK;SACd,CAAC,CAAC;IACL,CAAC;IAEM,KAAK,CAAC,kBAAkB,CAAC,OAAyB;QACvD,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,OAAO,CAAM;YACvC,IAAI,EAAE,oBAAoB;YAC1B,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,OAAO;SACd,CAAC,CAAC;QACH,OAAO,GAAG,EAAE,YAAY,IAAI,GAAG,CAAC;IAClC,CAAC;IAEM,KAAK,CAAC,gBAAgB,CAAC,IAAY;QACxC,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,OAAO,CAAM;YACvC,IAAI,EAAE,kBAAkB;YACxB,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,EAAE,IAAI,EAAE;SACf,CAAC,CAAC;QACH,OAAO,GAAG,EAAE,OAAO,IAAI,GAAG,CAAC;IAC7B,CAAC;IAEM,KAAK,CAAC,gBAAgB;QAC3B,MAAM,GAAG,GAAG,MAAM,IAAI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,CAAC,OAAO,CAAM;YACvC,IAAI,EAAE,qBAAqB;YAC3B,MAAM,EAAE,KAAK;SACd,CAAC,CAAC;QACH,IAAI,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC;YAAE,OAAO,GAAG,CAAC;QACnC,IAAI,KAAK,CAAC,OAAO,CAAC,GAAG,EAAE,OAAO,CAAC;YAAE,OAAO,GAAG,CAAC,OAAO,CAAC;QACpD,OAAO,EAAE,CAAC;IACZ,CAAC;IAEM,KAAK,CAAC,YAAY,CAAC,KAAa,EAAE,OAA4B;QACnE,MAAM,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC;YACtB,IAAI,EAAE,gBAAgB,KAAK,SAAS;YACpC,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,OAAO;SACd,CAAC,CAAC;IACL,CAAC;IAEM,KAAK,CAAC,YAAY,CAAC,KAAa,EAAE,MAAc;QACrD,MAAM,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC;YACtB,IAAI,EAAE,gBAAgB,KAAK,YAAY,MAAM,EAAE;YAC/C,MAAM,EAAE,QAAQ;SACjB,CAAC,CAAC;IACL,CAAC;IAEM,KAAK,CAAC,UAAU,CAAC,QAAgB;QACtC,MAAM,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC;YACtB,IAAI,EAAE,uBAAuB,QAAQ,OAAO;YAC5C,MAAM,EAAE,MAAM;SACf,CAAC,CAAC;IACL,CAAC;IAEM,KAAK,CAAC,UAAU;QACrB,OAAO,MAAM,IAAI,CAAC,IAAI,CAAC,OAAO,CAAmB;YAC/C,IAAI,EAAE,yBAAyB;YAC/B,MAAM,EAAE,MAAM;SACf,CAAC,CAAC;IACL,CAAC;CACF;AAtHD,gCAsHC"}
@@ -0,0 +1,26 @@
1
+ import { HttpClient } from "../http/http-client";
2
+ import type { Project, CreateProjectPayload, UpdateProjectPayload, ProjectMember, ProjectAccount } from "../types";
3
+ export declare class ProjectsModule {
4
+ private readonly http;
5
+ constructor(http: HttpClient);
6
+ listProjects(params?: {
7
+ org_id?: string;
8
+ customer_id?: string;
9
+ status?: string;
10
+ }): Promise<Project[]>;
11
+ getProject(projectId: string): Promise<{
12
+ project: Project;
13
+ members: ProjectMember[];
14
+ accounts: ProjectAccount[];
15
+ }>;
16
+ createProject(payload: CreateProjectPayload): Promise<Project>;
17
+ updateProject(projectId: string, payload: UpdateProjectPayload): Promise<Project>;
18
+ archiveProject(projectId: string): Promise<void>;
19
+ restoreProject(projectId: string): Promise<void>;
20
+ deleteProject(projectId: string): Promise<void>;
21
+ assignMember(projectId: string, userId: string, role: string): Promise<void>;
22
+ removeMember(projectId: string, userId: string): Promise<void>;
23
+ assignAccount(projectId: string, accountId: string): Promise<void>;
24
+ removeAccount(projectId: string, accountId: string): Promise<void>;
25
+ }
26
+ //# sourceMappingURL=projects.module.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"projects.module.d.ts","sourceRoot":"","sources":["../../src/modules/projects.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,KAAK,EAAE,OAAO,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAEnH,qBAAa,cAAc;IACzB,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAa;gBAEtB,IAAI,EAAE,UAAU;IAIf,YAAY,CAAC,MAAM,CAAC,EAAE;QAAE,MAAM,CAAC,EAAE,MAAM,CAAC;QAAC,WAAW,CAAC,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC;IAWrG,UAAU,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC;QAAE,OAAO,EAAE,OAAO,CAAC;QAAC,OAAO,EAAE,aAAa,EAAE,CAAC;QAAC,QAAQ,EAAE,cAAc,EAAE,CAAA;KAAE,CAAC;IAOlH,aAAa,CAAC,OAAO,EAAE,oBAAoB,GAAG,OAAO,CAAC,OAAO,CAAC;IAS9D,aAAa,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,oBAAoB,GAAG,OAAO,CAAC,OAAO,CAAC;IASjF,cAAc,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAOhD,cAAc,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAOhD,aAAa,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAO/C,YAAY,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAQ5E,YAAY,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAO9D,aAAa,CAAC,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAQlE,aAAa,CAAC,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAMhF"}
@@ -0,0 +1,88 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ProjectsModule = void 0;
4
+ class ProjectsModule {
5
+ constructor(http) {
6
+ this.http = http;
7
+ }
8
+ async listProjects(params) {
9
+ const res = await this.http.request({
10
+ path: "/api/v1/projects",
11
+ method: "GET",
12
+ query: params,
13
+ });
14
+ if (Array.isArray(res))
15
+ return res;
16
+ if (res?.projects && Array.isArray(res.projects))
17
+ return res.projects;
18
+ return [];
19
+ }
20
+ async getProject(projectId) {
21
+ return await this.http.request({
22
+ path: `/api/v1/projects/${projectId}`,
23
+ method: "GET",
24
+ });
25
+ }
26
+ async createProject(payload) {
27
+ const res = await this.http.request({
28
+ path: "/api/v1/projects",
29
+ method: "POST",
30
+ body: payload,
31
+ });
32
+ return res?.project || res;
33
+ }
34
+ async updateProject(projectId, payload) {
35
+ const res = await this.http.request({
36
+ path: `/api/v1/projects/${projectId}`,
37
+ method: "PATCH",
38
+ body: payload,
39
+ });
40
+ return res?.project || res;
41
+ }
42
+ async archiveProject(projectId) {
43
+ await this.http.request({
44
+ path: `/api/v1/projects/${projectId}/archive`,
45
+ method: "POST",
46
+ });
47
+ }
48
+ async restoreProject(projectId) {
49
+ await this.http.request({
50
+ path: `/api/v1/projects/${projectId}/restore`,
51
+ method: "POST",
52
+ });
53
+ }
54
+ async deleteProject(projectId) {
55
+ await this.http.request({
56
+ path: `/api/v1/projects/${projectId}`,
57
+ method: "DELETE",
58
+ });
59
+ }
60
+ async assignMember(projectId, userId, role) {
61
+ await this.http.request({
62
+ path: `/api/v1/projects/${projectId}/members`,
63
+ method: "POST",
64
+ body: { user_id: userId, role },
65
+ });
66
+ }
67
+ async removeMember(projectId, userId) {
68
+ await this.http.request({
69
+ path: `/api/v1/projects/${projectId}/members/${userId}`,
70
+ method: "DELETE",
71
+ });
72
+ }
73
+ async assignAccount(projectId, accountId) {
74
+ await this.http.request({
75
+ path: `/api/v1/projects/${projectId}/accounts`,
76
+ method: "POST",
77
+ body: { account_id: accountId },
78
+ });
79
+ }
80
+ async removeAccount(projectId, accountId) {
81
+ await this.http.request({
82
+ path: `/api/v1/projects/${projectId}/accounts/${accountId}`,
83
+ method: "DELETE",
84
+ });
85
+ }
86
+ }
87
+ exports.ProjectsModule = ProjectsModule;
88
+ //# sourceMappingURL=projects.module.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"projects.module.js","sourceRoot":"","sources":["../../src/modules/projects.module.ts"],"names":[],"mappings":";;;AAGA,MAAa,cAAc;IAGzB,YAAY,IAAgB;QAC1B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACnB,CAAC;IAEM,KAAK,CAAC,YAAY,CAAC,MAAmE;QAC3F,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,IAA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,QAAQ;SACjB,CAAC,CAAC;IACL,CAAC;CACF;AA7FD,wCA6FC"}
@@ -0,0 +1,13 @@
1
+ import { HttpClient } from "../http/http-client";
2
+ import type { ScheduledPost, PublicApprovalView, SubmitApprovalPayload } from "../types";
3
+ export declare class SchedulingModule {
4
+ private readonly http;
5
+ constructor(http: HttpClient);
6
+ getScheduledPosts(params?: {
7
+ project_id?: string;
8
+ month?: string;
9
+ }): Promise<ScheduledPost[]>;
10
+ getPublicApprovalView(token: string): Promise<PublicApprovalView>;
11
+ submitPublicApproval(payload: SubmitApprovalPayload): Promise<void>;
12
+ }
13
+ //# sourceMappingURL=scheduling.module.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"scheduling.module.d.ts","sourceRoot":"","sources":["../../src/modules/scheduling.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,KAAK,EAAE,aAAa,EAAE,kBAAkB,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AAEzF,qBAAa,gBAAgB;IAC3B,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAa;gBAEtB,IAAI,EAAE,UAAU;IAIf,iBAAiB,CAAC,MAAM,CAAC,EAAE;QAAE,UAAU,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,aAAa,EAAE,CAAC;IAQ7F,qBAAqB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,kBAAkB,CAAC;IAQjE,oBAAoB,CAAC,OAAO,EAAE,qBAAqB,GAAG,OAAO,CAAC,IAAI,CAAC;CAQjF"}