zorihq 0.7.0 → 0.9.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 (102) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/package.json +1 -1
  3. package/resources/v1/analytics/analytics.d.mts +22 -3
  4. package/resources/v1/analytics/analytics.d.mts.map +1 -1
  5. package/resources/v1/analytics/analytics.d.ts +22 -3
  6. package/resources/v1/analytics/analytics.d.ts.map +1 -1
  7. package/resources/v1/analytics/analytics.js.map +1 -1
  8. package/resources/v1/analytics/analytics.mjs.map +1 -1
  9. package/resources/v1/analytics/events.d.mts +49 -2
  10. package/resources/v1/analytics/events.d.mts.map +1 -1
  11. package/resources/v1/analytics/events.d.ts +49 -2
  12. package/resources/v1/analytics/events.d.ts.map +1 -1
  13. package/resources/v1/analytics/events.js +16 -1
  14. package/resources/v1/analytics/events.js.map +1 -1
  15. package/resources/v1/analytics/events.mjs +16 -1
  16. package/resources/v1/analytics/events.mjs.map +1 -1
  17. package/resources/v1/analytics/index.d.mts +2 -2
  18. package/resources/v1/analytics/index.d.mts.map +1 -1
  19. package/resources/v1/analytics/index.d.ts +2 -2
  20. package/resources/v1/analytics/index.d.ts.map +1 -1
  21. package/resources/v1/analytics/index.js.map +1 -1
  22. package/resources/v1/analytics/index.mjs.map +1 -1
  23. package/resources/v1/index.d.mts +2 -1
  24. package/resources/v1/index.d.mts.map +1 -1
  25. package/resources/v1/index.d.ts +2 -1
  26. package/resources/v1/index.d.ts.map +1 -1
  27. package/resources/v1/index.js +3 -1
  28. package/resources/v1/index.js.map +1 -1
  29. package/resources/v1/index.mjs +1 -0
  30. package/resources/v1/index.mjs.map +1 -1
  31. package/resources/v1/revenue/attribution.d.mts +62 -0
  32. package/resources/v1/revenue/attribution.d.mts.map +1 -0
  33. package/resources/v1/revenue/attribution.d.ts +62 -0
  34. package/resources/v1/revenue/attribution.d.ts.map +1 -0
  35. package/resources/v1/revenue/attribution.js +41 -0
  36. package/resources/v1/revenue/attribution.js.map +1 -0
  37. package/resources/v1/revenue/attribution.mjs +37 -0
  38. package/resources/v1/revenue/attribution.mjs.map +1 -0
  39. package/resources/v1/revenue/conversion.d.mts +34 -0
  40. package/resources/v1/revenue/conversion.d.mts.map +1 -0
  41. package/resources/v1/revenue/conversion.d.ts +34 -0
  42. package/resources/v1/revenue/conversion.d.ts.map +1 -0
  43. package/resources/v1/revenue/conversion.js +25 -0
  44. package/resources/v1/revenue/conversion.js.map +1 -0
  45. package/resources/v1/revenue/conversion.mjs +21 -0
  46. package/resources/v1/revenue/conversion.mjs.map +1 -0
  47. package/resources/v1/revenue/customers.d.mts +61 -0
  48. package/resources/v1/revenue/customers.d.mts.map +1 -0
  49. package/resources/v1/revenue/customers.d.ts +61 -0
  50. package/resources/v1/revenue/customers.d.ts.map +1 -0
  51. package/resources/v1/revenue/customers.js +40 -0
  52. package/resources/v1/revenue/customers.js.map +1 -0
  53. package/resources/v1/revenue/customers.mjs +36 -0
  54. package/resources/v1/revenue/customers.mjs.map +1 -0
  55. package/resources/v1/revenue/index.d.mts +5 -0
  56. package/resources/v1/revenue/index.d.mts.map +1 -0
  57. package/resources/v1/revenue/index.d.ts +5 -0
  58. package/resources/v1/revenue/index.d.ts.map +1 -0
  59. package/resources/v1/revenue/index.js +13 -0
  60. package/resources/v1/revenue/index.js.map +1 -0
  61. package/resources/v1/revenue/index.mjs +6 -0
  62. package/resources/v1/revenue/index.mjs.map +1 -0
  63. package/resources/v1/revenue/revenue.d.mts +255 -0
  64. package/resources/v1/revenue/revenue.d.mts.map +1 -0
  65. package/resources/v1/revenue/revenue.d.ts +255 -0
  66. package/resources/v1/revenue/revenue.d.ts.map +1 -0
  67. package/resources/v1/revenue/revenue.js +53 -0
  68. package/resources/v1/revenue/revenue.js.map +1 -0
  69. package/resources/v1/revenue/revenue.mjs +48 -0
  70. package/resources/v1/revenue/revenue.mjs.map +1 -0
  71. package/resources/v1/revenue.d.mts +2 -0
  72. package/resources/v1/revenue.d.mts.map +1 -0
  73. package/resources/v1/revenue.d.ts +2 -0
  74. package/resources/v1/revenue.d.ts.map +1 -0
  75. package/resources/v1/revenue.js +6 -0
  76. package/resources/v1/revenue.js.map +1 -0
  77. package/resources/v1/revenue.mjs +3 -0
  78. package/resources/v1/revenue.mjs.map +1 -0
  79. package/resources/v1/v1.d.mts +6 -2
  80. package/resources/v1/v1.d.mts.map +1 -1
  81. package/resources/v1/v1.d.ts +6 -2
  82. package/resources/v1/v1.d.ts.map +1 -1
  83. package/resources/v1/v1.js +4 -0
  84. package/resources/v1/v1.js.map +1 -1
  85. package/resources/v1/v1.mjs +4 -0
  86. package/resources/v1/v1.mjs.map +1 -1
  87. package/src/resources/v1/analytics/analytics.ts +34 -2
  88. package/src/resources/v1/analytics/events.ts +66 -2
  89. package/src/resources/v1/analytics/index.ts +2 -1
  90. package/src/resources/v1/index.ts +19 -0
  91. package/src/resources/v1/revenue/attribution.ts +84 -0
  92. package/src/resources/v1/revenue/conversion.ts +44 -0
  93. package/src/resources/v1/revenue/customers.ts +77 -0
  94. package/src/resources/v1/revenue/index.ts +23 -0
  95. package/src/resources/v1/revenue/revenue.ts +385 -0
  96. package/src/resources/v1/revenue.ts +3 -0
  97. package/src/resources/v1/v1.ts +42 -0
  98. package/src/version.ts +1 -1
  99. package/version.d.mts +1 -1
  100. package/version.d.ts +1 -1
  101. package/version.js +1 -1
  102. package/version.mjs +1 -1
@@ -6,15 +6,19 @@ import { CreatePaymentProviderRequest, ListPaymentProvidersResponse, PaymentProv
6
6
  import * as ProjectsAPI from "./projects.mjs";
7
7
  import { CreateProjectRequest, ListProjectsResponse, Project, ProjectCreateParams, ProjectDeleteResponse, ProjectResponse, ProjectUpdateParams, Projects, UpdateProjectRequest } from "./projects.mjs";
8
8
  import * as AnalyticsAPI from "./analytics/analytics.mjs";
9
- import { ActiveUsersResponse, Analytics, AnalyticsDashboardParams, BounceRateByPageMetric, BounceRateResponse, ChurnRateResponse, CohortAnalysisResponse, CohortData, CountryDataPoint, DashboardMetricsResponse, EventsOverTimeDataPoint, ManualIdentifyRequest, ManualIdentifyResponse, OriginDataPoint, RecentEvent, RecentEventsResponse, ReturnRateResponse, SessionMetricsResponse, TopVisitor, TopVisitorsResponse, UniqueVisitorsDataPoint, UniqueVisitorsTimelineResponse, VisitorDataPoint, VisitorEvent, VisitorProfileResponse, VisitorsByCountryResponse, VisitorsByDeviceResponse, VisitorsByOriginResponse } from "./analytics/analytics.mjs";
9
+ import { ActiveUsersResponse, Analytics, AnalyticsDashboardParams, BounceRateByPageMetric, BounceRateResponse, ChurnRateResponse, CohortAnalysisResponse, CohortData, CountryDataPoint, DashboardMetricsResponse, EventFilterOptionsResponse, EventsOverTimeDataPoint, ManualIdentifyRequest, ManualIdentifyResponse, OriginDataPoint, RecentEvent, RecentEventsResponse, ReturnRateResponse, SessionMetricsResponse, TopVisitor, TopVisitorsResponse, UniqueVisitorsDataPoint, UniqueVisitorsTimelineResponse, VisitorDataPoint, VisitorEvent, VisitorProfileResponse, VisitorsByCountryResponse, VisitorsByDeviceResponse, VisitorsByOriginResponse } from "./analytics/analytics.mjs";
10
+ import * as RevenueAPI from "./revenue/revenue.mjs";
11
+ import { AttributionByOriginResponse, AttributionByUtmResponse, ConversionMetricsResponse, CustomerProfileResponse, DashboardResponse, OriginAttributionDataPoint, Payment, Revenue, RevenueDashboardParams, RevenueOverTimeDataPoint, RevenueTimelineParams, TimelineDataPoint, TimelineResponse, TopCustomer, TopCustomersResponse, UtmAttributionDataPoint } from "./revenue/revenue.mjs";
10
12
  export declare class V1 extends APIResource {
11
13
  analytics: AnalyticsAPI.Analytics;
14
+ revenue: RevenueAPI.Revenue;
12
15
  projects: ProjectsAPI.Projects;
13
16
  auth: AuthAPI.Auth;
14
17
  paymentProviders: PaymentProvidersAPI.PaymentProviders;
15
18
  }
16
19
  export declare namespace V1 {
17
- export { Analytics as Analytics, type ActiveUsersResponse as ActiveUsersResponse, type BounceRateByPageMetric as BounceRateByPageMetric, type BounceRateResponse as BounceRateResponse, type ChurnRateResponse as ChurnRateResponse, type CohortAnalysisResponse as CohortAnalysisResponse, type CohortData as CohortData, type CountryDataPoint as CountryDataPoint, type DashboardMetricsResponse as DashboardMetricsResponse, type EventsOverTimeDataPoint as EventsOverTimeDataPoint, type ManualIdentifyRequest as ManualIdentifyRequest, type ManualIdentifyResponse as ManualIdentifyResponse, type OriginDataPoint as OriginDataPoint, type RecentEvent as RecentEvent, type RecentEventsResponse as RecentEventsResponse, type ReturnRateResponse as ReturnRateResponse, type SessionMetricsResponse as SessionMetricsResponse, type TopVisitor as TopVisitor, type TopVisitorsResponse as TopVisitorsResponse, type UniqueVisitorsDataPoint as UniqueVisitorsDataPoint, type UniqueVisitorsTimelineResponse as UniqueVisitorsTimelineResponse, type VisitorDataPoint as VisitorDataPoint, type VisitorEvent as VisitorEvent, type VisitorProfileResponse as VisitorProfileResponse, type VisitorsByCountryResponse as VisitorsByCountryResponse, type VisitorsByDeviceResponse as VisitorsByDeviceResponse, type VisitorsByOriginResponse as VisitorsByOriginResponse, type AnalyticsDashboardParams as AnalyticsDashboardParams, };
20
+ export { Analytics as Analytics, type ActiveUsersResponse as ActiveUsersResponse, type BounceRateByPageMetric as BounceRateByPageMetric, type BounceRateResponse as BounceRateResponse, type ChurnRateResponse as ChurnRateResponse, type CohortAnalysisResponse as CohortAnalysisResponse, type CohortData as CohortData, type CountryDataPoint as CountryDataPoint, type DashboardMetricsResponse as DashboardMetricsResponse, type EventFilterOptionsResponse as EventFilterOptionsResponse, type EventsOverTimeDataPoint as EventsOverTimeDataPoint, type ManualIdentifyRequest as ManualIdentifyRequest, type ManualIdentifyResponse as ManualIdentifyResponse, type OriginDataPoint as OriginDataPoint, type RecentEvent as RecentEvent, type RecentEventsResponse as RecentEventsResponse, type ReturnRateResponse as ReturnRateResponse, type SessionMetricsResponse as SessionMetricsResponse, type TopVisitor as TopVisitor, type TopVisitorsResponse as TopVisitorsResponse, type UniqueVisitorsDataPoint as UniqueVisitorsDataPoint, type UniqueVisitorsTimelineResponse as UniqueVisitorsTimelineResponse, type VisitorDataPoint as VisitorDataPoint, type VisitorEvent as VisitorEvent, type VisitorProfileResponse as VisitorProfileResponse, type VisitorsByCountryResponse as VisitorsByCountryResponse, type VisitorsByDeviceResponse as VisitorsByDeviceResponse, type VisitorsByOriginResponse as VisitorsByOriginResponse, type AnalyticsDashboardParams as AnalyticsDashboardParams, };
21
+ export { Revenue as Revenue, type AttributionByOriginResponse as AttributionByOriginResponse, type AttributionByUtmResponse as AttributionByUtmResponse, type ConversionMetricsResponse as ConversionMetricsResponse, type CustomerProfileResponse as CustomerProfileResponse, type DashboardResponse as DashboardResponse, type OriginAttributionDataPoint as OriginAttributionDataPoint, type Payment as Payment, type RevenueOverTimeDataPoint as RevenueOverTimeDataPoint, type TimelineDataPoint as TimelineDataPoint, type TimelineResponse as TimelineResponse, type TopCustomer as TopCustomer, type TopCustomersResponse as TopCustomersResponse, type UtmAttributionDataPoint as UtmAttributionDataPoint, type RevenueDashboardParams as RevenueDashboardParams, type RevenueTimelineParams as RevenueTimelineParams, };
18
22
  export { Projects as Projects, type CreateProjectRequest as CreateProjectRequest, type ListProjectsResponse as ListProjectsResponse, type Project as Project, type ProjectResponse as ProjectResponse, type UpdateProjectRequest as UpdateProjectRequest, type ProjectDeleteResponse as ProjectDeleteResponse, type ProjectCreateParams as ProjectCreateParams, type ProjectUpdateParams as ProjectUpdateParams, };
19
23
  export { Auth as Auth, type Account as Account, type AuthResponse as AuthResponse, type MessageResponse as MessageResponse, type Organization as Organization, type AuthConfirmPasswordRecoveryParams as AuthConfirmPasswordRecoveryParams, type AuthLoginParams as AuthLoginParams, type AuthLogoutParams as AuthLogoutParams, type AuthRefreshAccessTokenParams as AuthRefreshAccessTokenParams, type AuthRegisterAccountParams as AuthRegisterAccountParams, type AuthRequestPasswordRecoveryParams as AuthRequestPasswordRecoveryParams, };
20
24
  export { PaymentProviders as PaymentProviders, type CreatePaymentProviderRequest as CreatePaymentProviderRequest, type ListPaymentProvidersResponse as ListPaymentProvidersResponse, type PaymentProviderResponse as PaymentProviderResponse, type UpdatePaymentProviderRequest as UpdatePaymentProviderRequest, type PaymentProviderDeleteResponse as PaymentProviderDeleteResponse, type PaymentProviderCreateParams as PaymentProviderCreateParams, type PaymentProviderUpdateParams as PaymentProviderUpdateParams, type PaymentProviderListParams as PaymentProviderListParams, };
@@ -1 +1 @@
1
- {"version":3,"file":"v1.d.mts","sourceRoot":"","sources":["../../src/resources/v1/v1.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,OAAO;OACZ,EACL,OAAO,EACP,IAAI,EACJ,iCAAiC,EACjC,eAAe,EACf,gBAAgB,EAChB,4BAA4B,EAC5B,yBAAyB,EACzB,iCAAiC,EACjC,YAAY,EACZ,eAAe,EACf,YAAY,EACb;OACM,KAAK,mBAAmB;OACxB,EACL,4BAA4B,EAC5B,4BAA4B,EAC5B,2BAA2B,EAC3B,6BAA6B,EAC7B,yBAAyB,EACzB,uBAAuB,EACvB,2BAA2B,EAC3B,gBAAgB,EAChB,4BAA4B,EAC7B;OACM,KAAK,WAAW;OAChB,EACL,oBAAoB,EACpB,oBAAoB,EACpB,OAAO,EACP,mBAAmB,EACnB,qBAAqB,EACrB,eAAe,EACf,mBAAmB,EACnB,QAAQ,EACR,oBAAoB,EACrB;OACM,KAAK,YAAY;OACjB,EACL,mBAAmB,EACnB,SAAS,EACT,wBAAwB,EACxB,sBAAsB,EACtB,kBAAkB,EAClB,iBAAiB,EACjB,sBAAsB,EACtB,UAAU,EACV,gBAAgB,EAChB,wBAAwB,EACxB,uBAAuB,EACvB,qBAAqB,EACrB,sBAAsB,EACtB,eAAe,EACf,WAAW,EACX,oBAAoB,EACpB,kBAAkB,EAClB,sBAAsB,EACtB,UAAU,EACV,mBAAmB,EACnB,uBAAuB,EACvB,8BAA8B,EAC9B,gBAAgB,EAChB,YAAY,EACZ,sBAAsB,EACtB,yBAAyB,EACzB,wBAAwB,EAC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AgB,IAAI,gBAAgB,EACpC,KAAK,4BAA4B,IAAI,4BAA4B,EACjE,KAAK,4BAA4B,IAAI,4BAA4B,EACjE,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,4BAA4B,IAAI,4BAA4B,EACjE,KAAK,6BAA6B,IAAI,6BAA6B,EACnE,KAAK,2BAA2B,IAAI,2BAA2B,EAC/D,KAAK,2BAA2B,IAAI,2BAA2B,EAC/D,KAAK,yBAAyB,IAAI,yBAAyB,GAC5D,CAAC;CACH"}
@@ -6,15 +6,19 @@ import { CreatePaymentProviderRequest, ListPaymentProvidersResponse, PaymentProv
6
6
  import * as ProjectsAPI from "./projects.js";
7
7
  import { CreateProjectRequest, ListProjectsResponse, Project, ProjectCreateParams, ProjectDeleteResponse, ProjectResponse, ProjectUpdateParams, Projects, UpdateProjectRequest } from "./projects.js";
8
8
  import * as AnalyticsAPI from "./analytics/analytics.js";
9
- import { ActiveUsersResponse, Analytics, AnalyticsDashboardParams, BounceRateByPageMetric, BounceRateResponse, ChurnRateResponse, CohortAnalysisResponse, CohortData, CountryDataPoint, DashboardMetricsResponse, EventsOverTimeDataPoint, ManualIdentifyRequest, ManualIdentifyResponse, OriginDataPoint, RecentEvent, RecentEventsResponse, ReturnRateResponse, SessionMetricsResponse, TopVisitor, TopVisitorsResponse, UniqueVisitorsDataPoint, UniqueVisitorsTimelineResponse, VisitorDataPoint, VisitorEvent, VisitorProfileResponse, VisitorsByCountryResponse, VisitorsByDeviceResponse, VisitorsByOriginResponse } from "./analytics/analytics.js";
9
+ import { ActiveUsersResponse, Analytics, AnalyticsDashboardParams, BounceRateByPageMetric, BounceRateResponse, ChurnRateResponse, CohortAnalysisResponse, CohortData, CountryDataPoint, DashboardMetricsResponse, EventFilterOptionsResponse, EventsOverTimeDataPoint, ManualIdentifyRequest, ManualIdentifyResponse, OriginDataPoint, RecentEvent, RecentEventsResponse, ReturnRateResponse, SessionMetricsResponse, TopVisitor, TopVisitorsResponse, UniqueVisitorsDataPoint, UniqueVisitorsTimelineResponse, VisitorDataPoint, VisitorEvent, VisitorProfileResponse, VisitorsByCountryResponse, VisitorsByDeviceResponse, VisitorsByOriginResponse } from "./analytics/analytics.js";
10
+ import * as RevenueAPI from "./revenue/revenue.js";
11
+ import { AttributionByOriginResponse, AttributionByUtmResponse, ConversionMetricsResponse, CustomerProfileResponse, DashboardResponse, OriginAttributionDataPoint, Payment, Revenue, RevenueDashboardParams, RevenueOverTimeDataPoint, RevenueTimelineParams, TimelineDataPoint, TimelineResponse, TopCustomer, TopCustomersResponse, UtmAttributionDataPoint } from "./revenue/revenue.js";
10
12
  export declare class V1 extends APIResource {
11
13
  analytics: AnalyticsAPI.Analytics;
14
+ revenue: RevenueAPI.Revenue;
12
15
  projects: ProjectsAPI.Projects;
13
16
  auth: AuthAPI.Auth;
14
17
  paymentProviders: PaymentProvidersAPI.PaymentProviders;
15
18
  }
16
19
  export declare namespace V1 {
17
- export { Analytics as Analytics, type ActiveUsersResponse as ActiveUsersResponse, type BounceRateByPageMetric as BounceRateByPageMetric, type BounceRateResponse as BounceRateResponse, type ChurnRateResponse as ChurnRateResponse, type CohortAnalysisResponse as CohortAnalysisResponse, type CohortData as CohortData, type CountryDataPoint as CountryDataPoint, type DashboardMetricsResponse as DashboardMetricsResponse, type EventsOverTimeDataPoint as EventsOverTimeDataPoint, type ManualIdentifyRequest as ManualIdentifyRequest, type ManualIdentifyResponse as ManualIdentifyResponse, type OriginDataPoint as OriginDataPoint, type RecentEvent as RecentEvent, type RecentEventsResponse as RecentEventsResponse, type ReturnRateResponse as ReturnRateResponse, type SessionMetricsResponse as SessionMetricsResponse, type TopVisitor as TopVisitor, type TopVisitorsResponse as TopVisitorsResponse, type UniqueVisitorsDataPoint as UniqueVisitorsDataPoint, type UniqueVisitorsTimelineResponse as UniqueVisitorsTimelineResponse, type VisitorDataPoint as VisitorDataPoint, type VisitorEvent as VisitorEvent, type VisitorProfileResponse as VisitorProfileResponse, type VisitorsByCountryResponse as VisitorsByCountryResponse, type VisitorsByDeviceResponse as VisitorsByDeviceResponse, type VisitorsByOriginResponse as VisitorsByOriginResponse, type AnalyticsDashboardParams as AnalyticsDashboardParams, };
20
+ export { Analytics as Analytics, type ActiveUsersResponse as ActiveUsersResponse, type BounceRateByPageMetric as BounceRateByPageMetric, type BounceRateResponse as BounceRateResponse, type ChurnRateResponse as ChurnRateResponse, type CohortAnalysisResponse as CohortAnalysisResponse, type CohortData as CohortData, type CountryDataPoint as CountryDataPoint, type DashboardMetricsResponse as DashboardMetricsResponse, type EventFilterOptionsResponse as EventFilterOptionsResponse, type EventsOverTimeDataPoint as EventsOverTimeDataPoint, type ManualIdentifyRequest as ManualIdentifyRequest, type ManualIdentifyResponse as ManualIdentifyResponse, type OriginDataPoint as OriginDataPoint, type RecentEvent as RecentEvent, type RecentEventsResponse as RecentEventsResponse, type ReturnRateResponse as ReturnRateResponse, type SessionMetricsResponse as SessionMetricsResponse, type TopVisitor as TopVisitor, type TopVisitorsResponse as TopVisitorsResponse, type UniqueVisitorsDataPoint as UniqueVisitorsDataPoint, type UniqueVisitorsTimelineResponse as UniqueVisitorsTimelineResponse, type VisitorDataPoint as VisitorDataPoint, type VisitorEvent as VisitorEvent, type VisitorProfileResponse as VisitorProfileResponse, type VisitorsByCountryResponse as VisitorsByCountryResponse, type VisitorsByDeviceResponse as VisitorsByDeviceResponse, type VisitorsByOriginResponse as VisitorsByOriginResponse, type AnalyticsDashboardParams as AnalyticsDashboardParams, };
21
+ export { Revenue as Revenue, type AttributionByOriginResponse as AttributionByOriginResponse, type AttributionByUtmResponse as AttributionByUtmResponse, type ConversionMetricsResponse as ConversionMetricsResponse, type CustomerProfileResponse as CustomerProfileResponse, type DashboardResponse as DashboardResponse, type OriginAttributionDataPoint as OriginAttributionDataPoint, type Payment as Payment, type RevenueOverTimeDataPoint as RevenueOverTimeDataPoint, type TimelineDataPoint as TimelineDataPoint, type TimelineResponse as TimelineResponse, type TopCustomer as TopCustomer, type TopCustomersResponse as TopCustomersResponse, type UtmAttributionDataPoint as UtmAttributionDataPoint, type RevenueDashboardParams as RevenueDashboardParams, type RevenueTimelineParams as RevenueTimelineParams, };
18
22
  export { Projects as Projects, type CreateProjectRequest as CreateProjectRequest, type ListProjectsResponse as ListProjectsResponse, type Project as Project, type ProjectResponse as ProjectResponse, type UpdateProjectRequest as UpdateProjectRequest, type ProjectDeleteResponse as ProjectDeleteResponse, type ProjectCreateParams as ProjectCreateParams, type ProjectUpdateParams as ProjectUpdateParams, };
19
23
  export { Auth as Auth, type Account as Account, type AuthResponse as AuthResponse, type MessageResponse as MessageResponse, type Organization as Organization, type AuthConfirmPasswordRecoveryParams as AuthConfirmPasswordRecoveryParams, type AuthLoginParams as AuthLoginParams, type AuthLogoutParams as AuthLogoutParams, type AuthRefreshAccessTokenParams as AuthRefreshAccessTokenParams, type AuthRegisterAccountParams as AuthRegisterAccountParams, type AuthRequestPasswordRecoveryParams as AuthRequestPasswordRecoveryParams, };
20
24
  export { PaymentProviders as PaymentProviders, type CreatePaymentProviderRequest as CreatePaymentProviderRequest, type ListPaymentProvidersResponse as ListPaymentProvidersResponse, type PaymentProviderResponse as PaymentProviderResponse, type UpdatePaymentProviderRequest as UpdatePaymentProviderRequest, type PaymentProviderDeleteResponse as PaymentProviderDeleteResponse, type PaymentProviderCreateParams as PaymentProviderCreateParams, type PaymentProviderUpdateParams as PaymentProviderUpdateParams, type PaymentProviderListParams as PaymentProviderListParams, };
@@ -1 +1 @@
1
- {"version":3,"file":"v1.d.ts","sourceRoot":"","sources":["../../src/resources/v1/v1.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,OAAO;OACZ,EACL,OAAO,EACP,IAAI,EACJ,iCAAiC,EACjC,eAAe,EACf,gBAAgB,EAChB,4BAA4B,EAC5B,yBAAyB,EACzB,iCAAiC,EACjC,YAAY,EACZ,eAAe,EACf,YAAY,EACb;OACM,KAAK,mBAAmB;OACxB,EACL,4BAA4B,EAC5B,4BAA4B,EAC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gBAAgB,IAAI,gBAAgB,EACzC,KAAK,4BAA4B,IAAI,4BAA4B,EACjE,KAAK,yBAAyB,IAAI,yBAAyB,EAC3D,KAAK,iCAAiC,IAAI,iCAAiC,GAC5E,CAAC;IAEF,OAAO,EACL,gBAAgB,IAAI,gBAAgB,EACpC,KAAK,4BAA4B,IAAI,4BAA4B,EACjE,KAAK,4BAA4B,IAAI,4BAA4B,EACjE,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,4BAA4B,IAAI,4BAA4B,EACjE,KAAK,6BAA6B,IAAI,6BAA6B,EACnE,KAAK,2BAA2B,IAAI,2BAA2B,EAC/D,KAAK,2BAA2B,IAAI,2BAA2B,EAC/D,KAAK,yBAAyB,IAAI,yBAAyB,GAC5D,CAAC;CACH"}
1
+ {"version":3,"file":"v1.d.ts","sourceRoot":"","sources":["../../src/resources/v1/v1.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,OAAO;OACZ,EACL,OAAO,EACP,IAAI,EACJ,iCAAiC,EACjC,eAAe,EACf,gBAAgB,EAChB,4BAA4B,EAC5B,yBAAyB,EACzB,iCAAiC,EACjC,YAAY,EACZ,eAAe,EACf,YAAY,EACb;OACM,KAAK,mBAAmB;OACxB,EACL,4BAA4B,EAC5B,4BAA4B,EAC5B,2BAA2B,EAC3B,6BAA6B,EAC7B,yBAAyB,EACzB,uBAAuB,EACvB,2BAA2B,EAC3B,gBAAgB,EAChB,4BAA4B,EAC7B;OACM,KAAK,WAAW;OAChB,EACL,oBAAoB,EACpB,oBAAoB,EACpB,OAAO,EACP,mBAAmB,EACnB,qBAAqB,EACrB,eAAe,EACf,mBAAmB,EACnB,QAAQ,EACR,oBAAoB,EACrB;OACM,KAAK,YAAY;OACjB,EACL,mBAAmB,EACnB,SAAS,EACT,wBAAwB,EACxB,sBAAsB,EACtB,kBAAkB,EAClB,iBAAiB,EACjB,sBAAsB,EACtB,UAAU,EACV,gBAAgB,EAChB,wBAAwB,EACxB,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oBAAoB,EACjD,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,OAAO,IAAI,OAAO,EACvB,KAAK,eAAe,IAAI,eAAe,EACvC,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,mBAAmB,IAAI,mBAAmB,GAChD,CAAC;IAEF,OAAO,EACL,IAAI,IAAI,IAAI,EACZ,KAAK,OAAO,IAAI,OAAO,EACvB,KAAK,YAAY,IAAI,YAAY,EACjC,KAAK,eAAe,IAAI,eAAe,EACvC,KAAK,YAAY,IAAI,YAAY,EACjC,KAAK,iCAAiC,IAAI,iCAAiC,EAC3E,KAAK,eAAe,IAAI,eAAe,EACvC,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,4BAA4B,IAAI,4BAA4B,EACjE,KAAK,yBAAyB,IAAI,yBAAyB,EAC3D,KAAK,iCAAiC,IAAI,iCAAiC,GAC5E,CAAC;IAEF,OAAO,EACL,gBAAgB,IAAI,gBAAgB,EACpC,KAAK,4BAA4B,IAAI,4BAA4B,EACjE,KAAK,4BAA4B,IAAI,4BAA4B,EACjE,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,4BAA4B,IAAI,4BAA4B,EACjE,KAAK,6BAA6B,IAAI,6BAA6B,EACnE,KAAK,2BAA2B,IAAI,2BAA2B,EAC/D,KAAK,2BAA2B,IAAI,2BAA2B,EAC/D,KAAK,yBAAyB,IAAI,yBAAyB,GAC5D,CAAC;CACH"}
@@ -12,10 +12,13 @@ const ProjectsAPI = tslib_1.__importStar(require("./projects.js"));
12
12
  const projects_1 = require("./projects.js");
13
13
  const AnalyticsAPI = tslib_1.__importStar(require("./analytics/analytics.js"));
14
14
  const analytics_1 = require("./analytics/analytics.js");
15
+ const RevenueAPI = tslib_1.__importStar(require("./revenue/revenue.js"));
16
+ const revenue_1 = require("./revenue/revenue.js");
15
17
  class V1 extends resource_1.APIResource {
16
18
  constructor() {
17
19
  super(...arguments);
18
20
  this.analytics = new AnalyticsAPI.Analytics(this._client);
21
+ this.revenue = new RevenueAPI.Revenue(this._client);
19
22
  this.projects = new ProjectsAPI.Projects(this._client);
20
23
  this.auth = new AuthAPI.Auth(this._client);
21
24
  this.paymentProviders = new PaymentProvidersAPI.PaymentProviders(this._client);
@@ -23,6 +26,7 @@ class V1 extends resource_1.APIResource {
23
26
  }
24
27
  exports.V1 = V1;
25
28
  V1.Analytics = analytics_1.Analytics;
29
+ V1.Revenue = revenue_1.Revenue;
26
30
  V1.Projects = projects_1.Projects;
27
31
  V1.Auth = auth_1.Auth;
28
32
  V1.PaymentProviders = payment_providers_1.PaymentProviders;
@@ -1 +1 @@
1
- {"version":3,"file":"v1.js","sourceRoot":"","sources":["../../src/resources/v1/v1.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;AAEtF,qDAAkD;AAClD,2DAAkC;AAClC,oCAYgB;AAChB,oFAA2D;AAC3D,8DAU6B;AAC7B,mEAA0C;AAC1C,4CAUoB;AACpB,+EAAsD;AACtD,wDA6B+B;AAE/B,MAAa,EAAG,SAAQ,sBAAW;IAAnC;;QACE,cAAS,GAA2B,IAAI,YAAY,CAAC,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAC7E,aAAQ,GAAyB,IAAI,WAAW,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACxE,SAAI,GAAiB,IAAI,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACpD,qBAAgB,GAAyC,IAAI,mBAAmB,CAAC,gBAAgB,CAC/F,IAAI,CAAC,OAAO,CACb,CAAC;IACJ,CAAC;CAAA;AAPD,gBAOC;AAED,EAAE,CAAC,SAAS,GAAG,qBAAS,CAAC;AACzB,EAAE,CAAC,QAAQ,GAAG,mBAAQ,CAAC;AACvB,EAAE,CAAC,IAAI,GAAG,WAAI,CAAC;AACf,EAAE,CAAC,gBAAgB,GAAG,oCAAgB,CAAC"}
1
+ {"version":3,"file":"v1.js","sourceRoot":"","sources":["../../src/resources/v1/v1.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;AAEtF,qDAAkD;AAClD,2DAAkC;AAClC,oCAYgB;AAChB,oFAA2D;AAC3D,8DAU6B;AAC7B,mEAA0C;AAC1C,4CAUoB;AACpB,+EAAsD;AACtD,wDA8B+B;AAC/B,yEAAgD;AAChD,kDAiB2B;AAE3B,MAAa,EAAG,SAAQ,sBAAW;IAAnC;;QACE,cAAS,GAA2B,IAAI,YAAY,CAAC,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAC7E,YAAO,GAAuB,IAAI,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACnE,aAAQ,GAAyB,IAAI,WAAW,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACxE,SAAI,GAAiB,IAAI,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACpD,qBAAgB,GAAyC,IAAI,mBAAmB,CAAC,gBAAgB,CAC/F,IAAI,CAAC,OAAO,CACb,CAAC;IACJ,CAAC;CAAA;AARD,gBAQC;AAED,EAAE,CAAC,SAAS,GAAG,qBAAS,CAAC;AACzB,EAAE,CAAC,OAAO,GAAG,iBAAO,CAAC;AACrB,EAAE,CAAC,QAAQ,GAAG,mBAAQ,CAAC;AACvB,EAAE,CAAC,IAAI,GAAG,WAAI,CAAC;AACf,EAAE,CAAC,gBAAgB,GAAG,oCAAgB,CAAC"}
@@ -8,16 +8,20 @@ import * as ProjectsAPI from "./projects.mjs";
8
8
  import { Projects, } from "./projects.mjs";
9
9
  import * as AnalyticsAPI from "./analytics/analytics.mjs";
10
10
  import { Analytics, } from "./analytics/analytics.mjs";
11
+ import * as RevenueAPI from "./revenue/revenue.mjs";
12
+ import { Revenue, } from "./revenue/revenue.mjs";
11
13
  export class V1 extends APIResource {
12
14
  constructor() {
13
15
  super(...arguments);
14
16
  this.analytics = new AnalyticsAPI.Analytics(this._client);
17
+ this.revenue = new RevenueAPI.Revenue(this._client);
15
18
  this.projects = new ProjectsAPI.Projects(this._client);
16
19
  this.auth = new AuthAPI.Auth(this._client);
17
20
  this.paymentProviders = new PaymentProvidersAPI.PaymentProviders(this._client);
18
21
  }
19
22
  }
20
23
  V1.Analytics = Analytics;
24
+ V1.Revenue = Revenue;
21
25
  V1.Projects = Projects;
22
26
  V1.Auth = Auth;
23
27
  V1.PaymentProviders = PaymentProviders;
@@ -1 +1 @@
1
- {"version":3,"file":"v1.mjs","sourceRoot":"","sources":["../../src/resources/v1/v1.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OACf,KAAK,OAAO;OACZ,EAEL,IAAI,GAUL;OACM,KAAK,mBAAmB;OACxB,EAQL,gBAAgB,GAEjB;OACM,KAAK,WAAW;OAChB,EAQL,QAAQ,GAET;OACM,KAAK,YAAY;OACjB,EAEL,SAAS,GA2BV;AAED,MAAM,OAAO,EAAG,SAAQ,WAAW;IAAnC;;QACE,cAAS,GAA2B,IAAI,YAAY,CAAC,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAC7E,aAAQ,GAAyB,IAAI,WAAW,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACxE,SAAI,GAAiB,IAAI,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACpD,qBAAgB,GAAyC,IAAI,mBAAmB,CAAC,gBAAgB,CAC/F,IAAI,CAAC,OAAO,CACb,CAAC;IACJ,CAAC;CAAA;AAED,EAAE,CAAC,SAAS,GAAG,SAAS,CAAC;AACzB,EAAE,CAAC,QAAQ,GAAG,QAAQ,CAAC;AACvB,EAAE,CAAC,IAAI,GAAG,IAAI,CAAC;AACf,EAAE,CAAC,gBAAgB,GAAG,gBAAgB,CAAC"}
1
+ {"version":3,"file":"v1.mjs","sourceRoot":"","sources":["../../src/resources/v1/v1.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OACf,KAAK,OAAO;OACZ,EAEL,IAAI,GAUL;OACM,KAAK,mBAAmB;OACxB,EAQL,gBAAgB,GAEjB;OACM,KAAK,WAAW;OAChB,EAQL,QAAQ,GAET;OACM,KAAK,YAAY;OACjB,EAEL,SAAS,GA4BV;OACM,KAAK,UAAU;OACf,EAQL,OAAO,GASR;AAED,MAAM,OAAO,EAAG,SAAQ,WAAW;IAAnC;;QACE,cAAS,GAA2B,IAAI,YAAY,CAAC,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAC7E,YAAO,GAAuB,IAAI,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACnE,aAAQ,GAAyB,IAAI,WAAW,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACxE,SAAI,GAAiB,IAAI,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACpD,qBAAgB,GAAyC,IAAI,mBAAmB,CAAC,gBAAgB,CAC/F,IAAI,CAAC,OAAO,CACb,CAAC;IACJ,CAAC;CAAA;AAED,EAAE,CAAC,SAAS,GAAG,SAAS,CAAC;AACzB,EAAE,CAAC,OAAO,GAAG,OAAO,CAAC;AACrB,EAAE,CAAC,QAAQ,GAAG,QAAQ,CAAC;AACvB,EAAE,CAAC,IAAI,GAAG,IAAI,CAAC;AACf,EAAE,CAAC,gBAAgB,GAAG,gBAAgB,CAAC"}
@@ -2,7 +2,7 @@
2
2
 
3
3
  import { APIResource } from '../../../core/resource';
4
4
  import * as EventsAPI from './events';
5
- import { EventRecentParams, Events } from './events';
5
+ import { EventFilterOptionsParams, EventRecentParams, Events } from './events';
6
6
  import * as RetentionAPI from './retention';
7
7
  import {
8
8
  Retention,
@@ -146,11 +146,28 @@ export interface DashboardMetricsResponse {
146
146
 
147
147
  total_sessions_in_period?: number;
148
148
 
149
+ /**
150
+ * Total unique sessions in period
151
+ */
152
+ unique_sessions?: number;
153
+
149
154
  unique_visitors?: number;
150
155
 
151
156
  wau?: number;
152
157
  }
153
158
 
159
+ export interface EventFilterOptionsResponse {
160
+ /**
161
+ * Unique page paths
162
+ */
163
+ pages?: Array<string>;
164
+
165
+ /**
166
+ * Unique referrer domains
167
+ */
168
+ traffic_origins?: Array<string>;
169
+ }
170
+
154
171
  export interface EventsOverTimeDataPoint {
155
172
  event_count?: number;
156
173
 
@@ -206,10 +223,16 @@ export interface RecentEvent {
206
223
 
207
224
  location_country_iso?: string;
208
225
 
226
+ location_latitude?: number;
227
+
228
+ location_longitude?: number;
229
+
209
230
  page_path?: string;
210
231
 
211
232
  page_url?: string;
212
233
 
234
+ referrer_domain?: string;
235
+
213
236
  referrer_url?: string;
214
237
 
215
238
  user_id?: string;
@@ -220,6 +243,10 @@ export interface RecentEvent {
220
243
  export interface RecentEventsResponse {
221
244
  events?: Array<RecentEvent>;
222
245
 
246
+ limit?: number;
247
+
248
+ offset?: number;
249
+
223
250
  total?: number;
224
251
  }
225
252
 
@@ -387,6 +414,7 @@ export declare namespace Analytics {
387
414
  type CohortData as CohortData,
388
415
  type CountryDataPoint as CountryDataPoint,
389
416
  type DashboardMetricsResponse as DashboardMetricsResponse,
417
+ type EventFilterOptionsResponse as EventFilterOptionsResponse,
390
418
  type EventsOverTimeDataPoint as EventsOverTimeDataPoint,
391
419
  type ManualIdentifyRequest as ManualIdentifyRequest,
392
420
  type ManualIdentifyResponse as ManualIdentifyResponse,
@@ -419,7 +447,11 @@ export declare namespace Analytics {
419
447
  type VisitorTopParams as VisitorTopParams,
420
448
  };
421
449
 
422
- export { Events as Events, type EventRecentParams as EventRecentParams };
450
+ export {
451
+ Events as Events,
452
+ type EventFilterOptionsParams as EventFilterOptionsParams,
453
+ type EventRecentParams as EventRecentParams,
454
+ };
423
455
 
424
456
  export {
425
457
  Sessions as Sessions,
@@ -7,7 +7,26 @@ import { RequestOptions } from '../../../internal/request-options';
7
7
 
8
8
  export class Events extends APIResource {
9
9
  /**
10
- * Get a list of the most recent events (default: 15 events)
10
+ * Get unique traffic origins and page paths to populate filter dropdowns
11
+ *
12
+ * @example
13
+ * ```ts
14
+ * const eventFilterOptionsResponse =
15
+ * await client.v1.analytics.events.filterOptions({
16
+ * project_id: 'project_id',
17
+ * });
18
+ * ```
19
+ */
20
+ filterOptions(
21
+ query: EventFilterOptionsParams,
22
+ options?: RequestOptions,
23
+ ): APIPromise<AnalyticsAPI.EventFilterOptionsResponse> {
24
+ return this._client.get('/api/v1/analytics/events/filter-options', { query, ...options });
25
+ }
26
+
27
+ /**
28
+ * Get a list of recent events with optional filters (visitor_id, user_id,
29
+ * external_id, traffic_origin, page_path)
11
30
  *
12
31
  * @example
13
32
  * ```ts
@@ -22,18 +41,63 @@ export class Events extends APIResource {
22
41
  }
23
42
  }
24
43
 
44
+ export interface EventFilterOptionsParams {
45
+ /**
46
+ * Project ID
47
+ */
48
+ project_id: string;
49
+
50
+ /**
51
+ * Time range
52
+ */
53
+ time_range?: 'last_hour' | 'today' | 'last_7_days' | 'last_30_days' | 'last_90_days';
54
+ }
55
+
25
56
  export interface EventRecentParams {
26
57
  /**
27
58
  * Project ID
28
59
  */
29
60
  project_id: string;
30
61
 
62
+ /**
63
+ * Filter by external ID
64
+ */
65
+ external_id?: string;
66
+
31
67
  /**
32
68
  * Maximum number of events to return (default: 15)
33
69
  */
34
70
  limit?: number;
71
+
72
+ /**
73
+ * Offset for pagination (default: 0)
74
+ */
75
+ offset?: number;
76
+
77
+ /**
78
+ * Filter by page path
79
+ */
80
+ page_path?: string;
81
+
82
+ /**
83
+ * Filter by traffic origin (referrer domain)
84
+ */
85
+ traffic_origin?: string;
86
+
87
+ /**
88
+ * Filter by user ID
89
+ */
90
+ user_id?: string;
91
+
92
+ /**
93
+ * Filter by visitor ID
94
+ */
95
+ visitor_id?: string;
35
96
  }
36
97
 
37
98
  export declare namespace Events {
38
- export { type EventRecentParams as EventRecentParams };
99
+ export {
100
+ type EventFilterOptionsParams as EventFilterOptionsParams,
101
+ type EventRecentParams as EventRecentParams,
102
+ };
39
103
  }
@@ -10,6 +10,7 @@ export {
10
10
  type CohortData,
11
11
  type CountryDataPoint,
12
12
  type DashboardMetricsResponse,
13
+ type EventFilterOptionsResponse,
13
14
  type EventsOverTimeDataPoint,
14
15
  type ManualIdentifyRequest,
15
16
  type ManualIdentifyResponse,
@@ -30,7 +31,7 @@ export {
30
31
  type VisitorsByOriginResponse,
31
32
  type AnalyticsDashboardParams,
32
33
  } from './analytics';
33
- export { Events, type EventRecentParams } from './events';
34
+ export { Events, type EventFilterOptionsParams, type EventRecentParams } from './events';
34
35
  export {
35
36
  Retention,
36
37
  type RetentionChurnRateParams,
@@ -10,6 +10,7 @@ export {
10
10
  type CohortData,
11
11
  type CountryDataPoint,
12
12
  type DashboardMetricsResponse,
13
+ type EventFilterOptionsResponse,
13
14
  type EventsOverTimeDataPoint,
14
15
  type ManualIdentifyRequest,
15
16
  type ManualIdentifyResponse,
@@ -65,4 +66,22 @@ export {
65
66
  type ProjectCreateParams,
66
67
  type ProjectUpdateParams,
67
68
  } from './projects';
69
+ export {
70
+ Revenue,
71
+ type AttributionByOriginResponse,
72
+ type AttributionByUtmResponse,
73
+ type ConversionMetricsResponse,
74
+ type CustomerProfileResponse,
75
+ type DashboardResponse,
76
+ type OriginAttributionDataPoint,
77
+ type Payment,
78
+ type RevenueOverTimeDataPoint,
79
+ type TimelineDataPoint,
80
+ type TimelineResponse,
81
+ type TopCustomer,
82
+ type TopCustomersResponse,
83
+ type UtmAttributionDataPoint,
84
+ type RevenueDashboardParams,
85
+ type RevenueTimelineParams,
86
+ } from './revenue/index';
68
87
  export { V1 } from './v1';
@@ -0,0 +1,84 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { APIResource } from '../../../core/resource';
4
+ import * as RevenueAPI from './revenue';
5
+ import { APIPromise } from '../../../core/api-promise';
6
+ import { RequestOptions } from '../../../internal/request-options';
7
+
8
+ export class Attribution extends APIResource {
9
+ /**
10
+ * Get revenue metrics grouped by traffic origin (referrer domain) using
11
+ * first-touch attribution
12
+ *
13
+ * @example
14
+ * ```ts
15
+ * const attributionByOriginResponse =
16
+ * await client.v1.revenue.attribution.byOrigin({
17
+ * project_id: 'project_id',
18
+ * time_range: 'last_hour',
19
+ * });
20
+ * ```
21
+ */
22
+ byOrigin(
23
+ query: AttributionByOriginParams,
24
+ options?: RequestOptions,
25
+ ): APIPromise<RevenueAPI.AttributionByOriginResponse> {
26
+ return this._client.get('/api/v1/revenue/attribution/origin', { query, ...options });
27
+ }
28
+
29
+ /**
30
+ * Get revenue metrics grouped by UTM source, medium, or campaign using first-touch
31
+ * attribution
32
+ *
33
+ * @example
34
+ * ```ts
35
+ * const attributionByUtmResponse =
36
+ * await client.v1.revenue.attribution.byUtm({
37
+ * project_id: 'project_id',
38
+ * time_range: 'last_hour',
39
+ * });
40
+ * ```
41
+ */
42
+ byUtm(
43
+ query: AttributionByUtmParams,
44
+ options?: RequestOptions,
45
+ ): APIPromise<RevenueAPI.AttributionByUtmResponse> {
46
+ return this._client.get('/api/v1/revenue/attribution/utm', { query, ...options });
47
+ }
48
+ }
49
+
50
+ export interface AttributionByOriginParams {
51
+ /**
52
+ * Project ID
53
+ */
54
+ project_id: string;
55
+
56
+ /**
57
+ * Time range
58
+ */
59
+ time_range: 'last_hour' | 'today' | 'last_7_days' | 'last_30_days' | 'last_90_days';
60
+ }
61
+
62
+ export interface AttributionByUtmParams {
63
+ /**
64
+ * Project ID
65
+ */
66
+ project_id: string;
67
+
68
+ /**
69
+ * Time range
70
+ */
71
+ time_range: 'last_hour' | 'today' | 'last_7_days' | 'last_30_days' | 'last_90_days';
72
+
73
+ /**
74
+ * UTM type: source, medium, or campaign (default: source)
75
+ */
76
+ utm_type?: string;
77
+ }
78
+
79
+ export declare namespace Attribution {
80
+ export {
81
+ type AttributionByOriginParams as AttributionByOriginParams,
82
+ type AttributionByUtmParams as AttributionByUtmParams,
83
+ };
84
+ }
@@ -0,0 +1,44 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { APIResource } from '../../../core/resource';
4
+ import * as RevenueAPI from './revenue';
5
+ import { APIPromise } from '../../../core/api-promise';
6
+ import { RequestOptions } from '../../../internal/request-options';
7
+
8
+ export class Conversion extends APIResource {
9
+ /**
10
+ * Get conversion funnel metrics including conversion rate, time to purchase, and
11
+ * customer lifetime value
12
+ *
13
+ * @example
14
+ * ```ts
15
+ * const conversionMetricsResponse =
16
+ * await client.v1.revenue.conversion.metrics({
17
+ * project_id: 'project_id',
18
+ * time_range: 'last_hour',
19
+ * });
20
+ * ```
21
+ */
22
+ metrics(
23
+ query: ConversionMetricsParams,
24
+ options?: RequestOptions,
25
+ ): APIPromise<RevenueAPI.ConversionMetricsResponse> {
26
+ return this._client.get('/api/v1/revenue/conversion/metrics', { query, ...options });
27
+ }
28
+ }
29
+
30
+ export interface ConversionMetricsParams {
31
+ /**
32
+ * Project ID
33
+ */
34
+ project_id: string;
35
+
36
+ /**
37
+ * Time range
38
+ */
39
+ time_range: 'last_hour' | 'today' | 'last_7_days' | 'last_30_days' | 'last_90_days';
40
+ }
41
+
42
+ export declare namespace Conversion {
43
+ export { type ConversionMetricsParams as ConversionMetricsParams };
44
+ }
@@ -0,0 +1,77 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { APIResource } from '../../../core/resource';
4
+ import * as RevenueAPI from './revenue';
5
+ import { APIPromise } from '../../../core/api-promise';
6
+ import { RequestOptions } from '../../../internal/request-options';
7
+
8
+ export class Customers extends APIResource {
9
+ /**
10
+ * Get detailed revenue information for a specific customer including payment
11
+ * history and attribution
12
+ *
13
+ * @example
14
+ * ```ts
15
+ * const customerProfileResponse =
16
+ * await client.v1.revenue.customers.profile({
17
+ * project_id: 'project_id',
18
+ * visitor_id: 'visitor_id',
19
+ * });
20
+ * ```
21
+ */
22
+ profile(
23
+ query: CustomerProfileParams,
24
+ options?: RequestOptions,
25
+ ): APIPromise<RevenueAPI.CustomerProfileResponse> {
26
+ return this._client.get('/api/v1/revenue/customers/profile', { query, ...options });
27
+ }
28
+
29
+ /**
30
+ * Get a list of customers ranked by total revenue
31
+ *
32
+ * @example
33
+ * ```ts
34
+ * const topCustomersResponse =
35
+ * await client.v1.revenue.customers.top({
36
+ * project_id: 'project_id',
37
+ * time_range: 'last_hour',
38
+ * });
39
+ * ```
40
+ */
41
+ top(query: CustomerTopParams, options?: RequestOptions): APIPromise<RevenueAPI.TopCustomersResponse> {
42
+ return this._client.get('/api/v1/revenue/customers/top', { query, ...options });
43
+ }
44
+ }
45
+
46
+ export interface CustomerProfileParams {
47
+ /**
48
+ * Project ID
49
+ */
50
+ project_id: string;
51
+
52
+ /**
53
+ * Visitor ID
54
+ */
55
+ visitor_id: string;
56
+ }
57
+
58
+ export interface CustomerTopParams {
59
+ /**
60
+ * Project ID
61
+ */
62
+ project_id: string;
63
+
64
+ /**
65
+ * Time range
66
+ */
67
+ time_range: 'last_hour' | 'today' | 'last_7_days' | 'last_30_days' | 'last_90_days';
68
+
69
+ /**
70
+ * Maximum number of customers to return (default: 50)
71
+ */
72
+ limit?: number;
73
+ }
74
+
75
+ export declare namespace Customers {
76
+ export { type CustomerProfileParams as CustomerProfileParams, type CustomerTopParams as CustomerTopParams };
77
+ }
@@ -0,0 +1,23 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ export { Attribution, type AttributionByOriginParams, type AttributionByUtmParams } from './attribution';
4
+ export { Conversion, type ConversionMetricsParams } from './conversion';
5
+ export { Customers, type CustomerProfileParams, type CustomerTopParams } from './customers';
6
+ export {
7
+ Revenue,
8
+ type AttributionByOriginResponse,
9
+ type AttributionByUtmResponse,
10
+ type ConversionMetricsResponse,
11
+ type CustomerProfileResponse,
12
+ type DashboardResponse,
13
+ type OriginAttributionDataPoint,
14
+ type Payment,
15
+ type RevenueOverTimeDataPoint,
16
+ type TimelineDataPoint,
17
+ type TimelineResponse,
18
+ type TopCustomer,
19
+ type TopCustomersResponse,
20
+ type UtmAttributionDataPoint,
21
+ type RevenueDashboardParams,
22
+ type RevenueTimelineParams,
23
+ } from './revenue';