Skip to content

Commit

Permalink
chore: init
Browse files Browse the repository at this point in the history
a-wallen committed Mar 18, 2024
0 parents commit 536a104
Showing 78 changed files with 7,131 additions and 0 deletions.
29 changes: 29 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -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.
14 changes: 14 additions & 0 deletions .github/ISSUE_TEMPLATE/build.md
Original file line number Diff line number Diff line change
@@ -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
14 changes: 14 additions & 0 deletions .github/ISSUE_TEMPLATE/chore.md
Original file line number Diff line number Diff line change
@@ -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
14 changes: 14 additions & 0 deletions .github/ISSUE_TEMPLATE/ci.md
Original file line number Diff line number Diff line change
@@ -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
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
blank_issues_enabled: false
14 changes: 14 additions & 0 deletions .github/ISSUE_TEMPLATE/documentation.md
Original file line number Diff line number Diff line change
@@ -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
18 changes: 18 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -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.
14 changes: 14 additions & 0 deletions .github/ISSUE_TEMPLATE/performance.md
Original file line number Diff line number Diff line change
@@ -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.
14 changes: 14 additions & 0 deletions .github/ISSUE_TEMPLATE/refactor.md
Original file line number Diff line number Diff line change
@@ -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.
16 changes: 16 additions & 0 deletions .github/ISSUE_TEMPLATE/revert.md
Original file line number Diff line number Diff line change
@@ -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
14 changes: 14 additions & 0 deletions .github/ISSUE_TEMPLATE/style.md
Original file line number Diff line number Diff line change
@@ -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.
14 changes: 14 additions & 0 deletions .github/ISSUE_TEMPLATE/test.md
Original file line number Diff line number Diff line change
@@ -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.
27 changes: 27 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<!--
Thanks for contributing!
Provide a description of your changes below and a general summary in the title
Please look at the following checklist to ensure that your PR can be accepted quickly:
-->

## Status

**READY/IN DEVELOPMENT/HOLD**

## Description

<!--- Describe your changes in detail -->

## Type of Change

<!--- Put an `x` in all the boxes that apply: -->

- [ ] ✨ 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
21 changes: 21 additions & 0 deletions .github/cspell.json
Original file line number Diff line number Diff line change
@@ -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"
]
}
11 changes: 11 additions & 0 deletions .github/dependabot.yaml
Original file line number Diff line number Diff line change
@@ -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"
27 changes: 27 additions & 0 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
@@ -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

7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -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
62 changes: 62 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# Lemlist Sdk

Check warning on line 1 in README.md

GitHub Actions / spell-check / build

Unknown word (Lemlist)

[![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.**

Check warning on line 11 in README.md

GitHub Actions / spell-check / build

Unknown word (Lemlist)

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.

Check warning on line 23 in README.md

GitHub Actions / spell-check / build

Unknown word (Lemlist)

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
1 change: 1 addition & 0 deletions analysis_options.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
include: package:very_good_analysis/analysis_options.5.1.0.yaml
20 changes: 20 additions & 0 deletions coverage_badge.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions lib/lemlist_sdk.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/// A Very Good Project created by Very Good CLI.
library;

export 'src/lemlist_sdk.dart';
532 changes: 532 additions & 0 deletions lib/src/lemlist_sdk.dart

Large diffs are not rendered by default.

37 changes: 37 additions & 0 deletions lib/src/models/activity.dart
Original file line number Diff line number Diff line change
@@ -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<String, dynamic> json) =>
_$ActivityFromJson(json);
}
572 changes: 572 additions & 0 deletions lib/src/models/activity.freezed.dart

Large diffs are not rendered by default.

55 changes: 55 additions & 0 deletions lib/src/models/activity.g.dart
19 changes: 19 additions & 0 deletions lib/src/models/campaign.dart
Original file line number Diff line number Diff line change
@@ -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<String>? labels,
}) = _Campaign;

/// Initializes a campaign from JSON.
factory Campaign.fromJson(Map<String, dynamic> json) =>
_$CampaignFromJson(json);
}
202 changes: 202 additions & 0 deletions lib/src/models/campaign.freezed.dart
Original file line number Diff line number Diff line change
@@ -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>(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<String, dynamic> json) {
return _Campaign.fromJson(json);
}

/// @nodoc
mixin _$Campaign {
@JsonKey(name: '_id')
String get id => throw _privateConstructorUsedError;
String get name => throw _privateConstructorUsedError;
List<String>? get labels => throw _privateConstructorUsedError;

Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
@JsonKey(ignore: true)
$CampaignCopyWith<Campaign> 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<String>? 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<String>?,
) 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<String>? 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<String>?,
));
}
}

/// @nodoc
@JsonSerializable()
class _$CampaignImpl implements _Campaign {
const _$CampaignImpl(
{@JsonKey(name: '_id') required this.id,
required this.name,
final List<String>? labels})
: _labels = labels;

factory _$CampaignImpl.fromJson(Map<String, dynamic> json) =>
_$$CampaignImplFromJson(json);

@override
@JsonKey(name: '_id')
final String id;
@override
final String name;
final List<String>? _labels;
@override
List<String>? 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<String, dynamic> 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<String>? labels}) = _$CampaignImpl;

factory _Campaign.fromJson(Map<String, dynamic> json) =
_$CampaignImpl.fromJson;

@override
@JsonKey(name: '_id')
String get id;
@override
String get name;
@override
List<String>? get labels;
@override
@JsonKey(ignore: true)
_$$CampaignImplCopyWith<_$CampaignImpl> get copyWith =>
throw _privateConstructorUsedError;
}
22 changes: 22 additions & 0 deletions lib/src/models/campaign.g.dart
43 changes: 43 additions & 0 deletions lib/src/models/export_set_email_result.dart
Original file line number Diff line number Diff line change
@@ -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<String, dynamic> 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<String, dynamic> json) =>
_$ExportStatusFromJson(json);
}
588 changes: 588 additions & 0 deletions lib/src/models/export_set_email_result.freezed.dart

Large diffs are not rendered by default.

55 changes: 55 additions & 0 deletions lib/src/models/export_set_email_result.g.dart
28 changes: 28 additions & 0 deletions lib/src/models/export_start_result.dart
Original file line number Diff line number Diff line change
@@ -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<String, dynamic> json) =>
_$ExportStartResultFromJson(json);
}
398 changes: 398 additions & 0 deletions lib/src/models/export_start_result.freezed.dart
Original file line number Diff line number Diff line change
@@ -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>(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<String, dynamic> 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<String, dynamic> toJson() => throw _privateConstructorUsedError;
@JsonKey(ignore: true)
$ExportStartResultCopyWith<ExportStartResult> 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<String, dynamic> 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<String, dynamic> 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<String, dynamic> 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;
}
41 changes: 41 additions & 0 deletions lib/src/models/export_start_result.g.dart
19 changes: 19 additions & 0 deletions lib/src/models/export_status_result.dart
Original file line number Diff line number Diff line change
@@ -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<String, dynamic> json) =>
_$ExportStatusResultFromJson(json);
}
183 changes: 183 additions & 0 deletions lib/src/models/export_status_result.freezed.dart
Original file line number Diff line number Diff line change
@@ -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>(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<String, dynamic> json) {
return _ExportStatusResult.fromJson(json);
}

/// @nodoc
mixin _$ExportStatusResult {
bool get ok => throw _privateConstructorUsedError;
ExportStatus get status => throw _privateConstructorUsedError;

Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
@JsonKey(ignore: true)
$ExportStatusResultCopyWith<ExportStatusResult> 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<String, dynamic> 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<String, dynamic> 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<String, dynamic> json) =
_$ExportStatusResultImpl.fromJson;

@override
bool get ok;
@override
ExportStatus get status;
@override
@JsonKey(ignore: true)
_$$ExportStatusResultImplCopyWith<_$ExportStatusResultImpl> get copyWith =>
throw _privateConstructorUsedError;
}
21 changes: 21 additions & 0 deletions lib/src/models/export_status_result.g.dart
18 changes: 18 additions & 0 deletions lib/src/models/hook.dart
Original file line number Diff line number Diff line change
@@ -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<String, dynamic> json) => _$HookFromJson(json);
}
191 changes: 191 additions & 0 deletions lib/src/models/hook.freezed.dart
Original file line number Diff line number Diff line change
@@ -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>(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<String, dynamic> 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<String, dynamic> toJson() => throw _privateConstructorUsedError;
@JsonKey(ignore: true)
$HookCopyWith<Hook> 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<String, dynamic> 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<String, dynamic> 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<String, dynamic> 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;
}
20 changes: 20 additions & 0 deletions lib/src/models/hook.g.dart
19 changes: 19 additions & 0 deletions lib/src/models/hook_response.dart
Original file line number Diff line number Diff line change
@@ -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<String, dynamic> json) =>
_$HookResponseFromJson(json);
}
196 changes: 196 additions & 0 deletions lib/src/models/hook_response.freezed.dart
Original file line number Diff line number Diff line change
@@ -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>(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<String, dynamic> 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<String, dynamic> toJson() => throw _privateConstructorUsedError;
@JsonKey(ignore: true)
$HookResponseCopyWith<HookResponse> 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<String, dynamic> 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<String, dynamic> 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<String, dynamic> 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;
}
21 changes: 21 additions & 0 deletions lib/src/models/hook_response.g.dart
22 changes: 22 additions & 0 deletions lib/src/models/interested_lead_response.dart
Original file line number Diff line number Diff line change
@@ -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<String, dynamic> json) =>
_$InterestedLeadResponseFromJson(json);
}
269 changes: 269 additions & 0 deletions lib/src/models/interested_lead_response.freezed.dart
Original file line number Diff line number Diff line change
@@ -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>(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<String, dynamic> 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<String, dynamic> toJson() => throw _privateConstructorUsedError;
@JsonKey(ignore: true)
$InterestedLeadResponseCopyWith<InterestedLeadResponse> 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<String, dynamic> 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<String, dynamic> 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<String, dynamic> 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;
}
29 changes: 29 additions & 0 deletions lib/src/models/interested_lead_response.g.dart
20 changes: 20 additions & 0 deletions lib/src/models/lead_action_response.dart
Original file line number Diff line number Diff line change
@@ -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<String, dynamic> json) =>
_$LeadActionResponseFromJson(json);
}
221 changes: 221 additions & 0 deletions lib/src/models/lead_action_response.freezed.dart
Original file line number Diff line number Diff line change
@@ -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>(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<String, dynamic> 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<String, dynamic> toJson() => throw _privateConstructorUsedError;
@JsonKey(ignore: true)
$LeadActionResponseCopyWith<LeadActionResponse> 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<String, dynamic> 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<String, dynamic> 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<String, dynamic> 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;
}
25 changes: 25 additions & 0 deletions lib/src/models/lead_action_response.g.dart
18 changes: 18 additions & 0 deletions lib/src/models/lead_deletion_response.dart
Original file line number Diff line number Diff line change
@@ -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<String, dynamic> json) =>
_$LeadDeletionResponseFromJson(json);
}
176 changes: 176 additions & 0 deletions lib/src/models/lead_deletion_response.freezed.dart
Original file line number Diff line number Diff line change
@@ -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>(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<String, dynamic> json) {
return _LeadDeletionResponse.fromJson(json);
}

/// @nodoc
mixin _$LeadDeletionResponse {
@JsonKey(name: '_id')
String get id => throw _privateConstructorUsedError;
String get email => throw _privateConstructorUsedError;

Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
@JsonKey(ignore: true)
$LeadDeletionResponseCopyWith<LeadDeletionResponse> 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<String, dynamic> 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<String, dynamic> 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<String, dynamic> json) =
_$LeadDeletionResponseImpl.fromJson;

@override
@JsonKey(name: '_id')
String get id;
@override
String get email;
@override
@JsonKey(ignore: true)
_$$LeadDeletionResponseImplCopyWith<_$LeadDeletionResponseImpl>
get copyWith => throw _privateConstructorUsedError;
}
21 changes: 21 additions & 0 deletions lib/src/models/lead_deletion_response.g.dart
22 changes: 22 additions & 0 deletions lib/src/models/lead_details_response.dart
Original file line number Diff line number Diff line change
@@ -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<String, dynamic> json) =>
_$LeadDetailsResponseFromJson(json);
}
264 changes: 264 additions & 0 deletions lib/src/models/lead_details_response.freezed.dart
Original file line number Diff line number Diff line change
@@ -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>(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<String, dynamic> 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<String, dynamic> toJson() => throw _privateConstructorUsedError;
@JsonKey(ignore: true)
$LeadDetailsResponseCopyWith<LeadDetailsResponse> 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<String, dynamic> 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<String, dynamic> 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<String, dynamic> 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;
}
29 changes: 29 additions & 0 deletions lib/src/models/lead_details_response.g.dart
23 changes: 23 additions & 0 deletions lib/src/models/lead_request.dart
Original file line number Diff line number Diff line change
@@ -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<String, dynamic> json) =>
_$LeadRequestFromJson(json);
}
Loading

0 comments on commit 536a104

Please sign in to comment.