@ecodrix/erix-api 1.1.5 → 1.1.6

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.
@@ -132,19 +132,21 @@ declare class Analytics extends APIResource {
132
132
  * Retrieve high-level CRM performance KPIs.
133
133
  * Includes total leads, pipeline value, won revenue, and conversion rates.
134
134
  *
135
- * @param params - Optional filters (time range, pipelineId).
136
- * @returns KPI summary object.
135
+ * @param params - Optional filters including time range (24h, 7d, 30d, etc.) and custom date bounds.
136
+ * @returns {Promise<any>} KPI summary object containing core business metrics.
137
137
  * @example
138
138
  * ```typescript
139
139
  * const stats = await erixClient.crm.analytics.overview({ range: "30d" });
140
+ * console.log(stats.avgScore);
140
141
  * ```
141
142
  */
142
143
  overview<T = any>(params?: AnalyticsParams): Promise<T>;
143
144
  /**
144
145
  * Get stage-by-stage lead counts and conversion percentages for a pipeline.
145
- * Useful for identifying funnel bottlenecks.
146
+ * Useful for identifying funnel bottlenecks and drop-off points.
146
147
  *
147
148
  * @param pipelineId - The unique ID of the pipeline to analyze.
149
+ * @returns {Promise<any>} Array of funnel stages with count and conversion data.
148
150
  * @example
149
151
  * ```typescript
150
152
  * const funnel = await erixClient.crm.analytics.funnel("pipe_123");
@@ -152,44 +154,74 @@ declare class Analytics extends APIResource {
152
154
  */
153
155
  funnel<T = any>(pipelineId: string): Promise<T>;
154
156
  /**
155
- * Revenue forecast: deal value × stage probability.
157
+ * Revenue forecast: Calculates expected revenue based on deal value × stage probability.
158
+ * Helps in sales planning and goal setting.
159
+ *
160
+ * @param pipelineId - Optional pipeline ID to filter the forecast.
161
+ * @returns {Promise<any>} Forecast data including weighted expected revenue.
162
+ * @example
163
+ * ```typescript
164
+ * const prognosis = await erixClient.crm.analytics.forecast("pipe_123");
165
+ * ```
156
166
  */
157
167
  forecast<T = any>(pipelineId?: string): Promise<T>;
158
168
  /**
159
- * Lead source breakdown: count, conversion rate, total value per source.
169
+ * Lead source breakdown: count, conversion rate, and total value per source.
170
+ *
171
+ * @param params - Time range filters.
172
+ * @returns {Promise<any>} Breakdown of how different marketing channels are performing.
160
173
  */
161
174
  sources<T = any>(params?: AnalyticsParams): Promise<T>;
162
175
  /**
163
- * Team leaderboard: won deals, revenue, activity count, conversion rate per member.
176
+ * Team leaderboard: Evaluates agent performance across won deals, revenue, and activity.
177
+ *
178
+ * @param params - Time range filters.
179
+ * @returns {Promise<any>} Ranked list of team members by performance.
164
180
  */
165
181
  team<T = any>(params?: AnalyticsParams): Promise<T>;
166
182
  /**
167
- * Daily activity counts by type. For activity calendar.
183
+ * Activity heatmap: Daily activity counts by type.
184
+ * Ideal for visualizing engagement patterns on a calendar view.
185
+ *
186
+ * @param params - Time range filters.
187
+ * @returns {Promise<any>} Time-series data of team activities.
168
188
  */
169
189
  heatmap<T = any>(params?: AnalyticsParams): Promise<T>;
170
190
  /**
171
- * Score distribution: how many leads in each score bucket.
191
+ * Score distribution: Groups leads into buckets based on their calculated score (0-100).
192
+ *
193
+ * @returns {Promise<any>} Volume of leads in different readiness tiers.
172
194
  */
173
195
  scores<T = any>(): Promise<T>;
174
196
  /**
175
- * Avg time leads spend in each stage. Helps find bottlenecks.
197
+ * Avg time in stage: Measures the velocity of leads through the sales pipeline.
198
+ *
199
+ * @param pipelineId - Target pipeline ID.
200
+ * @returns {Promise<any>} Velocity metrics per stage.
176
201
  */
177
202
  stageTime<T = any>(pipelineId: string): Promise<T>;
178
203
  /**
179
- * Tiered Growth Report matching business sophistication.
204
+ * Tiered Growth Report matching business sophistication (Pulse, Growth, Weapon).
205
+ * Provides deep tactical and strategic insights.
206
+ *
207
+ * @param params - Filtering and range parameters.
180
208
  */
181
209
  tiered<T = any>(params?: AnalyticsParams): Promise<T>;
182
210
  /**
183
- * Consolidated analytics including CRM overview and WhatsApp.
211
+ * Consolidated analytics including CRM overview and WhatsApp messaging metrics.
212
+ *
213
+ * @param params - Time range filters.
184
214
  */
185
215
  summary<T = any>(params?: AnalyticsParams): Promise<T>;
186
216
  /**
187
217
  * Retrieve WhatsApp messaging volume and delivery performance analytics.
218
+ * Includes total sent, delivered, read, and daily volume trends.
188
219
  *
189
220
  * @param params - Optional filters (time range).
190
221
  * @example
191
222
  * ```typescript
192
223
  * const waStats = await erixClient.crm.analytics.whatsapp({ range: "7d" });
224
+ * console.log(waStats.totalSent);
193
225
  * ```
194
226
  */
195
227
  whatsapp<T = any>(params?: AnalyticsParams): Promise<T>;
@@ -132,19 +132,21 @@ declare class Analytics extends APIResource {
132
132
  * Retrieve high-level CRM performance KPIs.
133
133
  * Includes total leads, pipeline value, won revenue, and conversion rates.
134
134
  *
135
- * @param params - Optional filters (time range, pipelineId).
136
- * @returns KPI summary object.
135
+ * @param params - Optional filters including time range (24h, 7d, 30d, etc.) and custom date bounds.
136
+ * @returns {Promise<any>} KPI summary object containing core business metrics.
137
137
  * @example
138
138
  * ```typescript
139
139
  * const stats = await erixClient.crm.analytics.overview({ range: "30d" });
140
+ * console.log(stats.avgScore);
140
141
  * ```
141
142
  */
142
143
  overview<T = any>(params?: AnalyticsParams): Promise<T>;
143
144
  /**
144
145
  * Get stage-by-stage lead counts and conversion percentages for a pipeline.
145
- * Useful for identifying funnel bottlenecks.
146
+ * Useful for identifying funnel bottlenecks and drop-off points.
146
147
  *
147
148
  * @param pipelineId - The unique ID of the pipeline to analyze.
149
+ * @returns {Promise<any>} Array of funnel stages with count and conversion data.
148
150
  * @example
149
151
  * ```typescript
150
152
  * const funnel = await erixClient.crm.analytics.funnel("pipe_123");
@@ -152,44 +154,74 @@ declare class Analytics extends APIResource {
152
154
  */
153
155
  funnel<T = any>(pipelineId: string): Promise<T>;
154
156
  /**
155
- * Revenue forecast: deal value × stage probability.
157
+ * Revenue forecast: Calculates expected revenue based on deal value × stage probability.
158
+ * Helps in sales planning and goal setting.
159
+ *
160
+ * @param pipelineId - Optional pipeline ID to filter the forecast.
161
+ * @returns {Promise<any>} Forecast data including weighted expected revenue.
162
+ * @example
163
+ * ```typescript
164
+ * const prognosis = await erixClient.crm.analytics.forecast("pipe_123");
165
+ * ```
156
166
  */
157
167
  forecast<T = any>(pipelineId?: string): Promise<T>;
158
168
  /**
159
- * Lead source breakdown: count, conversion rate, total value per source.
169
+ * Lead source breakdown: count, conversion rate, and total value per source.
170
+ *
171
+ * @param params - Time range filters.
172
+ * @returns {Promise<any>} Breakdown of how different marketing channels are performing.
160
173
  */
161
174
  sources<T = any>(params?: AnalyticsParams): Promise<T>;
162
175
  /**
163
- * Team leaderboard: won deals, revenue, activity count, conversion rate per member.
176
+ * Team leaderboard: Evaluates agent performance across won deals, revenue, and activity.
177
+ *
178
+ * @param params - Time range filters.
179
+ * @returns {Promise<any>} Ranked list of team members by performance.
164
180
  */
165
181
  team<T = any>(params?: AnalyticsParams): Promise<T>;
166
182
  /**
167
- * Daily activity counts by type. For activity calendar.
183
+ * Activity heatmap: Daily activity counts by type.
184
+ * Ideal for visualizing engagement patterns on a calendar view.
185
+ *
186
+ * @param params - Time range filters.
187
+ * @returns {Promise<any>} Time-series data of team activities.
168
188
  */
169
189
  heatmap<T = any>(params?: AnalyticsParams): Promise<T>;
170
190
  /**
171
- * Score distribution: how many leads in each score bucket.
191
+ * Score distribution: Groups leads into buckets based on their calculated score (0-100).
192
+ *
193
+ * @returns {Promise<any>} Volume of leads in different readiness tiers.
172
194
  */
173
195
  scores<T = any>(): Promise<T>;
174
196
  /**
175
- * Avg time leads spend in each stage. Helps find bottlenecks.
197
+ * Avg time in stage: Measures the velocity of leads through the sales pipeline.
198
+ *
199
+ * @param pipelineId - Target pipeline ID.
200
+ * @returns {Promise<any>} Velocity metrics per stage.
176
201
  */
177
202
  stageTime<T = any>(pipelineId: string): Promise<T>;
178
203
  /**
179
- * Tiered Growth Report matching business sophistication.
204
+ * Tiered Growth Report matching business sophistication (Pulse, Growth, Weapon).
205
+ * Provides deep tactical and strategic insights.
206
+ *
207
+ * @param params - Filtering and range parameters.
180
208
  */
181
209
  tiered<T = any>(params?: AnalyticsParams): Promise<T>;
182
210
  /**
183
- * Consolidated analytics including CRM overview and WhatsApp.
211
+ * Consolidated analytics including CRM overview and WhatsApp messaging metrics.
212
+ *
213
+ * @param params - Time range filters.
184
214
  */
185
215
  summary<T = any>(params?: AnalyticsParams): Promise<T>;
186
216
  /**
187
217
  * Retrieve WhatsApp messaging volume and delivery performance analytics.
218
+ * Includes total sent, delivered, read, and daily volume trends.
188
219
  *
189
220
  * @param params - Optional filters (time range).
190
221
  * @example
191
222
  * ```typescript
192
223
  * const waStats = await erixClient.crm.analytics.whatsapp({ range: "7d" });
224
+ * console.log(waStats.totalSent);
193
225
  * ```
194
226
  */
195
227
  whatsapp<T = any>(params?: AnalyticsParams): Promise<T>;