diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md
new file mode 100644
index 0000000..50a4c7b
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/bug_report.md
@@ -0,0 +1,29 @@
+---
+name: Bug Report
+about: Create a report to help us improve
+title: "fix: "
+labels: bug
+---
+
+**Description**
+
+A clear and concise description of what the bug is.
+
+**Steps To Reproduce**
+
+1. Go to '...'
+2. Click on '....'
+3. Scroll down to '....'
+4. See error
+
+**Expected Behavior**
+
+A clear and concise description of what you expected to happen.
+
+**Screenshots**
+
+If applicable, add screenshots to help explain your problem.
+
+**Additional Context**
+
+Add any other context about the problem here.
diff --git a/.github/ISSUE_TEMPLATE/build.md b/.github/ISSUE_TEMPLATE/build.md
new file mode 100644
index 0000000..0cf8e62
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/build.md
@@ -0,0 +1,14 @@
+---
+name: Build System
+about: Changes that affect the build system or external dependencies
+title: "build: "
+labels: build
+---
+
+**Description**
+
+Describe what changes need to be done to the build system and why.
+
+**Requirements**
+
+- [ ] The build system is passing
diff --git a/.github/ISSUE_TEMPLATE/chore.md b/.github/ISSUE_TEMPLATE/chore.md
new file mode 100644
index 0000000..498ebfd
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/chore.md
@@ -0,0 +1,14 @@
+---
+name: Chore
+about: Other changes that don't modify src or test files
+title: "chore: "
+labels: chore
+---
+
+**Description**
+
+Clearly describe what change is needed and why. If this changes code then please use another issue type.
+
+**Requirements**
+
+- [ ] No functional changes to the code
diff --git a/.github/ISSUE_TEMPLATE/ci.md b/.github/ISSUE_TEMPLATE/ci.md
new file mode 100644
index 0000000..fa2dd9e
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/ci.md
@@ -0,0 +1,14 @@
+---
+name: Continuous Integration
+about: Changes to the CI configuration files and scripts
+title: "ci: "
+labels: ci
+---
+
+**Description**
+
+Describe what changes need to be done to the ci/cd system and why.
+
+**Requirements**
+
+- [ ] The ci system is passing
diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml
new file mode 100644
index 0000000..ec4bb38
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/config.yml
@@ -0,0 +1 @@
+blank_issues_enabled: false
\ No newline at end of file
diff --git a/.github/ISSUE_TEMPLATE/documentation.md b/.github/ISSUE_TEMPLATE/documentation.md
new file mode 100644
index 0000000..f494a4d
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/documentation.md
@@ -0,0 +1,14 @@
+---
+name: Documentation
+about: Improve the documentation so all collaborators have a common understanding
+title: "docs: "
+labels: documentation
+---
+
+**Description**
+
+Clearly describe what documentation you are looking to add or improve.
+
+**Requirements**
+
+- [ ] Requirements go here
diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md
new file mode 100644
index 0000000..ddd2fcc
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/feature_request.md
@@ -0,0 +1,18 @@
+---
+name: Feature Request
+about: A new feature to be added to the project
+title: "feat: "
+labels: feature
+---
+
+**Description**
+
+Clearly describe what you are looking to add. The more context the better.
+
+**Requirements**
+
+- [ ] Checklist of requirements to be fulfilled
+
+**Additional Context**
+
+Add any other context or screenshots about the feature request go here.
diff --git a/.github/ISSUE_TEMPLATE/performance.md b/.github/ISSUE_TEMPLATE/performance.md
new file mode 100644
index 0000000..699b8d4
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/performance.md
@@ -0,0 +1,14 @@
+---
+name: Performance Update
+about: A code change that improves performance
+title: "perf: "
+labels: performance
+---
+
+**Description**
+
+Clearly describe what code needs to be changed and what the performance impact is going to be. Bonus point's if you can tie this directly to user experience.
+
+**Requirements**
+
+- [ ] There is no drop in test coverage.
diff --git a/.github/ISSUE_TEMPLATE/refactor.md b/.github/ISSUE_TEMPLATE/refactor.md
new file mode 100644
index 0000000..1626c57
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/refactor.md
@@ -0,0 +1,14 @@
+---
+name: Refactor
+about: A code change that neither fixes a bug nor adds a feature
+title: "refactor: "
+labels: refactor
+---
+
+**Description**
+
+Clearly describe what needs to be refactored and why. Please provide links to related issues (bugs or upcoming features) in order to help prioritize.
+
+**Requirements**
+
+- [ ] There is no drop in test coverage.
diff --git a/.github/ISSUE_TEMPLATE/revert.md b/.github/ISSUE_TEMPLATE/revert.md
new file mode 100644
index 0000000..9d121dc
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/revert.md
@@ -0,0 +1,16 @@
+---
+name: Revert Commit
+about: Reverts a previous commit
+title: "revert: "
+labels: revert
+---
+
+**Description**
+
+Provide a link to a PR/Commit that you are looking to revert and why.
+
+**Requirements**
+
+- [ ] Change has been reverted
+- [ ] No change in test coverage has happened
+- [ ] A new ticket is created for any follow on work that needs to happen
diff --git a/.github/ISSUE_TEMPLATE/style.md b/.github/ISSUE_TEMPLATE/style.md
new file mode 100644
index 0000000..02244a7
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/style.md
@@ -0,0 +1,14 @@
+---
+name: Style Changes
+about: Changes that do not affect the meaning of the code (white space, formatting, missing semi-colons, etc)
+title: "style: "
+labels: style
+---
+
+**Description**
+
+Clearly describe what you are looking to change and why.
+
+**Requirements**
+
+- [ ] There is no drop in test coverage.
diff --git a/.github/ISSUE_TEMPLATE/test.md b/.github/ISSUE_TEMPLATE/test.md
new file mode 100644
index 0000000..431a7ea
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/test.md
@@ -0,0 +1,14 @@
+---
+name: Test
+about: Adding missing tests or correcting existing tests
+title: "test: "
+labels: test
+---
+
+**Description**
+
+List out the tests that need to be added or changed. Please also include any information as to why this was not covered in the past.
+
+**Requirements**
+
+- [ ] There is no drop in test coverage.
diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md
new file mode 100644
index 0000000..1169936
--- /dev/null
+++ b/.github/PULL_REQUEST_TEMPLATE.md
@@ -0,0 +1,27 @@
+
+
+## Status
+
+**READY/IN DEVELOPMENT/HOLD**
+
+## Description
+
+
+
+## Type of Change
+
+
+
+- [ ] โจ New feature (non-breaking change which adds functionality)
+- [ ] ๐ ๏ธ Bug fix (non-breaking change which fixes an issue)
+- [ ] โ Breaking change (fix or feature that would cause existing functionality to change)
+- [ ] ๐งน Code refactor
+- [ ] โ
Build configuration change
+- [ ] ๐ Documentation
+- [ ] ๐๏ธ Chore
diff --git a/.github/cspell.json b/.github/cspell.json
new file mode 100644
index 0000000..e88f92f
--- /dev/null
+++ b/.github/cspell.json
@@ -0,0 +1,21 @@
+{
+ "version": "0.2",
+ "$schema": "https://raw.githubusercontent.com/streetsidesoftware/cspell/main/cspell.schema.json",
+ "dictionaries": ["vgv_allowed", "vgv_forbidden"],
+ "dictionaryDefinitions": [
+ {
+ "name": "vgv_allowed",
+ "path": "https://raw.githubusercontent.com/verygoodopensource/very_good_dictionaries/main/allowed.txt",
+ "description": "Allowed VGV Spellings"
+ },
+ {
+ "name": "vgv_forbidden",
+ "path": "https://raw.githubusercontent.com/verygoodopensource/very_good_dictionaries/main/forbidden.txt",
+ "description": "Forbidden VGV Spellings"
+ }
+ ],
+ "useGitignore": true,
+ "words": [
+ "lemlist_sdk"
+ ]
+}
diff --git a/.github/dependabot.yaml b/.github/dependabot.yaml
new file mode 100644
index 0000000..63b035c
--- /dev/null
+++ b/.github/dependabot.yaml
@@ -0,0 +1,11 @@
+version: 2
+enable-beta-ecosystems: true
+updates:
+ - package-ecosystem: "github-actions"
+ directory: "/"
+ schedule:
+ interval: "daily"
+ - package-ecosystem: "pub"
+ directory: "/"
+ schedule:
+ interval: "daily"
diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml
new file mode 100644
index 0000000..c7146c3
--- /dev/null
+++ b/.github/workflows/main.yaml
@@ -0,0 +1,27 @@
+name: ci
+
+concurrency:
+ group: ${{ github.workflow }}-${{ github.ref }}
+ cancel-in-progress: true
+
+on:
+ push:
+ branches:
+ - main
+ pull_request:
+ branches:
+ - main
+
+jobs:
+ semantic_pull_request:
+ uses: VeryGoodOpenSource/very_good_workflows/.github/workflows/semantic_pull_request.yml@v1
+
+ spell-check:
+ uses: VeryGoodOpenSource/very_good_workflows/.github/workflows/spell_check.yml@v1
+ with:
+ includes: "**/*.md"
+ modified_files_only: false
+
+ build:
+ uses: VeryGoodOpenSource/very_good_workflows/.github/workflows/dart_package.yml@v1
+
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..526da15
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,7 @@
+# See https://www.dartlang.org/guides/libraries/private-files
+
+# Files and directories created by pub
+.dart_tool/
+.packages
+build/
+pubspec.lock
\ No newline at end of file
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..9b4109c
--- /dev/null
+++ b/README.md
@@ -0,0 +1,62 @@
+# Lemlist Sdk
+
+[![style: very good analysis][very_good_analysis_badge]][very_good_analysis_link]
+[![Powered by Mason](https://img.shields.io/endpoint?url=https%3A%2F%2Ftinyurl.com%2Fmason-badge)](https://github.com/felangel/mason)
+[![License: MIT][license_badge]][license_link]
+
+A Very Good Project created by Very Good CLI.
+
+## Installation ๐ป
+
+**โ In order to start using Lemlist Sdk you must have the [Dart SDK][dart_install_link] installed on your machine.**
+
+Install via `dart pub add`:
+
+```sh
+dart pub add lemlist_sdk
+```
+
+---
+
+## Continuous Integration ๐ค
+
+Lemlist Sdk comes with a built-in [GitHub Actions workflow][github_actions_link] powered by [Very Good Workflows][very_good_workflows_link] but you can also add your preferred CI/CD solution.
+
+Out of the box, on each pull request and push, the CI `formats`, `lints`, and `tests` the code. This ensures the code remains consistent and behaves correctly as you add functionality or make changes. The project uses [Very Good Analysis][very_good_analysis_link] for a strict set of analysis options used by our team. Code coverage is enforced using the [Very Good Workflows][very_good_coverage_link].
+
+---
+
+## Running Tests ๐งช
+
+To run all unit tests:
+
+```sh
+dart pub global activate coverage 1.2.0
+dart test --coverage=coverage
+dart pub global run coverage:format_coverage --lcov --in=coverage --out=coverage/lcov.info
+```
+
+To view the generated coverage report you can use [lcov](https://github.com/linux-test-project/lcov).
+
+```sh
+# Generate Coverage Report
+genhtml coverage/lcov.info -o coverage/
+
+# Open Coverage Report
+open coverage/index.html
+```
+
+[dart_install_link]: https://dart.dev/get-dart
+[github_actions_link]: https://docs.github.com/en/actions/learn-github-actions
+[license_badge]: https://img.shields.io/badge/license-MIT-blue.svg
+[license_link]: https://opensource.org/licenses/MIT
+[logo_black]: https://raw.githubusercontent.com/VGVentures/very_good_brand/main/styles/README/vgv_logo_black.png#gh-light-mode-only
+[logo_white]: https://raw.githubusercontent.com/VGVentures/very_good_brand/main/styles/README/vgv_logo_white.png#gh-dark-mode-only
+[mason_link]: https://github.com/felangel/mason
+[very_good_analysis_badge]: https://img.shields.io/badge/style-very_good_analysis-B22C89.svg
+[very_good_analysis_link]: https://pub.dev/packages/very_good_analysis
+[very_good_coverage_link]: https://github.com/marketplace/actions/very-good-coverage
+[very_good_ventures_link]: https://verygood.ventures
+[very_good_ventures_link_light]: https://verygood.ventures#gh-light-mode-only
+[very_good_ventures_link_dark]: https://verygood.ventures#gh-dark-mode-only
+[very_good_workflows_link]: https://github.com/VeryGoodOpenSource/very_good_workflows
diff --git a/analysis_options.yaml b/analysis_options.yaml
new file mode 100644
index 0000000..799268d
--- /dev/null
+++ b/analysis_options.yaml
@@ -0,0 +1 @@
+include: package:very_good_analysis/analysis_options.5.1.0.yaml
diff --git a/coverage_badge.svg b/coverage_badge.svg
new file mode 100644
index 0000000..499e98c
--- /dev/null
+++ b/coverage_badge.svg
@@ -0,0 +1,20 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ coverage
+ coverage
+ 100%
+ 100%
+
+
diff --git a/lib/lemlist_sdk.dart b/lib/lemlist_sdk.dart
new file mode 100644
index 0000000..d4a900b
--- /dev/null
+++ b/lib/lemlist_sdk.dart
@@ -0,0 +1,4 @@
+/// A Very Good Project created by Very Good CLI.
+library;
+
+export 'src/lemlist_sdk.dart';
diff --git a/lib/src/lemlist_sdk.dart b/lib/src/lemlist_sdk.dart
new file mode 100644
index 0000000..755c2e6
--- /dev/null
+++ b/lib/src/lemlist_sdk.dart
@@ -0,0 +1,532 @@
+import 'dart:convert';
+
+import 'package:dio/dio.dart';
+import 'package:lemlist_sdk/src/models/models.dart';
+
+/// Lemlist SDK
+class LemlistSDK {
+ /// Lemlist SDK
+ LemlistSDK({
+ required String apiKey,
+ }) : _dio = Dio(
+ BaseOptions(
+ baseUrl: 'https://api.lemlist.com',
+ headers: {
+ 'Authorization': base64Encode(utf8.encode(':$apiKey')),
+ },
+ ),
+ );
+
+ final Dio _dio;
+
+ /// Retrieves information of your team.
+ Future getTeamInformation() async {
+ final response = await _dio.get>('/api/team');
+
+ if (response.data == null) {
+ throw Exception('No team information found');
+ }
+
+ return Team.fromJson(response.data!);
+ }
+
+ /// Retrieves a specific campaign by its ID.
+ ///
+ /// [campaignId] is the ID of the campaign to retrieve.
+ /// Labels in the returned object are optional if there are no labels on the campaign.
+ Future getSpecificCampaignById(String campaignId) async {
+ final response =
+ await _dio.get>('/api/campaigns/$campaignId');
+
+ if (response.data == null) {
+ throw Exception('No campaign found');
+ }
+
+ return Campaign.fromJson(response.data!);
+ }
+
+ /// Retrieves the list of all campaigns.
+ ///
+ /// [offset] (Optional) Offset from the start. For pagination.
+ /// [limit] (Optional) Number of campaigns to retrieve. 100 per default and 100 max.
+ Future> listAllCampaigns({int? offset, int? limit}) async {
+ final response = await _dio.get>(
+ '/api/campaigns',
+ queryParameters: {
+ if (offset != null) 'offset': offset,
+ if (limit != null) 'limit': limit,
+ },
+ );
+
+ if (response.data == null) {
+ throw Exception('No campaigns found');
+ }
+
+ return response.data!
+ .cast>()
+ .map(Campaign.fromJson)
+ .toList();
+ }
+
+ /// Starts an asynchronous export of all the statistics of a campaign.
+ /// The final export result is a CSV file.
+ ///
+ /// [campaignId] is the ID of the campaign to export.
+ /// Returns an [ExportStartResult] object containing the export ID and status.
+ Future startExportOfCampaign(String campaignId) async {
+ final response = await _dio
+ .get>('/api/campaigns/$campaignId/export/start');
+
+ if (response.data == null) {
+ throw Exception('No export started');
+ }
+
+ return ExportStartResult.fromJson(response.data!);
+ }
+
+ /// Checks the status of an asynchronous export.
+ ///
+ /// [campaignId] is the ID of the campaign that was exported.
+ /// [exportId] is the ID of the export to check the status of.
+ /// Returns an [ExportStatusResult] object containing the export's status and details.
+ Future getStatusOfCampaignExport(
+ String campaignId,
+ String exportId,
+ ) async {
+ final response = await _dio.get>(
+ '/api/campaigns/$campaignId/export/$exportId/status',
+ );
+
+ if (response.data == null) {
+ throw Exception('No export status found');
+ }
+
+ return ExportStatusResult.fromJson(response.data!);
+ }
+
+ /// Sets an email for a given export. When the export is done, an email with the download URL
+ /// will be sent to the address provided.
+ ///
+ /// [campaignId] - The ID of the campaign that was exported.
+ /// [exportId] - The ID of the export.
+ /// [email] - The email address to send the export URL to when the export is done.
+ Future setEmailForCampaignExport(
+ String campaignId, String exportId, String email) async {
+ final response = await _dio.get>(
+ '/api/campaigns/$campaignId/export/$exportId/email/$email',
+ );
+
+ if (response.data == null) {
+ throw Exception('No email set');
+ }
+
+ return ExportSetEmailResult.fromJson(response.data!);
+ }
+
+ /// Downloads a CSV file that contains all the leads of a campaign.
+ ///
+ /// [campaignId] is the ID of the campaign to retrieve.
+ /// [state] is used to filter the leads by their state. Use 'all' to export all states.
+ /// Returns the CSV content as a String.
+ Future exportLeadsOfCampaign(
+ String campaignId, {
+ String state = 'all',
+ }) async {
+ final response = await _dio.get(
+ '/api/campaigns/$campaignId/export/leads',
+ queryParameters: {
+ 'state': state,
+ },
+ options: Options(
+ responseType: ResponseType.plain,
+ ),
+ );
+
+ if (response.statusCode == 200) {
+ return response.data.toString();
+ } else {
+ throw Exception('Failed to export leads for campaign $campaignId');
+ }
+ }
+
+ /// Adds a lead in a specific campaign. If the lead doesn't exist, it'll be created,
+ /// then inserted into the campaign. The creator of the lead is the campaign's sender.
+ Future addLeadInCampaign({
+ required String campaignId,
+ required String email,
+ bool deduplicate = true,
+ bool findEmail = true,
+ bool linkedinEnrichment = true,
+ bool verifyEmail = true,
+ LeadRequest? leadData,
+ }) async {
+ final response = await _dio.post>(
+ '/api/campaigns/$campaignId/leads/$email',
+ queryParameters: {
+ 'deduplicate': deduplicate,
+ 'findEmail': findEmail,
+ 'linkedinEnrichment': linkedinEnrichment,
+ 'verifyEmail': verifyEmail,
+ },
+ data: leadData?.toJson(),
+ );
+
+ if (response.data == null) {
+ throw Exception('No lead added');
+ }
+
+ return LeadResponse.fromJson(response.data!);
+ }
+
+ /// Updates a lead in a specific campaign.
+ ///
+ /// [campaignId] is the ID of the campaign.
+ /// [email] is the email address of the lead.
+ /// [leadData] is the data to update the lead with.
+ Future updateLeadInCampaign({
+ required String campaignId,
+ required String email,
+ required LeadRequest leadData,
+ }) async {
+ final response = await _dio.patch>(
+ '/api/campaigns/$campaignId/leads/$email',
+ data: leadData.toJson(),
+ );
+
+ if (response.data == null) {
+ throw Exception('No lead updated');
+ }
+
+ return LeadResponse.fromJson(response.data!);
+ }
+
+ /// Unsubscribes a lead from all campaigns if they belong to the specified campaign.
+ ///
+ /// [campaignId] is the ID of the campaign.
+ /// [email] is the email address of the lead.
+ Future unsubscribeLeadFromCampaign({
+ required String campaignId,
+ required String email,
+ }) async {
+ final response = await _dio.delete>(
+ '/api/campaigns/$campaignId/leads/$email',
+ );
+
+ if (response.data == null) {
+ throw Exception('No lead unsubscribed');
+ }
+
+ return UnsubscribeLeadResponse.fromJson(response.data!);
+ }
+
+ /// Deletes a lead from a specific campaign. All information, including statistics, will be deleted.
+ ///
+ /// [campaignId] is the ID of the campaign.
+ /// [email] is the email address of the lead.
+ /// [action] forces the deletion of the lead when set to 'remove'.
+ Future deleteLeadFromCampaign({
+ required String campaignId,
+ required String email,
+ String action = 'remove',
+ }) async {
+ final response = await _dio.delete>(
+ '/api/campaigns/$campaignId/leads/$email',
+ queryParameters: {
+ 'action': action,
+ },
+ );
+
+ if (response.data == null) {
+ throw Exception('No lead deleted');
+ }
+
+ return LeadDeletionResponse.fromJson(response.data!);
+ }
+
+ /// Retrieves all the information of a specific lead using its email or ID.
+ ///
+ /// [email] is the email address of the lead (optional).
+ /// [id] is the ID of the lead (optional).
+ /// [campaignId] to search for this lead only within the specified campaign (optional).
+ Future getSpecificLead({
+ String? email,
+ String? id,
+ String? campaignId,
+ }) async {
+ final response = await _dio.get>(
+ '/api/leads/${email ?? id}', // Assuming email takes precedence over ID
+ queryParameters: {
+ if (campaignId != null) 'campaignId': campaignId,
+ // Assuming the API can handle query params for ID if needed
+ },
+ );
+
+ if (response.data == null) {
+ throw Exception('No lead found');
+ }
+
+ return LeadDetailsResponse.fromJson(response.data!);
+ }
+
+ /// Pauses a specific lead using its email in all campaigns.
+ ///
+ /// [email] is the email address of the lead.
+ Future> pauseSpecificLeadByEmail(
+ String email,
+ ) async {
+ final response = await _dio.post>('/api/leads/pause/$email');
+
+ if (response.data == null) {
+ throw Exception('No lead paused');
+ }
+
+ return response.data!
+ .cast>()
+ .map(PausedLeadResponse.fromJson)
+ .toList();
+ }
+
+ /// Starts a specific lead using its email in all campaigns.
+ ///
+ /// [email] is the email address of the lead.
+ Future> resumeSpecificLeadByEmail(
+ String email,
+ ) async {
+ final response = await _dio.post>('/api/leads/start/$email');
+
+ if (response.data == null) {
+ throw Exception('No lead resumed');
+ }
+
+ return response.data!
+ .cast>()
+ .map(LeadActionResponse.fromJson)
+ .toList();
+ }
+
+ /// Method to mark a lead as interested by email
+ Future> markLeadAsInterested(String email) async {
+ try {
+ final response =
+ await _dio.post>('/api/leads/interested/$email');
+ return response.data!
+ .map((dynamic item) =>
+ LeadResponse.fromJson(item as Map))
+ .toList();
+ } on Exception {
+ // Handle the error
+ rethrow;
+ }
+ }
+
+ /// Marks a specific lead as interested using its email in all campaigns.
+ ///
+ /// [email] is the email address of the lead.
+ Future> markLeadAsInterestedByEmail(
+ String email,
+ ) async {
+ final response =
+ await _dio.post>('/api/leads/interested/$email');
+
+ if (response.data == null) {
+ throw Exception('No lead marked as interested');
+ }
+
+ return response.data!
+ .cast>()
+ .map(InterestedLeadResponse.fromJson)
+ .toList();
+ }
+
+ /// Marks a specific lead as not interested using its email in all campaigns.
+ ///
+ /// [email] is the email address of the lead.
+ Future> markLeadAsNotInterestedByEmail(
+ String email,
+ ) async {
+ final response =
+ await _dio.post>('/api/leads/notinterested/$email');
+
+ if (response.data == null) {
+ throw Exception('No lead marked as not interested');
+ }
+
+ return response.data!
+ .cast>()
+ .map(InterestedLeadResponse.fromJson)
+ .toList();
+ }
+
+ /// Marks a specific lead as interested using its email in a specific campaign.
+ ///
+ /// [campaignId] is the ID of the campaign.
+ /// [email] is the email address of the lead.
+ Future> markLeadAsInterestedInSpecificCampaign({
+ required String campaignId,
+ required String email,
+ }) async {
+ final response = await _dio.post>(
+ '/api/campaigns/$campaignId/leads/$email/interested');
+
+ if (response.data == null) {
+ throw Exception('No lead marked as interested');
+ }
+
+ return response.data!
+ .cast>()
+ .map(InterestedLeadResponse.fromJson)
+ .toList();
+ }
+
+ /// Marks a specific lead as not interested using its email in a specific campaign.
+ ///
+ /// [campaignId] is the ID of the campaign.
+ /// [email] is the email address of the lead.
+ Future>
+ markLeadAsNotInterestedInSpecificCampaign({
+ required String campaignId,
+ required String email,
+ }) async {
+ final response = await _dio.post>(
+ '/api/campaigns/$campaignId/leads/$email/notinterested',
+ );
+
+ if (response.data == null) {
+ throw Exception('No lead marked as not interested');
+ }
+
+ return response.data!
+ .cast>()
+ .map(InterestedLeadResponse.fromJson)
+ .toList();
+ }
+
+ /// Retrieves the last 100 activities with optional filters.
+ ///
+ /// [type] (Optional) The type of activity to retrieve.
+ /// [campaignId] (Optional) Retrieve activities for this campaign ID.
+ /// [isFirst] (Optional) Only retrieve the first occurrence of this activity.
+ /// [offset] (Optional) Offset for pagination.
+ /// [limit] (Optional) Number of activities to retrieve, 100 by default.
+ Future> getActivities({
+ String? type,
+ String? campaignId,
+ bool? isFirst,
+ int? offset,
+ int? limit = 100,
+ }) async {
+ final response = await _dio.get>(
+ '/api/activities',
+ queryParameters: {
+ if (type != null) 'type': type,
+ if (campaignId != null) 'campaignId': campaignId,
+ if (isFirst != null) 'isFirst': isFirst,
+ if (offset != null) 'offset': offset,
+ 'limit': limit,
+ },
+ );
+
+ if (response.data == null) {
+ throw Exception('No activities found');
+ }
+
+ return response.data!
+ .cast>()
+ .map(Activity.fromJson)
+ .toList();
+ }
+
+ /// Downloads a CSV file that contains all the unsubscribed email addresses.
+ /// The result is not sorted.
+ Future> exportListOfUnsubscribes() async {
+ final response = await _dio.get>(
+ '/api/unsubs/export',
+ options: Options(
+ responseType: ResponseType.bytes,
+ ),
+ );
+
+ if (response.statusCode == 200) {
+ return response.data!;
+ } else {
+ throw Exception('Failed to export unsubscribes');
+ }
+ }
+
+ /// Adds a lead in the unsubscribed list.
+ ///
+ /// The [emailOrDomain] parameter is the email address to unsubscribe.
+ /// If this is a domain, it must start with "@".
+ Future addEmailOrDomainToUnsubscribes(
+ String emailOrDomain,
+ ) async {
+ final response = await _dio
+ .post>('/api/unsubscribes/$emailOrDomain');
+
+ if (response.data == null) {
+ throw Exception('No email or domain added to unsubscribes');
+ }
+
+ return UnsubscribeResponse.fromJson(response.data!);
+ }
+
+ /// Deletes a lead from the unsubscribed list.
+ ///
+ /// [email] is the email address of the lead to be removed from the unsubscribed list.
+ Future deleteEmailFromUnsubscribes(
+ String email,
+ ) async {
+ final response =
+ await _dio.delete>('/api/unsubscribes/$email');
+
+ if (response.data == null) {
+ throw Exception('No email deleted from unsubscribes');
+ }
+
+ return UnsubscribeDeleteResponse.fromJson(response.data!);
+ }
+
+ /// Retrieves the list of all hooks.
+ Future> listAllHooks() async {
+ final response = await _dio.get>('/api/hooks');
+
+ if (response.data == null) {
+ throw Exception('No hooks found');
+ }
+
+ return response.data!
+ .cast>()
+ .map(Hook.fromJson)
+ .toList();
+ }
+
+ /// Adds a hook in the system.
+ /// [targetUrl] is the URL that Lemlist will call with event data.
+ Future addHook(String targetUrl) async {
+ final response = await _dio.post>(
+ '/api/hooks',
+ data: {
+ 'targetUrl': targetUrl,
+ },
+ );
+
+ if (response.data == null) {
+ throw Exception('No hook added');
+ }
+
+ return HookResponse.fromJson(response.data!);
+ }
+
+ /// Deletes a hook by its ID.
+ ///
+ /// [_id] is the ID of the hook that needs to be removed.
+ Future deleteHook(String _id) async {
+ final response = await _dio.delete>('/api/hooks/$_id');
+
+ if (response.data == null) {
+ throw Exception('No hook deleted');
+ }
+
+ return HookResponse.fromJson(response.data!);
+ }
+}
diff --git a/lib/src/models/activity.dart b/lib/src/models/activity.dart
new file mode 100644
index 0000000..3c6255f
--- /dev/null
+++ b/lib/src/models/activity.dart
@@ -0,0 +1,37 @@
+import 'package:freezed_annotation/freezed_annotation.dart';
+
+part 'activity.freezed.dart';
+part 'activity.g.dart';
+
+/// An activity model.
+@freezed
+class Activity with _$Activity {
+ /// Initializes an activity.
+ const factory Activity({
+ @JsonKey(name: '_id') required String id,
+ required bool isFirst,
+ required String type,
+ required String teamId,
+ required DateTime createdAt,
+ String? sendUserId,
+ String? sendUserEmail,
+ String? sendUserName,
+ String? leadId,
+ String? leadFirstName,
+ String? leadLastName,
+ String? leadEmail,
+ String? campaignId,
+ String? campaignName,
+ String? listId,
+ String? sequenceId,
+ int? sequenceStep,
+ String? emailTemplateId,
+ String? emailTemplateName,
+ String? emailId,
+ // Add any additional fields if necessary
+ }) = _Activity;
+
+ /// Initializes an activity from JSON.
+ factory Activity.fromJson(Map json) =>
+ _$ActivityFromJson(json);
+}
diff --git a/lib/src/models/activity.freezed.dart b/lib/src/models/activity.freezed.dart
new file mode 100644
index 0000000..7c3e3fd
--- /dev/null
+++ b/lib/src/models/activity.freezed.dart
@@ -0,0 +1,572 @@
+// coverage:ignore-file
+// GENERATED CODE - DO NOT MODIFY BY HAND
+// ignore_for_file: type=lint
+// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
+
+part of 'activity.dart';
+
+// **************************************************************************
+// FreezedGenerator
+// **************************************************************************
+
+T _$identity(T value) => value;
+
+final _privateConstructorUsedError = UnsupportedError(
+ 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models');
+
+Activity _$ActivityFromJson(Map json) {
+ return _Activity.fromJson(json);
+}
+
+/// @nodoc
+mixin _$Activity {
+ @JsonKey(name: '_id')
+ String get id => throw _privateConstructorUsedError;
+ bool get isFirst => throw _privateConstructorUsedError;
+ String get type => throw _privateConstructorUsedError;
+ String get teamId => throw _privateConstructorUsedError;
+ DateTime get createdAt => throw _privateConstructorUsedError;
+ String? get sendUserId => throw _privateConstructorUsedError;
+ String? get sendUserEmail => throw _privateConstructorUsedError;
+ String? get sendUserName => throw _privateConstructorUsedError;
+ String? get leadId => throw _privateConstructorUsedError;
+ String? get leadFirstName => throw _privateConstructorUsedError;
+ String? get leadLastName => throw _privateConstructorUsedError;
+ String? get leadEmail => throw _privateConstructorUsedError;
+ String? get campaignId => throw _privateConstructorUsedError;
+ String? get campaignName => throw _privateConstructorUsedError;
+ String? get listId => throw _privateConstructorUsedError;
+ String? get sequenceId => throw _privateConstructorUsedError;
+ int? get sequenceStep => throw _privateConstructorUsedError;
+ String? get emailTemplateId => throw _privateConstructorUsedError;
+ String? get emailTemplateName => throw _privateConstructorUsedError;
+ String? get emailId => throw _privateConstructorUsedError;
+
+ Map toJson() => throw _privateConstructorUsedError;
+ @JsonKey(ignore: true)
+ $ActivityCopyWith get copyWith =>
+ throw _privateConstructorUsedError;
+}
+
+/// @nodoc
+abstract class $ActivityCopyWith<$Res> {
+ factory $ActivityCopyWith(Activity value, $Res Function(Activity) then) =
+ _$ActivityCopyWithImpl<$Res, Activity>;
+ @useResult
+ $Res call(
+ {@JsonKey(name: '_id') String id,
+ bool isFirst,
+ String type,
+ String teamId,
+ DateTime createdAt,
+ String? sendUserId,
+ String? sendUserEmail,
+ String? sendUserName,
+ String? leadId,
+ String? leadFirstName,
+ String? leadLastName,
+ String? leadEmail,
+ String? campaignId,
+ String? campaignName,
+ String? listId,
+ String? sequenceId,
+ int? sequenceStep,
+ String? emailTemplateId,
+ String? emailTemplateName,
+ String? emailId});
+}
+
+/// @nodoc
+class _$ActivityCopyWithImpl<$Res, $Val extends Activity>
+ implements $ActivityCopyWith<$Res> {
+ _$ActivityCopyWithImpl(this._value, this._then);
+
+ // ignore: unused_field
+ final $Val _value;
+ // ignore: unused_field
+ final $Res Function($Val) _then;
+
+ @pragma('vm:prefer-inline')
+ @override
+ $Res call({
+ Object? id = null,
+ Object? isFirst = null,
+ Object? type = null,
+ Object? teamId = null,
+ Object? createdAt = null,
+ Object? sendUserId = freezed,
+ Object? sendUserEmail = freezed,
+ Object? sendUserName = freezed,
+ Object? leadId = freezed,
+ Object? leadFirstName = freezed,
+ Object? leadLastName = freezed,
+ Object? leadEmail = freezed,
+ Object? campaignId = freezed,
+ Object? campaignName = freezed,
+ Object? listId = freezed,
+ Object? sequenceId = freezed,
+ Object? sequenceStep = freezed,
+ Object? emailTemplateId = freezed,
+ Object? emailTemplateName = freezed,
+ Object? emailId = freezed,
+ }) {
+ return _then(_value.copyWith(
+ id: null == id
+ ? _value.id
+ : id // ignore: cast_nullable_to_non_nullable
+ as String,
+ isFirst: null == isFirst
+ ? _value.isFirst
+ : isFirst // ignore: cast_nullable_to_non_nullable
+ as bool,
+ type: null == type
+ ? _value.type
+ : type // ignore: cast_nullable_to_non_nullable
+ as String,
+ teamId: null == teamId
+ ? _value.teamId
+ : teamId // ignore: cast_nullable_to_non_nullable
+ as String,
+ createdAt: null == createdAt
+ ? _value.createdAt
+ : createdAt // ignore: cast_nullable_to_non_nullable
+ as DateTime,
+ sendUserId: freezed == sendUserId
+ ? _value.sendUserId
+ : sendUserId // ignore: cast_nullable_to_non_nullable
+ as String?,
+ sendUserEmail: freezed == sendUserEmail
+ ? _value.sendUserEmail
+ : sendUserEmail // ignore: cast_nullable_to_non_nullable
+ as String?,
+ sendUserName: freezed == sendUserName
+ ? _value.sendUserName
+ : sendUserName // ignore: cast_nullable_to_non_nullable
+ as String?,
+ leadId: freezed == leadId
+ ? _value.leadId
+ : leadId // ignore: cast_nullable_to_non_nullable
+ as String?,
+ leadFirstName: freezed == leadFirstName
+ ? _value.leadFirstName
+ : leadFirstName // ignore: cast_nullable_to_non_nullable
+ as String?,
+ leadLastName: freezed == leadLastName
+ ? _value.leadLastName
+ : leadLastName // ignore: cast_nullable_to_non_nullable
+ as String?,
+ leadEmail: freezed == leadEmail
+ ? _value.leadEmail
+ : leadEmail // ignore: cast_nullable_to_non_nullable
+ as String?,
+ campaignId: freezed == campaignId
+ ? _value.campaignId
+ : campaignId // ignore: cast_nullable_to_non_nullable
+ as String?,
+ campaignName: freezed == campaignName
+ ? _value.campaignName
+ : campaignName // ignore: cast_nullable_to_non_nullable
+ as String?,
+ listId: freezed == listId
+ ? _value.listId
+ : listId // ignore: cast_nullable_to_non_nullable
+ as String?,
+ sequenceId: freezed == sequenceId
+ ? _value.sequenceId
+ : sequenceId // ignore: cast_nullable_to_non_nullable
+ as String?,
+ sequenceStep: freezed == sequenceStep
+ ? _value.sequenceStep
+ : sequenceStep // ignore: cast_nullable_to_non_nullable
+ as int?,
+ emailTemplateId: freezed == emailTemplateId
+ ? _value.emailTemplateId
+ : emailTemplateId // ignore: cast_nullable_to_non_nullable
+ as String?,
+ emailTemplateName: freezed == emailTemplateName
+ ? _value.emailTemplateName
+ : emailTemplateName // ignore: cast_nullable_to_non_nullable
+ as String?,
+ emailId: freezed == emailId
+ ? _value.emailId
+ : emailId // ignore: cast_nullable_to_non_nullable
+ as String?,
+ ) as $Val);
+ }
+}
+
+/// @nodoc
+abstract class _$$ActivityImplCopyWith<$Res>
+ implements $ActivityCopyWith<$Res> {
+ factory _$$ActivityImplCopyWith(
+ _$ActivityImpl value, $Res Function(_$ActivityImpl) then) =
+ __$$ActivityImplCopyWithImpl<$Res>;
+ @override
+ @useResult
+ $Res call(
+ {@JsonKey(name: '_id') String id,
+ bool isFirst,
+ String type,
+ String teamId,
+ DateTime createdAt,
+ String? sendUserId,
+ String? sendUserEmail,
+ String? sendUserName,
+ String? leadId,
+ String? leadFirstName,
+ String? leadLastName,
+ String? leadEmail,
+ String? campaignId,
+ String? campaignName,
+ String? listId,
+ String? sequenceId,
+ int? sequenceStep,
+ String? emailTemplateId,
+ String? emailTemplateName,
+ String? emailId});
+}
+
+/// @nodoc
+class __$$ActivityImplCopyWithImpl<$Res>
+ extends _$ActivityCopyWithImpl<$Res, _$ActivityImpl>
+ implements _$$ActivityImplCopyWith<$Res> {
+ __$$ActivityImplCopyWithImpl(
+ _$ActivityImpl _value, $Res Function(_$ActivityImpl) _then)
+ : super(_value, _then);
+
+ @pragma('vm:prefer-inline')
+ @override
+ $Res call({
+ Object? id = null,
+ Object? isFirst = null,
+ Object? type = null,
+ Object? teamId = null,
+ Object? createdAt = null,
+ Object? sendUserId = freezed,
+ Object? sendUserEmail = freezed,
+ Object? sendUserName = freezed,
+ Object? leadId = freezed,
+ Object? leadFirstName = freezed,
+ Object? leadLastName = freezed,
+ Object? leadEmail = freezed,
+ Object? campaignId = freezed,
+ Object? campaignName = freezed,
+ Object? listId = freezed,
+ Object? sequenceId = freezed,
+ Object? sequenceStep = freezed,
+ Object? emailTemplateId = freezed,
+ Object? emailTemplateName = freezed,
+ Object? emailId = freezed,
+ }) {
+ return _then(_$ActivityImpl(
+ id: null == id
+ ? _value.id
+ : id // ignore: cast_nullable_to_non_nullable
+ as String,
+ isFirst: null == isFirst
+ ? _value.isFirst
+ : isFirst // ignore: cast_nullable_to_non_nullable
+ as bool,
+ type: null == type
+ ? _value.type
+ : type // ignore: cast_nullable_to_non_nullable
+ as String,
+ teamId: null == teamId
+ ? _value.teamId
+ : teamId // ignore: cast_nullable_to_non_nullable
+ as String,
+ createdAt: null == createdAt
+ ? _value.createdAt
+ : createdAt // ignore: cast_nullable_to_non_nullable
+ as DateTime,
+ sendUserId: freezed == sendUserId
+ ? _value.sendUserId
+ : sendUserId // ignore: cast_nullable_to_non_nullable
+ as String?,
+ sendUserEmail: freezed == sendUserEmail
+ ? _value.sendUserEmail
+ : sendUserEmail // ignore: cast_nullable_to_non_nullable
+ as String?,
+ sendUserName: freezed == sendUserName
+ ? _value.sendUserName
+ : sendUserName // ignore: cast_nullable_to_non_nullable
+ as String?,
+ leadId: freezed == leadId
+ ? _value.leadId
+ : leadId // ignore: cast_nullable_to_non_nullable
+ as String?,
+ leadFirstName: freezed == leadFirstName
+ ? _value.leadFirstName
+ : leadFirstName // ignore: cast_nullable_to_non_nullable
+ as String?,
+ leadLastName: freezed == leadLastName
+ ? _value.leadLastName
+ : leadLastName // ignore: cast_nullable_to_non_nullable
+ as String?,
+ leadEmail: freezed == leadEmail
+ ? _value.leadEmail
+ : leadEmail // ignore: cast_nullable_to_non_nullable
+ as String?,
+ campaignId: freezed == campaignId
+ ? _value.campaignId
+ : campaignId // ignore: cast_nullable_to_non_nullable
+ as String?,
+ campaignName: freezed == campaignName
+ ? _value.campaignName
+ : campaignName // ignore: cast_nullable_to_non_nullable
+ as String?,
+ listId: freezed == listId
+ ? _value.listId
+ : listId // ignore: cast_nullable_to_non_nullable
+ as String?,
+ sequenceId: freezed == sequenceId
+ ? _value.sequenceId
+ : sequenceId // ignore: cast_nullable_to_non_nullable
+ as String?,
+ sequenceStep: freezed == sequenceStep
+ ? _value.sequenceStep
+ : sequenceStep // ignore: cast_nullable_to_non_nullable
+ as int?,
+ emailTemplateId: freezed == emailTemplateId
+ ? _value.emailTemplateId
+ : emailTemplateId // ignore: cast_nullable_to_non_nullable
+ as String?,
+ emailTemplateName: freezed == emailTemplateName
+ ? _value.emailTemplateName
+ : emailTemplateName // ignore: cast_nullable_to_non_nullable
+ as String?,
+ emailId: freezed == emailId
+ ? _value.emailId
+ : emailId // ignore: cast_nullable_to_non_nullable
+ as String?,
+ ));
+ }
+}
+
+/// @nodoc
+@JsonSerializable()
+class _$ActivityImpl implements _Activity {
+ const _$ActivityImpl(
+ {@JsonKey(name: '_id') required this.id,
+ required this.isFirst,
+ required this.type,
+ required this.teamId,
+ required this.createdAt,
+ this.sendUserId,
+ this.sendUserEmail,
+ this.sendUserName,
+ this.leadId,
+ this.leadFirstName,
+ this.leadLastName,
+ this.leadEmail,
+ this.campaignId,
+ this.campaignName,
+ this.listId,
+ this.sequenceId,
+ this.sequenceStep,
+ this.emailTemplateId,
+ this.emailTemplateName,
+ this.emailId});
+
+ factory _$ActivityImpl.fromJson(Map json) =>
+ _$$ActivityImplFromJson(json);
+
+ @override
+ @JsonKey(name: '_id')
+ final String id;
+ @override
+ final bool isFirst;
+ @override
+ final String type;
+ @override
+ final String teamId;
+ @override
+ final DateTime createdAt;
+ @override
+ final String? sendUserId;
+ @override
+ final String? sendUserEmail;
+ @override
+ final String? sendUserName;
+ @override
+ final String? leadId;
+ @override
+ final String? leadFirstName;
+ @override
+ final String? leadLastName;
+ @override
+ final String? leadEmail;
+ @override
+ final String? campaignId;
+ @override
+ final String? campaignName;
+ @override
+ final String? listId;
+ @override
+ final String? sequenceId;
+ @override
+ final int? sequenceStep;
+ @override
+ final String? emailTemplateId;
+ @override
+ final String? emailTemplateName;
+ @override
+ final String? emailId;
+
+ @override
+ String toString() {
+ return 'Activity(id: $id, isFirst: $isFirst, type: $type, teamId: $teamId, createdAt: $createdAt, sendUserId: $sendUserId, sendUserEmail: $sendUserEmail, sendUserName: $sendUserName, leadId: $leadId, leadFirstName: $leadFirstName, leadLastName: $leadLastName, leadEmail: $leadEmail, campaignId: $campaignId, campaignName: $campaignName, listId: $listId, sequenceId: $sequenceId, sequenceStep: $sequenceStep, emailTemplateId: $emailTemplateId, emailTemplateName: $emailTemplateName, emailId: $emailId)';
+ }
+
+ @override
+ bool operator ==(Object other) {
+ return identical(this, other) ||
+ (other.runtimeType == runtimeType &&
+ other is _$ActivityImpl &&
+ (identical(other.id, id) || other.id == id) &&
+ (identical(other.isFirst, isFirst) || other.isFirst == isFirst) &&
+ (identical(other.type, type) || other.type == type) &&
+ (identical(other.teamId, teamId) || other.teamId == teamId) &&
+ (identical(other.createdAt, createdAt) ||
+ other.createdAt == createdAt) &&
+ (identical(other.sendUserId, sendUserId) ||
+ other.sendUserId == sendUserId) &&
+ (identical(other.sendUserEmail, sendUserEmail) ||
+ other.sendUserEmail == sendUserEmail) &&
+ (identical(other.sendUserName, sendUserName) ||
+ other.sendUserName == sendUserName) &&
+ (identical(other.leadId, leadId) || other.leadId == leadId) &&
+ (identical(other.leadFirstName, leadFirstName) ||
+ other.leadFirstName == leadFirstName) &&
+ (identical(other.leadLastName, leadLastName) ||
+ other.leadLastName == leadLastName) &&
+ (identical(other.leadEmail, leadEmail) ||
+ other.leadEmail == leadEmail) &&
+ (identical(other.campaignId, campaignId) ||
+ other.campaignId == campaignId) &&
+ (identical(other.campaignName, campaignName) ||
+ other.campaignName == campaignName) &&
+ (identical(other.listId, listId) || other.listId == listId) &&
+ (identical(other.sequenceId, sequenceId) ||
+ other.sequenceId == sequenceId) &&
+ (identical(other.sequenceStep, sequenceStep) ||
+ other.sequenceStep == sequenceStep) &&
+ (identical(other.emailTemplateId, emailTemplateId) ||
+ other.emailTemplateId == emailTemplateId) &&
+ (identical(other.emailTemplateName, emailTemplateName) ||
+ other.emailTemplateName == emailTemplateName) &&
+ (identical(other.emailId, emailId) || other.emailId == emailId));
+ }
+
+ @JsonKey(ignore: true)
+ @override
+ int get hashCode => Object.hashAll([
+ runtimeType,
+ id,
+ isFirst,
+ type,
+ teamId,
+ createdAt,
+ sendUserId,
+ sendUserEmail,
+ sendUserName,
+ leadId,
+ leadFirstName,
+ leadLastName,
+ leadEmail,
+ campaignId,
+ campaignName,
+ listId,
+ sequenceId,
+ sequenceStep,
+ emailTemplateId,
+ emailTemplateName,
+ emailId
+ ]);
+
+ @JsonKey(ignore: true)
+ @override
+ @pragma('vm:prefer-inline')
+ _$$ActivityImplCopyWith<_$ActivityImpl> get copyWith =>
+ __$$ActivityImplCopyWithImpl<_$ActivityImpl>(this, _$identity);
+
+ @override
+ Map toJson() {
+ return _$$ActivityImplToJson(
+ this,
+ );
+ }
+}
+
+abstract class _Activity implements Activity {
+ const factory _Activity(
+ {@JsonKey(name: '_id') required final String id,
+ required final bool isFirst,
+ required final String type,
+ required final String teamId,
+ required final DateTime createdAt,
+ final String? sendUserId,
+ final String? sendUserEmail,
+ final String? sendUserName,
+ final String? leadId,
+ final String? leadFirstName,
+ final String? leadLastName,
+ final String? leadEmail,
+ final String? campaignId,
+ final String? campaignName,
+ final String? listId,
+ final String? sequenceId,
+ final int? sequenceStep,
+ final String? emailTemplateId,
+ final String? emailTemplateName,
+ final String? emailId}) = _$ActivityImpl;
+
+ factory _Activity.fromJson(Map json) =
+ _$ActivityImpl.fromJson;
+
+ @override
+ @JsonKey(name: '_id')
+ String get id;
+ @override
+ bool get isFirst;
+ @override
+ String get type;
+ @override
+ String get teamId;
+ @override
+ DateTime get createdAt;
+ @override
+ String? get sendUserId;
+ @override
+ String? get sendUserEmail;
+ @override
+ String? get sendUserName;
+ @override
+ String? get leadId;
+ @override
+ String? get leadFirstName;
+ @override
+ String? get leadLastName;
+ @override
+ String? get leadEmail;
+ @override
+ String? get campaignId;
+ @override
+ String? get campaignName;
+ @override
+ String? get listId;
+ @override
+ String? get sequenceId;
+ @override
+ int? get sequenceStep;
+ @override
+ String? get emailTemplateId;
+ @override
+ String? get emailTemplateName;
+ @override
+ String? get emailId;
+ @override
+ @JsonKey(ignore: true)
+ _$$ActivityImplCopyWith<_$ActivityImpl> get copyWith =>
+ throw _privateConstructorUsedError;
+}
diff --git a/lib/src/models/activity.g.dart b/lib/src/models/activity.g.dart
new file mode 100644
index 0000000..5234b2c
--- /dev/null
+++ b/lib/src/models/activity.g.dart
@@ -0,0 +1,55 @@
+// GENERATED CODE - DO NOT MODIFY BY HAND
+
+part of 'activity.dart';
+
+// **************************************************************************
+// JsonSerializableGenerator
+// **************************************************************************
+
+_$ActivityImpl _$$ActivityImplFromJson(Map json) =>
+ _$ActivityImpl(
+ id: json['_id'] as String,
+ isFirst: json['isFirst'] as bool,
+ type: json['type'] as String,
+ teamId: json['teamId'] as String,
+ createdAt: DateTime.parse(json['createdAt'] as String),
+ sendUserId: json['sendUserId'] as String?,
+ sendUserEmail: json['sendUserEmail'] as String?,
+ sendUserName: json['sendUserName'] as String?,
+ leadId: json['leadId'] as String?,
+ leadFirstName: json['leadFirstName'] as String?,
+ leadLastName: json['leadLastName'] as String?,
+ leadEmail: json['leadEmail'] as String?,
+ campaignId: json['campaignId'] as String?,
+ campaignName: json['campaignName'] as String?,
+ listId: json['listId'] as String?,
+ sequenceId: json['sequenceId'] as String?,
+ sequenceStep: json['sequenceStep'] as int?,
+ emailTemplateId: json['emailTemplateId'] as String?,
+ emailTemplateName: json['emailTemplateName'] as String?,
+ emailId: json['emailId'] as String?,
+ );
+
+Map _$$ActivityImplToJson(_$ActivityImpl instance) =>
+ {
+ '_id': instance.id,
+ 'isFirst': instance.isFirst,
+ 'type': instance.type,
+ 'teamId': instance.teamId,
+ 'createdAt': instance.createdAt.toIso8601String(),
+ 'sendUserId': instance.sendUserId,
+ 'sendUserEmail': instance.sendUserEmail,
+ 'sendUserName': instance.sendUserName,
+ 'leadId': instance.leadId,
+ 'leadFirstName': instance.leadFirstName,
+ 'leadLastName': instance.leadLastName,
+ 'leadEmail': instance.leadEmail,
+ 'campaignId': instance.campaignId,
+ 'campaignName': instance.campaignName,
+ 'listId': instance.listId,
+ 'sequenceId': instance.sequenceId,
+ 'sequenceStep': instance.sequenceStep,
+ 'emailTemplateId': instance.emailTemplateId,
+ 'emailTemplateName': instance.emailTemplateName,
+ 'emailId': instance.emailId,
+ };
diff --git a/lib/src/models/campaign.dart b/lib/src/models/campaign.dart
new file mode 100644
index 0000000..173e979
--- /dev/null
+++ b/lib/src/models/campaign.dart
@@ -0,0 +1,19 @@
+import 'package:freezed_annotation/freezed_annotation.dart';
+
+part 'campaign.freezed.dart';
+part 'campaign.g.dart';
+
+/// A campaign model.
+@freezed
+class Campaign with _$Campaign {
+ /// Initializes a campaign.
+ const factory Campaign({
+ @JsonKey(name: '_id') required String id,
+ required String name,
+ List? labels,
+ }) = _Campaign;
+
+ /// Initializes a campaign from JSON.
+ factory Campaign.fromJson(Map json) =>
+ _$CampaignFromJson(json);
+}
diff --git a/lib/src/models/campaign.freezed.dart b/lib/src/models/campaign.freezed.dart
new file mode 100644
index 0000000..4cf90a9
--- /dev/null
+++ b/lib/src/models/campaign.freezed.dart
@@ -0,0 +1,202 @@
+// coverage:ignore-file
+// GENERATED CODE - DO NOT MODIFY BY HAND
+// ignore_for_file: type=lint
+// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
+
+part of 'campaign.dart';
+
+// **************************************************************************
+// FreezedGenerator
+// **************************************************************************
+
+T _$identity(T value) => value;
+
+final _privateConstructorUsedError = UnsupportedError(
+ 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models');
+
+Campaign _$CampaignFromJson(Map json) {
+ return _Campaign.fromJson(json);
+}
+
+/// @nodoc
+mixin _$Campaign {
+ @JsonKey(name: '_id')
+ String get id => throw _privateConstructorUsedError;
+ String get name => throw _privateConstructorUsedError;
+ List? get labels => throw _privateConstructorUsedError;
+
+ Map toJson() => throw _privateConstructorUsedError;
+ @JsonKey(ignore: true)
+ $CampaignCopyWith get copyWith =>
+ throw _privateConstructorUsedError;
+}
+
+/// @nodoc
+abstract class $CampaignCopyWith<$Res> {
+ factory $CampaignCopyWith(Campaign value, $Res Function(Campaign) then) =
+ _$CampaignCopyWithImpl<$Res, Campaign>;
+ @useResult
+ $Res call(
+ {@JsonKey(name: '_id') String id, String name, List? labels});
+}
+
+/// @nodoc
+class _$CampaignCopyWithImpl<$Res, $Val extends Campaign>
+ implements $CampaignCopyWith<$Res> {
+ _$CampaignCopyWithImpl(this._value, this._then);
+
+ // ignore: unused_field
+ final $Val _value;
+ // ignore: unused_field
+ final $Res Function($Val) _then;
+
+ @pragma('vm:prefer-inline')
+ @override
+ $Res call({
+ Object? id = null,
+ Object? name = null,
+ Object? labels = freezed,
+ }) {
+ return _then(_value.copyWith(
+ id: null == id
+ ? _value.id
+ : id // ignore: cast_nullable_to_non_nullable
+ as String,
+ name: null == name
+ ? _value.name
+ : name // ignore: cast_nullable_to_non_nullable
+ as String,
+ labels: freezed == labels
+ ? _value.labels
+ : labels // ignore: cast_nullable_to_non_nullable
+ as List?,
+ ) as $Val);
+ }
+}
+
+/// @nodoc
+abstract class _$$CampaignImplCopyWith<$Res>
+ implements $CampaignCopyWith<$Res> {
+ factory _$$CampaignImplCopyWith(
+ _$CampaignImpl value, $Res Function(_$CampaignImpl) then) =
+ __$$CampaignImplCopyWithImpl<$Res>;
+ @override
+ @useResult
+ $Res call(
+ {@JsonKey(name: '_id') String id, String name, List? labels});
+}
+
+/// @nodoc
+class __$$CampaignImplCopyWithImpl<$Res>
+ extends _$CampaignCopyWithImpl<$Res, _$CampaignImpl>
+ implements _$$CampaignImplCopyWith<$Res> {
+ __$$CampaignImplCopyWithImpl(
+ _$CampaignImpl _value, $Res Function(_$CampaignImpl) _then)
+ : super(_value, _then);
+
+ @pragma('vm:prefer-inline')
+ @override
+ $Res call({
+ Object? id = null,
+ Object? name = null,
+ Object? labels = freezed,
+ }) {
+ return _then(_$CampaignImpl(
+ id: null == id
+ ? _value.id
+ : id // ignore: cast_nullable_to_non_nullable
+ as String,
+ name: null == name
+ ? _value.name
+ : name // ignore: cast_nullable_to_non_nullable
+ as String,
+ labels: freezed == labels
+ ? _value._labels
+ : labels // ignore: cast_nullable_to_non_nullable
+ as List?,
+ ));
+ }
+}
+
+/// @nodoc
+@JsonSerializable()
+class _$CampaignImpl implements _Campaign {
+ const _$CampaignImpl(
+ {@JsonKey(name: '_id') required this.id,
+ required this.name,
+ final List? labels})
+ : _labels = labels;
+
+ factory _$CampaignImpl.fromJson(Map json) =>
+ _$$CampaignImplFromJson(json);
+
+ @override
+ @JsonKey(name: '_id')
+ final String id;
+ @override
+ final String name;
+ final List? _labels;
+ @override
+ List? get labels {
+ final value = _labels;
+ if (value == null) return null;
+ if (_labels is EqualUnmodifiableListView) return _labels;
+ // ignore: implicit_dynamic_type
+ return EqualUnmodifiableListView(value);
+ }
+
+ @override
+ String toString() {
+ return 'Campaign(id: $id, name: $name, labels: $labels)';
+ }
+
+ @override
+ bool operator ==(Object other) {
+ return identical(this, other) ||
+ (other.runtimeType == runtimeType &&
+ other is _$CampaignImpl &&
+ (identical(other.id, id) || other.id == id) &&
+ (identical(other.name, name) || other.name == name) &&
+ const DeepCollectionEquality().equals(other._labels, _labels));
+ }
+
+ @JsonKey(ignore: true)
+ @override
+ int get hashCode => Object.hash(
+ runtimeType, id, name, const DeepCollectionEquality().hash(_labels));
+
+ @JsonKey(ignore: true)
+ @override
+ @pragma('vm:prefer-inline')
+ _$$CampaignImplCopyWith<_$CampaignImpl> get copyWith =>
+ __$$CampaignImplCopyWithImpl<_$CampaignImpl>(this, _$identity);
+
+ @override
+ Map toJson() {
+ return _$$CampaignImplToJson(
+ this,
+ );
+ }
+}
+
+abstract class _Campaign implements Campaign {
+ const factory _Campaign(
+ {@JsonKey(name: '_id') required final String id,
+ required final String name,
+ final List? labels}) = _$CampaignImpl;
+
+ factory _Campaign.fromJson(Map json) =
+ _$CampaignImpl.fromJson;
+
+ @override
+ @JsonKey(name: '_id')
+ String get id;
+ @override
+ String get name;
+ @override
+ List? get labels;
+ @override
+ @JsonKey(ignore: true)
+ _$$CampaignImplCopyWith<_$CampaignImpl> get copyWith =>
+ throw _privateConstructorUsedError;
+}
diff --git a/lib/src/models/campaign.g.dart b/lib/src/models/campaign.g.dart
new file mode 100644
index 0000000..787e33c
--- /dev/null
+++ b/lib/src/models/campaign.g.dart
@@ -0,0 +1,22 @@
+// GENERATED CODE - DO NOT MODIFY BY HAND
+
+part of 'campaign.dart';
+
+// **************************************************************************
+// JsonSerializableGenerator
+// **************************************************************************
+
+_$CampaignImpl _$$CampaignImplFromJson(Map json) =>
+ _$CampaignImpl(
+ id: json['_id'] as String,
+ name: json['name'] as String,
+ labels:
+ (json['labels'] as List?)?.map((e) => e as String).toList(),
+ );
+
+Map _$$CampaignImplToJson(_$CampaignImpl instance) =>
+ {
+ '_id': instance.id,
+ 'name': instance.name,
+ 'labels': instance.labels,
+ };
diff --git a/lib/src/models/export_set_email_result.dart b/lib/src/models/export_set_email_result.dart
new file mode 100644
index 0000000..f791393
--- /dev/null
+++ b/lib/src/models/export_set_email_result.dart
@@ -0,0 +1,43 @@
+import 'package:freezed_annotation/freezed_annotation.dart';
+
+part 'export_set_email_result.freezed.dart';
+part 'export_set_email_result.g.dart';
+
+/// A [ExportSetEmailResult] class.
+@freezed
+class ExportSetEmailResult with _$ExportSetEmailResult {
+ /// Initializes a [ExportSetEmailResult].
+ const factory ExportSetEmailResult({
+ required bool ok,
+ required ExportStatus status,
+ }) = _ExportSetEmailResult;
+
+ /// Initializes a [ExportSetEmailResult] from JSON.
+ factory ExportSetEmailResult.fromJson(Map json) =>
+ _$ExportSetEmailResultFromJson(json);
+}
+
+/// A [ExportStatus] class.
+@freezed
+class ExportStatus with _$ExportStatus {
+ /// Initializes a [ExportStatus].
+ const factory ExportStatus({
+ required String id,
+ required String teamId,
+ required String campaignId,
+ required String campaignName,
+ required String status,
+ required DateTime startedAt,
+ required int progressIndex,
+ required int progressTime,
+ required int progressLastStepDuration,
+ required String progressType,
+ required int progress,
+ required int total,
+ String? email,
+ }) = _ExportStatus;
+
+ /// Initializes a [ExportStatus] from JSON.
+ factory ExportStatus.fromJson(Map json) =>
+ _$ExportStatusFromJson(json);
+}
diff --git a/lib/src/models/export_set_email_result.freezed.dart b/lib/src/models/export_set_email_result.freezed.dart
new file mode 100644
index 0000000..7eab867
--- /dev/null
+++ b/lib/src/models/export_set_email_result.freezed.dart
@@ -0,0 +1,588 @@
+// coverage:ignore-file
+// GENERATED CODE - DO NOT MODIFY BY HAND
+// ignore_for_file: type=lint
+// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
+
+part of 'export_set_email_result.dart';
+
+// **************************************************************************
+// FreezedGenerator
+// **************************************************************************
+
+T _$identity(T value) => value;
+
+final _privateConstructorUsedError = UnsupportedError(
+ 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models');
+
+ExportSetEmailResult _$ExportSetEmailResultFromJson(Map json) {
+ return _ExportSetEmailResult.fromJson(json);
+}
+
+/// @nodoc
+mixin _$ExportSetEmailResult {
+ bool get ok => throw _privateConstructorUsedError;
+ ExportStatus get status => throw _privateConstructorUsedError;
+
+ Map toJson() => throw _privateConstructorUsedError;
+ @JsonKey(ignore: true)
+ $ExportSetEmailResultCopyWith get copyWith =>
+ throw _privateConstructorUsedError;
+}
+
+/// @nodoc
+abstract class $ExportSetEmailResultCopyWith<$Res> {
+ factory $ExportSetEmailResultCopyWith(ExportSetEmailResult value,
+ $Res Function(ExportSetEmailResult) then) =
+ _$ExportSetEmailResultCopyWithImpl<$Res, ExportSetEmailResult>;
+ @useResult
+ $Res call({bool ok, ExportStatus status});
+
+ $ExportStatusCopyWith<$Res> get status;
+}
+
+/// @nodoc
+class _$ExportSetEmailResultCopyWithImpl<$Res,
+ $Val extends ExportSetEmailResult>
+ implements $ExportSetEmailResultCopyWith<$Res> {
+ _$ExportSetEmailResultCopyWithImpl(this._value, this._then);
+
+ // ignore: unused_field
+ final $Val _value;
+ // ignore: unused_field
+ final $Res Function($Val) _then;
+
+ @pragma('vm:prefer-inline')
+ @override
+ $Res call({
+ Object? ok = null,
+ Object? status = null,
+ }) {
+ return _then(_value.copyWith(
+ ok: null == ok
+ ? _value.ok
+ : ok // ignore: cast_nullable_to_non_nullable
+ as bool,
+ status: null == status
+ ? _value.status
+ : status // ignore: cast_nullable_to_non_nullable
+ as ExportStatus,
+ ) as $Val);
+ }
+
+ @override
+ @pragma('vm:prefer-inline')
+ $ExportStatusCopyWith<$Res> get status {
+ return $ExportStatusCopyWith<$Res>(_value.status, (value) {
+ return _then(_value.copyWith(status: value) as $Val);
+ });
+ }
+}
+
+/// @nodoc
+abstract class _$$ExportSetEmailResultImplCopyWith<$Res>
+ implements $ExportSetEmailResultCopyWith<$Res> {
+ factory _$$ExportSetEmailResultImplCopyWith(_$ExportSetEmailResultImpl value,
+ $Res Function(_$ExportSetEmailResultImpl) then) =
+ __$$ExportSetEmailResultImplCopyWithImpl<$Res>;
+ @override
+ @useResult
+ $Res call({bool ok, ExportStatus status});
+
+ @override
+ $ExportStatusCopyWith<$Res> get status;
+}
+
+/// @nodoc
+class __$$ExportSetEmailResultImplCopyWithImpl<$Res>
+ extends _$ExportSetEmailResultCopyWithImpl<$Res, _$ExportSetEmailResultImpl>
+ implements _$$ExportSetEmailResultImplCopyWith<$Res> {
+ __$$ExportSetEmailResultImplCopyWithImpl(_$ExportSetEmailResultImpl _value,
+ $Res Function(_$ExportSetEmailResultImpl) _then)
+ : super(_value, _then);
+
+ @pragma('vm:prefer-inline')
+ @override
+ $Res call({
+ Object? ok = null,
+ Object? status = null,
+ }) {
+ return _then(_$ExportSetEmailResultImpl(
+ ok: null == ok
+ ? _value.ok
+ : ok // ignore: cast_nullable_to_non_nullable
+ as bool,
+ status: null == status
+ ? _value.status
+ : status // ignore: cast_nullable_to_non_nullable
+ as ExportStatus,
+ ));
+ }
+}
+
+/// @nodoc
+@JsonSerializable()
+class _$ExportSetEmailResultImpl implements _ExportSetEmailResult {
+ const _$ExportSetEmailResultImpl({required this.ok, required this.status});
+
+ factory _$ExportSetEmailResultImpl.fromJson(Map json) =>
+ _$$ExportSetEmailResultImplFromJson(json);
+
+ @override
+ final bool ok;
+ @override
+ final ExportStatus status;
+
+ @override
+ String toString() {
+ return 'ExportSetEmailResult(ok: $ok, status: $status)';
+ }
+
+ @override
+ bool operator ==(Object other) {
+ return identical(this, other) ||
+ (other.runtimeType == runtimeType &&
+ other is _$ExportSetEmailResultImpl &&
+ (identical(other.ok, ok) || other.ok == ok) &&
+ (identical(other.status, status) || other.status == status));
+ }
+
+ @JsonKey(ignore: true)
+ @override
+ int get hashCode => Object.hash(runtimeType, ok, status);
+
+ @JsonKey(ignore: true)
+ @override
+ @pragma('vm:prefer-inline')
+ _$$ExportSetEmailResultImplCopyWith<_$ExportSetEmailResultImpl>
+ get copyWith =>
+ __$$ExportSetEmailResultImplCopyWithImpl<_$ExportSetEmailResultImpl>(
+ this, _$identity);
+
+ @override
+ Map toJson() {
+ return _$$ExportSetEmailResultImplToJson(
+ this,
+ );
+ }
+}
+
+abstract class _ExportSetEmailResult implements ExportSetEmailResult {
+ const factory _ExportSetEmailResult(
+ {required final bool ok,
+ required final ExportStatus status}) = _$ExportSetEmailResultImpl;
+
+ factory _ExportSetEmailResult.fromJson(Map json) =
+ _$ExportSetEmailResultImpl.fromJson;
+
+ @override
+ bool get ok;
+ @override
+ ExportStatus get status;
+ @override
+ @JsonKey(ignore: true)
+ _$$ExportSetEmailResultImplCopyWith<_$ExportSetEmailResultImpl>
+ get copyWith => throw _privateConstructorUsedError;
+}
+
+ExportStatus _$ExportStatusFromJson(Map json) {
+ return _ExportStatus.fromJson(json);
+}
+
+/// @nodoc
+mixin _$ExportStatus {
+ String get id => throw _privateConstructorUsedError;
+ String get teamId => throw _privateConstructorUsedError;
+ String get campaignId => throw _privateConstructorUsedError;
+ String get campaignName => throw _privateConstructorUsedError;
+ String get status => throw _privateConstructorUsedError;
+ DateTime get startedAt => throw _privateConstructorUsedError;
+ int get progressIndex => throw _privateConstructorUsedError;
+ int get progressTime => throw _privateConstructorUsedError;
+ int get progressLastStepDuration => throw _privateConstructorUsedError;
+ String get progressType => throw _privateConstructorUsedError;
+ int get progress => throw _privateConstructorUsedError;
+ int get total => throw _privateConstructorUsedError;
+ String? get email => throw _privateConstructorUsedError;
+
+ Map toJson() => throw _privateConstructorUsedError;
+ @JsonKey(ignore: true)
+ $ExportStatusCopyWith get copyWith =>
+ throw _privateConstructorUsedError;
+}
+
+/// @nodoc
+abstract class $ExportStatusCopyWith<$Res> {
+ factory $ExportStatusCopyWith(
+ ExportStatus value, $Res Function(ExportStatus) then) =
+ _$ExportStatusCopyWithImpl<$Res, ExportStatus>;
+ @useResult
+ $Res call(
+ {String id,
+ String teamId,
+ String campaignId,
+ String campaignName,
+ String status,
+ DateTime startedAt,
+ int progressIndex,
+ int progressTime,
+ int progressLastStepDuration,
+ String progressType,
+ int progress,
+ int total,
+ String? email});
+}
+
+/// @nodoc
+class _$ExportStatusCopyWithImpl<$Res, $Val extends ExportStatus>
+ implements $ExportStatusCopyWith<$Res> {
+ _$ExportStatusCopyWithImpl(this._value, this._then);
+
+ // ignore: unused_field
+ final $Val _value;
+ // ignore: unused_field
+ final $Res Function($Val) _then;
+
+ @pragma('vm:prefer-inline')
+ @override
+ $Res call({
+ Object? id = null,
+ Object? teamId = null,
+ Object? campaignId = null,
+ Object? campaignName = null,
+ Object? status = null,
+ Object? startedAt = null,
+ Object? progressIndex = null,
+ Object? progressTime = null,
+ Object? progressLastStepDuration = null,
+ Object? progressType = null,
+ Object? progress = null,
+ Object? total = null,
+ Object? email = freezed,
+ }) {
+ return _then(_value.copyWith(
+ id: null == id
+ ? _value.id
+ : id // ignore: cast_nullable_to_non_nullable
+ as String,
+ teamId: null == teamId
+ ? _value.teamId
+ : teamId // ignore: cast_nullable_to_non_nullable
+ as String,
+ campaignId: null == campaignId
+ ? _value.campaignId
+ : campaignId // ignore: cast_nullable_to_non_nullable
+ as String,
+ campaignName: null == campaignName
+ ? _value.campaignName
+ : campaignName // ignore: cast_nullable_to_non_nullable
+ as String,
+ status: null == status
+ ? _value.status
+ : status // ignore: cast_nullable_to_non_nullable
+ as String,
+ startedAt: null == startedAt
+ ? _value.startedAt
+ : startedAt // ignore: cast_nullable_to_non_nullable
+ as DateTime,
+ progressIndex: null == progressIndex
+ ? _value.progressIndex
+ : progressIndex // ignore: cast_nullable_to_non_nullable
+ as int,
+ progressTime: null == progressTime
+ ? _value.progressTime
+ : progressTime // ignore: cast_nullable_to_non_nullable
+ as int,
+ progressLastStepDuration: null == progressLastStepDuration
+ ? _value.progressLastStepDuration
+ : progressLastStepDuration // ignore: cast_nullable_to_non_nullable
+ as int,
+ progressType: null == progressType
+ ? _value.progressType
+ : progressType // ignore: cast_nullable_to_non_nullable
+ as String,
+ progress: null == progress
+ ? _value.progress
+ : progress // ignore: cast_nullable_to_non_nullable
+ as int,
+ total: null == total
+ ? _value.total
+ : total // ignore: cast_nullable_to_non_nullable
+ as int,
+ email: freezed == email
+ ? _value.email
+ : email // ignore: cast_nullable_to_non_nullable
+ as String?,
+ ) as $Val);
+ }
+}
+
+/// @nodoc
+abstract class _$$ExportStatusImplCopyWith<$Res>
+ implements $ExportStatusCopyWith<$Res> {
+ factory _$$ExportStatusImplCopyWith(
+ _$ExportStatusImpl value, $Res Function(_$ExportStatusImpl) then) =
+ __$$ExportStatusImplCopyWithImpl<$Res>;
+ @override
+ @useResult
+ $Res call(
+ {String id,
+ String teamId,
+ String campaignId,
+ String campaignName,
+ String status,
+ DateTime startedAt,
+ int progressIndex,
+ int progressTime,
+ int progressLastStepDuration,
+ String progressType,
+ int progress,
+ int total,
+ String? email});
+}
+
+/// @nodoc
+class __$$ExportStatusImplCopyWithImpl<$Res>
+ extends _$ExportStatusCopyWithImpl<$Res, _$ExportStatusImpl>
+ implements _$$ExportStatusImplCopyWith<$Res> {
+ __$$ExportStatusImplCopyWithImpl(
+ _$ExportStatusImpl _value, $Res Function(_$ExportStatusImpl) _then)
+ : super(_value, _then);
+
+ @pragma('vm:prefer-inline')
+ @override
+ $Res call({
+ Object? id = null,
+ Object? teamId = null,
+ Object? campaignId = null,
+ Object? campaignName = null,
+ Object? status = null,
+ Object? startedAt = null,
+ Object? progressIndex = null,
+ Object? progressTime = null,
+ Object? progressLastStepDuration = null,
+ Object? progressType = null,
+ Object? progress = null,
+ Object? total = null,
+ Object? email = freezed,
+ }) {
+ return _then(_$ExportStatusImpl(
+ id: null == id
+ ? _value.id
+ : id // ignore: cast_nullable_to_non_nullable
+ as String,
+ teamId: null == teamId
+ ? _value.teamId
+ : teamId // ignore: cast_nullable_to_non_nullable
+ as String,
+ campaignId: null == campaignId
+ ? _value.campaignId
+ : campaignId // ignore: cast_nullable_to_non_nullable
+ as String,
+ campaignName: null == campaignName
+ ? _value.campaignName
+ : campaignName // ignore: cast_nullable_to_non_nullable
+ as String,
+ status: null == status
+ ? _value.status
+ : status // ignore: cast_nullable_to_non_nullable
+ as String,
+ startedAt: null == startedAt
+ ? _value.startedAt
+ : startedAt // ignore: cast_nullable_to_non_nullable
+ as DateTime,
+ progressIndex: null == progressIndex
+ ? _value.progressIndex
+ : progressIndex // ignore: cast_nullable_to_non_nullable
+ as int,
+ progressTime: null == progressTime
+ ? _value.progressTime
+ : progressTime // ignore: cast_nullable_to_non_nullable
+ as int,
+ progressLastStepDuration: null == progressLastStepDuration
+ ? _value.progressLastStepDuration
+ : progressLastStepDuration // ignore: cast_nullable_to_non_nullable
+ as int,
+ progressType: null == progressType
+ ? _value.progressType
+ : progressType // ignore: cast_nullable_to_non_nullable
+ as String,
+ progress: null == progress
+ ? _value.progress
+ : progress // ignore: cast_nullable_to_non_nullable
+ as int,
+ total: null == total
+ ? _value.total
+ : total // ignore: cast_nullable_to_non_nullable
+ as int,
+ email: freezed == email
+ ? _value.email
+ : email // ignore: cast_nullable_to_non_nullable
+ as String?,
+ ));
+ }
+}
+
+/// @nodoc
+@JsonSerializable()
+class _$ExportStatusImpl implements _ExportStatus {
+ const _$ExportStatusImpl(
+ {required this.id,
+ required this.teamId,
+ required this.campaignId,
+ required this.campaignName,
+ required this.status,
+ required this.startedAt,
+ required this.progressIndex,
+ required this.progressTime,
+ required this.progressLastStepDuration,
+ required this.progressType,
+ required this.progress,
+ required this.total,
+ this.email});
+
+ factory _$ExportStatusImpl.fromJson(Map json) =>
+ _$$ExportStatusImplFromJson(json);
+
+ @override
+ final String id;
+ @override
+ final String teamId;
+ @override
+ final String campaignId;
+ @override
+ final String campaignName;
+ @override
+ final String status;
+ @override
+ final DateTime startedAt;
+ @override
+ final int progressIndex;
+ @override
+ final int progressTime;
+ @override
+ final int progressLastStepDuration;
+ @override
+ final String progressType;
+ @override
+ final int progress;
+ @override
+ final int total;
+ @override
+ final String? email;
+
+ @override
+ String toString() {
+ return 'ExportStatus(id: $id, teamId: $teamId, campaignId: $campaignId, campaignName: $campaignName, status: $status, startedAt: $startedAt, progressIndex: $progressIndex, progressTime: $progressTime, progressLastStepDuration: $progressLastStepDuration, progressType: $progressType, progress: $progress, total: $total, email: $email)';
+ }
+
+ @override
+ bool operator ==(Object other) {
+ return identical(this, other) ||
+ (other.runtimeType == runtimeType &&
+ other is _$ExportStatusImpl &&
+ (identical(other.id, id) || other.id == id) &&
+ (identical(other.teamId, teamId) || other.teamId == teamId) &&
+ (identical(other.campaignId, campaignId) ||
+ other.campaignId == campaignId) &&
+ (identical(other.campaignName, campaignName) ||
+ other.campaignName == campaignName) &&
+ (identical(other.status, status) || other.status == status) &&
+ (identical(other.startedAt, startedAt) ||
+ other.startedAt == startedAt) &&
+ (identical(other.progressIndex, progressIndex) ||
+ other.progressIndex == progressIndex) &&
+ (identical(other.progressTime, progressTime) ||
+ other.progressTime == progressTime) &&
+ (identical(
+ other.progressLastStepDuration, progressLastStepDuration) ||
+ other.progressLastStepDuration == progressLastStepDuration) &&
+ (identical(other.progressType, progressType) ||
+ other.progressType == progressType) &&
+ (identical(other.progress, progress) ||
+ other.progress == progress) &&
+ (identical(other.total, total) || other.total == total) &&
+ (identical(other.email, email) || other.email == email));
+ }
+
+ @JsonKey(ignore: true)
+ @override
+ int get hashCode => Object.hash(
+ runtimeType,
+ id,
+ teamId,
+ campaignId,
+ campaignName,
+ status,
+ startedAt,
+ progressIndex,
+ progressTime,
+ progressLastStepDuration,
+ progressType,
+ progress,
+ total,
+ email);
+
+ @JsonKey(ignore: true)
+ @override
+ @pragma('vm:prefer-inline')
+ _$$ExportStatusImplCopyWith<_$ExportStatusImpl> get copyWith =>
+ __$$ExportStatusImplCopyWithImpl<_$ExportStatusImpl>(this, _$identity);
+
+ @override
+ Map toJson() {
+ return _$$ExportStatusImplToJson(
+ this,
+ );
+ }
+}
+
+abstract class _ExportStatus implements ExportStatus {
+ const factory _ExportStatus(
+ {required final String id,
+ required final String teamId,
+ required final String campaignId,
+ required final String campaignName,
+ required final String status,
+ required final DateTime startedAt,
+ required final int progressIndex,
+ required final int progressTime,
+ required final int progressLastStepDuration,
+ required final String progressType,
+ required final int progress,
+ required final int total,
+ final String? email}) = _$ExportStatusImpl;
+
+ factory _ExportStatus.fromJson(Map json) =
+ _$ExportStatusImpl.fromJson;
+
+ @override
+ String get id;
+ @override
+ String get teamId;
+ @override
+ String get campaignId;
+ @override
+ String get campaignName;
+ @override
+ String get status;
+ @override
+ DateTime get startedAt;
+ @override
+ int get progressIndex;
+ @override
+ int get progressTime;
+ @override
+ int get progressLastStepDuration;
+ @override
+ String get progressType;
+ @override
+ int get progress;
+ @override
+ int get total;
+ @override
+ String? get email;
+ @override
+ @JsonKey(ignore: true)
+ _$$ExportStatusImplCopyWith<_$ExportStatusImpl> get copyWith =>
+ throw _privateConstructorUsedError;
+}
diff --git a/lib/src/models/export_set_email_result.g.dart b/lib/src/models/export_set_email_result.g.dart
new file mode 100644
index 0000000..a9d4e6f
--- /dev/null
+++ b/lib/src/models/export_set_email_result.g.dart
@@ -0,0 +1,55 @@
+// GENERATED CODE - DO NOT MODIFY BY HAND
+
+part of 'export_set_email_result.dart';
+
+// **************************************************************************
+// JsonSerializableGenerator
+// **************************************************************************
+
+_$ExportSetEmailResultImpl _$$ExportSetEmailResultImplFromJson(
+ Map json) =>
+ _$ExportSetEmailResultImpl(
+ ok: json['ok'] as bool,
+ status: ExportStatus.fromJson(json['status'] as Map),
+ );
+
+Map _$$ExportSetEmailResultImplToJson(
+ _$ExportSetEmailResultImpl instance) =>
+ {
+ 'ok': instance.ok,
+ 'status': instance.status,
+ };
+
+_$ExportStatusImpl _$$ExportStatusImplFromJson(Map json) =>
+ _$ExportStatusImpl(
+ id: json['id'] as String,
+ teamId: json['teamId'] as String,
+ campaignId: json['campaignId'] as String,
+ campaignName: json['campaignName'] as String,
+ status: json['status'] as String,
+ startedAt: DateTime.parse(json['startedAt'] as String),
+ progressIndex: json['progressIndex'] as int,
+ progressTime: json['progressTime'] as int,
+ progressLastStepDuration: json['progressLastStepDuration'] as int,
+ progressType: json['progressType'] as String,
+ progress: json['progress'] as int,
+ total: json['total'] as int,
+ email: json['email'] as String?,
+ );
+
+Map _$$ExportStatusImplToJson(_$ExportStatusImpl instance) =>
+ {
+ 'id': instance.id,
+ 'teamId': instance.teamId,
+ 'campaignId': instance.campaignId,
+ 'campaignName': instance.campaignName,
+ 'status': instance.status,
+ 'startedAt': instance.startedAt.toIso8601String(),
+ 'progressIndex': instance.progressIndex,
+ 'progressTime': instance.progressTime,
+ 'progressLastStepDuration': instance.progressLastStepDuration,
+ 'progressType': instance.progressType,
+ 'progress': instance.progress,
+ 'total': instance.total,
+ 'email': instance.email,
+ };
diff --git a/lib/src/models/export_start_result.dart b/lib/src/models/export_start_result.dart
new file mode 100644
index 0000000..e9b8253
--- /dev/null
+++ b/lib/src/models/export_start_result.dart
@@ -0,0 +1,28 @@
+import 'package:freezed_annotation/freezed_annotation.dart';
+
+part 'export_start_result.freezed.dart';
+part 'export_start_result.g.dart';
+
+/// A [ExportStartResult] class.
+@freezed
+class ExportStartResult with _$ExportStartResult {
+ /// Initializes a [ExportStartResult].
+ const factory ExportStartResult({
+ required String id,
+ required String teamId,
+ required String campaignId,
+ required String campaignName,
+ required String status,
+ required DateTime startedAt,
+ required int progressIndex,
+ required int progressTime,
+ required int progressLastStepDuration,
+ required String progressType,
+ required int progress,
+ required int total,
+ }) = _ExportStartResult;
+
+ /// Initializes a [ExportStartResult] from JSON.
+ factory ExportStartResult.fromJson(Map json) =>
+ _$ExportStartResultFromJson(json);
+}
diff --git a/lib/src/models/export_start_result.freezed.dart b/lib/src/models/export_start_result.freezed.dart
new file mode 100644
index 0000000..79110d2
--- /dev/null
+++ b/lib/src/models/export_start_result.freezed.dart
@@ -0,0 +1,398 @@
+// coverage:ignore-file
+// GENERATED CODE - DO NOT MODIFY BY HAND
+// ignore_for_file: type=lint
+// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
+
+part of 'export_start_result.dart';
+
+// **************************************************************************
+// FreezedGenerator
+// **************************************************************************
+
+T _$identity(T value) => value;
+
+final _privateConstructorUsedError = UnsupportedError(
+ 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models');
+
+ExportStartResult _$ExportStartResultFromJson(Map json) {
+ return _ExportStartResult.fromJson(json);
+}
+
+/// @nodoc
+mixin _$ExportStartResult {
+ String get id => throw _privateConstructorUsedError;
+ String get teamId => throw _privateConstructorUsedError;
+ String get campaignId => throw _privateConstructorUsedError;
+ String get campaignName => throw _privateConstructorUsedError;
+ String get status => throw _privateConstructorUsedError;
+ DateTime get startedAt => throw _privateConstructorUsedError;
+ int get progressIndex => throw _privateConstructorUsedError;
+ int get progressTime => throw _privateConstructorUsedError;
+ int get progressLastStepDuration => throw _privateConstructorUsedError;
+ String get progressType => throw _privateConstructorUsedError;
+ int get progress => throw _privateConstructorUsedError;
+ int get total => throw _privateConstructorUsedError;
+
+ Map toJson() => throw _privateConstructorUsedError;
+ @JsonKey(ignore: true)
+ $ExportStartResultCopyWith get copyWith =>
+ throw _privateConstructorUsedError;
+}
+
+/// @nodoc
+abstract class $ExportStartResultCopyWith<$Res> {
+ factory $ExportStartResultCopyWith(
+ ExportStartResult value, $Res Function(ExportStartResult) then) =
+ _$ExportStartResultCopyWithImpl<$Res, ExportStartResult>;
+ @useResult
+ $Res call(
+ {String id,
+ String teamId,
+ String campaignId,
+ String campaignName,
+ String status,
+ DateTime startedAt,
+ int progressIndex,
+ int progressTime,
+ int progressLastStepDuration,
+ String progressType,
+ int progress,
+ int total});
+}
+
+/// @nodoc
+class _$ExportStartResultCopyWithImpl<$Res, $Val extends ExportStartResult>
+ implements $ExportStartResultCopyWith<$Res> {
+ _$ExportStartResultCopyWithImpl(this._value, this._then);
+
+ // ignore: unused_field
+ final $Val _value;
+ // ignore: unused_field
+ final $Res Function($Val) _then;
+
+ @pragma('vm:prefer-inline')
+ @override
+ $Res call({
+ Object? id = null,
+ Object? teamId = null,
+ Object? campaignId = null,
+ Object? campaignName = null,
+ Object? status = null,
+ Object? startedAt = null,
+ Object? progressIndex = null,
+ Object? progressTime = null,
+ Object? progressLastStepDuration = null,
+ Object? progressType = null,
+ Object? progress = null,
+ Object? total = null,
+ }) {
+ return _then(_value.copyWith(
+ id: null == id
+ ? _value.id
+ : id // ignore: cast_nullable_to_non_nullable
+ as String,
+ teamId: null == teamId
+ ? _value.teamId
+ : teamId // ignore: cast_nullable_to_non_nullable
+ as String,
+ campaignId: null == campaignId
+ ? _value.campaignId
+ : campaignId // ignore: cast_nullable_to_non_nullable
+ as String,
+ campaignName: null == campaignName
+ ? _value.campaignName
+ : campaignName // ignore: cast_nullable_to_non_nullable
+ as String,
+ status: null == status
+ ? _value.status
+ : status // ignore: cast_nullable_to_non_nullable
+ as String,
+ startedAt: null == startedAt
+ ? _value.startedAt
+ : startedAt // ignore: cast_nullable_to_non_nullable
+ as DateTime,
+ progressIndex: null == progressIndex
+ ? _value.progressIndex
+ : progressIndex // ignore: cast_nullable_to_non_nullable
+ as int,
+ progressTime: null == progressTime
+ ? _value.progressTime
+ : progressTime // ignore: cast_nullable_to_non_nullable
+ as int,
+ progressLastStepDuration: null == progressLastStepDuration
+ ? _value.progressLastStepDuration
+ : progressLastStepDuration // ignore: cast_nullable_to_non_nullable
+ as int,
+ progressType: null == progressType
+ ? _value.progressType
+ : progressType // ignore: cast_nullable_to_non_nullable
+ as String,
+ progress: null == progress
+ ? _value.progress
+ : progress // ignore: cast_nullable_to_non_nullable
+ as int,
+ total: null == total
+ ? _value.total
+ : total // ignore: cast_nullable_to_non_nullable
+ as int,
+ ) as $Val);
+ }
+}
+
+/// @nodoc
+abstract class _$$ExportStartResultImplCopyWith<$Res>
+ implements $ExportStartResultCopyWith<$Res> {
+ factory _$$ExportStartResultImplCopyWith(_$ExportStartResultImpl value,
+ $Res Function(_$ExportStartResultImpl) then) =
+ __$$ExportStartResultImplCopyWithImpl<$Res>;
+ @override
+ @useResult
+ $Res call(
+ {String id,
+ String teamId,
+ String campaignId,
+ String campaignName,
+ String status,
+ DateTime startedAt,
+ int progressIndex,
+ int progressTime,
+ int progressLastStepDuration,
+ String progressType,
+ int progress,
+ int total});
+}
+
+/// @nodoc
+class __$$ExportStartResultImplCopyWithImpl<$Res>
+ extends _$ExportStartResultCopyWithImpl<$Res, _$ExportStartResultImpl>
+ implements _$$ExportStartResultImplCopyWith<$Res> {
+ __$$ExportStartResultImplCopyWithImpl(_$ExportStartResultImpl _value,
+ $Res Function(_$ExportStartResultImpl) _then)
+ : super(_value, _then);
+
+ @pragma('vm:prefer-inline')
+ @override
+ $Res call({
+ Object? id = null,
+ Object? teamId = null,
+ Object? campaignId = null,
+ Object? campaignName = null,
+ Object? status = null,
+ Object? startedAt = null,
+ Object? progressIndex = null,
+ Object? progressTime = null,
+ Object? progressLastStepDuration = null,
+ Object? progressType = null,
+ Object? progress = null,
+ Object? total = null,
+ }) {
+ return _then(_$ExportStartResultImpl(
+ id: null == id
+ ? _value.id
+ : id // ignore: cast_nullable_to_non_nullable
+ as String,
+ teamId: null == teamId
+ ? _value.teamId
+ : teamId // ignore: cast_nullable_to_non_nullable
+ as String,
+ campaignId: null == campaignId
+ ? _value.campaignId
+ : campaignId // ignore: cast_nullable_to_non_nullable
+ as String,
+ campaignName: null == campaignName
+ ? _value.campaignName
+ : campaignName // ignore: cast_nullable_to_non_nullable
+ as String,
+ status: null == status
+ ? _value.status
+ : status // ignore: cast_nullable_to_non_nullable
+ as String,
+ startedAt: null == startedAt
+ ? _value.startedAt
+ : startedAt // ignore: cast_nullable_to_non_nullable
+ as DateTime,
+ progressIndex: null == progressIndex
+ ? _value.progressIndex
+ : progressIndex // ignore: cast_nullable_to_non_nullable
+ as int,
+ progressTime: null == progressTime
+ ? _value.progressTime
+ : progressTime // ignore: cast_nullable_to_non_nullable
+ as int,
+ progressLastStepDuration: null == progressLastStepDuration
+ ? _value.progressLastStepDuration
+ : progressLastStepDuration // ignore: cast_nullable_to_non_nullable
+ as int,
+ progressType: null == progressType
+ ? _value.progressType
+ : progressType // ignore: cast_nullable_to_non_nullable
+ as String,
+ progress: null == progress
+ ? _value.progress
+ : progress // ignore: cast_nullable_to_non_nullable
+ as int,
+ total: null == total
+ ? _value.total
+ : total // ignore: cast_nullable_to_non_nullable
+ as int,
+ ));
+ }
+}
+
+/// @nodoc
+@JsonSerializable()
+class _$ExportStartResultImpl implements _ExportStartResult {
+ const _$ExportStartResultImpl(
+ {required this.id,
+ required this.teamId,
+ required this.campaignId,
+ required this.campaignName,
+ required this.status,
+ required this.startedAt,
+ required this.progressIndex,
+ required this.progressTime,
+ required this.progressLastStepDuration,
+ required this.progressType,
+ required this.progress,
+ required this.total});
+
+ factory _$ExportStartResultImpl.fromJson(Map json) =>
+ _$$ExportStartResultImplFromJson(json);
+
+ @override
+ final String id;
+ @override
+ final String teamId;
+ @override
+ final String campaignId;
+ @override
+ final String campaignName;
+ @override
+ final String status;
+ @override
+ final DateTime startedAt;
+ @override
+ final int progressIndex;
+ @override
+ final int progressTime;
+ @override
+ final int progressLastStepDuration;
+ @override
+ final String progressType;
+ @override
+ final int progress;
+ @override
+ final int total;
+
+ @override
+ String toString() {
+ return 'ExportStartResult(id: $id, teamId: $teamId, campaignId: $campaignId, campaignName: $campaignName, status: $status, startedAt: $startedAt, progressIndex: $progressIndex, progressTime: $progressTime, progressLastStepDuration: $progressLastStepDuration, progressType: $progressType, progress: $progress, total: $total)';
+ }
+
+ @override
+ bool operator ==(Object other) {
+ return identical(this, other) ||
+ (other.runtimeType == runtimeType &&
+ other is _$ExportStartResultImpl &&
+ (identical(other.id, id) || other.id == id) &&
+ (identical(other.teamId, teamId) || other.teamId == teamId) &&
+ (identical(other.campaignId, campaignId) ||
+ other.campaignId == campaignId) &&
+ (identical(other.campaignName, campaignName) ||
+ other.campaignName == campaignName) &&
+ (identical(other.status, status) || other.status == status) &&
+ (identical(other.startedAt, startedAt) ||
+ other.startedAt == startedAt) &&
+ (identical(other.progressIndex, progressIndex) ||
+ other.progressIndex == progressIndex) &&
+ (identical(other.progressTime, progressTime) ||
+ other.progressTime == progressTime) &&
+ (identical(
+ other.progressLastStepDuration, progressLastStepDuration) ||
+ other.progressLastStepDuration == progressLastStepDuration) &&
+ (identical(other.progressType, progressType) ||
+ other.progressType == progressType) &&
+ (identical(other.progress, progress) ||
+ other.progress == progress) &&
+ (identical(other.total, total) || other.total == total));
+ }
+
+ @JsonKey(ignore: true)
+ @override
+ int get hashCode => Object.hash(
+ runtimeType,
+ id,
+ teamId,
+ campaignId,
+ campaignName,
+ status,
+ startedAt,
+ progressIndex,
+ progressTime,
+ progressLastStepDuration,
+ progressType,
+ progress,
+ total);
+
+ @JsonKey(ignore: true)
+ @override
+ @pragma('vm:prefer-inline')
+ _$$ExportStartResultImplCopyWith<_$ExportStartResultImpl> get copyWith =>
+ __$$ExportStartResultImplCopyWithImpl<_$ExportStartResultImpl>(
+ this, _$identity);
+
+ @override
+ Map toJson() {
+ return _$$ExportStartResultImplToJson(
+ this,
+ );
+ }
+}
+
+abstract class _ExportStartResult implements ExportStartResult {
+ const factory _ExportStartResult(
+ {required final String id,
+ required final String teamId,
+ required final String campaignId,
+ required final String campaignName,
+ required final String status,
+ required final DateTime startedAt,
+ required final int progressIndex,
+ required final int progressTime,
+ required final int progressLastStepDuration,
+ required final String progressType,
+ required final int progress,
+ required final int total}) = _$ExportStartResultImpl;
+
+ factory _ExportStartResult.fromJson(Map json) =
+ _$ExportStartResultImpl.fromJson;
+
+ @override
+ String get id;
+ @override
+ String get teamId;
+ @override
+ String get campaignId;
+ @override
+ String get campaignName;
+ @override
+ String get status;
+ @override
+ DateTime get startedAt;
+ @override
+ int get progressIndex;
+ @override
+ int get progressTime;
+ @override
+ int get progressLastStepDuration;
+ @override
+ String get progressType;
+ @override
+ int get progress;
+ @override
+ int get total;
+ @override
+ @JsonKey(ignore: true)
+ _$$ExportStartResultImplCopyWith<_$ExportStartResultImpl> get copyWith =>
+ throw _privateConstructorUsedError;
+}
diff --git a/lib/src/models/export_start_result.g.dart b/lib/src/models/export_start_result.g.dart
new file mode 100644
index 0000000..0493ca7
--- /dev/null
+++ b/lib/src/models/export_start_result.g.dart
@@ -0,0 +1,41 @@
+// GENERATED CODE - DO NOT MODIFY BY HAND
+
+part of 'export_start_result.dart';
+
+// **************************************************************************
+// JsonSerializableGenerator
+// **************************************************************************
+
+_$ExportStartResultImpl _$$ExportStartResultImplFromJson(
+ Map json) =>
+ _$ExportStartResultImpl(
+ id: json['id'] as String,
+ teamId: json['teamId'] as String,
+ campaignId: json['campaignId'] as String,
+ campaignName: json['campaignName'] as String,
+ status: json['status'] as String,
+ startedAt: DateTime.parse(json['startedAt'] as String),
+ progressIndex: json['progressIndex'] as int,
+ progressTime: json['progressTime'] as int,
+ progressLastStepDuration: json['progressLastStepDuration'] as int,
+ progressType: json['progressType'] as String,
+ progress: json['progress'] as int,
+ total: json['total'] as int,
+ );
+
+Map _$$ExportStartResultImplToJson(
+ _$ExportStartResultImpl instance) =>
+ {
+ 'id': instance.id,
+ 'teamId': instance.teamId,
+ 'campaignId': instance.campaignId,
+ 'campaignName': instance.campaignName,
+ 'status': instance.status,
+ 'startedAt': instance.startedAt.toIso8601String(),
+ 'progressIndex': instance.progressIndex,
+ 'progressTime': instance.progressTime,
+ 'progressLastStepDuration': instance.progressLastStepDuration,
+ 'progressType': instance.progressType,
+ 'progress': instance.progress,
+ 'total': instance.total,
+ };
diff --git a/lib/src/models/export_status_result.dart b/lib/src/models/export_status_result.dart
new file mode 100644
index 0000000..48a91d0
--- /dev/null
+++ b/lib/src/models/export_status_result.dart
@@ -0,0 +1,19 @@
+import 'package:freezed_annotation/freezed_annotation.dart';
+import 'package:lemlist_sdk/src/models/models.dart';
+
+part 'export_status_result.freezed.dart';
+part 'export_status_result.g.dart';
+
+/// A [ExportStatusResult] class.
+@freezed
+class ExportStatusResult with _$ExportStatusResult {
+ /// Initializes a [ExportStatusResult].
+ const factory ExportStatusResult({
+ required bool ok,
+ required ExportStatus status,
+ }) = _ExportStatusResult;
+
+ /// Initializes a [ExportStatusResult] from JSON.
+ factory ExportStatusResult.fromJson(Map json) =>
+ _$ExportStatusResultFromJson(json);
+}
diff --git a/lib/src/models/export_status_result.freezed.dart b/lib/src/models/export_status_result.freezed.dart
new file mode 100644
index 0000000..fbacd1a
--- /dev/null
+++ b/lib/src/models/export_status_result.freezed.dart
@@ -0,0 +1,183 @@
+// coverage:ignore-file
+// GENERATED CODE - DO NOT MODIFY BY HAND
+// ignore_for_file: type=lint
+// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
+
+part of 'export_status_result.dart';
+
+// **************************************************************************
+// FreezedGenerator
+// **************************************************************************
+
+T _$identity(T value) => value;
+
+final _privateConstructorUsedError = UnsupportedError(
+ 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models');
+
+ExportStatusResult _$ExportStatusResultFromJson(Map json) {
+ return _ExportStatusResult.fromJson(json);
+}
+
+/// @nodoc
+mixin _$ExportStatusResult {
+ bool get ok => throw _privateConstructorUsedError;
+ ExportStatus get status => throw _privateConstructorUsedError;
+
+ Map toJson() => throw _privateConstructorUsedError;
+ @JsonKey(ignore: true)
+ $ExportStatusResultCopyWith get copyWith =>
+ throw _privateConstructorUsedError;
+}
+
+/// @nodoc
+abstract class $ExportStatusResultCopyWith<$Res> {
+ factory $ExportStatusResultCopyWith(
+ ExportStatusResult value, $Res Function(ExportStatusResult) then) =
+ _$ExportStatusResultCopyWithImpl<$Res, ExportStatusResult>;
+ @useResult
+ $Res call({bool ok, ExportStatus status});
+
+ $ExportStatusCopyWith<$Res> get status;
+}
+
+/// @nodoc
+class _$ExportStatusResultCopyWithImpl<$Res, $Val extends ExportStatusResult>
+ implements $ExportStatusResultCopyWith<$Res> {
+ _$ExportStatusResultCopyWithImpl(this._value, this._then);
+
+ // ignore: unused_field
+ final $Val _value;
+ // ignore: unused_field
+ final $Res Function($Val) _then;
+
+ @pragma('vm:prefer-inline')
+ @override
+ $Res call({
+ Object? ok = null,
+ Object? status = null,
+ }) {
+ return _then(_value.copyWith(
+ ok: null == ok
+ ? _value.ok
+ : ok // ignore: cast_nullable_to_non_nullable
+ as bool,
+ status: null == status
+ ? _value.status
+ : status // ignore: cast_nullable_to_non_nullable
+ as ExportStatus,
+ ) as $Val);
+ }
+
+ @override
+ @pragma('vm:prefer-inline')
+ $ExportStatusCopyWith<$Res> get status {
+ return $ExportStatusCopyWith<$Res>(_value.status, (value) {
+ return _then(_value.copyWith(status: value) as $Val);
+ });
+ }
+}
+
+/// @nodoc
+abstract class _$$ExportStatusResultImplCopyWith<$Res>
+ implements $ExportStatusResultCopyWith<$Res> {
+ factory _$$ExportStatusResultImplCopyWith(_$ExportStatusResultImpl value,
+ $Res Function(_$ExportStatusResultImpl) then) =
+ __$$ExportStatusResultImplCopyWithImpl<$Res>;
+ @override
+ @useResult
+ $Res call({bool ok, ExportStatus status});
+
+ @override
+ $ExportStatusCopyWith<$Res> get status;
+}
+
+/// @nodoc
+class __$$ExportStatusResultImplCopyWithImpl<$Res>
+ extends _$ExportStatusResultCopyWithImpl<$Res, _$ExportStatusResultImpl>
+ implements _$$ExportStatusResultImplCopyWith<$Res> {
+ __$$ExportStatusResultImplCopyWithImpl(_$ExportStatusResultImpl _value,
+ $Res Function(_$ExportStatusResultImpl) _then)
+ : super(_value, _then);
+
+ @pragma('vm:prefer-inline')
+ @override
+ $Res call({
+ Object? ok = null,
+ Object? status = null,
+ }) {
+ return _then(_$ExportStatusResultImpl(
+ ok: null == ok
+ ? _value.ok
+ : ok // ignore: cast_nullable_to_non_nullable
+ as bool,
+ status: null == status
+ ? _value.status
+ : status // ignore: cast_nullable_to_non_nullable
+ as ExportStatus,
+ ));
+ }
+}
+
+/// @nodoc
+@JsonSerializable()
+class _$ExportStatusResultImpl implements _ExportStatusResult {
+ const _$ExportStatusResultImpl({required this.ok, required this.status});
+
+ factory _$ExportStatusResultImpl.fromJson(Map json) =>
+ _$$ExportStatusResultImplFromJson(json);
+
+ @override
+ final bool ok;
+ @override
+ final ExportStatus status;
+
+ @override
+ String toString() {
+ return 'ExportStatusResult(ok: $ok, status: $status)';
+ }
+
+ @override
+ bool operator ==(Object other) {
+ return identical(this, other) ||
+ (other.runtimeType == runtimeType &&
+ other is _$ExportStatusResultImpl &&
+ (identical(other.ok, ok) || other.ok == ok) &&
+ (identical(other.status, status) || other.status == status));
+ }
+
+ @JsonKey(ignore: true)
+ @override
+ int get hashCode => Object.hash(runtimeType, ok, status);
+
+ @JsonKey(ignore: true)
+ @override
+ @pragma('vm:prefer-inline')
+ _$$ExportStatusResultImplCopyWith<_$ExportStatusResultImpl> get copyWith =>
+ __$$ExportStatusResultImplCopyWithImpl<_$ExportStatusResultImpl>(
+ this, _$identity);
+
+ @override
+ Map toJson() {
+ return _$$ExportStatusResultImplToJson(
+ this,
+ );
+ }
+}
+
+abstract class _ExportStatusResult implements ExportStatusResult {
+ const factory _ExportStatusResult(
+ {required final bool ok,
+ required final ExportStatus status}) = _$ExportStatusResultImpl;
+
+ factory _ExportStatusResult.fromJson(Map json) =
+ _$ExportStatusResultImpl.fromJson;
+
+ @override
+ bool get ok;
+ @override
+ ExportStatus get status;
+ @override
+ @JsonKey(ignore: true)
+ _$$ExportStatusResultImplCopyWith<_$ExportStatusResultImpl> get copyWith =>
+ throw _privateConstructorUsedError;
+}
diff --git a/lib/src/models/export_status_result.g.dart b/lib/src/models/export_status_result.g.dart
new file mode 100644
index 0000000..21f46af
--- /dev/null
+++ b/lib/src/models/export_status_result.g.dart
@@ -0,0 +1,21 @@
+// GENERATED CODE - DO NOT MODIFY BY HAND
+
+part of 'export_status_result.dart';
+
+// **************************************************************************
+// JsonSerializableGenerator
+// **************************************************************************
+
+_$ExportStatusResultImpl _$$ExportStatusResultImplFromJson(
+ Map json) =>
+ _$ExportStatusResultImpl(
+ ok: json['ok'] as bool,
+ status: ExportStatus.fromJson(json['status'] as Map),
+ );
+
+Map _$$ExportStatusResultImplToJson(
+ _$ExportStatusResultImpl instance) =>
+ {
+ 'ok': instance.ok,
+ 'status': instance.status,
+ };
diff --git a/lib/src/models/hook.dart b/lib/src/models/hook.dart
new file mode 100644
index 0000000..b5f8178
--- /dev/null
+++ b/lib/src/models/hook.dart
@@ -0,0 +1,18 @@
+import 'package:freezed_annotation/freezed_annotation.dart';
+
+part 'hook.freezed.dart';
+part 'hook.g.dart';
+
+/// A hook model.
+@freezed
+class Hook with _$Hook {
+ /// Initializes a hook.
+ const factory Hook({
+ @JsonKey(name: '_id') required String id,
+ required String targetUrl,
+ required DateTime createdAt,
+ }) = _Hook;
+
+ /// Initializes a hook from JSON.
+ factory Hook.fromJson(Map json) => _$HookFromJson(json);
+}
diff --git a/lib/src/models/hook.freezed.dart b/lib/src/models/hook.freezed.dart
new file mode 100644
index 0000000..bc6084c
--- /dev/null
+++ b/lib/src/models/hook.freezed.dart
@@ -0,0 +1,191 @@
+// coverage:ignore-file
+// GENERATED CODE - DO NOT MODIFY BY HAND
+// ignore_for_file: type=lint
+// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
+
+part of 'hook.dart';
+
+// **************************************************************************
+// FreezedGenerator
+// **************************************************************************
+
+T _$identity(T value) => value;
+
+final _privateConstructorUsedError = UnsupportedError(
+ 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models');
+
+Hook _$HookFromJson(Map json) {
+ return _Hook.fromJson(json);
+}
+
+/// @nodoc
+mixin _$Hook {
+ @JsonKey(name: '_id')
+ String get id => throw _privateConstructorUsedError;
+ String get targetUrl => throw _privateConstructorUsedError;
+ DateTime get createdAt => throw _privateConstructorUsedError;
+
+ Map toJson() => throw _privateConstructorUsedError;
+ @JsonKey(ignore: true)
+ $HookCopyWith get copyWith => throw _privateConstructorUsedError;
+}
+
+/// @nodoc
+abstract class $HookCopyWith<$Res> {
+ factory $HookCopyWith(Hook value, $Res Function(Hook) then) =
+ _$HookCopyWithImpl<$Res, Hook>;
+ @useResult
+ $Res call(
+ {@JsonKey(name: '_id') String id, String targetUrl, DateTime createdAt});
+}
+
+/// @nodoc
+class _$HookCopyWithImpl<$Res, $Val extends Hook>
+ implements $HookCopyWith<$Res> {
+ _$HookCopyWithImpl(this._value, this._then);
+
+ // ignore: unused_field
+ final $Val _value;
+ // ignore: unused_field
+ final $Res Function($Val) _then;
+
+ @pragma('vm:prefer-inline')
+ @override
+ $Res call({
+ Object? id = null,
+ Object? targetUrl = null,
+ Object? createdAt = null,
+ }) {
+ return _then(_value.copyWith(
+ id: null == id
+ ? _value.id
+ : id // ignore: cast_nullable_to_non_nullable
+ as String,
+ targetUrl: null == targetUrl
+ ? _value.targetUrl
+ : targetUrl // ignore: cast_nullable_to_non_nullable
+ as String,
+ createdAt: null == createdAt
+ ? _value.createdAt
+ : createdAt // ignore: cast_nullable_to_non_nullable
+ as DateTime,
+ ) as $Val);
+ }
+}
+
+/// @nodoc
+abstract class _$$HookImplCopyWith<$Res> implements $HookCopyWith<$Res> {
+ factory _$$HookImplCopyWith(
+ _$HookImpl value, $Res Function(_$HookImpl) then) =
+ __$$HookImplCopyWithImpl<$Res>;
+ @override
+ @useResult
+ $Res call(
+ {@JsonKey(name: '_id') String id, String targetUrl, DateTime createdAt});
+}
+
+/// @nodoc
+class __$$HookImplCopyWithImpl<$Res>
+ extends _$HookCopyWithImpl<$Res, _$HookImpl>
+ implements _$$HookImplCopyWith<$Res> {
+ __$$HookImplCopyWithImpl(_$HookImpl _value, $Res Function(_$HookImpl) _then)
+ : super(_value, _then);
+
+ @pragma('vm:prefer-inline')
+ @override
+ $Res call({
+ Object? id = null,
+ Object? targetUrl = null,
+ Object? createdAt = null,
+ }) {
+ return _then(_$HookImpl(
+ id: null == id
+ ? _value.id
+ : id // ignore: cast_nullable_to_non_nullable
+ as String,
+ targetUrl: null == targetUrl
+ ? _value.targetUrl
+ : targetUrl // ignore: cast_nullable_to_non_nullable
+ as String,
+ createdAt: null == createdAt
+ ? _value.createdAt
+ : createdAt // ignore: cast_nullable_to_non_nullable
+ as DateTime,
+ ));
+ }
+}
+
+/// @nodoc
+@JsonSerializable()
+class _$HookImpl implements _Hook {
+ const _$HookImpl(
+ {@JsonKey(name: '_id') required this.id,
+ required this.targetUrl,
+ required this.createdAt});
+
+ factory _$HookImpl.fromJson(Map json) =>
+ _$$HookImplFromJson(json);
+
+ @override
+ @JsonKey(name: '_id')
+ final String id;
+ @override
+ final String targetUrl;
+ @override
+ final DateTime createdAt;
+
+ @override
+ String toString() {
+ return 'Hook(id: $id, targetUrl: $targetUrl, createdAt: $createdAt)';
+ }
+
+ @override
+ bool operator ==(Object other) {
+ return identical(this, other) ||
+ (other.runtimeType == runtimeType &&
+ other is _$HookImpl &&
+ (identical(other.id, id) || other.id == id) &&
+ (identical(other.targetUrl, targetUrl) ||
+ other.targetUrl == targetUrl) &&
+ (identical(other.createdAt, createdAt) ||
+ other.createdAt == createdAt));
+ }
+
+ @JsonKey(ignore: true)
+ @override
+ int get hashCode => Object.hash(runtimeType, id, targetUrl, createdAt);
+
+ @JsonKey(ignore: true)
+ @override
+ @pragma('vm:prefer-inline')
+ _$$HookImplCopyWith<_$HookImpl> get copyWith =>
+ __$$HookImplCopyWithImpl<_$HookImpl>(this, _$identity);
+
+ @override
+ Map toJson() {
+ return _$$HookImplToJson(
+ this,
+ );
+ }
+}
+
+abstract class _Hook implements Hook {
+ const factory _Hook(
+ {@JsonKey(name: '_id') required final String id,
+ required final String targetUrl,
+ required final DateTime createdAt}) = _$HookImpl;
+
+ factory _Hook.fromJson(Map json) = _$HookImpl.fromJson;
+
+ @override
+ @JsonKey(name: '_id')
+ String get id;
+ @override
+ String get targetUrl;
+ @override
+ DateTime get createdAt;
+ @override
+ @JsonKey(ignore: true)
+ _$$HookImplCopyWith<_$HookImpl> get copyWith =>
+ throw _privateConstructorUsedError;
+}
diff --git a/lib/src/models/hook.g.dart b/lib/src/models/hook.g.dart
new file mode 100644
index 0000000..8ac8e65
--- /dev/null
+++ b/lib/src/models/hook.g.dart
@@ -0,0 +1,20 @@
+// GENERATED CODE - DO NOT MODIFY BY HAND
+
+part of 'hook.dart';
+
+// **************************************************************************
+// JsonSerializableGenerator
+// **************************************************************************
+
+_$HookImpl _$$HookImplFromJson(Map json) => _$HookImpl(
+ id: json['_id'] as String,
+ targetUrl: json['targetUrl'] as String,
+ createdAt: DateTime.parse(json['createdAt'] as String),
+ );
+
+Map _$$HookImplToJson(_$HookImpl instance) =>
+ {
+ '_id': instance.id,
+ 'targetUrl': instance.targetUrl,
+ 'createdAt': instance.createdAt.toIso8601String(),
+ };
diff --git a/lib/src/models/hook_response.dart b/lib/src/models/hook_response.dart
new file mode 100644
index 0000000..0297110
--- /dev/null
+++ b/lib/src/models/hook_response.dart
@@ -0,0 +1,19 @@
+import 'package:freezed_annotation/freezed_annotation.dart';
+
+part 'hook_response.freezed.dart';
+part 'hook_response.g.dart';
+
+/// A hook response.
+@freezed
+class HookResponse with _$HookResponse {
+ /// Initializes a hook response.
+ const factory HookResponse({
+ @JsonKey(name: '_id') required String id,
+ required String targetUrl,
+ required DateTime createdAt,
+ }) = _HookResponse;
+
+ /// Initializes a hook response from JSON.
+ factory HookResponse.fromJson(Map json) =>
+ _$HookResponseFromJson(json);
+}
diff --git a/lib/src/models/hook_response.freezed.dart b/lib/src/models/hook_response.freezed.dart
new file mode 100644
index 0000000..bfe3c05
--- /dev/null
+++ b/lib/src/models/hook_response.freezed.dart
@@ -0,0 +1,196 @@
+// coverage:ignore-file
+// GENERATED CODE - DO NOT MODIFY BY HAND
+// ignore_for_file: type=lint
+// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
+
+part of 'hook_response.dart';
+
+// **************************************************************************
+// FreezedGenerator
+// **************************************************************************
+
+T _$identity(T value) => value;
+
+final _privateConstructorUsedError = UnsupportedError(
+ 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models');
+
+HookResponse _$HookResponseFromJson(Map json) {
+ return _HookResponse.fromJson(json);
+}
+
+/// @nodoc
+mixin _$HookResponse {
+ @JsonKey(name: '_id')
+ String get id => throw _privateConstructorUsedError;
+ String get targetUrl => throw _privateConstructorUsedError;
+ DateTime get createdAt => throw _privateConstructorUsedError;
+
+ Map toJson() => throw _privateConstructorUsedError;
+ @JsonKey(ignore: true)
+ $HookResponseCopyWith get copyWith =>
+ throw _privateConstructorUsedError;
+}
+
+/// @nodoc
+abstract class $HookResponseCopyWith<$Res> {
+ factory $HookResponseCopyWith(
+ HookResponse value, $Res Function(HookResponse) then) =
+ _$HookResponseCopyWithImpl<$Res, HookResponse>;
+ @useResult
+ $Res call(
+ {@JsonKey(name: '_id') String id, String targetUrl, DateTime createdAt});
+}
+
+/// @nodoc
+class _$HookResponseCopyWithImpl<$Res, $Val extends HookResponse>
+ implements $HookResponseCopyWith<$Res> {
+ _$HookResponseCopyWithImpl(this._value, this._then);
+
+ // ignore: unused_field
+ final $Val _value;
+ // ignore: unused_field
+ final $Res Function($Val) _then;
+
+ @pragma('vm:prefer-inline')
+ @override
+ $Res call({
+ Object? id = null,
+ Object? targetUrl = null,
+ Object? createdAt = null,
+ }) {
+ return _then(_value.copyWith(
+ id: null == id
+ ? _value.id
+ : id // ignore: cast_nullable_to_non_nullable
+ as String,
+ targetUrl: null == targetUrl
+ ? _value.targetUrl
+ : targetUrl // ignore: cast_nullable_to_non_nullable
+ as String,
+ createdAt: null == createdAt
+ ? _value.createdAt
+ : createdAt // ignore: cast_nullable_to_non_nullable
+ as DateTime,
+ ) as $Val);
+ }
+}
+
+/// @nodoc
+abstract class _$$HookResponseImplCopyWith<$Res>
+ implements $HookResponseCopyWith<$Res> {
+ factory _$$HookResponseImplCopyWith(
+ _$HookResponseImpl value, $Res Function(_$HookResponseImpl) then) =
+ __$$HookResponseImplCopyWithImpl<$Res>;
+ @override
+ @useResult
+ $Res call(
+ {@JsonKey(name: '_id') String id, String targetUrl, DateTime createdAt});
+}
+
+/// @nodoc
+class __$$HookResponseImplCopyWithImpl<$Res>
+ extends _$HookResponseCopyWithImpl<$Res, _$HookResponseImpl>
+ implements _$$HookResponseImplCopyWith<$Res> {
+ __$$HookResponseImplCopyWithImpl(
+ _$HookResponseImpl _value, $Res Function(_$HookResponseImpl) _then)
+ : super(_value, _then);
+
+ @pragma('vm:prefer-inline')
+ @override
+ $Res call({
+ Object? id = null,
+ Object? targetUrl = null,
+ Object? createdAt = null,
+ }) {
+ return _then(_$HookResponseImpl(
+ id: null == id
+ ? _value.id
+ : id // ignore: cast_nullable_to_non_nullable
+ as String,
+ targetUrl: null == targetUrl
+ ? _value.targetUrl
+ : targetUrl // ignore: cast_nullable_to_non_nullable
+ as String,
+ createdAt: null == createdAt
+ ? _value.createdAt
+ : createdAt // ignore: cast_nullable_to_non_nullable
+ as DateTime,
+ ));
+ }
+}
+
+/// @nodoc
+@JsonSerializable()
+class _$HookResponseImpl implements _HookResponse {
+ const _$HookResponseImpl(
+ {@JsonKey(name: '_id') required this.id,
+ required this.targetUrl,
+ required this.createdAt});
+
+ factory _$HookResponseImpl.fromJson(Map json) =>
+ _$$HookResponseImplFromJson(json);
+
+ @override
+ @JsonKey(name: '_id')
+ final String id;
+ @override
+ final String targetUrl;
+ @override
+ final DateTime createdAt;
+
+ @override
+ String toString() {
+ return 'HookResponse(id: $id, targetUrl: $targetUrl, createdAt: $createdAt)';
+ }
+
+ @override
+ bool operator ==(Object other) {
+ return identical(this, other) ||
+ (other.runtimeType == runtimeType &&
+ other is _$HookResponseImpl &&
+ (identical(other.id, id) || other.id == id) &&
+ (identical(other.targetUrl, targetUrl) ||
+ other.targetUrl == targetUrl) &&
+ (identical(other.createdAt, createdAt) ||
+ other.createdAt == createdAt));
+ }
+
+ @JsonKey(ignore: true)
+ @override
+ int get hashCode => Object.hash(runtimeType, id, targetUrl, createdAt);
+
+ @JsonKey(ignore: true)
+ @override
+ @pragma('vm:prefer-inline')
+ _$$HookResponseImplCopyWith<_$HookResponseImpl> get copyWith =>
+ __$$HookResponseImplCopyWithImpl<_$HookResponseImpl>(this, _$identity);
+
+ @override
+ Map toJson() {
+ return _$$HookResponseImplToJson(
+ this,
+ );
+ }
+}
+
+abstract class _HookResponse implements HookResponse {
+ const factory _HookResponse(
+ {@JsonKey(name: '_id') required final String id,
+ required final String targetUrl,
+ required final DateTime createdAt}) = _$HookResponseImpl;
+
+ factory _HookResponse.fromJson(Map json) =
+ _$HookResponseImpl.fromJson;
+
+ @override
+ @JsonKey(name: '_id')
+ String get id;
+ @override
+ String get targetUrl;
+ @override
+ DateTime get createdAt;
+ @override
+ @JsonKey(ignore: true)
+ _$$HookResponseImplCopyWith<_$HookResponseImpl> get copyWith =>
+ throw _privateConstructorUsedError;
+}
diff --git a/lib/src/models/hook_response.g.dart b/lib/src/models/hook_response.g.dart
new file mode 100644
index 0000000..efd5ca0
--- /dev/null
+++ b/lib/src/models/hook_response.g.dart
@@ -0,0 +1,21 @@
+// GENERATED CODE - DO NOT MODIFY BY HAND
+
+part of 'hook_response.dart';
+
+// **************************************************************************
+// JsonSerializableGenerator
+// **************************************************************************
+
+_$HookResponseImpl _$$HookResponseImplFromJson(Map json) =>
+ _$HookResponseImpl(
+ id: json['_id'] as String,
+ targetUrl: json['targetUrl'] as String,
+ createdAt: DateTime.parse(json['createdAt'] as String),
+ );
+
+Map _$$HookResponseImplToJson(_$HookResponseImpl instance) =>
+ {
+ '_id': instance.id,
+ 'targetUrl': instance.targetUrl,
+ 'createdAt': instance.createdAt.toIso8601String(),
+ };
diff --git a/lib/src/models/interested_lead_response.dart b/lib/src/models/interested_lead_response.dart
new file mode 100644
index 0000000..f15c456
--- /dev/null
+++ b/lib/src/models/interested_lead_response.dart
@@ -0,0 +1,22 @@
+import 'package:freezed_annotation/freezed_annotation.dart';
+
+part 'interested_lead_response.freezed.dart';
+part 'interested_lead_response.g.dart';
+
+/// An interested lead response.
+@freezed
+class InterestedLeadResponse with _$InterestedLeadResponse {
+ /// Initializes an interested lead response.
+ const factory InterestedLeadResponse({
+ @JsonKey(name: '_id') required String id,
+ required String email,
+ String? firstName,
+ String? lastName,
+ bool? isPaused,
+ String? campaignId,
+ }) = _InterestedLeadResponse;
+
+ /// Initializes an interested lead response from JSON.
+ factory InterestedLeadResponse.fromJson(Map json) =>
+ _$InterestedLeadResponseFromJson(json);
+}
diff --git a/lib/src/models/interested_lead_response.freezed.dart b/lib/src/models/interested_lead_response.freezed.dart
new file mode 100644
index 0000000..2464206
--- /dev/null
+++ b/lib/src/models/interested_lead_response.freezed.dart
@@ -0,0 +1,269 @@
+// coverage:ignore-file
+// GENERATED CODE - DO NOT MODIFY BY HAND
+// ignore_for_file: type=lint
+// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
+
+part of 'interested_lead_response.dart';
+
+// **************************************************************************
+// FreezedGenerator
+// **************************************************************************
+
+T _$identity(T value) => value;
+
+final _privateConstructorUsedError = UnsupportedError(
+ 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models');
+
+InterestedLeadResponse _$InterestedLeadResponseFromJson(
+ Map json) {
+ return _InterestedLeadResponse.fromJson(json);
+}
+
+/// @nodoc
+mixin _$InterestedLeadResponse {
+ @JsonKey(name: '_id')
+ String get id => throw _privateConstructorUsedError;
+ String get email => throw _privateConstructorUsedError;
+ String? get firstName => throw _privateConstructorUsedError;
+ String? get lastName => throw _privateConstructorUsedError;
+ bool? get isPaused => throw _privateConstructorUsedError;
+ String? get campaignId => throw _privateConstructorUsedError;
+
+ Map toJson() => throw _privateConstructorUsedError;
+ @JsonKey(ignore: true)
+ $InterestedLeadResponseCopyWith get copyWith =>
+ throw _privateConstructorUsedError;
+}
+
+/// @nodoc
+abstract class $InterestedLeadResponseCopyWith<$Res> {
+ factory $InterestedLeadResponseCopyWith(InterestedLeadResponse value,
+ $Res Function(InterestedLeadResponse) then) =
+ _$InterestedLeadResponseCopyWithImpl<$Res, InterestedLeadResponse>;
+ @useResult
+ $Res call(
+ {@JsonKey(name: '_id') String id,
+ String email,
+ String? firstName,
+ String? lastName,
+ bool? isPaused,
+ String? campaignId});
+}
+
+/// @nodoc
+class _$InterestedLeadResponseCopyWithImpl<$Res,
+ $Val extends InterestedLeadResponse>
+ implements $InterestedLeadResponseCopyWith<$Res> {
+ _$InterestedLeadResponseCopyWithImpl(this._value, this._then);
+
+ // ignore: unused_field
+ final $Val _value;
+ // ignore: unused_field
+ final $Res Function($Val) _then;
+
+ @pragma('vm:prefer-inline')
+ @override
+ $Res call({
+ Object? id = null,
+ Object? email = null,
+ Object? firstName = freezed,
+ Object? lastName = freezed,
+ Object? isPaused = freezed,
+ Object? campaignId = freezed,
+ }) {
+ return _then(_value.copyWith(
+ id: null == id
+ ? _value.id
+ : id // ignore: cast_nullable_to_non_nullable
+ as String,
+ email: null == email
+ ? _value.email
+ : email // ignore: cast_nullable_to_non_nullable
+ as String,
+ firstName: freezed == firstName
+ ? _value.firstName
+ : firstName // ignore: cast_nullable_to_non_nullable
+ as String?,
+ lastName: freezed == lastName
+ ? _value.lastName
+ : lastName // ignore: cast_nullable_to_non_nullable
+ as String?,
+ isPaused: freezed == isPaused
+ ? _value.isPaused
+ : isPaused // ignore: cast_nullable_to_non_nullable
+ as bool?,
+ campaignId: freezed == campaignId
+ ? _value.campaignId
+ : campaignId // ignore: cast_nullable_to_non_nullable
+ as String?,
+ ) as $Val);
+ }
+}
+
+/// @nodoc
+abstract class _$$InterestedLeadResponseImplCopyWith<$Res>
+ implements $InterestedLeadResponseCopyWith<$Res> {
+ factory _$$InterestedLeadResponseImplCopyWith(
+ _$InterestedLeadResponseImpl value,
+ $Res Function(_$InterestedLeadResponseImpl) then) =
+ __$$InterestedLeadResponseImplCopyWithImpl<$Res>;
+ @override
+ @useResult
+ $Res call(
+ {@JsonKey(name: '_id') String id,
+ String email,
+ String? firstName,
+ String? lastName,
+ bool? isPaused,
+ String? campaignId});
+}
+
+/// @nodoc
+class __$$InterestedLeadResponseImplCopyWithImpl<$Res>
+ extends _$InterestedLeadResponseCopyWithImpl<$Res,
+ _$InterestedLeadResponseImpl>
+ implements _$$InterestedLeadResponseImplCopyWith<$Res> {
+ __$$InterestedLeadResponseImplCopyWithImpl(
+ _$InterestedLeadResponseImpl _value,
+ $Res Function(_$InterestedLeadResponseImpl) _then)
+ : super(_value, _then);
+
+ @pragma('vm:prefer-inline')
+ @override
+ $Res call({
+ Object? id = null,
+ Object? email = null,
+ Object? firstName = freezed,
+ Object? lastName = freezed,
+ Object? isPaused = freezed,
+ Object? campaignId = freezed,
+ }) {
+ return _then(_$InterestedLeadResponseImpl(
+ id: null == id
+ ? _value.id
+ : id // ignore: cast_nullable_to_non_nullable
+ as String,
+ email: null == email
+ ? _value.email
+ : email // ignore: cast_nullable_to_non_nullable
+ as String,
+ firstName: freezed == firstName
+ ? _value.firstName
+ : firstName // ignore: cast_nullable_to_non_nullable
+ as String?,
+ lastName: freezed == lastName
+ ? _value.lastName
+ : lastName // ignore: cast_nullable_to_non_nullable
+ as String?,
+ isPaused: freezed == isPaused
+ ? _value.isPaused
+ : isPaused // ignore: cast_nullable_to_non_nullable
+ as bool?,
+ campaignId: freezed == campaignId
+ ? _value.campaignId
+ : campaignId // ignore: cast_nullable_to_non_nullable
+ as String?,
+ ));
+ }
+}
+
+/// @nodoc
+@JsonSerializable()
+class _$InterestedLeadResponseImpl implements _InterestedLeadResponse {
+ const _$InterestedLeadResponseImpl(
+ {@JsonKey(name: '_id') required this.id,
+ required this.email,
+ this.firstName,
+ this.lastName,
+ this.isPaused,
+ this.campaignId});
+
+ factory _$InterestedLeadResponseImpl.fromJson(Map json) =>
+ _$$InterestedLeadResponseImplFromJson(json);
+
+ @override
+ @JsonKey(name: '_id')
+ final String id;
+ @override
+ final String email;
+ @override
+ final String? firstName;
+ @override
+ final String? lastName;
+ @override
+ final bool? isPaused;
+ @override
+ final String? campaignId;
+
+ @override
+ String toString() {
+ return 'InterestedLeadResponse(id: $id, email: $email, firstName: $firstName, lastName: $lastName, isPaused: $isPaused, campaignId: $campaignId)';
+ }
+
+ @override
+ bool operator ==(Object other) {
+ return identical(this, other) ||
+ (other.runtimeType == runtimeType &&
+ other is _$InterestedLeadResponseImpl &&
+ (identical(other.id, id) || other.id == id) &&
+ (identical(other.email, email) || other.email == email) &&
+ (identical(other.firstName, firstName) ||
+ other.firstName == firstName) &&
+ (identical(other.lastName, lastName) ||
+ other.lastName == lastName) &&
+ (identical(other.isPaused, isPaused) ||
+ other.isPaused == isPaused) &&
+ (identical(other.campaignId, campaignId) ||
+ other.campaignId == campaignId));
+ }
+
+ @JsonKey(ignore: true)
+ @override
+ int get hashCode => Object.hash(
+ runtimeType, id, email, firstName, lastName, isPaused, campaignId);
+
+ @JsonKey(ignore: true)
+ @override
+ @pragma('vm:prefer-inline')
+ _$$InterestedLeadResponseImplCopyWith<_$InterestedLeadResponseImpl>
+ get copyWith => __$$InterestedLeadResponseImplCopyWithImpl<
+ _$InterestedLeadResponseImpl>(this, _$identity);
+
+ @override
+ Map toJson() {
+ return _$$InterestedLeadResponseImplToJson(
+ this,
+ );
+ }
+}
+
+abstract class _InterestedLeadResponse implements InterestedLeadResponse {
+ const factory _InterestedLeadResponse(
+ {@JsonKey(name: '_id') required final String id,
+ required final String email,
+ final String? firstName,
+ final String? lastName,
+ final bool? isPaused,
+ final String? campaignId}) = _$InterestedLeadResponseImpl;
+
+ factory _InterestedLeadResponse.fromJson(Map json) =
+ _$InterestedLeadResponseImpl.fromJson;
+
+ @override
+ @JsonKey(name: '_id')
+ String get id;
+ @override
+ String get email;
+ @override
+ String? get firstName;
+ @override
+ String? get lastName;
+ @override
+ bool? get isPaused;
+ @override
+ String? get campaignId;
+ @override
+ @JsonKey(ignore: true)
+ _$$InterestedLeadResponseImplCopyWith<_$InterestedLeadResponseImpl>
+ get copyWith => throw _privateConstructorUsedError;
+}
diff --git a/lib/src/models/interested_lead_response.g.dart b/lib/src/models/interested_lead_response.g.dart
new file mode 100644
index 0000000..2e34d76
--- /dev/null
+++ b/lib/src/models/interested_lead_response.g.dart
@@ -0,0 +1,29 @@
+// GENERATED CODE - DO NOT MODIFY BY HAND
+
+part of 'interested_lead_response.dart';
+
+// **************************************************************************
+// JsonSerializableGenerator
+// **************************************************************************
+
+_$InterestedLeadResponseImpl _$$InterestedLeadResponseImplFromJson(
+ Map json) =>
+ _$InterestedLeadResponseImpl(
+ id: json['_id'] as String,
+ email: json['email'] as String,
+ firstName: json['firstName'] as String?,
+ lastName: json['lastName'] as String?,
+ isPaused: json['isPaused'] as bool?,
+ campaignId: json['campaignId'] as String?,
+ );
+
+Map _$$InterestedLeadResponseImplToJson(
+ _$InterestedLeadResponseImpl instance) =>
+ {
+ '_id': instance.id,
+ 'email': instance.email,
+ 'firstName': instance.firstName,
+ 'lastName': instance.lastName,
+ 'isPaused': instance.isPaused,
+ 'campaignId': instance.campaignId,
+ };
diff --git a/lib/src/models/lead_action_response.dart b/lib/src/models/lead_action_response.dart
new file mode 100644
index 0000000..57dafeb
--- /dev/null
+++ b/lib/src/models/lead_action_response.dart
@@ -0,0 +1,20 @@
+import 'package:freezed_annotation/freezed_annotation.dart';
+
+part 'lead_action_response.freezed.dart';
+part 'lead_action_response.g.dart';
+
+/// A lead action response.`
+@freezed
+class LeadActionResponse with _$LeadActionResponse {
+ /// Initializes a lead action response.
+ const factory LeadActionResponse({
+ @JsonKey(name: '_id') required String id,
+ required String email,
+ String? firstName,
+ String? lastName,
+ }) = _LeadActionResponse;
+
+ /// Initializes a lead action response from JSON.
+ factory LeadActionResponse.fromJson(Map json) =>
+ _$LeadActionResponseFromJson(json);
+}
diff --git a/lib/src/models/lead_action_response.freezed.dart b/lib/src/models/lead_action_response.freezed.dart
new file mode 100644
index 0000000..bf698b7
--- /dev/null
+++ b/lib/src/models/lead_action_response.freezed.dart
@@ -0,0 +1,221 @@
+// coverage:ignore-file
+// GENERATED CODE - DO NOT MODIFY BY HAND
+// ignore_for_file: type=lint
+// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
+
+part of 'lead_action_response.dart';
+
+// **************************************************************************
+// FreezedGenerator
+// **************************************************************************
+
+T _$identity(T value) => value;
+
+final _privateConstructorUsedError = UnsupportedError(
+ 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models');
+
+LeadActionResponse _$LeadActionResponseFromJson(Map json) {
+ return _LeadActionResponse.fromJson(json);
+}
+
+/// @nodoc
+mixin _$LeadActionResponse {
+ @JsonKey(name: '_id')
+ String get id => throw _privateConstructorUsedError;
+ String get email => throw _privateConstructorUsedError;
+ String? get firstName => throw _privateConstructorUsedError;
+ String? get lastName => throw _privateConstructorUsedError;
+
+ Map toJson() => throw _privateConstructorUsedError;
+ @JsonKey(ignore: true)
+ $LeadActionResponseCopyWith get copyWith =>
+ throw _privateConstructorUsedError;
+}
+
+/// @nodoc
+abstract class $LeadActionResponseCopyWith<$Res> {
+ factory $LeadActionResponseCopyWith(
+ LeadActionResponse value, $Res Function(LeadActionResponse) then) =
+ _$LeadActionResponseCopyWithImpl<$Res, LeadActionResponse>;
+ @useResult
+ $Res call(
+ {@JsonKey(name: '_id') String id,
+ String email,
+ String? firstName,
+ String? lastName});
+}
+
+/// @nodoc
+class _$LeadActionResponseCopyWithImpl<$Res, $Val extends LeadActionResponse>
+ implements $LeadActionResponseCopyWith<$Res> {
+ _$LeadActionResponseCopyWithImpl(this._value, this._then);
+
+ // ignore: unused_field
+ final $Val _value;
+ // ignore: unused_field
+ final $Res Function($Val) _then;
+
+ @pragma('vm:prefer-inline')
+ @override
+ $Res call({
+ Object? id = null,
+ Object? email = null,
+ Object? firstName = freezed,
+ Object? lastName = freezed,
+ }) {
+ return _then(_value.copyWith(
+ id: null == id
+ ? _value.id
+ : id // ignore: cast_nullable_to_non_nullable
+ as String,
+ email: null == email
+ ? _value.email
+ : email // ignore: cast_nullable_to_non_nullable
+ as String,
+ firstName: freezed == firstName
+ ? _value.firstName
+ : firstName // ignore: cast_nullable_to_non_nullable
+ as String?,
+ lastName: freezed == lastName
+ ? _value.lastName
+ : lastName // ignore: cast_nullable_to_non_nullable
+ as String?,
+ ) as $Val);
+ }
+}
+
+/// @nodoc
+abstract class _$$LeadActionResponseImplCopyWith<$Res>
+ implements $LeadActionResponseCopyWith<$Res> {
+ factory _$$LeadActionResponseImplCopyWith(_$LeadActionResponseImpl value,
+ $Res Function(_$LeadActionResponseImpl) then) =
+ __$$LeadActionResponseImplCopyWithImpl<$Res>;
+ @override
+ @useResult
+ $Res call(
+ {@JsonKey(name: '_id') String id,
+ String email,
+ String? firstName,
+ String? lastName});
+}
+
+/// @nodoc
+class __$$LeadActionResponseImplCopyWithImpl<$Res>
+ extends _$LeadActionResponseCopyWithImpl<$Res, _$LeadActionResponseImpl>
+ implements _$$LeadActionResponseImplCopyWith<$Res> {
+ __$$LeadActionResponseImplCopyWithImpl(_$LeadActionResponseImpl _value,
+ $Res Function(_$LeadActionResponseImpl) _then)
+ : super(_value, _then);
+
+ @pragma('vm:prefer-inline')
+ @override
+ $Res call({
+ Object? id = null,
+ Object? email = null,
+ Object? firstName = freezed,
+ Object? lastName = freezed,
+ }) {
+ return _then(_$LeadActionResponseImpl(
+ id: null == id
+ ? _value.id
+ : id // ignore: cast_nullable_to_non_nullable
+ as String,
+ email: null == email
+ ? _value.email
+ : email // ignore: cast_nullable_to_non_nullable
+ as String,
+ firstName: freezed == firstName
+ ? _value.firstName
+ : firstName // ignore: cast_nullable_to_non_nullable
+ as String?,
+ lastName: freezed == lastName
+ ? _value.lastName
+ : lastName // ignore: cast_nullable_to_non_nullable
+ as String?,
+ ));
+ }
+}
+
+/// @nodoc
+@JsonSerializable()
+class _$LeadActionResponseImpl implements _LeadActionResponse {
+ const _$LeadActionResponseImpl(
+ {@JsonKey(name: '_id') required this.id,
+ required this.email,
+ this.firstName,
+ this.lastName});
+
+ factory _$LeadActionResponseImpl.fromJson(Map json) =>
+ _$$LeadActionResponseImplFromJson(json);
+
+ @override
+ @JsonKey(name: '_id')
+ final String id;
+ @override
+ final String email;
+ @override
+ final String? firstName;
+ @override
+ final String? lastName;
+
+ @override
+ String toString() {
+ return 'LeadActionResponse(id: $id, email: $email, firstName: $firstName, lastName: $lastName)';
+ }
+
+ @override
+ bool operator ==(Object other) {
+ return identical(this, other) ||
+ (other.runtimeType == runtimeType &&
+ other is _$LeadActionResponseImpl &&
+ (identical(other.id, id) || other.id == id) &&
+ (identical(other.email, email) || other.email == email) &&
+ (identical(other.firstName, firstName) ||
+ other.firstName == firstName) &&
+ (identical(other.lastName, lastName) ||
+ other.lastName == lastName));
+ }
+
+ @JsonKey(ignore: true)
+ @override
+ int get hashCode => Object.hash(runtimeType, id, email, firstName, lastName);
+
+ @JsonKey(ignore: true)
+ @override
+ @pragma('vm:prefer-inline')
+ _$$LeadActionResponseImplCopyWith<_$LeadActionResponseImpl> get copyWith =>
+ __$$LeadActionResponseImplCopyWithImpl<_$LeadActionResponseImpl>(
+ this, _$identity);
+
+ @override
+ Map toJson() {
+ return _$$LeadActionResponseImplToJson(
+ this,
+ );
+ }
+}
+
+abstract class _LeadActionResponse implements LeadActionResponse {
+ const factory _LeadActionResponse(
+ {@JsonKey(name: '_id') required final String id,
+ required final String email,
+ final String? firstName,
+ final String? lastName}) = _$LeadActionResponseImpl;
+
+ factory _LeadActionResponse.fromJson(Map json) =
+ _$LeadActionResponseImpl.fromJson;
+
+ @override
+ @JsonKey(name: '_id')
+ String get id;
+ @override
+ String get email;
+ @override
+ String? get firstName;
+ @override
+ String? get lastName;
+ @override
+ @JsonKey(ignore: true)
+ _$$LeadActionResponseImplCopyWith<_$LeadActionResponseImpl> get copyWith =>
+ throw _privateConstructorUsedError;
+}
diff --git a/lib/src/models/lead_action_response.g.dart b/lib/src/models/lead_action_response.g.dart
new file mode 100644
index 0000000..722902e
--- /dev/null
+++ b/lib/src/models/lead_action_response.g.dart
@@ -0,0 +1,25 @@
+// GENERATED CODE - DO NOT MODIFY BY HAND
+
+part of 'lead_action_response.dart';
+
+// **************************************************************************
+// JsonSerializableGenerator
+// **************************************************************************
+
+_$LeadActionResponseImpl _$$LeadActionResponseImplFromJson(
+ Map json) =>
+ _$LeadActionResponseImpl(
+ id: json['_id'] as String,
+ email: json['email'] as String,
+ firstName: json['firstName'] as String?,
+ lastName: json['lastName'] as String?,
+ );
+
+Map _$$LeadActionResponseImplToJson(
+ _$LeadActionResponseImpl instance) =>
+ {
+ '_id': instance.id,
+ 'email': instance.email,
+ 'firstName': instance.firstName,
+ 'lastName': instance.lastName,
+ };
diff --git a/lib/src/models/lead_deletion_response.dart b/lib/src/models/lead_deletion_response.dart
new file mode 100644
index 0000000..668bc54
--- /dev/null
+++ b/lib/src/models/lead_deletion_response.dart
@@ -0,0 +1,18 @@
+import 'package:freezed_annotation/freezed_annotation.dart';
+
+part 'lead_deletion_response.freezed.dart';
+part 'lead_deletion_response.g.dart';
+
+/// A lead deletion response.
+@freezed
+class LeadDeletionResponse with _$LeadDeletionResponse {
+ /// Initializes a lead deletion response.
+ const factory LeadDeletionResponse({
+ @JsonKey(name: '_id') required String id,
+ required String email,
+ }) = _LeadDeletionResponse;
+
+ /// Initializes a lead deletion response from JSON.
+ factory LeadDeletionResponse.fromJson(Map json) =>
+ _$LeadDeletionResponseFromJson(json);
+}
diff --git a/lib/src/models/lead_deletion_response.freezed.dart b/lib/src/models/lead_deletion_response.freezed.dart
new file mode 100644
index 0000000..256b051
--- /dev/null
+++ b/lib/src/models/lead_deletion_response.freezed.dart
@@ -0,0 +1,176 @@
+// coverage:ignore-file
+// GENERATED CODE - DO NOT MODIFY BY HAND
+// ignore_for_file: type=lint
+// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
+
+part of 'lead_deletion_response.dart';
+
+// **************************************************************************
+// FreezedGenerator
+// **************************************************************************
+
+T _$identity(T value) => value;
+
+final _privateConstructorUsedError = UnsupportedError(
+ 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models');
+
+LeadDeletionResponse _$LeadDeletionResponseFromJson(Map json) {
+ return _LeadDeletionResponse.fromJson(json);
+}
+
+/// @nodoc
+mixin _$LeadDeletionResponse {
+ @JsonKey(name: '_id')
+ String get id => throw _privateConstructorUsedError;
+ String get email => throw _privateConstructorUsedError;
+
+ Map toJson() => throw _privateConstructorUsedError;
+ @JsonKey(ignore: true)
+ $LeadDeletionResponseCopyWith get copyWith =>
+ throw _privateConstructorUsedError;
+}
+
+/// @nodoc
+abstract class $LeadDeletionResponseCopyWith<$Res> {
+ factory $LeadDeletionResponseCopyWith(LeadDeletionResponse value,
+ $Res Function(LeadDeletionResponse) then) =
+ _$LeadDeletionResponseCopyWithImpl<$Res, LeadDeletionResponse>;
+ @useResult
+ $Res call({@JsonKey(name: '_id') String id, String email});
+}
+
+/// @nodoc
+class _$LeadDeletionResponseCopyWithImpl<$Res,
+ $Val extends LeadDeletionResponse>
+ implements $LeadDeletionResponseCopyWith<$Res> {
+ _$LeadDeletionResponseCopyWithImpl(this._value, this._then);
+
+ // ignore: unused_field
+ final $Val _value;
+ // ignore: unused_field
+ final $Res Function($Val) _then;
+
+ @pragma('vm:prefer-inline')
+ @override
+ $Res call({
+ Object? id = null,
+ Object? email = null,
+ }) {
+ return _then(_value.copyWith(
+ id: null == id
+ ? _value.id
+ : id // ignore: cast_nullable_to_non_nullable
+ as String,
+ email: null == email
+ ? _value.email
+ : email // ignore: cast_nullable_to_non_nullable
+ as String,
+ ) as $Val);
+ }
+}
+
+/// @nodoc
+abstract class _$$LeadDeletionResponseImplCopyWith<$Res>
+ implements $LeadDeletionResponseCopyWith<$Res> {
+ factory _$$LeadDeletionResponseImplCopyWith(_$LeadDeletionResponseImpl value,
+ $Res Function(_$LeadDeletionResponseImpl) then) =
+ __$$LeadDeletionResponseImplCopyWithImpl<$Res>;
+ @override
+ @useResult
+ $Res call({@JsonKey(name: '_id') String id, String email});
+}
+
+/// @nodoc
+class __$$LeadDeletionResponseImplCopyWithImpl<$Res>
+ extends _$LeadDeletionResponseCopyWithImpl<$Res, _$LeadDeletionResponseImpl>
+ implements _$$LeadDeletionResponseImplCopyWith<$Res> {
+ __$$LeadDeletionResponseImplCopyWithImpl(_$LeadDeletionResponseImpl _value,
+ $Res Function(_$LeadDeletionResponseImpl) _then)
+ : super(_value, _then);
+
+ @pragma('vm:prefer-inline')
+ @override
+ $Res call({
+ Object? id = null,
+ Object? email = null,
+ }) {
+ return _then(_$LeadDeletionResponseImpl(
+ id: null == id
+ ? _value.id
+ : id // ignore: cast_nullable_to_non_nullable
+ as String,
+ email: null == email
+ ? _value.email
+ : email // ignore: cast_nullable_to_non_nullable
+ as String,
+ ));
+ }
+}
+
+/// @nodoc
+@JsonSerializable()
+class _$LeadDeletionResponseImpl implements _LeadDeletionResponse {
+ const _$LeadDeletionResponseImpl(
+ {@JsonKey(name: '_id') required this.id, required this.email});
+
+ factory _$LeadDeletionResponseImpl.fromJson(Map json) =>
+ _$$LeadDeletionResponseImplFromJson(json);
+
+ @override
+ @JsonKey(name: '_id')
+ final String id;
+ @override
+ final String email;
+
+ @override
+ String toString() {
+ return 'LeadDeletionResponse(id: $id, email: $email)';
+ }
+
+ @override
+ bool operator ==(Object other) {
+ return identical(this, other) ||
+ (other.runtimeType == runtimeType &&
+ other is _$LeadDeletionResponseImpl &&
+ (identical(other.id, id) || other.id == id) &&
+ (identical(other.email, email) || other.email == email));
+ }
+
+ @JsonKey(ignore: true)
+ @override
+ int get hashCode => Object.hash(runtimeType, id, email);
+
+ @JsonKey(ignore: true)
+ @override
+ @pragma('vm:prefer-inline')
+ _$$LeadDeletionResponseImplCopyWith<_$LeadDeletionResponseImpl>
+ get copyWith =>
+ __$$LeadDeletionResponseImplCopyWithImpl<_$LeadDeletionResponseImpl>(
+ this, _$identity);
+
+ @override
+ Map toJson() {
+ return _$$LeadDeletionResponseImplToJson(
+ this,
+ );
+ }
+}
+
+abstract class _LeadDeletionResponse implements LeadDeletionResponse {
+ const factory _LeadDeletionResponse(
+ {@JsonKey(name: '_id') required final String id,
+ required final String email}) = _$LeadDeletionResponseImpl;
+
+ factory _LeadDeletionResponse.fromJson(Map json) =
+ _$LeadDeletionResponseImpl.fromJson;
+
+ @override
+ @JsonKey(name: '_id')
+ String get id;
+ @override
+ String get email;
+ @override
+ @JsonKey(ignore: true)
+ _$$LeadDeletionResponseImplCopyWith<_$LeadDeletionResponseImpl>
+ get copyWith => throw _privateConstructorUsedError;
+}
diff --git a/lib/src/models/lead_deletion_response.g.dart b/lib/src/models/lead_deletion_response.g.dart
new file mode 100644
index 0000000..ea43695
--- /dev/null
+++ b/lib/src/models/lead_deletion_response.g.dart
@@ -0,0 +1,21 @@
+// GENERATED CODE - DO NOT MODIFY BY HAND
+
+part of 'lead_deletion_response.dart';
+
+// **************************************************************************
+// JsonSerializableGenerator
+// **************************************************************************
+
+_$LeadDeletionResponseImpl _$$LeadDeletionResponseImplFromJson(
+ Map json) =>
+ _$LeadDeletionResponseImpl(
+ id: json['_id'] as String,
+ email: json['email'] as String,
+ );
+
+Map _$$LeadDeletionResponseImplToJson(
+ _$LeadDeletionResponseImpl instance) =>
+ {
+ '_id': instance.id,
+ 'email': instance.email,
+ };
diff --git a/lib/src/models/lead_details_response.dart b/lib/src/models/lead_details_response.dart
new file mode 100644
index 0000000..b503980
--- /dev/null
+++ b/lib/src/models/lead_details_response.dart
@@ -0,0 +1,22 @@
+import 'package:freezed_annotation/freezed_annotation.dart';
+
+part 'lead_details_response.freezed.dart';
+part 'lead_details_response.g.dart';
+
+/// A lead details response.
+@freezed
+class LeadDetailsResponse with _$LeadDetailsResponse {
+ /// Initializes a lead details response.
+ const factory LeadDetailsResponse({
+ @JsonKey(name: '_id') required String id,
+ required String email,
+ String? firstName,
+ String? lastName,
+ bool? isPaused,
+ String? campaignId,
+ }) = _LeadDetailsResponse;
+
+ /// Initializes a lead details response from JSON.
+ factory LeadDetailsResponse.fromJson(Map json) =>
+ _$LeadDetailsResponseFromJson(json);
+}
diff --git a/lib/src/models/lead_details_response.freezed.dart b/lib/src/models/lead_details_response.freezed.dart
new file mode 100644
index 0000000..49cde4f
--- /dev/null
+++ b/lib/src/models/lead_details_response.freezed.dart
@@ -0,0 +1,264 @@
+// coverage:ignore-file
+// GENERATED CODE - DO NOT MODIFY BY HAND
+// ignore_for_file: type=lint
+// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
+
+part of 'lead_details_response.dart';
+
+// **************************************************************************
+// FreezedGenerator
+// **************************************************************************
+
+T _$identity(T value) => value;
+
+final _privateConstructorUsedError = UnsupportedError(
+ 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models');
+
+LeadDetailsResponse _$LeadDetailsResponseFromJson(Map json) {
+ return _LeadDetailsResponse.fromJson(json);
+}
+
+/// @nodoc
+mixin _$LeadDetailsResponse {
+ @JsonKey(name: '_id')
+ String get id => throw _privateConstructorUsedError;
+ String get email => throw _privateConstructorUsedError;
+ String? get firstName => throw _privateConstructorUsedError;
+ String? get lastName => throw _privateConstructorUsedError;
+ bool? get isPaused => throw _privateConstructorUsedError;
+ String? get campaignId => throw _privateConstructorUsedError;
+
+ Map toJson() => throw _privateConstructorUsedError;
+ @JsonKey(ignore: true)
+ $LeadDetailsResponseCopyWith get copyWith =>
+ throw _privateConstructorUsedError;
+}
+
+/// @nodoc
+abstract class $LeadDetailsResponseCopyWith<$Res> {
+ factory $LeadDetailsResponseCopyWith(
+ LeadDetailsResponse value, $Res Function(LeadDetailsResponse) then) =
+ _$LeadDetailsResponseCopyWithImpl<$Res, LeadDetailsResponse>;
+ @useResult
+ $Res call(
+ {@JsonKey(name: '_id') String id,
+ String email,
+ String? firstName,
+ String? lastName,
+ bool? isPaused,
+ String? campaignId});
+}
+
+/// @nodoc
+class _$LeadDetailsResponseCopyWithImpl<$Res, $Val extends LeadDetailsResponse>
+ implements $LeadDetailsResponseCopyWith<$Res> {
+ _$LeadDetailsResponseCopyWithImpl(this._value, this._then);
+
+ // ignore: unused_field
+ final $Val _value;
+ // ignore: unused_field
+ final $Res Function($Val) _then;
+
+ @pragma('vm:prefer-inline')
+ @override
+ $Res call({
+ Object? id = null,
+ Object? email = null,
+ Object? firstName = freezed,
+ Object? lastName = freezed,
+ Object? isPaused = freezed,
+ Object? campaignId = freezed,
+ }) {
+ return _then(_value.copyWith(
+ id: null == id
+ ? _value.id
+ : id // ignore: cast_nullable_to_non_nullable
+ as String,
+ email: null == email
+ ? _value.email
+ : email // ignore: cast_nullable_to_non_nullable
+ as String,
+ firstName: freezed == firstName
+ ? _value.firstName
+ : firstName // ignore: cast_nullable_to_non_nullable
+ as String?,
+ lastName: freezed == lastName
+ ? _value.lastName
+ : lastName // ignore: cast_nullable_to_non_nullable
+ as String?,
+ isPaused: freezed == isPaused
+ ? _value.isPaused
+ : isPaused // ignore: cast_nullable_to_non_nullable
+ as bool?,
+ campaignId: freezed == campaignId
+ ? _value.campaignId
+ : campaignId // ignore: cast_nullable_to_non_nullable
+ as String?,
+ ) as $Val);
+ }
+}
+
+/// @nodoc
+abstract class _$$LeadDetailsResponseImplCopyWith<$Res>
+ implements $LeadDetailsResponseCopyWith<$Res> {
+ factory _$$LeadDetailsResponseImplCopyWith(_$LeadDetailsResponseImpl value,
+ $Res Function(_$LeadDetailsResponseImpl) then) =
+ __$$LeadDetailsResponseImplCopyWithImpl<$Res>;
+ @override
+ @useResult
+ $Res call(
+ {@JsonKey(name: '_id') String id,
+ String email,
+ String? firstName,
+ String? lastName,
+ bool? isPaused,
+ String? campaignId});
+}
+
+/// @nodoc
+class __$$LeadDetailsResponseImplCopyWithImpl<$Res>
+ extends _$LeadDetailsResponseCopyWithImpl<$Res, _$LeadDetailsResponseImpl>
+ implements _$$LeadDetailsResponseImplCopyWith<$Res> {
+ __$$LeadDetailsResponseImplCopyWithImpl(_$LeadDetailsResponseImpl _value,
+ $Res Function(_$LeadDetailsResponseImpl) _then)
+ : super(_value, _then);
+
+ @pragma('vm:prefer-inline')
+ @override
+ $Res call({
+ Object? id = null,
+ Object? email = null,
+ Object? firstName = freezed,
+ Object? lastName = freezed,
+ Object? isPaused = freezed,
+ Object? campaignId = freezed,
+ }) {
+ return _then(_$LeadDetailsResponseImpl(
+ id: null == id
+ ? _value.id
+ : id // ignore: cast_nullable_to_non_nullable
+ as String,
+ email: null == email
+ ? _value.email
+ : email // ignore: cast_nullable_to_non_nullable
+ as String,
+ firstName: freezed == firstName
+ ? _value.firstName
+ : firstName // ignore: cast_nullable_to_non_nullable
+ as String?,
+ lastName: freezed == lastName
+ ? _value.lastName
+ : lastName // ignore: cast_nullable_to_non_nullable
+ as String?,
+ isPaused: freezed == isPaused
+ ? _value.isPaused
+ : isPaused // ignore: cast_nullable_to_non_nullable
+ as bool?,
+ campaignId: freezed == campaignId
+ ? _value.campaignId
+ : campaignId // ignore: cast_nullable_to_non_nullable
+ as String?,
+ ));
+ }
+}
+
+/// @nodoc
+@JsonSerializable()
+class _$LeadDetailsResponseImpl implements _LeadDetailsResponse {
+ const _$LeadDetailsResponseImpl(
+ {@JsonKey(name: '_id') required this.id,
+ required this.email,
+ this.firstName,
+ this.lastName,
+ this.isPaused,
+ this.campaignId});
+
+ factory _$LeadDetailsResponseImpl.fromJson(Map json) =>
+ _$$LeadDetailsResponseImplFromJson(json);
+
+ @override
+ @JsonKey(name: '_id')
+ final String id;
+ @override
+ final String email;
+ @override
+ final String? firstName;
+ @override
+ final String? lastName;
+ @override
+ final bool? isPaused;
+ @override
+ final String? campaignId;
+
+ @override
+ String toString() {
+ return 'LeadDetailsResponse(id: $id, email: $email, firstName: $firstName, lastName: $lastName, isPaused: $isPaused, campaignId: $campaignId)';
+ }
+
+ @override
+ bool operator ==(Object other) {
+ return identical(this, other) ||
+ (other.runtimeType == runtimeType &&
+ other is _$LeadDetailsResponseImpl &&
+ (identical(other.id, id) || other.id == id) &&
+ (identical(other.email, email) || other.email == email) &&
+ (identical(other.firstName, firstName) ||
+ other.firstName == firstName) &&
+ (identical(other.lastName, lastName) ||
+ other.lastName == lastName) &&
+ (identical(other.isPaused, isPaused) ||
+ other.isPaused == isPaused) &&
+ (identical(other.campaignId, campaignId) ||
+ other.campaignId == campaignId));
+ }
+
+ @JsonKey(ignore: true)
+ @override
+ int get hashCode => Object.hash(
+ runtimeType, id, email, firstName, lastName, isPaused, campaignId);
+
+ @JsonKey(ignore: true)
+ @override
+ @pragma('vm:prefer-inline')
+ _$$LeadDetailsResponseImplCopyWith<_$LeadDetailsResponseImpl> get copyWith =>
+ __$$LeadDetailsResponseImplCopyWithImpl<_$LeadDetailsResponseImpl>(
+ this, _$identity);
+
+ @override
+ Map toJson() {
+ return _$$LeadDetailsResponseImplToJson(
+ this,
+ );
+ }
+}
+
+abstract class _LeadDetailsResponse implements LeadDetailsResponse {
+ const factory _LeadDetailsResponse(
+ {@JsonKey(name: '_id') required final String id,
+ required final String email,
+ final String? firstName,
+ final String? lastName,
+ final bool? isPaused,
+ final String? campaignId}) = _$LeadDetailsResponseImpl;
+
+ factory _LeadDetailsResponse.fromJson(Map json) =
+ _$LeadDetailsResponseImpl.fromJson;
+
+ @override
+ @JsonKey(name: '_id')
+ String get id;
+ @override
+ String get email;
+ @override
+ String? get firstName;
+ @override
+ String? get lastName;
+ @override
+ bool? get isPaused;
+ @override
+ String? get campaignId;
+ @override
+ @JsonKey(ignore: true)
+ _$$LeadDetailsResponseImplCopyWith<_$LeadDetailsResponseImpl> get copyWith =>
+ throw _privateConstructorUsedError;
+}
diff --git a/lib/src/models/lead_details_response.g.dart b/lib/src/models/lead_details_response.g.dart
new file mode 100644
index 0000000..3de349f
--- /dev/null
+++ b/lib/src/models/lead_details_response.g.dart
@@ -0,0 +1,29 @@
+// GENERATED CODE - DO NOT MODIFY BY HAND
+
+part of 'lead_details_response.dart';
+
+// **************************************************************************
+// JsonSerializableGenerator
+// **************************************************************************
+
+_$LeadDetailsResponseImpl _$$LeadDetailsResponseImplFromJson(
+ Map json) =>
+ _$LeadDetailsResponseImpl(
+ id: json['_id'] as String,
+ email: json['email'] as String,
+ firstName: json['firstName'] as String?,
+ lastName: json['lastName'] as String?,
+ isPaused: json['isPaused'] as bool?,
+ campaignId: json['campaignId'] as String?,
+ );
+
+Map _$$LeadDetailsResponseImplToJson(
+ _$LeadDetailsResponseImpl instance) =>
+ {
+ '_id': instance.id,
+ 'email': instance.email,
+ 'firstName': instance.firstName,
+ 'lastName': instance.lastName,
+ 'isPaused': instance.isPaused,
+ 'campaignId': instance.campaignId,
+ };
diff --git a/lib/src/models/lead_request.dart b/lib/src/models/lead_request.dart
new file mode 100644
index 0000000..2e6b5c7
--- /dev/null
+++ b/lib/src/models/lead_request.dart
@@ -0,0 +1,23 @@
+import 'package:freezed_annotation/freezed_annotation.dart';
+
+part 'lead_request.freezed.dart';
+part 'lead_request.g.dart';
+
+/// A [LeadRequest] class.
+@freezed
+class LeadRequest with _$LeadRequest {
+ /// Initializes a [LeadRequest].
+ const factory LeadRequest({
+ String? firstName,
+ String? lastName,
+ String? companyName,
+ String? icebreaker,
+ String? phone,
+ String? picture,
+ String? linkedinUrl,
+ }) = _LeadRequest;
+
+ /// Initializes a [LeadRequest] from JSON.
+ factory LeadRequest.fromJson(Map json) =>
+ _$LeadRequestFromJson(json);
+}
diff --git a/lib/src/models/lead_request.freezed.dart b/lib/src/models/lead_request.freezed.dart
new file mode 100644
index 0000000..a4400cb
--- /dev/null
+++ b/lib/src/models/lead_request.freezed.dart
@@ -0,0 +1,281 @@
+// coverage:ignore-file
+// GENERATED CODE - DO NOT MODIFY BY HAND
+// ignore_for_file: type=lint
+// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
+
+part of 'lead_request.dart';
+
+// **************************************************************************
+// FreezedGenerator
+// **************************************************************************
+
+T _$identity(T value) => value;
+
+final _privateConstructorUsedError = UnsupportedError(
+ 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models');
+
+LeadRequest _$LeadRequestFromJson(Map json) {
+ return _LeadRequest.fromJson(json);
+}
+
+/// @nodoc
+mixin _$LeadRequest {
+ String? get firstName => throw _privateConstructorUsedError;
+ String? get lastName => throw _privateConstructorUsedError;
+ String? get companyName => throw _privateConstructorUsedError;
+ String? get icebreaker => throw _privateConstructorUsedError;
+ String? get phone => throw _privateConstructorUsedError;
+ String? get picture => throw _privateConstructorUsedError;
+ String? get linkedinUrl => throw _privateConstructorUsedError;
+
+ Map toJson() => throw _privateConstructorUsedError;
+ @JsonKey(ignore: true)
+ $LeadRequestCopyWith get copyWith =>
+ throw _privateConstructorUsedError;
+}
+
+/// @nodoc
+abstract class $LeadRequestCopyWith<$Res> {
+ factory $LeadRequestCopyWith(
+ LeadRequest value, $Res Function(LeadRequest) then) =
+ _$LeadRequestCopyWithImpl<$Res, LeadRequest>;
+ @useResult
+ $Res call(
+ {String? firstName,
+ String? lastName,
+ String? companyName,
+ String? icebreaker,
+ String? phone,
+ String? picture,
+ String? linkedinUrl});
+}
+
+/// @nodoc
+class _$LeadRequestCopyWithImpl<$Res, $Val extends LeadRequest>
+ implements $LeadRequestCopyWith<$Res> {
+ _$LeadRequestCopyWithImpl(this._value, this._then);
+
+ // ignore: unused_field
+ final $Val _value;
+ // ignore: unused_field
+ final $Res Function($Val) _then;
+
+ @pragma('vm:prefer-inline')
+ @override
+ $Res call({
+ Object? firstName = freezed,
+ Object? lastName = freezed,
+ Object? companyName = freezed,
+ Object? icebreaker = freezed,
+ Object? phone = freezed,
+ Object? picture = freezed,
+ Object? linkedinUrl = freezed,
+ }) {
+ return _then(_value.copyWith(
+ firstName: freezed == firstName
+ ? _value.firstName
+ : firstName // ignore: cast_nullable_to_non_nullable
+ as String?,
+ lastName: freezed == lastName
+ ? _value.lastName
+ : lastName // ignore: cast_nullable_to_non_nullable
+ as String?,
+ companyName: freezed == companyName
+ ? _value.companyName
+ : companyName // ignore: cast_nullable_to_non_nullable
+ as String?,
+ icebreaker: freezed == icebreaker
+ ? _value.icebreaker
+ : icebreaker // ignore: cast_nullable_to_non_nullable
+ as String?,
+ phone: freezed == phone
+ ? _value.phone
+ : phone // ignore: cast_nullable_to_non_nullable
+ as String?,
+ picture: freezed == picture
+ ? _value.picture
+ : picture // ignore: cast_nullable_to_non_nullable
+ as String?,
+ linkedinUrl: freezed == linkedinUrl
+ ? _value.linkedinUrl
+ : linkedinUrl // ignore: cast_nullable_to_non_nullable
+ as String?,
+ ) as $Val);
+ }
+}
+
+/// @nodoc
+abstract class _$$LeadRequestImplCopyWith<$Res>
+ implements $LeadRequestCopyWith<$Res> {
+ factory _$$LeadRequestImplCopyWith(
+ _$LeadRequestImpl value, $Res Function(_$LeadRequestImpl) then) =
+ __$$LeadRequestImplCopyWithImpl<$Res>;
+ @override
+ @useResult
+ $Res call(
+ {String? firstName,
+ String? lastName,
+ String? companyName,
+ String? icebreaker,
+ String? phone,
+ String? picture,
+ String? linkedinUrl});
+}
+
+/// @nodoc
+class __$$LeadRequestImplCopyWithImpl<$Res>
+ extends _$LeadRequestCopyWithImpl<$Res, _$LeadRequestImpl>
+ implements _$$LeadRequestImplCopyWith<$Res> {
+ __$$LeadRequestImplCopyWithImpl(
+ _$LeadRequestImpl _value, $Res Function(_$LeadRequestImpl) _then)
+ : super(_value, _then);
+
+ @pragma('vm:prefer-inline')
+ @override
+ $Res call({
+ Object? firstName = freezed,
+ Object? lastName = freezed,
+ Object? companyName = freezed,
+ Object? icebreaker = freezed,
+ Object? phone = freezed,
+ Object? picture = freezed,
+ Object? linkedinUrl = freezed,
+ }) {
+ return _then(_$LeadRequestImpl(
+ firstName: freezed == firstName
+ ? _value.firstName
+ : firstName // ignore: cast_nullable_to_non_nullable
+ as String?,
+ lastName: freezed == lastName
+ ? _value.lastName
+ : lastName // ignore: cast_nullable_to_non_nullable
+ as String?,
+ companyName: freezed == companyName
+ ? _value.companyName
+ : companyName // ignore: cast_nullable_to_non_nullable
+ as String?,
+ icebreaker: freezed == icebreaker
+ ? _value.icebreaker
+ : icebreaker // ignore: cast_nullable_to_non_nullable
+ as String?,
+ phone: freezed == phone
+ ? _value.phone
+ : phone // ignore: cast_nullable_to_non_nullable
+ as String?,
+ picture: freezed == picture
+ ? _value.picture
+ : picture // ignore: cast_nullable_to_non_nullable
+ as String?,
+ linkedinUrl: freezed == linkedinUrl
+ ? _value.linkedinUrl
+ : linkedinUrl // ignore: cast_nullable_to_non_nullable
+ as String?,
+ ));
+ }
+}
+
+/// @nodoc
+@JsonSerializable()
+class _$LeadRequestImpl implements _LeadRequest {
+ const _$LeadRequestImpl(
+ {this.firstName,
+ this.lastName,
+ this.companyName,
+ this.icebreaker,
+ this.phone,
+ this.picture,
+ this.linkedinUrl});
+
+ factory _$LeadRequestImpl.fromJson(Map json) =>
+ _$$LeadRequestImplFromJson(json);
+
+ @override
+ final String? firstName;
+ @override
+ final String? lastName;
+ @override
+ final String? companyName;
+ @override
+ final String? icebreaker;
+ @override
+ final String? phone;
+ @override
+ final String? picture;
+ @override
+ final String? linkedinUrl;
+
+ @override
+ String toString() {
+ return 'LeadRequest(firstName: $firstName, lastName: $lastName, companyName: $companyName, icebreaker: $icebreaker, phone: $phone, picture: $picture, linkedinUrl: $linkedinUrl)';
+ }
+
+ @override
+ bool operator ==(Object other) {
+ return identical(this, other) ||
+ (other.runtimeType == runtimeType &&
+ other is _$LeadRequestImpl &&
+ (identical(other.firstName, firstName) ||
+ other.firstName == firstName) &&
+ (identical(other.lastName, lastName) ||
+ other.lastName == lastName) &&
+ (identical(other.companyName, companyName) ||
+ other.companyName == companyName) &&
+ (identical(other.icebreaker, icebreaker) ||
+ other.icebreaker == icebreaker) &&
+ (identical(other.phone, phone) || other.phone == phone) &&
+ (identical(other.picture, picture) || other.picture == picture) &&
+ (identical(other.linkedinUrl, linkedinUrl) ||
+ other.linkedinUrl == linkedinUrl));
+ }
+
+ @JsonKey(ignore: true)
+ @override
+ int get hashCode => Object.hash(runtimeType, firstName, lastName, companyName,
+ icebreaker, phone, picture, linkedinUrl);
+
+ @JsonKey(ignore: true)
+ @override
+ @pragma('vm:prefer-inline')
+ _$$LeadRequestImplCopyWith<_$LeadRequestImpl> get copyWith =>
+ __$$LeadRequestImplCopyWithImpl<_$LeadRequestImpl>(this, _$identity);
+
+ @override
+ Map toJson() {
+ return _$$LeadRequestImplToJson(
+ this,
+ );
+ }
+}
+
+abstract class _LeadRequest implements LeadRequest {
+ const factory _LeadRequest(
+ {final String? firstName,
+ final String? lastName,
+ final String? companyName,
+ final String? icebreaker,
+ final String? phone,
+ final String? picture,
+ final String? linkedinUrl}) = _$LeadRequestImpl;
+
+ factory _LeadRequest.fromJson(Map json) =
+ _$LeadRequestImpl.fromJson;
+
+ @override
+ String? get firstName;
+ @override
+ String? get lastName;
+ @override
+ String? get companyName;
+ @override
+ String? get icebreaker;
+ @override
+ String? get phone;
+ @override
+ String? get picture;
+ @override
+ String? get linkedinUrl;
+ @override
+ @JsonKey(ignore: true)
+ _$$LeadRequestImplCopyWith<_$LeadRequestImpl> get copyWith =>
+ throw _privateConstructorUsedError;
+}
diff --git a/lib/src/models/lead_request.g.dart b/lib/src/models/lead_request.g.dart
new file mode 100644
index 0000000..97a357e
--- /dev/null
+++ b/lib/src/models/lead_request.g.dart
@@ -0,0 +1,29 @@
+// GENERATED CODE - DO NOT MODIFY BY HAND
+
+part of 'lead_request.dart';
+
+// **************************************************************************
+// JsonSerializableGenerator
+// **************************************************************************
+
+_$LeadRequestImpl _$$LeadRequestImplFromJson(Map json) =>
+ _$LeadRequestImpl(
+ firstName: json['firstName'] as String?,
+ lastName: json['lastName'] as String?,
+ companyName: json['companyName'] as String?,
+ icebreaker: json['icebreaker'] as String?,
+ phone: json['phone'] as String?,
+ picture: json['picture'] as String?,
+ linkedinUrl: json['linkedinUrl'] as String?,
+ );
+
+Map _$$LeadRequestImplToJson(_$LeadRequestImpl instance) =>
+ {
+ 'firstName': instance.firstName,
+ 'lastName': instance.lastName,
+ 'companyName': instance.companyName,
+ 'icebreaker': instance.icebreaker,
+ 'phone': instance.phone,
+ 'picture': instance.picture,
+ 'linkedinUrl': instance.linkedinUrl,
+ };
diff --git a/lib/src/models/lead_response.dart b/lib/src/models/lead_response.dart
new file mode 100644
index 0000000..592df4c
--- /dev/null
+++ b/lib/src/models/lead_response.dart
@@ -0,0 +1,29 @@
+import 'package:freezed_annotation/freezed_annotation.dart';
+
+part 'lead_response.freezed.dart';
+part 'lead_response.g.dart';
+
+/// A [LeadResponse] class.
+@freezed
+class LeadResponse with _$LeadResponse {
+ /// Initializes a [LeadResponse].
+ const factory LeadResponse({
+ required String campaignId,
+ required String campaignName,
+ required String leadUrl,
+ @JsonKey(name: '_id') required String id,
+ required bool isPaused,
+ required String email,
+ String? firstName,
+ String? lastName,
+ String? companyName,
+ String? icebreaker,
+ String? phone,
+ String? picture,
+ String? linkedinUrl,
+ }) = _LeadResponse;
+
+ /// Initializes a [LeadResponse] from JSON.
+ factory LeadResponse.fromJson(Map json) =>
+ _$LeadResponseFromJson(json);
+}
diff --git a/lib/src/models/lead_response.freezed.dart b/lib/src/models/lead_response.freezed.dart
new file mode 100644
index 0000000..9a1a350
--- /dev/null
+++ b/lib/src/models/lead_response.freezed.dart
@@ -0,0 +1,420 @@
+// coverage:ignore-file
+// GENERATED CODE - DO NOT MODIFY BY HAND
+// ignore_for_file: type=lint
+// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
+
+part of 'lead_response.dart';
+
+// **************************************************************************
+// FreezedGenerator
+// **************************************************************************
+
+T _$identity(T value) => value;
+
+final _privateConstructorUsedError = UnsupportedError(
+ 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models');
+
+LeadResponse _$LeadResponseFromJson(Map json) {
+ return _LeadResponse.fromJson(json);
+}
+
+/// @nodoc
+mixin _$LeadResponse {
+ String get campaignId => throw _privateConstructorUsedError;
+ String get campaignName => throw _privateConstructorUsedError;
+ String get leadUrl => throw _privateConstructorUsedError;
+ @JsonKey(name: '_id')
+ String get id => throw _privateConstructorUsedError;
+ bool get isPaused => throw _privateConstructorUsedError;
+ String get email => throw _privateConstructorUsedError;
+ String? get firstName => throw _privateConstructorUsedError;
+ String? get lastName => throw _privateConstructorUsedError;
+ String? get companyName => throw _privateConstructorUsedError;
+ String? get icebreaker => throw _privateConstructorUsedError;
+ String? get phone => throw _privateConstructorUsedError;
+ String? get picture => throw _privateConstructorUsedError;
+ String? get linkedinUrl => throw _privateConstructorUsedError;
+
+ Map toJson() => throw _privateConstructorUsedError;
+ @JsonKey(ignore: true)
+ $LeadResponseCopyWith get copyWith =>
+ throw _privateConstructorUsedError;
+}
+
+/// @nodoc
+abstract class $LeadResponseCopyWith<$Res> {
+ factory $LeadResponseCopyWith(
+ LeadResponse value, $Res Function(LeadResponse) then) =
+ _$LeadResponseCopyWithImpl<$Res, LeadResponse>;
+ @useResult
+ $Res call(
+ {String campaignId,
+ String campaignName,
+ String leadUrl,
+ @JsonKey(name: '_id') String id,
+ bool isPaused,
+ String email,
+ String? firstName,
+ String? lastName,
+ String? companyName,
+ String? icebreaker,
+ String? phone,
+ String? picture,
+ String? linkedinUrl});
+}
+
+/// @nodoc
+class _$LeadResponseCopyWithImpl<$Res, $Val extends LeadResponse>
+ implements $LeadResponseCopyWith<$Res> {
+ _$LeadResponseCopyWithImpl(this._value, this._then);
+
+ // ignore: unused_field
+ final $Val _value;
+ // ignore: unused_field
+ final $Res Function($Val) _then;
+
+ @pragma('vm:prefer-inline')
+ @override
+ $Res call({
+ Object? campaignId = null,
+ Object? campaignName = null,
+ Object? leadUrl = null,
+ Object? id = null,
+ Object? isPaused = null,
+ Object? email = null,
+ Object? firstName = freezed,
+ Object? lastName = freezed,
+ Object? companyName = freezed,
+ Object? icebreaker = freezed,
+ Object? phone = freezed,
+ Object? picture = freezed,
+ Object? linkedinUrl = freezed,
+ }) {
+ return _then(_value.copyWith(
+ campaignId: null == campaignId
+ ? _value.campaignId
+ : campaignId // ignore: cast_nullable_to_non_nullable
+ as String,
+ campaignName: null == campaignName
+ ? _value.campaignName
+ : campaignName // ignore: cast_nullable_to_non_nullable
+ as String,
+ leadUrl: null == leadUrl
+ ? _value.leadUrl
+ : leadUrl // ignore: cast_nullable_to_non_nullable
+ as String,
+ id: null == id
+ ? _value.id
+ : id // ignore: cast_nullable_to_non_nullable
+ as String,
+ isPaused: null == isPaused
+ ? _value.isPaused
+ : isPaused // ignore: cast_nullable_to_non_nullable
+ as bool,
+ email: null == email
+ ? _value.email
+ : email // ignore: cast_nullable_to_non_nullable
+ as String,
+ firstName: freezed == firstName
+ ? _value.firstName
+ : firstName // ignore: cast_nullable_to_non_nullable
+ as String?,
+ lastName: freezed == lastName
+ ? _value.lastName
+ : lastName // ignore: cast_nullable_to_non_nullable
+ as String?,
+ companyName: freezed == companyName
+ ? _value.companyName
+ : companyName // ignore: cast_nullable_to_non_nullable
+ as String?,
+ icebreaker: freezed == icebreaker
+ ? _value.icebreaker
+ : icebreaker // ignore: cast_nullable_to_non_nullable
+ as String?,
+ phone: freezed == phone
+ ? _value.phone
+ : phone // ignore: cast_nullable_to_non_nullable
+ as String?,
+ picture: freezed == picture
+ ? _value.picture
+ : picture // ignore: cast_nullable_to_non_nullable
+ as String?,
+ linkedinUrl: freezed == linkedinUrl
+ ? _value.linkedinUrl
+ : linkedinUrl // ignore: cast_nullable_to_non_nullable
+ as String?,
+ ) as $Val);
+ }
+}
+
+/// @nodoc
+abstract class _$$LeadResponseImplCopyWith<$Res>
+ implements $LeadResponseCopyWith<$Res> {
+ factory _$$LeadResponseImplCopyWith(
+ _$LeadResponseImpl value, $Res Function(_$LeadResponseImpl) then) =
+ __$$LeadResponseImplCopyWithImpl<$Res>;
+ @override
+ @useResult
+ $Res call(
+ {String campaignId,
+ String campaignName,
+ String leadUrl,
+ @JsonKey(name: '_id') String id,
+ bool isPaused,
+ String email,
+ String? firstName,
+ String? lastName,
+ String? companyName,
+ String? icebreaker,
+ String? phone,
+ String? picture,
+ String? linkedinUrl});
+}
+
+/// @nodoc
+class __$$LeadResponseImplCopyWithImpl<$Res>
+ extends _$LeadResponseCopyWithImpl<$Res, _$LeadResponseImpl>
+ implements _$$LeadResponseImplCopyWith<$Res> {
+ __$$LeadResponseImplCopyWithImpl(
+ _$LeadResponseImpl _value, $Res Function(_$LeadResponseImpl) _then)
+ : super(_value, _then);
+
+ @pragma('vm:prefer-inline')
+ @override
+ $Res call({
+ Object? campaignId = null,
+ Object? campaignName = null,
+ Object? leadUrl = null,
+ Object? id = null,
+ Object? isPaused = null,
+ Object? email = null,
+ Object? firstName = freezed,
+ Object? lastName = freezed,
+ Object? companyName = freezed,
+ Object? icebreaker = freezed,
+ Object? phone = freezed,
+ Object? picture = freezed,
+ Object? linkedinUrl = freezed,
+ }) {
+ return _then(_$LeadResponseImpl(
+ campaignId: null == campaignId
+ ? _value.campaignId
+ : campaignId // ignore: cast_nullable_to_non_nullable
+ as String,
+ campaignName: null == campaignName
+ ? _value.campaignName
+ : campaignName // ignore: cast_nullable_to_non_nullable
+ as String,
+ leadUrl: null == leadUrl
+ ? _value.leadUrl
+ : leadUrl // ignore: cast_nullable_to_non_nullable
+ as String,
+ id: null == id
+ ? _value.id
+ : id // ignore: cast_nullable_to_non_nullable
+ as String,
+ isPaused: null == isPaused
+ ? _value.isPaused
+ : isPaused // ignore: cast_nullable_to_non_nullable
+ as bool,
+ email: null == email
+ ? _value.email
+ : email // ignore: cast_nullable_to_non_nullable
+ as String,
+ firstName: freezed == firstName
+ ? _value.firstName
+ : firstName // ignore: cast_nullable_to_non_nullable
+ as String?,
+ lastName: freezed == lastName
+ ? _value.lastName
+ : lastName // ignore: cast_nullable_to_non_nullable
+ as String?,
+ companyName: freezed == companyName
+ ? _value.companyName
+ : companyName // ignore: cast_nullable_to_non_nullable
+ as String?,
+ icebreaker: freezed == icebreaker
+ ? _value.icebreaker
+ : icebreaker // ignore: cast_nullable_to_non_nullable
+ as String?,
+ phone: freezed == phone
+ ? _value.phone
+ : phone // ignore: cast_nullable_to_non_nullable
+ as String?,
+ picture: freezed == picture
+ ? _value.picture
+ : picture // ignore: cast_nullable_to_non_nullable
+ as String?,
+ linkedinUrl: freezed == linkedinUrl
+ ? _value.linkedinUrl
+ : linkedinUrl // ignore: cast_nullable_to_non_nullable
+ as String?,
+ ));
+ }
+}
+
+/// @nodoc
+@JsonSerializable()
+class _$LeadResponseImpl implements _LeadResponse {
+ const _$LeadResponseImpl(
+ {required this.campaignId,
+ required this.campaignName,
+ required this.leadUrl,
+ @JsonKey(name: '_id') required this.id,
+ required this.isPaused,
+ required this.email,
+ this.firstName,
+ this.lastName,
+ this.companyName,
+ this.icebreaker,
+ this.phone,
+ this.picture,
+ this.linkedinUrl});
+
+ factory _$LeadResponseImpl.fromJson(Map json) =>
+ _$$LeadResponseImplFromJson(json);
+
+ @override
+ final String campaignId;
+ @override
+ final String campaignName;
+ @override
+ final String leadUrl;
+ @override
+ @JsonKey(name: '_id')
+ final String id;
+ @override
+ final bool isPaused;
+ @override
+ final String email;
+ @override
+ final String? firstName;
+ @override
+ final String? lastName;
+ @override
+ final String? companyName;
+ @override
+ final String? icebreaker;
+ @override
+ final String? phone;
+ @override
+ final String? picture;
+ @override
+ final String? linkedinUrl;
+
+ @override
+ String toString() {
+ return 'LeadResponse(campaignId: $campaignId, campaignName: $campaignName, leadUrl: $leadUrl, id: $id, isPaused: $isPaused, email: $email, firstName: $firstName, lastName: $lastName, companyName: $companyName, icebreaker: $icebreaker, phone: $phone, picture: $picture, linkedinUrl: $linkedinUrl)';
+ }
+
+ @override
+ bool operator ==(Object other) {
+ return identical(this, other) ||
+ (other.runtimeType == runtimeType &&
+ other is _$LeadResponseImpl &&
+ (identical(other.campaignId, campaignId) ||
+ other.campaignId == campaignId) &&
+ (identical(other.campaignName, campaignName) ||
+ other.campaignName == campaignName) &&
+ (identical(other.leadUrl, leadUrl) || other.leadUrl == leadUrl) &&
+ (identical(other.id, id) || other.id == id) &&
+ (identical(other.isPaused, isPaused) ||
+ other.isPaused == isPaused) &&
+ (identical(other.email, email) || other.email == email) &&
+ (identical(other.firstName, firstName) ||
+ other.firstName == firstName) &&
+ (identical(other.lastName, lastName) ||
+ other.lastName == lastName) &&
+ (identical(other.companyName, companyName) ||
+ other.companyName == companyName) &&
+ (identical(other.icebreaker, icebreaker) ||
+ other.icebreaker == icebreaker) &&
+ (identical(other.phone, phone) || other.phone == phone) &&
+ (identical(other.picture, picture) || other.picture == picture) &&
+ (identical(other.linkedinUrl, linkedinUrl) ||
+ other.linkedinUrl == linkedinUrl));
+ }
+
+ @JsonKey(ignore: true)
+ @override
+ int get hashCode => Object.hash(
+ runtimeType,
+ campaignId,
+ campaignName,
+ leadUrl,
+ id,
+ isPaused,
+ email,
+ firstName,
+ lastName,
+ companyName,
+ icebreaker,
+ phone,
+ picture,
+ linkedinUrl);
+
+ @JsonKey(ignore: true)
+ @override
+ @pragma('vm:prefer-inline')
+ _$$LeadResponseImplCopyWith<_$LeadResponseImpl> get copyWith =>
+ __$$LeadResponseImplCopyWithImpl<_$LeadResponseImpl>(this, _$identity);
+
+ @override
+ Map toJson() {
+ return _$$LeadResponseImplToJson(
+ this,
+ );
+ }
+}
+
+abstract class _LeadResponse implements LeadResponse {
+ const factory _LeadResponse(
+ {required final String campaignId,
+ required final String campaignName,
+ required final String leadUrl,
+ @JsonKey(name: '_id') required final String id,
+ required final bool isPaused,
+ required final String email,
+ final String? firstName,
+ final String? lastName,
+ final String? companyName,
+ final String? icebreaker,
+ final String? phone,
+ final String? picture,
+ final String? linkedinUrl}) = _$LeadResponseImpl;
+
+ factory _LeadResponse.fromJson(Map json) =
+ _$LeadResponseImpl.fromJson;
+
+ @override
+ String get campaignId;
+ @override
+ String get campaignName;
+ @override
+ String get leadUrl;
+ @override
+ @JsonKey(name: '_id')
+ String get id;
+ @override
+ bool get isPaused;
+ @override
+ String get email;
+ @override
+ String? get firstName;
+ @override
+ String? get lastName;
+ @override
+ String? get companyName;
+ @override
+ String? get icebreaker;
+ @override
+ String? get phone;
+ @override
+ String? get picture;
+ @override
+ String? get linkedinUrl;
+ @override
+ @JsonKey(ignore: true)
+ _$$LeadResponseImplCopyWith<_$LeadResponseImpl> get copyWith =>
+ throw _privateConstructorUsedError;
+}
diff --git a/lib/src/models/lead_response.g.dart b/lib/src/models/lead_response.g.dart
new file mode 100644
index 0000000..5ac895d
--- /dev/null
+++ b/lib/src/models/lead_response.g.dart
@@ -0,0 +1,41 @@
+// GENERATED CODE - DO NOT MODIFY BY HAND
+
+part of 'lead_response.dart';
+
+// **************************************************************************
+// JsonSerializableGenerator
+// **************************************************************************
+
+_$LeadResponseImpl _$$LeadResponseImplFromJson(Map json) =>
+ _$LeadResponseImpl(
+ campaignId: json['campaignId'] as String,
+ campaignName: json['campaignName'] as String,
+ leadUrl: json['leadUrl'] as String,
+ id: json['_id'] as String,
+ isPaused: json['isPaused'] as bool,
+ email: json['email'] as String,
+ firstName: json['firstName'] as String?,
+ lastName: json['lastName'] as String?,
+ companyName: json['companyName'] as String?,
+ icebreaker: json['icebreaker'] as String?,
+ phone: json['phone'] as String?,
+ picture: json['picture'] as String?,
+ linkedinUrl: json['linkedinUrl'] as String?,
+ );
+
+Map _$$LeadResponseImplToJson(_$LeadResponseImpl instance) =>
+ {
+ 'campaignId': instance.campaignId,
+ 'campaignName': instance.campaignName,
+ 'leadUrl': instance.leadUrl,
+ '_id': instance.id,
+ 'isPaused': instance.isPaused,
+ 'email': instance.email,
+ 'firstName': instance.firstName,
+ 'lastName': instance.lastName,
+ 'companyName': instance.companyName,
+ 'icebreaker': instance.icebreaker,
+ 'phone': instance.phone,
+ 'picture': instance.picture,
+ 'linkedinUrl': instance.linkedinUrl,
+ };
diff --git a/lib/src/models/models.dart b/lib/src/models/models.dart
new file mode 100644
index 0000000..5b7e07a
--- /dev/null
+++ b/lib/src/models/models.dart
@@ -0,0 +1,18 @@
+export 'activity.dart';
+export 'campaign.dart';
+export 'export_set_email_result.dart';
+export 'export_start_result.dart';
+export 'export_status_result.dart';
+export 'interested_lead_response.dart';
+export 'lead_action_response.dart';
+export 'lead_deletion_response.dart';
+export 'lead_details_response.dart';
+export 'lead_request.dart';
+export 'lead_response.dart';
+export 'paused_lead_response.dart';
+export 'team.dart';
+export 'unsubscribe_lead_response.dart';
+export 'unsubscribe_response.dart';
+export 'unsubscribe_delete_response.dart';
+export 'hook.dart';
+export 'hook_response.dart';
diff --git a/lib/src/models/paused_lead_response.dart b/lib/src/models/paused_lead_response.dart
new file mode 100644
index 0000000..47caa25
--- /dev/null
+++ b/lib/src/models/paused_lead_response.dart
@@ -0,0 +1,20 @@
+import 'package:freezed_annotation/freezed_annotation.dart';
+
+part 'paused_lead_response.freezed.dart';
+part 'paused_lead_response.g.dart';
+
+/// A paused lead response.
+@freezed
+class PausedLeadResponse with _$PausedLeadResponse {
+ /// Initializes a paused lead response.
+ const factory PausedLeadResponse({
+ @JsonKey(name: '_id') required String id,
+ required String email,
+ String? firstName,
+ String? lastName,
+ }) = _PausedLeadResponse;
+
+ /// Initializes a paused lead response from JSON.
+ factory PausedLeadResponse.fromJson(Map json) =>
+ _$PausedLeadResponseFromJson(json);
+}
diff --git a/lib/src/models/paused_lead_response.freezed.dart b/lib/src/models/paused_lead_response.freezed.dart
new file mode 100644
index 0000000..a3afd54
--- /dev/null
+++ b/lib/src/models/paused_lead_response.freezed.dart
@@ -0,0 +1,221 @@
+// coverage:ignore-file
+// GENERATED CODE - DO NOT MODIFY BY HAND
+// ignore_for_file: type=lint
+// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
+
+part of 'paused_lead_response.dart';
+
+// **************************************************************************
+// FreezedGenerator
+// **************************************************************************
+
+T _$identity(T value) => value;
+
+final _privateConstructorUsedError = UnsupportedError(
+ 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models');
+
+PausedLeadResponse _$PausedLeadResponseFromJson(Map json) {
+ return _PausedLeadResponse.fromJson(json);
+}
+
+/// @nodoc
+mixin _$PausedLeadResponse {
+ @JsonKey(name: '_id')
+ String get id => throw _privateConstructorUsedError;
+ String get email => throw _privateConstructorUsedError;
+ String? get firstName => throw _privateConstructorUsedError;
+ String? get lastName => throw _privateConstructorUsedError;
+
+ Map toJson() => throw _privateConstructorUsedError;
+ @JsonKey(ignore: true)
+ $PausedLeadResponseCopyWith get copyWith =>
+ throw _privateConstructorUsedError;
+}
+
+/// @nodoc
+abstract class $PausedLeadResponseCopyWith<$Res> {
+ factory $PausedLeadResponseCopyWith(
+ PausedLeadResponse value, $Res Function(PausedLeadResponse) then) =
+ _$PausedLeadResponseCopyWithImpl<$Res, PausedLeadResponse>;
+ @useResult
+ $Res call(
+ {@JsonKey(name: '_id') String id,
+ String email,
+ String? firstName,
+ String? lastName});
+}
+
+/// @nodoc
+class _$PausedLeadResponseCopyWithImpl<$Res, $Val extends PausedLeadResponse>
+ implements $PausedLeadResponseCopyWith<$Res> {
+ _$PausedLeadResponseCopyWithImpl(this._value, this._then);
+
+ // ignore: unused_field
+ final $Val _value;
+ // ignore: unused_field
+ final $Res Function($Val) _then;
+
+ @pragma('vm:prefer-inline')
+ @override
+ $Res call({
+ Object? id = null,
+ Object? email = null,
+ Object? firstName = freezed,
+ Object? lastName = freezed,
+ }) {
+ return _then(_value.copyWith(
+ id: null == id
+ ? _value.id
+ : id // ignore: cast_nullable_to_non_nullable
+ as String,
+ email: null == email
+ ? _value.email
+ : email // ignore: cast_nullable_to_non_nullable
+ as String,
+ firstName: freezed == firstName
+ ? _value.firstName
+ : firstName // ignore: cast_nullable_to_non_nullable
+ as String?,
+ lastName: freezed == lastName
+ ? _value.lastName
+ : lastName // ignore: cast_nullable_to_non_nullable
+ as String?,
+ ) as $Val);
+ }
+}
+
+/// @nodoc
+abstract class _$$PausedLeadResponseImplCopyWith<$Res>
+ implements $PausedLeadResponseCopyWith<$Res> {
+ factory _$$PausedLeadResponseImplCopyWith(_$PausedLeadResponseImpl value,
+ $Res Function(_$PausedLeadResponseImpl) then) =
+ __$$PausedLeadResponseImplCopyWithImpl<$Res>;
+ @override
+ @useResult
+ $Res call(
+ {@JsonKey(name: '_id') String id,
+ String email,
+ String? firstName,
+ String? lastName});
+}
+
+/// @nodoc
+class __$$PausedLeadResponseImplCopyWithImpl<$Res>
+ extends _$PausedLeadResponseCopyWithImpl<$Res, _$PausedLeadResponseImpl>
+ implements _$$PausedLeadResponseImplCopyWith<$Res> {
+ __$$PausedLeadResponseImplCopyWithImpl(_$PausedLeadResponseImpl _value,
+ $Res Function(_$PausedLeadResponseImpl) _then)
+ : super(_value, _then);
+
+ @pragma('vm:prefer-inline')
+ @override
+ $Res call({
+ Object? id = null,
+ Object? email = null,
+ Object? firstName = freezed,
+ Object? lastName = freezed,
+ }) {
+ return _then(_$PausedLeadResponseImpl(
+ id: null == id
+ ? _value.id
+ : id // ignore: cast_nullable_to_non_nullable
+ as String,
+ email: null == email
+ ? _value.email
+ : email // ignore: cast_nullable_to_non_nullable
+ as String,
+ firstName: freezed == firstName
+ ? _value.firstName
+ : firstName // ignore: cast_nullable_to_non_nullable
+ as String?,
+ lastName: freezed == lastName
+ ? _value.lastName
+ : lastName // ignore: cast_nullable_to_non_nullable
+ as String?,
+ ));
+ }
+}
+
+/// @nodoc
+@JsonSerializable()
+class _$PausedLeadResponseImpl implements _PausedLeadResponse {
+ const _$PausedLeadResponseImpl(
+ {@JsonKey(name: '_id') required this.id,
+ required this.email,
+ this.firstName,
+ this.lastName});
+
+ factory _$PausedLeadResponseImpl.fromJson(Map json) =>
+ _$$PausedLeadResponseImplFromJson(json);
+
+ @override
+ @JsonKey(name: '_id')
+ final String id;
+ @override
+ final String email;
+ @override
+ final String? firstName;
+ @override
+ final String? lastName;
+
+ @override
+ String toString() {
+ return 'PausedLeadResponse(id: $id, email: $email, firstName: $firstName, lastName: $lastName)';
+ }
+
+ @override
+ bool operator ==(Object other) {
+ return identical(this, other) ||
+ (other.runtimeType == runtimeType &&
+ other is _$PausedLeadResponseImpl &&
+ (identical(other.id, id) || other.id == id) &&
+ (identical(other.email, email) || other.email == email) &&
+ (identical(other.firstName, firstName) ||
+ other.firstName == firstName) &&
+ (identical(other.lastName, lastName) ||
+ other.lastName == lastName));
+ }
+
+ @JsonKey(ignore: true)
+ @override
+ int get hashCode => Object.hash(runtimeType, id, email, firstName, lastName);
+
+ @JsonKey(ignore: true)
+ @override
+ @pragma('vm:prefer-inline')
+ _$$PausedLeadResponseImplCopyWith<_$PausedLeadResponseImpl> get copyWith =>
+ __$$PausedLeadResponseImplCopyWithImpl<_$PausedLeadResponseImpl>(
+ this, _$identity);
+
+ @override
+ Map toJson() {
+ return _$$PausedLeadResponseImplToJson(
+ this,
+ );
+ }
+}
+
+abstract class _PausedLeadResponse implements PausedLeadResponse {
+ const factory _PausedLeadResponse(
+ {@JsonKey(name: '_id') required final String id,
+ required final String email,
+ final String? firstName,
+ final String? lastName}) = _$PausedLeadResponseImpl;
+
+ factory _PausedLeadResponse.fromJson(Map json) =
+ _$PausedLeadResponseImpl.fromJson;
+
+ @override
+ @JsonKey(name: '_id')
+ String get id;
+ @override
+ String get email;
+ @override
+ String? get firstName;
+ @override
+ String? get lastName;
+ @override
+ @JsonKey(ignore: true)
+ _$$PausedLeadResponseImplCopyWith<_$PausedLeadResponseImpl> get copyWith =>
+ throw _privateConstructorUsedError;
+}
diff --git a/lib/src/models/paused_lead_response.g.dart b/lib/src/models/paused_lead_response.g.dart
new file mode 100644
index 0000000..54850a0
--- /dev/null
+++ b/lib/src/models/paused_lead_response.g.dart
@@ -0,0 +1,25 @@
+// GENERATED CODE - DO NOT MODIFY BY HAND
+
+part of 'paused_lead_response.dart';
+
+// **************************************************************************
+// JsonSerializableGenerator
+// **************************************************************************
+
+_$PausedLeadResponseImpl _$$PausedLeadResponseImplFromJson(
+ Map json) =>
+ _$PausedLeadResponseImpl(
+ id: json['_id'] as String,
+ email: json['email'] as String,
+ firstName: json['firstName'] as String?,
+ lastName: json['lastName'] as String?,
+ );
+
+Map _$$PausedLeadResponseImplToJson(
+ _$PausedLeadResponseImpl instance) =>
+ {
+ '_id': instance.id,
+ 'email': instance.email,
+ 'firstName': instance.firstName,
+ 'lastName': instance.lastName,
+ };
diff --git a/lib/src/models/team.dart b/lib/src/models/team.dart
new file mode 100644
index 0000000..f2a0499
--- /dev/null
+++ b/lib/src/models/team.dart
@@ -0,0 +1,33 @@
+import 'package:freezed_annotation/freezed_annotation.dart';
+
+part 'team.freezed.dart';
+part 'team.g.dart';
+
+@freezed
+class Team with _$Team {
+ const factory Team({
+ @JsonKey(name: '_id') required String id,
+ required String name,
+ required List userIds,
+ required String createdBy,
+ required DateTime createdAt,
+ List? beta,
+ required List invitedUsers,
+ String? customDomain,
+ }) = _Team;
+
+ factory Team.fromJson(Map json) => _$TeamFromJson(json);
+}
+
+@freezed
+class InvitedUser with _$InvitedUser {
+ const factory InvitedUser({
+ required String email,
+ required String role,
+ required String invitedBy,
+ required DateTime invitedAt,
+ }) = _InvitedUser;
+
+ factory InvitedUser.fromJson(Map json) =>
+ _$InvitedUserFromJson(json);
+}
diff --git a/lib/src/models/team.freezed.dart b/lib/src/models/team.freezed.dart
new file mode 100644
index 0000000..bc5f5eb
--- /dev/null
+++ b/lib/src/models/team.freezed.dart
@@ -0,0 +1,524 @@
+// coverage:ignore-file
+// GENERATED CODE - DO NOT MODIFY BY HAND
+// ignore_for_file: type=lint
+// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
+
+part of 'team.dart';
+
+// **************************************************************************
+// FreezedGenerator
+// **************************************************************************
+
+T _$identity(T value) => value;
+
+final _privateConstructorUsedError = UnsupportedError(
+ 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models');
+
+Team _$TeamFromJson(Map json) {
+ return _Team.fromJson(json);
+}
+
+/// @nodoc
+mixin _$Team {
+ @JsonKey(name: '_id')
+ String get id => throw _privateConstructorUsedError;
+ String get name => throw _privateConstructorUsedError;
+ List get userIds => throw _privateConstructorUsedError;
+ String get createdBy => throw _privateConstructorUsedError;
+ DateTime get createdAt => throw _privateConstructorUsedError;
+ List? get beta => throw _privateConstructorUsedError;
+ List get invitedUsers => throw _privateConstructorUsedError;
+ String? get customDomain => throw _privateConstructorUsedError;
+
+ Map toJson() => throw _privateConstructorUsedError;
+ @JsonKey(ignore: true)
+ $TeamCopyWith get copyWith => throw _privateConstructorUsedError;
+}
+
+/// @nodoc
+abstract class $TeamCopyWith<$Res> {
+ factory $TeamCopyWith(Team value, $Res Function(Team) then) =
+ _$TeamCopyWithImpl<$Res, Team>;
+ @useResult
+ $Res call(
+ {@JsonKey(name: '_id') String id,
+ String name,
+ List userIds,
+ String createdBy,
+ DateTime createdAt,
+ List? beta,
+ List