From 67089c2135d318942fb310be7bcded2c87652dc6 Mon Sep 17 00:00:00 2001 From: Alexandre Brandizzi Date: Tue, 15 Sep 2026 16:02:44 -0300 Subject: [PATCH 001/183] SH-281: group vendor directory by company (#115) * feat(vendors): group directory by company * style(vendors): format company directory query * fix(vendors): preserve technician list contract --- .../VendorControllerTests.cs | 173 ++++- .../VendorDataServiceTests.cs | 153 +++++ .../VendorServiceTests.cs | 109 ++- .../Controllers/VendorController.cs | 74 +- .../Implementation/VendorDataService.cs | 632 ++++++++++++++++-- .../Interfaces/IVendorDataService.cs | 25 +- .../Models/VendorDirectoryReadModels.cs | 108 +++ SeaHaven.Services/DTOs/VendorDTOs.cs | 23 +- .../Implementation/VendorService.cs | 74 +- .../Interfaces/IVendorService.cs | 18 +- 10 files changed, 1329 insertions(+), 60 deletions(-) diff --git a/Api.SeaHavenIndustries.Tests/VendorControllerTests.cs b/Api.SeaHavenIndustries.Tests/VendorControllerTests.cs index e0df2a9..99b7d1d 100644 --- a/Api.SeaHavenIndustries.Tests/VendorControllerTests.cs +++ b/Api.SeaHavenIndustries.Tests/VendorControllerTests.cs @@ -39,7 +39,7 @@ public class VendorControllerTests var service = new Mock(); using var cancellation = new CancellationTokenSource(); var token = cancellation.Token; - service.Setup(x => x.GetVendorDirectoryPagedAsync( + service.Setup(x => x.GetVendorTechnicianDirectoryPagedAsync( 1, 10, "clayton", @@ -53,7 +53,7 @@ public class VendorControllerTests await NewController(service).GetVendorList(search: "clayton", cancellationToken: token); - service.Verify(x => x.GetVendorDirectoryPagedAsync( + service.Verify(x => x.GetVendorTechnicianDirectoryPagedAsync( 1, 10, "clayton", @@ -63,6 +63,175 @@ public class VendorControllerTests It.IsAny?>(), It.IsAny?>(), token), Times.Once); + service.Verify(x => x.GetVendorCompanyDirectoryPagedAsync( + It.IsAny(), + It.IsAny(), + It.IsAny(), + It.IsAny(), + It.IsAny?>(), + It.IsAny?>(), + It.IsAny?>(), + It.IsAny?>(), + It.IsAny()), Times.Never); + } + + [Fact] + public async Task GetVendorList_ReturnsIndividualTechnicianRowsWithoutGroupedTechnicians() + { + var service = new Mock(); + service.Setup(x => x.GetVendorTechnicianDirectoryPagedAsync( + It.IsAny(), + It.IsAny(), + It.IsAny(), + It.IsAny(), + It.IsAny?>(), + It.IsAny?>(), + It.IsAny?>(), + It.IsAny?>(), + It.IsAny())) + .ReturnsAsync(new PagedResult + { + Items = new List + { + new() { Id = 7, CompanyId = 3, CompanyName = "Gateway Plumbing", ContactName = "Tech A" }, + new() { Id = 9, CompanyId = 3, CompanyName = "Gateway Plumbing", ContactName = "Tech B" } + }, + TotalCount = 2, + Page = 1, + PageSize = 10 + }); + + var result = await NewController(service).GetVendorList(); + + var ok = result.Should().BeOfType().Subject; + var paged = ok.Value.Should().BeOfType().Subject; + var rows = ((System.Collections.IEnumerable)paged.Data!).Cast().ToList(); + + // Legacy contract: same-company technicians stay as distinct top-level rows + // carrying their own vendor ids, and the response shape has no grouped + // Technicians property. + rows.Should().HaveCount(2); + rows.Select(r => r.GetType().GetProperty("Id")!.GetValue(r)).Should().BeEquivalentTo(new[] { 7, 9 }); + rows.Should().OnlyContain(r => r.GetType().GetProperty("Technicians") == null); + } + + [Fact] + public async Task GetVendorList_PreservesLegacyPageSizeAboveGroupedDirectoryBound() + { + var service = new Mock(); + service.Setup(x => x.GetVendorTechnicianDirectoryPagedAsync( + 1, + 500, + It.IsAny(), + It.IsAny(), + It.IsAny?>(), + It.IsAny?>(), + It.IsAny?>(), + It.IsAny?>(), + It.IsAny())) + .ReturnsAsync(new PagedResult { TotalCount = 420, Page = 1, PageSize = 500 }); + + var result = await NewController(service).GetVendorList(page: 1, pageSize: 500); + + var ok = result.Should().BeOfType().Subject; + var paged = ok.Value.Should().BeOfType().Subject; + paged.PageSize.Should().Be(500); + paged.TotalPages.Should().Be(1); + service.VerifyAll(); + } + + [Fact] + public async Task GetVendorDirectoryList_DelegatesToCompanyDirectoryServiceWithNestedTechnicians() + { + var service = new Mock(); + using var cancellation = new CancellationTokenSource(); + var token = cancellation.Token; + service.Setup(x => x.GetVendorCompanyDirectoryPagedAsync( + 1, + 10, + "clayton", + true, + It.IsAny?>(), + It.IsAny?>(), + It.IsAny?>(), + It.IsAny?>(), + token)) + .ReturnsAsync(new PagedResult + { + Items = new List + { + new() + { + Id = 9, + CompanyId = 3, + CompanyName = "Gateway Plumbing", + Email = "company@gatewayplumbing.example", + TotalJobs = 6, + Technicians = new List + { + new() { Id = 7, ContactName = "Tech A", Email = "tech.a@example.com" }, + new() { Id = 9, ContactName = "Tech B", Email = "tech.b@example.com" } + } + } + }, + TotalCount = 1, + Page = 1, + PageSize = 10 + }); + + var result = await NewController(service).GetVendorDirectoryList(search: "clayton", cancellationToken: token); + + var ok = result.Should().BeOfType().Subject; + var paged = ok.Value.Should().BeOfType().Subject; + var company = ((System.Collections.IEnumerable)paged.Data!).Cast().Single(); + + // SH-281: company row with nested technicians; top-level Email stays the + // company email while technician emails stay on the nested rows. + company.GetType().GetProperty("Email")!.GetValue(company).Should().Be("company@gatewayplumbing.example"); + var technicians = (System.Collections.IEnumerable)company.GetType().GetProperty("Technicians")!.GetValue(company)!; + technicians.Cast().Select(t => t.GetType().GetProperty("Id")!.GetValue(t)) + .Should().BeEquivalentTo(new[] { 7, 9 }); + technicians.Cast().Select(t => t.GetType().GetProperty("Email")!.GetValue(t)) + .Should().BeEquivalentTo(new[] { "tech.a@example.com", "tech.b@example.com" }); + + service.Verify(x => x.GetVendorCompanyDirectoryPagedAsync( + 1, + 10, + "clayton", + true, + It.IsAny?>(), + It.IsAny?>(), + It.IsAny?>(), + It.IsAny?>(), + token), Times.Once); + service.Verify(x => x.GetVendorTechnicianDirectoryPagedAsync( + It.IsAny(), + It.IsAny(), + It.IsAny(), + It.IsAny(), + It.IsAny?>(), + It.IsAny?>(), + It.IsAny?>(), + It.IsAny?>(), + It.IsAny()), Times.Never); + } + + [Fact] + public void VendorDirectoryEndpoints_AdvertiseDistinctCompatibilityAndCompanyRoutes() + { + var legacyRoutes = typeof(VendorController) + .GetMethod(nameof(VendorController.GetVendorList))! + .GetCustomAttributes(typeof(HttpGetAttribute), inherit: false) + .Cast() + .Select(attribute => attribute.Template); + var companyRoutes = typeof(VendorController) + .GetMethod(nameof(VendorController.GetVendorDirectoryList))! + .GetCustomAttributes(typeof(HttpGetAttribute), inherit: false) + .Cast() + .Select(attribute => attribute.Template); + + legacyRoutes.Should().BeEquivalentTo("GetVendorList"); + companyRoutes.Should().BeEquivalentTo("GetVendorDirectoryList"); } [Fact] diff --git a/Api.SeaHavenIndustries.Tests/VendorDataServiceTests.cs b/Api.SeaHavenIndustries.Tests/VendorDataServiceTests.cs index 3473085..7e7716a 100644 --- a/Api.SeaHavenIndustries.Tests/VendorDataServiceTests.cs +++ b/Api.SeaHavenIndustries.Tests/VendorDataServiceTests.cs @@ -4,6 +4,7 @@ using FluentAssertions; using Microsoft.EntityFrameworkCore; using SeaHaven.DataServices.Implementation; using SeaHaven.DataServices.Models; +using System.Text.RegularExpressions; using Xunit; namespace Api.SeaHavenIndustries.Tests; @@ -327,6 +328,158 @@ public class VendorDataServiceTests result.Select(x => x.WorkOrderId).Should().OnlyHaveUniqueItems(); } + [Fact] + public async Task GetCompanyDirectoryPagedAsync_GroupsCompaniesAndKeepsLegacyRowsDistinct() + { + await using var context = NewContext(); + var linkedCompany = new VendorCompany + { + Name = "Linked Co", + NormalizedName = "linked co", + Email = "dispatch@linked.example", + CompanyPhone = "555-0100", + Address = "100 Company Way", + City = "Chicago", + State = "IL" + }; + var companyOnly = new VendorCompany { Name = "Company Only", NormalizedName = "company only" }; + context.VendorCompanies.AddRange(linkedCompany, companyOnly); + context.Vendors.AddRange( + new Vendor + { + Company = linkedCompany, + CompanyName = "Stale Linked Name", + ContactName = "Older Tech", + Email = "older@linked.example", + Phone = "555-0101", + TradeSpecialties = "Plumbing", + IsActive = true, + IsDeleted = false, + Dispatches = new List { new() { WorkOrderId = 101 } } + }, + new Vendor + { + Company = linkedCompany, + CompanyName = "Another Stale Name", + ContactName = "Newer Tech", + Email = "newer@linked.example", + Phone = "555-0102", + TradeSpecialties = "HVAC, plumbing", + IsActive = true, + IsDeleted = false, + Dispatches = new List { new() { WorkOrderId = 102 } } + }, + new Vendor { CompanyName = " Legacy Co ", ContactName = "Legacy One", IsActive = true, IsDeleted = false }, + new Vendor { CompanyName = "legacy co", ContactName = "Legacy Two", IsActive = true, IsDeleted = false }, + new Vendor { CompanyName = " ", ContactName = "Unnamed One", IsActive = true, IsDeleted = false }, + new Vendor { CompanyName = null, ContactName = "Unnamed Two", IsActive = true, IsDeleted = false }); + await context.SaveChangesAsync(); + + var service = new VendorDataService(context); + var (items, totalCount) = await service.GetCompanyDirectoryPagedAsync(1, 50, isActive: true); + + totalCount.Should().Be(5); + var linked = items.Single(item => item.CompanyId == linkedCompany.Id); + linked.CompanyName.Should().Be("Linked Co"); + linked.Email.Should().Be("dispatch@linked.example"); + linked.ContactName.Should().Be("Newer Tech"); + linked.Technicians.Should().HaveCount(2); + linked.TotalJobs.Should().Be(2); + linked.TradeSpecialties.Should().Be("HVAC, plumbing"); + + var canonicalSearch = await service.GetCompanyDirectoryPagedAsync( + 1, 50, search: "Linked Co", isActive: true); + canonicalSearch.Items.Should().ContainSingle(item => item.CompanyId == linkedCompany.Id); + + var canonicalCompanyFilter = await service.GetCompanyDirectoryPagedAsync( + 1, 50, isActive: true, companies: new[] { "Linked Co" }); + canonicalCompanyFilter.Items.Should().ContainSingle(item => item.CompanyId == linkedCompany.Id); + + var legacy = items.Single(item => + item.Technicians.Any(tech => tech.ContactName == "Legacy One")); + legacy.Technicians.Select(tech => tech.ContactName) + .Should().BeEquivalentTo("Legacy One", "Legacy Two"); + items.Count(item => item.Technicians.Count == 1 && + item.Technicians.Single().ContactName?.StartsWith("Unnamed") == true).Should().Be(2); + items.Single(item => item.CompanyId == companyOnly.Id).Technicians.Should().BeEmpty(); + } + + [Fact] + public async Task GetCompanyDirectoryPagedAsync_FilterSelectsGroupAndSearchPromotesMatchingTechnician() + { + await using var context = NewContext(); + var company = new VendorCompany { Name = "Search Co", NormalizedName = "search co" }; + context.VendorCompanies.Add(company); + var older = new Vendor + { + Company = company, + CompanyName = company.Name, + ContactName = "Alice Plumber", + TradeSpecialties = "Plumbing", + IsActive = true, + IsDeleted = false, + Dispatches = new List { new() { WorkOrderId = 201 } } + }; + var newer = new Vendor + { + Company = company, + CompanyName = company.Name, + ContactName = "Zed HVAC", + TradeSpecialties = "HVAC", + IsActive = true, + IsDeleted = false, + Dispatches = new List { new() { WorkOrderId = 202 } } + }; + var inactive = new Vendor + { + Company = company, + CompanyName = company.Name, + ContactName = "Inactive Tech", + TradeSpecialties = "Roofing", + IsActive = false, + IsDeleted = false, + Dispatches = new List { new() { WorkOrderId = 203 } } + }; + context.Vendors.AddRange(older, newer, inactive); + await context.SaveChangesAsync(); + + var service = new VendorDataService(context); + var search = await service.GetCompanyDirectoryPagedAsync(1, 10, search: "Alice", isActive: true); + var trade = await service.GetCompanyDirectoryPagedAsync( + 1, 10, isActive: true, trades: new[] { "Plumbing" }); + + search.TotalCount.Should().Be(1); + search.Items.Single().Id.Should().Be(older.Id); + search.Items.Single().ContactName.Should().Be("Alice Plumber"); + search.Items.Single().Technicians.Should().HaveCount(2); + search.Items.Single().TotalJobs.Should().Be(2); + + trade.TotalCount.Should().Be(1); + trade.Items.Single().Id.Should().Be(newer.Id); + trade.Items.Single().Technicians.Should().HaveCount(2); + trade.Items.Single().Technicians.Should().NotContain(tech => tech.Id == inactive.Id); + } + + [Fact] + public void BuildCompanyDirectoryKeysQuery_TranslatesGroupingAndFacetFiltersToSqlServer() + { + using var context = NewSqlServerContext(); + var service = new VendorDataService(context); + + var sql = service.BuildCompanyDirectoryKeysQuery( + search: "alice", + trades: new[] { "Plumbing" }, + locations: new[] { "Chicago, IL" }, + jobBuckets: new[] { "under-50" }).ToQueryString(); + + sql.Should().Contain("GROUP BY"); + sql.Should().Contain("LEFT JOIN"); + sql.Should().Contain("TradeSpecialties"); + sql.Should().Contain("TotalJobs"); + Regex.IsMatch(sql, @"SUM\s*\(\s*\(\s*SELECT", RegexOptions.IgnoreCase) + .Should().BeFalse("company totals must sum pre-aggregated scalar job counts"); + } + [Fact] public async Task GetDirectoryPagedAsync_IncludesCompanyOnlyRowsAndPreservesTechnicianRows() { diff --git a/Api.SeaHavenIndustries.Tests/VendorServiceTests.cs b/Api.SeaHavenIndustries.Tests/VendorServiceTests.cs index 42c22bf..a8e996d 100644 --- a/Api.SeaHavenIndustries.Tests/VendorServiceTests.cs +++ b/Api.SeaHavenIndustries.Tests/VendorServiceTests.cs @@ -152,12 +152,12 @@ public class VendorServiceTests } [Fact] - public async Task GetVendorDirectoryPaged_ForwardsCancellationToken() + public async Task GetVendorCompanyDirectoryPaged_ForwardsCancellationTokenAndMapsNestedTechnicians() { var data = new Mock(); using var cancellation = new CancellationTokenSource(); var token = cancellation.Token; - data.Setup(x => x.GetDirectoryPagedAsync( + data.Setup(x => x.GetCompanyDirectoryPagedAsync( 1, 12, "clayton", @@ -167,16 +167,43 @@ public class VendorServiceTests It.IsAny?>(), It.IsAny?>(), token)) - .ReturnsAsync((Array.Empty(), 0)); + .ReturnsAsync((new[] + { + new VendorCompanyGroup + { + Id = 7, + CompanyId = 3, + CompanyName = "Gateway Plumbing", + ContactName = "Primary Tech", + Email = "company@gatewayplumbing.example", + TotalJobs = 4, + Technicians = new[] + { + new VendorCompanyGroupTechnician + { + Id = 7, + ContactName = "Primary Tech", + Email = "primary@example.com", + TotalJobs = 4, + IsActive = true + } + } + } + }.AsEnumerable().ToList(), 1)); - await NewService(data).GetVendorDirectoryPagedAsync( + var result = await NewService(data).GetVendorCompanyDirectoryPagedAsync( 1, 12, "clayton", true, cancellationToken: token); - data.Verify(x => x.GetDirectoryPagedAsync( + var group = result.Items.Single(); + group.Email.Should().Be("company@gatewayplumbing.example"); + group.Technicians.Should().ContainSingle() + .Which.Email.Should().Be("primary@example.com"); + + data.Verify(x => x.GetCompanyDirectoryPagedAsync( 1, 12, "clayton", @@ -188,6 +215,78 @@ public class VendorServiceTests token), Times.Once); } + [Fact] + public async Task GetVendorCompanyDirectoryPaged_BoundsPageInputsBeforeBuildingTheGroupKeyPredicate() + { + var data = new Mock(); + data.Setup(x => x.GetCompanyDirectoryPagedAsync( + 1, + 100, + null, + true, + It.IsAny?>(), + It.IsAny?>(), + It.IsAny?>(), + It.IsAny?>(), + It.IsAny())) + .ReturnsAsync((new List(), 0)); + + var result = await NewService(data).GetVendorCompanyDirectoryPagedAsync(0, 500); + + result.Page.Should().Be(1); + result.PageSize.Should().Be(100); + data.VerifyAll(); + } + + [Fact] + public async Task GetVendorTechnicianDirectoryPaged_ForwardsRawPaginationAndCancellationToken() + { + var data = new Mock(); + using var cancellation = new CancellationTokenSource(); + var token = cancellation.Token; + data.Setup(x => x.GetDirectoryPagedAsync( + 2, + 500, + "clayton", + true, + It.IsAny?>(), + It.IsAny?>(), + It.IsAny?>(), + It.IsAny?>(), + token)) + .ReturnsAsync((new[] + { + new VendorDirectoryRow { VendorId = 7, CompanyId = 3, CompanyName = "Gateway Plumbing", ContactName = "Tech A" }, + new VendorDirectoryRow { VendorId = 9, CompanyId = 3, CompanyName = "Gateway Plumbing", ContactName = "Tech B" } + }.AsEnumerable().ToList(), 2)); + + var result = await NewService(data).GetVendorTechnicianDirectoryPagedAsync( + 2, + 500, + "clayton", + true, + cancellationToken: token); + + // Legacy pagination semantics: page and pageSize (including 500) pass through + // unclamped, and same-company technicians stay as distinct rows. + result.Page.Should().Be(2); + result.PageSize.Should().Be(500); + result.Items.Should().HaveCount(2); + result.Items.Select(v => v.Id).Should().BeEquivalentTo(new[] { 7, 9 }); + result.Items.Should().OnlyContain(v => v.Technicians.Count == 0); + + data.Verify(x => x.GetDirectoryPagedAsync( + 2, + 500, + "clayton", + true, + It.IsAny?>(), + It.IsAny?>(), + It.IsAny?>(), + It.IsAny?>(), + token), Times.Once); + } + [Fact] public async Task GetVendorById_CountsDistinctHistoricalWorkOrders() { diff --git a/Api.SeaHavenIndustries/Controllers/VendorController.cs b/Api.SeaHavenIndustries/Controllers/VendorController.cs index 1051fcf..fc42b88 100644 --- a/Api.SeaHavenIndustries/Controllers/VendorController.cs +++ b/Api.SeaHavenIndustries/Controllers/VendorController.cs @@ -26,6 +26,9 @@ namespace Api.SeaHavenIndustries.Controllers _logger = logger; } + // SH-198 legacy per-technician directory contract. Existing consumers depend + // on one row per technician (no grouped Technicians) and on raw pagination + // semantics, including pageSize values above the grouped-directory bound. [HttpGet("GetVendorList")] public async Task GetVendorList( string? search = "", @@ -38,7 +41,7 @@ namespace Api.SeaHavenIndustries.Controllers [FromQuery] string[]? jobBuckets = null, CancellationToken cancellationToken = default) { - var pagedResult = await _vendorService.GetVendorDirectoryPagedAsync( + var pagedResult = await _vendorService.GetVendorTechnicianDirectoryPagedAsync( page, pageSize, search, @@ -80,6 +83,75 @@ namespace Api.SeaHavenIndustries.Controllers }); } + // SH-281 company-grouped directory: one row per company with the full + // status-eligible technician roster nested under Technicians and bounded + // page sizes. Top-level Email is the company email; technician emails stay + // on the nested rows. + [HttpGet("GetVendorDirectoryList")] + public async Task GetVendorDirectoryList( + string? search = "", + int page = 1, + int pageSize = 10, + bool? isActive = true, + [FromQuery] string[]? companies = null, + [FromQuery] string[]? trades = null, + [FromQuery] string[]? locations = null, + [FromQuery] string[]? jobBuckets = null, + CancellationToken cancellationToken = default) + { + var pagedResult = await _vendorService.GetVendorCompanyDirectoryPagedAsync( + page, + pageSize, + search, + isActive, + companies, + trades, + locations, + jobBuckets, + cancellationToken); + + var data = pagedResult.Items.Select(v => new + { + v.Id, + CompanyName = v.CompanyName, + v.CompanyId, + v.ContactName, + v.Email, + v.Phone, + v.CompanyPhone, + v.PreferredContact, + v.Address, + v.City, + v.State, + Zip = v.Zipcode, + v.TradeSpecialties, + v.GoogleMapsUrl, + v.Notes, + v.IsActive, + v.TotalJobs, + Technicians = v.Technicians.Select(t => new + { + t.Id, + t.ContactName, + t.Email, + t.Phone, + t.PreferredContact, + t.TradeSpecialties, + t.IsActive, + t.TotalJobs + }) + }); + + return Ok(new Pagination_DTO + { + Data = data, + PageNumber = pagedResult.Page, + PageSize = pagedResult.PageSize, + TotalCount = pagedResult.TotalCount, + TotalPages = (int)Math.Ceiling(pagedResult.TotalCount / (double)pagedResult.PageSize) + }); + } + [HttpGet("{id}")] [HttpGet("GetById")] public async Task GetVendorById([FromRoute] int? id, [FromQuery(Name = "id")] int? queryId) diff --git a/SeaHaven.DataServices/Implementation/VendorDataService.cs b/SeaHaven.DataServices/Implementation/VendorDataService.cs index ca6eed2..3c5e70a 100644 --- a/SeaHaven.DataServices/Implementation/VendorDataService.cs +++ b/SeaHaven.DataServices/Implementation/VendorDataService.cs @@ -168,7 +168,188 @@ namespace SeaHaven.DataServices.Implementation return (items, totalCount); } - internal IQueryable BuildDirectoryUnionQuery( + public async Task<(IReadOnlyList Items, int TotalCount)> GetCompanyDirectoryPagedAsync( + int page, + int pageSize, + string? search = null, + bool? isActive = true, + IReadOnlyCollection? companies = null, + IReadOnlyCollection? trades = null, + IReadOnlyCollection? locations = null, + IReadOnlyCollection? jobBuckets = null, + CancellationToken cancellationToken = default) + { + // Phase 1: select and paginate bounded company group keys in SQL. + var keyQuery = BuildCompanyDirectoryKeysQuery( + search, + isActive, + companies, + trades, + locations, + jobBuckets); + + var totalCount = await keyQuery.CountAsync(cancellationToken); + + var pageKeys = await keyQuery + .OrderByDescending(key => key.MaxVendorId ?? -1) + .ThenByDescending(key => key.CompanyId) + .ThenBy(key => key.NameKey) + .ThenBy(key => key.VendorKey) + .Skip((page - 1) * pageSize) + .Take(pageSize) + .ToListAsync(cancellationToken); + + if (pageKeys.Count == 0) + return (Array.Empty(), totalCount); + + // Phase 2: fetch the full status-eligible roster only for the page keys, + // without reapplying search/trade/location filters. + var rosterRows = await BuildCompanyDirectoryRosterQuery(isActive, pageKeys) + .ToListAsync(cancellationToken); + + var rosterByKey = rosterRows + .GroupBy(row => (CompanyId: row.CompanyId ?? 0, row.NameKey, row.VendorKey)) + .ToDictionary(group => group.Key, group => group.OrderByDescending(row => row.VendorId).ToList()); + + var missingCompanyIds = pageKeys + .Where(key => key.CompanyId != 0) + .Where(key => !rosterByKey.ContainsKey((key.CompanyId, key.NameKey, key.VendorKey))) + .Select(key => key.CompanyId) + .Distinct() + .ToList(); + + var companiesById = missingCompanyIds.Count == 0 + ? new Dictionary() + : await _context.VendorCompanies + .AsNoTracking() + .Where(c => missingCompanyIds.Contains(c.Id)) + .ToDictionaryAsync(c => c.Id, cancellationToken); + + // Assemble groups in the page key order so the response preserves the + // SQL-selected page order. + var groups = new List(pageKeys.Count); + foreach (var key in pageKeys) + { + if (rosterByKey.TryGetValue((key.CompanyId, key.NameKey, key.VendorKey), out var technicians)) + { + groups.Add(BuildTechnicianGroup(technicians, search)); + } + else if (companiesById.TryGetValue(key.CompanyId, out var company)) + { + groups.Add(BuildCompanyOnlyGroup(company)); + } + } + + return (groups, totalCount); + } + + private static VendorCompanyGroup BuildTechnicianGroup( + IReadOnlyList techniciansNewestFirst, + string? search) + { + var primary = techniciansNewestFirst[0]; + + // Primary is the newest VendorId by default; a nonblank search that matches + // a non-primary technician's ContactName, email, Phone, or + // TradeSpecialties promotes the newest matching technician. Company-level + // matches (e.g. company name or location) never reorder. + if (!string.IsNullOrWhiteSpace(search)) + { + var normalizedSearch = search.ToLower(); + primary = techniciansNewestFirst.FirstOrDefault(row => + ((row.ContactName ?? "").ToLower().Contains(normalizedSearch)) || + ((row.Email ?? "").ToLower().Contains(normalizedSearch)) || + ((row.Phone ?? "").ToLower().Contains(normalizedSearch)) || + ((row.TradeSpecialties ?? "").ToLower().Contains(normalizedSearch))) + ?? techniciansNewestFirst[0]; + } + + var linked = primary.CompanyId != null; + var hasCompanyLocation = linked && ( + !string.IsNullOrWhiteSpace(primary.CompanyCity) || + !string.IsNullOrWhiteSpace(primary.CompanyState) || + !string.IsNullOrWhiteSpace(primary.CompanyAddress)); + + return new VendorCompanyGroup + { + Id = primary.VendorId, + CompanyId = primary.CompanyId, + CompanyName = linked ? primary.CanonicalCompanyName : primary.CompanyName, + ContactName = primary.ContactName, + Email = linked ? primary.CompanyEmail : primary.Email, + Phone = primary.Phone, + CompanyPhone = linked && !string.IsNullOrWhiteSpace(primary.CompanyPhone) + ? primary.CompanyPhone + : primary.VendorCompanyPhone, + PreferredContact = primary.PreferredContact, + Address = linked && !string.IsNullOrWhiteSpace(primary.CompanyAddress) + ? primary.CompanyAddress + : primary.Address, + City = hasCompanyLocation ? primary.CompanyCity : primary.City, + State = hasCompanyLocation ? primary.CompanyState : primary.State, + Zip = primary.Zip, + TradeSpecialties = AggregateTradeTokens(techniciansNewestFirst), + GoogleMapsUrl = primary.GoogleMapsUrl, + Notes = linked ? primary.CompanyNotes : null, + IsActive = primary.IsActive, + TotalJobs = techniciansNewestFirst.Sum(row => row.TotalJobs), + Technicians = techniciansNewestFirst.Select(row => new VendorCompanyGroupTechnician + { + Id = row.VendorId, + ContactName = row.ContactName, + Email = row.Email, + Phone = row.Phone, + PreferredContact = row.PreferredContact, + TradeSpecialties = row.TradeSpecialties, + IsActive = row.IsActive, + TotalJobs = row.TotalJobs + }).ToList() + }; + } + + // Distinct trade CSV tokens case-insensitively, preserving the first displayed + // spelling and order (technicians are listed newest VendorId first). + private static string? AggregateTradeTokens(IEnumerable techniciansNewestFirst) + { + var seen = new HashSet(StringComparer.OrdinalIgnoreCase); + var tokens = new List(); + foreach (var row in techniciansNewestFirst) + { + if (string.IsNullOrWhiteSpace(row.TradeSpecialties)) + continue; + foreach (var token in row.TradeSpecialties.Split(',', StringSplitOptions.TrimEntries | StringSplitOptions.RemoveEmptyEntries)) + { + if (seen.Add(token)) + tokens.Add(token); + } + } + + return tokens.Count == 0 ? null : string.Join(", ", tokens); + } + + private static VendorCompanyGroup BuildCompanyOnlyGroup(VendorCompany company) => new() + { + Id = null, + CompanyId = company.Id, + CompanyName = company.Name, + ContactName = null, + Email = company.Email, + Phone = null, + CompanyPhone = company.CompanyPhone, + PreferredContact = null, + Address = company.Address, + City = company.City, + State = company.State, + Zip = company.Zip, + TradeSpecialties = null, + GoogleMapsUrl = company.GoogleMapsUrl, + Notes = company.Notes, + IsActive = true, + TotalJobs = 0, + Technicians = Array.Empty() + }; + + internal IQueryable BuildCompanyDirectoryKeysQuery( string? search = null, bool? isActive = true, IReadOnlyCollection? companies = null, @@ -176,52 +357,195 @@ namespace SeaHaven.DataServices.Implementation IReadOnlyCollection? locations = null, IReadOnlyCollection? jobBuckets = null) { - // Arm A: existing per-technician rows (every non-deleted vendor, including - // those with no company). Notes come from the linked VendorCompany. - var perTechnician = _context.Vendors + var sourceRows = BuildDirectoryUnionBaseQuery(isActive) + .Select(BuildGroupSourceRowSelector(search, companies, trades, locations)); + + var grouped = sourceRows + .GroupBy(row => new { row.CompanyId, row.NameKey, row.VendorKey }) + .Select(group => new VendorCompanyGroupKeyRow + { + CompanyId = group.Key.CompanyId, + NameKey = group.Key.NameKey, + VendorKey = group.Key.VendorKey, + MaxVendorId = group.Max(row => row.VendorId), + TotalJobs = group.Sum(row => row.TotalJobs), + SearchMatch = group.Max(row => row.SearchFlag), + CompanyMatch = group.Max(row => row.CompanyFlag), + TradeMatch = group.Max(row => row.TradeFlag), + LocationMatch = group.Max(row => row.LocationFlag) + }); + + // Each facet selects the group when any status-eligible row matches it + // (OR within a facet, AND across facets); job buckets apply to the summed + // per-technician TotalJobs of the whole company. + if (!string.IsNullOrWhiteSpace(search)) + grouped = grouped.Where(key => key.SearchMatch == 1); + + var selectedCompanies = companies? + .Where(value => !string.IsNullOrWhiteSpace(value)) + .Select(value => value.Trim().ToLower()) + .Distinct() + .ToArray(); + if (selectedCompanies is { Length: > 0 }) + grouped = grouped.Where(key => key.CompanyMatch == 1); + + var selectedTrades = trades? + .Where(value => !string.IsNullOrWhiteSpace(value)) + .Select(value => value.Trim().ToLower()) + .Distinct() + .ToArray(); + if (selectedTrades is { Length: > 0 }) + grouped = grouped.Where(key => key.TradeMatch == 1); + + var selectedLocations = locations? + .Where(value => !string.IsNullOrWhiteSpace(value)) + .Select(value => value.Trim().ToLower()) + .Distinct() + .ToArray(); + if (selectedLocations is { Length: > 0 }) + grouped = grouped.Where(key => key.LocationMatch == 1); + + var selectedJobBuckets = jobBuckets? + .Where(value => !string.IsNullOrWhiteSpace(value)) + .Select(value => value.Trim().ToLower()) + .Distinct() + .ToArray(); + if (selectedJobBuckets is not { Length: > 0 }) + return grouped; + + var under50 = selectedJobBuckets.Contains("under-50"); + var from50To99 = selectedJobBuckets.Contains("50-99"); + var from100To149 = selectedJobBuckets.Contains("100-149"); + var from150 = selectedJobBuckets.Contains("150-plus"); + + return grouped.Where(key => + (under50 && key.TotalJobs < 50) || + (from50To99 && key.TotalJobs >= 50 && key.TotalJobs <= 99) || + (from100To149 && key.TotalJobs >= 100 && key.TotalJobs <= 149) || + (from150 && key.TotalJobs >= 150)); + } + + private static Expression> BuildGroupSourceRowSelector( + string? search, + IReadOnlyCollection? companies, + IReadOnlyCollection? trades, + IReadOnlyCollection? locations) + { + var row = Expression.Parameter(typeof(VendorDirectoryRow), "row"); + + var selectedCompanies = companies? + .Where(value => !string.IsNullOrWhiteSpace(value)) + .Select(value => value.Trim().ToLower()) + .Distinct() + .ToArray(); + var selectedTrades = trades? + .Where(value => !string.IsNullOrWhiteSpace(value)) + .Select(value => value.Trim().ToLower()) + .Distinct() + .ToArray(); + var selectedLocations = locations? + .Where(value => !string.IsNullOrWhiteSpace(value)) + .Select(value => value.Trim().ToLower()) + .Distinct() + .ToArray(); + + static Expression Flag(Expression? matchBody) => + matchBody is null + ? Expression.Constant(1) + : Expression.Condition(matchBody, Expression.Constant(1), Expression.Constant(0)); + + var searchBody = string.IsNullOrWhiteSpace(search) + ? null + : BuildSearchMatchBody(row, search.ToLower()); + var companyBody = selectedCompanies is { Length: > 0 } + ? BuildCompanyNameMatchBody(row, selectedCompanies) + : null; + var tradeBody = selectedTrades is { Length: > 0 } + ? BuildTradeMatchBody(row, selectedTrades) + : null; + var locationBody = selectedLocations is { Length: > 0 } + ? BuildLocationMatchBody(row, selectedLocations) + : null; + + var nameKey = Expression.Condition( + Expression.NotEqual( + Expression.Property(row, nameof(VendorDirectoryRow.CompanyId)), + Expression.Constant(0)), + Expression.Constant(string.Empty), + LowerTrimmed(row, nameof(VendorDirectoryRow.CompanyName))); + + var nameMissing = Expression.Equal( + Expression.Call( + CoalescedOrEmpty(row, nameof(VendorDirectoryRow.CompanyName)), + nameof(string.Trim), + Type.EmptyTypes), + Expression.Constant(string.Empty)); + var vendorKey = Expression.Condition( + Expression.AndAlso( + Expression.Equal( + Expression.Property(row, nameof(VendorDirectoryRow.CompanyId)), + Expression.Constant(0)), + nameMissing), + Expression.Coalesce( + Expression.Property(row, nameof(VendorDirectoryRow.VendorId)), + Expression.Constant(0)), + Expression.Constant(0)); + + MemberBinding Bind(string target, Expression value) => + Expression.Bind(typeof(VendorDirectoryGroupSourceRow).GetProperty(target)!, value); + + return Expression.Lambda>( + Expression.MemberInit( + Expression.New(typeof(VendorDirectoryGroupSourceRow)), + Bind(nameof(VendorDirectoryGroupSourceRow.VendorId), + Expression.Property(row, nameof(VendorDirectoryRow.VendorId))), + Bind(nameof(VendorDirectoryGroupSourceRow.CompanyId), + Expression.Property(row, nameof(VendorDirectoryRow.CompanyId))), + Bind(nameof(VendorDirectoryGroupSourceRow.NameKey), nameKey), + Bind(nameof(VendorDirectoryGroupSourceRow.VendorKey), vendorKey), + Bind(nameof(VendorDirectoryGroupSourceRow.TotalJobs), + Expression.Property(row, nameof(VendorDirectoryRow.TotalJobs))), + Bind(nameof(VendorDirectoryGroupSourceRow.SearchFlag), Flag(searchBody)), + Bind(nameof(VendorDirectoryGroupSourceRow.CompanyFlag), Flag(companyBody)), + Bind(nameof(VendorDirectoryGroupSourceRow.TradeFlag), Flag(tradeBody)), + Bind(nameof(VendorDirectoryGroupSourceRow.LocationFlag), Flag(locationBody))), + row); + } + + internal IQueryable BuildCompanyDirectoryRosterQuery( + bool? isActive, + IReadOnlyList keys) + { + var vendors = _context.Vendors .AsNoTracking() .Where(v => v.IsDeleted == null || v.IsDeleted == false); if (isActive.HasValue) - perTechnician = perTechnician.Where(v => v.IsActive == isActive.Value); + vendors = vendors.Where(v => v.IsActive == isActive.Value); - var armA = perTechnician.Select(v => new VendorDirectoryRow + var rows = vendors.Select(v => new VendorDirectoryRosterRow { VendorId = v.Id, - CompanyId = v.CompanyId ?? 0, - CompanyName = v.CompanyName, + CompanyId = v.CompanyId, + CompanyName = v.Company != null ? v.Company.Name : v.CompanyName, + CanonicalCompanyName = v.Company != null ? v.Company.Name : null, + CompanyEmail = v.Company != null ? v.Company.Email : null, + CompanyPhone = v.Company != null ? v.Company.CompanyPhone : null, + CompanyAddress = v.Company != null ? v.Company.Address : null, + CompanyCity = v.Company != null ? v.Company.City : null, + CompanyState = v.Company != null ? v.Company.State : null, + CompanyNotes = v.Company != null ? v.Company.Notes : null, ContactName = v.ContactName, - Email = v.Email != null && v.Email.Trim() != "" - ? v.Email - : v.Company != null - ? v.Company.Email - : v.Email, + Email = v.Email, Phone = v.Phone, - CompanyPhone = v.Company != null && - v.Company.CompanyPhone != null && v.Company.CompanyPhone.Trim() != "" - ? v.Company.CompanyPhone - : v.CompanyPhone, PreferredContact = v.PreferredContact, - Address = v.Company != null && - v.Company.Address != null && v.Company.Address.Trim() != "" - ? v.Company.Address - : v.Address, - City = v.Company != null && - ((v.Company.City != null && v.Company.City.Trim() != "") || - (v.Company.State != null && v.Company.State.Trim() != "") || - (v.Company.Address != null && v.Company.Address.Trim() != "")) - ? v.Company.City - : v.City, - State = v.Company != null && - ((v.Company.City != null && v.Company.City.Trim() != "") || - (v.Company.State != null && v.Company.State.Trim() != "") || - (v.Company.Address != null && v.Company.Address.Trim() != "")) - ? v.Company.State - : v.State, + VendorCompanyPhone = v.CompanyPhone, + Address = v.Address, + City = v.City, + State = v.State, Zip = v.Zip, TradeSpecialties = v.TradeSpecialties, GoogleMapsUrl = v.GoogleMapsUrl, - Notes = v.Company != null ? v.Company.Notes : null, IsActive = v.IsActive, TotalJobs = _context.Dispatches .Where(dispatch => @@ -232,9 +556,156 @@ namespace SeaHaven.DataServices.Implementation _context.DispatchWorkOrders .Where(link => link.Dispatch != null && link.Dispatch.VendorId == v.Id) .Select(link => link.WorkOrderId)) - .Count() + .Count(), + NameKey = v.CompanyId != null + ? "" + : (v.CompanyName ?? "").Trim().ToLower(), + VendorKey = v.CompanyId == null && (v.CompanyName ?? "").Trim() == "" + ? v.Id + : 0 }); + return rows.Where(BuildRosterKeyPredicate(keys)); + } + + private static Expression> BuildRosterKeyPredicate( + IReadOnlyList keys) + { + var row = Expression.Parameter(typeof(VendorDirectoryRosterRow), "row"); + + Expression? body = null; + foreach (var key in keys) + { + Expression keyMatch; + if (key.CompanyId != 0) + { + keyMatch = Expression.Equal( + Expression.Property(row, nameof(VendorDirectoryRosterRow.CompanyId)), + Expression.Constant(key.CompanyId, typeof(int?))); + } + else if (key.NameKey.Length > 0) + { + keyMatch = Expression.AndAlso( + Expression.Equal( + Expression.Property(row, nameof(VendorDirectoryRosterRow.CompanyId)), + Expression.Constant(null, typeof(int?))), + Expression.Equal( + Expression.Property(row, nameof(VendorDirectoryRosterRow.NameKey)), + Expression.Constant(key.NameKey))); + } + else + { + keyMatch = Expression.Equal( + Expression.Property(row, nameof(VendorDirectoryRosterRow.VendorId)), + Expression.Constant(key.VendorKey)); + } + + body = OrElse(body, keyMatch); + } + + return Expression.Lambda>( + body ?? Expression.Constant(false), + row); + } + + internal IQueryable BuildDirectoryUnionQuery( + string? search = null, + bool? isActive = true, + IReadOnlyCollection? companies = null, + IReadOnlyCollection? trades = null, + IReadOnlyCollection? locations = null, + IReadOnlyCollection? jobBuckets = null) => + ApplyDirectoryRowFilters( + BuildDirectoryUnionBaseQuery(isActive), + search, + companies, + trades, + locations, + jobBuckets); + + private IQueryable BuildDirectoryUnionBaseQuery(bool? isActive = true) + { + // Arm A: existing per-technician rows (every non-deleted vendor, including + // those with no company). Notes come from the linked VendorCompany. + var perTechnician = _context.Vendors + .AsNoTracking() + .Where(v => v.IsDeleted == null || v.IsDeleted == false); + + if (isActive.HasValue) + perTechnician = perTechnician.Where(v => v.IsActive == isActive.Value); + + // Pre-aggregate distinct work-order assignments per technician before + // grouping companies. This keeps the outer company SUM over a plain + // joined scalar instead of SUM(COUNT(correlated subquery)), which SQL + // Server rejects at execution time. + var directWorkOrders = _context.Dispatches + .Where(dispatch => dispatch.WorkOrderId.HasValue) + .Select(dispatch => new + { + dispatch.VendorId, + WorkOrderId = dispatch.WorkOrderId!.Value + }); + var linkedWorkOrders = _context.DispatchWorkOrders + .Where(link => link.Dispatch != null) + .Select(link => new + { + VendorId = link.Dispatch!.VendorId, + link.WorkOrderId + }); + var jobCounts = directWorkOrders + .Union(linkedWorkOrders) + .GroupBy(assignment => assignment.VendorId) + .Select(group => new + { + VendorId = group.Key, + TotalJobs = group.Count() + }); + + var armA = + from v in perTechnician + join jobCount in jobCounts on v.Id equals jobCount.VendorId into vendorJobCounts + from jobCount in vendorJobCounts.DefaultIfEmpty() + select new VendorDirectoryRow + { + VendorId = v.Id, + CompanyId = v.CompanyId ?? 0, + CompanyName = v.Company != null ? v.Company.Name : v.CompanyName, + ContactName = v.ContactName, + Email = v.Email != null && v.Email.Trim() != "" + ? v.Email + : v.Company != null + ? v.Company.Email + : v.Email, + Phone = v.Phone, + CompanyPhone = v.Company != null && + v.Company.CompanyPhone != null && v.Company.CompanyPhone.Trim() != "" + ? v.Company.CompanyPhone + : v.CompanyPhone, + PreferredContact = v.PreferredContact, + Address = v.Company != null && + v.Company.Address != null && v.Company.Address.Trim() != "" + ? v.Company.Address + : v.Address, + City = v.Company != null && + ((v.Company.City != null && v.Company.City.Trim() != "") || + (v.Company.State != null && v.Company.State.Trim() != "") || + (v.Company.Address != null && v.Company.Address.Trim() != "")) + ? v.Company.City + : v.City, + State = v.Company != null && + ((v.Company.City != null && v.Company.City.Trim() != "") || + (v.Company.State != null && v.Company.State.Trim() != "") || + (v.Company.Address != null && v.Company.Address.Trim() != "")) + ? v.Company.State + : v.State, + Zip = v.Zip, + TradeSpecialties = v.TradeSpecialties, + GoogleMapsUrl = v.GoogleMapsUrl, + Notes = v.Company != null ? v.Company.Notes : null, + IsActive = v.IsActive, + TotalJobs = (int?)jobCount.TotalJobs ?? 0 + }; + // Arm B: company-only rows for companies with zero non-deleted technicians. // These carry a null VendorId and a populated CompanyId. A company has no // active/inactive flag of its own, so it is shown unless the caller explicitly @@ -272,15 +743,70 @@ namespace SeaHaven.DataServices.Implementation union = armA.Concat(armB); } - return ApplyDirectoryRowFilters( - union, - search, - companies, - trades, - locations, - jobBuckets); + return union; } + // Same matching rules the directory has always applied to a projected row: + // company name, contact name, email, trades, canonical city/state, the + // canonical address only when city/state are both absent, and zip. + private static Expression BuildSearchMatchBody(ParameterExpression row, string normalizedSearch) + { + Expression ContainsLower(string propertyName) + { + var lowered = Expression.Call( + CoalescedOrEmpty(row, propertyName), + nameof(string.ToLower), + Type.EmptyTypes); + return Contains(lowered, Expression.Constant(normalizedSearch)); + } + + var cityBlank = IsBlank(Expression.Property(row, nameof(VendorDirectoryRow.City))); + var stateBlank = IsBlank(Expression.Property(row, nameof(VendorDirectoryRow.State))); + + Expression? body = null; + body = OrElse(body, ContainsLower(nameof(VendorDirectoryRow.CompanyName))); + body = OrElse(body, ContainsLower(nameof(VendorDirectoryRow.ContactName))); + body = OrElse(body, ContainsLower(nameof(VendorDirectoryRow.Email))); + body = OrElse(body, ContainsLower(nameof(VendorDirectoryRow.TradeSpecialties))); + body = OrElse(body, ContainsLower(nameof(VendorDirectoryRow.City))); + body = OrElse(body, ContainsLower(nameof(VendorDirectoryRow.State))); + body = OrElse(body, Expression.AndAlso( + Expression.AndAlso(cityBlank, stateBlank), + ContainsLower(nameof(VendorDirectoryRow.Address)))); + body = OrElse(body, ContainsLower(nameof(VendorDirectoryRow.Zip))); + return body!; + } + + private static Expression BuildCompanyNameMatchBody( + ParameterExpression row, + IReadOnlyCollection selectedCompanies) + { + var lowered = Expression.Call( + CoalescedOrEmpty(row, nameof(VendorDirectoryRow.CompanyName)), + nameof(string.ToLower), + Type.EmptyTypes); + return Expression.Call( + typeof(Enumerable), + nameof(Enumerable.Contains), + new[] { typeof(string) }, + Expression.Constant(selectedCompanies), + lowered); + } + + private static Expression CoalescedOrEmpty(ParameterExpression row, string propertyName) => + Expression.Coalesce( + Expression.Property(row, propertyName), + Expression.Constant(string.Empty)); + + private static Expression LowerTrimmed(ParameterExpression row, string propertyName) => + Expression.Call( + Expression.Call( + CoalescedOrEmpty(row, propertyName), + nameof(string.Trim), + Type.EmptyTypes), + nameof(string.ToLower), + Type.EmptyTypes); + private static IQueryable ApplyDirectoryRowFilters( IQueryable query, string? search, @@ -463,6 +989,15 @@ namespace SeaHaven.DataServices.Implementation IReadOnlyCollection selectedTrades) { var vendor = Expression.Parameter(typeof(T), "vendor"); + return Expression.Lambda>( + BuildTradeMatchBody(vendor, selectedTrades), + vendor); + } + + private static Expression BuildTradeMatchBody( + ParameterExpression vendor, + IReadOnlyCollection selectedTrades) + { var specialties = Expression.Coalesce( Expression.Property(vendor, nameof(Vendor.TradeSpecialties)), Expression.Constant(string.Empty)); @@ -490,13 +1025,22 @@ namespace SeaHaven.DataServices.Implementation } } - return Expression.Lambda>(body ?? Expression.Constant(false), vendor); + return body ?? Expression.Constant(false); } private static Expression> BuildLocationPredicate( IReadOnlyCollection selectedLocations) { var vendor = Expression.Parameter(typeof(T), "vendor"); + return Expression.Lambda>( + BuildLocationMatchBody(vendor, selectedLocations), + vendor); + } + + private static Expression BuildLocationMatchBody( + ParameterExpression vendor, + IReadOnlyCollection selectedLocations) + { var label = BuildLocationLabelBody(vendor); var lowered = Expression.Call(label, nameof(string.ToLower), Type.EmptyTypes); @@ -504,7 +1048,7 @@ namespace SeaHaven.DataServices.Implementation foreach (var location in selectedLocations) body = OrElse(body, Expression.Equal(lowered, Expression.Constant(location))); - return Expression.Lambda>(body ?? Expression.Constant(false), vendor); + return body ?? Expression.Constant(false); } private static Expression BuildLocationLabelBody(ParameterExpression vendor) diff --git a/SeaHaven.DataServices/Interfaces/IVendorDataService.cs b/SeaHaven.DataServices/Interfaces/IVendorDataService.cs index 069519a..2e08912 100644 --- a/SeaHaven.DataServices/Interfaces/IVendorDataService.cs +++ b/SeaHaven.DataServices/Interfaces/IVendorDataService.cs @@ -35,9 +35,9 @@ namespace SeaHaven.DataServices.Interfaces IReadOnlyCollection? locations = null, IReadOnlyCollection? jobBuckets = null); - // SH-198 vendor directory: per-technician rows UNION company-only rows - // (companies with zero non-deleted technicians). Company-only rows carry a - // null VendorId and a populated CompanyId. Notes come from VendorCompany.Notes. + // Compatibility path for existing per-technician consumers (GetVendorList) + // and behavior tests. GetVendorDirectoryList uses the company-grouped path + // below. Task<(IReadOnlyList Items, int TotalCount)> GetDirectoryPagedAsync( int page, int pageSize, @@ -48,6 +48,25 @@ namespace SeaHaven.DataServices.Interfaces IReadOnlyCollection? locations = null, IReadOnlyCollection? jobBuckets = null, CancellationToken cancellationToken = default); + + // SH-281 company directory: linked vendors group by real CompanyId; unlinked + // legacy vendors group by trimmed case-insensitive CompanyName (missing names + // isolated by vendor identity); company-only groups remain. Facet filters + // select a group when any status-eligible row matches; job buckets apply to + // the summed per-technician TotalJobs. Bounded group keys are selected and + // paginated in SQL, then the full status-eligible roster is fetched only for + // those keys (search/trade/location are not reapplied). TotalCount counts + // company groups. + Task<(IReadOnlyList Items, int TotalCount)> GetCompanyDirectoryPagedAsync( + int page, + int pageSize, + string? search = null, + bool? isActive = true, + IReadOnlyCollection? companies = null, + IReadOnlyCollection? trades = null, + IReadOnlyCollection? locations = null, + IReadOnlyCollection? jobBuckets = null, + CancellationToken cancellationToken = default); Task AddAsync(Vendor vendor); Task UpdateAsync(Vendor vendor); Task DeleteAsync(int id); diff --git a/SeaHaven.DataServices/Models/VendorDirectoryReadModels.cs b/SeaHaven.DataServices/Models/VendorDirectoryReadModels.cs index 763f020..dff7be9 100644 --- a/SeaHaven.DataServices/Models/VendorDirectoryReadModels.cs +++ b/SeaHaven.DataServices/Models/VendorDirectoryReadModels.cs @@ -20,4 +20,112 @@ namespace SeaHaven.DataServices.Models public bool IsActive { get; set; } public int TotalJobs { get; set; } } + + // SH-281 company directory: per-row source for the grouped key query. Carries the + // company group key parts (CompanyId 0 = unlinked; NameKey groups unlinked legacy + // vendors by trimmed case-insensitive CompanyName; VendorKey isolates vendors with + // a missing name by vendor identity) plus one 0/1 match flag per facet filter so a + // group can be selected when any status-eligible row matches that facet. + internal sealed class VendorDirectoryGroupSourceRow + { + public int? VendorId { get; set; } + public int CompanyId { get; set; } + public string NameKey { get; set; } = string.Empty; + public int VendorKey { get; set; } + public int TotalJobs { get; set; } + public int SearchFlag { get; set; } + public int CompanyFlag { get; set; } + public int TradeFlag { get; set; } + public int LocationFlag { get; set; } + } + + // SH-281: one row per company group after SQL grouping — the bounded key page. + internal sealed class VendorCompanyGroupKeyRow + { + public int CompanyId { get; set; } + public string NameKey { get; set; } = string.Empty; + public int VendorKey { get; set; } + public int? MaxVendorId { get; set; } + public int TotalJobs { get; set; } + public int SearchMatch { get; set; } + public int CompanyMatch { get; set; } + public int TradeMatch { get; set; } + public int LocationMatch { get; set; } + } + + // SH-281: full status-eligible roster row (phase 2) carrying both the vendor's own + // technician fields and the linked VendorCompany canonical fields, so group + // assembly can apply the existing company-canonical projections in memory without + // reapplying search/trade/location filters. + internal sealed class VendorDirectoryRosterRow + { + public int VendorId { get; set; } + public int? CompanyId { get; set; } + public string? CompanyName { get; set; } + public string? CanonicalCompanyName { get; set; } + public string? CompanyEmail { get; set; } + public string? CompanyPhone { get; set; } + public string? CompanyAddress { get; set; } + public string? CompanyCity { get; set; } + public string? CompanyState { get; set; } + public string? CompanyNotes { get; set; } + public string? ContactName { get; set; } + public string? Email { get; set; } + public string? Phone { get; set; } + public string? PreferredContact { get; set; } + public string? VendorCompanyPhone { get; set; } + public string? Address { get; set; } + public string? City { get; set; } + public string? State { get; set; } + public string? Zip { get; set; } + public string? TradeSpecialties { get; set; } + public string? GoogleMapsUrl { get; set; } + public bool IsActive { get; set; } + public int TotalJobs { get; set; } + public string NameKey { get; set; } = string.Empty; + public int VendorKey { get; set; } + } + + // SH-281: one technician inside a company group. + public sealed class VendorCompanyGroupTechnician + { + public int Id { get; set; } + public string? ContactName { get; set; } + public string? Email { get; set; } + public string? Phone { get; set; } + public string? PreferredContact { get; set; } + public string? TradeSpecialties { get; set; } + public bool IsActive { get; set; } + public int TotalJobs { get; set; } + } + + // SH-281 company directory group: linked vendors collapse by real CompanyId; + // unlinked legacy vendors group by trimmed case-insensitive CompanyName (vendors + // with a missing name stay isolated by vendor identity); companies with zero + // non-deleted technicians remain as company-only groups. Top-level technician + // fields come from the primary technician (newest VendorId, promoted when a + // nonblank search matches a non-primary technician); company fields are + // company-canonical as the existing projections intend; TotalJobs is the sum of + // every status-eligible technician's distinct work-order count. + public sealed class VendorCompanyGroup + { + public int? Id { get; set; } + public int? CompanyId { get; set; } + public string? CompanyName { get; set; } + public string? ContactName { get; set; } + public string? Email { get; set; } + public string? Phone { get; set; } + public string? CompanyPhone { get; set; } + public string? PreferredContact { get; set; } + public string? Address { get; set; } + public string? City { get; set; } + public string? State { get; set; } + public string? Zip { get; set; } + public string? TradeSpecialties { get; set; } + public string? GoogleMapsUrl { get; set; } + public string? Notes { get; set; } + public bool IsActive { get; set; } + public int TotalJobs { get; set; } + public IReadOnlyList Technicians { get; set; } = Array.Empty(); + } } diff --git a/SeaHaven.Services/DTOs/VendorDTOs.cs b/SeaHaven.Services/DTOs/VendorDTOs.cs index bf30e27..12fb5b8 100644 --- a/SeaHaven.Services/DTOs/VendorDTOs.cs +++ b/SeaHaven.Services/DTOs/VendorDTOs.cs @@ -21,8 +21,13 @@ namespace SeaHaven.Services.DTOs public bool IsActive { get; set; } } - // SH-198 vendor directory row. Id is the nullable vendor id (null for company-only - // rows that have zero technicians); CompanyId is always populated. + // Shared directory row. On the SH-198 legacy per-technician path (GetVendorList) + // Id is the technician's own vendor id and Technicians stays empty — the legacy + // response shape does not project it. On the SH-281 company-grouped path + // (GetVendorDirectoryList) Id is the primary technician's vendor id (null for + // company-only groups that have zero technicians); CompanyId is populated for + // linked and company-only groups. Technicians carries the full status-eligible + // roster of the company group. public class VendorDirectoryItemDTO { public int? Id { get; set; } @@ -42,6 +47,20 @@ namespace SeaHaven.Services.DTOs public string? Notes { get; set; } public int TotalJobs { get; set; } public bool IsActive { get; set; } + public List Technicians { get; set; } = new(); + } + + // SH-281: one technician inside a company group; Email/Phone stay technician-owned. + public class VendorDirectoryTechnicianDTO + { + public int Id { get; set; } + public string? ContactName { get; set; } + public string? Email { get; set; } + public string? Phone { get; set; } + public string? PreferredContact { get; set; } + public string? TradeSpecialties { get; set; } + public bool IsActive { get; set; } + public int TotalJobs { get; set; } } public class CreateVendorDTO diff --git a/SeaHaven.Services/Implementation/VendorService.cs b/SeaHaven.Services/Implementation/VendorService.cs index c2ac206..5e4ce40 100644 --- a/SeaHaven.Services/Implementation/VendorService.cs +++ b/SeaHaven.Services/Implementation/VendorService.cs @@ -16,6 +16,7 @@ namespace SeaHaven.Services.Implementation { public class VendorService : IVendorService { + private const int MaxDirectoryPageSize = 100; private static readonly string[] TerminalLegacyStatuses = { "completed", "cancelled", "canceled" }; @@ -94,7 +95,10 @@ namespace SeaHaven.Services.Implementation }; } - public async Task> GetVendorDirectoryPagedAsync( + // SH-198 legacy per-technician directory contract (GetVendorList): raw + // pagination semantics are part of the compatibility surface, so pageSize + // is forwarded unclamped. + public async Task> GetVendorTechnicianDirectoryPagedAsync( int page, int pageSize, string? search = null, @@ -146,6 +150,74 @@ namespace SeaHaven.Services.Implementation TotalJobs = row.TotalJobs }; + // SH-281 company-grouped directory (GetVendorDirectoryList). + public async Task> GetVendorCompanyDirectoryPagedAsync( + int page, + int pageSize, + string? search = null, + bool? isActive = true, + IReadOnlyCollection? companies = null, + IReadOnlyCollection? trades = null, + IReadOnlyCollection? locations = null, + IReadOnlyCollection? jobBuckets = null, + CancellationToken cancellationToken = default) + { + var normalizedPage = Math.Max(1, page); + var normalizedPageSize = Math.Clamp(pageSize, 1, MaxDirectoryPageSize); + var (items, totalCount) = await _vendorDataService.GetCompanyDirectoryPagedAsync( + normalizedPage, + normalizedPageSize, + search, + isActive, + companies, + trades, + locations, + jobBuckets, + cancellationToken); + + return new PagedResult + { + Items = items.Select(MapToCompanyGroup).ToList(), + TotalCount = totalCount, + Page = normalizedPage, + PageSize = normalizedPageSize + }; + } + + private static VendorDirectoryItemDTO MapToCompanyGroup(VendorCompanyGroup group) => new() + { + Id = group.Id, + CompanyId = group.CompanyId, + CompanyName = group.CompanyName, + ContactName = group.ContactName, + Email = group.Email, + Phone = group.Phone, + CompanyPhone = group.CompanyPhone, + PreferredContact = group.PreferredContact, + Address = group.Address, + City = group.City, + State = group.State, + Zipcode = group.Zip, + TradeSpecialties = group.TradeSpecialties, + GoogleMapsUrl = group.GoogleMapsUrl, + Notes = group.Notes, + IsActive = group.IsActive, + TotalJobs = group.TotalJobs, + Technicians = group.Technicians.Select(MapToTechnician).ToList() + }; + + private static VendorDirectoryTechnicianDTO MapToTechnician(VendorCompanyGroupTechnician technician) => new() + { + Id = technician.Id, + ContactName = technician.ContactName, + Email = technician.Email, + Phone = technician.Phone, + PreferredContact = technician.PreferredContact, + TradeSpecialties = technician.TradeSpecialties, + IsActive = technician.IsActive, + TotalJobs = technician.TotalJobs + }; + public async Task CreateVendorAsync(CreateVendorDTO dto, string userId) { NormalizePhoneFields(dto); diff --git a/SeaHaven.Services/Interfaces/IVendorService.cs b/SeaHaven.Services/Interfaces/IVendorService.cs index 68e8ae9..74782af 100644 --- a/SeaHaven.Services/Interfaces/IVendorService.cs +++ b/SeaHaven.Services/Interfaces/IVendorService.cs @@ -17,8 +17,22 @@ namespace SeaHaven.Services.Interfaces IReadOnlyCollection? locations = null, IReadOnlyCollection? jobBuckets = null); - // SH-198 vendor directory: per-technician rows UNION company-only rows. - Task> GetVendorDirectoryPagedAsync( + // SH-198 legacy vendor directory contract backing GetVendorList: one row per + // technician (per-technician rows UNION company-only rows), raw pagination. + Task> GetVendorTechnicianDirectoryPagedAsync( + int page, + int pageSize, + string? search = null, + bool? isActive = true, + IReadOnlyCollection? companies = null, + IReadOnlyCollection? trades = null, + IReadOnlyCollection? locations = null, + IReadOnlyCollection? jobBuckets = null, + CancellationToken cancellationToken = default); + + // SH-281 company directory backing GetVendorDirectoryList: company-grouped + // rows with nested technicians and bounded page sizes. + Task> GetVendorCompanyDirectoryPagedAsync( int page, int pageSize, string? search = null, From 3a4af64a64be6f3506d5c12927c4412f95ea38b4 Mon Sep 17 00:00:00 2001 From: Alexandre Brandizzi Date: Tue, 15 Sep 2026 16:08:14 -0300 Subject: [PATCH 002/183] fix(observability): preserve backend release identity (#114) --- .../SentryObservabilityTests.cs | 70 ++++++++++++++++++- .../Observability/SentryObservability.cs | 43 +++++++++--- docs/adr/0002-sentry-observability.md | 7 +- scripts/package-elastic-beanstalk.sh | 1 + 4 files changed, 108 insertions(+), 13 deletions(-) diff --git a/Api.SeaHavenIndustries.Tests/SentryObservabilityTests.cs b/Api.SeaHavenIndustries.Tests/SentryObservabilityTests.cs index cb760e8..4b83b8d 100644 --- a/Api.SeaHavenIndustries.Tests/SentryObservabilityTests.cs +++ b/Api.SeaHavenIndustries.Tests/SentryObservabilityTests.cs @@ -1,3 +1,4 @@ +using System.Reflection; using System.Security.Claims; using Api.SeaHavenIndustries.Observability; using FluentAssertions; @@ -14,6 +15,7 @@ namespace Api.SeaHavenIndustries.Tests; public class SentryObservabilityTests { private static readonly string ValidSha = new string('a', 40); + private static readonly string UpperSha = "ABCDEF0123456789ABCDEF0123456789ABCDEF01"; [Fact] public void ResolveRelease_Accepts_ServicePrefixed40HexCommit() @@ -23,15 +25,57 @@ public class SentryObservabilityTests } [Theory] + [InlineData(null)] [InlineData("1.0.0")] [InlineData("shoc-backend@abc")] [InlineData("shoc-backend@not-a-sha-at-all")] - [InlineData("other-service@" + "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")] + [InlineData("other-service@aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")] + [InlineData("SHOC-BACKEND@aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")] [InlineData("")] - public void ResolveRelease_FallsBackToLocalDevelopment_ForNonReleaseVersion(string version) + [InlineData("shoc-backend@aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")] + [InlineData("shoc-backend@aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")] + [InlineData("shoc-backend@aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa+bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb")] + [InlineData("shoc-backend@aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa+dirty")] + [InlineData("shoc-backend@aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa+")] + [InlineData("shoc-backend@aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa++")] + [InlineData("shoc-backend@aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa+aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa+extra")] + public void ResolveRelease_FallsBackToLocalDevelopment_ForNonReleaseVersion(string? version) { SentryObservability.ResolveRelease(version) .Should().Be(SentryObservability.LocalDevelopmentRelease); + SentryObservability.ResolveCommitSha(version) + .Should().BeNull(); + } + + [Fact] + public void ResolveRelease_Accepts_SdkAppendedMatchingSourceRevisionSuffix() + { + var informationalVersion = "shoc-backend@" + ValidSha + "+" + ValidSha; + + SentryObservability.ResolveRelease(informationalVersion) + .Should().Be("shoc-backend@" + ValidSha); + SentryObservability.ResolveCommitSha(informationalVersion) + .Should().Be(ValidSha); + } + + [Fact] + public void ResolveRelease_Accepts_SuffixDifferingOnlyInCase_FromTheCommitSha() + { + var canonicalSha = UpperSha.ToLowerInvariant(); + + SentryObservability.ResolveRelease("shoc-backend@" + UpperSha + "+" + canonicalSha) + .Should().Be("shoc-backend@" + canonicalSha); + } + + [Fact] + public void ResolveRelease_NormalizesUppercaseCommitShaToLowercase() + { + var canonicalSha = UpperSha.ToLowerInvariant(); + + SentryObservability.ResolveRelease("shoc-backend@" + UpperSha) + .Should().Be("shoc-backend@" + canonicalSha); + SentryObservability.ResolveCommitSha("shoc-backend@" + UpperSha) + .Should().Be(canonicalSha); } [Fact] @@ -39,6 +83,28 @@ public class SentryObservabilityTests { var release = SentryObservability.ResolveRelease("shoc-backend@" + ValidSha); release[(SentryObservability.ServiceName.Length + 1)..].Should().Be(ValidSha); + SentryObservability.ResolveCommitSha("shoc-backend@" + ValidSha) + .Should().Be(ValidSha); + } + + [Fact] + public void ResolveRelease_AndCommitSha_FromNonReleaseAssembly_FallBackSafely() + { + var assembly = typeof(SentryObservabilityTests).Assembly; + + SentryObservability.ResolveRelease(assembly) + .Should().Be(SentryObservability.LocalDevelopmentRelease); + SentryObservability.ResolveCommitSha(assembly) + .Should().BeNull(); + } + + [Fact] + public void ResolveRelease_AndCommitSha_FromNullAssembly_FallBackSafely() + { + SentryObservability.ResolveRelease((Assembly?)null) + .Should().Be(SentryObservability.LocalDevelopmentRelease); + SentryObservability.ResolveCommitSha((Assembly?)null) + .Should().BeNull(); } [Fact] diff --git a/Api.SeaHavenIndustries/Observability/SentryObservability.cs b/Api.SeaHavenIndustries/Observability/SentryObservability.cs index 0a1ec56..f58f8f7 100644 --- a/Api.SeaHavenIndustries/Observability/SentryObservability.cs +++ b/Api.SeaHavenIndustries/Observability/SentryObservability.cs @@ -29,21 +29,46 @@ public static class SentryObservability .GetCustomAttribute()? .InformationalVersion; - return IsReleaseInformationalVersion(informationalVersion) - ? informationalVersion![ReleasePrefix.Length..] - : null; + return ResolveCommitSha(informationalVersion); } public static string ResolveRelease(string? informationalVersion) => - IsReleaseInformationalVersion(informationalVersion) - ? informationalVersion! + TryResolveCommitSha(informationalVersion, out var commitSha) + ? ReleasePrefix + commitSha : LocalDevelopmentRelease; + public static string? ResolveCommitSha(string? informationalVersion) => + TryResolveCommitSha(informationalVersion, out var commitSha) + ? commitSha + : null; + public static bool IsReleaseInformationalVersion(string? value) => - value is not null - && value.StartsWith(ReleasePrefix, StringComparison.Ordinal) - && value.Length == ReleasePrefix.Length + CommitShaLength - && value[ReleasePrefix.Length..].All(c => c is >= '0' and <= '9' or >= 'a' and <= 'f' or >= 'A' and <= 'F'); + TryResolveCommitSha(value, out _); + + private static bool TryResolveCommitSha(string? value, out string? commitSha) + { + commitSha = null; + + if (value is null || !value.StartsWith(ReleasePrefix, StringComparison.Ordinal)) + return false; + + var body = value[ReleasePrefix.Length..]; + var suffixSeparatorIndex = body.IndexOf('+'); + var sha = suffixSeparatorIndex < 0 ? body : body[..suffixSeparatorIndex]; + + if (sha.Length != CommitShaLength || !sha.All(IsCommitShaHexDigit)) + return false; + + if (suffixSeparatorIndex >= 0 + && !string.Equals(body[(suffixSeparatorIndex + 1)..], sha, StringComparison.OrdinalIgnoreCase)) + return false; + + commitSha = sha.ToLowerInvariant(); + return true; + } + + private static bool IsCommitShaHexDigit(char c) => + c is >= '0' and <= '9' or >= 'a' and <= 'f' or >= 'A' and <= 'F'; public static void ConfigureRequest(IHub hub, HttpContext context) { diff --git a/docs/adr/0002-sentry-observability.md b/docs/adr/0002-sentry-observability.md index 6bf7c52..37a2a78 100644 --- a/docs/adr/0002-sentry-observability.md +++ b/docs/adr/0002-sentry-observability.md @@ -14,11 +14,14 @@ route values, query strings, or identity claims. ## Decision 1. **Release identity.** `SentryObservability.ResolveRelease(Assembly)` accepts an - informational version shaped `shoc-backend@<40 hex commit sha>` and otherwise - resolves to `local-development`. `scripts/package-elastic-beanstalk.sh` resolves + informational version shaped `shoc-backend@<40 hex commit sha>`, tolerates the + .NET SDK's matching `+` suffix for compatibility, canonicalizes the + result to lowercase, and otherwise resolves to `local-development`. + `scripts/package-elastic-beanstalk.sh` resolves the commit from `APP_COMMIT_SHA` → `GITHUB_SHA` → `git rev-parse HEAD`, fails when `CI=true` cannot produce a valid 40-hex sha, and publishes with `-p:SourceRevisionId`, `-p:InformationalVersion=shoc-backend@`, + `-p:IncludeSourceRevisionInInformationalVersion=false`, `-p:DebugType=portable`, `-p:DebugSymbols=true`. 2. **Default tags.** `service=shoc-backend` and `app.commit=` on `SentryOptions.DefaultTags`. All events use the same commit-addressed diff --git a/scripts/package-elastic-beanstalk.sh b/scripts/package-elastic-beanstalk.sh index 27e1288..bef20cf 100755 --- a/scripts/package-elastic-beanstalk.sh +++ b/scripts/package-elastic-beanstalk.sh @@ -112,6 +112,7 @@ log "publish $API_PROJECT (Release, self-contained, $RUNTIME)" -p:UseAppHost=true \ -p:SourceRevisionId="$COMMIT_SHA" \ -p:InformationalVersion="shoc-backend@$COMMIT_SHA" \ + -p:IncludeSourceRevisionInInformationalVersion=false \ -p:DebugType=portable \ -p:DebugSymbols=true From 1a6edd255a1d67c06b602258540c6b0111d3501d Mon Sep 17 00:00:00 2001 From: Alexandre Brandizzi Date: Tue, 15 Sep 2026 16:32:30 -0300 Subject: [PATCH 003/183] feat(locations): filter sites by state (#117) --- .../LocationControllerTests.cs | 42 ++++++++- .../LocationDataServiceTests.cs | 89 +++++++++++++++++++ .../LocationServiceTests.cs | 89 ++++++++++++++++++- .../Controllers/LocationController.cs | 64 +++++++------ .../Implementation/LocationDataService.cs | 6 ++ .../Interfaces/ILocationDataService.cs | 2 +- SeaHaven.Services/Helpers/UsStateCodes.cs | 68 ++++++++++++++ .../Implementation/LocationService.cs | 33 ++++++- .../Interfaces/ILocationService.cs | 2 +- .../WorkOrderAccountScopeTests.cs | 4 +- 10 files changed, 362 insertions(+), 37 deletions(-) create mode 100644 Api.SeaHavenIndustries.Tests/LocationDataServiceTests.cs create mode 100644 SeaHaven.Services/Helpers/UsStateCodes.cs diff --git a/Api.SeaHavenIndustries.Tests/LocationControllerTests.cs b/Api.SeaHavenIndustries.Tests/LocationControllerTests.cs index f8f3487..47e53dd 100644 --- a/Api.SeaHavenIndustries.Tests/LocationControllerTests.cs +++ b/Api.SeaHavenIndustries.Tests/LocationControllerTests.cs @@ -4,6 +4,7 @@ using Api.SeaHavenIndustries.DTOs; using Data.SeaHavenIndustries; using FluentAssertions; using FluentValidation; +using FluentValidation.Results; using Microsoft.AspNetCore.Mvc; using Microsoft.Extensions.Logging; using Moq; @@ -25,7 +26,7 @@ public class LocationControllerTests public async Task GetLocationList_ReturnsPaginationEnvelopeWithServiceData() { var service = new Mock(); - service.Setup(s => s.GetLocationListPagedAsync(1, 10, "a", It.IsAny())) + service.Setup(s => s.GetLocationListPagedAsync(1, 10, "a", null, It.IsAny())) .ReturnsAsync(new PagedResult { Items = new List { new() { Id = 1, Name = "Site" } }, @@ -34,7 +35,7 @@ public class LocationControllerTests PageSize = 10 }); - var result = await NewController(service).GetLocationList("a", 1, 10, CancellationToken.None); + var result = await NewController(service).GetLocationList("a", 1, 10, cancellationToken: CancellationToken.None); var ok = result.Should().BeOfType().Subject; var envelope = ok.Value.Should().BeOfType().Subject; @@ -44,6 +45,43 @@ public class LocationControllerTests envelope.TotalPages.Should().Be(1); } + [Fact] + public async Task GetLocationList_PassesStatesFilterToService() + { + var service = new Mock(); + service.Setup(s => s.GetLocationListPagedAsync(1, 10, null, "tx, mo", It.IsAny())) + .ReturnsAsync(new PagedResult + { + Items = new List(), + TotalCount = 0, + Page = 1, + PageSize = 10 + }); + + var result = await NewController(service).GetLocationList(null, 1, 10, "tx, mo", CancellationToken.None); + + result.Should().BeOfType(); + service.VerifyAll(); + } + + [Fact] + public async Task GetLocationList_WhenStatesInvalid_ReturnsExistingValidationErrorShape() + { + var service = new Mock(); + service.Setup(s => s.GetLocationListPagedAsync(It.IsAny(), It.IsAny(), It.IsAny(), It.IsAny(), It.IsAny())) + .ThrowsAsync(new ValidationException(new[] + { + new ValidationFailure("states", "states must be valid US postal abbreviations: ZZ.") + })); + + var result = await NewController(service).GetLocationList(null, 1, 10, "ZZ", CancellationToken.None); + + var bad = result.Should().BeOfType().Subject; + var response = bad.Value.Should().BeOfType().Subject; + response.Status.Should().Be("Validation Error"); + response.Message.Should().Contain("ZZ"); + } + [Fact] public async Task GetLocationById_WhenMissing_ReturnsNotFoundAndDoesNotLeakEntity() { diff --git a/Api.SeaHavenIndustries.Tests/LocationDataServiceTests.cs b/Api.SeaHavenIndustries.Tests/LocationDataServiceTests.cs new file mode 100644 index 0000000..0dafeaf --- /dev/null +++ b/Api.SeaHavenIndustries.Tests/LocationDataServiceTests.cs @@ -0,0 +1,89 @@ +using Data.SeaHavenIndustries; +using FluentAssertions; +using Microsoft.EntityFrameworkCore; +using SeaHaven.DataServices.Implementation; +using Xunit; + +namespace Api.SeaHavenIndustries.Tests; + +public class LocationDataServiceTests +{ + private static ApplicationDbContext NewContext() + { + var options = new DbContextOptionsBuilder() + .UseInMemoryDatabase(Guid.NewGuid().ToString()) + .Options; + return new ApplicationDbContext(options); + } + + private static async Task SeedAsync(ApplicationDbContext ctx) + { + ctx.Locations.AddRange( + new Locations { Id = 1, Name = "Alpha Site", City = "Austin", State = "TX" }, + new Locations { Id = 2, Name = "Beta Site", City = "Dallas", State = "TX" }, + new Locations { Id = 3, Name = "Gamma Yard", City = "Kansas City", State = "MO" }, + new Locations { Id = 4, Name = "Delta Hub", City = "Indianapolis", State = "indiana" }, + new Locations { Id = 5, Name = "Epsilon Depot", City = "Houston", State = "TX" }, + new Locations { Id = 6, Name = "Zeta Lot", City = "Nowhere", State = null }); + await ctx.SaveChangesAsync(); + } + + [Fact] + public async Task GetListPagedAsync_WithoutStates_ReturnsAllRows() + { + await using var ctx = NewContext(); + await SeedAsync(ctx); + + var (items, totalCount) = await new LocationDataService(ctx) + .GetListPagedAsync(1, 10, null, null, CancellationToken.None); + + totalCount.Should().Be(6); + items.Should().HaveCount(6); + } + + [Fact] + public async Task GetListPagedAsync_AppliesStatesFilterBeforeCountAndPaging() + { + await using var ctx = NewContext(); + await SeedAsync(ctx); + + var (page1, totalCount) = await new LocationDataService(ctx) + .GetListPagedAsync(1, 2, null, new[] { "TX" }, CancellationToken.None); + + totalCount.Should().Be(3, "count must reflect the state filter, not the whole table"); + page1.Should().HaveCount(2); + page1.Select(l => l.Name).Should().ContainInOrder("Alpha Site", "Beta Site"); + + var (page2, totalCountAgain) = await new LocationDataService(ctx) + .GetListPagedAsync(2, 2, null, new[] { "TX" }, CancellationToken.None); + + totalCountAgain.Should().Be(3); + page2.Select(l => l.Name).Should().ContainSingle("Epsilon Depot"); + } + + [Fact] + public async Task GetListPagedAsync_MultipleStates_KeepSearchFilter() + { + await using var ctx = NewContext(); + await SeedAsync(ctx); + + var (items, totalCount) = await new LocationDataService(ctx) + .GetListPagedAsync(1, 10, "Dallas", new[] { "TX", "MO" }, CancellationToken.None); + + totalCount.Should().Be(1); + items.Should().ContainSingle().Which.Name.Should().Be("Beta Site"); + } + + [Fact] + public async Task GetListPagedAsync_StatesFilter_ExcludesNullAndNonMatchingStates() + { + await using var ctx = NewContext(); + await SeedAsync(ctx); + + var (items, totalCount) = await new LocationDataService(ctx) + .GetListPagedAsync(1, 10, null, new[] { "IN", "INDIANA", "MO", "MISSOURI" }, CancellationToken.None); + + totalCount.Should().Be(2); + items.Select(l => l.State).Should().BeEquivalentTo("indiana", "MO"); + } +} diff --git a/Api.SeaHavenIndustries.Tests/LocationServiceTests.cs b/Api.SeaHavenIndustries.Tests/LocationServiceTests.cs index 838526d..c8986b6 100644 --- a/Api.SeaHavenIndustries.Tests/LocationServiceTests.cs +++ b/Api.SeaHavenIndustries.Tests/LocationServiceTests.cs @@ -118,7 +118,7 @@ public class LocationServiceTests SeedLocation(ctx, "Beta Site", "Dallas"); SeedLocation(ctx, "Gamma Yard", "Austin"); - var page = await NewService(ctx).GetLocationListPagedAsync(1, 10, "Austin", CancellationToken.None); + var page = await NewService(ctx).GetLocationListPagedAsync(1, 10, "Austin", cancellationToken: CancellationToken.None); page.Items.Should().HaveCount(2); page.TotalCount.Should().Be(2); @@ -126,6 +126,93 @@ public class LocationServiceTests page.Items.Select(l => l.Name).Should().NotBeNull(); } + [Fact] + public async Task GetLocationListPagedAsync_NormalizesStates_CaseWhitespaceAndDuplicates() + { + var data = new Mock(); + IReadOnlyCollection? captured = default; + data.Setup(d => d.GetListPagedAsync(1, 10, null, It.IsAny?>(), It.IsAny())) + .Callback?, CancellationToken>((_, _, _, states, _) => captured = states) + .ReturnsAsync((new List(), 0)); + + await NewServiceWithSpy(data.Object).GetLocationListPagedAsync(1, 10, null, " tx , Mo ,,TX, ", CancellationToken.None); + + captured.Should().NotBeNull(); + captured.Should().BeEquivalentTo(new[] { "TX", "TEXAS", "MO", "MISSOURI" }); + captured.Should().HaveCount(4); + } + + [Fact] + public async Task GetLocationListPagedAsync_EmptyOrWhitespaceStates_PassesNoStateFilter() + { + foreach (var states in new[] { null, "", " ", " , , " }) + { + var data = new Mock(); + IReadOnlyCollection? captured = default; + data.Setup(d => d.GetListPagedAsync(It.IsAny(), It.IsAny(), It.IsAny(), It.IsAny?>(), It.IsAny())) + .Callback?, CancellationToken>((_, _, _, stateFilter, _) => captured = stateFilter) + .ReturnsAsync((new List(), 0)); + + var page = await NewServiceWithSpy(data.Object).GetLocationListPagedAsync(1, 10, "search", states, CancellationToken.None); + + captured.Should().BeNull($"states input '{states}' must mean no filter"); + page.Should().NotBeNull(); + } + } + + [Fact] + public async Task GetLocationListPagedAsync_InvalidStates_ThrowsValidationAndNeverQueries() + { + var data = new Mock(); + + var act = () => NewServiceWithSpy(data.Object).GetLocationListPagedAsync(1, 10, null, "TX, zz, QQ", CancellationToken.None); + + (await act.Should().ThrowAsync()) + .Which.Errors.Should().ContainSingle(e => + e.PropertyName == "states" + && e.ErrorMessage.Contains("ZZ") + && e.ErrorMessage.Contains("QQ") + && !e.ErrorMessage.Contains("TX")); + data.Verify(d => d.GetListPagedAsync(It.IsAny(), It.IsAny(), It.IsAny(), It.IsAny?>(), It.IsAny()), Times.Never); + } + + [Fact] + public async Task GetLocationListPagedAsync_AcceptsAllFiftyStateCodes() + { + var data = new Mock(); + data.Setup(d => d.GetListPagedAsync(It.IsAny(), It.IsAny(), It.IsAny(), It.IsAny?>(), It.IsAny())) + .ReturnsAsync((new List(), 0)); + + var allStates = string.Join(",", SeaHaven.Services.Helpers.UsStateCodes.All); + + var act = () => NewServiceWithSpy(data.Object).GetLocationListPagedAsync(1, 10, null, allStates, CancellationToken.None); + + await act.Should().NotThrowAsync(); + } + + [Fact] + public async Task GetLocationListPagedAsync_AppliesNormalizedStatesThroughDataService() + { + using var ctx = NewContext(); + SeedLocation(ctx, "Alpha Site", "Austin").State = "TX"; + SeedLocation(ctx, "Beta Site", "Dallas").State = "TX"; + SeedLocation(ctx, "Gamma Yard", "Kansas City").State = "MO"; + SeedLocation(ctx, "Delta Hub", "Indianapolis").State = "IN"; + await ctx.SaveChangesAsync(); + + var page = await NewService(ctx).GetLocationListPagedAsync(1, 10, null, " mo , tx ", CancellationToken.None); + + page.TotalCount.Should().Be(3); + page.Items.Select(l => l.Name).Should().BeEquivalentTo("Alpha Site", "Beta Site", "Gamma Yard"); + } + + private static LocationService NewServiceWithSpy(ILocationDataService dataService) => + new( + dataService, + Mock.Of(), + new CreateLocationValidation(), + new UpdateLocationValidation()); + [Fact] public async Task GetLocationDetailAsync_ReturnsMappedDtoOrNull() { diff --git a/Api.SeaHavenIndustries/Controllers/LocationController.cs b/Api.SeaHavenIndustries/Controllers/LocationController.cs index 5c8bb30..4c11ff7 100644 --- a/Api.SeaHavenIndustries/Controllers/LocationController.cs +++ b/Api.SeaHavenIndustries/Controllers/LocationController.cs @@ -36,38 +36,46 @@ namespace Api.SeaHavenIndustries.Controllers } [HttpGet("GetLocationList")] - public async Task GetLocationList(string? search = "", int page = 1, int pageSize = 10, CancellationToken cancellationToken = default) + public async Task GetLocationList(string? search = "", int page = 1, int pageSize = 10, string? states = null, CancellationToken cancellationToken = default) { - var pagedResult = await _locationService.GetLocationListPagedAsync(page, pageSize, search, cancellationToken); - - var data = pagedResult.Items.Select(l => new + try { - Id = l.Id, - Name = l.Name, - Title = l.Title, - Address = l.Address1, - Address1 = l.Address1, - Address2 = l.Address2, - City = l.City, - State = l.State, - ZipCode = l.Zip, - Phone = l.PhoneNumber, - Contact = (string?)null, - ContactEmail = l.Email, - Status = l.Status, - AccountId = l.AccountId - }); + var pagedResult = await _locationService.GetLocationListPagedAsync(page, pageSize, search, states, cancellationToken); - var viewModel = new Pagination_DTO + var data = pagedResult.Items.Select(l => new + { + Id = l.Id, + Name = l.Name, + Title = l.Title, + Address = l.Address1, + Address1 = l.Address1, + Address2 = l.Address2, + City = l.City, + State = l.State, + ZipCode = l.Zip, + Phone = l.PhoneNumber, + Contact = (string?)null, + ContactEmail = l.Email, + Status = l.Status, + AccountId = l.AccountId + }); + + var viewModel = new Pagination_DTO + { + Data = data, + PageNumber = page, + PageSize = pageSize, + TotalCount = pagedResult.TotalCount, + TotalPages = (int)Math.Ceiling(pagedResult.TotalCount / (double)pageSize) + }; + + return Ok(viewModel); + } + catch (ValidationException vex) { - Data = data, - PageNumber = page, - PageSize = pageSize, - TotalCount = pagedResult.TotalCount, - TotalPages = (int)Math.Ceiling(pagedResult.TotalCount / (double)pageSize) - }; - - return Ok(viewModel); + var errors = string.Join(", ", vex.Errors.Select(e => e.ErrorMessage)); + return BadRequest(new Response { Status = "Validation Error", Message = errors }); + } } [HttpGet("{id}")] diff --git a/SeaHaven.DataServices/Implementation/LocationDataService.cs b/SeaHaven.DataServices/Implementation/LocationDataService.cs index 7a589e7..5ea6983 100644 --- a/SeaHaven.DataServices/Implementation/LocationDataService.cs +++ b/SeaHaven.DataServices/Implementation/LocationDataService.cs @@ -135,6 +135,7 @@ namespace SeaHaven.DataServices.Implementation int page, int pageSize, string? search, + IReadOnlyCollection? states, CancellationToken cancellationToken) { var query = _context.Locations.AsNoTracking(); @@ -146,6 +147,11 @@ namespace SeaHaven.DataServices.Implementation l.City!.Contains(search)); } + if (states is { Count: > 0 }) + { + query = query.Where(l => l.State != null && states.Contains(l.State.Trim().ToUpper())); + } + var totalCount = await query.CountAsync(cancellationToken); var items = await query .OrderBy(l => l.Name) diff --git a/SeaHaven.DataServices/Interfaces/ILocationDataService.cs b/SeaHaven.DataServices/Interfaces/ILocationDataService.cs index 8e7a51a..a2cbf6b 100644 --- a/SeaHaven.DataServices/Interfaces/ILocationDataService.cs +++ b/SeaHaven.DataServices/Interfaces/ILocationDataService.cs @@ -34,7 +34,7 @@ namespace SeaHaven.DataServices.Interfaces Task ExistsAsync(int id); Task CountAsync(); - Task<(List Items, int TotalCount)> GetListPagedAsync(int page, int pageSize, string? search, CancellationToken cancellationToken); + Task<(List Items, int TotalCount)> GetListPagedAsync(int page, int pageSize, string? search, IReadOnlyCollection? states, CancellationToken cancellationToken); Task GetDetailByIdAsync(int id, CancellationToken cancellationToken); Task GetByIdForUpdateAsync(int id, CancellationToken cancellationToken); Task AddAsync(Locations location, CancellationToken cancellationToken); diff --git a/SeaHaven.Services/Helpers/UsStateCodes.cs b/SeaHaven.Services/Helpers/UsStateCodes.cs new file mode 100644 index 0000000..9d64a1a --- /dev/null +++ b/SeaHaven.Services/Helpers/UsStateCodes.cs @@ -0,0 +1,68 @@ +namespace SeaHaven.Services.Helpers +{ + public static class UsStateCodes + { + private static readonly IReadOnlyDictionary Names = new Dictionary(StringComparer.Ordinal) + { + ["AL"] = "ALABAMA", + ["AK"] = "ALASKA", + ["AZ"] = "ARIZONA", + ["AR"] = "ARKANSAS", + ["CA"] = "CALIFORNIA", + ["CO"] = "COLORADO", + ["CT"] = "CONNECTICUT", + ["DE"] = "DELAWARE", + ["FL"] = "FLORIDA", + ["GA"] = "GEORGIA", + ["HI"] = "HAWAII", + ["ID"] = "IDAHO", + ["IL"] = "ILLINOIS", + ["IN"] = "INDIANA", + ["IA"] = "IOWA", + ["KS"] = "KANSAS", + ["KY"] = "KENTUCKY", + ["LA"] = "LOUISIANA", + ["ME"] = "MAINE", + ["MD"] = "MARYLAND", + ["MA"] = "MASSACHUSETTS", + ["MI"] = "MICHIGAN", + ["MN"] = "MINNESOTA", + ["MS"] = "MISSISSIPPI", + ["MO"] = "MISSOURI", + ["MT"] = "MONTANA", + ["NE"] = "NEBRASKA", + ["NV"] = "NEVADA", + ["NH"] = "NEW HAMPSHIRE", + ["NJ"] = "NEW JERSEY", + ["NM"] = "NEW MEXICO", + ["NY"] = "NEW YORK", + ["NC"] = "NORTH CAROLINA", + ["ND"] = "NORTH DAKOTA", + ["OH"] = "OHIO", + ["OK"] = "OKLAHOMA", + ["OR"] = "OREGON", + ["PA"] = "PENNSYLVANIA", + ["RI"] = "RHODE ISLAND", + ["SC"] = "SOUTH CAROLINA", + ["SD"] = "SOUTH DAKOTA", + ["TN"] = "TENNESSEE", + ["TX"] = "TEXAS", + ["UT"] = "UTAH", + ["VT"] = "VERMONT", + ["VA"] = "VIRGINIA", + ["WA"] = "WASHINGTON", + ["WV"] = "WEST VIRGINIA", + ["WI"] = "WISCONSIN", + ["WY"] = "WYOMING" + }; + + public static IReadOnlySet All { get; } = new HashSet(Names.Keys, StringComparer.Ordinal); + + public static IReadOnlyCollection ExpandStorageValues(IEnumerable codes) + { + return codes + .SelectMany(code => new[] { code, Names[code] }) + .ToArray(); + } + } +} diff --git a/SeaHaven.Services/Implementation/LocationService.cs b/SeaHaven.Services/Implementation/LocationService.cs index 1b301af..9c938aa 100644 --- a/SeaHaven.Services/Implementation/LocationService.cs +++ b/SeaHaven.Services/Implementation/LocationService.cs @@ -165,9 +165,12 @@ namespace SeaHaven.Services.Implementation int page, int pageSize, string? search, - CancellationToken cancellationToken) + string? states = null, + CancellationToken cancellationToken = default) { - var (items, totalCount) = await _locationDataService.GetListPagedAsync(page, pageSize, search, cancellationToken); + var stateFilter = NormalizeStateFilter(states); + var storageStateFilter = stateFilter == null ? null : UsStateCodes.ExpandStorageValues(stateFilter); + var (items, totalCount) = await _locationDataService.GetListPagedAsync(page, pageSize, search, storageStateFilter, cancellationToken); return new PagedResult { Items = items.Select(MapToDTO).ToList(), @@ -177,6 +180,32 @@ namespace SeaHaven.Services.Implementation }; } + internal static IReadOnlyCollection? NormalizeStateFilter(string? states) + { + if (string.IsNullOrWhiteSpace(states)) + return null; + + var normalized = states + .Split(',', StringSplitOptions.RemoveEmptyEntries | StringSplitOptions.TrimEntries) + .Select(code => code.ToUpperInvariant()) + .Distinct(StringComparer.Ordinal) + .ToList(); + + if (normalized.Count == 0) + return null; + + var invalid = normalized.Where(code => !UsStateCodes.All.Contains(code)).ToList(); + if (invalid.Count > 0) + { + throw new ValidationException(new[] + { + new ValidationFailure("states", $"states must be valid US postal abbreviations: {string.Join(", ", invalid)}.") + }); + } + + return normalized; + } + public async Task GetLocationDetailAsync(int id, CancellationToken cancellationToken) { var location = await _locationDataService.GetDetailByIdAsync(id, cancellationToken); diff --git a/SeaHaven.Services/Interfaces/ILocationService.cs b/SeaHaven.Services/Interfaces/ILocationService.cs index c13ec65..661adde 100644 --- a/SeaHaven.Services/Interfaces/ILocationService.cs +++ b/SeaHaven.Services/Interfaces/ILocationService.cs @@ -19,7 +19,7 @@ namespace SeaHaven.Services.Interfaces Task LocationExistsAsync(int id); Task GetTotalLocationCountAsync(); - Task> GetLocationListPagedAsync(int page, int pageSize, string? search, CancellationToken cancellationToken); + Task> GetLocationListPagedAsync(int page, int pageSize, string? search, string? states = null, CancellationToken cancellationToken = default); Task GetLocationDetailAsync(int id, CancellationToken cancellationToken); Task CreateLocationFromRequestAsync(LocationCreateRequestDTO request, ClaimsPrincipal user, CancellationToken cancellationToken); Task UpdateLocationFromRequestAsync(int id, LocationUpdateRequestDTO request, ClaimsPrincipal user, CancellationToken cancellationToken); diff --git a/SeaHavenIndustries.Tests/WorkOrderAccountScopeTests.cs b/SeaHavenIndustries.Tests/WorkOrderAccountScopeTests.cs index 820fde2..a081f75 100644 --- a/SeaHavenIndustries.Tests/WorkOrderAccountScopeTests.cs +++ b/SeaHavenIndustries.Tests/WorkOrderAccountScopeTests.cs @@ -835,8 +835,8 @@ public class WorkOrderAccountScopeTests public Task ExistsAsync(int id) => _inner.ExistsAsync(id); public Task CountAsync() => _inner.CountAsync(); public Task<(List Items, int TotalCount)> GetListPagedAsync( - int page, int pageSize, string? search, CancellationToken cancellationToken) - => _inner.GetListPagedAsync(page, pageSize, search, cancellationToken); + int page, int pageSize, string? search, IReadOnlyCollection? states, CancellationToken cancellationToken) + => _inner.GetListPagedAsync(page, pageSize, search, states, cancellationToken); public Task GetDetailByIdAsync(int id, CancellationToken cancellationToken) => _inner.GetDetailByIdAsync(id, cancellationToken); public Task GetByIdForUpdateAsync(int id, CancellationToken cancellationToken) From 13ce4b7e883b18e99558d44b8cb32c046053790c Mon Sep 17 00:00:00 2001 From: Alexandre Brandizzi Date: Tue, 15 Sep 2026 16:39:49 -0300 Subject: [PATCH 004/183] docs: add complete dev Postman API collection (#119) * docs: add dev Postman starter collection * docs: generate complete dev Postman API collection --- postman/README.md | 65 + postman/SeaHaven-Dev.postman_collection.json | 19314 ++++++++++++++++ postman/SeaHaven-Dev.postman_environment.json | 30 + scripts/generate-postman-collection.mjs | 375 + 4 files changed, 19784 insertions(+) create mode 100644 postman/README.md create mode 100644 postman/SeaHaven-Dev.postman_collection.json create mode 100644 postman/SeaHaven-Dev.postman_environment.json create mode 100644 scripts/generate-postman-collection.mjs diff --git a/postman/README.md b/postman/README.md new file mode 100644 index 0000000..4782b7c --- /dev/null +++ b/postman/README.md @@ -0,0 +1,65 @@ +# SeaHaven Dev Postman collection + +This directory contains the complete SeaHaven backend **dev** API collection, +generated from the live OpenAPI contract. The generated collection currently +contains every operation in the contract (368 operations across 330 paths), +including all documented parameters, request bodies, schemas, and response +codes. + +## Files + +| File | Purpose | +| --- | --- | +| `SeaHaven-Dev.postman_collection.json` | Complete OpenAPI-derived Postman v2.1 collection, grouped by API tag | +| `SeaHaven-Dev.postman_environment.json` | Dev authentication environment with secret username, password, and reusable bearer token | +| `../scripts/generate-postman-collection.mjs` | Deterministic generator and coverage checker | + +## Getting started + +1. Import `SeaHaven-Dev.postman_collection.json` into Postman. +2. Import `SeaHaven-Dev.postman_environment.json` and select **SeaHaven - Dev**. +3. Enter the dev test account's `username` and `password` in the environment. + They are empty and secret by default; never commit or share populated values. +4. Run **Setup → Authentication - Login**. The pre-request script clears any + stale token, skips the request when either credential is missing, and never + logs credentials. A successful response stores only its non-empty `token` + field in the environment's `token` variable. +5. All generated API requests inherit collection-level `Bearer {{token}}` + authentication. They reuse the captured token automatically. + +## Generated requests and examples + +Every OpenAPI operation is included under its first alphabetically sorted tag. +Path, query, and header parameters retain their required/optional status, +schema hint, and description. JSON request bodies use recursively generated +illustrative placeholders from local OpenAPI schemas; multipart requests use +form-data fields and mark binary fields as files. These examples are not live +records: replace placeholder values with a valid dev fixture before sending. +No response bodies, credentials, tokens, or other dev data are stored in this +repository. + +The generated test script only checks that the response status is one of the +codes documented by OpenAPI. It does not assume every operation returns `200`. + +## Regenerate or check coverage + +From the backend repository root: + +```bash +node scripts/generate-postman-collection.mjs +node scripts/generate-postman-collection.mjs --check +``` + +The generator fetches `https://api.dev.seahaven.com/swagger/v1/swagger.json`, +fails on a non-JSON/non-success response, and rewrites the collection and the +empty-credential environment deterministically. `--check` compares the checked +in collection with the current contract and verifies operation count, unique +operation keys, request-body coverage, Bearer inheritance, and the explicit +no-auth login exception. + +## Safety + +This collection is **dev-only**. Do not point it at staging or production. Keep +`username`, `password`, and `token` local to your Postman workspace; never mark +them shared, export them, or commit them. Review every illustrative body and +parameter before running a mutating request. diff --git a/postman/SeaHaven-Dev.postman_collection.json b/postman/SeaHaven-Dev.postman_collection.json new file mode 100644 index 0000000..7d2eb8e --- /dev/null +++ b/postman/SeaHaven-Dev.postman_collection.json @@ -0,0 +1,19314 @@ +{ + "info": { + "name": "SeaHaven - Dev API (OpenAPI generated)", + "_postman_id": "a1f0514a-5e9f-41bd-a145-7163671b94db", + "description": "Complete Postman collection generated from https://api.dev.seahaven.com/swagger/v1/swagger.json. It contains every OpenAPI operation in the published dev contract. Dev only. Replace illustrative placeholders before sending requests.", + "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json" + }, + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{token}}", + "type": "string" + } + ] + }, + "variable": [ + { + "key": "baseUrl", + "value": "https://api.dev.seahaven.com", + "type": "string" + } + ], + "item": [ + { + "name": "Setup", + "item": [ + { + "name": "Swagger - OpenAPI document", + "request": { + "auth": { + "type": "noauth" + }, + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/swagger/v1/swagger.json", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "swagger", + "v1", + "swagger.json" + ] + }, + "description": "Live OpenAPI contract for dev (https://api.dev.seahaven.com/swagger/v1/swagger.json). Import this URL when you need the latest server surface. No auth required." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "pm.test(\"OpenAPI document responded 200\", function () { pm.response.to.have.status(200); });", + "pm.test(\"OpenAPI document is JSON\", function () { pm.expect(pm.response.headers.get(\"Content-Type\")).to.include(\"application/json\"); });", + "pm.test(\"OpenAPI document has paths\", function () { pm.expect(pm.response.json()).to.have.property(\"paths\"); });" + ] + } + } + ] + }, + { + "name": "Authentication - Login", + "request": { + "auth": { + "type": "noauth" + }, + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"username\": \"{{username}}\",\n \"password\": \"{{password}}\"\n}", + "options": { + "raw": { + "language": "json" + } + }, + "description": "Credentials are read from the selected secret environment and are never logged." + }, + "url": { + "raw": "{{baseUrl}}/api/Authentication/login", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "Authentication", + "login" + ] + }, + "description": "Authentication login from https://api.dev.seahaven.com/swagger/v1/swagger.json. A successful response stores only the non-empty token in the selected environment. Schema: #/components/schemas/LoginModel." + }, + "event": [ + { + "listen": "prerequest", + "script": { + "type": "text/javascript", + "exec": [ + "pm.environment.set(\"token\", \"\");", + "const username = pm.environment.get(\"username\");", + "const password = pm.environment.get(\"password\");", + "if (!username || !password) {", + " pm.execution.skipRequest();", + " throw new Error(\"Select the SeaHaven - Dev environment and set username and password before logging in.\");", + "}" + ] + } + }, + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "pm.test(\"Login responded 200\", function () { pm.response.to.have.status(200); });", + "let body;", + "pm.test(\"Login responded with JSON\", function () { pm.expect(pm.response.headers.get(\"Content-Type\")).to.include(\"application/json\"); body = pm.response.json(); });", + "const token = body && body.token;", + "pm.test(\"Login response contained a non-empty token\", function () { pm.expect(token, \"expected a non-empty token field\").to.be.a(\"string\").and.not.empty; });", + "if (typeof token === \"string\" && token.length > 0) pm.environment.set(\"token\", token);" + ] + } + } + ] + } + ] + }, + { + "name": "Account", + "item": [ + { + "name": "GET /api/Account/DeleteAccounts", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/Account/DeleteAccounts?id=0", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "Account", + "DeleteAccounts" + ], + "query": [ + { + "key": "id", + "value": "0", + "description": "Optional; integer/int32", + "disabled": false + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): Account\nOperation ID: not specified\n\nParameters: query id (optional, integer/int32)\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "GET /api/Account/GetAccountList", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/Account/GetAccountList?search=&page=0&pageSize=0", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "Account", + "GetAccountList" + ], + "query": [ + { + "key": "search", + "value": "", + "description": "Optional; string", + "disabled": false + }, + { + "key": "page", + "value": "0", + "description": "Optional; integer/int32", + "disabled": false + }, + { + "key": "pageSize", + "value": "0", + "description": "Optional; integer/int32", + "disabled": false + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): Account\nOperation ID: not specified\n\nParameters: query search (optional, string); query page (optional, integer/int32); query pageSize (optional, integer/int32)\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "GET /api/accounts/DeleteAccounts", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/accounts/DeleteAccounts?id=0", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "accounts", + "DeleteAccounts" + ], + "query": [ + { + "key": "id", + "value": "0", + "description": "Optional; integer/int32", + "disabled": false + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): Account\nOperation ID: not specified\n\nParameters: query id (optional, integer/int32)\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "GET /api/accounts/GetAccountList", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/accounts/GetAccountList?search=&page=0&pageSize=0", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "accounts", + "GetAccountList" + ], + "query": [ + { + "key": "search", + "value": "", + "description": "Optional; string", + "disabled": false + }, + { + "key": "page", + "value": "0", + "description": "Optional; integer/int32", + "disabled": false + }, + { + "key": "pageSize", + "value": "0", + "description": "Optional; integer/int32", + "disabled": false + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): Account\nOperation ID: not specified\n\nParameters: query search (optional, string); query page (optional, integer/int32); query pageSize (optional, integer/int32)\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "POST /api/Account/AddAccounts", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/Account/AddAccounts", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "Account", + "AddAccounts" + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): Account\nOperation ID: not specified\n\nParameters: none\nRequest body: application/json, text/json, application/*+json; Illustrative placeholder generated from #/components/schemas/Account_DTO; replace placeholder values before sending.\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending.", + "body": { + "mode": "raw", + "raw": "{\n \"name\": \"\",\n \"type\": \"\",\n \"importance\": 0,\n \"territoryId\": 0,\n \"ownerEmployeeId\": 0,\n \"privacySetting\": \"\",\n \"about\": \"\",\n \"tags\": \"\",\n \"phone\": \"\",\n \"email\": \"\",\n \"industryId\": 0,\n \"timeZone\": \"\",\n \"website\": \"\",\n \"currencyCode\": \"\",\n \"serviceInstructions\": \"\",\n \"facebookUrl\": \"\",\n \"linkedInUrl\": \"\",\n \"twitterUrl\": \"\"\n}", + "options": { + "raw": { + "language": "json" + } + }, + "description": "Illustrative placeholder generated from #/components/schemas/Account_DTO; replace placeholder values before sending." + } + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "POST /api/Account/EditAccounts", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/Account/EditAccounts", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "Account", + "EditAccounts" + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): Account\nOperation ID: not specified\n\nParameters: none\nRequest body: application/json, text/json, application/*+json; Illustrative placeholder generated from #/components/schemas/EditAccount_DTO; replace placeholder values before sending.\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending.", + "body": { + "mode": "raw", + "raw": "{\n \"name\": \"\",\n \"type\": \"\",\n \"importance\": 0,\n \"territoryId\": 0,\n \"ownerEmployeeId\": 0,\n \"privacySetting\": \"\",\n \"about\": \"\",\n \"tags\": \"\",\n \"phone\": \"\",\n \"email\": \"\",\n \"industryId\": 0,\n \"timeZone\": \"\",\n \"website\": \"\",\n \"currencyCode\": \"\",\n \"serviceInstructions\": \"\",\n \"facebookUrl\": \"\",\n \"linkedInUrl\": \"\",\n \"twitterUrl\": \"\",\n \"id\": 0\n}", + "options": { + "raw": { + "language": "json" + } + }, + "description": "Illustrative placeholder generated from #/components/schemas/EditAccount_DTO; replace placeholder values before sending." + } + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "POST /api/accounts/AddAccounts", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/accounts/AddAccounts", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "accounts", + "AddAccounts" + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): Account\nOperation ID: not specified\n\nParameters: none\nRequest body: application/json, text/json, application/*+json; Illustrative placeholder generated from #/components/schemas/Account_DTO; replace placeholder values before sending.\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending.", + "body": { + "mode": "raw", + "raw": "{\n \"name\": \"\",\n \"type\": \"\",\n \"importance\": 0,\n \"territoryId\": 0,\n \"ownerEmployeeId\": 0,\n \"privacySetting\": \"\",\n \"about\": \"\",\n \"tags\": \"\",\n \"phone\": \"\",\n \"email\": \"\",\n \"industryId\": 0,\n \"timeZone\": \"\",\n \"website\": \"\",\n \"currencyCode\": \"\",\n \"serviceInstructions\": \"\",\n \"facebookUrl\": \"\",\n \"linkedInUrl\": \"\",\n \"twitterUrl\": \"\"\n}", + "options": { + "raw": { + "language": "json" + } + }, + "description": "Illustrative placeholder generated from #/components/schemas/Account_DTO; replace placeholder values before sending." + } + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "POST /api/accounts/EditAccounts", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/accounts/EditAccounts", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "accounts", + "EditAccounts" + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): Account\nOperation ID: not specified\n\nParameters: none\nRequest body: application/json, text/json, application/*+json; Illustrative placeholder generated from #/components/schemas/EditAccount_DTO; replace placeholder values before sending.\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending.", + "body": { + "mode": "raw", + "raw": "{\n \"name\": \"\",\n \"type\": \"\",\n \"importance\": 0,\n \"territoryId\": 0,\n \"ownerEmployeeId\": 0,\n \"privacySetting\": \"\",\n \"about\": \"\",\n \"tags\": \"\",\n \"phone\": \"\",\n \"email\": \"\",\n \"industryId\": 0,\n \"timeZone\": \"\",\n \"website\": \"\",\n \"currencyCode\": \"\",\n \"serviceInstructions\": \"\",\n \"facebookUrl\": \"\",\n \"linkedInUrl\": \"\",\n \"twitterUrl\": \"\",\n \"id\": 0\n}", + "options": { + "raw": { + "language": "json" + } + }, + "description": "Illustrative placeholder generated from #/components/schemas/EditAccount_DTO; replace placeholder values before sending." + } + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + } + ] + }, + { + "name": "Asset", + "item": [ + { + "name": "GET /api/Asset/DeleteAsset", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/Asset/DeleteAsset?id=0", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "Asset", + "DeleteAsset" + ], + "query": [ + { + "key": "id", + "value": "0", + "description": "Optional; integer/int32", + "disabled": false + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): Asset\nOperation ID: not specified\n\nParameters: query id (optional, integer/int32)\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "GET /api/Asset/GetAssetById", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/Asset/GetAssetById?id=0", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "Asset", + "GetAssetById" + ], + "query": [ + { + "key": "id", + "value": "0", + "description": "Optional; integer/int32", + "disabled": false + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): Asset\nOperation ID: not specified\n\nParameters: query id (optional, integer/int32)\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "GET /api/Asset/GetAssetList", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/Asset/GetAssetList?search=&page=0&pageSize=0", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "Asset", + "GetAssetList" + ], + "query": [ + { + "key": "search", + "value": "", + "description": "Optional; string", + "disabled": false + }, + { + "key": "page", + "value": "0", + "description": "Optional; integer/int32", + "disabled": false + }, + { + "key": "pageSize", + "value": "0", + "description": "Optional; integer/int32", + "disabled": false + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): Asset\nOperation ID: not specified\n\nParameters: query search (optional, string); query page (optional, integer/int32); query pageSize (optional, integer/int32)\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "POST /api/Asset/AddAsset", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/Asset/AddAsset", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "Asset", + "AddAsset" + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): Asset\nOperation ID: not specified\n\nParameters: none\nRequest body: application/json, text/json, application/*+json; Illustrative placeholder generated from #/components/schemas/Asset_DTO; replace placeholder values before sending.\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending.", + "body": { + "mode": "raw", + "raw": "{\n \"assetCode\": \"\",\n \"name\": \"\",\n \"description\": \"\",\n \"accountId\": 0,\n \"locationId\": 0,\n \"isActive\": false\n}", + "options": { + "raw": { + "language": "json" + } + }, + "description": "Illustrative placeholder generated from #/components/schemas/Asset_DTO; replace placeholder values before sending." + } + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "POST /api/Asset/EditAsset", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/Asset/EditAsset", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "Asset", + "EditAsset" + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): Asset\nOperation ID: not specified\n\nParameters: none\nRequest body: application/json, text/json, application/*+json; Illustrative placeholder generated from #/components/schemas/EditAsset_DTO; replace placeholder values before sending.\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending.", + "body": { + "mode": "raw", + "raw": "{\n \"id\": 0,\n \"assetCode\": \"\",\n \"name\": \"\",\n \"description\": \"\",\n \"accountId\": 0,\n \"locationId\": 0,\n \"isActive\": false\n}", + "options": { + "raw": { + "language": "json" + } + }, + "description": "Illustrative placeholder generated from #/components/schemas/EditAsset_DTO; replace placeholder values before sending." + } + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + } + ] + }, + { + "name": "Authentication", + "item": [ + { + "name": "POST /api/Authentication/ChangePassword", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/Authentication/ChangePassword", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "Authentication", + "ChangePassword" + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): Authentication\nOperation ID: not specified\n\nParameters: none\nRequest body: application/json, text/json, application/*+json; Illustrative placeholder generated from #/components/schemas/ChangePasswords; replace placeholder values before sending.\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending.", + "body": { + "mode": "raw", + "raw": "{\n \"currentpassword\": \"\",\n \"newpassword\": \"\",\n \"confirmpassword\": \"\"\n}", + "options": { + "raw": { + "language": "json" + } + }, + "description": "Illustrative placeholder generated from #/components/schemas/ChangePasswords; replace placeholder values before sending." + } + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "POST /api/Authentication/ForgetPassword", + "request": { + "method": "POST", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/Authentication/ForgetPassword?Email=", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "Authentication", + "ForgetPassword" + ], + "query": [ + { + "key": "Email", + "value": "", + "description": "Optional; string", + "disabled": false + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): Authentication\nOperation ID: not specified\n\nParameters: query Email (optional, string)\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "POST /api/Authentication/ResetPassword", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/Authentication/ResetPassword", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "Authentication", + "ResetPassword" + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): Authentication\nOperation ID: not specified\n\nParameters: none\nRequest body: application/json, text/json, application/*+json; Illustrative placeholder generated from #/components/schemas/ForgetPassword_Dto; replace placeholder values before sending.\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending.", + "body": { + "mode": "raw", + "raw": "{\n \"email\": \"\",\n \"password\": \"\",\n \"code\": \"\"\n}", + "options": { + "raw": { + "language": "json" + } + }, + "description": "Illustrative placeholder generated from #/components/schemas/ForgetPassword_Dto; replace placeholder values before sending." + } + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "POST /api/Authentication/UpdateProfile", + "request": { + "method": "POST", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/Authentication/UpdateProfile", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "Authentication", + "UpdateProfile" + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): Authentication\nOperation ID: not specified\n\nParameters: none\nRequest body: multipart/form-data; Illustrative placeholder generated from object; replace placeholder values before sending.\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending.", + "body": { + "mode": "formdata", + "formdata": [ + { + "key": "Name", + "type": "text", + "value": "", + "description": "Optional; string" + }, + { + "key": "Email", + "type": "text", + "value": "", + "description": "Optional; string" + }, + { + "key": "Contact", + "type": "text", + "value": "", + "description": "Optional; string" + }, + { + "key": "Role", + "type": "text", + "value": "", + "description": "Optional; string" + }, + { + "key": "AccountId", + "type": "text", + "value": "0", + "description": "Optional; integer/int32" + } + ], + "description": "Illustrative placeholder generated from object; replace placeholder values before sending." + } + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "POST /api/Authentication/VerificationCode", + "request": { + "method": "POST", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/Authentication/VerificationCode?code=", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "Authentication", + "VerificationCode" + ], + "query": [ + { + "key": "code", + "value": "", + "description": "Optional; string", + "disabled": false + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): Authentication\nOperation ID: not specified\n\nParameters: query code (optional, string)\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + } + ] + }, + { + "name": "Calendar", + "item": [ + { + "name": "DELETE /api/Calendar/DeleteEvent/{id}", + "request": { + "method": "DELETE", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/Calendar/DeleteEvent/:id", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "Calendar", + "DeleteEvent", + ":id" + ], + "variable": [ + { + "key": "id", + "value": "0", + "description": "Required; integer/int32" + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): Calendar\nOperation ID: not specified\n\nParameters: path id (required, integer/int32)\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "GET /api/Calendar/GetEventById/{id}", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/Calendar/GetEventById/:id", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "Calendar", + "GetEventById", + ":id" + ], + "variable": [ + { + "key": "id", + "value": "0", + "description": "Required; integer/int32" + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): Calendar\nOperation ID: not specified\n\nParameters: path id (required, integer/int32)\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "GET /api/Calendar/GetEventList", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/Calendar/GetEventList?search=&page=0&pageSize=0", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "Calendar", + "GetEventList" + ], + "query": [ + { + "key": "search", + "value": "", + "description": "Optional; string", + "disabled": false + }, + { + "key": "page", + "value": "0", + "description": "Optional; integer/int32", + "disabled": false + }, + { + "key": "pageSize", + "value": "0", + "description": "Optional; integer/int32", + "disabled": false + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): Calendar\nOperation ID: not specified\n\nParameters: query search (optional, string); query page (optional, integer/int32); query pageSize (optional, integer/int32)\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "GET /api/Calendar/GetEventsForCalendar", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/Calendar/GetEventsForCalendar?start=&end=", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "Calendar", + "GetEventsForCalendar" + ], + "query": [ + { + "key": "start", + "value": "", + "description": "Optional; string/date-time", + "disabled": false + }, + { + "key": "end", + "value": "", + "description": "Optional; string/date-time", + "disabled": false + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): Calendar\nOperation ID: not specified\n\nParameters: query start (optional, string/date-time); query end (optional, string/date-time)\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "POST /api/Calendar/AddEvent", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/Calendar/AddEvent", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "Calendar", + "AddEvent" + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): Calendar\nOperation ID: not specified\n\nParameters: none\nRequest body: application/json, text/json, application/*+json; Illustrative placeholder generated from #/components/schemas/EditEvent_DTO; replace placeholder values before sending.\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending.", + "body": { + "mode": "raw", + "raw": "{\n \"id\": 0,\n \"title\": \"\",\n \"description\": \"\",\n \"location\": \"\",\n \"recordID\": 0,\n \"recordName\": \"\",\n \"recordTargetType\": \"\",\n \"reminderMinutes\": 0,\n \"eventColor\": \"\",\n \"startDate\": \"2026-01-01T00:00:00Z\",\n \"startTime\": \"\",\n \"endDate\": \"2026-01-01T00:00:00Z\",\n \"endTime\": \"\",\n \"allDay\": false\n}", + "options": { + "raw": { + "language": "json" + } + }, + "description": "Illustrative placeholder generated from #/components/schemas/EditEvent_DTO; replace placeholder values before sending." + } + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "POST /api/Calendar/EditEvent", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/Calendar/EditEvent", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "Calendar", + "EditEvent" + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): Calendar\nOperation ID: not specified\n\nParameters: none\nRequest body: application/json, text/json, application/*+json; Illustrative placeholder generated from #/components/schemas/EditEvent_DTO; replace placeholder values before sending.\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending.", + "body": { + "mode": "raw", + "raw": "{\n \"id\": 0,\n \"title\": \"\",\n \"description\": \"\",\n \"location\": \"\",\n \"recordID\": 0,\n \"recordName\": \"\",\n \"recordTargetType\": \"\",\n \"reminderMinutes\": 0,\n \"eventColor\": \"\",\n \"startDate\": \"2026-01-01T00:00:00Z\",\n \"startTime\": \"\",\n \"endDate\": \"2026-01-01T00:00:00Z\",\n \"endTime\": \"\",\n \"allDay\": false\n}", + "options": { + "raw": { + "language": "json" + } + }, + "description": "Illustrative placeholder generated from #/components/schemas/EditEvent_DTO; replace placeholder values before sending." + } + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + } + ] + }, + { + "name": "Common", + "item": [ + { + "name": "GET /Common/GetCategories", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/Common/GetCategories", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "Common", + "GetCategories" + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): Common\nOperation ID: not specified\n\nParameters: none\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "GET /Common/GetContacts", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/Common/GetContacts", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "Common", + "GetContacts" + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): Common\nOperation ID: not specified\n\nParameters: none\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "GET /Common/GetRoles", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/Common/GetRoles", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "Common", + "GetRoles" + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): Common\nOperation ID: not specified\n\nParameters: none\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "GET /Common/GetSitesName", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/Common/GetSitesName", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "Common", + "GetSitesName" + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): Common\nOperation ID: not specified\n\nParameters: none\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "GET /Common/GetUsers", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/Common/GetUsers?search=&page=0&pageSize=0", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "Common", + "GetUsers" + ], + "query": [ + { + "key": "search", + "value": "", + "description": "Optional; string", + "disabled": false + }, + { + "key": "page", + "value": "0", + "description": "Optional; integer/int32", + "disabled": false + }, + { + "key": "pageSize", + "value": "0", + "description": "Optional; integer/int32", + "disabled": false + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): Common\nOperation ID: not specified\n\nParameters: query search (optional, string); query page (optional, integer/int32); query pageSize (optional, integer/int32)\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + } + ] + }, + { + "name": "Contact", + "item": [ + { + "name": "GET /api/Contact/DeleteContacts", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/Contact/DeleteContacts?id=0", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "Contact", + "DeleteContacts" + ], + "query": [ + { + "key": "id", + "value": "0", + "description": "Optional; integer/int32", + "disabled": false + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): Contact\nOperation ID: not specified\n\nParameters: query id (optional, integer/int32)\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "GET /api/Contact/GetAddressbook", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/Contact/GetAddressbook?search=&page=0&pageSize=0", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "Contact", + "GetAddressbook" + ], + "query": [ + { + "key": "search", + "value": "", + "description": "Optional; string", + "disabled": false + }, + { + "key": "page", + "value": "0", + "description": "Optional; integer/int32", + "disabled": false + }, + { + "key": "pageSize", + "value": "0", + "description": "Optional; integer/int32", + "disabled": false + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): Contact\nOperation ID: not specified\n\nParameters: query search (optional, string); query page (optional, integer/int32); query pageSize (optional, integer/int32)\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "GET /api/Contact/GetCategories", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/Contact/GetCategories", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "Contact", + "GetCategories" + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): Contact\nOperation ID: not specified\n\nParameters: none\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "GET /api/Contact/GetContactList", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/Contact/GetContactList?search=&page=0&pageSize=0", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "Contact", + "GetContactList" + ], + "query": [ + { + "key": "search", + "value": "", + "description": "Optional; string", + "disabled": false + }, + { + "key": "page", + "value": "0", + "description": "Optional; integer/int32", + "disabled": false + }, + { + "key": "pageSize", + "value": "0", + "description": "Optional; integer/int32", + "disabled": false + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): Contact\nOperation ID: not specified\n\nParameters: query search (optional, string); query page (optional, integer/int32); query pageSize (optional, integer/int32)\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "GET /api/Contact/GetContacts", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/Contact/GetContacts", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "Contact", + "GetContacts" + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): Contact\nOperation ID: not specified\n\nParameters: none\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "GET /api/Contact/GetLocations", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/Contact/GetLocations", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "Contact", + "GetLocations" + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): Contact\nOperation ID: not specified\n\nParameters: none\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "GET /api/Contact/GetUsers", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/Contact/GetUsers", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "Contact", + "GetUsers" + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): Contact\nOperation ID: not specified\n\nParameters: none\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "GET /api/contacts/DeleteContacts", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/contacts/DeleteContacts?id=0", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "contacts", + "DeleteContacts" + ], + "query": [ + { + "key": "id", + "value": "0", + "description": "Optional; integer/int32", + "disabled": false + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): Contact\nOperation ID: not specified\n\nParameters: query id (optional, integer/int32)\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "GET /api/contacts/GetAddressbook", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/contacts/GetAddressbook?search=&page=0&pageSize=0", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "contacts", + "GetAddressbook" + ], + "query": [ + { + "key": "search", + "value": "", + "description": "Optional; string", + "disabled": false + }, + { + "key": "page", + "value": "0", + "description": "Optional; integer/int32", + "disabled": false + }, + { + "key": "pageSize", + "value": "0", + "description": "Optional; integer/int32", + "disabled": false + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): Contact\nOperation ID: not specified\n\nParameters: query search (optional, string); query page (optional, integer/int32); query pageSize (optional, integer/int32)\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "GET /api/contacts/GetCategories", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/contacts/GetCategories", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "contacts", + "GetCategories" + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): Contact\nOperation ID: not specified\n\nParameters: none\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "GET /api/contacts/GetContactList", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/contacts/GetContactList?search=&page=0&pageSize=0", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "contacts", + "GetContactList" + ], + "query": [ + { + "key": "search", + "value": "", + "description": "Optional; string", + "disabled": false + }, + { + "key": "page", + "value": "0", + "description": "Optional; integer/int32", + "disabled": false + }, + { + "key": "pageSize", + "value": "0", + "description": "Optional; integer/int32", + "disabled": false + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): Contact\nOperation ID: not specified\n\nParameters: query search (optional, string); query page (optional, integer/int32); query pageSize (optional, integer/int32)\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "GET /api/contacts/GetContacts", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/contacts/GetContacts", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "contacts", + "GetContacts" + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): Contact\nOperation ID: not specified\n\nParameters: none\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "GET /api/contacts/GetLocations", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/contacts/GetLocations", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "contacts", + "GetLocations" + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): Contact\nOperation ID: not specified\n\nParameters: none\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "GET /api/contacts/GetUsers", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/contacts/GetUsers", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "contacts", + "GetUsers" + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): Contact\nOperation ID: not specified\n\nParameters: none\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "POST /api/Contact/AddContacts", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/Contact/AddContacts", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "Contact", + "AddContacts" + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): Contact\nOperation ID: not specified\n\nParameters: none\nRequest body: application/json, text/json, application/*+json; Illustrative placeholder generated from #/components/schemas/Contact_DTO; replace placeholder values before sending.\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending.", + "body": { + "mode": "raw", + "raw": "{\n \"title\": \"\",\n \"owner\": \"\",\n \"firstName\": \"\",\n \"middleName\": \"\",\n \"lastName\": \"\",\n \"contactType\": \"\",\n \"phoneNumber\": \"\",\n \"email\": \"\",\n \"address1\": \"\",\n \"address2\": \"\",\n \"city\": \"\",\n \"state\": \"\",\n \"zip\": \"\",\n \"facebookUrl\": \"\",\n \"linkedInUrl\": \"\",\n \"twitterUrl\": \"\",\n \"locationId\": 0,\n \"accountId\": 0\n}", + "options": { + "raw": { + "language": "json" + } + }, + "description": "Illustrative placeholder generated from #/components/schemas/Contact_DTO; replace placeholder values before sending." + } + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "POST /api/Contact/AddLocation", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/Contact/AddLocation", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "Contact", + "AddLocation" + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): Contact\nOperation ID: not specified\n\nParameters: none\nRequest body: application/json, text/json, application/*+json; Illustrative placeholder generated from #/components/schemas/Location_DTO; replace placeholder values before sending.\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending.", + "body": { + "mode": "raw", + "raw": "{\n \"title\": \"\",\n \"name\": \"\",\n \"address\": \"\",\n \"city\": \"\",\n \"state\": \"\",\n \"zipCode\": \"\",\n \"phone\": \"\",\n \"contact\": \"\",\n \"contactEmail\": \"\",\n \"status\": \"\",\n \"accountId\": \"\"\n}", + "options": { + "raw": { + "language": "json" + } + }, + "description": "Illustrative placeholder generated from #/components/schemas/Location_DTO; replace placeholder values before sending." + } + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "POST /api/Contact/DeleteLocation", + "request": { + "method": "POST", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/Contact/DeleteLocation?Id=0", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "Contact", + "DeleteLocation" + ], + "query": [ + { + "key": "Id", + "value": "0", + "description": "Optional; integer/int32", + "disabled": false + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): Contact\nOperation ID: not specified\n\nParameters: query Id (optional, integer/int32)\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "POST /api/Contact/EditContacts", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/Contact/EditContacts", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "Contact", + "EditContacts" + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): Contact\nOperation ID: not specified\n\nParameters: none\nRequest body: application/json, text/json, application/*+json; Illustrative placeholder generated from #/components/schemas/EditContact_DTO; replace placeholder values before sending.\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending.", + "body": { + "mode": "raw", + "raw": "{\n \"id\": 0,\n \"title\": \"\",\n \"owner\": \"\",\n \"firstName\": \"\",\n \"middleName\": \"\",\n \"lastName\": \"\",\n \"contactType\": \"\",\n \"phoneNumber\": \"\",\n \"email\": \"\",\n \"address1\": \"\",\n \"address2\": \"\",\n \"city\": \"\",\n \"state\": \"\",\n \"zip\": \"\",\n \"facebookUrl\": \"\",\n \"linkedInUrl\": \"\",\n \"twitterUrl\": \"\",\n \"locationId\": 0,\n \"accountId\": 0\n}", + "options": { + "raw": { + "language": "json" + } + }, + "description": "Illustrative placeholder generated from #/components/schemas/EditContact_DTO; replace placeholder values before sending." + } + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "POST /api/Contact/EditLocation", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/Contact/EditLocation", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "Contact", + "EditLocation" + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): Contact\nOperation ID: not specified\n\nParameters: none\nRequest body: application/json, text/json, application/*+json; Illustrative placeholder generated from #/components/schemas/EditLocation_DTO; replace placeholder values before sending.\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending.", + "body": { + "mode": "raw", + "raw": "{\n \"id\": 0,\n \"title\": \"\",\n \"name\": \"\",\n \"address\": \"\",\n \"city\": \"\",\n \"state\": \"\",\n \"zipCode\": \"\",\n \"phone\": \"\",\n \"contact\": \"\",\n \"contactEmail\": \"\",\n \"status\": \"\",\n \"accountId\": \"\"\n}", + "options": { + "raw": { + "language": "json" + } + }, + "description": "Illustrative placeholder generated from #/components/schemas/EditLocation_DTO; replace placeholder values before sending." + } + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "POST /api/contacts/AddContacts", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/contacts/AddContacts", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "contacts", + "AddContacts" + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): Contact\nOperation ID: not specified\n\nParameters: none\nRequest body: application/json, text/json, application/*+json; Illustrative placeholder generated from #/components/schemas/Contact_DTO; replace placeholder values before sending.\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending.", + "body": { + "mode": "raw", + "raw": "{\n \"title\": \"\",\n \"owner\": \"\",\n \"firstName\": \"\",\n \"middleName\": \"\",\n \"lastName\": \"\",\n \"contactType\": \"\",\n \"phoneNumber\": \"\",\n \"email\": \"\",\n \"address1\": \"\",\n \"address2\": \"\",\n \"city\": \"\",\n \"state\": \"\",\n \"zip\": \"\",\n \"facebookUrl\": \"\",\n \"linkedInUrl\": \"\",\n \"twitterUrl\": \"\",\n \"locationId\": 0,\n \"accountId\": 0\n}", + "options": { + "raw": { + "language": "json" + } + }, + "description": "Illustrative placeholder generated from #/components/schemas/Contact_DTO; replace placeholder values before sending." + } + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "POST /api/contacts/AddLocation", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/contacts/AddLocation", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "contacts", + "AddLocation" + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): Contact\nOperation ID: not specified\n\nParameters: none\nRequest body: application/json, text/json, application/*+json; Illustrative placeholder generated from #/components/schemas/Location_DTO; replace placeholder values before sending.\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending.", + "body": { + "mode": "raw", + "raw": "{\n \"title\": \"\",\n \"name\": \"\",\n \"address\": \"\",\n \"city\": \"\",\n \"state\": \"\",\n \"zipCode\": \"\",\n \"phone\": \"\",\n \"contact\": \"\",\n \"contactEmail\": \"\",\n \"status\": \"\",\n \"accountId\": \"\"\n}", + "options": { + "raw": { + "language": "json" + } + }, + "description": "Illustrative placeholder generated from #/components/schemas/Location_DTO; replace placeholder values before sending." + } + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "POST /api/contacts/DeleteLocation", + "request": { + "method": "POST", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/contacts/DeleteLocation?Id=0", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "contacts", + "DeleteLocation" + ], + "query": [ + { + "key": "Id", + "value": "0", + "description": "Optional; integer/int32", + "disabled": false + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): Contact\nOperation ID: not specified\n\nParameters: query Id (optional, integer/int32)\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "POST /api/contacts/EditContacts", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/contacts/EditContacts", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "contacts", + "EditContacts" + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): Contact\nOperation ID: not specified\n\nParameters: none\nRequest body: application/json, text/json, application/*+json; Illustrative placeholder generated from #/components/schemas/EditContact_DTO; replace placeholder values before sending.\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending.", + "body": { + "mode": "raw", + "raw": "{\n \"id\": 0,\n \"title\": \"\",\n \"owner\": \"\",\n \"firstName\": \"\",\n \"middleName\": \"\",\n \"lastName\": \"\",\n \"contactType\": \"\",\n \"phoneNumber\": \"\",\n \"email\": \"\",\n \"address1\": \"\",\n \"address2\": \"\",\n \"city\": \"\",\n \"state\": \"\",\n \"zip\": \"\",\n \"facebookUrl\": \"\",\n \"linkedInUrl\": \"\",\n \"twitterUrl\": \"\",\n \"locationId\": 0,\n \"accountId\": 0\n}", + "options": { + "raw": { + "language": "json" + } + }, + "description": "Illustrative placeholder generated from #/components/schemas/EditContact_DTO; replace placeholder values before sending." + } + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "POST /api/contacts/EditLocation", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/contacts/EditLocation", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "contacts", + "EditLocation" + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): Contact\nOperation ID: not specified\n\nParameters: none\nRequest body: application/json, text/json, application/*+json; Illustrative placeholder generated from #/components/schemas/EditLocation_DTO; replace placeholder values before sending.\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending.", + "body": { + "mode": "raw", + "raw": "{\n \"id\": 0,\n \"title\": \"\",\n \"name\": \"\",\n \"address\": \"\",\n \"city\": \"\",\n \"state\": \"\",\n \"zipCode\": \"\",\n \"phone\": \"\",\n \"contact\": \"\",\n \"contactEmail\": \"\",\n \"status\": \"\",\n \"accountId\": \"\"\n}", + "options": { + "raw": { + "language": "json" + } + }, + "description": "Illustrative placeholder generated from #/components/schemas/EditLocation_DTO; replace placeholder values before sending." + } + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + } + ] + }, + { + "name": "Dashboard", + "item": [ + { + "name": "GET /api/Dashboard/Stats", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/Dashboard/Stats", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "Dashboard", + "Stats" + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): Dashboard\nOperation ID: not specified\n\nParameters: none\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + } + ] + }, + { + "name": "Dispatch", + "item": [ + { + "name": "GET /api/Dispatch", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/Dispatch?search=&status=&vendorId=0&dateFrom=&dateTo=&sortBy=&sortDir=&page=0&pageSize=0", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "Dispatch" + ], + "query": [ + { + "key": "search", + "value": "", + "description": "Optional; string", + "disabled": false + }, + { + "key": "status", + "value": "", + "description": "Optional; string", + "disabled": false + }, + { + "key": "vendorId", + "value": "0", + "description": "Optional; integer/int32", + "disabled": false + }, + { + "key": "dateFrom", + "value": "", + "description": "Optional; string/date-time", + "disabled": false + }, + { + "key": "dateTo", + "value": "", + "description": "Optional; string/date-time", + "disabled": false + }, + { + "key": "sortBy", + "value": "", + "description": "Optional; string", + "disabled": false + }, + { + "key": "sortDir", + "value": "", + "description": "Optional; string", + "disabled": false + }, + { + "key": "page", + "value": "0", + "description": "Optional; integer/int32", + "disabled": false + }, + { + "key": "pageSize", + "value": "0", + "description": "Optional; integer/int32", + "disabled": false + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): Dispatch\nOperation ID: not specified\n\nParameters: query search (optional, string); query status (optional, string); query vendorId (optional, integer/int32); query dateFrom (optional, string/date-time); query dateTo (optional, string/date-time); query sortBy (optional, string); query sortDir (optional, string); query page (optional, integer/int32); query pageSize (optional, integer/int32)\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "GET /api/Dispatch/{id}", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/Dispatch/:id", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "Dispatch", + ":id" + ], + "variable": [ + { + "key": "id", + "value": "0", + "description": "Required; integer/int32" + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): Dispatch\nOperation ID: not specified\n\nParameters: path id (required, integer/int32)\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "GET /api/dispatches", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/dispatches?search=&status=&vendorId=0&dateFrom=&dateTo=&sortBy=&sortDir=&page=0&pageSize=0", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "dispatches" + ], + "query": [ + { + "key": "search", + "value": "", + "description": "Optional; string", + "disabled": false + }, + { + "key": "status", + "value": "", + "description": "Optional; string", + "disabled": false + }, + { + "key": "vendorId", + "value": "0", + "description": "Optional; integer/int32", + "disabled": false + }, + { + "key": "dateFrom", + "value": "", + "description": "Optional; string/date-time", + "disabled": false + }, + { + "key": "dateTo", + "value": "", + "description": "Optional; string/date-time", + "disabled": false + }, + { + "key": "sortBy", + "value": "", + "description": "Optional; string", + "disabled": false + }, + { + "key": "sortDir", + "value": "", + "description": "Optional; string", + "disabled": false + }, + { + "key": "page", + "value": "0", + "description": "Optional; integer/int32", + "disabled": false + }, + { + "key": "pageSize", + "value": "0", + "description": "Optional; integer/int32", + "disabled": false + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): Dispatch\nOperation ID: not specified\n\nParameters: query search (optional, string); query status (optional, string); query vendorId (optional, integer/int32); query dateFrom (optional, string/date-time); query dateTo (optional, string/date-time); query sortBy (optional, string); query sortDir (optional, string); query page (optional, integer/int32); query pageSize (optional, integer/int32)\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "GET /api/dispatches/{id}", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/dispatches/:id", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "dispatches", + ":id" + ], + "variable": [ + { + "key": "id", + "value": "0", + "description": "Required; integer/int32" + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): Dispatch\nOperation ID: not specified\n\nParameters: path id (required, integer/int32)\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + } + ] + }, + { + "name": "DispatchPublic", + "item": [ + { + "name": "GET /api/dispatch/accept/{token}", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/dispatch/accept/:token", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "dispatch", + "accept", + ":token" + ], + "variable": [ + { + "key": "token", + "value": "", + "description": "Required; string" + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): DispatchPublic\nOperation ID: not specified\n\nParameters: path token (required, string)\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + } + ] + }, + { + "name": "DropdownOptions", + "item": [ + { + "name": "DELETE /api/DropdownOptions/{id}", + "request": { + "method": "DELETE", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/DropdownOptions/:id", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "DropdownOptions", + ":id" + ], + "variable": [ + { + "key": "id", + "value": "0", + "description": "Required; integer/int32" + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): DropdownOptions\nOperation ID: not specified\n\nParameters: path id (required, integer/int32)\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "GET /api/DropdownOptions", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/DropdownOptions?category=", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "DropdownOptions" + ], + "query": [ + { + "key": "category", + "value": "", + "description": "Optional; string", + "disabled": false + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): DropdownOptions\nOperation ID: not specified\n\nParameters: query category (optional, string)\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "GET /api/DropdownOptions/ByCategory/{category}", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/DropdownOptions/ByCategory/:category?parent=", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "DropdownOptions", + "ByCategory", + ":category" + ], + "query": [ + { + "key": "parent", + "value": "", + "description": "Optional; string", + "disabled": false + } + ], + "variable": [ + { + "key": "category", + "value": "", + "description": "Required; string" + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): DropdownOptions\nOperation ID: not specified\n\nParameters: path category (required, string); query parent (optional, string)\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "POST /api/DropdownOptions", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/DropdownOptions", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "DropdownOptions" + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): DropdownOptions\nOperation ID: not specified\n\nParameters: none\nRequest body: application/json, text/json, application/*+json; Illustrative placeholder generated from #/components/schemas/DropdownOption_DTO; replace placeholder values before sending.\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending.", + "body": { + "mode": "raw", + "raw": "{\n \"id\": 0,\n \"category\": \"\",\n \"value\": \"\",\n \"parentValue\": \"\",\n \"sortOrder\": 0,\n \"isActive\": false\n}", + "options": { + "raw": { + "language": "json" + } + }, + "description": "Illustrative placeholder generated from #/components/schemas/DropdownOption_DTO; replace placeholder values before sending." + } + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "PUT /api/DropdownOptions/{id}", + "request": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/DropdownOptions/:id", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "DropdownOptions", + ":id" + ], + "variable": [ + { + "key": "id", + "value": "0", + "description": "Required; integer/int32" + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): DropdownOptions\nOperation ID: not specified\n\nParameters: path id (required, integer/int32)\nRequest body: application/json, text/json, application/*+json; Illustrative placeholder generated from #/components/schemas/DropdownOption_DTO; replace placeholder values before sending.\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending.", + "body": { + "mode": "raw", + "raw": "{\n \"id\": 0,\n \"category\": \"\",\n \"value\": \"\",\n \"parentValue\": \"\",\n \"sortOrder\": 0,\n \"isActive\": false\n}", + "options": { + "raw": { + "language": "json" + } + }, + "description": "Illustrative placeholder generated from #/components/schemas/DropdownOption_DTO; replace placeholder values before sending." + } + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + } + ] + }, + { + "name": "Employee", + "item": [ + { + "name": "GET /api/Employee/DeleteEmployees", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/Employee/DeleteEmployees?id=0", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "Employee", + "DeleteEmployees" + ], + "query": [ + { + "key": "id", + "value": "0", + "description": "Optional; integer/int32", + "disabled": false + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): Employee\nOperation ID: not specified\n\nParameters: query id (optional, integer/int32)\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "GET /api/Employee/Dropdown", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/Employee/Dropdown", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "Employee", + "Dropdown" + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): Employee\nOperation ID: not specified\n\nParameters: none\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "GET /api/Employee/GetById", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/Employee/GetById?id=0", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "Employee", + "GetById" + ], + "query": [ + { + "key": "id", + "value": "0", + "description": "Optional; integer/int32", + "disabled": false + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): Employee\nOperation ID: not specified\n\nParameters: query id (optional, integer/int32)\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "GET /api/Employee/GetEmployeeList", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/Employee/GetEmployeeList?search=&page=0&pageSize=0", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "Employee", + "GetEmployeeList" + ], + "query": [ + { + "key": "search", + "value": "", + "description": "Optional; string", + "disabled": false + }, + { + "key": "page", + "value": "0", + "description": "Optional; integer/int32", + "disabled": false + }, + { + "key": "pageSize", + "value": "0", + "description": "Optional; integer/int32", + "disabled": false + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): Employee\nOperation ID: not specified\n\nParameters: query search (optional, string); query page (optional, integer/int32); query pageSize (optional, integer/int32)\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "GET /api/employees/DeleteEmployees", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/employees/DeleteEmployees?id=0", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "employees", + "DeleteEmployees" + ], + "query": [ + { + "key": "id", + "value": "0", + "description": "Optional; integer/int32", + "disabled": false + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): Employee\nOperation ID: not specified\n\nParameters: query id (optional, integer/int32)\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "GET /api/employees/Dropdown", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/employees/Dropdown", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "employees", + "Dropdown" + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): Employee\nOperation ID: not specified\n\nParameters: none\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "GET /api/employees/GetById", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/employees/GetById?id=0", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "employees", + "GetById" + ], + "query": [ + { + "key": "id", + "value": "0", + "description": "Optional; integer/int32", + "disabled": false + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): Employee\nOperation ID: not specified\n\nParameters: query id (optional, integer/int32)\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "GET /api/employees/GetEmployeeList", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/employees/GetEmployeeList?search=&page=0&pageSize=0", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "employees", + "GetEmployeeList" + ], + "query": [ + { + "key": "search", + "value": "", + "description": "Optional; string", + "disabled": false + }, + { + "key": "page", + "value": "0", + "description": "Optional; integer/int32", + "disabled": false + }, + { + "key": "pageSize", + "value": "0", + "description": "Optional; integer/int32", + "disabled": false + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): Employee\nOperation ID: not specified\n\nParameters: query search (optional, string); query page (optional, integer/int32); query pageSize (optional, integer/int32)\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "POST /api/Employee/AddEmployees", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/Employee/AddEmployees", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "Employee", + "AddEmployees" + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): Employee\nOperation ID: not specified\n\nParameters: none\nRequest body: application/json, text/json, application/*+json; Illustrative placeholder generated from #/components/schemas/AddEmployee_DTO; replace placeholder values before sending.\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending.", + "body": { + "mode": "raw", + "raw": "{\n \"firstName\": \"\",\n \"lastName\": \"\",\n \"jobTitleId\": 0,\n \"permissionGroupId\": 0,\n \"email\": \"\",\n \"phone\": \"\",\n \"phoneExtension\": \"\",\n \"status\": \"\",\n \"lastLogin\": \"2026-01-01T00:00:00Z\"\n}", + "options": { + "raw": { + "language": "json" + } + }, + "description": "Illustrative placeholder generated from #/components/schemas/AddEmployee_DTO; replace placeholder values before sending." + } + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "POST /api/Employee/Create", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/Employee/Create", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "Employee", + "Create" + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): Employee\nOperation ID: not specified\n\nParameters: none\nRequest body: application/json, text/json, application/*+json; Illustrative placeholder generated from #/components/schemas/AddEmployee_DTO; replace placeholder values before sending.\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending.", + "body": { + "mode": "raw", + "raw": "{\n \"firstName\": \"\",\n \"lastName\": \"\",\n \"jobTitleId\": 0,\n \"permissionGroupId\": 0,\n \"email\": \"\",\n \"phone\": \"\",\n \"phoneExtension\": \"\",\n \"status\": \"\",\n \"lastLogin\": \"2026-01-01T00:00:00Z\"\n}", + "options": { + "raw": { + "language": "json" + } + }, + "description": "Illustrative placeholder generated from #/components/schemas/AddEmployee_DTO; replace placeholder values before sending." + } + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "POST /api/Employee/Delete", + "request": { + "method": "POST", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/Employee/Delete?id=0", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "Employee", + "Delete" + ], + "query": [ + { + "key": "id", + "value": "0", + "description": "Optional; integer/int32", + "disabled": false + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): Employee\nOperation ID: not specified\n\nParameters: query id (optional, integer/int32)\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "POST /api/Employee/EditEmployees", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/Employee/EditEmployees", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "Employee", + "EditEmployees" + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): Employee\nOperation ID: not specified\n\nParameters: none\nRequest body: application/json, text/json, application/*+json; Illustrative placeholder generated from #/components/schemas/EditEmployee_DTO; replace placeholder values before sending.\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending.", + "body": { + "mode": "raw", + "raw": "{\n \"firstName\": \"\",\n \"lastName\": \"\",\n \"jobTitleId\": 0,\n \"permissionGroupId\": 0,\n \"email\": \"\",\n \"phone\": \"\",\n \"phoneExtension\": \"\",\n \"status\": \"\",\n \"lastLogin\": \"2026-01-01T00:00:00Z\",\n \"id\": 0\n}", + "options": { + "raw": { + "language": "json" + } + }, + "description": "Illustrative placeholder generated from #/components/schemas/EditEmployee_DTO; replace placeholder values before sending." + } + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "POST /api/Employee/Update", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/Employee/Update", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "Employee", + "Update" + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): Employee\nOperation ID: not specified\n\nParameters: none\nRequest body: application/json, text/json, application/*+json; Illustrative placeholder generated from #/components/schemas/EditEmployee_DTO; replace placeholder values before sending.\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending.", + "body": { + "mode": "raw", + "raw": "{\n \"firstName\": \"\",\n \"lastName\": \"\",\n \"jobTitleId\": 0,\n \"permissionGroupId\": 0,\n \"email\": \"\",\n \"phone\": \"\",\n \"phoneExtension\": \"\",\n \"status\": \"\",\n \"lastLogin\": \"2026-01-01T00:00:00Z\",\n \"id\": 0\n}", + "options": { + "raw": { + "language": "json" + } + }, + "description": "Illustrative placeholder generated from #/components/schemas/EditEmployee_DTO; replace placeholder values before sending." + } + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "POST /api/employees/AddEmployees", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/employees/AddEmployees", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "employees", + "AddEmployees" + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): Employee\nOperation ID: not specified\n\nParameters: none\nRequest body: application/json, text/json, application/*+json; Illustrative placeholder generated from #/components/schemas/AddEmployee_DTO; replace placeholder values before sending.\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending.", + "body": { + "mode": "raw", + "raw": "{\n \"firstName\": \"\",\n \"lastName\": \"\",\n \"jobTitleId\": 0,\n \"permissionGroupId\": 0,\n \"email\": \"\",\n \"phone\": \"\",\n \"phoneExtension\": \"\",\n \"status\": \"\",\n \"lastLogin\": \"2026-01-01T00:00:00Z\"\n}", + "options": { + "raw": { + "language": "json" + } + }, + "description": "Illustrative placeholder generated from #/components/schemas/AddEmployee_DTO; replace placeholder values before sending." + } + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "POST /api/employees/Create", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/employees/Create", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "employees", + "Create" + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): Employee\nOperation ID: not specified\n\nParameters: none\nRequest body: application/json, text/json, application/*+json; Illustrative placeholder generated from #/components/schemas/AddEmployee_DTO; replace placeholder values before sending.\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending.", + "body": { + "mode": "raw", + "raw": "{\n \"firstName\": \"\",\n \"lastName\": \"\",\n \"jobTitleId\": 0,\n \"permissionGroupId\": 0,\n \"email\": \"\",\n \"phone\": \"\",\n \"phoneExtension\": \"\",\n \"status\": \"\",\n \"lastLogin\": \"2026-01-01T00:00:00Z\"\n}", + "options": { + "raw": { + "language": "json" + } + }, + "description": "Illustrative placeholder generated from #/components/schemas/AddEmployee_DTO; replace placeholder values before sending." + } + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "POST /api/employees/Delete", + "request": { + "method": "POST", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/employees/Delete?id=0", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "employees", + "Delete" + ], + "query": [ + { + "key": "id", + "value": "0", + "description": "Optional; integer/int32", + "disabled": false + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): Employee\nOperation ID: not specified\n\nParameters: query id (optional, integer/int32)\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "POST /api/employees/EditEmployees", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/employees/EditEmployees", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "employees", + "EditEmployees" + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): Employee\nOperation ID: not specified\n\nParameters: none\nRequest body: application/json, text/json, application/*+json; Illustrative placeholder generated from #/components/schemas/EditEmployee_DTO; replace placeholder values before sending.\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending.", + "body": { + "mode": "raw", + "raw": "{\n \"firstName\": \"\",\n \"lastName\": \"\",\n \"jobTitleId\": 0,\n \"permissionGroupId\": 0,\n \"email\": \"\",\n \"phone\": \"\",\n \"phoneExtension\": \"\",\n \"status\": \"\",\n \"lastLogin\": \"2026-01-01T00:00:00Z\",\n \"id\": 0\n}", + "options": { + "raw": { + "language": "json" + } + }, + "description": "Illustrative placeholder generated from #/components/schemas/EditEmployee_DTO; replace placeholder values before sending." + } + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "POST /api/employees/Update", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/employees/Update", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "employees", + "Update" + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): Employee\nOperation ID: not specified\n\nParameters: none\nRequest body: application/json, text/json, application/*+json; Illustrative placeholder generated from #/components/schemas/EditEmployee_DTO; replace placeholder values before sending.\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending.", + "body": { + "mode": "raw", + "raw": "{\n \"firstName\": \"\",\n \"lastName\": \"\",\n \"jobTitleId\": 0,\n \"permissionGroupId\": 0,\n \"email\": \"\",\n \"phone\": \"\",\n \"phoneExtension\": \"\",\n \"status\": \"\",\n \"lastLogin\": \"2026-01-01T00:00:00Z\",\n \"id\": 0\n}", + "options": { + "raw": { + "language": "json" + } + }, + "description": "Illustrative placeholder generated from #/components/schemas/EditEmployee_DTO; replace placeholder values before sending." + } + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + } + ] + }, + { + "name": "FollowUp", + "item": [ + { + "name": "GET /api/FollowUp/GetById", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/FollowUp/GetById?id=0", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "FollowUp", + "GetById" + ], + "query": [ + { + "key": "id", + "value": "0", + "description": "Optional; integer/int32", + "disabled": false + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): FollowUp\nOperation ID: not specified\n\nParameters: query id (optional, integer/int32)\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "GET /api/FollowUp/GetFollowUpList", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/FollowUp/GetFollowUpList?search=&status=&page=0&pageSize=0", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "FollowUp", + "GetFollowUpList" + ], + "query": [ + { + "key": "search", + "value": "", + "description": "Optional; string", + "disabled": false + }, + { + "key": "status", + "value": "", + "description": "Optional; string", + "disabled": false + }, + { + "key": "page", + "value": "0", + "description": "Optional; integer/int32", + "disabled": false + }, + { + "key": "pageSize", + "value": "0", + "description": "Optional; integer/int32", + "disabled": false + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): FollowUp\nOperation ID: not specified\n\nParameters: query search (optional, string); query status (optional, string); query page (optional, integer/int32); query pageSize (optional, integer/int32)\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "GET /api/followups/GetById", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/followups/GetById?id=0", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "followups", + "GetById" + ], + "query": [ + { + "key": "id", + "value": "0", + "description": "Optional; integer/int32", + "disabled": false + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): FollowUp\nOperation ID: not specified\n\nParameters: query id (optional, integer/int32)\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "GET /api/followups/GetFollowUpList", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/followups/GetFollowUpList?search=&status=&page=0&pageSize=0", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "followups", + "GetFollowUpList" + ], + "query": [ + { + "key": "search", + "value": "", + "description": "Optional; string", + "disabled": false + }, + { + "key": "status", + "value": "", + "description": "Optional; string", + "disabled": false + }, + { + "key": "page", + "value": "0", + "description": "Optional; integer/int32", + "disabled": false + }, + { + "key": "pageSize", + "value": "0", + "description": "Optional; integer/int32", + "disabled": false + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): FollowUp\nOperation ID: not specified\n\nParameters: query search (optional, string); query status (optional, string); query page (optional, integer/int32); query pageSize (optional, integer/int32)\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "POST /api/FollowUp/Cancel", + "request": { + "method": "POST", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/FollowUp/Cancel?id=0", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "FollowUp", + "Cancel" + ], + "query": [ + { + "key": "id", + "value": "0", + "description": "Optional; integer/int32", + "disabled": false + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): FollowUp\nOperation ID: not specified\n\nParameters: query id (optional, integer/int32)\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "POST /api/FollowUp/Complete", + "request": { + "method": "POST", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/FollowUp/Complete?id=0", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "FollowUp", + "Complete" + ], + "query": [ + { + "key": "id", + "value": "0", + "description": "Optional; integer/int32", + "disabled": false + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): FollowUp\nOperation ID: not specified\n\nParameters: query id (optional, integer/int32)\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "POST /api/FollowUp/Create", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/FollowUp/Create", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "FollowUp", + "Create" + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): FollowUp\nOperation ID: not specified\n\nParameters: none\nRequest body: application/json, text/json, application/*+json; Illustrative placeholder generated from #/components/schemas/FollowUp_DTO; replace placeholder values before sending.\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending.", + "body": { + "mode": "raw", + "raw": "{\n \"id\": 0,\n \"reason\": \"\",\n \"scheduleDate\": \"2026-01-01T00:00:00Z\",\n \"scheduleStartTime\": {\n \"ticks\": 0,\n \"days\": 0,\n \"hours\": 0,\n \"milliseconds\": 0,\n \"microseconds\": 0,\n \"nanoseconds\": 0,\n \"minutes\": 0,\n \"seconds\": 0,\n \"totalDays\": 0,\n \"totalHours\": 0,\n \"totalMilliseconds\": 0,\n \"totalMicroseconds\": 0,\n \"totalNanoseconds\": 0,\n \"totalMinutes\": 0,\n \"totalSeconds\": 0\n },\n \"employeeId\": 0,\n \"workOrderId\": 0,\n \"accountId\": 0,\n \"locationId\": 0\n}", + "options": { + "raw": { + "language": "json" + } + }, + "description": "Illustrative placeholder generated from #/components/schemas/FollowUp_DTO; replace placeholder values before sending." + } + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "POST /api/FollowUp/Delete", + "request": { + "method": "POST", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/FollowUp/Delete?id=0", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "FollowUp", + "Delete" + ], + "query": [ + { + "key": "id", + "value": "0", + "description": "Optional; integer/int32", + "disabled": false + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): FollowUp\nOperation ID: not specified\n\nParameters: query id (optional, integer/int32)\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "POST /api/FollowUp/Update", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/FollowUp/Update", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "FollowUp", + "Update" + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): FollowUp\nOperation ID: not specified\n\nParameters: none\nRequest body: application/json, text/json, application/*+json; Illustrative placeholder generated from #/components/schemas/FollowUp_DTO; replace placeholder values before sending.\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending.", + "body": { + "mode": "raw", + "raw": "{\n \"id\": 0,\n \"reason\": \"\",\n \"scheduleDate\": \"2026-01-01T00:00:00Z\",\n \"scheduleStartTime\": {\n \"ticks\": 0,\n \"days\": 0,\n \"hours\": 0,\n \"milliseconds\": 0,\n \"microseconds\": 0,\n \"nanoseconds\": 0,\n \"minutes\": 0,\n \"seconds\": 0,\n \"totalDays\": 0,\n \"totalHours\": 0,\n \"totalMilliseconds\": 0,\n \"totalMicroseconds\": 0,\n \"totalNanoseconds\": 0,\n \"totalMinutes\": 0,\n \"totalSeconds\": 0\n },\n \"employeeId\": 0,\n \"workOrderId\": 0,\n \"accountId\": 0,\n \"locationId\": 0\n}", + "options": { + "raw": { + "language": "json" + } + }, + "description": "Illustrative placeholder generated from #/components/schemas/FollowUp_DTO; replace placeholder values before sending." + } + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "POST /api/followups/Cancel", + "request": { + "method": "POST", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/followups/Cancel?id=0", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "followups", + "Cancel" + ], + "query": [ + { + "key": "id", + "value": "0", + "description": "Optional; integer/int32", + "disabled": false + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): FollowUp\nOperation ID: not specified\n\nParameters: query id (optional, integer/int32)\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "POST /api/followups/Complete", + "request": { + "method": "POST", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/followups/Complete?id=0", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "followups", + "Complete" + ], + "query": [ + { + "key": "id", + "value": "0", + "description": "Optional; integer/int32", + "disabled": false + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): FollowUp\nOperation ID: not specified\n\nParameters: query id (optional, integer/int32)\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "POST /api/followups/Create", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/followups/Create", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "followups", + "Create" + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): FollowUp\nOperation ID: not specified\n\nParameters: none\nRequest body: application/json, text/json, application/*+json; Illustrative placeholder generated from #/components/schemas/FollowUp_DTO; replace placeholder values before sending.\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending.", + "body": { + "mode": "raw", + "raw": "{\n \"id\": 0,\n \"reason\": \"\",\n \"scheduleDate\": \"2026-01-01T00:00:00Z\",\n \"scheduleStartTime\": {\n \"ticks\": 0,\n \"days\": 0,\n \"hours\": 0,\n \"milliseconds\": 0,\n \"microseconds\": 0,\n \"nanoseconds\": 0,\n \"minutes\": 0,\n \"seconds\": 0,\n \"totalDays\": 0,\n \"totalHours\": 0,\n \"totalMilliseconds\": 0,\n \"totalMicroseconds\": 0,\n \"totalNanoseconds\": 0,\n \"totalMinutes\": 0,\n \"totalSeconds\": 0\n },\n \"employeeId\": 0,\n \"workOrderId\": 0,\n \"accountId\": 0,\n \"locationId\": 0\n}", + "options": { + "raw": { + "language": "json" + } + }, + "description": "Illustrative placeholder generated from #/components/schemas/FollowUp_DTO; replace placeholder values before sending." + } + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "POST /api/followups/Delete", + "request": { + "method": "POST", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/followups/Delete?id=0", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "followups", + "Delete" + ], + "query": [ + { + "key": "id", + "value": "0", + "description": "Optional; integer/int32", + "disabled": false + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): FollowUp\nOperation ID: not specified\n\nParameters: query id (optional, integer/int32)\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "POST /api/followups/Update", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/followups/Update", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "followups", + "Update" + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): FollowUp\nOperation ID: not specified\n\nParameters: none\nRequest body: application/json, text/json, application/*+json; Illustrative placeholder generated from #/components/schemas/FollowUp_DTO; replace placeholder values before sending.\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending.", + "body": { + "mode": "raw", + "raw": "{\n \"id\": 0,\n \"reason\": \"\",\n \"scheduleDate\": \"2026-01-01T00:00:00Z\",\n \"scheduleStartTime\": {\n \"ticks\": 0,\n \"days\": 0,\n \"hours\": 0,\n \"milliseconds\": 0,\n \"microseconds\": 0,\n \"nanoseconds\": 0,\n \"minutes\": 0,\n \"seconds\": 0,\n \"totalDays\": 0,\n \"totalHours\": 0,\n \"totalMilliseconds\": 0,\n \"totalMicroseconds\": 0,\n \"totalNanoseconds\": 0,\n \"totalMinutes\": 0,\n \"totalSeconds\": 0\n },\n \"employeeId\": 0,\n \"workOrderId\": 0,\n \"accountId\": 0,\n \"locationId\": 0\n}", + "options": { + "raw": { + "language": "json" + } + }, + "description": "Illustrative placeholder generated from #/components/schemas/FollowUp_DTO; replace placeholder values before sending." + } + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + } + ] + }, + { + "name": "Location", + "item": [ + { + "name": "DELETE /api/Location/{id}", + "request": { + "method": "DELETE", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/Location/:id", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "Location", + ":id" + ], + "variable": [ + { + "key": "id", + "value": "0", + "description": "Required; integer/int32" + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): Location\nOperation ID: not specified\n\nParameters: path id (required, integer/int32)\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "DELETE /api/locations/{id}", + "request": { + "method": "DELETE", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/locations/:id", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "locations", + ":id" + ], + "variable": [ + { + "key": "id", + "value": "0", + "description": "Required; integer/int32" + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): Location\nOperation ID: not specified\n\nParameters: path id (required, integer/int32)\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "GET /api/Location/{id}", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/Location/:id", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "Location", + ":id" + ], + "variable": [ + { + "key": "id", + "value": "0", + "description": "Required; integer/int32" + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): Location\nOperation ID: not specified\n\nParameters: path id (required, integer/int32)\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "GET /api/Location/DeleteLocation", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/Location/DeleteLocation?id=0", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "Location", + "DeleteLocation" + ], + "query": [ + { + "key": "id", + "value": "0", + "description": "Optional; integer/int32", + "disabled": false + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): Location\nOperation ID: not specified\n\nParameters: query id (optional, integer/int32)\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "GET /api/Location/GetLocationList", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/Location/GetLocationList?search=&page=0&pageSize=0", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "Location", + "GetLocationList" + ], + "query": [ + { + "key": "search", + "value": "", + "description": "Optional; string", + "disabled": false + }, + { + "key": "page", + "value": "0", + "description": "Optional; integer/int32", + "disabled": false + }, + { + "key": "pageSize", + "value": "0", + "description": "Optional; integer/int32", + "disabled": false + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): Location\nOperation ID: not specified\n\nParameters: query search (optional, string); query page (optional, integer/int32); query pageSize (optional, integer/int32)\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "GET /api/Location/sites", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/Location/sites?search=", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "Location", + "sites" + ], + "query": [ + { + "key": "search", + "value": "", + "description": "Optional; string", + "disabled": false + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): Location\nOperation ID: not specified\n\nParameters: query search (optional, string)\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "GET /api/locations/{id}", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/locations/:id", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "locations", + ":id" + ], + "variable": [ + { + "key": "id", + "value": "0", + "description": "Required; integer/int32" + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): Location\nOperation ID: not specified\n\nParameters: path id (required, integer/int32)\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "GET /api/locations/DeleteLocation", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/locations/DeleteLocation?id=0", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "locations", + "DeleteLocation" + ], + "query": [ + { + "key": "id", + "value": "0", + "description": "Optional; integer/int32", + "disabled": false + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): Location\nOperation ID: not specified\n\nParameters: query id (optional, integer/int32)\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "GET /api/locations/GetLocationList", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/locations/GetLocationList?search=&page=0&pageSize=0", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "locations", + "GetLocationList" + ], + "query": [ + { + "key": "search", + "value": "", + "description": "Optional; string", + "disabled": false + }, + { + "key": "page", + "value": "0", + "description": "Optional; integer/int32", + "disabled": false + }, + { + "key": "pageSize", + "value": "0", + "description": "Optional; integer/int32", + "disabled": false + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): Location\nOperation ID: not specified\n\nParameters: query search (optional, string); query page (optional, integer/int32); query pageSize (optional, integer/int32)\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "GET /api/locations/sites", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/locations/sites?search=", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "locations", + "sites" + ], + "query": [ + { + "key": "search", + "value": "", + "description": "Optional; string", + "disabled": false + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): Location\nOperation ID: not specified\n\nParameters: query search (optional, string)\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "POST /api/Location", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/Location", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "Location" + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): Location\nOperation ID: not specified\n\nParameters: none\nRequest body: application/json, text/json, application/*+json; Illustrative placeholder generated from #/components/schemas/Location_DTO; replace placeholder values before sending.\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending.", + "body": { + "mode": "raw", + "raw": "{\n \"title\": \"\",\n \"name\": \"\",\n \"address\": \"\",\n \"city\": \"\",\n \"state\": \"\",\n \"zipCode\": \"\",\n \"phone\": \"\",\n \"contact\": \"\",\n \"contactEmail\": \"\",\n \"status\": \"\",\n \"accountId\": \"\"\n}", + "options": { + "raw": { + "language": "json" + } + }, + "description": "Illustrative placeholder generated from #/components/schemas/Location_DTO; replace placeholder values before sending." + } + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "POST /api/locations", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/locations", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "locations" + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): Location\nOperation ID: not specified\n\nParameters: none\nRequest body: application/json, text/json, application/*+json; Illustrative placeholder generated from #/components/schemas/Location_DTO; replace placeholder values before sending.\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending.", + "body": { + "mode": "raw", + "raw": "{\n \"title\": \"\",\n \"name\": \"\",\n \"address\": \"\",\n \"city\": \"\",\n \"state\": \"\",\n \"zipCode\": \"\",\n \"phone\": \"\",\n \"contact\": \"\",\n \"contactEmail\": \"\",\n \"status\": \"\",\n \"accountId\": \"\"\n}", + "options": { + "raw": { + "language": "json" + } + }, + "description": "Illustrative placeholder generated from #/components/schemas/Location_DTO; replace placeholder values before sending." + } + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "PUT /api/Location/{id}", + "request": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/Location/:id", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "Location", + ":id" + ], + "variable": [ + { + "key": "id", + "value": "0", + "description": "Required; integer/int32" + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): Location\nOperation ID: not specified\n\nParameters: path id (required, integer/int32)\nRequest body: application/json, text/json, application/*+json; Illustrative placeholder generated from #/components/schemas/EditLocation_DTO; replace placeholder values before sending.\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending.", + "body": { + "mode": "raw", + "raw": "{\n \"id\": 0,\n \"title\": \"\",\n \"name\": \"\",\n \"address\": \"\",\n \"city\": \"\",\n \"state\": \"\",\n \"zipCode\": \"\",\n \"phone\": \"\",\n \"contact\": \"\",\n \"contactEmail\": \"\",\n \"status\": \"\",\n \"accountId\": \"\"\n}", + "options": { + "raw": { + "language": "json" + } + }, + "description": "Illustrative placeholder generated from #/components/schemas/EditLocation_DTO; replace placeholder values before sending." + } + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "PUT /api/locations/{id}", + "request": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/locations/:id", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "locations", + ":id" + ], + "variable": [ + { + "key": "id", + "value": "0", + "description": "Required; integer/int32" + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): Location\nOperation ID: not specified\n\nParameters: path id (required, integer/int32)\nRequest body: application/json, text/json, application/*+json; Illustrative placeholder generated from #/components/schemas/EditLocation_DTO; replace placeholder values before sending.\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending.", + "body": { + "mode": "raw", + "raw": "{\n \"id\": 0,\n \"title\": \"\",\n \"name\": \"\",\n \"address\": \"\",\n \"city\": \"\",\n \"state\": \"\",\n \"zipCode\": \"\",\n \"phone\": \"\",\n \"contact\": \"\",\n \"contactEmail\": \"\",\n \"status\": \"\",\n \"accountId\": \"\"\n}", + "options": { + "raw": { + "language": "json" + } + }, + "description": "Illustrative placeholder generated from #/components/schemas/EditLocation_DTO; replace placeholder values before sending." + } + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + } + ] + }, + { + "name": "PMSchedule", + "item": [ + { + "name": "GET /api/PMSchedule/GetById", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/PMSchedule/GetById?id=0", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "PMSchedule", + "GetById" + ], + "query": [ + { + "key": "id", + "value": "0", + "description": "Optional; integer/int32", + "disabled": false + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): PMSchedule\nOperation ID: not specified\n\nParameters: query id (optional, integer/int32)\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "GET /api/PMSchedule/GetList", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/PMSchedule/GetList", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "PMSchedule", + "GetList" + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): PMSchedule\nOperation ID: not specified\n\nParameters: none\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "GET /api/pmschedules/GetById", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/pmschedules/GetById?id=0", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "pmschedules", + "GetById" + ], + "query": [ + { + "key": "id", + "value": "0", + "description": "Optional; integer/int32", + "disabled": false + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): PMSchedule\nOperation ID: not specified\n\nParameters: query id (optional, integer/int32)\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "GET /api/pmschedules/GetList", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/pmschedules/GetList", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "pmschedules", + "GetList" + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): PMSchedule\nOperation ID: not specified\n\nParameters: none\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "POST /api/PMSchedule/Delete", + "request": { + "method": "POST", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/PMSchedule/Delete?id=0", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "PMSchedule", + "Delete" + ], + "query": [ + { + "key": "id", + "value": "0", + "description": "Optional; integer/int32", + "disabled": false + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): PMSchedule\nOperation ID: not specified\n\nParameters: query id (optional, integer/int32)\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "POST /api/PMSchedule/Save", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/PMSchedule/Save", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "PMSchedule", + "Save" + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): PMSchedule\nOperation ID: not specified\n\nParameters: none\nRequest body: application/json, text/json, application/*+json; Illustrative placeholder generated from #/components/schemas/PMSchedule_DTO; replace placeholder values before sending.\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending.", + "body": { + "mode": "raw", + "raw": "{\n \"id\": 0,\n \"name\": \"\",\n \"frequency\": \"\",\n \"startDate\": \"2026-01-01T00:00:00Z\",\n \"isActive\": false,\n \"assetId\": 0,\n \"locationId\": 0\n}", + "options": { + "raw": { + "language": "json" + } + }, + "description": "Illustrative placeholder generated from #/components/schemas/PMSchedule_DTO; replace placeholder values before sending." + } + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "POST /api/pmschedules/Delete", + "request": { + "method": "POST", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/pmschedules/Delete?id=0", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "pmschedules", + "Delete" + ], + "query": [ + { + "key": "id", + "value": "0", + "description": "Optional; integer/int32", + "disabled": false + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): PMSchedule\nOperation ID: not specified\n\nParameters: query id (optional, integer/int32)\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "POST /api/pmschedules/Save", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/pmschedules/Save", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "pmschedules", + "Save" + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): PMSchedule\nOperation ID: not specified\n\nParameters: none\nRequest body: application/json, text/json, application/*+json; Illustrative placeholder generated from #/components/schemas/PMSchedule_DTO; replace placeholder values before sending.\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending.", + "body": { + "mode": "raw", + "raw": "{\n \"id\": 0,\n \"name\": \"\",\n \"frequency\": \"\",\n \"startDate\": \"2026-01-01T00:00:00Z\",\n \"isActive\": false,\n \"assetId\": 0,\n \"locationId\": 0\n}", + "options": { + "raw": { + "language": "json" + } + }, + "description": "Illustrative placeholder generated from #/components/schemas/PMSchedule_DTO; replace placeholder values before sending." + } + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + } + ] + }, + { + "name": "Quotes", + "item": [ + { + "name": "DELETE /api/Quotes/DeleteQuote", + "request": { + "method": "DELETE", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/Quotes/DeleteQuote", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "Quotes", + "DeleteQuote" + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): Quotes\nOperation ID: not specified\n\nParameters: none\nRequest body: application/json, text/json, application/*+json; Illustrative placeholder generated from #/components/schemas/EditQuote_DTO; replace placeholder values before sending.\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending.", + "body": { + "mode": "raw", + "raw": "{\n \"id\": 0,\n \"quotId\": \"\",\n \"date\": \"\",\n \"tt\": \"\",\n \"po\": \"\",\n \"contactId\": 0,\n \"workorderId\": 0,\n \"projectName\": \"\",\n \"siteName\": \"\",\n \"siteId\": \"\",\n \"billingAddress\": \"\",\n \"lineItems\": [\n {\n \"lineitemNumber\": 0,\n \"lineitem\": 0,\n \"descriptions\": \"\"\n }\n ]\n}", + "options": { + "raw": { + "language": "json" + } + }, + "description": "Illustrative placeholder generated from #/components/schemas/EditQuote_DTO; replace placeholder values before sending." + } + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "GET /api/Quotes/GetQuoutes", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/Quotes/GetQuoutes?search=&page=0&pageSize=0", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "Quotes", + "GetQuoutes" + ], + "query": [ + { + "key": "search", + "value": "", + "description": "Optional; string", + "disabled": false + }, + { + "key": "page", + "value": "0", + "description": "Optional; integer/int32", + "disabled": false + }, + { + "key": "pageSize", + "value": "0", + "description": "Optional; integer/int32", + "disabled": false + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): Quotes\nOperation ID: not specified\n\nParameters: query search (optional, string); query page (optional, integer/int32); query pageSize (optional, integer/int32)\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "GET /api/Quotes/GetQuoutesById", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/Quotes/GetQuoutesById?id=0", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "Quotes", + "GetQuoutesById" + ], + "query": [ + { + "key": "id", + "value": "0", + "description": "Optional; integer/int32", + "disabled": false + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): Quotes\nOperation ID: not specified\n\nParameters: query id (optional, integer/int32)\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "GET /api/Quotes/GetQuoutesdetailsAgainstWorkOrder", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/Quotes/GetQuoutesdetailsAgainstWorkOrder?woId=0", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "Quotes", + "GetQuoutesdetailsAgainstWorkOrder" + ], + "query": [ + { + "key": "woId", + "value": "0", + "description": "Optional; integer/int32", + "disabled": false + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): Quotes\nOperation ID: not specified\n\nParameters: query woId (optional, integer/int32)\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "GET /api/Quotes/GetReporting", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/Quotes/GetReporting", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "Quotes", + "GetReporting" + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): Quotes\nOperation ID: not specified\n\nParameters: none\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "POST /api/Quotes/AddQuote", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/Quotes/AddQuote", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "Quotes", + "AddQuote" + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): Quotes\nOperation ID: not specified\n\nParameters: none\nRequest body: application/json, text/json, application/*+json; Illustrative placeholder generated from #/components/schemas/Quote_DTO; replace placeholder values before sending.\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending.", + "body": { + "mode": "raw", + "raw": "{\n \"quotId\": \"\",\n \"date\": \"\",\n \"tt\": \"\",\n \"po\": \"\",\n \"contactId\": 0,\n \"workorderId\": 0,\n \"projectName\": \"\",\n \"siteName\": \"\",\n \"siteId\": \"\",\n \"billingAddress\": \"\",\n \"lineItems\": [\n {\n \"lineitemNumber\": 0,\n \"lineitem\": 0,\n \"descriptions\": \"\"\n }\n ]\n}", + "options": { + "raw": { + "language": "json" + } + }, + "description": "Illustrative placeholder generated from #/components/schemas/Quote_DTO; replace placeholder values before sending." + } + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "PUT /api/Quotes/EditQuote", + "request": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/Quotes/EditQuote", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "Quotes", + "EditQuote" + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): Quotes\nOperation ID: not specified\n\nParameters: none\nRequest body: application/json, text/json, application/*+json; Illustrative placeholder generated from #/components/schemas/EditQuote_DTO; replace placeholder values before sending.\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending.", + "body": { + "mode": "raw", + "raw": "{\n \"id\": 0,\n \"quotId\": \"\",\n \"date\": \"\",\n \"tt\": \"\",\n \"po\": \"\",\n \"contactId\": 0,\n \"workorderId\": 0,\n \"projectName\": \"\",\n \"siteName\": \"\",\n \"siteId\": \"\",\n \"billingAddress\": \"\",\n \"lineItems\": [\n {\n \"lineitemNumber\": 0,\n \"lineitem\": 0,\n \"descriptions\": \"\"\n }\n ]\n}", + "options": { + "raw": { + "language": "json" + } + }, + "description": "Illustrative placeholder generated from #/components/schemas/EditQuote_DTO; replace placeholder values before sending." + } + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + } + ] + }, + { + "name": "Settings", + "item": [ + { + "name": "GET /Settings/DeleteCategory", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/Settings/DeleteCategory?id=0", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "Settings", + "DeleteCategory" + ], + "query": [ + { + "key": "id", + "value": "0", + "description": "Optional; integer/int32", + "disabled": false + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): Settings\nOperation ID: not specified\n\nParameters: query id (optional, integer/int32)\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "GET /Settings/GetCategoryList", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/Settings/GetCategoryList?page=0&pageSize=0", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "Settings", + "GetCategoryList" + ], + "query": [ + { + "key": "page", + "value": "0", + "description": "Optional; integer/int32", + "disabled": false + }, + { + "key": "pageSize", + "value": "0", + "description": "Optional; integer/int32", + "disabled": false + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): Settings\nOperation ID: not specified\n\nParameters: query page (optional, integer/int32); query pageSize (optional, integer/int32)\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "GET /Settings/GetRoles", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/Settings/GetRoles", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "Settings", + "GetRoles" + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): Settings\nOperation ID: not specified\n\nParameters: none\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "GET /Settings/GetTemplates", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/Settings/GetTemplates?page=0&pageSize=0", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "Settings", + "GetTemplates" + ], + "query": [ + { + "key": "page", + "value": "0", + "description": "Optional; integer/int32", + "disabled": false + }, + { + "key": "pageSize", + "value": "0", + "description": "Optional; integer/int32", + "disabled": false + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): Settings\nOperation ID: not specified\n\nParameters: query page (optional, integer/int32); query pageSize (optional, integer/int32)\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "GET /Settings/GetUsers", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/Settings/GetUsers?search=&page=0&pageSize=0", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "Settings", + "GetUsers" + ], + "query": [ + { + "key": "search", + "value": "", + "description": "Optional; string", + "disabled": false + }, + { + "key": "page", + "value": "0", + "description": "Optional; integer/int32", + "disabled": false + }, + { + "key": "pageSize", + "value": "0", + "description": "Optional; integer/int32", + "disabled": false + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): Settings\nOperation ID: not specified\n\nParameters: query search (optional, string); query page (optional, integer/int32); query pageSize (optional, integer/int32)\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "POST /Settings/AddCategory", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/Settings/AddCategory", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "Settings", + "AddCategory" + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): Settings\nOperation ID: not specified\n\nParameters: none\nRequest body: application/json, text/json, application/*+json; Illustrative placeholder generated from #/components/schemas/Category_DTO; replace placeholder values before sending.\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending.", + "body": { + "mode": "raw", + "raw": "{\n \"name\": \"\"\n}", + "options": { + "raw": { + "language": "json" + } + }, + "description": "Illustrative placeholder generated from #/components/schemas/Category_DTO; replace placeholder values before sending." + } + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "POST /Settings/EditCategory", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/Settings/EditCategory", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "Settings", + "EditCategory" + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): Settings\nOperation ID: not specified\n\nParameters: none\nRequest body: application/json, text/json, application/*+json; Illustrative placeholder generated from #/components/schemas/EditCategory_DTO; replace placeholder values before sending.\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending.", + "body": { + "mode": "raw", + "raw": "{\n \"id\": 0,\n \"name\": \"\"\n}", + "options": { + "raw": { + "language": "json" + } + }, + "description": "Illustrative placeholder generated from #/components/schemas/EditCategory_DTO; replace placeholder values before sending." + } + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + } + ] + }, + { + "name": "Sync", + "item": [ + { + "name": "POST /api/Sync/All", + "request": { + "method": "POST", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/Sync/All", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "Sync", + "All" + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): Sync\nOperation ID: not specified\n\nParameters: none\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "POST /api/Sync/BackfillCommentTypes", + "request": { + "method": "POST", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/Sync/BackfillCommentTypes", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "Sync", + "BackfillCommentTypes" + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): Sync\nOperation ID: not specified\n\nParameters: none\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "POST /api/Sync/BackfillDispatchNumbers", + "request": { + "method": "POST", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/Sync/BackfillDispatchNumbers", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "Sync", + "BackfillDispatchNumbers" + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): Sync\nOperation ID: not specified\n\nParameters: none\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "POST /api/Sync/BackfillInternalWONumbers", + "request": { + "method": "POST", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/Sync/BackfillInternalWONumbers", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "Sync", + "BackfillInternalWONumbers" + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): Sync\nOperation ID: not specified\n\nParameters: none\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "POST /api/Sync/Comments", + "request": { + "method": "POST", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/Sync/Comments", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "Sync", + "Comments" + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): Sync\nOperation ID: not specified\n\nParameters: none\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "POST /api/Sync/VendorReplies", + "request": { + "method": "POST", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/Sync/VendorReplies", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "Sync", + "VendorReplies" + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): Sync\nOperation ID: not specified\n\nParameters: none\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "POST /api/Sync/WorkOrders", + "request": { + "method": "POST", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/Sync/WorkOrders", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "Sync", + "WorkOrders" + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): Sync\nOperation ID: not specified\n\nParameters: none\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + } + ] + }, + { + "name": "TaskListTemplate", + "item": [ + { + "name": "DELETE /api/TaskListTemplate/{id}", + "request": { + "method": "DELETE", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/TaskListTemplate/:id", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "TaskListTemplate", + ":id" + ], + "variable": [ + { + "key": "id", + "value": "0", + "description": "Required; integer/int32" + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): TaskListTemplate\nOperation ID: not specified\n\nParameters: path id (required, integer/int32)\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "DELETE /api/tasklisttemplates/{id}", + "request": { + "method": "DELETE", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/tasklisttemplates/:id", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "tasklisttemplates", + ":id" + ], + "variable": [ + { + "key": "id", + "value": "0", + "description": "Required; integer/int32" + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): TaskListTemplate\nOperation ID: not specified\n\nParameters: path id (required, integer/int32)\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "GET /api/TaskListTemplate", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/TaskListTemplate", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "TaskListTemplate" + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): TaskListTemplate\nOperation ID: not specified\n\nParameters: none\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "GET /api/TaskListTemplate/{id}", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/TaskListTemplate/:id", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "TaskListTemplate", + ":id" + ], + "variable": [ + { + "key": "id", + "value": "0", + "description": "Required; integer/int32" + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): TaskListTemplate\nOperation ID: not specified\n\nParameters: path id (required, integer/int32)\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "GET /api/tasklisttemplates", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/tasklisttemplates", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "tasklisttemplates" + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): TaskListTemplate\nOperation ID: not specified\n\nParameters: none\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "GET /api/tasklisttemplates/{id}", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/tasklisttemplates/:id", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "tasklisttemplates", + ":id" + ], + "variable": [ + { + "key": "id", + "value": "0", + "description": "Required; integer/int32" + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): TaskListTemplate\nOperation ID: not specified\n\nParameters: path id (required, integer/int32)\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "POST /api/TaskListTemplate", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/TaskListTemplate", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "TaskListTemplate" + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): TaskListTemplate\nOperation ID: not specified\n\nParameters: none\nRequest body: application/json, text/json, application/*+json; Illustrative placeholder generated from #/components/schemas/TaskListTemplate_DTO; replace placeholder values before sending.\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending.", + "body": { + "mode": "raw", + "raw": "{\n \"name\": \"\",\n \"description\": \"\",\n \"isActive\": false,\n \"items\": [\n {\n \"itemText\": \"\",\n \"sortOrder\": 0\n }\n ]\n}", + "options": { + "raw": { + "language": "json" + } + }, + "description": "Illustrative placeholder generated from #/components/schemas/TaskListTemplate_DTO; replace placeholder values before sending." + } + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "POST /api/tasklisttemplates", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/tasklisttemplates", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "tasklisttemplates" + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): TaskListTemplate\nOperation ID: not specified\n\nParameters: none\nRequest body: application/json, text/json, application/*+json; Illustrative placeholder generated from #/components/schemas/TaskListTemplate_DTO; replace placeholder values before sending.\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending.", + "body": { + "mode": "raw", + "raw": "{\n \"name\": \"\",\n \"description\": \"\",\n \"isActive\": false,\n \"items\": [\n {\n \"itemText\": \"\",\n \"sortOrder\": 0\n }\n ]\n}", + "options": { + "raw": { + "language": "json" + } + }, + "description": "Illustrative placeholder generated from #/components/schemas/TaskListTemplate_DTO; replace placeholder values before sending." + } + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "PUT /api/TaskListTemplate/{id}", + "request": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/TaskListTemplate/:id", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "TaskListTemplate", + ":id" + ], + "variable": [ + { + "key": "id", + "value": "0", + "description": "Required; integer/int32" + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): TaskListTemplate\nOperation ID: not specified\n\nParameters: path id (required, integer/int32)\nRequest body: application/json, text/json, application/*+json; Illustrative placeholder generated from #/components/schemas/TaskListTemplate_DTO; replace placeholder values before sending.\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending.", + "body": { + "mode": "raw", + "raw": "{\n \"name\": \"\",\n \"description\": \"\",\n \"isActive\": false,\n \"items\": [\n {\n \"itemText\": \"\",\n \"sortOrder\": 0\n }\n ]\n}", + "options": { + "raw": { + "language": "json" + } + }, + "description": "Illustrative placeholder generated from #/components/schemas/TaskListTemplate_DTO; replace placeholder values before sending." + } + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "PUT /api/tasklisttemplates/{id}", + "request": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/tasklisttemplates/:id", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "tasklisttemplates", + ":id" + ], + "variable": [ + { + "key": "id", + "value": "0", + "description": "Required; integer/int32" + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): TaskListTemplate\nOperation ID: not specified\n\nParameters: path id (required, integer/int32)\nRequest body: application/json, text/json, application/*+json; Illustrative placeholder generated from #/components/schemas/TaskListTemplate_DTO; replace placeholder values before sending.\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending.", + "body": { + "mode": "raw", + "raw": "{\n \"name\": \"\",\n \"description\": \"\",\n \"isActive\": false,\n \"items\": [\n {\n \"itemText\": \"\",\n \"sortOrder\": 0\n }\n ]\n}", + "options": { + "raw": { + "language": "json" + } + }, + "description": "Illustrative placeholder generated from #/components/schemas/TaskListTemplate_DTO; replace placeholder values before sending." + } + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + } + ] + }, + { + "name": "Uplift", + "item": [ + { + "name": "GET /api/Uplift", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/Uplift?status=&tier=0&page=0&pageSize=0", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "Uplift" + ], + "query": [ + { + "key": "status", + "value": "", + "description": "Optional; string", + "disabled": false + }, + { + "key": "tier", + "value": "0", + "description": "Optional; integer/int32", + "disabled": false + }, + { + "key": "page", + "value": "0", + "description": "Optional; integer/int32", + "disabled": false + }, + { + "key": "pageSize", + "value": "0", + "description": "Optional; integer/int32", + "disabled": false + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): Uplift\nOperation ID: not specified\n\nParameters: query status (optional, string); query tier (optional, integer/int32); query page (optional, integer/int32); query pageSize (optional, integer/int32)\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "GET /api/Uplift/{id}/evidence", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/Uplift/:id/evidence", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "Uplift", + ":id", + "evidence" + ], + "variable": [ + { + "key": "id", + "value": "0", + "description": "Required; integer/int32" + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): Uplift\nOperation ID: not specified\n\nParameters: path id (required, integer/int32)\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "GET /api/Uplift/can-approve", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/Uplift/can-approve?tier=0", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "Uplift", + "can-approve" + ], + "query": [ + { + "key": "tier", + "value": "0", + "description": "Optional; integer/int32", + "disabled": false + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): Uplift\nOperation ID: not specified\n\nParameters: query tier (optional, integer/int32)\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "GET /api/Uplift/dispatch/{dispatchId}", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/Uplift/dispatch/:dispatchId", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "Uplift", + "dispatch", + ":dispatchId" + ], + "variable": [ + { + "key": "dispatchId", + "value": "0", + "description": "Required; integer/int32" + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): Uplift\nOperation ID: not specified\n\nParameters: path dispatchId (required, integer/int32)\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "GET /api/uplifts", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/uplifts?status=&tier=0&page=0&pageSize=0", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "uplifts" + ], + "query": [ + { + "key": "status", + "value": "", + "description": "Optional; string", + "disabled": false + }, + { + "key": "tier", + "value": "0", + "description": "Optional; integer/int32", + "disabled": false + }, + { + "key": "page", + "value": "0", + "description": "Optional; integer/int32", + "disabled": false + }, + { + "key": "pageSize", + "value": "0", + "description": "Optional; integer/int32", + "disabled": false + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): Uplift\nOperation ID: not specified\n\nParameters: query status (optional, string); query tier (optional, integer/int32); query page (optional, integer/int32); query pageSize (optional, integer/int32)\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "GET /api/uplifts/{id}/evidence", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/uplifts/:id/evidence", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "uplifts", + ":id", + "evidence" + ], + "variable": [ + { + "key": "id", + "value": "0", + "description": "Required; integer/int32" + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): Uplift\nOperation ID: not specified\n\nParameters: path id (required, integer/int32)\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "GET /api/uplifts/can-approve", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/uplifts/can-approve?tier=0", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "uplifts", + "can-approve" + ], + "query": [ + { + "key": "tier", + "value": "0", + "description": "Optional; integer/int32", + "disabled": false + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): Uplift\nOperation ID: not specified\n\nParameters: query tier (optional, integer/int32)\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "GET /api/uplifts/dispatch/{dispatchId}", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/uplifts/dispatch/:dispatchId", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "uplifts", + "dispatch", + ":dispatchId" + ], + "variable": [ + { + "key": "dispatchId", + "value": "0", + "description": "Required; integer/int32" + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): Uplift\nOperation ID: not specified\n\nParameters: path dispatchId (required, integer/int32)\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "POST /api/Uplift/{id}/approve", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/Uplift/:id/approve", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "Uplift", + ":id", + "approve" + ], + "variable": [ + { + "key": "id", + "value": "0", + "description": "Required; integer/int32" + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): Uplift\nOperation ID: not specified\n\nParameters: path id (required, integer/int32)\nRequest body: application/json, text/json, application/*+json; Illustrative placeholder generated from #/components/schemas/DecisionRequest; replace placeholder values before sending.\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending.", + "body": { + "mode": "raw", + "raw": "{\n \"note\": \"\"\n}", + "options": { + "raw": { + "language": "json" + } + }, + "description": "Illustrative placeholder generated from #/components/schemas/DecisionRequest; replace placeholder values before sending." + } + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "POST /api/Uplift/{id}/deny", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/Uplift/:id/deny", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "Uplift", + ":id", + "deny" + ], + "variable": [ + { + "key": "id", + "value": "0", + "description": "Required; integer/int32" + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): Uplift\nOperation ID: not specified\n\nParameters: path id (required, integer/int32)\nRequest body: application/json, text/json, application/*+json; Illustrative placeholder generated from #/components/schemas/DecisionRequest; replace placeholder values before sending.\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending.", + "body": { + "mode": "raw", + "raw": "{\n \"note\": \"\"\n}", + "options": { + "raw": { + "language": "json" + } + }, + "description": "Illustrative placeholder generated from #/components/schemas/DecisionRequest; replace placeholder values before sending." + } + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "POST /api/Uplift/{id}/reject", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/Uplift/:id/reject", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "Uplift", + ":id", + "reject" + ], + "variable": [ + { + "key": "id", + "value": "0", + "description": "Required; integer/int32" + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): Uplift\nOperation ID: not specified\n\nParameters: path id (required, integer/int32)\nRequest body: application/json, text/json, application/*+json; Illustrative placeholder generated from #/components/schemas/DecisionRequest; replace placeholder values before sending.\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending.", + "body": { + "mode": "raw", + "raw": "{\n \"note\": \"\"\n}", + "options": { + "raw": { + "language": "json" + } + }, + "description": "Illustrative placeholder generated from #/components/schemas/DecisionRequest; replace placeholder values before sending." + } + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "POST /api/Uplift/{id}/request-changes", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/Uplift/:id/request-changes", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "Uplift", + ":id", + "request-changes" + ], + "variable": [ + { + "key": "id", + "value": "0", + "description": "Required; integer/int32" + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): Uplift\nOperation ID: not specified\n\nParameters: path id (required, integer/int32)\nRequest body: application/json, text/json, application/*+json; Illustrative placeholder generated from #/components/schemas/DecisionRequest; replace placeholder values before sending.\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending.", + "body": { + "mode": "raw", + "raw": "{\n \"note\": \"\"\n}", + "options": { + "raw": { + "language": "json" + } + }, + "description": "Illustrative placeholder generated from #/components/schemas/DecisionRequest; replace placeholder values before sending." + } + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "POST /api/uplifts/{id}/approve", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/uplifts/:id/approve", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "uplifts", + ":id", + "approve" + ], + "variable": [ + { + "key": "id", + "value": "0", + "description": "Required; integer/int32" + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): Uplift\nOperation ID: not specified\n\nParameters: path id (required, integer/int32)\nRequest body: application/json, text/json, application/*+json; Illustrative placeholder generated from #/components/schemas/DecisionRequest; replace placeholder values before sending.\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending.", + "body": { + "mode": "raw", + "raw": "{\n \"note\": \"\"\n}", + "options": { + "raw": { + "language": "json" + } + }, + "description": "Illustrative placeholder generated from #/components/schemas/DecisionRequest; replace placeholder values before sending." + } + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "POST /api/uplifts/{id}/deny", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/uplifts/:id/deny", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "uplifts", + ":id", + "deny" + ], + "variable": [ + { + "key": "id", + "value": "0", + "description": "Required; integer/int32" + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): Uplift\nOperation ID: not specified\n\nParameters: path id (required, integer/int32)\nRequest body: application/json, text/json, application/*+json; Illustrative placeholder generated from #/components/schemas/DecisionRequest; replace placeholder values before sending.\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending.", + "body": { + "mode": "raw", + "raw": "{\n \"note\": \"\"\n}", + "options": { + "raw": { + "language": "json" + } + }, + "description": "Illustrative placeholder generated from #/components/schemas/DecisionRequest; replace placeholder values before sending." + } + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "POST /api/uplifts/{id}/reject", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/uplifts/:id/reject", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "uplifts", + ":id", + "reject" + ], + "variable": [ + { + "key": "id", + "value": "0", + "description": "Required; integer/int32" + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): Uplift\nOperation ID: not specified\n\nParameters: path id (required, integer/int32)\nRequest body: application/json, text/json, application/*+json; Illustrative placeholder generated from #/components/schemas/DecisionRequest; replace placeholder values before sending.\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending.", + "body": { + "mode": "raw", + "raw": "{\n \"note\": \"\"\n}", + "options": { + "raw": { + "language": "json" + } + }, + "description": "Illustrative placeholder generated from #/components/schemas/DecisionRequest; replace placeholder values before sending." + } + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "POST /api/uplifts/{id}/request-changes", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/uplifts/:id/request-changes", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "uplifts", + ":id", + "request-changes" + ], + "variable": [ + { + "key": "id", + "value": "0", + "description": "Required; integer/int32" + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): Uplift\nOperation ID: not specified\n\nParameters: path id (required, integer/int32)\nRequest body: application/json, text/json, application/*+json; Illustrative placeholder generated from #/components/schemas/DecisionRequest; replace placeholder values before sending.\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending.", + "body": { + "mode": "raw", + "raw": "{\n \"note\": \"\"\n}", + "options": { + "raw": { + "language": "json" + } + }, + "description": "Illustrative placeholder generated from #/components/schemas/DecisionRequest; replace placeholder values before sending." + } + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + } + ] + }, + { + "name": "User", + "item": [ + { + "name": "DELETE /api/User/DeleteUser", + "request": { + "method": "DELETE", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/User/DeleteUser", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "User", + "DeleteUser" + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): User\nOperation ID: not specified\n\nParameters: none\nRequest body: application/json, text/json, application/*+json; Illustrative placeholder generated from #/components/schemas/EditUser_DTO; replace placeholder values before sending.\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending.", + "body": { + "mode": "raw", + "raw": "{\n \"id\": \"\",\n \"name\": \"\",\n \"email\": \"\",\n \"role\": \"\",\n \"accountId\": 0\n}", + "options": { + "raw": { + "language": "json" + } + }, + "description": "Illustrative placeholder generated from #/components/schemas/EditUser_DTO; replace placeholder values before sending." + } + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "GET /api/User", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/User", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "User" + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): User\nOperation ID: not specified\n\nParameters: none\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "GET /api/User/UserProfile", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/User/UserProfile", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "User", + "UserProfile" + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): User\nOperation ID: not specified\n\nParameters: none\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "POST /api/User/AddUser", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/User/AddUser", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "User", + "AddUser" + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): User\nOperation ID: not specified\n\nParameters: none\nRequest body: application/json, text/json, application/*+json; Illustrative placeholder generated from #/components/schemas/User_DTO; replace placeholder values before sending.\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending.", + "body": { + "mode": "raw", + "raw": "{\n \"name\": \"\",\n \"email\": \"\",\n \"contact\": \"\",\n \"role\": \"\",\n \"accountId\": 0\n}", + "options": { + "raw": { + "language": "json" + } + }, + "description": "Illustrative placeholder generated from #/components/schemas/User_DTO; replace placeholder values before sending." + } + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "POST /api/User/DeleteCurrentUser", + "request": { + "method": "POST", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/User/DeleteCurrentUser", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "User", + "DeleteCurrentUser" + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): User\nOperation ID: not specified\n\nParameters: none\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "PUT /api/User/EditUser", + "request": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/User/EditUser", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "User", + "EditUser" + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): User\nOperation ID: not specified\n\nParameters: none\nRequest body: application/json, text/json, application/*+json; Illustrative placeholder generated from #/components/schemas/EditUser_DTO; replace placeholder values before sending.\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending.", + "body": { + "mode": "raw", + "raw": "{\n \"id\": \"\",\n \"name\": \"\",\n \"email\": \"\",\n \"role\": \"\",\n \"accountId\": 0\n}", + "options": { + "raw": { + "language": "json" + } + }, + "description": "Illustrative placeholder generated from #/components/schemas/EditUser_DTO; replace placeholder values before sending." + } + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + } + ] + }, + { + "name": "Vendor", + "item": [ + { + "name": "DELETE /api/Vendor/{id}", + "request": { + "method": "DELETE", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/Vendor/:id?id=0&confirmOpenWorkOrders=false", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "Vendor", + ":id" + ], + "query": [ + { + "key": "id", + "value": "0", + "description": "Optional; integer/int32", + "disabled": false + }, + { + "key": "confirmOpenWorkOrders", + "value": "false", + "description": "Optional; boolean", + "disabled": false + } + ], + "variable": [ + { + "key": "id", + "value": "0", + "description": "Required; integer/int32" + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): Vendor\nOperation ID: not specified\n\nParameters: path id (required, integer/int32); query id (optional, integer/int32); query confirmOpenWorkOrders (optional, boolean)\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "DELETE /api/vendors/{id}", + "request": { + "method": "DELETE", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/vendors/:id?id=0&confirmOpenWorkOrders=false", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "vendors", + ":id" + ], + "query": [ + { + "key": "id", + "value": "0", + "description": "Optional; integer/int32", + "disabled": false + }, + { + "key": "confirmOpenWorkOrders", + "value": "false", + "description": "Optional; boolean", + "disabled": false + } + ], + "variable": [ + { + "key": "id", + "value": "0", + "description": "Required; integer/int32" + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): Vendor\nOperation ID: not specified\n\nParameters: path id (required, integer/int32); query id (optional, integer/int32); query confirmOpenWorkOrders (optional, boolean)\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "GET /api/Vendor/{id}", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/Vendor/:id?id=0", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "Vendor", + ":id" + ], + "query": [ + { + "key": "id", + "value": "0", + "description": "Optional; integer/int32", + "disabled": false + } + ], + "variable": [ + { + "key": "id", + "value": "0", + "description": "Required; integer/int32" + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): Vendor\nOperation ID: not specified\n\nParameters: path id (required, integer/int32); query id (optional, integer/int32)\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "GET /api/Vendor/{id}/deactivation-impact", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/Vendor/:id/deactivation-impact", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "Vendor", + ":id", + "deactivation-impact" + ], + "variable": [ + { + "key": "id", + "value": "0", + "description": "Required; integer/int32" + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): Vendor\nOperation ID: not specified\n\nParameters: path id (required, integer/int32)\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "GET /api/Vendor/{id}/portal-token", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/Vendor/:id/portal-token", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "Vendor", + ":id", + "portal-token" + ], + "variable": [ + { + "key": "id", + "value": "0", + "description": "Required; integer/int32" + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): Vendor\nOperation ID: not specified\n\nParameters: path id (required, integer/int32)\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "GET /api/Vendor/Dropdown", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/Vendor/Dropdown?trade=&siteZip=", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "Vendor", + "Dropdown" + ], + "query": [ + { + "key": "trade", + "value": "", + "description": "Optional; string", + "disabled": false + }, + { + "key": "siteZip", + "value": "", + "description": "Optional; string", + "disabled": false + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): Vendor\nOperation ID: not specified\n\nParameters: query trade (optional, string); query siteZip (optional, string)\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "GET /api/Vendor/facets", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/Vendor/facets?isActive=false", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "Vendor", + "facets" + ], + "query": [ + { + "key": "isActive", + "value": "false", + "description": "Optional; boolean", + "disabled": false + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): Vendor\nOperation ID: not specified\n\nParameters: query isActive (optional, boolean)\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "GET /api/Vendor/GetById", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/Vendor/GetById?id=0", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "Vendor", + "GetById" + ], + "query": [ + { + "key": "id", + "value": "0", + "description": "Optional; integer/int32", + "disabled": false + } + ], + "variable": [ + { + "key": "id", + "value": "0", + "description": "Required; integer/int32" + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): Vendor\nOperation ID: not specified\n\nParameters: path id (required, integer/int32); query id (optional, integer/int32)\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "GET /api/Vendor/GetVendorList", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/Vendor/GetVendorList?search=&page=0&pageSize=0&isActive=false&companies=&trades=&locations=&jobBuckets=", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "Vendor", + "GetVendorList" + ], + "query": [ + { + "key": "search", + "value": "", + "description": "Optional; string", + "disabled": false + }, + { + "key": "page", + "value": "0", + "description": "Optional; integer/int32", + "disabled": false + }, + { + "key": "pageSize", + "value": "0", + "description": "Optional; integer/int32", + "disabled": false + }, + { + "key": "isActive", + "value": "false", + "description": "Optional; boolean", + "disabled": false + }, + { + "key": "companies", + "value": "", + "description": "Optional; array", + "disabled": false + }, + { + "key": "trades", + "value": "", + "description": "Optional; array", + "disabled": false + }, + { + "key": "locations", + "value": "", + "description": "Optional; array", + "disabled": false + }, + { + "key": "jobBuckets", + "value": "", + "description": "Optional; array", + "disabled": false + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): Vendor\nOperation ID: not specified\n\nParameters: query search (optional, string); query page (optional, integer/int32); query pageSize (optional, integer/int32); query isActive (optional, boolean); query companies (optional, array); query trades (optional, array); query locations (optional, array); query jobBuckets (optional, array)\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "GET /api/vendors/{id}", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/vendors/:id?id=0", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "vendors", + ":id" + ], + "query": [ + { + "key": "id", + "value": "0", + "description": "Optional; integer/int32", + "disabled": false + } + ], + "variable": [ + { + "key": "id", + "value": "0", + "description": "Required; integer/int32" + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): Vendor\nOperation ID: not specified\n\nParameters: path id (required, integer/int32); query id (optional, integer/int32)\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "GET /api/vendors/{id}/deactivation-impact", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/vendors/:id/deactivation-impact", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "vendors", + ":id", + "deactivation-impact" + ], + "variable": [ + { + "key": "id", + "value": "0", + "description": "Required; integer/int32" + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): Vendor\nOperation ID: not specified\n\nParameters: path id (required, integer/int32)\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "GET /api/vendors/{id}/portal-token", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/vendors/:id/portal-token", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "vendors", + ":id", + "portal-token" + ], + "variable": [ + { + "key": "id", + "value": "0", + "description": "Required; integer/int32" + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): Vendor\nOperation ID: not specified\n\nParameters: path id (required, integer/int32)\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "GET /api/vendors/Dropdown", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/vendors/Dropdown?trade=&siteZip=", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "vendors", + "Dropdown" + ], + "query": [ + { + "key": "trade", + "value": "", + "description": "Optional; string", + "disabled": false + }, + { + "key": "siteZip", + "value": "", + "description": "Optional; string", + "disabled": false + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): Vendor\nOperation ID: not specified\n\nParameters: query trade (optional, string); query siteZip (optional, string)\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "GET /api/vendors/facets", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/vendors/facets?isActive=false", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "vendors", + "facets" + ], + "query": [ + { + "key": "isActive", + "value": "false", + "description": "Optional; boolean", + "disabled": false + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): Vendor\nOperation ID: not specified\n\nParameters: query isActive (optional, boolean)\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "GET /api/vendors/GetById", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/vendors/GetById?id=0", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "vendors", + "GetById" + ], + "query": [ + { + "key": "id", + "value": "0", + "description": "Optional; integer/int32", + "disabled": false + } + ], + "variable": [ + { + "key": "id", + "value": "0", + "description": "Required; integer/int32" + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): Vendor\nOperation ID: not specified\n\nParameters: path id (required, integer/int32); query id (optional, integer/int32)\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "GET /api/vendors/GetVendorList", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/vendors/GetVendorList?search=&page=0&pageSize=0&isActive=false&companies=&trades=&locations=&jobBuckets=", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "vendors", + "GetVendorList" + ], + "query": [ + { + "key": "search", + "value": "", + "description": "Optional; string", + "disabled": false + }, + { + "key": "page", + "value": "0", + "description": "Optional; integer/int32", + "disabled": false + }, + { + "key": "pageSize", + "value": "0", + "description": "Optional; integer/int32", + "disabled": false + }, + { + "key": "isActive", + "value": "false", + "description": "Optional; boolean", + "disabled": false + }, + { + "key": "companies", + "value": "", + "description": "Optional; array", + "disabled": false + }, + { + "key": "trades", + "value": "", + "description": "Optional; array", + "disabled": false + }, + { + "key": "locations", + "value": "", + "description": "Optional; array", + "disabled": false + }, + { + "key": "jobBuckets", + "value": "", + "description": "Optional; array", + "disabled": false + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): Vendor\nOperation ID: not specified\n\nParameters: query search (optional, string); query page (optional, integer/int32); query pageSize (optional, integer/int32); query isActive (optional, boolean); query companies (optional, array); query trades (optional, array); query locations (optional, array); query jobBuckets (optional, array)\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "POST /api/Vendor", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/Vendor", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "Vendor" + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): Vendor\nOperation ID: not specified\n\nParameters: none\nRequest body: application/json, text/json, application/*+json; Illustrative placeholder generated from #/components/schemas/Vendor_DTO; replace placeholder values before sending.\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending.", + "body": { + "mode": "raw", + "raw": "{\n \"companyName\": \"\",\n \"companyId\": 0,\n \"contactName\": \"\",\n \"email\": \"\",\n \"phone\": \"\",\n \"companyPhone\": \"\",\n \"preferredContact\": \"\",\n \"address\": \"\",\n \"city\": \"\",\n \"state\": \"\",\n \"zip\": \"\",\n \"tradeSpecialties\": \"\",\n \"googleMapsUrl\": \"\",\n \"notes\": \"\",\n \"isActive\": false\n}", + "options": { + "raw": { + "language": "json" + } + }, + "description": "Illustrative placeholder generated from #/components/schemas/Vendor_DTO; replace placeholder values before sending." + } + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "POST /api/Vendor/{id}/portal-token/revoke", + "request": { + "method": "POST", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/Vendor/:id/portal-token/revoke", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "Vendor", + ":id", + "portal-token", + "revoke" + ], + "variable": [ + { + "key": "id", + "value": "0", + "description": "Required; integer/int32" + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): Vendor\nOperation ID: not specified\n\nParameters: path id (required, integer/int32)\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "POST /api/Vendor/{id}/portal-token/rotate", + "request": { + "method": "POST", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/Vendor/:id/portal-token/rotate", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "Vendor", + ":id", + "portal-token", + "rotate" + ], + "variable": [ + { + "key": "id", + "value": "0", + "description": "Required; integer/int32" + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): Vendor\nOperation ID: not specified\n\nParameters: path id (required, integer/int32)\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "POST /api/Vendor/Create", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/Vendor/Create", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "Vendor", + "Create" + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): Vendor\nOperation ID: not specified\n\nParameters: none\nRequest body: application/json, text/json, application/*+json; Illustrative placeholder generated from #/components/schemas/Vendor_DTO; replace placeholder values before sending.\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending.", + "body": { + "mode": "raw", + "raw": "{\n \"companyName\": \"\",\n \"companyId\": 0,\n \"contactName\": \"\",\n \"email\": \"\",\n \"phone\": \"\",\n \"companyPhone\": \"\",\n \"preferredContact\": \"\",\n \"address\": \"\",\n \"city\": \"\",\n \"state\": \"\",\n \"zip\": \"\",\n \"tradeSpecialties\": \"\",\n \"googleMapsUrl\": \"\",\n \"notes\": \"\",\n \"isActive\": false\n}", + "options": { + "raw": { + "language": "json" + } + }, + "description": "Illustrative placeholder generated from #/components/schemas/Vendor_DTO; replace placeholder values before sending." + } + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "POST /api/Vendor/Delete", + "request": { + "method": "POST", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/Vendor/Delete?id=0&confirmOpenWorkOrders=false", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "Vendor", + "Delete" + ], + "query": [ + { + "key": "id", + "value": "0", + "description": "Optional; integer/int32", + "disabled": false + }, + { + "key": "confirmOpenWorkOrders", + "value": "false", + "description": "Optional; boolean", + "disabled": false + } + ], + "variable": [ + { + "key": "id", + "value": "0", + "description": "Required; integer/int32" + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): Vendor\nOperation ID: not specified\n\nParameters: path id (required, integer/int32); query id (optional, integer/int32); query confirmOpenWorkOrders (optional, boolean)\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "POST /api/Vendor/Update", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/Vendor/Update", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "Vendor", + "Update" + ], + "variable": [ + { + "key": "id", + "value": "0", + "description": "Required; integer/int32" + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): Vendor\nOperation ID: not specified\n\nParameters: path id (required, integer/int32)\nRequest body: application/json, text/json, application/*+json; Illustrative placeholder generated from #/components/schemas/EditVendor_DTO; replace placeholder values before sending.\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending.", + "body": { + "mode": "raw", + "raw": "{\n \"companyName\": \"\",\n \"companyId\": 0,\n \"contactName\": \"\",\n \"email\": \"\",\n \"phone\": \"\",\n \"companyPhone\": \"\",\n \"preferredContact\": \"\",\n \"address\": \"\",\n \"city\": \"\",\n \"state\": \"\",\n \"zip\": \"\",\n \"tradeSpecialties\": \"\",\n \"googleMapsUrl\": \"\",\n \"notes\": \"\",\n \"isActive\": false,\n \"id\": 0,\n \"confirmOpenWorkOrders\": false\n}", + "options": { + "raw": { + "language": "json" + } + }, + "description": "Illustrative placeholder generated from #/components/schemas/EditVendor_DTO; replace placeholder values before sending." + } + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "POST /api/vendors", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/vendors", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "vendors" + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): Vendor\nOperation ID: not specified\n\nParameters: none\nRequest body: application/json, text/json, application/*+json; Illustrative placeholder generated from #/components/schemas/Vendor_DTO; replace placeholder values before sending.\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending.", + "body": { + "mode": "raw", + "raw": "{\n \"companyName\": \"\",\n \"companyId\": 0,\n \"contactName\": \"\",\n \"email\": \"\",\n \"phone\": \"\",\n \"companyPhone\": \"\",\n \"preferredContact\": \"\",\n \"address\": \"\",\n \"city\": \"\",\n \"state\": \"\",\n \"zip\": \"\",\n \"tradeSpecialties\": \"\",\n \"googleMapsUrl\": \"\",\n \"notes\": \"\",\n \"isActive\": false\n}", + "options": { + "raw": { + "language": "json" + } + }, + "description": "Illustrative placeholder generated from #/components/schemas/Vendor_DTO; replace placeholder values before sending." + } + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "POST /api/vendors/{id}/portal-token/revoke", + "request": { + "method": "POST", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/vendors/:id/portal-token/revoke", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "vendors", + ":id", + "portal-token", + "revoke" + ], + "variable": [ + { + "key": "id", + "value": "0", + "description": "Required; integer/int32" + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): Vendor\nOperation ID: not specified\n\nParameters: path id (required, integer/int32)\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "POST /api/vendors/{id}/portal-token/rotate", + "request": { + "method": "POST", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/vendors/:id/portal-token/rotate", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "vendors", + ":id", + "portal-token", + "rotate" + ], + "variable": [ + { + "key": "id", + "value": "0", + "description": "Required; integer/int32" + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): Vendor\nOperation ID: not specified\n\nParameters: path id (required, integer/int32)\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "POST /api/vendors/Create", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/vendors/Create", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "vendors", + "Create" + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): Vendor\nOperation ID: not specified\n\nParameters: none\nRequest body: application/json, text/json, application/*+json; Illustrative placeholder generated from #/components/schemas/Vendor_DTO; replace placeholder values before sending.\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending.", + "body": { + "mode": "raw", + "raw": "{\n \"companyName\": \"\",\n \"companyId\": 0,\n \"contactName\": \"\",\n \"email\": \"\",\n \"phone\": \"\",\n \"companyPhone\": \"\",\n \"preferredContact\": \"\",\n \"address\": \"\",\n \"city\": \"\",\n \"state\": \"\",\n \"zip\": \"\",\n \"tradeSpecialties\": \"\",\n \"googleMapsUrl\": \"\",\n \"notes\": \"\",\n \"isActive\": false\n}", + "options": { + "raw": { + "language": "json" + } + }, + "description": "Illustrative placeholder generated from #/components/schemas/Vendor_DTO; replace placeholder values before sending." + } + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "POST /api/vendors/Delete", + "request": { + "method": "POST", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/vendors/Delete?id=0&confirmOpenWorkOrders=false", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "vendors", + "Delete" + ], + "query": [ + { + "key": "id", + "value": "0", + "description": "Optional; integer/int32", + "disabled": false + }, + { + "key": "confirmOpenWorkOrders", + "value": "false", + "description": "Optional; boolean", + "disabled": false + } + ], + "variable": [ + { + "key": "id", + "value": "0", + "description": "Required; integer/int32" + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): Vendor\nOperation ID: not specified\n\nParameters: path id (required, integer/int32); query id (optional, integer/int32); query confirmOpenWorkOrders (optional, boolean)\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "POST /api/vendors/Update", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/vendors/Update", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "vendors", + "Update" + ], + "variable": [ + { + "key": "id", + "value": "0", + "description": "Required; integer/int32" + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): Vendor\nOperation ID: not specified\n\nParameters: path id (required, integer/int32)\nRequest body: application/json, text/json, application/*+json; Illustrative placeholder generated from #/components/schemas/EditVendor_DTO; replace placeholder values before sending.\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending.", + "body": { + "mode": "raw", + "raw": "{\n \"companyName\": \"\",\n \"companyId\": 0,\n \"contactName\": \"\",\n \"email\": \"\",\n \"phone\": \"\",\n \"companyPhone\": \"\",\n \"preferredContact\": \"\",\n \"address\": \"\",\n \"city\": \"\",\n \"state\": \"\",\n \"zip\": \"\",\n \"tradeSpecialties\": \"\",\n \"googleMapsUrl\": \"\",\n \"notes\": \"\",\n \"isActive\": false,\n \"id\": 0,\n \"confirmOpenWorkOrders\": false\n}", + "options": { + "raw": { + "language": "json" + } + }, + "description": "Illustrative placeholder generated from #/components/schemas/EditVendor_DTO; replace placeholder values before sending." + } + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "PUT /api/Vendor/{id}", + "request": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/Vendor/:id", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "Vendor", + ":id" + ], + "variable": [ + { + "key": "id", + "value": "0", + "description": "Required; integer/int32" + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): Vendor\nOperation ID: not specified\n\nParameters: path id (required, integer/int32)\nRequest body: application/json, text/json, application/*+json; Illustrative placeholder generated from #/components/schemas/EditVendor_DTO; replace placeholder values before sending.\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending.", + "body": { + "mode": "raw", + "raw": "{\n \"companyName\": \"\",\n \"companyId\": 0,\n \"contactName\": \"\",\n \"email\": \"\",\n \"phone\": \"\",\n \"companyPhone\": \"\",\n \"preferredContact\": \"\",\n \"address\": \"\",\n \"city\": \"\",\n \"state\": \"\",\n \"zip\": \"\",\n \"tradeSpecialties\": \"\",\n \"googleMapsUrl\": \"\",\n \"notes\": \"\",\n \"isActive\": false,\n \"id\": 0,\n \"confirmOpenWorkOrders\": false\n}", + "options": { + "raw": { + "language": "json" + } + }, + "description": "Illustrative placeholder generated from #/components/schemas/EditVendor_DTO; replace placeholder values before sending." + } + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "PUT /api/Vendor/{id}/work-order-update", + "request": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/Vendor/:id/work-order-update", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "Vendor", + ":id", + "work-order-update" + ], + "variable": [ + { + "key": "id", + "value": "0", + "description": "Required; integer/int32" + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): Vendor\nOperation ID: not specified\n\nParameters: path id (required, integer/int32)\nRequest body: application/json, text/json, application/*+json; Illustrative placeholder generated from #/components/schemas/WorkOrderVendorUpdate_DTO; replace placeholder values before sending.\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending.", + "body": { + "mode": "raw", + "raw": "{\n \"workOrderId\": 0,\n \"contactName\": \"\",\n \"preferredContact\": \"\",\n \"phone\": \"\",\n \"email\": \"\",\n \"notes\": \"\"\n}", + "options": { + "raw": { + "language": "json" + } + }, + "description": "Illustrative placeholder generated from #/components/schemas/WorkOrderVendorUpdate_DTO; replace placeholder values before sending." + } + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "PUT /api/vendors/{id}", + "request": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/vendors/:id", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "vendors", + ":id" + ], + "variable": [ + { + "key": "id", + "value": "0", + "description": "Required; integer/int32" + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): Vendor\nOperation ID: not specified\n\nParameters: path id (required, integer/int32)\nRequest body: application/json, text/json, application/*+json; Illustrative placeholder generated from #/components/schemas/EditVendor_DTO; replace placeholder values before sending.\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending.", + "body": { + "mode": "raw", + "raw": "{\n \"companyName\": \"\",\n \"companyId\": 0,\n \"contactName\": \"\",\n \"email\": \"\",\n \"phone\": \"\",\n \"companyPhone\": \"\",\n \"preferredContact\": \"\",\n \"address\": \"\",\n \"city\": \"\",\n \"state\": \"\",\n \"zip\": \"\",\n \"tradeSpecialties\": \"\",\n \"googleMapsUrl\": \"\",\n \"notes\": \"\",\n \"isActive\": false,\n \"id\": 0,\n \"confirmOpenWorkOrders\": false\n}", + "options": { + "raw": { + "language": "json" + } + }, + "description": "Illustrative placeholder generated from #/components/schemas/EditVendor_DTO; replace placeholder values before sending." + } + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "PUT /api/vendors/{id}/work-order-update", + "request": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/vendors/:id/work-order-update", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "vendors", + ":id", + "work-order-update" + ], + "variable": [ + { + "key": "id", + "value": "0", + "description": "Required; integer/int32" + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): Vendor\nOperation ID: not specified\n\nParameters: path id (required, integer/int32)\nRequest body: application/json, text/json, application/*+json; Illustrative placeholder generated from #/components/schemas/WorkOrderVendorUpdate_DTO; replace placeholder values before sending.\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending.", + "body": { + "mode": "raw", + "raw": "{\n \"workOrderId\": 0,\n \"contactName\": \"\",\n \"preferredContact\": \"\",\n \"phone\": \"\",\n \"email\": \"\",\n \"notes\": \"\"\n}", + "options": { + "raw": { + "language": "json" + } + }, + "description": "Illustrative placeholder generated from #/components/schemas/WorkOrderVendorUpdate_DTO; replace placeholder values before sending." + } + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + } + ] + }, + { + "name": "VendorCompanyRoster", + "item": [ + { + "name": "GET /api/vendor-company-roster", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/vendor-company-roster?vendorId=0&companyId=0", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "vendor-company-roster" + ], + "query": [ + { + "key": "vendorId", + "value": "0", + "description": "Optional; integer/int32", + "disabled": false + }, + { + "key": "companyId", + "value": "0", + "description": "Optional; integer/int32", + "disabled": false + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): VendorCompanyRoster\nOperation ID: not specified\n\nParameters: query vendorId (optional, integer/int32); query companyId (optional, integer/int32)\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "PATCH /api/vendor-company-roster/{companyId}", + "request": { + "method": "PATCH", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/vendor-company-roster/:companyId", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "vendor-company-roster", + ":companyId" + ], + "variable": [ + { + "key": "companyId", + "value": "0", + "description": "Required; integer/int32" + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): VendorCompanyRoster\nOperation ID: not specified\n\nParameters: path companyId (required, integer/int32)\nRequest body: application/json, text/json, application/*+json; Illustrative placeholder generated from #/components/schemas/AddTechniciansVendorRosterDTO; replace placeholder values before sending.\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending.", + "body": { + "mode": "raw", + "raw": "{\n \"rowVersion\": \"\",\n \"addTechnicians\": [\n {\n \"id\": 0,\n \"contactName\": \"\",\n \"phone\": \"\",\n \"email\": \"\",\n \"preferredContact\": \"\",\n \"tradeSpecialties\": \"\",\n \"isActive\": false\n }\n ],\n \"companyFields\": {\n \"name\": \"\",\n \"companyPhone\": \"\",\n \"email\": \"\",\n \"address\": \"\",\n \"city\": \"\",\n \"state\": \"\",\n \"zip\": \"\",\n \"googleMapsUrl\": \"\",\n \"notes\": \"\"\n }\n}", + "options": { + "raw": { + "language": "json" + } + }, + "description": "Illustrative placeholder generated from #/components/schemas/AddTechniciansVendorRosterDTO; replace placeholder values before sending." + } + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "POST /api/vendor-company-roster", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/vendor-company-roster", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "vendor-company-roster" + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): VendorCompanyRoster\nOperation ID: not specified\n\nParameters: none\nRequest body: application/json, text/json, application/*+json; Illustrative placeholder generated from #/components/schemas/CreateVendorRosterDTO; replace placeholder values before sending.\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending.", + "body": { + "mode": "raw", + "raw": "{\n \"name\": \"\",\n \"companyPhone\": \"\",\n \"email\": \"\",\n \"address\": \"\",\n \"city\": \"\",\n \"state\": \"\",\n \"zip\": \"\",\n \"googleMapsUrl\": \"\",\n \"notes\": \"\",\n \"technicians\": [\n {\n \"id\": 0,\n \"contactName\": \"\",\n \"phone\": \"\",\n \"email\": \"\",\n \"preferredContact\": \"\",\n \"tradeSpecialties\": \"\",\n \"isActive\": false\n }\n ]\n}", + "options": { + "raw": { + "language": "json" + } + }, + "description": "Illustrative placeholder generated from #/components/schemas/CreateVendorRosterDTO; replace placeholder values before sending." + } + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "PUT /api/vendor-company-roster/{companyId}", + "request": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/vendor-company-roster/:companyId", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "vendor-company-roster", + ":companyId" + ], + "variable": [ + { + "key": "companyId", + "value": "0", + "description": "Required; integer/int32" + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): VendorCompanyRoster\nOperation ID: not specified\n\nParameters: path companyId (required, integer/int32)\nRequest body: application/json, text/json, application/*+json; Illustrative placeholder generated from #/components/schemas/ReconcileVendorRosterDTO; replace placeholder values before sending.\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending.", + "body": { + "mode": "raw", + "raw": "{\n \"rowVersion\": \"\",\n \"name\": \"\",\n \"companyPhone\": \"\",\n \"email\": \"\",\n \"address\": \"\",\n \"city\": \"\",\n \"state\": \"\",\n \"zip\": \"\",\n \"googleMapsUrl\": \"\",\n \"notes\": \"\",\n \"technicians\": [\n {\n \"id\": 0,\n \"contactName\": \"\",\n \"phone\": \"\",\n \"email\": \"\",\n \"preferredContact\": \"\",\n \"tradeSpecialties\": \"\",\n \"isActive\": false\n }\n ]\n}", + "options": { + "raw": { + "language": "json" + } + }, + "description": "Illustrative placeholder generated from #/components/schemas/ReconcileVendorRosterDTO; replace placeholder values before sending." + } + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + } + ] + }, + { + "name": "VendorOperations", + "item": [ + { + "name": "GET /api/vendor-operations/availability", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/vendor-operations/availability?start=&end=&locationId=0&trade=", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "vendor-operations", + "availability" + ], + "query": [ + { + "key": "start", + "value": "", + "description": "Optional; string/date-time", + "disabled": false + }, + { + "key": "end", + "value": "", + "description": "Optional; string/date-time", + "disabled": false + }, + { + "key": "locationId", + "value": "0", + "description": "Optional; integer/int32", + "disabled": false + }, + { + "key": "trade", + "value": "", + "description": "Optional; string", + "disabled": false + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): VendorOperations\nOperation ID: not specified\n\nParameters: query start (optional, string/date-time); query end (optional, string/date-time); query locationId (optional, integer/int32); query trade (optional, string)\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "GET /api/vendor-operations/insights", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/vendor-operations/insights?from=&to=&locationId=0&trade=&vendorId=0", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "vendor-operations", + "insights" + ], + "query": [ + { + "key": "from", + "value": "", + "description": "Optional; string/date-time", + "disabled": false + }, + { + "key": "to", + "value": "", + "description": "Optional; string/date-time", + "disabled": false + }, + { + "key": "locationId", + "value": "0", + "description": "Optional; integer/int32", + "disabled": false + }, + { + "key": "trade", + "value": "", + "description": "Optional; string", + "disabled": false + }, + { + "key": "vendorId", + "value": "0", + "description": "Optional; integer/int32", + "disabled": false + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): VendorOperations\nOperation ID: not specified\n\nParameters: query from (optional, string/date-time); query to (optional, string/date-time); query locationId (optional, integer/int32); query trade (optional, string); query vendorId (optional, integer/int32)\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "GET /api/vendor-operations/insights.csv", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/vendor-operations/insights.csv?from=&to=&locationId=0&trade=&vendorId=0", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "vendor-operations", + "insights.csv" + ], + "query": [ + { + "key": "from", + "value": "", + "description": "Optional; string/date-time", + "disabled": false + }, + { + "key": "to", + "value": "", + "description": "Optional; string/date-time", + "disabled": false + }, + { + "key": "locationId", + "value": "0", + "description": "Optional; integer/int32", + "disabled": false + }, + { + "key": "trade", + "value": "", + "description": "Optional; string", + "disabled": false + }, + { + "key": "vendorId", + "value": "0", + "description": "Optional; integer/int32", + "disabled": false + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): VendorOperations\nOperation ID: not specified\n\nParameters: query from (optional, string/date-time); query to (optional, string/date-time); query locationId (optional, integer/int32); query trade (optional, string); query vendorId (optional, integer/int32)\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "GET /api/vendor-operations/insights.pdf", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/vendor-operations/insights.pdf?from=&to=&locationId=0&trade=&vendorId=0", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "vendor-operations", + "insights.pdf" + ], + "query": [ + { + "key": "from", + "value": "", + "description": "Optional; string/date-time", + "disabled": false + }, + { + "key": "to", + "value": "", + "description": "Optional; string/date-time", + "disabled": false + }, + { + "key": "locationId", + "value": "0", + "description": "Optional; integer/int32", + "disabled": false + }, + { + "key": "trade", + "value": "", + "description": "Optional; string", + "disabled": false + }, + { + "key": "vendorId", + "value": "0", + "description": "Optional; integer/int32", + "disabled": false + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): VendorOperations\nOperation ID: not specified\n\nParameters: query from (optional, string/date-time); query to (optional, string/date-time); query locationId (optional, integer/int32); query trade (optional, string); query vendorId (optional, integer/int32)\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "GET /api/vendor-operations/notifications", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/vendor-operations/notifications", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "vendor-operations", + "notifications" + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): VendorOperations\nOperation ID: not specified\n\nParameters: none\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "GET /api/vendor-operations/sites/{locationId}/preferred-vendors", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/vendor-operations/sites/:locationId/preferred-vendors", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "vendor-operations", + "sites", + ":locationId", + "preferred-vendors" + ], + "variable": [ + { + "key": "locationId", + "value": "0", + "description": "Required; integer/int32" + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): VendorOperations\nOperation ID: not specified\n\nParameters: path locationId (required, integer/int32)\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "PUT /api/vendor-operations/dispatches/{dispatchId}/commercial-status", + "request": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/vendor-operations/dispatches/:dispatchId/commercial-status", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "vendor-operations", + "dispatches", + ":dispatchId", + "commercial-status" + ], + "variable": [ + { + "key": "dispatchId", + "value": "0", + "description": "Required; integer/int32" + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): VendorOperations\nOperation ID: not specified\n\nParameters: path dispatchId (required, integer/int32)\nRequest body: application/json, text/json, application/*+json; Illustrative placeholder generated from #/components/schemas/CommercialStatusRequest; replace placeholder values before sending.\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending.", + "body": { + "mode": "raw", + "raw": "{\n \"invoiceStatus\": \"\",\n \"paymentStatus\": \"\",\n \"invoiceNumber\": \"\"\n}", + "options": { + "raw": { + "language": "json" + } + }, + "description": "Illustrative placeholder generated from #/components/schemas/CommercialStatusRequest; replace placeholder values before sending." + } + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "PUT /api/vendor-operations/documents/{documentId}/review", + "request": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/vendor-operations/documents/:documentId/review", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "vendor-operations", + "documents", + ":documentId", + "review" + ], + "variable": [ + { + "key": "documentId", + "value": "0", + "description": "Required; integer/int32" + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): VendorOperations\nOperation ID: not specified\n\nParameters: path documentId (required, integer/int32)\nRequest body: application/json, text/json, application/*+json; Illustrative placeholder generated from #/components/schemas/DocumentReviewRequest; replace placeholder values before sending.\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending.", + "body": { + "mode": "raw", + "raw": "{\n \"reviewStatus\": \"\",\n \"rejectionReason\": \"\"\n}", + "options": { + "raw": { + "language": "json" + } + }, + "description": "Illustrative placeholder generated from #/components/schemas/DocumentReviewRequest; replace placeholder values before sending." + } + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "PUT /api/vendor-operations/sites/{locationId}/preferred-vendors", + "request": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/vendor-operations/sites/:locationId/preferred-vendors", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "vendor-operations", + "sites", + ":locationId", + "preferred-vendors" + ], + "variable": [ + { + "key": "locationId", + "value": "0", + "description": "Required; integer/int32" + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): VendorOperations\nOperation ID: not specified\n\nParameters: path locationId (required, integer/int32)\nRequest body: application/json, text/json, application/*+json; Illustrative placeholder generated from array; replace placeholder values before sending.\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending.", + "body": { + "mode": "raw", + "raw": "[\n {\n \"vendorId\": 0,\n \"trade\": \"\",\n \"sortOrder\": 0\n }\n]", + "options": { + "raw": { + "language": "json" + } + }, + "description": "Illustrative placeholder generated from array; replace placeholder values before sending." + } + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "PUT /api/vendor-operations/vendors/{vendorId}/availability", + "request": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/vendor-operations/vendors/:vendorId/availability", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "vendor-operations", + "vendors", + ":vendorId", + "availability" + ], + "variable": [ + { + "key": "vendorId", + "value": "0", + "description": "Required; integer/int32" + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): VendorOperations\nOperation ID: not specified\n\nParameters: path vendorId (required, integer/int32)\nRequest body: application/json, text/json, application/*+json; Illustrative placeholder generated from #/components/schemas/VendorAvailabilityRequest; replace placeholder values before sending.\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending.", + "body": { + "mode": "raw", + "raw": "{\n \"status\": \"\"\n}", + "options": { + "raw": { + "language": "json" + } + }, + "description": "Illustrative placeholder generated from #/components/schemas/VendorAvailabilityRequest; replace placeholder values before sending." + } + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "PUT /api/vendor-operations/work-orders/{workOrderId}/assignment", + "request": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/vendor-operations/work-orders/:workOrderId/assignment", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "vendor-operations", + "work-orders", + ":workOrderId", + "assignment" + ], + "variable": [ + { + "key": "workOrderId", + "value": "0", + "description": "Required; integer/int32" + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): VendorOperations\nOperation ID: not specified\n\nParameters: path workOrderId (required, integer/int32)\nRequest body: application/json, text/json, application/*+json; Illustrative placeholder generated from #/components/schemas/VendorAssignmentRequest; replace placeholder values before sending.\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending.", + "body": { + "mode": "raw", + "raw": "{\n \"vendorId\": 0,\n \"scheduledStart\": \"2026-01-01T00:00:00Z\",\n \"scheduledEnd\": \"2026-01-01T00:00:00Z\",\n \"estimatedArrivalAt\": \"2026-01-01T00:00:00Z\",\n \"etaManualOverride\": false\n}", + "options": { + "raw": { + "language": "json" + } + }, + "description": "Illustrative placeholder generated from #/components/schemas/VendorAssignmentRequest; replace placeholder values before sending." + } + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + } + ] + }, + { + "name": "VendorPortal", + "item": [ + { + "name": "GET /api/vendor-portal/dispatches", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/vendor-portal/dispatches?status=", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "vendor-portal", + "dispatches" + ], + "query": [ + { + "key": "status", + "value": "", + "description": "Optional; string", + "disabled": false + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): VendorPortal\nOperation ID: not specified\n\nParameters: query status (optional, string)\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "GET /api/vendor-portal/dispatches/{id}", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/vendor-portal/dispatches/:id", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "vendor-portal", + "dispatches", + ":id" + ], + "variable": [ + { + "key": "id", + "value": "0", + "description": "Required; integer/int32" + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): VendorPortal\nOperation ID: not specified\n\nParameters: path id (required, integer/int32)\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "GET /api/vendor-portal/dispatches/{id}/completion-documents/{documentId}", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/vendor-portal/dispatches/:id/completion-documents/:documentId", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "vendor-portal", + "dispatches", + ":id", + "completion-documents", + ":documentId" + ], + "variable": [ + { + "key": "id", + "value": "0", + "description": "Required; integer/int32" + }, + { + "key": "documentId", + "value": "0", + "description": "Required; integer/int32" + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): VendorPortal\nOperation ID: not specified\n\nParameters: path id (required, integer/int32); path documentId (required, integer/int32)\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "GET /api/vendor-portal/dispatches/{id}/documents/{documentId}", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/vendor-portal/dispatches/:id/documents/:documentId", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "vendor-portal", + "dispatches", + ":id", + "documents", + ":documentId" + ], + "variable": [ + { + "key": "id", + "value": "0", + "description": "Required; integer/int32" + }, + { + "key": "documentId", + "value": "0", + "description": "Required; integer/int32" + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): VendorPortal\nOperation ID: not specified\n\nParameters: path id (required, integer/int32); path documentId (required, integer/int32)\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "GET /api/vendor-portal/dispatches/{id}/documents/{documentId}/status", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/vendor-portal/dispatches/:id/documents/:documentId/status", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "vendor-portal", + "dispatches", + ":id", + "documents", + ":documentId", + "status" + ], + "variable": [ + { + "key": "id", + "value": "0", + "description": "Required; integer/int32" + }, + { + "key": "documentId", + "value": "0", + "description": "Required; integer/int32" + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): VendorPortal\nOperation ID: not specified\n\nParameters: path id (required, integer/int32); path documentId (required, integer/int32)\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "GET /api/vendor-portal/session", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/vendor-portal/session", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "vendor-portal", + "session" + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): VendorPortal\nOperation ID: not specified\n\nParameters: none\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "GET /api/vendorportal/dispatches", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/vendorportal/dispatches?status=", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "vendorportal", + "dispatches" + ], + "query": [ + { + "key": "status", + "value": "", + "description": "Optional; string", + "disabled": false + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): VendorPortal\nOperation ID: not specified\n\nParameters: query status (optional, string)\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "GET /api/vendorportal/dispatches/{id}", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/vendorportal/dispatches/:id", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "vendorportal", + "dispatches", + ":id" + ], + "variable": [ + { + "key": "id", + "value": "0", + "description": "Required; integer/int32" + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): VendorPortal\nOperation ID: not specified\n\nParameters: path id (required, integer/int32)\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "GET /api/vendorportal/dispatches/{id}/completion-documents/{documentId}", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/vendorportal/dispatches/:id/completion-documents/:documentId", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "vendorportal", + "dispatches", + ":id", + "completion-documents", + ":documentId" + ], + "variable": [ + { + "key": "id", + "value": "0", + "description": "Required; integer/int32" + }, + { + "key": "documentId", + "value": "0", + "description": "Required; integer/int32" + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): VendorPortal\nOperation ID: not specified\n\nParameters: path id (required, integer/int32); path documentId (required, integer/int32)\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "GET /api/vendorportal/dispatches/{id}/documents/{documentId}", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/vendorportal/dispatches/:id/documents/:documentId", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "vendorportal", + "dispatches", + ":id", + "documents", + ":documentId" + ], + "variable": [ + { + "key": "id", + "value": "0", + "description": "Required; integer/int32" + }, + { + "key": "documentId", + "value": "0", + "description": "Required; integer/int32" + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): VendorPortal\nOperation ID: not specified\n\nParameters: path id (required, integer/int32); path documentId (required, integer/int32)\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "GET /api/vendorportal/dispatches/{id}/documents/{documentId}/status", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/vendorportal/dispatches/:id/documents/:documentId/status", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "vendorportal", + "dispatches", + ":id", + "documents", + ":documentId", + "status" + ], + "variable": [ + { + "key": "id", + "value": "0", + "description": "Required; integer/int32" + }, + { + "key": "documentId", + "value": "0", + "description": "Required; integer/int32" + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): VendorPortal\nOperation ID: not specified\n\nParameters: path id (required, integer/int32); path documentId (required, integer/int32)\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "GET /api/vendorportal/session", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/vendorportal/session", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "vendorportal", + "session" + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): VendorPortal\nOperation ID: not specified\n\nParameters: none\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "POST /api/vendor-portal/dispatches/{id}/accept", + "request": { + "method": "POST", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/vendor-portal/dispatches/:id/accept", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "vendor-portal", + "dispatches", + ":id", + "accept" + ], + "variable": [ + { + "key": "id", + "value": "0", + "description": "Required; integer/int32" + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): VendorPortal\nOperation ID: not specified\n\nParameters: path id (required, integer/int32)\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "POST /api/vendor-portal/dispatches/{id}/checklist/{itemId}", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/vendor-portal/dispatches/:id/checklist/:itemId", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "vendor-portal", + "dispatches", + ":id", + "checklist", + ":itemId" + ], + "variable": [ + { + "key": "id", + "value": "0", + "description": "Required; integer/int32" + }, + { + "key": "itemId", + "value": "0", + "description": "Required; integer/int32" + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): VendorPortal\nOperation ID: not specified\n\nParameters: path id (required, integer/int32); path itemId (required, integer/int32)\nRequest body: application/json, text/json, application/*+json; Illustrative placeholder generated from #/components/schemas/ChecklistUpdateRequest; replace placeholder values before sending.\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending.", + "body": { + "mode": "raw", + "raw": "{\n \"isCompleted\": false\n}", + "options": { + "raw": { + "language": "json" + } + }, + "description": "Illustrative placeholder generated from #/components/schemas/ChecklistUpdateRequest; replace placeholder values before sending." + } + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "POST /api/vendor-portal/dispatches/{id}/comments", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/vendor-portal/dispatches/:id/comments", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "vendor-portal", + "dispatches", + ":id", + "comments" + ], + "variable": [ + { + "key": "id", + "value": "0", + "description": "Required; integer/int32" + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): VendorPortal\nOperation ID: not specified\n\nParameters: path id (required, integer/int32)\nRequest body: application/json, text/json, application/*+json; Illustrative placeholder generated from #/components/schemas/CommentRequest; replace placeholder values before sending.\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending.", + "body": { + "mode": "raw", + "raw": "{\n \"commentText\": \"\"\n}", + "options": { + "raw": { + "language": "json" + } + }, + "description": "Illustrative placeholder generated from #/components/schemas/CommentRequest; replace placeholder values before sending." + } + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "POST /api/vendor-portal/dispatches/{id}/completion-documents", + "request": { + "method": "POST", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/vendor-portal/dispatches/:id/completion-documents", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "vendor-portal", + "dispatches", + ":id", + "completion-documents" + ], + "variable": [ + { + "key": "id", + "value": "0", + "description": "Required; integer/int32" + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): VendorPortal\nOperation ID: not specified\n\nParameters: path id (required, integer/int32)\nRequest body: multipart/form-data; Illustrative placeholder generated from object; replace placeholder values before sending.\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending.", + "body": { + "mode": "formdata", + "formdata": [ + { + "key": "ContentType", + "type": "text", + "value": "", + "description": "Optional; string" + }, + { + "key": "ContentDisposition", + "type": "text", + "value": "", + "description": "Optional; string" + }, + { + "key": "Headers", + "type": "text", + "value": "[object Object]", + "description": "Optional; object" + }, + { + "key": "Length", + "type": "text", + "value": "0", + "description": "Optional; integer/int64" + }, + { + "key": "Name", + "type": "text", + "value": "", + "description": "Optional; string" + }, + { + "key": "FileName", + "type": "text", + "value": "", + "description": "Optional; string" + }, + { + "key": "replacesDocumentId", + "type": "text", + "value": "0", + "description": "Optional; integer/int32" + }, + { + "key": "purpose", + "type": "text", + "value": "", + "description": "Optional; string" + } + ], + "description": "Illustrative placeholder generated from object; replace placeholder values before sending." + } + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "POST /api/vendor-portal/dispatches/{id}/documents", + "request": { + "method": "POST", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/vendor-portal/dispatches/:id/documents", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "vendor-portal", + "dispatches", + ":id", + "documents" + ], + "variable": [ + { + "key": "id", + "value": "0", + "description": "Required; integer/int32" + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): VendorPortal\nOperation ID: not specified\n\nParameters: path id (required, integer/int32)\nRequest body: multipart/form-data; Illustrative placeholder generated from object; replace placeholder values before sending.\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending.", + "body": { + "mode": "formdata", + "formdata": [ + { + "key": "ContentType", + "type": "text", + "value": "", + "description": "Optional; string" + }, + { + "key": "ContentDisposition", + "type": "text", + "value": "", + "description": "Optional; string" + }, + { + "key": "Headers", + "type": "text", + "value": "[object Object]", + "description": "Optional; object" + }, + { + "key": "Length", + "type": "text", + "value": "0", + "description": "Optional; integer/int64" + }, + { + "key": "Name", + "type": "text", + "value": "", + "description": "Optional; string" + }, + { + "key": "FileName", + "type": "text", + "value": "", + "description": "Optional; string" + }, + { + "key": "replacesDocumentId", + "type": "text", + "value": "0", + "description": "Optional; integer/int32" + }, + { + "key": "purpose", + "type": "text", + "value": "", + "description": "Optional; string" + } + ], + "description": "Illustrative placeholder generated from object; replace placeholder values before sending." + } + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "POST /api/vendor-portal/dispatches/{id}/refuse", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/vendor-portal/dispatches/:id/refuse", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "vendor-portal", + "dispatches", + ":id", + "refuse" + ], + "variable": [ + { + "key": "id", + "value": "0", + "description": "Required; integer/int32" + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): VendorPortal\nOperation ID: not specified\n\nParameters: path id (required, integer/int32)\nRequest body: application/json, text/json, application/*+json; Illustrative placeholder generated from #/components/schemas/RefuseRequest; replace placeholder values before sending.\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending.", + "body": { + "mode": "raw", + "raw": "{\n \"reason\": \"\"\n}", + "options": { + "raw": { + "language": "json" + } + }, + "description": "Illustrative placeholder generated from #/components/schemas/RefuseRequest; replace placeholder values before sending." + } + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "POST /api/vendor-portal/dispatches/{id}/request-cancel", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/vendor-portal/dispatches/:id/request-cancel", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "vendor-portal", + "dispatches", + ":id", + "request-cancel" + ], + "variable": [ + { + "key": "id", + "value": "0", + "description": "Required; integer/int32" + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): VendorPortal\nOperation ID: not specified\n\nParameters: path id (required, integer/int32)\nRequest body: application/json, text/json, application/*+json; Illustrative placeholder generated from #/components/schemas/RequestCancelRequest; replace placeholder values before sending.\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending.", + "body": { + "mode": "raw", + "raw": "{\n \"reason\": \"\"\n}", + "options": { + "raw": { + "language": "json" + } + }, + "description": "Illustrative placeholder generated from #/components/schemas/RequestCancelRequest; replace placeholder values before sending." + } + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "POST /api/vendor-portal/dispatches/{id}/signoff", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/vendor-portal/dispatches/:id/signoff", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "vendor-portal", + "dispatches", + ":id", + "signoff" + ], + "variable": [ + { + "key": "id", + "value": "0", + "description": "Required; integer/int32" + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): VendorPortal\nOperation ID: not specified\n\nParameters: path id (required, integer/int32)\nRequest body: application/json, text/json, application/*+json; Illustrative placeholder generated from #/components/schemas/SignoffRequest; replace placeholder values before sending.\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending.", + "body": { + "mode": "raw", + "raw": "{\n \"name\": \"\",\n \"signature\": \"\",\n \"signatureMethod\": \"\",\n \"signoffType\": \"\"\n}", + "options": { + "raw": { + "language": "json" + } + }, + "description": "Illustrative placeholder generated from #/components/schemas/SignoffRequest; replace placeholder values before sending." + } + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "POST /api/vendor-portal/dispatches/{id}/status", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/vendor-portal/dispatches/:id/status", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "vendor-portal", + "dispatches", + ":id", + "status" + ], + "variable": [ + { + "key": "id", + "value": "0", + "description": "Required; integer/int32" + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): VendorPortal\nOperation ID: not specified\n\nParameters: path id (required, integer/int32)\nRequest body: application/json, text/json, application/*+json; Illustrative placeholder generated from #/components/schemas/ChangeStatusRequest; replace placeholder values before sending.\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending.", + "body": { + "mode": "raw", + "raw": "{\n \"status\": \"\"\n}", + "options": { + "raw": { + "language": "json" + } + }, + "description": "Illustrative placeholder generated from #/components/schemas/ChangeStatusRequest; replace placeholder values before sending." + } + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "POST /api/vendor-portal/dispatches/{id}/uplift-request", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/vendor-portal/dispatches/:id/uplift-request", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "vendor-portal", + "dispatches", + ":id", + "uplift-request" + ], + "variable": [ + { + "key": "id", + "value": "0", + "description": "Required; integer/int32" + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): VendorPortal\nOperation ID: not specified\n\nParameters: path id (required, integer/int32)\nRequest body: application/json, text/json, application/*+json; Illustrative placeholder generated from #/components/schemas/UpliftRequestBody; replace placeholder values before sending.\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending.", + "body": { + "mode": "raw", + "raw": "{\n \"requestedNTE\": 0,\n \"reason\": \"\",\n \"requestKey\": \"\",\n \"evidenceDocumentId\": 0\n}", + "options": { + "raw": { + "language": "json" + } + }, + "description": "Illustrative placeholder generated from #/components/schemas/UpliftRequestBody; replace placeholder values before sending." + } + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "POST /api/vendor-portal/dispatches/{id}/uplift-request/{requestId}/cancel", + "request": { + "method": "POST", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/vendor-portal/dispatches/:id/uplift-request/:requestId/cancel", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "vendor-portal", + "dispatches", + ":id", + "uplift-request", + ":requestId", + "cancel" + ], + "variable": [ + { + "key": "id", + "value": "0", + "description": "Required; integer/int32" + }, + { + "key": "requestId", + "value": "0", + "description": "Required; integer/int32" + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): VendorPortal\nOperation ID: not specified\n\nParameters: path id (required, integer/int32); path requestId (required, integer/int32)\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "POST /api/vendor-portal/dispatches/{id}/uplift-request/{requestId}/revise", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/vendor-portal/dispatches/:id/uplift-request/:requestId/revise", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "vendor-portal", + "dispatches", + ":id", + "uplift-request", + ":requestId", + "revise" + ], + "variable": [ + { + "key": "id", + "value": "0", + "description": "Required; integer/int32" + }, + { + "key": "requestId", + "value": "0", + "description": "Required; integer/int32" + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): VendorPortal\nOperation ID: not specified\n\nParameters: path id (required, integer/int32); path requestId (required, integer/int32)\nRequest body: application/json, text/json, application/*+json; Illustrative placeholder generated from #/components/schemas/UpliftRequestBody; replace placeholder values before sending.\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending.", + "body": { + "mode": "raw", + "raw": "{\n \"requestedNTE\": 0,\n \"reason\": \"\",\n \"requestKey\": \"\",\n \"evidenceDocumentId\": 0\n}", + "options": { + "raw": { + "language": "json" + } + }, + "description": "Illustrative placeholder generated from #/components/schemas/UpliftRequestBody; replace placeholder values before sending." + } + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "POST /api/vendor-portal/dispatches/{id}/uplift-request/{requestId}/withdraw", + "request": { + "method": "POST", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/vendor-portal/dispatches/:id/uplift-request/:requestId/withdraw", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "vendor-portal", + "dispatches", + ":id", + "uplift-request", + ":requestId", + "withdraw" + ], + "variable": [ + { + "key": "id", + "value": "0", + "description": "Required; integer/int32" + }, + { + "key": "requestId", + "value": "0", + "description": "Required; integer/int32" + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): VendorPortal\nOperation ID: not specified\n\nParameters: path id (required, integer/int32); path requestId (required, integer/int32)\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "POST /api/vendorportal/dispatches/{id}/accept", + "request": { + "method": "POST", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/vendorportal/dispatches/:id/accept", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "vendorportal", + "dispatches", + ":id", + "accept" + ], + "variable": [ + { + "key": "id", + "value": "0", + "description": "Required; integer/int32" + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): VendorPortal\nOperation ID: not specified\n\nParameters: path id (required, integer/int32)\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "POST /api/vendorportal/dispatches/{id}/checklist/{itemId}", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/vendorportal/dispatches/:id/checklist/:itemId", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "vendorportal", + "dispatches", + ":id", + "checklist", + ":itemId" + ], + "variable": [ + { + "key": "id", + "value": "0", + "description": "Required; integer/int32" + }, + { + "key": "itemId", + "value": "0", + "description": "Required; integer/int32" + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): VendorPortal\nOperation ID: not specified\n\nParameters: path id (required, integer/int32); path itemId (required, integer/int32)\nRequest body: application/json, text/json, application/*+json; Illustrative placeholder generated from #/components/schemas/ChecklistUpdateRequest; replace placeholder values before sending.\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending.", + "body": { + "mode": "raw", + "raw": "{\n \"isCompleted\": false\n}", + "options": { + "raw": { + "language": "json" + } + }, + "description": "Illustrative placeholder generated from #/components/schemas/ChecklistUpdateRequest; replace placeholder values before sending." + } + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "POST /api/vendorportal/dispatches/{id}/comments", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/vendorportal/dispatches/:id/comments", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "vendorportal", + "dispatches", + ":id", + "comments" + ], + "variable": [ + { + "key": "id", + "value": "0", + "description": "Required; integer/int32" + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): VendorPortal\nOperation ID: not specified\n\nParameters: path id (required, integer/int32)\nRequest body: application/json, text/json, application/*+json; Illustrative placeholder generated from #/components/schemas/CommentRequest; replace placeholder values before sending.\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending.", + "body": { + "mode": "raw", + "raw": "{\n \"commentText\": \"\"\n}", + "options": { + "raw": { + "language": "json" + } + }, + "description": "Illustrative placeholder generated from #/components/schemas/CommentRequest; replace placeholder values before sending." + } + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "POST /api/vendorportal/dispatches/{id}/completion-documents", + "request": { + "method": "POST", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/vendorportal/dispatches/:id/completion-documents", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "vendorportal", + "dispatches", + ":id", + "completion-documents" + ], + "variable": [ + { + "key": "id", + "value": "0", + "description": "Required; integer/int32" + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): VendorPortal\nOperation ID: not specified\n\nParameters: path id (required, integer/int32)\nRequest body: multipart/form-data; Illustrative placeholder generated from object; replace placeholder values before sending.\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending.", + "body": { + "mode": "formdata", + "formdata": [ + { + "key": "ContentType", + "type": "text", + "value": "", + "description": "Optional; string" + }, + { + "key": "ContentDisposition", + "type": "text", + "value": "", + "description": "Optional; string" + }, + { + "key": "Headers", + "type": "text", + "value": "[object Object]", + "description": "Optional; object" + }, + { + "key": "Length", + "type": "text", + "value": "0", + "description": "Optional; integer/int64" + }, + { + "key": "Name", + "type": "text", + "value": "", + "description": "Optional; string" + }, + { + "key": "FileName", + "type": "text", + "value": "", + "description": "Optional; string" + }, + { + "key": "replacesDocumentId", + "type": "text", + "value": "0", + "description": "Optional; integer/int32" + }, + { + "key": "purpose", + "type": "text", + "value": "", + "description": "Optional; string" + } + ], + "description": "Illustrative placeholder generated from object; replace placeholder values before sending." + } + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "POST /api/vendorportal/dispatches/{id}/documents", + "request": { + "method": "POST", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/vendorportal/dispatches/:id/documents", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "vendorportal", + "dispatches", + ":id", + "documents" + ], + "variable": [ + { + "key": "id", + "value": "0", + "description": "Required; integer/int32" + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): VendorPortal\nOperation ID: not specified\n\nParameters: path id (required, integer/int32)\nRequest body: multipart/form-data; Illustrative placeholder generated from object; replace placeholder values before sending.\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending.", + "body": { + "mode": "formdata", + "formdata": [ + { + "key": "ContentType", + "type": "text", + "value": "", + "description": "Optional; string" + }, + { + "key": "ContentDisposition", + "type": "text", + "value": "", + "description": "Optional; string" + }, + { + "key": "Headers", + "type": "text", + "value": "[object Object]", + "description": "Optional; object" + }, + { + "key": "Length", + "type": "text", + "value": "0", + "description": "Optional; integer/int64" + }, + { + "key": "Name", + "type": "text", + "value": "", + "description": "Optional; string" + }, + { + "key": "FileName", + "type": "text", + "value": "", + "description": "Optional; string" + }, + { + "key": "replacesDocumentId", + "type": "text", + "value": "0", + "description": "Optional; integer/int32" + }, + { + "key": "purpose", + "type": "text", + "value": "", + "description": "Optional; string" + } + ], + "description": "Illustrative placeholder generated from object; replace placeholder values before sending." + } + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "POST /api/vendorportal/dispatches/{id}/refuse", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/vendorportal/dispatches/:id/refuse", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "vendorportal", + "dispatches", + ":id", + "refuse" + ], + "variable": [ + { + "key": "id", + "value": "0", + "description": "Required; integer/int32" + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): VendorPortal\nOperation ID: not specified\n\nParameters: path id (required, integer/int32)\nRequest body: application/json, text/json, application/*+json; Illustrative placeholder generated from #/components/schemas/RefuseRequest; replace placeholder values before sending.\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending.", + "body": { + "mode": "raw", + "raw": "{\n \"reason\": \"\"\n}", + "options": { + "raw": { + "language": "json" + } + }, + "description": "Illustrative placeholder generated from #/components/schemas/RefuseRequest; replace placeholder values before sending." + } + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "POST /api/vendorportal/dispatches/{id}/request-cancel", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/vendorportal/dispatches/:id/request-cancel", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "vendorportal", + "dispatches", + ":id", + "request-cancel" + ], + "variable": [ + { + "key": "id", + "value": "0", + "description": "Required; integer/int32" + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): VendorPortal\nOperation ID: not specified\n\nParameters: path id (required, integer/int32)\nRequest body: application/json, text/json, application/*+json; Illustrative placeholder generated from #/components/schemas/RequestCancelRequest; replace placeholder values before sending.\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending.", + "body": { + "mode": "raw", + "raw": "{\n \"reason\": \"\"\n}", + "options": { + "raw": { + "language": "json" + } + }, + "description": "Illustrative placeholder generated from #/components/schemas/RequestCancelRequest; replace placeholder values before sending." + } + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "POST /api/vendorportal/dispatches/{id}/signoff", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/vendorportal/dispatches/:id/signoff", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "vendorportal", + "dispatches", + ":id", + "signoff" + ], + "variable": [ + { + "key": "id", + "value": "0", + "description": "Required; integer/int32" + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): VendorPortal\nOperation ID: not specified\n\nParameters: path id (required, integer/int32)\nRequest body: application/json, text/json, application/*+json; Illustrative placeholder generated from #/components/schemas/SignoffRequest; replace placeholder values before sending.\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending.", + "body": { + "mode": "raw", + "raw": "{\n \"name\": \"\",\n \"signature\": \"\",\n \"signatureMethod\": \"\",\n \"signoffType\": \"\"\n}", + "options": { + "raw": { + "language": "json" + } + }, + "description": "Illustrative placeholder generated from #/components/schemas/SignoffRequest; replace placeholder values before sending." + } + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "POST /api/vendorportal/dispatches/{id}/status", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/vendorportal/dispatches/:id/status", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "vendorportal", + "dispatches", + ":id", + "status" + ], + "variable": [ + { + "key": "id", + "value": "0", + "description": "Required; integer/int32" + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): VendorPortal\nOperation ID: not specified\n\nParameters: path id (required, integer/int32)\nRequest body: application/json, text/json, application/*+json; Illustrative placeholder generated from #/components/schemas/ChangeStatusRequest; replace placeholder values before sending.\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending.", + "body": { + "mode": "raw", + "raw": "{\n \"status\": \"\"\n}", + "options": { + "raw": { + "language": "json" + } + }, + "description": "Illustrative placeholder generated from #/components/schemas/ChangeStatusRequest; replace placeholder values before sending." + } + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "POST /api/vendorportal/dispatches/{id}/uplift-request", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/vendorportal/dispatches/:id/uplift-request", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "vendorportal", + "dispatches", + ":id", + "uplift-request" + ], + "variable": [ + { + "key": "id", + "value": "0", + "description": "Required; integer/int32" + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): VendorPortal\nOperation ID: not specified\n\nParameters: path id (required, integer/int32)\nRequest body: application/json, text/json, application/*+json; Illustrative placeholder generated from #/components/schemas/UpliftRequestBody; replace placeholder values before sending.\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending.", + "body": { + "mode": "raw", + "raw": "{\n \"requestedNTE\": 0,\n \"reason\": \"\",\n \"requestKey\": \"\",\n \"evidenceDocumentId\": 0\n}", + "options": { + "raw": { + "language": "json" + } + }, + "description": "Illustrative placeholder generated from #/components/schemas/UpliftRequestBody; replace placeholder values before sending." + } + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "POST /api/vendorportal/dispatches/{id}/uplift-request/{requestId}/cancel", + "request": { + "method": "POST", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/vendorportal/dispatches/:id/uplift-request/:requestId/cancel", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "vendorportal", + "dispatches", + ":id", + "uplift-request", + ":requestId", + "cancel" + ], + "variable": [ + { + "key": "id", + "value": "0", + "description": "Required; integer/int32" + }, + { + "key": "requestId", + "value": "0", + "description": "Required; integer/int32" + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): VendorPortal\nOperation ID: not specified\n\nParameters: path id (required, integer/int32); path requestId (required, integer/int32)\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "POST /api/vendorportal/dispatches/{id}/uplift-request/{requestId}/revise", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/vendorportal/dispatches/:id/uplift-request/:requestId/revise", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "vendorportal", + "dispatches", + ":id", + "uplift-request", + ":requestId", + "revise" + ], + "variable": [ + { + "key": "id", + "value": "0", + "description": "Required; integer/int32" + }, + { + "key": "requestId", + "value": "0", + "description": "Required; integer/int32" + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): VendorPortal\nOperation ID: not specified\n\nParameters: path id (required, integer/int32); path requestId (required, integer/int32)\nRequest body: application/json, text/json, application/*+json; Illustrative placeholder generated from #/components/schemas/UpliftRequestBody; replace placeholder values before sending.\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending.", + "body": { + "mode": "raw", + "raw": "{\n \"requestedNTE\": 0,\n \"reason\": \"\",\n \"requestKey\": \"\",\n \"evidenceDocumentId\": 0\n}", + "options": { + "raw": { + "language": "json" + } + }, + "description": "Illustrative placeholder generated from #/components/schemas/UpliftRequestBody; replace placeholder values before sending." + } + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "POST /api/vendorportal/dispatches/{id}/uplift-request/{requestId}/withdraw", + "request": { + "method": "POST", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/vendorportal/dispatches/:id/uplift-request/:requestId/withdraw", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "vendorportal", + "dispatches", + ":id", + "uplift-request", + ":requestId", + "withdraw" + ], + "variable": [ + { + "key": "id", + "value": "0", + "description": "Required; integer/int32" + }, + { + "key": "requestId", + "value": "0", + "description": "Required; integer/int32" + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): VendorPortal\nOperation ID: not specified\n\nParameters: path id (required, integer/int32); path requestId (required, integer/int32)\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + } + ] + }, + { + "name": "WorkOrder", + "item": [ + { + "name": "DELETE /api/WorkOrder/DeleteWorkorder", + "request": { + "method": "DELETE", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/WorkOrder/DeleteWorkorder", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "WorkOrder", + "DeleteWorkorder" + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): WorkOrder\nOperation ID: not specified\n\nParameters: none\nRequest body: application/json, text/json, application/*+json; Illustrative placeholder generated from #/components/schemas/EditWorkorder_DTO; replace placeholder values before sending.\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending.", + "body": { + "mode": "raw", + "raw": "{\n \"id\": 0,\n \"workerOrderNumber\": \"\",\n \"workerOrderTitle\": \"\",\n \"description\": \"\",\n \"po\": \"\",\n \"tt\": \"\",\n \"assignTo\": \"\",\n \"dueDate\": \"2026-01-01T00:00:00Z\",\n \"priority\": 1,\n \"status\": 1,\n \"locationId\": 0,\n \"problem\": \"\",\n \"trade\": \"\",\n \"subTrade\": \"\",\n \"vendorNTE\": 0,\n \"scheduledDate\": \"2026-01-01T00:00:00Z\",\n \"completedDate\": \"2026-01-01T00:00:00Z\",\n \"source\": \"\",\n \"attachments\": [\n \"\"\n ],\n \"beforPhotoIssue\": \"\",\n \"beforPhotoAttachment\": \"\",\n \"afterPhotoIssue\": \"\",\n \"afterPhotoAttachment\": \"\",\n \"signOffName\": \"\",\n \"signOffAttachment\": \"\",\n \"signOffSignature\": \"\",\n \"contactIds\": [\n 0\n ],\n \"categoryIds\": [\n 0\n ]\n}", + "options": { + "raw": { + "language": "json" + } + }, + "description": "Illustrative placeholder generated from #/components/schemas/EditWorkorder_DTO; replace placeholder values before sending." + } + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "DELETE /api/workorders/DeleteWorkorder", + "request": { + "method": "DELETE", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/workorders/DeleteWorkorder", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "workorders", + "DeleteWorkorder" + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): WorkOrder\nOperation ID: not specified\n\nParameters: none\nRequest body: application/json, text/json, application/*+json; Illustrative placeholder generated from #/components/schemas/EditWorkorder_DTO; replace placeholder values before sending.\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending.", + "body": { + "mode": "raw", + "raw": "{\n \"id\": 0,\n \"workerOrderNumber\": \"\",\n \"workerOrderTitle\": \"\",\n \"description\": \"\",\n \"po\": \"\",\n \"tt\": \"\",\n \"assignTo\": \"\",\n \"dueDate\": \"2026-01-01T00:00:00Z\",\n \"priority\": 1,\n \"status\": 1,\n \"locationId\": 0,\n \"problem\": \"\",\n \"trade\": \"\",\n \"subTrade\": \"\",\n \"vendorNTE\": 0,\n \"scheduledDate\": \"2026-01-01T00:00:00Z\",\n \"completedDate\": \"2026-01-01T00:00:00Z\",\n \"source\": \"\",\n \"attachments\": [\n \"\"\n ],\n \"beforPhotoIssue\": \"\",\n \"beforPhotoAttachment\": \"\",\n \"afterPhotoIssue\": \"\",\n \"afterPhotoAttachment\": \"\",\n \"signOffName\": \"\",\n \"signOffAttachment\": \"\",\n \"signOffSignature\": \"\",\n \"contactIds\": [\n 0\n ],\n \"categoryIds\": [\n 0\n ]\n}", + "options": { + "raw": { + "language": "json" + } + }, + "description": "Illustrative placeholder generated from #/components/schemas/EditWorkorder_DTO; replace placeholder values before sending." + } + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "GET /api/WorkOrder/{id}", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/WorkOrder/:id", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "WorkOrder", + ":id" + ], + "variable": [ + { + "key": "id", + "value": "0", + "description": "Required; integer/int32" + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): WorkOrder\nOperation ID: not specified\n\nParameters: path id (required, integer/int32)\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "GET /api/WorkOrder/GetComments", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/WorkOrder/GetComments", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "WorkOrder", + "GetComments" + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): WorkOrder\nOperation ID: not specified\n\nParameters: none\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "GET /api/WorkOrder/GetCommentsByWorkorderId", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/WorkOrder/GetCommentsByWorkorderId?woid=0", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "WorkOrder", + "GetCommentsByWorkorderId" + ], + "query": [ + { + "key": "woid", + "value": "0", + "description": "Optional; integer/int32", + "disabled": false + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): WorkOrder\nOperation ID: not specified\n\nParameters: query woid (optional, integer/int32)\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "GET /api/WorkOrder/GetFilteredWorkorder", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/WorkOrder/GetFilteredWorkorder?assignto=&location=&priority=&status=&duedate=&search=&sort=&sortby=&page=0&pageSize=0", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "WorkOrder", + "GetFilteredWorkorder" + ], + "query": [ + { + "key": "assignto", + "value": "", + "description": "Optional; array", + "disabled": false + }, + { + "key": "location", + "value": "", + "description": "Optional; array", + "disabled": false + }, + { + "key": "priority", + "value": "", + "description": "Optional; array", + "disabled": false + }, + { + "key": "status", + "value": "", + "description": "Optional; array", + "disabled": false + }, + { + "key": "duedate", + "value": "", + "description": "Optional; array", + "disabled": false + }, + { + "key": "search", + "value": "", + "description": "Optional; string", + "disabled": false + }, + { + "key": "sort", + "value": "", + "description": "Optional; string", + "disabled": false + }, + { + "key": "sortby", + "value": "", + "description": "Optional; string", + "disabled": false + }, + { + "key": "page", + "value": "0", + "description": "Optional; integer/int32", + "disabled": false + }, + { + "key": "pageSize", + "value": "0", + "description": "Optional; integer/int32", + "disabled": false + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): WorkOrder\nOperation ID: not specified\n\nParameters: query assignto (optional, array); query location (optional, array); query priority (optional, array); query status (optional, array); query duedate (optional, array); query search (optional, string); query sort (optional, string); query sortby (optional, string); query page (optional, integer/int32); query pageSize (optional, integer/int32)\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "GET /api/WorkOrder/GetFilteredWorkorder2", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/WorkOrder/GetFilteredWorkorder2?assignto=&location=&priority=&status=&duedate=&search=&sort=&sortby=&page=0&pageSize=0", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "WorkOrder", + "GetFilteredWorkorder2" + ], + "query": [ + { + "key": "assignto", + "value": "", + "description": "Optional; array", + "disabled": false + }, + { + "key": "location", + "value": "", + "description": "Optional; array", + "disabled": false + }, + { + "key": "priority", + "value": "", + "description": "Optional; array", + "disabled": false + }, + { + "key": "status", + "value": "", + "description": "Optional; array", + "disabled": false + }, + { + "key": "duedate", + "value": "", + "description": "Optional; array", + "disabled": false + }, + { + "key": "search", + "value": "", + "description": "Optional; string", + "disabled": false + }, + { + "key": "sort", + "value": "", + "description": "Optional; string", + "disabled": false + }, + { + "key": "sortby", + "value": "", + "description": "Optional; string", + "disabled": false + }, + { + "key": "page", + "value": "0", + "description": "Optional; integer/int32", + "disabled": false + }, + { + "key": "pageSize", + "value": "0", + "description": "Optional; integer/int32", + "disabled": false + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): WorkOrder\nOperation ID: not specified\n\nParameters: query assignto (optional, array); query location (optional, array); query priority (optional, array); query status (optional, array); query duedate (optional, array); query search (optional, string); query sort (optional, string); query sortby (optional, string); query page (optional, integer/int32); query pageSize (optional, integer/int32)\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "GET /api/WorkOrder/GetWorkorderById", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/WorkOrder/GetWorkorderById", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "WorkOrder", + "GetWorkorderById" + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): WorkOrder\nOperation ID: not specified\n\nParameters: none\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "GET /api/WorkOrder/GetWorkOrderList", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/WorkOrder/GetWorkOrderList?search=&page=0&pageSize=0&sortBy=&sortDir=&status=&assignee=&locationId=0", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "WorkOrder", + "GetWorkOrderList" + ], + "query": [ + { + "key": "search", + "value": "", + "description": "Optional; string", + "disabled": false + }, + { + "key": "page", + "value": "0", + "description": "Optional; integer/int32", + "disabled": false + }, + { + "key": "pageSize", + "value": "0", + "description": "Optional; integer/int32", + "disabled": false + }, + { + "key": "sortBy", + "value": "", + "description": "Optional; string", + "disabled": false + }, + { + "key": "sortDir", + "value": "", + "description": "Optional; string", + "disabled": false + }, + { + "key": "status", + "value": "", + "description": "Optional; string", + "disabled": false + }, + { + "key": "assignee", + "value": "", + "description": "Optional; string", + "disabled": false + }, + { + "key": "locationId", + "value": "0", + "description": "Optional; integer/int32", + "disabled": false + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): WorkOrder\nOperation ID: not specified\n\nParameters: query search (optional, string); query page (optional, integer/int32); query pageSize (optional, integer/int32); query sortBy (optional, string); query sortDir (optional, string); query status (optional, string); query assignee (optional, string); query locationId (optional, integer/int32)\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "GET /api/WorkOrder/Getworkorders", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/WorkOrder/Getworkorders", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "WorkOrder", + "Getworkorders" + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): WorkOrder\nOperation ID: not specified\n\nParameters: none\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "GET /api/WorkOrder/GetworkordersDD", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/WorkOrder/GetworkordersDD", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "WorkOrder", + "GetworkordersDD" + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): WorkOrder\nOperation ID: not specified\n\nParameters: none\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "GET /api/workorders/{id}", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/workorders/:id", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "workorders", + ":id" + ], + "variable": [ + { + "key": "id", + "value": "0", + "description": "Required; integer/int32" + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): WorkOrder\nOperation ID: not specified\n\nParameters: path id (required, integer/int32)\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "GET /api/workorders/GetComments", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/workorders/GetComments", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "workorders", + "GetComments" + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): WorkOrder\nOperation ID: not specified\n\nParameters: none\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "GET /api/workorders/GetCommentsByWorkorderId", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/workorders/GetCommentsByWorkorderId?woid=0", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "workorders", + "GetCommentsByWorkorderId" + ], + "query": [ + { + "key": "woid", + "value": "0", + "description": "Optional; integer/int32", + "disabled": false + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): WorkOrder\nOperation ID: not specified\n\nParameters: query woid (optional, integer/int32)\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "GET /api/workorders/GetFilteredWorkorder", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/workorders/GetFilteredWorkorder?assignto=&location=&priority=&status=&duedate=&search=&sort=&sortby=&page=0&pageSize=0", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "workorders", + "GetFilteredWorkorder" + ], + "query": [ + { + "key": "assignto", + "value": "", + "description": "Optional; array", + "disabled": false + }, + { + "key": "location", + "value": "", + "description": "Optional; array", + "disabled": false + }, + { + "key": "priority", + "value": "", + "description": "Optional; array", + "disabled": false + }, + { + "key": "status", + "value": "", + "description": "Optional; array", + "disabled": false + }, + { + "key": "duedate", + "value": "", + "description": "Optional; array", + "disabled": false + }, + { + "key": "search", + "value": "", + "description": "Optional; string", + "disabled": false + }, + { + "key": "sort", + "value": "", + "description": "Optional; string", + "disabled": false + }, + { + "key": "sortby", + "value": "", + "description": "Optional; string", + "disabled": false + }, + { + "key": "page", + "value": "0", + "description": "Optional; integer/int32", + "disabled": false + }, + { + "key": "pageSize", + "value": "0", + "description": "Optional; integer/int32", + "disabled": false + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): WorkOrder\nOperation ID: not specified\n\nParameters: query assignto (optional, array); query location (optional, array); query priority (optional, array); query status (optional, array); query duedate (optional, array); query search (optional, string); query sort (optional, string); query sortby (optional, string); query page (optional, integer/int32); query pageSize (optional, integer/int32)\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "GET /api/workorders/GetFilteredWorkorder2", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/workorders/GetFilteredWorkorder2?assignto=&location=&priority=&status=&duedate=&search=&sort=&sortby=&page=0&pageSize=0", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "workorders", + "GetFilteredWorkorder2" + ], + "query": [ + { + "key": "assignto", + "value": "", + "description": "Optional; array", + "disabled": false + }, + { + "key": "location", + "value": "", + "description": "Optional; array", + "disabled": false + }, + { + "key": "priority", + "value": "", + "description": "Optional; array", + "disabled": false + }, + { + "key": "status", + "value": "", + "description": "Optional; array", + "disabled": false + }, + { + "key": "duedate", + "value": "", + "description": "Optional; array", + "disabled": false + }, + { + "key": "search", + "value": "", + "description": "Optional; string", + "disabled": false + }, + { + "key": "sort", + "value": "", + "description": "Optional; string", + "disabled": false + }, + { + "key": "sortby", + "value": "", + "description": "Optional; string", + "disabled": false + }, + { + "key": "page", + "value": "0", + "description": "Optional; integer/int32", + "disabled": false + }, + { + "key": "pageSize", + "value": "0", + "description": "Optional; integer/int32", + "disabled": false + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): WorkOrder\nOperation ID: not specified\n\nParameters: query assignto (optional, array); query location (optional, array); query priority (optional, array); query status (optional, array); query duedate (optional, array); query search (optional, string); query sort (optional, string); query sortby (optional, string); query page (optional, integer/int32); query pageSize (optional, integer/int32)\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "GET /api/workorders/GetWorkorderById", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/workorders/GetWorkorderById", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "workorders", + "GetWorkorderById" + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): WorkOrder\nOperation ID: not specified\n\nParameters: none\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "GET /api/workorders/GetWorkOrderList", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/workorders/GetWorkOrderList?search=&page=0&pageSize=0&sortBy=&sortDir=&status=&assignee=&locationId=0", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "workorders", + "GetWorkOrderList" + ], + "query": [ + { + "key": "search", + "value": "", + "description": "Optional; string", + "disabled": false + }, + { + "key": "page", + "value": "0", + "description": "Optional; integer/int32", + "disabled": false + }, + { + "key": "pageSize", + "value": "0", + "description": "Optional; integer/int32", + "disabled": false + }, + { + "key": "sortBy", + "value": "", + "description": "Optional; string", + "disabled": false + }, + { + "key": "sortDir", + "value": "", + "description": "Optional; string", + "disabled": false + }, + { + "key": "status", + "value": "", + "description": "Optional; string", + "disabled": false + }, + { + "key": "assignee", + "value": "", + "description": "Optional; string", + "disabled": false + }, + { + "key": "locationId", + "value": "0", + "description": "Optional; integer/int32", + "disabled": false + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): WorkOrder\nOperation ID: not specified\n\nParameters: query search (optional, string); query page (optional, integer/int32); query pageSize (optional, integer/int32); query sortBy (optional, string); query sortDir (optional, string); query status (optional, string); query assignee (optional, string); query locationId (optional, integer/int32)\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "GET /api/workorders/Getworkorders", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/workorders/Getworkorders", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "workorders", + "Getworkorders" + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): WorkOrder\nOperation ID: not specified\n\nParameters: none\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "GET /api/workorders/GetworkordersDD", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/workorders/GetworkordersDD", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "workorders", + "GetworkordersDD" + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): WorkOrder\nOperation ID: not specified\n\nParameters: none\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "POST /api/WorkOrder/AddComment", + "request": { + "method": "POST", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/WorkOrder/AddComment", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "WorkOrder", + "AddComment" + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): WorkOrder\nOperation ID: not specified\n\nParameters: none\nRequest body: multipart/form-data; Illustrative placeholder generated from object; replace placeholder values before sending.\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending.", + "body": { + "mode": "formdata", + "formdata": [ + { + "key": "Text", + "type": "text", + "value": "", + "description": "Optional; string" + }, + { + "key": "Document", + "type": "file", + "src": "", + "description": "Optional; string/binary" + }, + { + "key": "WorkorderId", + "type": "text", + "value": "0", + "description": "Optional; integer/int32" + }, + { + "key": "CreatedDate", + "type": "text", + "value": "2026-01-01T00:00:00Z", + "description": "Optional; string/date-time" + }, + { + "key": "UserId", + "type": "text", + "value": "", + "description": "Optional; string" + }, + { + "key": "CommentType", + "type": "text", + "value": "", + "description": "Optional; string" + } + ], + "description": "Illustrative placeholder generated from object; replace placeholder values before sending." + } + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "POST /api/WorkOrder/AddCommentJson", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/WorkOrder/AddCommentJson", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "WorkOrder", + "AddCommentJson" + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): WorkOrder\nOperation ID: not specified\n\nParameters: none\nRequest body: application/json, text/json, application/*+json; Illustrative placeholder generated from #/components/schemas/Comments_DTO; replace placeholder values before sending.\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending.", + "body": { + "mode": "raw", + "raw": "{\n \"text\": \"\",\n \"document\": \"\",\n \"workorderId\": 0,\n \"createdDate\": \"2026-01-01T00:00:00Z\",\n \"userId\": \"\",\n \"commentType\": \"\"\n}", + "options": { + "raw": { + "language": "json" + } + }, + "description": "Illustrative placeholder generated from #/components/schemas/Comments_DTO; replace placeholder values before sending." + } + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "POST /api/WorkOrder/AddWorkorder", + "request": { + "method": "POST", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/WorkOrder/AddWorkorder", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "WorkOrder", + "AddWorkorder" + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): WorkOrder\nOperation ID: not specified\n\nParameters: none\nRequest body: multipart/form-data; Illustrative placeholder generated from object; replace placeholder values before sending.\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending.", + "body": { + "mode": "formdata", + "formdata": [ + { + "key": "WorkerOrderNumber", + "type": "text", + "value": "", + "description": "Optional; string" + }, + { + "key": "WorkerOrderTitle", + "type": "text", + "value": "", + "description": "Optional; string" + }, + { + "key": "Description", + "type": "text", + "value": "", + "description": "Optional; string" + }, + { + "key": "PO", + "type": "text", + "value": "", + "description": "Optional; string" + }, + { + "key": "TT", + "type": "text", + "value": "", + "description": "Optional; string" + }, + { + "key": "AssignTo", + "type": "text", + "value": "", + "description": "Optional; string" + }, + { + "key": "DueDate", + "type": "text", + "value": "2026-01-01T00:00:00Z", + "description": "Optional; string/date-time" + }, + { + "key": "Priority", + "type": "text", + "value": "1", + "description": "Optional; #/components/schemas/WorkOrderPriority" + }, + { + "key": "LocationId", + "type": "text", + "value": "0", + "description": "Optional; integer/int32" + }, + { + "key": "istemplate", + "type": "text", + "value": "false", + "description": "Optional; boolean" + }, + { + "key": "Attachments", + "type": "text", + "value": "", + "description": "Optional; array" + }, + { + "key": "BeforPhotoIssue", + "type": "text", + "value": "", + "description": "Optional; string" + }, + { + "key": "BeforPhotoAttachment", + "type": "file", + "src": "", + "description": "Optional; string/binary" + }, + { + "key": "AfterPhotoIssue", + "type": "text", + "value": "", + "description": "Optional; string" + }, + { + "key": "AfterPhotoAttachment", + "type": "file", + "src": "", + "description": "Optional; string/binary" + }, + { + "key": "SignOffName", + "type": "text", + "value": "", + "description": "Optional; string" + }, + { + "key": "SignOffAttachment", + "type": "file", + "src": "", + "description": "Optional; string/binary" + }, + { + "key": "SignOffSignature", + "type": "text", + "value": "", + "description": "Optional; string" + }, + { + "key": "ContactIds", + "type": "text", + "value": "0", + "description": "Optional; array" + }, + { + "key": "CategoryIds", + "type": "text", + "value": "0", + "description": "Optional; array" + }, + { + "key": "Customer", + "type": "text", + "value": "", + "description": "Optional; string" + } + ], + "description": "Illustrative placeholder generated from object; replace placeholder values before sending." + } + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "POST /api/WorkOrder/ChangeAssignment", + "request": { + "method": "POST", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/WorkOrder/ChangeAssignment?id=0&assignTo=", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "WorkOrder", + "ChangeAssignment" + ], + "query": [ + { + "key": "id", + "value": "0", + "description": "Optional; integer/int32", + "disabled": false + }, + { + "key": "assignTo", + "value": "", + "description": "Optional; string", + "disabled": false + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): WorkOrder\nOperation ID: not specified\n\nParameters: query id (optional, integer/int32); query assignTo (optional, string)\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "POST /api/WorkOrder/ChangeStatus", + "request": { + "method": "POST", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/WorkOrder/ChangeStatus?id=0&status=", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "WorkOrder", + "ChangeStatus" + ], + "query": [ + { + "key": "id", + "value": "0", + "description": "Optional; integer/int32", + "disabled": false + }, + { + "key": "status", + "value": "", + "description": "Optional; string", + "disabled": false + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): WorkOrder\nOperation ID: not specified\n\nParameters: query id (optional, integer/int32); query status (optional, string)\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "POST /api/WorkOrder/EditWorkorder", + "request": { + "method": "POST", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/WorkOrder/EditWorkorder", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "WorkOrder", + "EditWorkorder" + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): WorkOrder\nOperation ID: not specified\n\nParameters: none\nRequest body: multipart/form-data; Illustrative placeholder generated from object; replace placeholder values before sending.\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending.", + "body": { + "mode": "formdata", + "formdata": [ + { + "key": "Id", + "type": "text", + "value": "0", + "description": "Optional; integer/int32" + }, + { + "key": "WorkerOrderNumber", + "type": "text", + "value": "", + "description": "Optional; string" + }, + { + "key": "WorkerOrderTitle", + "type": "text", + "value": "", + "description": "Optional; string" + }, + { + "key": "Description", + "type": "text", + "value": "", + "description": "Optional; string" + }, + { + "key": "PO", + "type": "text", + "value": "", + "description": "Optional; string" + }, + { + "key": "TT", + "type": "text", + "value": "", + "description": "Optional; string" + }, + { + "key": "AssignTo", + "type": "text", + "value": "", + "description": "Optional; string" + }, + { + "key": "DueDate", + "type": "text", + "value": "2026-01-01T00:00:00Z", + "description": "Optional; string/date-time" + }, + { + "key": "Priority", + "type": "text", + "value": "1", + "description": "Optional; #/components/schemas/WorkOrderPriority" + }, + { + "key": "Status", + "type": "text", + "value": "1", + "description": "Optional; #/components/schemas/WorkOrderStatus" + }, + { + "key": "LocationId", + "type": "text", + "value": "0", + "description": "Optional; integer/int32" + }, + { + "key": "Problem", + "type": "text", + "value": "", + "description": "Optional; string" + }, + { + "key": "Trade", + "type": "text", + "value": "", + "description": "Optional; string" + }, + { + "key": "SubTrade", + "type": "text", + "value": "", + "description": "Optional; string" + }, + { + "key": "VendorNTE", + "type": "text", + "value": "0", + "description": "Optional; number/double" + }, + { + "key": "ScheduledDate", + "type": "text", + "value": "2026-01-01T00:00:00Z", + "description": "Optional; string/date-time" + }, + { + "key": "CompletedDate", + "type": "text", + "value": "2026-01-01T00:00:00Z", + "description": "Optional; string/date-time" + }, + { + "key": "Source", + "type": "text", + "value": "", + "description": "Optional; string" + }, + { + "key": "Attachments", + "type": "text", + "value": "", + "description": "Optional; array" + }, + { + "key": "BeforPhotoIssue", + "type": "text", + "value": "", + "description": "Optional; string" + }, + { + "key": "BeforPhotoAttachment", + "type": "file", + "src": "", + "description": "Optional; string/binary" + }, + { + "key": "AfterPhotoIssue", + "type": "text", + "value": "", + "description": "Optional; string" + }, + { + "key": "AfterPhotoAttachment", + "type": "file", + "src": "", + "description": "Optional; string/binary" + }, + { + "key": "SignOffName", + "type": "text", + "value": "", + "description": "Optional; string" + }, + { + "key": "SignOffAttachment", + "type": "file", + "src": "", + "description": "Optional; string/binary" + }, + { + "key": "SignOffSignature", + "type": "text", + "value": "", + "description": "Optional; string" + }, + { + "key": "ContactIds", + "type": "text", + "value": "0", + "description": "Optional; array" + }, + { + "key": "CategoryIds", + "type": "text", + "value": "0", + "description": "Optional; array" + } + ], + "description": "Illustrative placeholder generated from object; replace placeholder values before sending." + } + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "POST /api/workorders/AddComment", + "request": { + "method": "POST", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/workorders/AddComment", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "workorders", + "AddComment" + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): WorkOrder\nOperation ID: not specified\n\nParameters: none\nRequest body: multipart/form-data; Illustrative placeholder generated from object; replace placeholder values before sending.\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending.", + "body": { + "mode": "formdata", + "formdata": [ + { + "key": "Text", + "type": "text", + "value": "", + "description": "Optional; string" + }, + { + "key": "Document", + "type": "file", + "src": "", + "description": "Optional; string/binary" + }, + { + "key": "WorkorderId", + "type": "text", + "value": "0", + "description": "Optional; integer/int32" + }, + { + "key": "CreatedDate", + "type": "text", + "value": "2026-01-01T00:00:00Z", + "description": "Optional; string/date-time" + }, + { + "key": "UserId", + "type": "text", + "value": "", + "description": "Optional; string" + }, + { + "key": "CommentType", + "type": "text", + "value": "", + "description": "Optional; string" + } + ], + "description": "Illustrative placeholder generated from object; replace placeholder values before sending." + } + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "POST /api/workorders/AddCommentJson", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/workorders/AddCommentJson", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "workorders", + "AddCommentJson" + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): WorkOrder\nOperation ID: not specified\n\nParameters: none\nRequest body: application/json, text/json, application/*+json; Illustrative placeholder generated from #/components/schemas/Comments_DTO; replace placeholder values before sending.\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending.", + "body": { + "mode": "raw", + "raw": "{\n \"text\": \"\",\n \"document\": \"\",\n \"workorderId\": 0,\n \"createdDate\": \"2026-01-01T00:00:00Z\",\n \"userId\": \"\",\n \"commentType\": \"\"\n}", + "options": { + "raw": { + "language": "json" + } + }, + "description": "Illustrative placeholder generated from #/components/schemas/Comments_DTO; replace placeholder values before sending." + } + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "POST /api/workorders/AddWorkorder", + "request": { + "method": "POST", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/workorders/AddWorkorder", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "workorders", + "AddWorkorder" + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): WorkOrder\nOperation ID: not specified\n\nParameters: none\nRequest body: multipart/form-data; Illustrative placeholder generated from object; replace placeholder values before sending.\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending.", + "body": { + "mode": "formdata", + "formdata": [ + { + "key": "WorkerOrderNumber", + "type": "text", + "value": "", + "description": "Optional; string" + }, + { + "key": "WorkerOrderTitle", + "type": "text", + "value": "", + "description": "Optional; string" + }, + { + "key": "Description", + "type": "text", + "value": "", + "description": "Optional; string" + }, + { + "key": "PO", + "type": "text", + "value": "", + "description": "Optional; string" + }, + { + "key": "TT", + "type": "text", + "value": "", + "description": "Optional; string" + }, + { + "key": "AssignTo", + "type": "text", + "value": "", + "description": "Optional; string" + }, + { + "key": "DueDate", + "type": "text", + "value": "2026-01-01T00:00:00Z", + "description": "Optional; string/date-time" + }, + { + "key": "Priority", + "type": "text", + "value": "1", + "description": "Optional; #/components/schemas/WorkOrderPriority" + }, + { + "key": "LocationId", + "type": "text", + "value": "0", + "description": "Optional; integer/int32" + }, + { + "key": "istemplate", + "type": "text", + "value": "false", + "description": "Optional; boolean" + }, + { + "key": "Attachments", + "type": "text", + "value": "", + "description": "Optional; array" + }, + { + "key": "BeforPhotoIssue", + "type": "text", + "value": "", + "description": "Optional; string" + }, + { + "key": "BeforPhotoAttachment", + "type": "file", + "src": "", + "description": "Optional; string/binary" + }, + { + "key": "AfterPhotoIssue", + "type": "text", + "value": "", + "description": "Optional; string" + }, + { + "key": "AfterPhotoAttachment", + "type": "file", + "src": "", + "description": "Optional; string/binary" + }, + { + "key": "SignOffName", + "type": "text", + "value": "", + "description": "Optional; string" + }, + { + "key": "SignOffAttachment", + "type": "file", + "src": "", + "description": "Optional; string/binary" + }, + { + "key": "SignOffSignature", + "type": "text", + "value": "", + "description": "Optional; string" + }, + { + "key": "ContactIds", + "type": "text", + "value": "0", + "description": "Optional; array" + }, + { + "key": "CategoryIds", + "type": "text", + "value": "0", + "description": "Optional; array" + }, + { + "key": "Customer", + "type": "text", + "value": "", + "description": "Optional; string" + } + ], + "description": "Illustrative placeholder generated from object; replace placeholder values before sending." + } + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "POST /api/workorders/ChangeAssignment", + "request": { + "method": "POST", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/workorders/ChangeAssignment?id=0&assignTo=", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "workorders", + "ChangeAssignment" + ], + "query": [ + { + "key": "id", + "value": "0", + "description": "Optional; integer/int32", + "disabled": false + }, + { + "key": "assignTo", + "value": "", + "description": "Optional; string", + "disabled": false + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): WorkOrder\nOperation ID: not specified\n\nParameters: query id (optional, integer/int32); query assignTo (optional, string)\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "POST /api/workorders/ChangeStatus", + "request": { + "method": "POST", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/workorders/ChangeStatus?id=0&status=", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "workorders", + "ChangeStatus" + ], + "query": [ + { + "key": "id", + "value": "0", + "description": "Optional; integer/int32", + "disabled": false + }, + { + "key": "status", + "value": "", + "description": "Optional; string", + "disabled": false + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): WorkOrder\nOperation ID: not specified\n\nParameters: query id (optional, integer/int32); query status (optional, string)\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "POST /api/workorders/EditWorkorder", + "request": { + "method": "POST", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/workorders/EditWorkorder", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "workorders", + "EditWorkorder" + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): WorkOrder\nOperation ID: not specified\n\nParameters: none\nRequest body: multipart/form-data; Illustrative placeholder generated from object; replace placeholder values before sending.\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending.", + "body": { + "mode": "formdata", + "formdata": [ + { + "key": "Id", + "type": "text", + "value": "0", + "description": "Optional; integer/int32" + }, + { + "key": "WorkerOrderNumber", + "type": "text", + "value": "", + "description": "Optional; string" + }, + { + "key": "WorkerOrderTitle", + "type": "text", + "value": "", + "description": "Optional; string" + }, + { + "key": "Description", + "type": "text", + "value": "", + "description": "Optional; string" + }, + { + "key": "PO", + "type": "text", + "value": "", + "description": "Optional; string" + }, + { + "key": "TT", + "type": "text", + "value": "", + "description": "Optional; string" + }, + { + "key": "AssignTo", + "type": "text", + "value": "", + "description": "Optional; string" + }, + { + "key": "DueDate", + "type": "text", + "value": "2026-01-01T00:00:00Z", + "description": "Optional; string/date-time" + }, + { + "key": "Priority", + "type": "text", + "value": "1", + "description": "Optional; #/components/schemas/WorkOrderPriority" + }, + { + "key": "Status", + "type": "text", + "value": "1", + "description": "Optional; #/components/schemas/WorkOrderStatus" + }, + { + "key": "LocationId", + "type": "text", + "value": "0", + "description": "Optional; integer/int32" + }, + { + "key": "Problem", + "type": "text", + "value": "", + "description": "Optional; string" + }, + { + "key": "Trade", + "type": "text", + "value": "", + "description": "Optional; string" + }, + { + "key": "SubTrade", + "type": "text", + "value": "", + "description": "Optional; string" + }, + { + "key": "VendorNTE", + "type": "text", + "value": "0", + "description": "Optional; number/double" + }, + { + "key": "ScheduledDate", + "type": "text", + "value": "2026-01-01T00:00:00Z", + "description": "Optional; string/date-time" + }, + { + "key": "CompletedDate", + "type": "text", + "value": "2026-01-01T00:00:00Z", + "description": "Optional; string/date-time" + }, + { + "key": "Source", + "type": "text", + "value": "", + "description": "Optional; string" + }, + { + "key": "Attachments", + "type": "text", + "value": "", + "description": "Optional; array" + }, + { + "key": "BeforPhotoIssue", + "type": "text", + "value": "", + "description": "Optional; string" + }, + { + "key": "BeforPhotoAttachment", + "type": "file", + "src": "", + "description": "Optional; string/binary" + }, + { + "key": "AfterPhotoIssue", + "type": "text", + "value": "", + "description": "Optional; string" + }, + { + "key": "AfterPhotoAttachment", + "type": "file", + "src": "", + "description": "Optional; string/binary" + }, + { + "key": "SignOffName", + "type": "text", + "value": "", + "description": "Optional; string" + }, + { + "key": "SignOffAttachment", + "type": "file", + "src": "", + "description": "Optional; string/binary" + }, + { + "key": "SignOffSignature", + "type": "text", + "value": "", + "description": "Optional; string" + }, + { + "key": "ContactIds", + "type": "text", + "value": "0", + "description": "Optional; array" + }, + { + "key": "CategoryIds", + "type": "text", + "value": "0", + "description": "Optional; array" + } + ], + "description": "Illustrative placeholder generated from object; replace placeholder values before sending." + } + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "PUT /api/WorkOrder/{id}", + "request": { + "method": "PUT", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/WorkOrder/:id", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "WorkOrder", + ":id" + ], + "variable": [ + { + "key": "id", + "value": "", + "description": "Required; string" + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): WorkOrder\nOperation ID: not specified\n\nParameters: path id (required, string)\nRequest body: multipart/form-data; Illustrative placeholder generated from object; replace placeholder values before sending.\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending.", + "body": { + "mode": "formdata", + "formdata": [ + { + "key": "Id", + "type": "text", + "value": "0", + "description": "Optional; integer/int32" + }, + { + "key": "WorkerOrderNumber", + "type": "text", + "value": "", + "description": "Optional; string" + }, + { + "key": "WorkerOrderTitle", + "type": "text", + "value": "", + "description": "Optional; string" + }, + { + "key": "Description", + "type": "text", + "value": "", + "description": "Optional; string" + }, + { + "key": "PO", + "type": "text", + "value": "", + "description": "Optional; string" + }, + { + "key": "TT", + "type": "text", + "value": "", + "description": "Optional; string" + }, + { + "key": "AssignTo", + "type": "text", + "value": "", + "description": "Optional; string" + }, + { + "key": "DueDate", + "type": "text", + "value": "2026-01-01T00:00:00Z", + "description": "Optional; string/date-time" + }, + { + "key": "Priority", + "type": "text", + "value": "1", + "description": "Optional; #/components/schemas/WorkOrderPriority" + }, + { + "key": "Status", + "type": "text", + "value": "1", + "description": "Optional; #/components/schemas/WorkOrderStatus" + }, + { + "key": "LocationId", + "type": "text", + "value": "0", + "description": "Optional; integer/int32" + }, + { + "key": "Problem", + "type": "text", + "value": "", + "description": "Optional; string" + }, + { + "key": "Trade", + "type": "text", + "value": "", + "description": "Optional; string" + }, + { + "key": "SubTrade", + "type": "text", + "value": "", + "description": "Optional; string" + }, + { + "key": "VendorNTE", + "type": "text", + "value": "0", + "description": "Optional; number/double" + }, + { + "key": "ScheduledDate", + "type": "text", + "value": "2026-01-01T00:00:00Z", + "description": "Optional; string/date-time" + }, + { + "key": "CompletedDate", + "type": "text", + "value": "2026-01-01T00:00:00Z", + "description": "Optional; string/date-time" + }, + { + "key": "Source", + "type": "text", + "value": "", + "description": "Optional; string" + }, + { + "key": "Attachments", + "type": "text", + "value": "", + "description": "Optional; array" + }, + { + "key": "BeforPhotoIssue", + "type": "text", + "value": "", + "description": "Optional; string" + }, + { + "key": "BeforPhotoAttachment", + "type": "file", + "src": "", + "description": "Optional; string/binary" + }, + { + "key": "AfterPhotoIssue", + "type": "text", + "value": "", + "description": "Optional; string" + }, + { + "key": "AfterPhotoAttachment", + "type": "file", + "src": "", + "description": "Optional; string/binary" + }, + { + "key": "SignOffName", + "type": "text", + "value": "", + "description": "Optional; string" + }, + { + "key": "SignOffAttachment", + "type": "file", + "src": "", + "description": "Optional; string/binary" + }, + { + "key": "SignOffSignature", + "type": "text", + "value": "", + "description": "Optional; string" + }, + { + "key": "ContactIds", + "type": "text", + "value": "0", + "description": "Optional; array" + }, + { + "key": "CategoryIds", + "type": "text", + "value": "0", + "description": "Optional; array" + } + ], + "description": "Illustrative placeholder generated from object; replace placeholder values before sending." + } + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "PUT /api/workorders/{id}", + "request": { + "method": "PUT", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/workorders/:id", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "workorders", + ":id" + ], + "variable": [ + { + "key": "id", + "value": "", + "description": "Required; string" + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): WorkOrder\nOperation ID: not specified\n\nParameters: path id (required, string)\nRequest body: multipart/form-data; Illustrative placeholder generated from object; replace placeholder values before sending.\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending.", + "body": { + "mode": "formdata", + "formdata": [ + { + "key": "Id", + "type": "text", + "value": "0", + "description": "Optional; integer/int32" + }, + { + "key": "WorkerOrderNumber", + "type": "text", + "value": "", + "description": "Optional; string" + }, + { + "key": "WorkerOrderTitle", + "type": "text", + "value": "", + "description": "Optional; string" + }, + { + "key": "Description", + "type": "text", + "value": "", + "description": "Optional; string" + }, + { + "key": "PO", + "type": "text", + "value": "", + "description": "Optional; string" + }, + { + "key": "TT", + "type": "text", + "value": "", + "description": "Optional; string" + }, + { + "key": "AssignTo", + "type": "text", + "value": "", + "description": "Optional; string" + }, + { + "key": "DueDate", + "type": "text", + "value": "2026-01-01T00:00:00Z", + "description": "Optional; string/date-time" + }, + { + "key": "Priority", + "type": "text", + "value": "1", + "description": "Optional; #/components/schemas/WorkOrderPriority" + }, + { + "key": "Status", + "type": "text", + "value": "1", + "description": "Optional; #/components/schemas/WorkOrderStatus" + }, + { + "key": "LocationId", + "type": "text", + "value": "0", + "description": "Optional; integer/int32" + }, + { + "key": "Problem", + "type": "text", + "value": "", + "description": "Optional; string" + }, + { + "key": "Trade", + "type": "text", + "value": "", + "description": "Optional; string" + }, + { + "key": "SubTrade", + "type": "text", + "value": "", + "description": "Optional; string" + }, + { + "key": "VendorNTE", + "type": "text", + "value": "0", + "description": "Optional; number/double" + }, + { + "key": "ScheduledDate", + "type": "text", + "value": "2026-01-01T00:00:00Z", + "description": "Optional; string/date-time" + }, + { + "key": "CompletedDate", + "type": "text", + "value": "2026-01-01T00:00:00Z", + "description": "Optional; string/date-time" + }, + { + "key": "Source", + "type": "text", + "value": "", + "description": "Optional; string" + }, + { + "key": "Attachments", + "type": "text", + "value": "", + "description": "Optional; array" + }, + { + "key": "BeforPhotoIssue", + "type": "text", + "value": "", + "description": "Optional; string" + }, + { + "key": "BeforPhotoAttachment", + "type": "file", + "src": "", + "description": "Optional; string/binary" + }, + { + "key": "AfterPhotoIssue", + "type": "text", + "value": "", + "description": "Optional; string" + }, + { + "key": "AfterPhotoAttachment", + "type": "file", + "src": "", + "description": "Optional; string/binary" + }, + { + "key": "SignOffName", + "type": "text", + "value": "", + "description": "Optional; string" + }, + { + "key": "SignOffAttachment", + "type": "file", + "src": "", + "description": "Optional; string/binary" + }, + { + "key": "SignOffSignature", + "type": "text", + "value": "", + "description": "Optional; string" + }, + { + "key": "ContactIds", + "type": "text", + "value": "0", + "description": "Optional; array" + }, + { + "key": "CategoryIds", + "type": "text", + "value": "0", + "description": "Optional; array" + } + ], + "description": "Illustrative placeholder generated from object; replace placeholder values before sending." + } + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + } + ] + }, + { + "name": "WorkOrderBoard", + "item": [ + { + "name": "GET /api/WorkOrder/board", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/WorkOrder/board?weekStart=&weekEnd=&dispatchers=&myWorkOrders=false&types=&overdue=false&search=", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "WorkOrder", + "board" + ], + "query": [ + { + "key": "weekStart", + "value": "", + "description": "Required; #/components/schemas/DateOnly", + "disabled": false + }, + { + "key": "weekEnd", + "value": "", + "description": "Optional; #/components/schemas/DateOnly", + "disabled": false + }, + { + "key": "dispatchers", + "value": "", + "description": "Optional; array", + "disabled": false + }, + { + "key": "myWorkOrders", + "value": "false", + "description": "Optional; boolean", + "disabled": false + }, + { + "key": "types", + "value": "", + "description": "Optional; array", + "disabled": false + }, + { + "key": "overdue", + "value": "false", + "description": "Optional; boolean", + "disabled": false + }, + { + "key": "search", + "value": "", + "description": "Optional; string", + "disabled": false + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): WorkOrderBoard\nOperation ID: not specified\n\nParameters: query weekStart (required, #/components/schemas/DateOnly); query weekEnd (optional, #/components/schemas/DateOnly); query dispatchers (optional, array); query myWorkOrders (optional, boolean); query types (optional, array); query overdue (optional, boolean); query search (optional, string)\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "GET /api/WorkOrder/board/search", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/WorkOrder/board/search?Page=0&PageSize=0&Search=&DatePreset=&DateFrom=&DateTo=&Sites=&Types=&Overdue=false&Dispatchers=&Statuses=&PmTypes=&VendorIds=&DocStatuses=&Severities=&Rescheduled=false&CarriedOver=false&AddOn=false&AvetaOnly=false&FlagColors=&InternalOnly=false&HasUplift=false&UpliftStatuses=&MyWorkOrders=false&SortBy=&SortDir=", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "WorkOrder", + "board", + "search" + ], + "query": [ + { + "key": "Page", + "value": "0", + "description": "Optional; integer/int32", + "disabled": false + }, + { + "key": "PageSize", + "value": "0", + "description": "Optional; integer/int32", + "disabled": false + }, + { + "key": "Search", + "value": "", + "description": "Optional; string", + "disabled": false + }, + { + "key": "DatePreset", + "value": "", + "description": "Optional; #/components/schemas/WorkOrderAdvancedSearchDatePreset", + "disabled": false + }, + { + "key": "DateFrom", + "value": "", + "description": "Optional; #/components/schemas/DateOnly", + "disabled": false + }, + { + "key": "DateTo", + "value": "", + "description": "Optional; #/components/schemas/DateOnly", + "disabled": false + }, + { + "key": "Sites", + "value": "", + "description": "Optional; array", + "disabled": false + }, + { + "key": "Types", + "value": "", + "description": "Optional; array", + "disabled": false + }, + { + "key": "Overdue", + "value": "false", + "description": "Optional; boolean", + "disabled": false + }, + { + "key": "Dispatchers", + "value": "", + "description": "Optional; array", + "disabled": false + }, + { + "key": "Statuses", + "value": "", + "description": "Optional; array", + "disabled": false + }, + { + "key": "PmTypes", + "value": "", + "description": "Optional; array", + "disabled": false + }, + { + "key": "VendorIds", + "value": "", + "description": "Optional; array", + "disabled": false + }, + { + "key": "DocStatuses", + "value": "", + "description": "Optional; array", + "disabled": false + }, + { + "key": "Severities", + "value": "", + "description": "Optional; array", + "disabled": false + }, + { + "key": "Rescheduled", + "value": "false", + "description": "Optional; boolean", + "disabled": false + }, + { + "key": "CarriedOver", + "value": "false", + "description": "Optional; boolean", + "disabled": false + }, + { + "key": "AddOn", + "value": "false", + "description": "Optional; boolean", + "disabled": false + }, + { + "key": "AvetaOnly", + "value": "false", + "description": "Optional; boolean", + "disabled": false + }, + { + "key": "FlagColors", + "value": "", + "description": "Optional; array", + "disabled": false + }, + { + "key": "InternalOnly", + "value": "false", + "description": "Optional; boolean", + "disabled": false + }, + { + "key": "HasUplift", + "value": "false", + "description": "Optional; boolean", + "disabled": false + }, + { + "key": "UpliftStatuses", + "value": "", + "description": "Optional; array", + "disabled": false + }, + { + "key": "MyWorkOrders", + "value": "false", + "description": "Optional; boolean", + "disabled": false + }, + { + "key": "SortBy", + "value": "", + "description": "Optional; string", + "disabled": false + }, + { + "key": "SortDir", + "value": "", + "description": "Optional; string", + "disabled": false + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): WorkOrderBoard\nOperation ID: not specified\n\nParameters: query Page (optional, integer/int32); query PageSize (optional, integer/int32); query Search (optional, string); query DatePreset (optional, #/components/schemas/WorkOrderAdvancedSearchDatePreset); query DateFrom (optional, #/components/schemas/DateOnly); query DateTo (optional, #/components/schemas/DateOnly); query Sites (optional, array); query Types (optional, array); query Overdue (optional, boolean); query Dispatchers (optional, array); query Statuses (optional, array); query PmTypes (optional, array); query VendorIds (optional, array); query DocStatuses (optional, array); query Severities (optional, array); query Rescheduled (optional, boolean); query CarriedOver (optional, boolean); query AddOn (optional, boolean); query AvetaOnly (optional, boolean); query FlagColors (optional, array); query InternalOnly (optional, boolean); query HasUplift (optional, boolean); query UpliftStatuses (optional, array); query MyWorkOrders (optional, boolean); query SortBy (optional, string); query SortDir (optional, string)\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "GET /api/WorkOrder/lookups/dispatchers", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/WorkOrder/lookups/dispatchers", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "WorkOrder", + "lookups", + "dispatchers" + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): WorkOrderBoard\nOperation ID: not specified\n\nParameters: none\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "GET /api/workorders/board", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/workorders/board?weekStart=&weekEnd=&dispatchers=&myWorkOrders=false&types=&overdue=false&search=", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "workorders", + "board" + ], + "query": [ + { + "key": "weekStart", + "value": "", + "description": "Required; #/components/schemas/DateOnly", + "disabled": false + }, + { + "key": "weekEnd", + "value": "", + "description": "Optional; #/components/schemas/DateOnly", + "disabled": false + }, + { + "key": "dispatchers", + "value": "", + "description": "Optional; array", + "disabled": false + }, + { + "key": "myWorkOrders", + "value": "false", + "description": "Optional; boolean", + "disabled": false + }, + { + "key": "types", + "value": "", + "description": "Optional; array", + "disabled": false + }, + { + "key": "overdue", + "value": "false", + "description": "Optional; boolean", + "disabled": false + }, + { + "key": "search", + "value": "", + "description": "Optional; string", + "disabled": false + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): WorkOrderBoard\nOperation ID: not specified\n\nParameters: query weekStart (required, #/components/schemas/DateOnly); query weekEnd (optional, #/components/schemas/DateOnly); query dispatchers (optional, array); query myWorkOrders (optional, boolean); query types (optional, array); query overdue (optional, boolean); query search (optional, string)\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "GET /api/workorders/board/search", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/workorders/board/search?Page=0&PageSize=0&Search=&DatePreset=&DateFrom=&DateTo=&Sites=&Types=&Overdue=false&Dispatchers=&Statuses=&PmTypes=&VendorIds=&DocStatuses=&Severities=&Rescheduled=false&CarriedOver=false&AddOn=false&AvetaOnly=false&FlagColors=&InternalOnly=false&HasUplift=false&UpliftStatuses=&MyWorkOrders=false&SortBy=&SortDir=", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "workorders", + "board", + "search" + ], + "query": [ + { + "key": "Page", + "value": "0", + "description": "Optional; integer/int32", + "disabled": false + }, + { + "key": "PageSize", + "value": "0", + "description": "Optional; integer/int32", + "disabled": false + }, + { + "key": "Search", + "value": "", + "description": "Optional; string", + "disabled": false + }, + { + "key": "DatePreset", + "value": "", + "description": "Optional; #/components/schemas/WorkOrderAdvancedSearchDatePreset", + "disabled": false + }, + { + "key": "DateFrom", + "value": "", + "description": "Optional; #/components/schemas/DateOnly", + "disabled": false + }, + { + "key": "DateTo", + "value": "", + "description": "Optional; #/components/schemas/DateOnly", + "disabled": false + }, + { + "key": "Sites", + "value": "", + "description": "Optional; array", + "disabled": false + }, + { + "key": "Types", + "value": "", + "description": "Optional; array", + "disabled": false + }, + { + "key": "Overdue", + "value": "false", + "description": "Optional; boolean", + "disabled": false + }, + { + "key": "Dispatchers", + "value": "", + "description": "Optional; array", + "disabled": false + }, + { + "key": "Statuses", + "value": "", + "description": "Optional; array", + "disabled": false + }, + { + "key": "PmTypes", + "value": "", + "description": "Optional; array", + "disabled": false + }, + { + "key": "VendorIds", + "value": "", + "description": "Optional; array", + "disabled": false + }, + { + "key": "DocStatuses", + "value": "", + "description": "Optional; array", + "disabled": false + }, + { + "key": "Severities", + "value": "", + "description": "Optional; array", + "disabled": false + }, + { + "key": "Rescheduled", + "value": "false", + "description": "Optional; boolean", + "disabled": false + }, + { + "key": "CarriedOver", + "value": "false", + "description": "Optional; boolean", + "disabled": false + }, + { + "key": "AddOn", + "value": "false", + "description": "Optional; boolean", + "disabled": false + }, + { + "key": "AvetaOnly", + "value": "false", + "description": "Optional; boolean", + "disabled": false + }, + { + "key": "FlagColors", + "value": "", + "description": "Optional; array", + "disabled": false + }, + { + "key": "InternalOnly", + "value": "false", + "description": "Optional; boolean", + "disabled": false + }, + { + "key": "HasUplift", + "value": "false", + "description": "Optional; boolean", + "disabled": false + }, + { + "key": "UpliftStatuses", + "value": "", + "description": "Optional; array", + "disabled": false + }, + { + "key": "MyWorkOrders", + "value": "false", + "description": "Optional; boolean", + "disabled": false + }, + { + "key": "SortBy", + "value": "", + "description": "Optional; string", + "disabled": false + }, + { + "key": "SortDir", + "value": "", + "description": "Optional; string", + "disabled": false + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): WorkOrderBoard\nOperation ID: not specified\n\nParameters: query Page (optional, integer/int32); query PageSize (optional, integer/int32); query Search (optional, string); query DatePreset (optional, #/components/schemas/WorkOrderAdvancedSearchDatePreset); query DateFrom (optional, #/components/schemas/DateOnly); query DateTo (optional, #/components/schemas/DateOnly); query Sites (optional, array); query Types (optional, array); query Overdue (optional, boolean); query Dispatchers (optional, array); query Statuses (optional, array); query PmTypes (optional, array); query VendorIds (optional, array); query DocStatuses (optional, array); query Severities (optional, array); query Rescheduled (optional, boolean); query CarriedOver (optional, boolean); query AddOn (optional, boolean); query AvetaOnly (optional, boolean); query FlagColors (optional, array); query InternalOnly (optional, boolean); query HasUplift (optional, boolean); query UpliftStatuses (optional, array); query MyWorkOrders (optional, boolean); query SortBy (optional, string); query SortDir (optional, string)\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "GET /api/workorders/lookups/dispatchers", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/workorders/lookups/dispatchers", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "workorders", + "lookups", + "dispatchers" + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): WorkOrderBoard\nOperation ID: not specified\n\nParameters: none\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "PATCH /api/WorkOrder/{id}/board", + "request": { + "method": "PATCH", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/WorkOrder/:id/board", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "WorkOrder", + ":id", + "board" + ], + "variable": [ + { + "key": "id", + "value": "0", + "description": "Required; integer/int32" + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): WorkOrderBoard\nOperation ID: not specified\n\nParameters: path id (required, integer/int32)\nRequest body: application/json, text/json, application/*+json; Illustrative placeholder generated from #/components/schemas/WorkOrderBoardPatchRequestDto; replace placeholder values before sending.\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending.", + "body": { + "mode": "raw", + "raw": "{\n \"field\": \"\",\n \"value\": \"\",\n \"workOrderVersion\": \"\",\n \"dispatchVersion\": \"\",\n \"primaryDispatchId\": 0\n}", + "options": { + "raw": { + "language": "json" + } + }, + "description": "Illustrative placeholder generated from #/components/schemas/WorkOrderBoardPatchRequestDto; replace placeholder values before sending." + } + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "PATCH /api/workorders/{id}/board", + "request": { + "method": "PATCH", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/workorders/:id/board", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "workorders", + ":id", + "board" + ], + "variable": [ + { + "key": "id", + "value": "0", + "description": "Required; integer/int32" + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): WorkOrderBoard\nOperation ID: not specified\n\nParameters: path id (required, integer/int32)\nRequest body: application/json, text/json, application/*+json; Illustrative placeholder generated from #/components/schemas/WorkOrderBoardPatchRequestDto; replace placeholder values before sending.\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending.", + "body": { + "mode": "raw", + "raw": "{\n \"field\": \"\",\n \"value\": \"\",\n \"workOrderVersion\": \"\",\n \"dispatchVersion\": \"\",\n \"primaryDispatchId\": 0\n}", + "options": { + "raw": { + "language": "json" + } + }, + "description": "Illustrative placeholder generated from #/components/schemas/WorkOrderBoardPatchRequestDto; replace placeholder values before sending." + } + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "POST /api/WorkOrder/{id}/cancel", + "request": { + "method": "POST", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/WorkOrder/:id/cancel", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "WorkOrder", + ":id", + "cancel" + ], + "variable": [ + { + "key": "id", + "value": "0", + "description": "Required; integer/int32" + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): WorkOrderBoard\nOperation ID: not specified\n\nParameters: path id (required, integer/int32)\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "POST /api/WorkOrder/board", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/WorkOrder/board", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "WorkOrder", + "board" + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): WorkOrderBoard\nOperation ID: not specified\n\nParameters: none\nRequest body: application/json, text/json, application/*+json; Illustrative placeholder generated from #/components/schemas/WorkOrderBoardCreateRequestDto; replace placeholder values before sending.\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending.", + "body": { + "mode": "raw", + "raw": "{\n \"woNumber\": \"\",\n \"workOrderType\": 1,\n \"isAddOn\": false,\n \"siteCode\": \"\",\n \"customer\": \"\",\n \"description\": \"\",\n \"trade\": \"\",\n \"primaryService\": \"\",\n \"extraServices\": [\n \"\"\n ],\n \"serviceNotes\": \"\",\n \"avetaRequired\": false,\n \"locationId\": 0,\n \"dueDate\": \"2026-01-01T00:00:00Z\",\n \"assignTo\": \"\",\n \"scheduledDate\": \"2026-01-01T00:00:00Z\",\n \"targetWeek\": {\n \"year\": 0,\n \"month\": 0,\n \"day\": 0,\n \"dayOfWeek\": 0,\n \"dayOfYear\": 0,\n \"dayNumber\": 0\n },\n \"scheduleWeekOnly\": false,\n \"docStatus\": 1,\n \"lifecycleStatus\": 1,\n \"vendorId\": 0,\n \"apptDate\": \"2026-01-01T00:00:00Z\",\n \"apptTime\": \"\",\n \"pocContactId\": 0,\n \"pocName\": \"\",\n \"pocPhone\": \"\",\n \"pocNotes\": \"\",\n \"additionalContacts\": [\n {\n \"name\": \"\",\n \"phone\": \"\",\n \"notes\": \"\"\n }\n ],\n \"techPhone\": \"\",\n \"vendorNotes\": \"\",\n \"severity\": 0\n}", + "options": { + "raw": { + "language": "json" + } + }, + "description": "Illustrative placeholder generated from #/components/schemas/WorkOrderBoardCreateRequestDto; replace placeholder values before sending." + } + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "POST /api/workorders/{id}/cancel", + "request": { + "method": "POST", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/workorders/:id/cancel", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "workorders", + ":id", + "cancel" + ], + "variable": [ + { + "key": "id", + "value": "0", + "description": "Required; integer/int32" + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): WorkOrderBoard\nOperation ID: not specified\n\nParameters: path id (required, integer/int32)\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "POST /api/workorders/board", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/workorders/board", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "workorders", + "board" + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): WorkOrderBoard\nOperation ID: not specified\n\nParameters: none\nRequest body: application/json, text/json, application/*+json; Illustrative placeholder generated from #/components/schemas/WorkOrderBoardCreateRequestDto; replace placeholder values before sending.\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending.", + "body": { + "mode": "raw", + "raw": "{\n \"woNumber\": \"\",\n \"workOrderType\": 1,\n \"isAddOn\": false,\n \"siteCode\": \"\",\n \"customer\": \"\",\n \"description\": \"\",\n \"trade\": \"\",\n \"primaryService\": \"\",\n \"extraServices\": [\n \"\"\n ],\n \"serviceNotes\": \"\",\n \"avetaRequired\": false,\n \"locationId\": 0,\n \"dueDate\": \"2026-01-01T00:00:00Z\",\n \"assignTo\": \"\",\n \"scheduledDate\": \"2026-01-01T00:00:00Z\",\n \"targetWeek\": {\n \"year\": 0,\n \"month\": 0,\n \"day\": 0,\n \"dayOfWeek\": 0,\n \"dayOfYear\": 0,\n \"dayNumber\": 0\n },\n \"scheduleWeekOnly\": false,\n \"docStatus\": 1,\n \"lifecycleStatus\": 1,\n \"vendorId\": 0,\n \"apptDate\": \"2026-01-01T00:00:00Z\",\n \"apptTime\": \"\",\n \"pocContactId\": 0,\n \"pocName\": \"\",\n \"pocPhone\": \"\",\n \"pocNotes\": \"\",\n \"additionalContacts\": [\n {\n \"name\": \"\",\n \"phone\": \"\",\n \"notes\": \"\"\n }\n ],\n \"techPhone\": \"\",\n \"vendorNotes\": \"\",\n \"severity\": 0\n}", + "options": { + "raw": { + "language": "json" + } + }, + "description": "Illustrative placeholder generated from #/components/schemas/WorkOrderBoardCreateRequestDto; replace placeholder values before sending." + } + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + } + ] + }, + { + "name": "WorkOrderCompletion", + "item": [ + { + "name": "DELETE /api/WorkOrder/completion-templates/{id}", + "request": { + "method": "DELETE", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/WorkOrder/completion-templates/:id", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "WorkOrder", + "completion-templates", + ":id" + ], + "variable": [ + { + "key": "id", + "value": "0", + "description": "Required; integer/int32" + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): WorkOrderCompletion\nOperation ID: not specified\n\nParameters: path id (required, integer/int32)\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "DELETE /api/workorders/completion-templates/{id}", + "request": { + "method": "DELETE", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/workorders/completion-templates/:id", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "workorders", + "completion-templates", + ":id" + ], + "variable": [ + { + "key": "id", + "value": "0", + "description": "Required; integer/int32" + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): WorkOrderCompletion\nOperation ID: not specified\n\nParameters: path id (required, integer/int32)\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "GET /api/WorkOrder/completion-templates", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/WorkOrder/completion-templates?serviceKey=&workOrderType=", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "WorkOrder", + "completion-templates" + ], + "query": [ + { + "key": "serviceKey", + "value": "", + "description": "Optional; string", + "disabled": false + }, + { + "key": "workOrderType", + "value": "", + "description": "Optional; #/components/schemas/WorkOrderType", + "disabled": false + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): WorkOrderCompletion\nOperation ID: not specified\n\nParameters: query serviceKey (optional, string); query workOrderType (optional, #/components/schemas/WorkOrderType)\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "GET /api/WorkOrder/completion-templates/{id}", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/WorkOrder/completion-templates/:id", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "WorkOrder", + "completion-templates", + ":id" + ], + "variable": [ + { + "key": "id", + "value": "0", + "description": "Required; integer/int32" + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): WorkOrderCompletion\nOperation ID: not specified\n\nParameters: path id (required, integer/int32)\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "GET /api/workorders/completion-templates", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/workorders/completion-templates?serviceKey=&workOrderType=", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "workorders", + "completion-templates" + ], + "query": [ + { + "key": "serviceKey", + "value": "", + "description": "Optional; string", + "disabled": false + }, + { + "key": "workOrderType", + "value": "", + "description": "Optional; #/components/schemas/WorkOrderType", + "disabled": false + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): WorkOrderCompletion\nOperation ID: not specified\n\nParameters: query serviceKey (optional, string); query workOrderType (optional, #/components/schemas/WorkOrderType)\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "GET /api/workorders/completion-templates/{id}", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/workorders/completion-templates/:id", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "workorders", + "completion-templates", + ":id" + ], + "variable": [ + { + "key": "id", + "value": "0", + "description": "Required; integer/int32" + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): WorkOrderCompletion\nOperation ID: not specified\n\nParameters: path id (required, integer/int32)\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "POST /api/WorkOrder/{id}/completion-doc", + "request": { + "method": "POST", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/WorkOrder/:id/completion-doc", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "WorkOrder", + ":id", + "completion-doc" + ], + "variable": [ + { + "key": "id", + "value": "0", + "description": "Required; integer/int32" + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): WorkOrderCompletion\nOperation ID: not specified\n\nParameters: path id (required, integer/int32)\nRequest body: multipart/form-data; Illustrative placeholder generated from object; replace placeholder values before sending.\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending.", + "body": { + "mode": "formdata", + "formdata": [ + { + "key": "ContentType", + "type": "text", + "value": "", + "description": "Optional; string" + }, + { + "key": "ContentDisposition", + "type": "text", + "value": "", + "description": "Optional; string" + }, + { + "key": "Headers", + "type": "text", + "value": "[object Object]", + "description": "Optional; object" + }, + { + "key": "Length", + "type": "text", + "value": "0", + "description": "Optional; integer/int64" + }, + { + "key": "Name", + "type": "text", + "value": "", + "description": "Optional; string" + }, + { + "key": "FileName", + "type": "text", + "value": "", + "description": "Optional; string" + }, + { + "key": "signOffName", + "type": "text", + "value": "", + "description": "Optional; string" + }, + { + "key": "signOffSignature", + "type": "text", + "value": "", + "description": "Optional; string" + }, + { + "key": "workOrderVersion", + "type": "text", + "value": "", + "description": "Optional; string" + } + ], + "description": "Illustrative placeholder generated from object; replace placeholder values before sending." + } + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "POST /api/WorkOrder/completion-templates", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/WorkOrder/completion-templates", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "WorkOrder", + "completion-templates" + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): WorkOrderCompletion\nOperation ID: not specified\n\nParameters: none\nRequest body: application/json, text/json, application/*+json; Illustrative placeholder generated from #/components/schemas/CompletionDocTemplateCreateDto; replace placeholder values before sending.\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending.", + "body": { + "mode": "raw", + "raw": "{\n \"name\": \"\",\n \"serviceKey\": \"\",\n \"workOrderType\": 1,\n \"templateUrl\": \"\",\n \"isActive\": false\n}", + "options": { + "raw": { + "language": "json" + } + }, + "description": "Illustrative placeholder generated from #/components/schemas/CompletionDocTemplateCreateDto; replace placeholder values before sending." + } + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "POST /api/workorders/{id}/completion-doc", + "request": { + "method": "POST", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/workorders/:id/completion-doc", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "workorders", + ":id", + "completion-doc" + ], + "variable": [ + { + "key": "id", + "value": "0", + "description": "Required; integer/int32" + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): WorkOrderCompletion\nOperation ID: not specified\n\nParameters: path id (required, integer/int32)\nRequest body: multipart/form-data; Illustrative placeholder generated from object; replace placeholder values before sending.\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending.", + "body": { + "mode": "formdata", + "formdata": [ + { + "key": "ContentType", + "type": "text", + "value": "", + "description": "Optional; string" + }, + { + "key": "ContentDisposition", + "type": "text", + "value": "", + "description": "Optional; string" + }, + { + "key": "Headers", + "type": "text", + "value": "[object Object]", + "description": "Optional; object" + }, + { + "key": "Length", + "type": "text", + "value": "0", + "description": "Optional; integer/int64" + }, + { + "key": "Name", + "type": "text", + "value": "", + "description": "Optional; string" + }, + { + "key": "FileName", + "type": "text", + "value": "", + "description": "Optional; string" + }, + { + "key": "signOffName", + "type": "text", + "value": "", + "description": "Optional; string" + }, + { + "key": "signOffSignature", + "type": "text", + "value": "", + "description": "Optional; string" + }, + { + "key": "workOrderVersion", + "type": "text", + "value": "", + "description": "Optional; string" + } + ], + "description": "Illustrative placeholder generated from object; replace placeholder values before sending." + } + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "POST /api/workorders/completion-templates", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/workorders/completion-templates", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "workorders", + "completion-templates" + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): WorkOrderCompletion\nOperation ID: not specified\n\nParameters: none\nRequest body: application/json, text/json, application/*+json; Illustrative placeholder generated from #/components/schemas/CompletionDocTemplateCreateDto; replace placeholder values before sending.\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending.", + "body": { + "mode": "raw", + "raw": "{\n \"name\": \"\",\n \"serviceKey\": \"\",\n \"workOrderType\": 1,\n \"templateUrl\": \"\",\n \"isActive\": false\n}", + "options": { + "raw": { + "language": "json" + } + }, + "description": "Illustrative placeholder generated from #/components/schemas/CompletionDocTemplateCreateDto; replace placeholder values before sending." + } + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "PUT /api/WorkOrder/completion-templates/{id}", + "request": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/WorkOrder/completion-templates/:id", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "WorkOrder", + "completion-templates", + ":id" + ], + "variable": [ + { + "key": "id", + "value": "0", + "description": "Required; integer/int32" + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): WorkOrderCompletion\nOperation ID: not specified\n\nParameters: path id (required, integer/int32)\nRequest body: application/json, text/json, application/*+json; Illustrative placeholder generated from #/components/schemas/CompletionDocTemplateCreateDto; replace placeholder values before sending.\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending.", + "body": { + "mode": "raw", + "raw": "{\n \"name\": \"\",\n \"serviceKey\": \"\",\n \"workOrderType\": 1,\n \"templateUrl\": \"\",\n \"isActive\": false\n}", + "options": { + "raw": { + "language": "json" + } + }, + "description": "Illustrative placeholder generated from #/components/schemas/CompletionDocTemplateCreateDto; replace placeholder values before sending." + } + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "PUT /api/workorders/completion-templates/{id}", + "request": { + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/workorders/completion-templates/:id", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "workorders", + "completion-templates", + ":id" + ], + "variable": [ + { + "key": "id", + "value": "0", + "description": "Required; integer/int32" + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): WorkOrderCompletion\nOperation ID: not specified\n\nParameters: path id (required, integer/int32)\nRequest body: application/json, text/json, application/*+json; Illustrative placeholder generated from #/components/schemas/CompletionDocTemplateCreateDto; replace placeholder values before sending.\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending.", + "body": { + "mode": "raw", + "raw": "{\n \"name\": \"\",\n \"serviceKey\": \"\",\n \"workOrderType\": 1,\n \"templateUrl\": \"\",\n \"isActive\": false\n}", + "options": { + "raw": { + "language": "json" + } + }, + "description": "Illustrative placeholder generated from #/components/schemas/CompletionDocTemplateCreateDto; replace placeholder values before sending." + } + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + } + ] + }, + { + "name": "WorkOrderDetail", + "item": [ + { + "name": "GET /api/WorkOrder/{id}/audit", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/WorkOrder/:id/audit?limit=0", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "WorkOrder", + ":id", + "audit" + ], + "query": [ + { + "key": "limit", + "value": "0", + "description": "Optional; integer/int32", + "disabled": false + } + ], + "variable": [ + { + "key": "id", + "value": "0", + "description": "Required; integer/int32" + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): WorkOrderDetail\nOperation ID: not specified\n\nParameters: path id (required, integer/int32); query limit (optional, integer/int32)\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "GET /api/WorkOrder/{id}/comments", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/WorkOrder/:id/comments", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "WorkOrder", + ":id", + "comments" + ], + "variable": [ + { + "key": "id", + "value": "0", + "description": "Required; integer/int32" + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): WorkOrderDetail\nOperation ID: not specified\n\nParameters: path id (required, integer/int32)\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "GET /api/WorkOrder/{id}/detail", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/WorkOrder/:id/detail", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "WorkOrder", + ":id", + "detail" + ], + "variable": [ + { + "key": "id", + "value": "0", + "description": "Required; integer/int32" + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): WorkOrderDetail\nOperation ID: not specified\n\nParameters: path id (required, integer/int32)\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "GET /api/WorkOrder/{id}/uplifts", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/WorkOrder/:id/uplifts", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "WorkOrder", + ":id", + "uplifts" + ], + "variable": [ + { + "key": "id", + "value": "0", + "description": "Required; integer/int32" + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): WorkOrderDetail\nOperation ID: not specified\n\nParameters: path id (required, integer/int32)\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "GET /api/workorders/{id}/audit", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/workorders/:id/audit?limit=0", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "workorders", + ":id", + "audit" + ], + "query": [ + { + "key": "limit", + "value": "0", + "description": "Optional; integer/int32", + "disabled": false + } + ], + "variable": [ + { + "key": "id", + "value": "0", + "description": "Required; integer/int32" + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): WorkOrderDetail\nOperation ID: not specified\n\nParameters: path id (required, integer/int32); query limit (optional, integer/int32)\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "GET /api/workorders/{id}/comments", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/workorders/:id/comments", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "workorders", + ":id", + "comments" + ], + "variable": [ + { + "key": "id", + "value": "0", + "description": "Required; integer/int32" + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): WorkOrderDetail\nOperation ID: not specified\n\nParameters: path id (required, integer/int32)\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "GET /api/workorders/{id}/detail", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/workorders/:id/detail", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "workorders", + ":id", + "detail" + ], + "variable": [ + { + "key": "id", + "value": "0", + "description": "Required; integer/int32" + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): WorkOrderDetail\nOperation ID: not specified\n\nParameters: path id (required, integer/int32)\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "GET /api/workorders/{id}/uplifts", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/workorders/:id/uplifts", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "workorders", + ":id", + "uplifts" + ], + "variable": [ + { + "key": "id", + "value": "0", + "description": "Required; integer/int32" + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): WorkOrderDetail\nOperation ID: not specified\n\nParameters: path id (required, integer/int32)\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "PATCH /api/WorkOrder/{id}/comments/{commentId}", + "request": { + "method": "PATCH", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/WorkOrder/:id/comments/:commentId", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "WorkOrder", + ":id", + "comments", + ":commentId" + ], + "variable": [ + { + "key": "id", + "value": "0", + "description": "Required; integer/int32" + }, + { + "key": "commentId", + "value": "0", + "description": "Required; integer/int32" + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): WorkOrderDetail\nOperation ID: not specified\n\nParameters: path id (required, integer/int32); path commentId (required, integer/int32)\nRequest body: application/json, text/json, application/*+json; Illustrative placeholder generated from #/components/schemas/WorkOrderCommentCreateDto; replace placeholder values before sending.\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending.", + "body": { + "mode": "raw", + "raw": "{\n \"text\": \"\"\n}", + "options": { + "raw": { + "language": "json" + } + }, + "description": "Illustrative placeholder generated from #/components/schemas/WorkOrderCommentCreateDto; replace placeholder values before sending." + } + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "PATCH /api/workorders/{id}/comments/{commentId}", + "request": { + "method": "PATCH", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/workorders/:id/comments/:commentId", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "workorders", + ":id", + "comments", + ":commentId" + ], + "variable": [ + { + "key": "id", + "value": "0", + "description": "Required; integer/int32" + }, + { + "key": "commentId", + "value": "0", + "description": "Required; integer/int32" + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): WorkOrderDetail\nOperation ID: not specified\n\nParameters: path id (required, integer/int32); path commentId (required, integer/int32)\nRequest body: application/json, text/json, application/*+json; Illustrative placeholder generated from #/components/schemas/WorkOrderCommentCreateDto; replace placeholder values before sending.\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending.", + "body": { + "mode": "raw", + "raw": "{\n \"text\": \"\"\n}", + "options": { + "raw": { + "language": "json" + } + }, + "description": "Illustrative placeholder generated from #/components/schemas/WorkOrderCommentCreateDto; replace placeholder values before sending." + } + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "POST /api/WorkOrder/{id}/comments", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/WorkOrder/:id/comments", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "WorkOrder", + ":id", + "comments" + ], + "variable": [ + { + "key": "id", + "value": "0", + "description": "Required; integer/int32" + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): WorkOrderDetail\nOperation ID: not specified\n\nParameters: path id (required, integer/int32)\nRequest body: application/json, text/json, application/*+json; Illustrative placeholder generated from #/components/schemas/WorkOrderCommentCreateDto; replace placeholder values before sending.\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending.", + "body": { + "mode": "raw", + "raw": "{\n \"text\": \"\"\n}", + "options": { + "raw": { + "language": "json" + } + }, + "description": "Illustrative placeholder generated from #/components/schemas/WorkOrderCommentCreateDto; replace placeholder values before sending." + } + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "POST /api/WorkOrder/{id}/uplifts", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/WorkOrder/:id/uplifts", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "WorkOrder", + ":id", + "uplifts" + ], + "variable": [ + { + "key": "id", + "value": "0", + "description": "Required; integer/int32" + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): WorkOrderDetail\nOperation ID: not specified\n\nParameters: path id (required, integer/int32)\nRequest body: application/json, text/json, application/*+json; Illustrative placeholder generated from #/components/schemas/CreateWorkOrderUpliftRequestDto; replace placeholder values before sending.\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending.", + "body": { + "mode": "raw", + "raw": "{\n \"amount\": 0,\n \"notes\": \"\"\n}", + "options": { + "raw": { + "language": "json" + } + }, + "description": "Illustrative placeholder generated from #/components/schemas/CreateWorkOrderUpliftRequestDto; replace placeholder values before sending." + } + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "POST /api/WorkOrder/{id}/uplifts/{upliftId}/cancel", + "request": { + "method": "POST", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/WorkOrder/:id/uplifts/:upliftId/cancel", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "WorkOrder", + ":id", + "uplifts", + ":upliftId", + "cancel" + ], + "variable": [ + { + "key": "id", + "value": "0", + "description": "Required; integer/int32" + }, + { + "key": "upliftId", + "value": "0", + "description": "Required; integer/int32" + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): WorkOrderDetail\nOperation ID: not specified\n\nParameters: path id (required, integer/int32); path upliftId (required, integer/int32)\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "POST /api/WorkOrder/{id}/uplifts/{upliftId}/revoke", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/WorkOrder/:id/uplifts/:upliftId/revoke", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "WorkOrder", + ":id", + "uplifts", + ":upliftId", + "revoke" + ], + "variable": [ + { + "key": "id", + "value": "0", + "description": "Required; integer/int32" + }, + { + "key": "upliftId", + "value": "0", + "description": "Required; integer/int32" + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): WorkOrderDetail\nOperation ID: not specified\n\nParameters: path id (required, integer/int32); path upliftId (required, integer/int32)\nRequest body: application/json, text/json, application/*+json; Illustrative placeholder generated from #/components/schemas/RevokeWorkOrderUpliftRequestDto; replace placeholder values before sending.\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending.", + "body": { + "mode": "raw", + "raw": "{\n \"reason\": \"\"\n}", + "options": { + "raw": { + "language": "json" + } + }, + "description": "Illustrative placeholder generated from #/components/schemas/RevokeWorkOrderUpliftRequestDto; replace placeholder values before sending." + } + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "POST /api/workorders/{id}/comments", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/workorders/:id/comments", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "workorders", + ":id", + "comments" + ], + "variable": [ + { + "key": "id", + "value": "0", + "description": "Required; integer/int32" + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): WorkOrderDetail\nOperation ID: not specified\n\nParameters: path id (required, integer/int32)\nRequest body: application/json, text/json, application/*+json; Illustrative placeholder generated from #/components/schemas/WorkOrderCommentCreateDto; replace placeholder values before sending.\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending.", + "body": { + "mode": "raw", + "raw": "{\n \"text\": \"\"\n}", + "options": { + "raw": { + "language": "json" + } + }, + "description": "Illustrative placeholder generated from #/components/schemas/WorkOrderCommentCreateDto; replace placeholder values before sending." + } + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "POST /api/workorders/{id}/uplifts", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/workorders/:id/uplifts", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "workorders", + ":id", + "uplifts" + ], + "variable": [ + { + "key": "id", + "value": "0", + "description": "Required; integer/int32" + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): WorkOrderDetail\nOperation ID: not specified\n\nParameters: path id (required, integer/int32)\nRequest body: application/json, text/json, application/*+json; Illustrative placeholder generated from #/components/schemas/CreateWorkOrderUpliftRequestDto; replace placeholder values before sending.\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending.", + "body": { + "mode": "raw", + "raw": "{\n \"amount\": 0,\n \"notes\": \"\"\n}", + "options": { + "raw": { + "language": "json" + } + }, + "description": "Illustrative placeholder generated from #/components/schemas/CreateWorkOrderUpliftRequestDto; replace placeholder values before sending." + } + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "POST /api/workorders/{id}/uplifts/{upliftId}/cancel", + "request": { + "method": "POST", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/workorders/:id/uplifts/:upliftId/cancel", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "workorders", + ":id", + "uplifts", + ":upliftId", + "cancel" + ], + "variable": [ + { + "key": "id", + "value": "0", + "description": "Required; integer/int32" + }, + { + "key": "upliftId", + "value": "0", + "description": "Required; integer/int32" + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): WorkOrderDetail\nOperation ID: not specified\n\nParameters: path id (required, integer/int32); path upliftId (required, integer/int32)\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "POST /api/workorders/{id}/uplifts/{upliftId}/revoke", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/workorders/:id/uplifts/:upliftId/revoke", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "workorders", + ":id", + "uplifts", + ":upliftId", + "revoke" + ], + "variable": [ + { + "key": "id", + "value": "0", + "description": "Required; integer/int32" + }, + { + "key": "upliftId", + "value": "0", + "description": "Required; integer/int32" + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): WorkOrderDetail\nOperation ID: not specified\n\nParameters: path id (required, integer/int32); path upliftId (required, integer/int32)\nRequest body: application/json, text/json, application/*+json; Illustrative placeholder generated from #/components/schemas/RevokeWorkOrderUpliftRequestDto; replace placeholder values before sending.\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending.", + "body": { + "mode": "raw", + "raw": "{\n \"reason\": \"\"\n}", + "options": { + "raw": { + "language": "json" + } + }, + "description": "Illustrative placeholder generated from #/components/schemas/RevokeWorkOrderUpliftRequestDto; replace placeholder values before sending." + } + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + } + ] + }, + { + "name": "WorkOrderDispatch", + "item": [ + { + "name": "GET /api/WorkOrder/GetDispatch/{id}", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/WorkOrder/GetDispatch/:id", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "WorkOrder", + "GetDispatch", + ":id" + ], + "variable": [ + { + "key": "id", + "value": "0", + "description": "Required; integer/int32" + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): WorkOrderDispatch\nOperation ID: not specified\n\nParameters: path id (required, integer/int32)\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "GET /api/WorkOrder/GetDispatches/{workOrderId}", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/WorkOrder/GetDispatches/:workOrderId", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "WorkOrder", + "GetDispatches", + ":workOrderId" + ], + "variable": [ + { + "key": "workOrderId", + "value": "0", + "description": "Required; integer/int32" + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): WorkOrderDispatch\nOperation ID: not specified\n\nParameters: path workOrderId (required, integer/int32)\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "GET /api/workorders/GetDispatch/{id}", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/workorders/GetDispatch/:id", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "workorders", + "GetDispatch", + ":id" + ], + "variable": [ + { + "key": "id", + "value": "0", + "description": "Required; integer/int32" + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): WorkOrderDispatch\nOperation ID: not specified\n\nParameters: path id (required, integer/int32)\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "GET /api/workorders/GetDispatches/{workOrderId}", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/workorders/GetDispatches/:workOrderId", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "workorders", + "GetDispatches", + ":workOrderId" + ], + "variable": [ + { + "key": "workOrderId", + "value": "0", + "description": "Required; integer/int32" + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): WorkOrderDispatch\nOperation ID: not specified\n\nParameters: path workOrderId (required, integer/int32)\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "POST /api/WorkOrder/AddChecklistItem", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/WorkOrder/AddChecklistItem", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "WorkOrder", + "AddChecklistItem" + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): WorkOrderDispatch\nOperation ID: not specified\n\nParameters: none\nRequest body: application/json, text/json, application/*+json; Illustrative placeholder generated from #/components/schemas/AddChecklistItem_DTO; replace placeholder values before sending.\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending.", + "body": { + "mode": "raw", + "raw": "{\n \"dispatchId\": 0,\n \"workOrderId\": 0,\n \"itemText\": \"\"\n}", + "options": { + "raw": { + "language": "json" + } + }, + "description": "Illustrative placeholder generated from #/components/schemas/AddChecklistItem_DTO; replace placeholder values before sending." + } + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "POST /api/WorkOrder/AddDispatchComment", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/WorkOrder/AddDispatchComment", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "WorkOrder", + "AddDispatchComment" + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): WorkOrderDispatch\nOperation ID: not specified\n\nParameters: none\nRequest body: application/json, text/json, application/*+json; Illustrative placeholder generated from #/components/schemas/DispatchComment_DTO; replace placeholder values before sending.\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending.", + "body": { + "mode": "raw", + "raw": "{\n \"dispatchId\": 0,\n \"text\": \"\",\n \"sendEmail\": false\n}", + "options": { + "raw": { + "language": "json" + } + }, + "description": "Illustrative placeholder generated from #/components/schemas/DispatchComment_DTO; replace placeholder values before sending." + } + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "POST /api/WorkOrder/AddDispatchSignoff", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/WorkOrder/AddDispatchSignoff", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "WorkOrder", + "AddDispatchSignoff" + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): WorkOrderDispatch\nOperation ID: not specified\n\nParameters: none\nRequest body: application/json, text/json, application/*+json; Illustrative placeholder generated from #/components/schemas/DispatchSignoff_DTO; replace placeholder values before sending.\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending.", + "body": { + "mode": "raw", + "raw": "{\n \"dispatchId\": 0,\n \"signoffType\": \"\",\n \"name\": \"\",\n \"signature\": \"\",\n \"signatureMethod\": \"\"\n}", + "options": { + "raw": { + "language": "json" + } + }, + "description": "Illustrative placeholder generated from #/components/schemas/DispatchSignoff_DTO; replace placeholder values before sending." + } + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "POST /api/WorkOrder/DispatchToVendor", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/WorkOrder/DispatchToVendor", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "WorkOrder", + "DispatchToVendor" + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): WorkOrderDispatch\nOperation ID: not specified\n\nParameters: none\nRequest body: application/json, text/json, application/*+json; Illustrative placeholder generated from #/components/schemas/Dispatch_DTO; replace placeholder values before sending.\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending.", + "body": { + "mode": "raw", + "raw": "{\n \"workOrderIds\": [\n 0\n ],\n \"vendorIds\": [\n 0\n ],\n \"nteAmount\": 0,\n \"scheduledDate\": \"2026-01-01T00:00:00Z\",\n \"estimatedArrivalAt\": \"2026-01-01T00:00:00Z\",\n \"etaManualOverride\": false,\n \"description\": \"\",\n \"taskListTemplateId\": 0,\n \"customChecklistItems\": [\n \"\"\n ]\n}", + "options": { + "raw": { + "language": "json" + } + }, + "description": "Illustrative placeholder generated from #/components/schemas/Dispatch_DTO; replace placeholder values before sending." + } + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "POST /api/WorkOrder/UpdateChecklistItem", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/WorkOrder/UpdateChecklistItem", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "WorkOrder", + "UpdateChecklistItem" + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): WorkOrderDispatch\nOperation ID: not specified\n\nParameters: none\nRequest body: application/json, text/json, application/*+json; Illustrative placeholder generated from #/components/schemas/ChecklistItemUpdate_DTO; replace placeholder values before sending.\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending.", + "body": { + "mode": "raw", + "raw": "{\n \"id\": 0,\n \"isCompleted\": false,\n \"completedBy\": \"\"\n}", + "options": { + "raw": { + "language": "json" + } + }, + "description": "Illustrative placeholder generated from #/components/schemas/ChecklistItemUpdate_DTO; replace placeholder values before sending." + } + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "POST /api/WorkOrder/UpdateDispatch", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/WorkOrder/UpdateDispatch", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "WorkOrder", + "UpdateDispatch" + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): WorkOrderDispatch\nOperation ID: not specified\n\nParameters: none\nRequest body: application/json, text/json, application/*+json; Illustrative placeholder generated from #/components/schemas/UpdateDispatch_DTO; replace placeholder values before sending.\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending.", + "body": { + "mode": "raw", + "raw": "{\n \"id\": 0,\n \"status\": \"\",\n \"nteAmount\": 0,\n \"scheduledDate\": \"2026-01-01T00:00:00Z\",\n \"estimatedArrivalAt\": \"2026-01-01T00:00:00Z\",\n \"etaManualOverride\": false,\n \"completedDate\": \"2026-01-01T00:00:00Z\",\n \"description\": \"\"\n}", + "options": { + "raw": { + "language": "json" + } + }, + "description": "Illustrative placeholder generated from #/components/schemas/UpdateDispatch_DTO; replace placeholder values before sending." + } + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "POST /api/WorkOrder/VerifyDispatch", + "request": { + "method": "POST", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/WorkOrder/VerifyDispatch?dispatchId=0", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "WorkOrder", + "VerifyDispatch" + ], + "query": [ + { + "key": "dispatchId", + "value": "0", + "description": "Optional; integer/int32", + "disabled": false + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): WorkOrderDispatch\nOperation ID: not specified\n\nParameters: query dispatchId (optional, integer/int32)\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "POST /api/workorders/AddChecklistItem", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/workorders/AddChecklistItem", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "workorders", + "AddChecklistItem" + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): WorkOrderDispatch\nOperation ID: not specified\n\nParameters: none\nRequest body: application/json, text/json, application/*+json; Illustrative placeholder generated from #/components/schemas/AddChecklistItem_DTO; replace placeholder values before sending.\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending.", + "body": { + "mode": "raw", + "raw": "{\n \"dispatchId\": 0,\n \"workOrderId\": 0,\n \"itemText\": \"\"\n}", + "options": { + "raw": { + "language": "json" + } + }, + "description": "Illustrative placeholder generated from #/components/schemas/AddChecklistItem_DTO; replace placeholder values before sending." + } + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "POST /api/workorders/AddDispatchComment", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/workorders/AddDispatchComment", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "workorders", + "AddDispatchComment" + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): WorkOrderDispatch\nOperation ID: not specified\n\nParameters: none\nRequest body: application/json, text/json, application/*+json; Illustrative placeholder generated from #/components/schemas/DispatchComment_DTO; replace placeholder values before sending.\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending.", + "body": { + "mode": "raw", + "raw": "{\n \"dispatchId\": 0,\n \"text\": \"\",\n \"sendEmail\": false\n}", + "options": { + "raw": { + "language": "json" + } + }, + "description": "Illustrative placeholder generated from #/components/schemas/DispatchComment_DTO; replace placeholder values before sending." + } + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "POST /api/workorders/AddDispatchSignoff", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/workorders/AddDispatchSignoff", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "workorders", + "AddDispatchSignoff" + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): WorkOrderDispatch\nOperation ID: not specified\n\nParameters: none\nRequest body: application/json, text/json, application/*+json; Illustrative placeholder generated from #/components/schemas/DispatchSignoff_DTO; replace placeholder values before sending.\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending.", + "body": { + "mode": "raw", + "raw": "{\n \"dispatchId\": 0,\n \"signoffType\": \"\",\n \"name\": \"\",\n \"signature\": \"\",\n \"signatureMethod\": \"\"\n}", + "options": { + "raw": { + "language": "json" + } + }, + "description": "Illustrative placeholder generated from #/components/schemas/DispatchSignoff_DTO; replace placeholder values before sending." + } + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "POST /api/workorders/DispatchToVendor", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/workorders/DispatchToVendor", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "workorders", + "DispatchToVendor" + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): WorkOrderDispatch\nOperation ID: not specified\n\nParameters: none\nRequest body: application/json, text/json, application/*+json; Illustrative placeholder generated from #/components/schemas/Dispatch_DTO; replace placeholder values before sending.\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending.", + "body": { + "mode": "raw", + "raw": "{\n \"workOrderIds\": [\n 0\n ],\n \"vendorIds\": [\n 0\n ],\n \"nteAmount\": 0,\n \"scheduledDate\": \"2026-01-01T00:00:00Z\",\n \"estimatedArrivalAt\": \"2026-01-01T00:00:00Z\",\n \"etaManualOverride\": false,\n \"description\": \"\",\n \"taskListTemplateId\": 0,\n \"customChecklistItems\": [\n \"\"\n ]\n}", + "options": { + "raw": { + "language": "json" + } + }, + "description": "Illustrative placeholder generated from #/components/schemas/Dispatch_DTO; replace placeholder values before sending." + } + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "POST /api/workorders/UpdateChecklistItem", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/workorders/UpdateChecklistItem", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "workorders", + "UpdateChecklistItem" + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): WorkOrderDispatch\nOperation ID: not specified\n\nParameters: none\nRequest body: application/json, text/json, application/*+json; Illustrative placeholder generated from #/components/schemas/ChecklistItemUpdate_DTO; replace placeholder values before sending.\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending.", + "body": { + "mode": "raw", + "raw": "{\n \"id\": 0,\n \"isCompleted\": false,\n \"completedBy\": \"\"\n}", + "options": { + "raw": { + "language": "json" + } + }, + "description": "Illustrative placeholder generated from #/components/schemas/ChecklistItemUpdate_DTO; replace placeholder values before sending." + } + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "POST /api/workorders/UpdateDispatch", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/workorders/UpdateDispatch", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "workorders", + "UpdateDispatch" + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): WorkOrderDispatch\nOperation ID: not specified\n\nParameters: none\nRequest body: application/json, text/json, application/*+json; Illustrative placeholder generated from #/components/schemas/UpdateDispatch_DTO; replace placeholder values before sending.\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending.", + "body": { + "mode": "raw", + "raw": "{\n \"id\": 0,\n \"status\": \"\",\n \"nteAmount\": 0,\n \"scheduledDate\": \"2026-01-01T00:00:00Z\",\n \"estimatedArrivalAt\": \"2026-01-01T00:00:00Z\",\n \"etaManualOverride\": false,\n \"completedDate\": \"2026-01-01T00:00:00Z\",\n \"description\": \"\"\n}", + "options": { + "raw": { + "language": "json" + } + }, + "description": "Illustrative placeholder generated from #/components/schemas/UpdateDispatch_DTO; replace placeholder values before sending." + } + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "POST /api/workorders/VerifyDispatch", + "request": { + "method": "POST", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/workorders/VerifyDispatch?dispatchId=0", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "workorders", + "VerifyDispatch" + ], + "query": [ + { + "key": "dispatchId", + "value": "0", + "description": "Optional; integer/int32", + "disabled": false + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): WorkOrderDispatch\nOperation ID: not specified\n\nParameters: query dispatchId (optional, integer/int32)\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + } + ] + }, + { + "name": "WorkOrderIngest", + "item": [ + { + "name": "POST /api/workorders/ingest", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/workorders/ingest", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "workorders", + "ingest" + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): WorkOrderIngest\nOperation ID: not specified\n\nParameters: none\nRequest body: application/json, text/json, application/*+json; Illustrative placeholder generated from #/components/schemas/WorkOrderIngestBatchRequestDto; replace placeholder values before sending.\nDocumented response codes: 200 (text/plain, application/json, text/json)\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending.", + "body": { + "mode": "raw", + "raw": "{\n \"items\": [\n {\n \"externalWorkOrderId\": \"\",\n \"description\": \"\",\n \"woStatus\": \"\",\n \"severity\": \"\",\n \"customer\": \"\",\n \"siteCode\": \"\",\n \"building\": \"\",\n \"address\": \"\",\n \"dueDate\": \"2026-01-01T00:00:00Z\",\n \"dateReported\": \"2026-01-01T00:00:00Z\",\n \"scheduledStart\": \"2026-01-01T00:00:00Z\",\n \"sourceEmailS3Key\": \"\",\n \"createdAt\": \"2026-01-01T00:00:00Z\"\n }\n ]\n}", + "options": { + "raw": { + "language": "json" + } + }, + "description": "Illustrative placeholder generated from #/components/schemas/WorkOrderIngestBatchRequestDto; replace placeholder values before sending." + } + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + } + ] + }, + { + "name": "WorkOrderJobs", + "item": [ + { + "name": "POST /api/workorders/jobs/past-due-cache", + "request": { + "method": "POST", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/workorders/jobs/past-due-cache", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "workorders", + "jobs", + "past-due-cache" + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): WorkOrderJobs\nOperation ID: not specified\n\nParameters: none\nRequest body: none documented\nDocumented response codes: 200 (text/plain, application/json, text/json)\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "POST /api/workorders/jobs/week-rolled", + "request": { + "method": "POST", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/workorders/jobs/week-rolled?sourceWeekStart=", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "workorders", + "jobs", + "week-rolled" + ], + "query": [ + { + "key": "sourceWeekStart", + "value": "", + "description": "Optional; #/components/schemas/DateOnly", + "disabled": false + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): WorkOrderJobs\nOperation ID: not specified\n\nParameters: query sourceWeekStart (optional, #/components/schemas/DateOnly)\nRequest body: none documented\nDocumented response codes: 200 (text/plain, application/json, text/json)\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + } + ] + }, + { + "name": "WorkOrderMedia", + "item": [ + { + "name": "DELETE /api/WorkOrder/{id}/media/{mediaId}", + "request": { + "method": "DELETE", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/WorkOrder/:id/media/:mediaId?workOrderVersion=", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "WorkOrder", + ":id", + "media", + ":mediaId" + ], + "query": [ + { + "key": "workOrderVersion", + "value": "", + "description": "Optional; string", + "disabled": false + } + ], + "variable": [ + { + "key": "id", + "value": "0", + "description": "Required; integer/int32" + }, + { + "key": "mediaId", + "value": "0", + "description": "Required; integer/int32" + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): WorkOrderMedia\nOperation ID: not specified\n\nParameters: path id (required, integer/int32); path mediaId (required, integer/int32); query workOrderVersion (optional, string)\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "DELETE /api/workorders/{id}/media/{mediaId}", + "request": { + "method": "DELETE", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/workorders/:id/media/:mediaId?workOrderVersion=", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "workorders", + ":id", + "media", + ":mediaId" + ], + "query": [ + { + "key": "workOrderVersion", + "value": "", + "description": "Optional; string", + "disabled": false + } + ], + "variable": [ + { + "key": "id", + "value": "0", + "description": "Required; integer/int32" + }, + { + "key": "mediaId", + "value": "0", + "description": "Required; integer/int32" + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): WorkOrderMedia\nOperation ID: not specified\n\nParameters: path id (required, integer/int32); path mediaId (required, integer/int32); query workOrderVersion (optional, string)\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "GET /api/WorkOrder/{id}/media", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/WorkOrder/:id/media", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "WorkOrder", + ":id", + "media" + ], + "variable": [ + { + "key": "id", + "value": "0", + "description": "Required; integer/int32" + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): WorkOrderMedia\nOperation ID: not specified\n\nParameters: path id (required, integer/int32)\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "GET /api/WorkOrder/{id}/media/{mediaId}/content", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/WorkOrder/:id/media/:mediaId/content", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "WorkOrder", + ":id", + "media", + ":mediaId", + "content" + ], + "variable": [ + { + "key": "id", + "value": "0", + "description": "Required; integer/int32" + }, + { + "key": "mediaId", + "value": "0", + "description": "Required; integer/int32" + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): WorkOrderMedia\nOperation ID: not specified\n\nParameters: path id (required, integer/int32); path mediaId (required, integer/int32)\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "GET /api/workorders/{id}/media", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/workorders/:id/media", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "workorders", + ":id", + "media" + ], + "variable": [ + { + "key": "id", + "value": "0", + "description": "Required; integer/int32" + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): WorkOrderMedia\nOperation ID: not specified\n\nParameters: path id (required, integer/int32)\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "GET /api/workorders/{id}/media/{mediaId}/content", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/workorders/:id/media/:mediaId/content", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "workorders", + ":id", + "media", + ":mediaId", + "content" + ], + "variable": [ + { + "key": "id", + "value": "0", + "description": "Required; integer/int32" + }, + { + "key": "mediaId", + "value": "0", + "description": "Required; integer/int32" + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): WorkOrderMedia\nOperation ID: not specified\n\nParameters: path id (required, integer/int32); path mediaId (required, integer/int32)\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "PATCH /api/WorkOrder/{id}/media/{mediaId}", + "request": { + "method": "PATCH", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/WorkOrder/:id/media/:mediaId", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "WorkOrder", + ":id", + "media", + ":mediaId" + ], + "variable": [ + { + "key": "id", + "value": "0", + "description": "Required; integer/int32" + }, + { + "key": "mediaId", + "value": "0", + "description": "Required; integer/int32" + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): WorkOrderMedia\nOperation ID: not specified\n\nParameters: path id (required, integer/int32); path mediaId (required, integer/int32)\nRequest body: multipart/form-data; Illustrative placeholder generated from object; replace placeholder values before sending.\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending.", + "body": { + "mode": "formdata", + "formdata": [ + { + "key": "category", + "type": "text", + "value": "1", + "description": "Optional; #/components/schemas/WorkOrderMediaCategory" + }, + { + "key": "workOrderVersion", + "type": "text", + "value": "", + "description": "Optional; string" + } + ], + "description": "Illustrative placeholder generated from object; replace placeholder values before sending." + } + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "PATCH /api/workorders/{id}/media/{mediaId}", + "request": { + "method": "PATCH", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/workorders/:id/media/:mediaId", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "workorders", + ":id", + "media", + ":mediaId" + ], + "variable": [ + { + "key": "id", + "value": "0", + "description": "Required; integer/int32" + }, + { + "key": "mediaId", + "value": "0", + "description": "Required; integer/int32" + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): WorkOrderMedia\nOperation ID: not specified\n\nParameters: path id (required, integer/int32); path mediaId (required, integer/int32)\nRequest body: multipart/form-data; Illustrative placeholder generated from object; replace placeholder values before sending.\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending.", + "body": { + "mode": "formdata", + "formdata": [ + { + "key": "category", + "type": "text", + "value": "1", + "description": "Optional; #/components/schemas/WorkOrderMediaCategory" + }, + { + "key": "workOrderVersion", + "type": "text", + "value": "", + "description": "Optional; string" + } + ], + "description": "Illustrative placeholder generated from object; replace placeholder values before sending." + } + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "POST /api/WorkOrder/{id}/media", + "request": { + "method": "POST", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/WorkOrder/:id/media", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "WorkOrder", + ":id", + "media" + ], + "variable": [ + { + "key": "id", + "value": "0", + "description": "Required; integer/int32" + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): WorkOrderMedia\nOperation ID: not specified\n\nParameters: path id (required, integer/int32)\nRequest body: multipart/form-data; Illustrative placeholder generated from object; replace placeholder values before sending.\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending.", + "body": { + "mode": "formdata", + "formdata": [ + { + "key": "category", + "type": "text", + "value": "1", + "description": "Optional; #/components/schemas/WorkOrderMediaCategory" + }, + { + "key": "ContentType", + "type": "text", + "value": "", + "description": "Optional; string" + }, + { + "key": "ContentDisposition", + "type": "text", + "value": "", + "description": "Optional; string" + }, + { + "key": "Headers", + "type": "text", + "value": "[object Object]", + "description": "Optional; object" + }, + { + "key": "Length", + "type": "text", + "value": "0", + "description": "Optional; integer/int64" + }, + { + "key": "Name", + "type": "text", + "value": "", + "description": "Optional; string" + }, + { + "key": "FileName", + "type": "text", + "value": "", + "description": "Optional; string" + } + ], + "description": "Illustrative placeholder generated from object; replace placeholder values before sending." + } + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "POST /api/workorders/{id}/media", + "request": { + "method": "POST", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/workorders/:id/media", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "workorders", + ":id", + "media" + ], + "variable": [ + { + "key": "id", + "value": "0", + "description": "Required; integer/int32" + } + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): WorkOrderMedia\nOperation ID: not specified\n\nParameters: path id (required, integer/int32)\nRequest body: multipart/form-data; Illustrative placeholder generated from object; replace placeholder values before sending.\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending.", + "body": { + "mode": "formdata", + "formdata": [ + { + "key": "category", + "type": "text", + "value": "1", + "description": "Optional; #/components/schemas/WorkOrderMediaCategory" + }, + { + "key": "ContentType", + "type": "text", + "value": "", + "description": "Optional; string" + }, + { + "key": "ContentDisposition", + "type": "text", + "value": "", + "description": "Optional; string" + }, + { + "key": "Headers", + "type": "text", + "value": "[object Object]", + "description": "Optional; object" + }, + { + "key": "Length", + "type": "text", + "value": "0", + "description": "Optional; integer/int64" + }, + { + "key": "Name", + "type": "text", + "value": "", + "description": "Optional; string" + }, + { + "key": "FileName", + "type": "text", + "value": "", + "description": "Optional; string" + } + ], + "description": "Illustrative placeholder generated from object; replace placeholder values before sending." + } + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + } + ] + }, + { + "name": "WorkOrderOps", + "item": [ + { + "name": "GET /api/workorders/ops/health", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/workorders/ops/health", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "workorders", + "ops", + "health" + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): WorkOrderOps\nOperation ID: not specified\n\nParameters: none\nRequest body: none documented\nDocumented response codes: 200 (text/plain, application/json, text/json)\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + } + ] + }, + { + "name": "WorkOrderReconciliation", + "item": [ + { + "name": "GET /api/admin/work-order-reconciliation", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/admin/work-order-reconciliation", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "admin", + "work-order-reconciliation" + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): WorkOrderReconciliation\nOperation ID: not specified\n\nParameters: none\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + }, + { + "name": "POST /api/admin/work-order-reconciliation", + "request": { + "method": "POST", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/admin/work-order-reconciliation", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "admin", + "work-order-reconciliation" + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): WorkOrderReconciliation\nOperation ID: not specified\n\nParameters: none\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + } + ] + }, + { + "name": "WorkOrderWebhook", + "item": [ + { + "name": "POST /api/webhooks/work-orders", + "request": { + "method": "POST", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/webhooks/work-orders", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "webhooks", + "work-orders" + ] + }, + "description": "Source: https://api.dev.seahaven.com/swagger/v1/swagger.json\nTag(s): WorkOrderWebhook\nOperation ID: not specified\n\nParameters: none\nRequest body: none documented\nDocumented response codes: 200\n\nBody values and parameter values are safe illustrative placeholders; review them against the target record before sending." + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "const documented = [200];", + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});" + ] + } + } + ] + } + ] + } + ] +} diff --git a/postman/SeaHaven-Dev.postman_environment.json b/postman/SeaHaven-Dev.postman_environment.json new file mode 100644 index 0000000..38d1aeb --- /dev/null +++ b/postman/SeaHaven-Dev.postman_environment.json @@ -0,0 +1,30 @@ +{ + "name": "SeaHaven - Dev", + "values": [ + { + "key": "baseUrl", + "value": "https://api.dev.seahaven.com", + "type": "default", + "enabled": true + }, + { + "key": "username", + "value": "", + "type": "secret", + "enabled": true + }, + { + "key": "password", + "value": "", + "type": "secret", + "enabled": true + }, + { + "key": "token", + "value": "", + "type": "secret", + "enabled": true + } + ], + "_postman_variable_scope": "environment" +} diff --git a/scripts/generate-postman-collection.mjs b/scripts/generate-postman-collection.mjs new file mode 100644 index 0000000..39f0d60 --- /dev/null +++ b/scripts/generate-postman-collection.mjs @@ -0,0 +1,375 @@ +#!/usr/bin/env node + +import fs from "node:fs/promises"; +import path from "node:path"; +import process from "node:process"; + +const DEFAULT_SOURCE = "https://api.dev.seahaven.com/swagger/v1/swagger.json"; +const ROOT = path.resolve(new URL("..", import.meta.url).pathname); +const COLLECTION_PATH = path.join(ROOT, "postman", "SeaHaven-Dev.postman_collection.json"); +const ENVIRONMENT_PATH = path.join(ROOT, "postman", "SeaHaven-Dev.postman_environment.json"); +const METHODS = ["get", "post", "put", "patch", "delete", "options", "head", "trace"]; + +const sourceArg = process.argv.find((arg) => arg.startsWith("--source=")); +const inputArg = process.argv.find((arg) => arg.startsWith("--input=")); +const sourceUrl = sourceArg ? sourceArg.slice("--source=".length) : DEFAULT_SOURCE; +const checkOnly = process.argv.includes("--check"); + +function operationEntries(document) { + return Object.entries(document.paths ?? {}).flatMap(([route, pathItem]) => + METHODS.filter((method) => pathItem?.[method]).map((method) => ({ + route, + method, + operation: pathItem[method], + pathParameters: pathItem.parameters ?? [], + })), + ); +} + +function schemaRefName(ref) { + return typeof ref === "string" ? ref.split("/").pop() : undefined; +} + +function resolveSchema(schema, document) { + if (!schema) return undefined; + if (schema.$ref) return document.components?.schemas?.[schemaRefName(schema.$ref)] ?? schema; + return schema; +} + +function safeSample(schema, document, name = "value", depth = 0, seen = new Set()) { + const resolved = resolveSchema(schema, document) ?? {}; + if (depth > 4) return ""; + if (resolved.$ref) { + if (seen.has(resolved.$ref)) return ""; + seen.add(resolved.$ref); + } + if (resolved.enum?.length) return resolved.enum[0]; + if (resolved.oneOf?.length) return safeSample(resolved.oneOf[0], document, name, depth + 1, seen); + if (resolved.anyOf?.length) return safeSample(resolved.anyOf[0], document, name, depth + 1, seen); + if (resolved.allOf?.length) { + return resolved.allOf.reduce((acc, part) => { + const value = safeSample(part, document, name, depth + 1, seen); + return typeof value === "object" && value && !Array.isArray(value) ? { ...acc, ...value } : value; + }, {}); + } + if (resolved.type === "array" || resolved.items) { + return [safeSample(resolved.items ?? {}, document, `${name}Item`, depth + 1, seen)]; + } + if (resolved.type === "object" || resolved.properties || resolved.additionalProperties) { + const object = {}; + for (const [property, propertySchema] of Object.entries(resolved.properties ?? {})) { + object[property] = safeSample(propertySchema, document, property, depth + 1, seen); + } + return object; + } + switch (resolved.format) { + case "date-time": return "2026-01-01T00:00:00Z"; + case "date": return "2026-01-01"; + case "uuid": return "00000000-0000-0000-0000-000000000000"; + case "email": return "user@example.com"; + case "uri": return "https://example.com/resource"; + case "binary": return ""; + default: break; + } + switch (resolved.type) { + case "integer": + case "number": return 0; + case "boolean": return false; + case "null": return null; + default: return ""; + } +} + +function schemaHint(schema) { + if (!schema) return "schema unspecified"; + if (schema.$ref) return schema.$ref; + const bits = [schema.type, schema.format].filter(Boolean); + if (schema.enum?.length) bits.push(`enum: ${schema.enum.join(", ")}`); + return bits.join("/") || "schema"; +} + +function parameterValue(parameter, document) { + const schema = parameter.schema ?? {}; + if (schema.enum?.length) return String(schema.enum[0]); + if (parameter.example !== undefined) return String(parameter.example); + if (schema.type === "boolean") return "false"; + if (["integer", "number"].includes(schema.type)) return "0"; + if (schema.type === "array") return ""; + return ""; +} + +function mergeParameters(entry) { + const parameters = [...entry.pathParameters, ...(entry.operation.parameters ?? [])]; + const seen = new Set(); + return parameters.filter((parameter) => { + const key = `${parameter.in}:${parameter.name}`; + if (seen.has(key)) return false; + seen.add(key); + return ["path", "query", "header"].includes(parameter.in); + }); +} + +function urlFor(entry, parameters) { + const pathParameters = parameters.filter((p) => p.in === "path"); + const queryParameters = parameters.filter((p) => p.in === "query"); + const headerParameters = parameters.filter((p) => p.in === "header"); + const postmanPath = entry.route.replaceAll(/\{([^}]+)\}/g, ":$1"); + const query = queryParameters.map((p) => ({ + key: p.name, + value: parameterValue(p), + description: `${p.required ? "Required" : "Optional"}; ${schemaHint(p.schema)}`, + disabled: false, + })); + const raw = `{{baseUrl}}${postmanPath}${query.length ? `?${query.map((p) => `${p.key}=${p.value}`).join("&")}` : ""}`; + return { + raw, + host: ["{{baseUrl}}"], + path: postmanPath.split("/").filter(Boolean), + ...(query.length ? { query } : {}), + ...(pathParameters.length ? { + variable: pathParameters.map((p) => ({ + key: p.name, + value: parameterValue(p), + description: `${p.required ? "Required" : "Optional"}; ${schemaHint(p.schema)}`, + })), + } : {}), + }; +} + +function bodyFor(entry, document) { + const content = entry.operation.requestBody?.content ?? {}; + const mediaTypes = Object.keys(content); + const jsonType = mediaTypes.find((type) => type === "application/json" || type === "text/json" || type.includes("+json")); + const type = jsonType ?? mediaTypes.find((value) => value === "multipart/form-data") ?? mediaTypes[0]; + if (!type) return undefined; + const schema = content[type]?.schema; + const description = `Illustrative placeholder generated from ${schemaHint(schema)}; replace placeholder values before sending.`; + if (type === "multipart/form-data") { + const resolved = resolveSchema(schema, document) ?? {}; + const formdata = Object.entries(resolved.properties ?? {}).map(([key, propertySchema]) => ({ + key, + type: propertySchema.format === "binary" ? "file" : "text", + ...(propertySchema.format === "binary" ? { src: "" } : { value: String(safeSample(propertySchema, document, key)) }), + description: `${resolved.required?.includes(key) ? "Required" : "Optional"}; ${schemaHint(propertySchema)}`, + })); + return { mode: "formdata", formdata, description }; + } + if (type === "application/octet-stream") return { mode: "file", file: { src: "" }, description }; + if (type.startsWith("text/")) return { mode: "raw", raw: "", options: { raw: { language: "text" } }, description }; + return { mode: "raw", raw: JSON.stringify(safeSample(schema, document), null, 2), options: { raw: { language: "json" } }, description }; +} + +function operationDescription(entry, document, parameters, body) { + const operation = entry.operation; + const responses = Object.entries(operation.responses ?? {}) + .sort(([a], [b]) => a.localeCompare(b)) + .map(([code, response]) => { + const mediaTypes = Object.keys(response.content ?? {}); + return `${code}${mediaTypes.length ? ` (${mediaTypes.join(", ")})` : ""}`; + }) + .join(", ") || "not documented"; + const requestMediaTypes = Object.keys(operation.requestBody?.content ?? {}); + const lines = [ + `Source: ${sourceUrl}`, + `Tag(s): ${(operation.tags ?? ["Other"]).join(", ")}`, + `Operation ID: ${operation.operationId ?? "not specified"}`, + "", + operation.summary ?? "", + operation.description ?? "", + "", + `Parameters: ${parameters.length ? parameters.map((p) => `${p.in} ${p.name} (${p.required ? "required" : "optional"}, ${schemaHint(p.schema)})`).join("; ") : "none"}`, + `Request body: ${body ? `${requestMediaTypes.join(", ") || "media type unspecified"}; ${body.description}` : "none documented"}`, + `Documented response codes: ${responses}`, + "", + "Body values and parameter values are safe illustrative placeholders; review them against the target record before sending.", + ]; + return lines.filter((line, index) => !(line === "" && lines[index - 1] === "")).join("\n").trim(); +} + +function testEvent(operation) { + const codes = Object.keys(operation.responses ?? {}).filter((key) => /^\d{3}$/.test(key)).map(Number); + if (!codes.length) return []; + return [{ + listen: "test", + script: { + type: "text/javascript", + exec: [ + `const documented = [${codes.join(", ")}];`, + "pm.test(\"Response status is documented by OpenAPI\", function () {", + " pm.expect(documented).to.include(pm.response.code);", + "});", + ], + }, + }]; +} + +function requestItem(entry, document) { + const parameters = mergeParameters(entry); + const body = bodyFor(entry, document); + const headers = parameters.filter((p) => p.in === "header").map((p) => ({ + key: p.name, + value: parameterValue(p), + description: `${p.required ? "Required" : "Optional"}; ${schemaHint(p.schema)}`, + })); + if (body?.mode === "raw" && body.options?.raw?.language === "json") headers.push({ key: "Content-Type", value: "application/json" }); + if (body?.mode === "raw" && body.options?.raw?.language === "text") headers.push({ key: "Content-Type", value: "text/plain" }); + const item = { + name: `${entry.method.toUpperCase()} ${entry.route}`, + request: { + method: entry.method.toUpperCase(), + header: headers, + url: urlFor(entry, parameters), + description: operationDescription(entry, document, parameters, body), + ...(body ? { body } : {}), + }, + event: testEvent(entry.operation), + }; + return item; +} + +function setupItems(document) { + const login = operationEntries(document).find((entry) => entry.route.toLowerCase() === "/api/authentication/login" && entry.method === "post"); + const loginSchema = login?.operation.requestBody?.content?.["application/json"]?.schema; + return [ + { + name: "Swagger - OpenAPI document", + request: { + auth: { type: "noauth" }, method: "GET", header: [], + url: { raw: "{{baseUrl}}/swagger/v1/swagger.json", host: ["{{baseUrl}}"], path: ["swagger", "v1", "swagger.json"] }, + description: `Live OpenAPI contract for dev (${sourceUrl}). Import this URL when you need the latest server surface. No auth required.`, + }, + event: [{ listen: "test", script: { type: "text/javascript", exec: [ + "pm.test(\"OpenAPI document responded 200\", function () { pm.response.to.have.status(200); });", + "pm.test(\"OpenAPI document is JSON\", function () { pm.expect(pm.response.headers.get(\"Content-Type\")).to.include(\"application/json\"); });", + "pm.test(\"OpenAPI document has paths\", function () { pm.expect(pm.response.json()).to.have.property(\"paths\"); });", + ] } }], + }, + { + name: "Authentication - Login", + request: { + auth: { type: "noauth" }, method: "POST", header: [{ key: "Content-Type", value: "application/json" }], + body: { mode: "raw", raw: JSON.stringify({ username: "{{username}}", password: "{{password}}" }, null, 2), options: { raw: { language: "json" } }, description: "Credentials are read from the selected secret environment and are never logged." }, + url: { raw: "{{baseUrl}}/api/Authentication/login", host: ["{{baseUrl}}"], path: ["api", "Authentication", "login"] }, + description: `Authentication login from ${sourceUrl}. A successful response stores only the non-empty token in the selected environment. Schema: ${schemaHint(loginSchema)}.`, + }, + event: [ + { listen: "prerequest", script: { type: "text/javascript", exec: [ + "pm.environment.set(\"token\", \"\");", + "const username = pm.environment.get(\"username\");", + "const password = pm.environment.get(\"password\");", + "if (!username || !password) {", + " pm.execution.skipRequest();", + " throw new Error(\"Select the SeaHaven - Dev environment and set username and password before logging in.\");", + "}", + ] } }, + { listen: "test", script: { type: "text/javascript", exec: [ + "pm.test(\"Login responded 200\", function () { pm.response.to.have.status(200); });", + "let body;", + "pm.test(\"Login responded with JSON\", function () { pm.expect(pm.response.headers.get(\"Content-Type\")).to.include(\"application/json\"); body = pm.response.json(); });", + "const token = body && body.token;", + "pm.test(\"Login response contained a non-empty token\", function () { pm.expect(token, \"expected a non-empty token field\").to.be.a(\"string\").and.not.empty; });", + "if (typeof token === \"string\" && token.length > 0) pm.environment.set(\"token\", token);", + ] } }, + ], + }, + ]; +} + +function buildCollection(document) { + const entries = operationEntries(document); + const loginEntry = entries.find((entry) => entry.route.toLowerCase() === "/api/authentication/login" && entry.method === "post"); + const folders = new Map(); + for (const entry of entries) { + if (entry === loginEntry) continue; + const tag = [...(entry.operation.tags ?? ["Other"])].sort()[0] ?? "Other"; + if (!folders.has(tag)) folders.set(tag, []); + folders.get(tag).push(requestItem(entry, document)); + } + const generatedFolders = [...folders.entries()].sort(([a], [b]) => a.localeCompare(b)).map(([name, items]) => ({ + name, + item: items.sort((a, b) => a.name.localeCompare(b.name)), + })); + return { + info: { + name: "SeaHaven - Dev API (OpenAPI generated)", + _postman_id: "a1f0514a-5e9f-41bd-a145-7163671b94db", + description: `Complete Postman collection generated from ${sourceUrl}. It contains every OpenAPI operation in the published dev contract. Dev only. Replace illustrative placeholders before sending requests.`, + schema: "https://schema.getpostman.com/json/collection/v2.1.0/collection.json", + }, + auth: { type: "bearer", bearer: [{ key: "token", value: "{{token}}", type: "string" }] }, + variable: [{ key: "baseUrl", value: "https://api.dev.seahaven.com", type: "string" }], + item: [{ name: "Setup", item: setupItems(document) }, ...generatedFolders], + }; +} + +function flattenCollectionItems(items, folder = "") { + return items.flatMap((item) => item.item ? flattenCollectionItems(item.item, `${folder}${item.name}/`) : [{ ...item, folder }]); +} + +function validate(document, collection) { + const sourceEntries = operationEntries(document); + const allItems = flattenCollectionItems(collection.item); + const generated = allItems.filter((item) => !item.folder.startsWith("Setup/")); + const setupLogin = allItems.find((item) => item.name === "Authentication - Login"); + const sourceKeys = new Set(sourceEntries.map((entry) => `${entry.method.toUpperCase()} ${entry.route}`)); + const requestKey = (item) => `${item.request.method} ${item.request.url.raw.replace("{{baseUrl}}", "").replace(/\?.*$/, "").replaceAll(/:([^/]+)/g, "{$1}")}`; + const representedItems = [...generated, setupLogin].filter(Boolean); + const representedKeys = new Set(representedItems.map(requestKey)); + const bodyCount = sourceEntries.filter((entry) => entry.operation.requestBody).length; + const generatedBodyCount = representedItems.filter((item) => item.request.body).length; + const authFailures = generated.filter((item) => item.request.auth?.type === "noauth"); + const authConfig = collection.auth?.type === "bearer" && collection.auth.bearer?.some((entry) => entry.key === "token" && entry.value === "{{token}}"); + const missingKeys = [...sourceKeys].filter((key) => !representedKeys.has(key)); + const extraKeys = [...representedKeys].filter((key) => !sourceKeys.has(key)); + const checks = [ + ["operation count", representedKeys.size, sourceEntries.length], + ["unique operation keys", missingKeys.length + extraKeys.length, 0], + ["request-body coverage", generatedBodyCount, bodyCount], + ["protected operations inherit collection auth", authFailures.length, 0], + ["collection bearer token auth", authConfig, true], + ["login is explicitly noauth", setupLogin?.request?.auth?.type, "noauth"], + ]; + const failures = checks.filter(([, actual, expected]) => actual !== expected); + if (failures.length) { + for (const [label, actual, expected] of failures) console.error(`FAIL ${label}: expected ${expected}, observed ${actual}`); + process.exitCode = 1; + return false; + } + for (const [label, actual, expected] of checks) console.log(`PASS ${label}: ${actual}`); + if (missingKeys.length || extraKeys.length) { + console.error(`Operation key mismatch. Missing: ${missingKeys.join(", ")}; extra: ${extraKeys.join(", ")}`); + process.exitCode = 1; + return false; + } + return true; +} + +async function loadDocument() { + if (inputArg) return JSON.parse(await fs.readFile(inputArg.slice("--input=".length), "utf8")); + const response = await fetch(sourceUrl, { headers: { accept: "application/json" } }); + if (!response.ok) throw new Error(`OpenAPI fetch failed: HTTP ${response.status}`); + const contentType = response.headers.get("content-type") ?? ""; + if (!contentType.includes("json")) throw new Error(`OpenAPI fetch returned non-JSON content type: ${contentType}`); + return response.json(); +} + +const document = await loadDocument(); +const collection = buildCollection(document); +if (checkOnly) { + const existing = JSON.parse(await fs.readFile(COLLECTION_PATH, "utf8")); + validate(document, existing); +} else { + await fs.writeFile(COLLECTION_PATH, `${JSON.stringify(collection, null, 2)}\n`); + await fs.writeFile(ENVIRONMENT_PATH, `${JSON.stringify({ + name: "SeaHaven - Dev", + values: [ + { key: "baseUrl", value: "https://api.dev.seahaven.com", type: "default", enabled: true }, + { key: "username", value: "", type: "secret", enabled: true }, + { key: "password", value: "", type: "secret", enabled: true }, + { key: "token", value: "", type: "secret", enabled: true }, + ], + _postman_variable_scope: "environment", + }, null, 2)}\n`); + console.log(`Generated ${operationEntries(document).length} operations at ${COLLECTION_PATH}`); + validate(document, collection); +} From 802b7a414e3db1ff514a1f5197dd11e78c99a355 Mon Sep 17 00:00:00 2001 From: Alexandre Brandizzi Date: Tue, 15 Sep 2026 16:46:40 -0300 Subject: [PATCH 005/183] SH-338: filter unscheduled work orders before pagination (#116) * fix(work-orders): filter unscheduled search server-side * fix(work-orders): preserve unscheduled status scope --- .../Helpers/WorkOrderBoardQueryFilters.cs | 13 + .../WorkOrderAdvancedSearchDataService.cs | 17 +- .../WorkOrderAdvancedSearchModels.cs | 1 + .../DTOs/WorkOrderBoardRequestDTOs.cs | 6 + .../WorkOrderAdvancedSearchService.cs | 13 +- .../WorkOrderBoardSearchTests.cs | 440 ++++++++++++++++++ 6 files changed, 479 insertions(+), 11 deletions(-) diff --git a/SeaHaven.DataServices/Helpers/WorkOrderBoardQueryFilters.cs b/SeaHaven.DataServices/Helpers/WorkOrderBoardQueryFilters.cs index 44f965b..7ff26ba 100644 --- a/SeaHaven.DataServices/Helpers/WorkOrderBoardQueryFilters.cs +++ b/SeaHaven.DataServices/Helpers/WorkOrderBoardQueryFilters.cs @@ -173,6 +173,19 @@ namespace SeaHaven.DataServices.Helpers || (w.Problem ?? "").ToLower().Contains(pm))); } + /// + /// Restricts to unscheduled rows. A null ScheduledDate is the canonical + /// unscheduled representation; replaces the date-range filter when the + /// unscheduled-only search mode is active. Mirrors the undated branch of + /// : completed and canceled rows are + /// excluded so both modes agree on the protected unscheduled semantics. + /// + public static IQueryable ApplyUnscheduledOnlyFilter(IQueryable query) + => query.Where(w => + w.ScheduledDate == null + && w.LifecycleStatus != LifecycleStatus.Completed + && w.LifecycleStatus != LifecycleStatus.Canceled); + public static IQueryable ApplyDateRangeFilter( IQueryable query, DateOnly dateFrom, diff --git a/SeaHaven.DataServices/Implementation/WorkOrderAdvancedSearchDataService.cs b/SeaHaven.DataServices/Implementation/WorkOrderAdvancedSearchDataService.cs index 2eebc30..ceac856 100644 --- a/SeaHaven.DataServices/Implementation/WorkOrderAdvancedSearchDataService.cs +++ b/SeaHaven.DataServices/Implementation/WorkOrderAdvancedSearchDataService.cs @@ -19,7 +19,10 @@ namespace SeaHaven.DataServices.Implementation var baseQuery = WorkOrderBoardQueryFilters.ApplyBaseScope(_context.workOrders.AsNoTracking()); if (query.AccountId.HasValue) baseQuery = WorkOrderBoardQueryFilters.ApplyAccountScope(baseQuery, query.AccountId.Value); - baseQuery = WorkOrderBoardQueryFilters.ApplyDateRangeFilter(baseQuery, query.DateFrom, query.DateTo); + if (query.UnscheduledOnly) + baseQuery = WorkOrderBoardQueryFilters.ApplyUnscheduledOnlyFilter(baseQuery); + else + baseQuery = WorkOrderBoardQueryFilters.ApplyDateRangeFilter(baseQuery, query.DateFrom, query.DateTo); baseQuery = WorkOrderBoardQueryFilters.ApplySiteFilter(baseQuery, query.Sites); baseQuery = WorkOrderBoardQueryFilters.ApplyTypeFilter(baseQuery, query.Types, query.Overdue); baseQuery = WorkOrderBoardQueryFilters.ApplyDispatcherFilter( @@ -61,14 +64,14 @@ namespace SeaHaven.DataServices.Implementation return field switch { "wonumber" or "woNumber" => descending - ? query.OrderByDescending(w => w.InternalWONumber) - : query.OrderBy(w => w.InternalWONumber), + ? query.OrderByDescending(w => w.InternalWONumber).ThenBy(w => w.Id) + : query.OrderBy(w => w.InternalWONumber).ThenBy(w => w.Id), "duedate" or "dueDate" => descending - ? query.OrderByDescending(w => w.DueDate).ThenBy(w => w.InternalWONumber) - : query.OrderBy(w => w.DueDate).ThenBy(w => w.InternalWONumber), + ? query.OrderByDescending(w => w.DueDate).ThenBy(w => w.InternalWONumber).ThenBy(w => w.Id) + : query.OrderBy(w => w.DueDate).ThenBy(w => w.InternalWONumber).ThenBy(w => w.Id), _ => descending - ? query.OrderByDescending(w => w.ScheduledDate).ThenByDescending(w => w.InternalWONumber) - : query.OrderBy(w => w.ScheduledDate).ThenBy(w => w.InternalWONumber) + ? query.OrderByDescending(w => w.ScheduledDate).ThenByDescending(w => w.InternalWONumber).ThenBy(w => w.Id) + : query.OrderBy(w => w.ScheduledDate).ThenBy(w => w.InternalWONumber).ThenBy(w => w.Id) }; } } diff --git a/SeaHaven.DataServices/Interfaces/WorkOrderAdvancedSearchModels.cs b/SeaHaven.DataServices/Interfaces/WorkOrderAdvancedSearchModels.cs index 44889dc..576af7a 100644 --- a/SeaHaven.DataServices/Interfaces/WorkOrderAdvancedSearchModels.cs +++ b/SeaHaven.DataServices/Interfaces/WorkOrderAdvancedSearchModels.cs @@ -7,6 +7,7 @@ namespace SeaHaven.DataServices.Interfaces string? Search, DateOnly DateFrom, DateOnly DateTo, + bool UnscheduledOnly, IReadOnlyList? Sites, IReadOnlyList? Types, bool Overdue, diff --git a/SeaHaven.Services/DTOs/WorkOrderBoardRequestDTOs.cs b/SeaHaven.Services/DTOs/WorkOrderBoardRequestDTOs.cs index e53adb1..8c04373 100644 --- a/SeaHaven.Services/DTOs/WorkOrderBoardRequestDTOs.cs +++ b/SeaHaven.Services/DTOs/WorkOrderBoardRequestDTOs.cs @@ -66,6 +66,12 @@ namespace SeaHaven.Services.DTOs public WorkOrderAdvancedSearchDatePreset? DatePreset { get; set; } public DateOnly? DateFrom { get; set; } public DateOnly? DateTo { get; set; } + /// + /// When true, only unscheduled rows (ScheduledDate is null) are returned. + /// Takes precedence over DatePreset/DateFrom/DateTo for the scheduled-date + /// filter; every other facet still applies. + /// + public bool UnscheduledOnly { get; set; } public List? Sites { get; set; } public List? Types { get; set; } /// When true, include past-due (isPastDue) rows. Combined with Types via OR. diff --git a/SeaHaven.Services/Implementation/WorkOrderAdvancedSearchService.cs b/SeaHaven.Services/Implementation/WorkOrderAdvancedSearchService.cs index 071acf0..6c4e3da 100644 --- a/SeaHaven.Services/Implementation/WorkOrderAdvancedSearchService.cs +++ b/SeaHaven.Services/Implementation/WorkOrderAdvancedSearchService.cs @@ -32,10 +32,14 @@ namespace SeaHaven.Services.Implementation var page = query.Page < 0 ? 0 : query.Page; var pageSize = query.PageSize < 1 ? DefaultPageSize : Math.Min(query.PageSize, MaxPageSize); - var dateRange = WorkOrderSearchDateRangeResolver.Resolve( - query.DatePreset, - query.DateFrom, - query.DateTo); + // Unscheduled-only mode ignores the scheduled-date range entirely; + // the inert wide range keeps the data contract satisfied. + var dateRange = query.UnscheduledOnly + ? new WorkOrderSearchDateRange(DateOnly.MinValue, DateOnly.MaxValue) + : WorkOrderSearchDateRangeResolver.Resolve( + query.DatePreset, + query.DateFrom, + query.DateTo); var sortBy = WorkOrderBoardSortFields.NormalizeOrThrow(query.SortBy); @@ -43,6 +47,7 @@ namespace SeaHaven.Services.Implementation WorkOrderBoardSearchFilter.NormalizeSearch(query.Search), dateRange.From, dateRange.To, + query.UnscheduledOnly, query.Sites, query.Types, query.Overdue, diff --git a/SeaHavenIndustries.Tests/WorkOrderBoardSearchTests.cs b/SeaHavenIndustries.Tests/WorkOrderBoardSearchTests.cs index 9c8dd75..721291a 100644 --- a/SeaHavenIndustries.Tests/WorkOrderBoardSearchTests.cs +++ b/SeaHavenIndustries.Tests/WorkOrderBoardSearchTests.cs @@ -1048,4 +1048,444 @@ public class WorkOrderAdvancedSearchServiceTests Assert.Equal(1, result.Items.Single().Id); Assert.True(result.Items.Single().AvetaRequired); } + + [Fact] + public async Task SearchAsync_UnscheduledOnly_ReturnsOnlyUndatedRows() + { + await using var context = CreateContext(); + var weekStart = new DateOnly(2026, 6, 22); + + context.workOrders.AddRange( + new WorkOrder + { + Id = 1, + ScheduledDate = new DateTime(2026, 6, 23), + LifecycleStatus = LifecycleStatus.Scheduled, + InternalWONumber = "10000000001", + istemplate = false + }, + new WorkOrder + { + Id = 2, + ScheduledDate = null, + LifecycleStatus = LifecycleStatus.Incomplete, + InternalWONumber = "10000000002", + istemplate = false + }); + + await context.SaveChangesAsync(); + + var dataService = new WorkOrderAdvancedSearchDataService(context); + var service = new SeaHaven.Services.Implementation.WorkOrderAdvancedSearchService( + dataService, + WorkOrderAccountTestHelpers.Resolver(context)); + + var result = await service.SearchAsync(new SeaHaven.Services.DTOs.WorkOrderAdvancedSearchQueryDto + { + DatePreset = SeaHaven.Services.Helpers.WorkOrderAdvancedSearchDatePreset.Custom, + DateFrom = weekStart, + DateTo = weekStart.AddDays(4), + UnscheduledOnly = true + }, WorkOrderAccountTestHelpers.OrgWideAdmin(), null); + + Assert.Equal(1, result.TotalCount); + Assert.Single(result.Items); + Assert.Equal(2, result.Items.Single().Id); + Assert.Null(result.Items.Single().ScheduledDate); + } + + [Fact] + public async Task SearchAsync_UnscheduledOnlyFalse_MatchesDefaultRangeSearch() + { + await using var context = CreateContext(); + var weekStart = new DateOnly(2026, 6, 22); + + context.workOrders.AddRange( + new WorkOrder + { + Id = 1, + ScheduledDate = new DateTime(2026, 6, 23), + LifecycleStatus = LifecycleStatus.Scheduled, + InternalWONumber = "10000000001", + istemplate = false + }, + new WorkOrder + { + Id = 2, + ScheduledDate = new DateTime(2026, 8, 4), + LifecycleStatus = LifecycleStatus.Scheduled, + InternalWONumber = "10000000002", + istemplate = false + }, + new WorkOrder + { + Id = 3, + ScheduledDate = null, + LifecycleStatus = LifecycleStatus.Incomplete, + InternalWONumber = "10000000003", + istemplate = false + }); + + await context.SaveChangesAsync(); + + var dataService = new WorkOrderAdvancedSearchDataService(context); + var service = new SeaHaven.Services.Implementation.WorkOrderAdvancedSearchService( + dataService, + WorkOrderAccountTestHelpers.Resolver(context)); + + var withFlagFalse = await service.SearchAsync(new SeaHaven.Services.DTOs.WorkOrderAdvancedSearchQueryDto + { + DatePreset = SeaHaven.Services.Helpers.WorkOrderAdvancedSearchDatePreset.Custom, + DateFrom = weekStart, + DateTo = weekStart.AddDays(4), + UnscheduledOnly = false + }, WorkOrderAccountTestHelpers.OrgWideAdmin(), null); + + var withFlagAbsent = await service.SearchAsync(new SeaHaven.Services.DTOs.WorkOrderAdvancedSearchQueryDto + { + DatePreset = SeaHaven.Services.Helpers.WorkOrderAdvancedSearchDatePreset.Custom, + DateFrom = weekStart, + DateTo = weekStart.AddDays(4) + }, WorkOrderAccountTestHelpers.OrgWideAdmin(), null); + + Assert.Equal(withFlagAbsent.TotalCount, withFlagFalse.TotalCount); + Assert.Equal( + withFlagAbsent.Items.Select(i => i.Id).ToList(), + withFlagFalse.Items.Select(i => i.Id).ToList()); + Assert.Equal(2, withFlagFalse.TotalCount); + Assert.Contains(withFlagFalse.Items, i => i.Id == 1); + Assert.Contains(withFlagFalse.Items, i => i.Id == 3); + Assert.DoesNotContain(withFlagFalse.Items, i => i.Id == 2); + } + + [Fact] + public async Task SearchAsync_UnscheduledOnly_IgnoresScheduledDateRange() + { + await using var context = CreateContext(); + var weekStart = new DateOnly(2026, 6, 22); + + context.workOrders.AddRange( + new WorkOrder + { + Id = 1, + ScheduledDate = new DateTime(2026, 6, 23), + LifecycleStatus = LifecycleStatus.Scheduled, + InternalWONumber = "10000000001", + istemplate = false + }, + new WorkOrder + { + Id = 2, + ScheduledDate = null, + LifecycleStatus = LifecycleStatus.Incomplete, + InternalWONumber = "10000000002", + istemplate = false + }); + + await context.SaveChangesAsync(); + + var dataService = new WorkOrderAdvancedSearchDataService(context); + var service = new SeaHaven.Services.Implementation.WorkOrderAdvancedSearchService( + dataService, + WorkOrderAccountTestHelpers.Resolver(context)); + + var result = await service.SearchAsync(new SeaHaven.Services.DTOs.WorkOrderAdvancedSearchQueryDto + { + DatePreset = SeaHaven.Services.Helpers.WorkOrderAdvancedSearchDatePreset.Custom, + DateFrom = weekStart, + DateTo = weekStart.AddDays(4), + UnscheduledOnly = true + }, WorkOrderAccountTestHelpers.OrgWideAdmin(), null); + + Assert.Equal(1, result.TotalCount); + Assert.Single(result.Items); + Assert.Equal(2, result.Items.Single().Id); + } + + [Fact] + public async Task SearchAsync_UnscheduledOnly_CustomPresetWithoutDates_DoesNotThrow() + { + await using var context = CreateContext(); + + context.workOrders.Add(new WorkOrder + { + Id = 1, + ScheduledDate = null, + LifecycleStatus = LifecycleStatus.Incomplete, + InternalWONumber = "10000000001", + istemplate = false + }); + await context.SaveChangesAsync(); + + var dataService = new WorkOrderAdvancedSearchDataService(context); + var service = new SeaHaven.Services.Implementation.WorkOrderAdvancedSearchService( + dataService, + WorkOrderAccountTestHelpers.Resolver(context)); + + var result = await service.SearchAsync(new SeaHaven.Services.DTOs.WorkOrderAdvancedSearchQueryDto + { + DatePreset = SeaHaven.Services.Helpers.WorkOrderAdvancedSearchDatePreset.Custom, + UnscheduledOnly = true + }, WorkOrderAccountTestHelpers.OrgWideAdmin(), null); + + Assert.Equal(1, result.TotalCount); + Assert.Equal(1, result.Items.Single().Id); + } + + [Fact] + public async Task SearchAsync_UnscheduledOnly_ComposesWithAccountScopeAndSiteFacet() + { + await using var context = CreateContext(); + await WorkOrderAccountTestHelpers.EnsureAccountAsync(context, 1, "A"); + await WorkOrderAccountTestHelpers.EnsureAccountAsync(context, 2, "B"); + + context.workOrders.AddRange( + new WorkOrder + { + Id = 1, + AccountId = 1, + SiteCode = "BK5", + ScheduledDate = null, + LifecycleStatus = LifecycleStatus.Incomplete, + InternalWONumber = "10000000001", + istemplate = false + }, + new WorkOrder + { + Id = 2, + AccountId = 2, + SiteCode = "BK5", + ScheduledDate = null, + LifecycleStatus = LifecycleStatus.Incomplete, + InternalWONumber = "10000000002", + istemplate = false + }, + new WorkOrder + { + Id = 3, + AccountId = 1, + SiteCode = "BK6", + ScheduledDate = null, + LifecycleStatus = LifecycleStatus.Incomplete, + InternalWONumber = "10000000003", + istemplate = false + }, + new WorkOrder + { + Id = 4, + AccountId = 1, + SiteCode = "BK5", + ScheduledDate = new DateTime(2026, 6, 23), + LifecycleStatus = LifecycleStatus.Scheduled, + InternalWONumber = "10000000004", + istemplate = false + }); + + await context.SaveChangesAsync(); + + var dataService = new WorkOrderAdvancedSearchDataService(context); + var service = new SeaHaven.Services.Implementation.WorkOrderAdvancedSearchService( + dataService, + WorkOrderAccountTestHelpers.Resolver(context)); + + var result = await service.SearchAsync(new SeaHaven.Services.DTOs.WorkOrderAdvancedSearchQueryDto + { + DatePreset = SeaHaven.Services.Helpers.WorkOrderAdvancedSearchDatePreset.Custom, + DateFrom = new DateOnly(2026, 6, 22), + DateTo = new DateOnly(2026, 6, 26), + UnscheduledOnly = true, + Sites = new List { "BK5" } + }, WorkOrderAccountTestHelpers.AccountUser("disp-1", 1, "Dispatcher"), "disp-1"); + + Assert.Equal(1, result.TotalCount); + Assert.Single(result.Items); + Assert.Equal(1, result.Items.Single().Id); + } + + [Fact] + public async Task SearchAsync_UnscheduledOnly_NoUndatedRows_ReturnsEmptyPage() + { + await using var context = CreateContext(); + + context.workOrders.AddRange( + new WorkOrder + { + Id = 1, + ScheduledDate = new DateTime(2026, 6, 23), + LifecycleStatus = LifecycleStatus.Scheduled, + InternalWONumber = "10000000001", + istemplate = false + }, + new WorkOrder + { + Id = 2, + ScheduledDate = new DateTime(2026, 6, 24), + LifecycleStatus = LifecycleStatus.Scheduled, + InternalWONumber = "10000000002", + istemplate = false + }); + + await context.SaveChangesAsync(); + + var dataService = new WorkOrderAdvancedSearchDataService(context); + var service = new SeaHaven.Services.Implementation.WorkOrderAdvancedSearchService( + dataService, + WorkOrderAccountTestHelpers.Resolver(context)); + + var result = await service.SearchAsync(new SeaHaven.Services.DTOs.WorkOrderAdvancedSearchQueryDto + { + DatePreset = SeaHaven.Services.Helpers.WorkOrderAdvancedSearchDatePreset.Custom, + DateFrom = new DateOnly(2000, 1, 1), + DateTo = new DateOnly(2099, 12, 31), + UnscheduledOnly = true, + Page = 0, + PageSize = 25 + }, WorkOrderAccountTestHelpers.OrgWideAdmin(), null); + + Assert.Equal(0, result.TotalCount); + Assert.Empty(result.Items); + Assert.Equal(0, result.Page); + Assert.Equal(25, result.PageSize); + } + + [Fact] + public async Task SearchAsync_UnscheduledOnly_PaginatesStableOrderWithoutDuplicates() + { + await using var context = CreateContext(); + + context.workOrders.AddRange( + new WorkOrder + { + Id = 1, + ScheduledDate = null, + LifecycleStatus = LifecycleStatus.Incomplete, + InternalWONumber = "10000000003", + istemplate = false + }, + new WorkOrder + { + Id = 2, + ScheduledDate = null, + LifecycleStatus = LifecycleStatus.Incomplete, + InternalWONumber = "10000000001", + istemplate = false + }, + new WorkOrder + { + Id = 3, + ScheduledDate = null, + LifecycleStatus = LifecycleStatus.Incomplete, + InternalWONumber = "10000000002", + istemplate = false + }, + new WorkOrder + { + Id = 4, + ScheduledDate = new DateTime(2026, 6, 23), + LifecycleStatus = LifecycleStatus.Scheduled, + InternalWONumber = "10000000000", + istemplate = false + }); + + await context.SaveChangesAsync(); + + var dataService = new WorkOrderAdvancedSearchDataService(context); + var service = new SeaHaven.Services.Implementation.WorkOrderAdvancedSearchService( + dataService, + WorkOrderAccountTestHelpers.Resolver(context)); + + var page0 = await service.SearchAsync(new SeaHaven.Services.DTOs.WorkOrderAdvancedSearchQueryDto + { + DatePreset = SeaHaven.Services.Helpers.WorkOrderAdvancedSearchDatePreset.Custom, + DateFrom = new DateOnly(2026, 6, 22), + DateTo = new DateOnly(2026, 6, 26), + UnscheduledOnly = true, + Page = 0, + PageSize = 2 + }, WorkOrderAccountTestHelpers.OrgWideAdmin(), null); + + var page1 = await service.SearchAsync(new SeaHaven.Services.DTOs.WorkOrderAdvancedSearchQueryDto + { + DatePreset = SeaHaven.Services.Helpers.WorkOrderAdvancedSearchDatePreset.Custom, + DateFrom = new DateOnly(2026, 6, 22), + DateTo = new DateOnly(2026, 6, 26), + UnscheduledOnly = true, + Page = 1, + PageSize = 2 + }, WorkOrderAccountTestHelpers.OrgWideAdmin(), null); + + Assert.Equal(3, page0.TotalCount); + Assert.Equal(2, page0.Items.Count()); + Assert.Equal(new[] { 2, 3 }, page0.Items.Select(i => i.Id).ToArray()); + + Assert.Equal(3, page1.TotalCount); + Assert.Single(page1.Items); + Assert.Equal(1, page1.Items.Single().Id); + + Assert.Empty(page0.Items.Select(i => i.Id).Intersect(page1.Items.Select(i => i.Id))); + Assert.Equal(new[] { 1, 2, 3 }, page0.Items.Concat(page1.Items).Select(i => i.Id).OrderBy(id => id).ToArray()); + } + + [Fact] + public async Task SearchAsync_UnscheduledOnly_ExcludesCompletedAndCanceledUndatedRows() + { + await using var context = CreateContext(); + + context.workOrders.AddRange( + new WorkOrder + { + Id = 1, + ScheduledDate = null, + LifecycleStatus = LifecycleStatus.Incomplete, + InternalWONumber = "10000000001", + istemplate = false + }, + new WorkOrder + { + Id = 2, + ScheduledDate = null, + LifecycleStatus = LifecycleStatus.Completed, + InternalWONumber = "10000000002", + istemplate = false + }, + new WorkOrder + { + Id = 3, + ScheduledDate = null, + LifecycleStatus = LifecycleStatus.Canceled, + InternalWONumber = "10000000003", + istemplate = false + }, + new WorkOrder + { + Id = 4, + ScheduledDate = new DateTime(2026, 6, 23), + LifecycleStatus = LifecycleStatus.Completed, + InternalWONumber = "10000000004", + istemplate = false + }); + + await context.SaveChangesAsync(); + + var dataService = new WorkOrderAdvancedSearchDataService(context); + var service = new SeaHaven.Services.Implementation.WorkOrderAdvancedSearchService( + dataService, + WorkOrderAccountTestHelpers.Resolver(context)); + + var result = await service.SearchAsync(new SeaHaven.Services.DTOs.WorkOrderAdvancedSearchQueryDto + { + DatePreset = SeaHaven.Services.Helpers.WorkOrderAdvancedSearchDatePreset.Custom, + DateFrom = new DateOnly(2026, 6, 22), + DateTo = new DateOnly(2026, 6, 26), + UnscheduledOnly = true + }, WorkOrderAccountTestHelpers.OrgWideAdmin(), null); + + Assert.Equal(1, result.TotalCount); + Assert.Single(result.Items); + Assert.Equal(1, result.Items.Single().Id); + Assert.Null(result.Items.Single().ScheduledDate); + Assert.DoesNotContain(result.Items, i => i.Id == 2); + Assert.DoesNotContain(result.Items, i => i.Id == 3); + Assert.DoesNotContain(result.Items, i => i.Id == 4); + } } From 4872fe5ba15b06a5301b3c44d27a640d9d5408ae Mon Sep 17 00:00:00 2001 From: Alexandre Brandizzi Date: Mon, 14 Sep 2026 21:44:45 -0300 Subject: [PATCH 006/183] feat(locations): manage ordered site contacts --- .../LocationSiteContactsTests.cs | 581 +++ .../Controllers/LocationController.cs | 26 +- .../DTOs/EditLocation_DTO.cs | 1 + Api.SeaHavenIndustries/DTOs/Location_DTO.cs | 9 + ...60915002525_SH138_SiteContacts.Designer.cs | 3933 +++++++++++++++++ .../20260915002525_SH138_SiteContacts.cs | 28 + .../ApplicationDbContextModelSnapshot.cs | 35 +- Data.SeaHavenIndustries/Models/Contacts.cs | 3 + Data.SeaHavenIndustries/Models/Locations.cs | 3 + .../Implementation/LocationDataService.cs | 20 +- .../Interfaces/ILocationDataService.cs | 9 + SeaHaven.Services/DTOs/LocationDTOs.cs | 25 + .../Implementation/LocationService.cs | 176 +- .../Validation/SiteContactValidation.cs | 81 + .../WorkOrderAccountScopeTests.cs | 4 + 15 files changed, 4905 insertions(+), 29 deletions(-) create mode 100644 Api.SeaHavenIndustries.Tests/LocationSiteContactsTests.cs create mode 100644 Data.SeaHavenIndustries/Migrations/20260915002525_SH138_SiteContacts.Designer.cs create mode 100644 Data.SeaHavenIndustries/Migrations/20260915002525_SH138_SiteContacts.cs create mode 100644 SeaHaven.Services/Validation/SiteContactValidation.cs diff --git a/Api.SeaHavenIndustries.Tests/LocationSiteContactsTests.cs b/Api.SeaHavenIndustries.Tests/LocationSiteContactsTests.cs new file mode 100644 index 0000000..a045661 --- /dev/null +++ b/Api.SeaHavenIndustries.Tests/LocationSiteContactsTests.cs @@ -0,0 +1,581 @@ +using System.Security.Claims; +using System.Text.Json; +using Api.SeaHavenIndustries.Controllers; +using Data.SeaHavenIndustries; +using FluentAssertions; +using Microsoft.AspNetCore.Http; +using Microsoft.AspNetCore.Mvc; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Migrations.Operations; +using Microsoft.Extensions.Logging; +using Moq; +using SeaHaven.DataServices.Implementation; +using SeaHaven.DataServices.Interfaces; +using SeaHaven.Services.DTOs; +using SeaHaven.Services.Helpers; +using SeaHaven.Services.Implementation; +using SeaHaven.Services.Validation; +using Xunit; + +namespace Api.SeaHavenIndustries.Tests; + +public class LocationSiteContactsTests +{ + private static ApplicationDbContext NewContext() + { + var options = new DbContextOptionsBuilder() + .UseInMemoryDatabase(Guid.NewGuid().ToString()) + .Options; + return new ApplicationDbContext(options); + } + + private static LocationService NewService(ApplicationDbContext ctx) => + new( + new LocationDataService(ctx), + new AccountDataService(ctx), + new CreateLocationValidation(), + new UpdateLocationValidation()); + + private static ClaimsPrincipal OrgWideAdmin() + { + var claims = new List + { + new(ClaimTypes.NameIdentifier, "admin-1"), + new(ClaimTypes.Role, "Admin"), + new(SeaHavenClaimTypes.OrgScope, SeaHavenClaimTypes.OrgScopeAll) + }; + return new ClaimsPrincipal(new ClaimsIdentity(claims, "test")); + } + + private static async Task SeedLocationWithContactsAsync(ApplicationDbContext ctx) + { + var service = NewService(ctx); + await service.CreateLocationFromRequestAsync(new LocationCreateRequestDTO + { + Name = "Depot", + AccountId = null, + Contacts = new List + { + new() { Name = " Alice Cooper ", Phone = " 555-0100 " }, + new() { Name = "Bob Dillon", Phone = "555-0200"} + } + }, OrgWideAdmin(), CancellationToken.None); + return ctx.Locations.Include(l => l.Contacts).Single(); + } + + [Fact] + public async Task Create_WithContacts_PersistsTrimmedOrderedRows_MirrorsFirstPhone_SetsAccountFromLocation() + { + using var ctx = NewContext(); + ctx.Accounts.Add(new Accounts { Id = 7, Name = "Customer", IsDeleted = false }); + await ctx.SaveChangesAsync(); + + await NewService(ctx).CreateLocationFromRequestAsync(new LocationCreateRequestDTO + { + Name = "Warehouse", + AccountId = 7, + Contacts = new List + { + new() { Name = " Alice Cooper ", Phone = " 555-0100 " }, + new() { Name = "Bob Dillon", Phone = "555-0200" } + } + }, OrgWideAdmin(), CancellationToken.None); + + var location = ctx.Locations.Include(l => l.Contacts).Single(); + location.PhoneNumber.Should().Be("555-0100", "first contact mirrors Location.PhoneNumber"); + + var contacts = location.Contacts.OrderBy(c => c.SiteContactOrder).ToList(); + contacts.Should().HaveCount(2); + contacts[0].FirstName.Should().Be("Alice Cooper"); + contacts[0].MiddleName.Should().BeNull(); + contacts[0].LastName.Should().BeNull(); + contacts[0].PhoneNumber.Should().Be("555-0100"); + contacts[0].SiteContactOrder.Should().Be(0); + contacts[0].AccountId.Should().Be(7, "AccountId must come from the location"); + contacts[0].LocationId.Should().Be(location.Id); + contacts[0].createdby.Should().Be("admin-1"); + contacts[0].CreatedDate.Should().NotBeNull(); + contacts[1].SiteContactOrder.Should().Be(1); + } + + [Fact] + public async Task Create_EmptyContactsArray_IsExplicitValidationError_AndWritesNothing() + { + using var ctx = NewContext(); + + var act = () => NewService(ctx).CreateLocationFromRequestAsync(new LocationCreateRequestDTO + { + Name = "Warehouse", + Contacts = new List() + }, OrgWideAdmin(), CancellationToken.None); + + (await act.Should().ThrowAsync()) + .Which.Errors.Should().ContainSingle(e => e.PropertyName == "Contacts"); + ctx.Locations.Should().BeEmpty(); + ctx.Contacts.Should().BeEmpty(); + } + + [Theory] + [InlineData(null, "555-0100", "Contact name is required.")] + [InlineData(" ", "555-0100", "Contact name is required.")] + [InlineData("Alice", null, "Contact phone is required.")] + [InlineData("Alice", " ", "Contact phone is required.")] + [InlineData("Alice", "555-0100", null)] + public async Task Create_ValidatesEachRow(string? name, string? phone, string? expectedError) + { + using var ctx = NewContext(); + var contacts = new List { new() { Name = name, Phone = phone } }; + + var act = () => NewService(ctx).CreateLocationFromRequestAsync(new LocationCreateRequestDTO + { + Name = "Warehouse", + Contacts = contacts + }, OrgWideAdmin(), CancellationToken.None); + + if (expectedError == null) + { + await act.Should().NotThrowAsync(); + return; + } + + (await act.Should().ThrowAsync()) + .Which.Errors.Should().Contain(e => e.ErrorMessage == expectedError); + } + + [Fact] + public async Task Create_RejectsOversizedNameAndPhone() + { + using var ctx = NewContext(); + + var act = () => NewService(ctx).CreateLocationFromRequestAsync(new LocationCreateRequestDTO + { + Name = "Warehouse", + Contacts = new List + { + new() { Name = new string('x', 101), Phone = new string('5', 21) } + } + }, OrgWideAdmin(), CancellationToken.None); + + var thrown = (await act.Should().ThrowAsync()).Which; + thrown.Errors.Should().Contain(e => e.ErrorMessage.Contains("cannot exceed 100")); + thrown.Errors.Should().Contain(e => e.ErrorMessage.Contains("cannot exceed 20")); + } + + [Fact] + public async Task Create_RejectsMoreThanTwentyContacts() + { + using var ctx = NewContext(); + var contacts = Enumerable.Range(1, 21) + .Select(i => new SiteContactRequestDTO { Name = $"C{i}", Phone = "555-0100" }) + .ToList(); + + var act = () => NewService(ctx).CreateLocationFromRequestAsync(new LocationCreateRequestDTO + { + Name = "Warehouse", + Contacts = contacts + }, OrgWideAdmin(), CancellationToken.None); + + (await act.Should().ThrowAsync()) + .Which.Errors.Should().ContainSingle(e => e.ErrorMessage.Contains("cannot exceed 20")); + } + + [Fact] + public async Task Update_ContactsNull_KeepsLegacyBehavior_AndDoesNotMutateContactRows() + { + using var ctx = NewContext(); + var seeded = await SeedLocationWithContactsAsync(ctx); + var before = ctx.Contacts.AsNoTracking().OrderBy(c => c.Id).ToList(); + + await NewService(ctx).UpdateLocationFromRequestAsync(seeded.Id, new LocationUpdateRequestDTO + { + Name = "Depot", + Phone = "555-9999" + }, OrgWideAdmin(), CancellationToken.None); + + var after = ctx.Contacts.AsNoTracking().OrderBy(c => c.Id).ToList(); + after.Should().HaveCount(before.Count); + after[0].FirstName.Should().Be(before[0].FirstName); + after[0].PhoneNumber.Should().Be(before[0].PhoneNumber); + after[0].SiteContactOrder.Should().Be(before[0].SiteContactOrder); + after[0].IsDeleted.Should().Be(before[0].IsDeleted); + ctx.Locations.Single().PhoneNumber.Should().Be("555-9999", "legacy updates keep request.Phone"); + } + + [Fact] + public async Task Update_EmptyContactsArray_IsExplicitValidationError() + { + using var ctx = NewContext(); + var seeded = await SeedLocationWithContactsAsync(ctx); + + var act = () => NewService(ctx).UpdateLocationFromRequestAsync(seeded.Id, new LocationUpdateRequestDTO + { + Name = "Depot", + Contacts = new List() + }, OrgWideAdmin(), CancellationToken.None); + + (await act.Should().ThrowAsync()) + .Which.Errors.Should().ContainSingle(e => e.PropertyName == "Contacts"); + ctx.Contacts.Should().OnlyContain(c => c.IsDeleted != true); + } + + [Fact] + public async Task Update_ReordersAndSoftDeletes_DensifiesOrder_AndUpdatesMirror() + { + using var ctx = NewContext(); + var seeded = await SeedLocationWithContactsAsync(ctx); + var alice = seeded.Contacts.Single(c => c.FirstName == "Alice Cooper"); + var bob = seeded.Contacts.Single(c => c.FirstName == "Bob Dillon"); + + await NewService(ctx).UpdateLocationFromRequestAsync(seeded.Id, new LocationUpdateRequestDTO + { + Name = "Depot", + Contacts = new List + { + new() { Id = bob.Id, Name = "Bob Dillon", Phone = "555-0200" }, + new() { Id = alice.Id, Name = "Alice Cooper", Phone = "555-0300" }, + new() { Name = "Cara Lane", Phone = "555-0400" } + } + }, OrgWideAdmin(), CancellationToken.None); + + var location = ctx.Locations.Include(l => l.Contacts).Single(); + location.PhoneNumber.Should().Be("555-0200", "reorder must update the mirror to the new first contact"); + + var active = location.Contacts.Where(c => c.IsDeleted != true).OrderBy(c => c.SiteContactOrder).ToList(); + active.Should().HaveCount(3); + active.Select(c => c.FirstName).Should().ContainInOrder("Bob Dillon", "Alice Cooper", "Cara Lane"); + active.Select(c => c.SiteContactOrder).Should().ContainInOrder(new int?[] { 0, 1, 2 }, "order is densified from zero"); + active[1].PhoneNumber.Should().Be("555-0300"); + active[0].Id.Should().Be(bob.Id); + active[1].Id.Should().Be(alice.Id, "existing ids are preserved"); + active[2].AccountId.Should().Be(location.AccountId); + } + + [Fact] + public async Task Update_SoftDeletesRemovedContacts_WithAuditFields_KeepingRowsReadable() + { + using var ctx = NewContext(); + var seeded = await SeedLocationWithContactsAsync(ctx); + var alice = seeded.Contacts.Single(c => c.FirstName == "Alice Cooper"); + var bob = seeded.Contacts.Single(c => c.FirstName == "Bob Dillon"); + + await NewService(ctx).UpdateLocationFromRequestAsync(seeded.Id, new LocationUpdateRequestDTO + { + Name = "Depot", + Contacts = new List { new() { Id = alice.Id, Name = "Alice Cooper", Phone = "555-0100" } } + }, OrgWideAdmin(), CancellationToken.None); + + var removed = ctx.Contacts.AsNoTracking().Single(c => c.Id == bob.Id); + removed.IsDeleted.Should().BeTrue(); + removed.DeleterUserId.Should().Be("admin-1"); + removed.DeletionTime.Should().NotBeNull(); + removed.LastModificationTime.Should().NotBeNull(); + removed.FirstName.Should().Be("Bob Dillon", "soft deleted rows keep data so historical WorkOrderContacts still render"); + removed.PhoneNumber.Should().Be("555-0200"); + + var kept = ctx.Contacts.AsNoTracking().Single(c => c.Id == alice.Id); + kept.IsDeleted.Should().NotBeTrue(); + } + + [Fact] + public async Task Update_ForeignLocationContactId_RejectedWithoutMutation() + { + using var ctx = NewContext(); + var seeded = await SeedLocationWithContactsAsync(ctx); + ctx.Locations.Add(new Locations { Id = seeded.Id + 1, Name = "Other" }); + ctx.Contacts.Add(new Contacts { Id = 901, LocationId = seeded.Id + 1, FirstName = "Foreign", PhoneNumber = "555-0900" }); + await ctx.SaveChangesAsync(); + var snapshot = ctx.Contacts.AsNoTracking().OrderBy(c => c.Id).ToList(); + + var act = () => NewService(ctx).UpdateLocationFromRequestAsync(seeded.Id, new LocationUpdateRequestDTO + { + Name = "Depot", + Contacts = new List + { + new() { Name = "Alice Cooper", Phone = "555-0100" }, + new() { Id = 901, Name = "Foreign", Phone = "555-0900" } + } + }, OrgWideAdmin(), CancellationToken.None); + + (await act.Should().ThrowAsync()) + .Which.Errors.Should().ContainSingle(e => e.PropertyName.Contains("Id")); + + var after = ctx.Contacts.AsNoTracking().OrderBy(c => c.Id).ToList(); + after.Should().HaveCount(snapshot.Count); + after.Should().BeEquivalentTo(snapshot, o => o.Excluding(c => c.Location)); + ctx.Locations.AsNoTracking().Single(l => l.Id == seeded.Id).PhoneNumber + .Should().Be("555-0100", "the rejected update must not persist any change"); + } + + [Fact] + public async Task Update_DeletedContactId_Rejected() + { + using var ctx = NewContext(); + var seeded = await SeedLocationWithContactsAsync(ctx); + var bob = seeded.Contacts.Single(c => c.FirstName == "Bob Dillon"); + bob.IsDeleted = true; + await ctx.SaveChangesAsync(); + + var act = () => NewService(ctx).UpdateLocationFromRequestAsync(seeded.Id, new LocationUpdateRequestDTO + { + Name = "Depot", + Contacts = new List { new() { Id = bob.Id, Name = "Bob Dillon", Phone = "555-0200" } } + }, OrgWideAdmin(), CancellationToken.None); + + (await act.Should().ThrowAsync()) + .Which.Errors.Should().ContainSingle(e => e.PropertyName.Contains("Id")); + } + + [Fact] + public async Task Update_AccountLevelContactId_Rejected() + { + using var ctx = NewContext(); + var seeded = await SeedLocationWithContactsAsync(ctx); + ctx.Contacts.Add(new Contacts { Id = 902, AccountId = 55, LocationId = null, FirstName = "AccountOnly", PhoneNumber = "555-0900" }); + await ctx.SaveChangesAsync(); + + var act = () => NewService(ctx).UpdateLocationFromRequestAsync(seeded.Id, new LocationUpdateRequestDTO + { + Name = "Depot", + Contacts = new List { new() { Id = 902, Name = "AccountOnly", Phone = "555-0900" } } + }, OrgWideAdmin(), CancellationToken.None); + + (await act.Should().ThrowAsync()) + .Which.Errors.Should().ContainSingle(e => e.PropertyName.Contains("Id")); + } + + [Fact] + public async Task Update_DuplicateContactIds_Rejected() + { + using var ctx = NewContext(); + var seeded = await SeedLocationWithContactsAsync(ctx); + var alice = seeded.Contacts.Single(c => c.FirstName == "Alice Cooper"); + + var act = () => NewService(ctx).UpdateLocationFromRequestAsync(seeded.Id, new LocationUpdateRequestDTO + { + Name = "Depot", + Contacts = new List + { + new() { Id = alice.Id, Name = "Alice Cooper", Phone = "555-0100" }, + new() { Id = alice.Id, Name = "Alice Cooper", Phone = "555-0100" } + } + }, OrgWideAdmin(), CancellationToken.None); + + (await act.Should().ThrowAsync()) + .Which.Errors.Should().ContainSingle(e => e.ErrorMessage.Contains("more than once")); + } + + [Fact] + public async Task Update_AccountScopedCaller_CannotAttachContactsToForeignLocation() + { + using var ctx = NewContext(); + var seeded = await SeedLocationWithContactsAsync(ctx); + seeded.AccountId = 99; + await ctx.SaveChangesAsync(); + + var claims = new List + { + new(ClaimTypes.NameIdentifier, "actor-1"), + new(ClaimTypes.Role, "Dispatcher"), + new(SeaHavenClaimTypes.AccountId, "4") + }; + var caller = new ClaimsPrincipal(new ClaimsIdentity(claims, "test")); + + var act = () => NewService(ctx).UpdateLocationFromRequestAsync(seeded.Id, new LocationUpdateRequestDTO + { + Name = "Depot", + Contacts = new List { new() { Name = "Nope", Phone = "555-0000" } } + }, caller, CancellationToken.None); + + await act.Should().ThrowAsync(); + ctx.Contacts.Should().OnlyContain(c => c.IsDeleted != true); + } + + [Fact] + public async Task Detail_ExcludesDeletedContacts_AndOrdersBySiteContactOrderThenId() + { + using var ctx = NewContext(); + var seeded = await SeedLocationWithContactsAsync(ctx); + var alice = seeded.Contacts.Single(c => c.FirstName == "Alice Cooper"); + var bob = seeded.Contacts.Single(c => c.FirstName == "Bob Dillon"); + + await NewService(ctx).UpdateLocationFromRequestAsync(seeded.Id, new LocationUpdateRequestDTO + { + Name = "Depot", + Contacts = new List { new() { Id = alice.Id, Name = "Alice Cooper", Phone = "555-0100" } } + }, OrgWideAdmin(), CancellationToken.None); + + var detail = await NewService(ctx).GetLocationDetailAsync(seeded.Id, CancellationToken.None); + + detail!.Contacts.Should().ContainSingle().Which.Id.Should().Be(alice.Id); + } + + [Fact] + public async Task Detail_OrdersContactsByOrderThenId_WhenOrdersAreMissing() + { + using var ctx = NewContext(); + var loc = new Locations { Id = 5, Name = "Legacy", AccountId = 7 }; + ctx.Locations.Add(loc); + ctx.Contacts.AddRange( + new Contacts { Id = 31, LocationId = 5, AccountId = 7, FirstName = "No Order B", PhoneNumber = "555-2" }, + new Contacts { Id = 30, LocationId = 5, AccountId = 7, FirstName = "No Order A", PhoneNumber = "555-1" }); + await ctx.SaveChangesAsync(); + + var detail = await NewService(ctx).GetLocationDetailAsync(5, CancellationToken.None); + + detail!.Contacts!.Select(c => c.Name).Should().ContainInOrder("No Order A", "No Order B"); + } + + [Fact] + public async Task List_LoadsPageContactsInSingleBatchedRead() + { + var data = new Mock(); + data.Setup(d => d.GetListPagedAsync(It.IsAny(), It.IsAny(), It.IsAny(), It.IsAny?>(), It.IsAny())) + .ReturnsAsync((new List + { + new() { Id = 1, Name = "One" }, + new() { Id = 2, Name = "Two" } + }, 2)); + data.Setup(d => d.GetSiteContactsByLocationIdsAsync(It.IsAny>(), It.IsAny())) + .ReturnsAsync(new List + { + new() { Id = 10, LocationId = 1, SiteContactOrder = 1, FirstName = "Second", PhoneNumber = "555-2" }, + new() { Id = 11, LocationId = 1, SiteContactOrder = 0, FirstName = "First", PhoneNumber = "555-1" }, + new() { Id = 12, LocationId = 2, SiteContactOrder = 0, FirstName = "Solo", PhoneNumber = "555-3" } + }); + + var service = new LocationService( + data.Object, + Mock.Of(), + new CreateLocationValidation(), + new UpdateLocationValidation()); + + var page = await service.GetLocationListPagedAsync(1, 10, null, cancellationToken: CancellationToken.None); + + page.Items.Should().HaveCount(2); + page.Items.Single(i => i.Id == 1).Contacts!.Select(c => c.Name) + .Should().ContainInOrder(new[] { "First", "Second" }, "contacts are ordered per location"); + page.Items.Single(i => i.Id == 2).Contacts!.Select(c => c.Name).Should().ContainSingle("Solo"); + data.Verify(d => d.GetSiteContactsByLocationIdsAsync(It.IsAny>(), It.IsAny()), Times.Once); + data.Verify(d => d.GetSiteContactsByLocationIdsAsync(It.Is>(ids => ids.Contains(1) && ids.Contains(2)), It.IsAny()), Times.Once); + } + + [Fact] + public async Task DataService_GetSiteContactsByLocationIdsAsync_ExcludesDeleted_AndOrders() + { + using var ctx = NewContext(); + ctx.Contacts.AddRange( + new Contacts { Id = 1, LocationId = 5, SiteContactOrder = 1, FirstName = "B" }, + new Contacts { Id = 2, LocationId = 5, SiteContactOrder = 0, FirstName = "A" }, + new Contacts { Id = 3, LocationId = 5, SiteContactOrder = 0, FirstName = "Tie", IsDeleted = true }, + new Contacts { Id = 4, LocationId = 6, SiteContactOrder = 0, FirstName = "Other" }); + await ctx.SaveChangesAsync(); + + var rows = await new LocationDataService(ctx).GetSiteContactsByLocationIdsAsync(new[] { 5 }, CancellationToken.None); + + rows.Select(r => r.FirstName).Should().ContainInOrder("A", "B"); + rows.Should().OnlyContain(r => r.IsDeleted != true); + } + + [Fact] + public async Task DataService_GetSiteContactsByLocationIdsAsync_EmptyInput_ReturnsWithoutQuerying() + { + using var ctx = NewContext(); + ctx.Contacts.Add(new Contacts { Id = 1, LocationId = 5, FirstName = "A" }); + await ctx.SaveChangesAsync(); + + var rows = await new LocationDataService(ctx).GetSiteContactsByLocationIdsAsync(Array.Empty(), CancellationToken.None); + + rows.Should().BeEmpty(); + } + + private sealed class ExposedSH138Migration : Data.SeaHavenIndustries.Migrations.SH138_SiteContacts + { + public void UpExposed(MigrationBuilder builder) => Up(builder); + public void DownExposed(MigrationBuilder builder) => Down(builder); + } + + [Fact] + public void Migration_SH138_IsAdditiveOnly() + { + var migration = new ExposedSH138Migration(); + + var up = new MigrationBuilder("SqlServer"); + migration.UpExposed(up); + + up.Operations.Should().ContainSingle("the migration must only add the SiteContactOrder column"); + var column = up.Operations.Single().Should().BeOfType().Subject; + column.Table.Should().Be("Contacts"); + column.Name.Should().Be("SiteContactOrder"); + column.IsNullable.Should().BeTrue("existing rows and legacy contacts have no order"); + column.ClrType.Should().Be(typeof(int)); + + var down = new MigrationBuilder("SqlServer"); + migration.DownExposed(down); + + down.Operations.Should().ContainSingle("reverting drops only the added column"); + down.Operations.Single().Should().BeOfType(); + } + + [Fact] + public void Migration_SH138_HasNoReorderIndexOrFkChange() + { + var migration = new ExposedSH138Migration(); + var up = new MigrationBuilder("SqlServer"); + migration.UpExposed(up); + + up.Operations.Should().NotContain(o => o is CreateIndexOperation, "no unique reorder index"); + up.Operations.Should().NotContain(o => o is AddForeignKeyOperation || o is DropForeignKeyOperation, "the existing restrict relationship is unchanged"); + up.Operations.Should().NotContain(o => o is DropColumnOperation || o is DropTableOperation || o is SqlOperation, "no destructive or backfill operations"); + } + + [Fact] + public async Task Controller_Detail_ProjectsContactsAndCompatibilityFields() + { + using var ctx = NewContext(); + var seeded = await SeedLocationWithContactsAsync(ctx); + var controller = new LocationController( + NewService(ctx), + Mock.Of>()) + { + ControllerContext = new ControllerContext { HttpContext = new DefaultHttpContext() } + }; + + var result = await controller.GetLocationById(seeded.Id, CancellationToken.None); + + var ok = result.Should().BeOfType().Subject; + using var json = JsonSerializer.SerializeToDocument(ok.Value); + var root = json.RootElement; + + root.GetProperty("Phone").GetString().Should().Be("555-0100", "Phone mirrors the first site contact"); + root.GetProperty("Contact").GetString().Should().Be("Alice Cooper", "Contact is the first contact display name"); + var contacts = root.GetProperty("Contacts"); + contacts.GetArrayLength().Should().Be(2); + contacts[0].GetProperty("Name").GetString().Should().Be("Alice Cooper"); + contacts[0].GetProperty("Phone").GetString().Should().Be("555-0100"); + contacts[1].GetProperty("Name").GetString().Should().Be("Bob Dillon"); + } + + [Fact] + public async Task Controller_List_ProjectsFirstContactAsLegacyContactField() + { + using var ctx = NewContext(); + var seeded = await SeedLocationWithContactsAsync(ctx); + var controller = new LocationController( + NewService(ctx), + Mock.Of>()) + { + ControllerContext = new ControllerContext { HttpContext = new DefaultHttpContext() } + }; + + var result = await controller.GetLocationList(cancellationToken: CancellationToken.None); + + var ok = result.Should().BeOfType().Subject; + using var json = JsonSerializer.SerializeToDocument(ok.Value); + var row = json.RootElement.GetProperty("Data").EnumerateArray().Single(); + + row.GetProperty("Contact").GetString().Should().Be("Alice Cooper"); + row.GetProperty("Phone").GetString().Should().Be("555-0100"); + row.GetProperty("Contacts").GetArrayLength().Should().Be(2); + } +} diff --git a/Api.SeaHavenIndustries/Controllers/LocationController.cs b/Api.SeaHavenIndustries/Controllers/LocationController.cs index 4c11ff7..9e970a6 100644 --- a/Api.SeaHavenIndustries/Controllers/LocationController.cs +++ b/Api.SeaHavenIndustries/Controllers/LocationController.cs @@ -54,10 +54,11 @@ namespace Api.SeaHavenIndustries.Controllers State = l.State, ZipCode = l.Zip, Phone = l.PhoneNumber, - Contact = (string?)null, + Contact = l.Contacts?.FirstOrDefault()?.Name, ContactEmail = l.Email, Status = l.Status, - AccountId = l.AccountId + AccountId = l.AccountId, + Contacts = l.Contacts?.Select(c => new { c.Id, c.Name, c.Phone }).ToList() }); var viewModel = new Pagination_DTO @@ -98,10 +99,11 @@ namespace Api.SeaHavenIndustries.Controllers location.State, ZipCode = location.Zip, Phone = location.PhoneNumber, - Contact = (string?)null, + Contact = location.Contacts?.FirstOrDefault()?.Name, ContactEmail = location.Email, location.Status, - location.AccountId + location.AccountId, + Contacts = location.Contacts?.Select(c => new { c.Id, c.Name, c.Phone }).ToList() }; return Ok(result); @@ -197,7 +199,8 @@ namespace Api.SeaHavenIndustries.Controllers Phone = model.Phone, ContactEmail = model.ContactEmail, Status = model.Status, - AccountId = model.GetAccountId() + AccountId = model.GetAccountId(), + Contacts = MapSiteContacts(model.Contacts) }; } @@ -214,8 +217,19 @@ namespace Api.SeaHavenIndustries.Controllers Phone = model.Phone, ContactEmail = model.ContactEmail, Status = model.Status, - AccountId = model.GetAccountId() + AccountId = model.GetAccountId(), + Contacts = MapSiteContacts(model.Contacts) }; } + + private static List? MapSiteContacts(List? contacts) + { + if (contacts == null) + return null; + + return contacts + .Select(c => new SiteContactRequestDTO { Id = c.Id, Name = c.Name, Phone = c.Phone }) + .ToList(); + } } } diff --git a/Api.SeaHavenIndustries/DTOs/EditLocation_DTO.cs b/Api.SeaHavenIndustries/DTOs/EditLocation_DTO.cs index d7d3d63..4a3cab8 100644 --- a/Api.SeaHavenIndustries/DTOs/EditLocation_DTO.cs +++ b/Api.SeaHavenIndustries/DTOs/EditLocation_DTO.cs @@ -16,6 +16,7 @@ namespace Api.SeaHavenIndustries.DTOs public string? ContactEmail { get; set; } public string? Status { get; set; } public string? AccountId { get; set; } + public List? Contacts { get; set; } public int? GetAccountId() => LocationAccountIdMapping.ParseOptional(AccountId); diff --git a/Api.SeaHavenIndustries/DTOs/Location_DTO.cs b/Api.SeaHavenIndustries/DTOs/Location_DTO.cs index 68aa518..343df36 100644 --- a/Api.SeaHavenIndustries/DTOs/Location_DTO.cs +++ b/Api.SeaHavenIndustries/DTOs/Location_DTO.cs @@ -3,6 +3,14 @@ using SeaHaven.Services.DTOs; namespace Api.SeaHavenIndustries.DTOs { + // SH-138: additive site-contact write row (id optional on writes) + public class SiteContactInput_DTO + { + public int? Id { get; set; } + public string? Name { get; set; } + public string? Phone { get; set; } + } + public class Location_DTO { public string? Title { get; set; } @@ -16,6 +24,7 @@ namespace Api.SeaHavenIndustries.DTOs public string? ContactEmail { get; set; } public string? Status { get; set; } public string? AccountId { get; set; } + public List? Contacts { get; set; } public int? GetAccountId() => LocationAccountIdMapping.ParseOptional(AccountId); diff --git a/Data.SeaHavenIndustries/Migrations/20260915002525_SH138_SiteContacts.Designer.cs b/Data.SeaHavenIndustries/Migrations/20260915002525_SH138_SiteContacts.Designer.cs new file mode 100644 index 0000000..545ac7f --- /dev/null +++ b/Data.SeaHavenIndustries/Migrations/20260915002525_SH138_SiteContacts.Designer.cs @@ -0,0 +1,3933 @@ +// +using System; +using Data.SeaHavenIndustries; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; + +#nullable disable + +namespace Data.SeaHavenIndustries.Migrations +{ + [DbContext(typeof(ApplicationDbContext))] + [Migration("20260915002525_SH138_SiteContacts")] + partial class SH138_SiteContacts + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "8.0.8") + .HasAnnotation("Relational:MaxIdentifierLength", 128); + + SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); + + modelBuilder.HasSequence("WorkOrderInternalNumberSequence"); + + modelBuilder.Entity("Data.SeaHavenIndustries.Accounts", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("About") + .HasColumnType("nvarchar(max)"); + + b.Property("CreatedDate") + .HasColumnType("datetime2"); + + b.Property("CurrencyCode") + .HasColumnType("nvarchar(max)"); + + b.Property("DeleterUserId") + .HasColumnType("nvarchar(max)"); + + b.Property("DeletionTime") + .HasColumnType("datetime2"); + + b.Property("Email") + .HasColumnType("nvarchar(max)"); + + b.Property("FacebookUrl") + .HasColumnType("nvarchar(max)"); + + b.Property("Importance") + .HasColumnType("int"); + + b.Property("IndustryId") + .HasColumnType("int"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2"); + + b.Property("LastModifierUserId") + .HasColumnType("int"); + + b.Property("LinkedInUrl") + .HasColumnType("nvarchar(max)"); + + b.Property("Name") + .HasColumnType("nvarchar(max)"); + + b.Property("OwnerEmployeeId") + .HasColumnType("int"); + + b.Property("Phone") + .HasColumnType("nvarchar(max)"); + + b.Property("PrivacySetting") + .HasColumnType("nvarchar(max)"); + + b.Property("ServiceInstructions") + .HasColumnType("nvarchar(max)"); + + b.Property("Tags") + .HasColumnType("nvarchar(max)"); + + b.Property("TerritoryId") + .HasColumnType("int"); + + b.Property("TimeZone") + .HasColumnType("nvarchar(max)"); + + b.Property("TwitterUrl") + .HasColumnType("nvarchar(max)"); + + b.Property("Type") + .HasColumnType("nvarchar(max)"); + + b.Property("Website") + .HasColumnType("nvarchar(max)"); + + b.Property("createdby") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("Accounts"); + }); + + modelBuilder.Entity("Data.SeaHavenIndustries.Addresses", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("AccountId") + .HasColumnType("int"); + + b.Property("Address1") + .HasColumnType("nvarchar(max)"); + + b.Property("Address2") + .HasColumnType("nvarchar(max)"); + + b.Property("AddressType") + .HasColumnType("nvarchar(max)"); + + b.Property("City") + .HasColumnType("nvarchar(max)"); + + b.Property("ContactId") + .HasColumnType("int"); + + b.Property("Country") + .HasColumnType("nvarchar(max)"); + + b.Property("County") + .HasColumnType("nvarchar(max)"); + + b.Property("CreatedDate") + .HasColumnType("datetime2"); + + b.Property("DeleterUserId") + .HasColumnType("nvarchar(max)"); + + b.Property("DeletionTime") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2"); + + b.Property("LastModifierUserId") + .HasColumnType("int"); + + b.Property("State") + .HasColumnType("nvarchar(max)"); + + b.Property("Zip") + .HasColumnType("nvarchar(max)"); + + b.Property("createdby") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("AccountId"); + + b.HasIndex("ContactId"); + + b.ToTable("Addresses"); + }); + + modelBuilder.Entity("Data.SeaHavenIndustries.ApplicationUser", b => + { + b.Property("Id") + .HasColumnType("nvarchar(450)"); + + b.Property("AccessFailedCount") + .HasColumnType("int"); + + b.Property("AccountId") + .HasColumnType("int"); + + b.Property("Color") + .HasColumnType("nvarchar(max)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasColumnType("nvarchar(max)"); + + b.Property("Contact") + .HasColumnType("nvarchar(max)"); + + b.Property("CreatedDate") + .HasColumnType("datetime2"); + + b.Property("DeletedDate") + .HasColumnType("datetime2"); + + b.Property("Email") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("EmailConfirmed") + .HasColumnType("bit"); + + b.Property("FirstName") + .HasColumnType("nvarchar(max)"); + + b.Property("Initials") + .HasColumnType("nvarchar(max)"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("LastName") + .HasColumnType("nvarchar(max)"); + + b.Property("Locations") + .HasColumnType("nvarchar(max)"); + + b.Property("LockoutEnabled") + .HasColumnType("bit"); + + b.Property("LockoutEnd") + .HasColumnType("datetimeoffset"); + + b.Property("NormalizedEmail") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("NormalizedUserName") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("PasswordHash") + .HasColumnType("nvarchar(max)"); + + b.Property("PhoneNumber") + .HasColumnType("nvarchar(max)"); + + b.Property("PhoneNumberConfirmed") + .HasColumnType("bit"); + + b.Property("SecurityStamp") + .HasColumnType("nvarchar(max)"); + + b.Property("TwoFactorEnabled") + .HasColumnType("bit"); + + b.Property("Type") + .HasColumnType("int"); + + b.Property("UniqueName") + .HasColumnType("nvarchar(max)"); + + b.Property("UserImage") + .HasColumnType("nvarchar(max)"); + + b.Property("UserName") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.HasKey("Id"); + + b.HasIndex("AccountId"); + + b.HasIndex("NormalizedEmail") + .HasDatabaseName("EmailIndex"); + + b.HasIndex("NormalizedUserName") + .IsUnique() + .HasDatabaseName("UserNameIndex") + .HasFilter("[NormalizedUserName] IS NOT NULL"); + + b.ToTable("AspNetUsers", (string)null); + }); + + modelBuilder.Entity("Data.SeaHavenIndustries.Assets", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("AccountId") + .HasColumnType("int"); + + b.Property("AssetCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("CreatedDate") + .HasColumnType("datetime2"); + + b.Property("DeleterUserId") + .HasColumnType("nvarchar(max)"); + + b.Property("DeletionTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .HasColumnType("nvarchar(max)"); + + b.Property("IsActive") + .HasColumnType("bit"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2"); + + b.Property("LastModifierUserId") + .HasColumnType("int"); + + b.Property("LocationId") + .HasColumnType("int"); + + b.Property("Name") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("createdby") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("AccountId"); + + b.HasIndex("LocationId"); + + b.ToTable("Assets"); + }); + + modelBuilder.Entity("Data.SeaHavenIndustries.Category", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("CreatedDate") + .HasColumnType("datetime2"); + + b.Property("DeleterUserId") + .HasColumnType("nvarchar(max)"); + + b.Property("DeletionTime") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2"); + + b.Property("LastModifierUserId") + .HasColumnType("int"); + + b.Property("Name") + .HasColumnType("nvarchar(max)"); + + b.Property("createdby") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("Categories"); + }); + + modelBuilder.Entity("Data.SeaHavenIndustries.Comments", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("CommentType") + .HasColumnType("nvarchar(max)"); + + b.Property("Commenter") + .HasColumnType("nvarchar(max)"); + + b.Property("Commenttext") + .HasColumnType("nvarchar(max)"); + + b.Property("CreatedDate") + .HasColumnType("datetime2"); + + b.Property("DeleterUserId") + .HasColumnType("nvarchar(max)"); + + b.Property("DeletionTime") + .HasColumnType("datetime2"); + + b.Property("DispatchId") + .HasColumnType("int"); + + b.Property("Documents") + .HasColumnType("nvarchar(max)"); + + b.Property("ExternalCommentId") + .HasColumnType("nvarchar(max)"); + + b.Property("ExternalSource") + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("ExternalSourceEmailS3Key") + .HasMaxLength(2048) + .HasColumnType("nvarchar(2048)"); + + b.Property("ExternalUpdatedAt") + .HasColumnType("datetimeoffset"); + + b.Property("ExternalVersionHash") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2"); + + b.Property("LastModifierUserId") + .HasColumnType("int"); + + b.Property("RecordType") + .HasColumnType("nvarchar(max)"); + + b.Property("UserId") + .HasColumnType("nvarchar(450)"); + + b.Property("WorkerOrderId") + .HasColumnType("int"); + + b.Property("createdby") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("DispatchId"); + + b.HasIndex("UserId"); + + b.HasIndex("WorkerOrderId"); + + b.ToTable("Comments"); + }); + + modelBuilder.Entity("Data.SeaHavenIndustries.CompletionDocTemplate", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("CreatedDate") + .HasColumnType("datetime2"); + + b.Property("DeleterUserId") + .HasColumnType("nvarchar(max)"); + + b.Property("DeletionTime") + .HasColumnType("datetime2"); + + b.Property("IsActive") + .HasColumnType("bit"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2"); + + b.Property("LastModifierUserId") + .HasColumnType("int"); + + b.Property("Name") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ServiceKey") + .IsRequired() + .HasColumnType("nvarchar(450)"); + + b.Property("TemplateUrl") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("WorkOrderType") + .HasColumnType("int"); + + b.Property("createdby") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("ServiceKey", "IsActive"); + + b.ToTable("CompletionDocTemplates"); + }); + + modelBuilder.Entity("Data.SeaHavenIndustries.ContactDetails", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("About") + .HasColumnType("nvarchar(max)"); + + b.Property("ContactId") + .HasColumnType("int"); + + b.Property("CreatedDate") + .HasColumnType("datetime2"); + + b.Property("DateOfBirth") + .HasColumnType("datetime2"); + + b.Property("DeleterUserId") + .HasColumnType("nvarchar(max)"); + + b.Property("DeletionTime") + .HasColumnType("datetime2"); + + b.Property("FacebookUrl") + .HasColumnType("nvarchar(max)"); + + b.Property("Gender") + .HasColumnType("nvarchar(max)"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2"); + + b.Property("LastModifierUserId") + .HasColumnType("int"); + + b.Property("LinkedInUrl") + .HasColumnType("nvarchar(max)"); + + b.Property("PrivacySetting") + .HasColumnType("nvarchar(max)"); + + b.Property("Tags") + .HasColumnType("nvarchar(max)"); + + b.Property("Territory") + .HasColumnType("nvarchar(max)"); + + b.Property("TwitterUrl") + .HasColumnType("nvarchar(max)"); + + b.Property("createdby") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("ContactId"); + + b.ToTable("ContactDetails"); + }); + + modelBuilder.Entity("Data.SeaHavenIndustries.Contacts", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("AccountId") + .HasColumnType("int"); + + b.Property("Address1") + .HasColumnType("nvarchar(max)"); + + b.Property("Address2") + .HasColumnType("nvarchar(max)"); + + b.Property("City") + .HasColumnType("nvarchar(max)"); + + b.Property("ContactType") + .HasColumnType("nvarchar(max)"); + + b.Property("CreatedDate") + .HasColumnType("datetime2"); + + b.Property("DeleterUserId") + .HasColumnType("nvarchar(max)"); + + b.Property("DeletionTime") + .HasColumnType("datetime2"); + + b.Property("Email") + .HasColumnType("nvarchar(max)"); + + b.Property("FacebookUrl") + .HasColumnType("nvarchar(max)"); + + b.Property("FirstName") + .HasColumnType("nvarchar(max)"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2"); + + b.Property("LastModifierUserId") + .HasColumnType("int"); + + b.Property("LastName") + .HasColumnType("nvarchar(max)"); + + b.Property("LinkedInUrl") + .HasColumnType("nvarchar(max)"); + + b.Property("LocationId") + .HasColumnType("int"); + + b.Property("MiddleName") + .HasColumnType("nvarchar(max)"); + + b.Property("Owner") + .HasColumnType("nvarchar(max)"); + + b.Property("PhoneNumber") + .HasColumnType("nvarchar(max)"); + + b.Property("SiteContactOrder") + .HasColumnType("int"); + + b.Property("State") + .HasColumnType("nvarchar(max)"); + + b.Property("Title") + .HasColumnType("nvarchar(max)"); + + b.Property("TwitterUrl") + .HasColumnType("nvarchar(max)"); + + b.Property("Zip") + .HasColumnType("nvarchar(max)"); + + b.Property("createdby") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("AccountId"); + + b.HasIndex("LocationId"); + + b.ToTable("Contacts"); + }); + + modelBuilder.Entity("Data.SeaHavenIndustries.Department", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("Name") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + + b.HasKey("Id"); + + b.ToTable("Departments"); + }); + + modelBuilder.Entity("Data.SeaHavenIndustries.Dispatch", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("AcceptToken") + .HasColumnType("nvarchar(max)"); + + b.Property("AcknowledgedAt") + .HasColumnType("datetime2"); + + b.Property("CommercialStatusUpdatedAt") + .HasColumnType("datetime2"); + + b.Property("CompletedDate") + .HasColumnType("datetime2"); + + b.Property("CreatedDate") + .HasColumnType("datetime2"); + + b.Property("DeleterUserId") + .HasColumnType("nvarchar(max)"); + + b.Property("DeletionTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .HasColumnType("nvarchar(max)"); + + b.Property("DispatchNumber") + .HasColumnType("nvarchar(max)"); + + b.Property("DispatchedAt") + .HasColumnType("datetime2"); + + b.Property("EmailSent") + .HasColumnType("bit"); + + b.Property("EstimatedArrivalAt") + .HasColumnType("datetime2"); + + b.Property("EtaManualOverride") + .HasColumnType("bit"); + + b.Property("InvoiceNumber") + .HasColumnType("nvarchar(max)"); + + b.Property("InvoiceStatus") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2"); + + b.Property("LastModifierUserId") + .HasColumnType("int"); + + b.Property("NTEAmount") + .HasColumnType("decimal(18,2)"); + + b.Property("PONumber") + .HasColumnType("nvarchar(max)"); + + b.Property("PaymentStatus") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ReplyToAddress") + .HasColumnType("nvarchar(max)"); + + b.Property("RowVersion") + .IsConcurrencyToken() + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("rowversion"); + + b.Property("ScheduledDate") + .HasColumnType("datetime2"); + + b.Property("Status") + .HasColumnType("nvarchar(max)"); + + b.Property("TechPhone") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("VendorId") + .HasColumnType("int"); + + b.Property("VendorNotes") + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)"); + + b.Property("VerifiedAt") + .HasColumnType("datetime2"); + + b.Property("VerifiedBy") + .HasColumnType("nvarchar(max)"); + + b.Property("WorkOrderId") + .HasColumnType("int"); + + b.Property("createdby") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("VendorId"); + + b.HasIndex("WorkOrderId"); + + b.ToTable("Dispatches"); + }); + + modelBuilder.Entity("Data.SeaHavenIndustries.DispatchChecklistItem", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("CompletedAt") + .HasColumnType("datetime2"); + + b.Property("CompletedBy") + .HasColumnType("nvarchar(max)"); + + b.Property("CreatedDate") + .HasColumnType("datetime2"); + + b.Property("DeleterUserId") + .HasColumnType("nvarchar(max)"); + + b.Property("DeletionTime") + .HasColumnType("datetime2"); + + b.Property("DispatchId") + .HasColumnType("int"); + + b.Property("IsCompleted") + .HasColumnType("bit"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("ItemText") + .HasColumnType("nvarchar(max)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2"); + + b.Property("LastModifierUserId") + .HasColumnType("int"); + + b.Property("SortOrder") + .HasColumnType("int"); + + b.Property("WorkOrderId") + .HasColumnType("int"); + + b.Property("createdby") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("DispatchId"); + + b.HasIndex("WorkOrderId"); + + b.ToTable("DispatchChecklistItems"); + }); + + modelBuilder.Entity("Data.SeaHavenIndustries.DispatchSignoff", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("CreatedDate") + .HasColumnType("datetime2"); + + b.Property("DeleterUserId") + .HasColumnType("nvarchar(max)"); + + b.Property("DeletionTime") + .HasColumnType("datetime2"); + + b.Property("DispatchId") + .HasColumnType("int"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2"); + + b.Property("LastModifierUserId") + .HasColumnType("int"); + + b.Property("Name") + .HasColumnType("nvarchar(max)"); + + b.Property("Signature") + .HasColumnType("nvarchar(max)"); + + b.Property("SignatureMethod") + .HasColumnType("nvarchar(max)"); + + b.Property("SignedAt") + .HasColumnType("datetime2"); + + b.Property("SignoffType") + .HasColumnType("nvarchar(max)"); + + b.Property("createdby") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("DispatchId"); + + b.ToTable("DispatchSignoffs"); + }); + + modelBuilder.Entity("Data.SeaHavenIndustries.DispatchUpliftRequest", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("CreatedDate") + .HasColumnType("datetime2"); + + b.Property("CurrentNTE") + .HasColumnType("decimal(18,2)"); + + b.Property("DecidedAt") + .HasColumnType("datetime2"); + + b.Property("DecidedByUserId") + .HasColumnType("nvarchar(max)"); + + b.Property("DecisionNote") + .HasColumnType("nvarchar(max)"); + + b.Property("DeleterUserId") + .HasColumnType("nvarchar(max)"); + + b.Property("DeletionTime") + .HasColumnType("datetime2"); + + b.Property("DispatchId") + .HasColumnType("int"); + + b.Property("EscalatedAt") + .HasColumnType("datetime2"); + + b.Property("EvidenceDocumentId") + .HasColumnType("int"); + + b.Property("ExpiresAt") + .HasColumnType("datetime2"); + + b.Property("InitialNotificationSentAt") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2"); + + b.Property("LastModifierUserId") + .HasColumnType("int"); + + b.Property("NotificationError") + .HasMaxLength(500) + .HasColumnType("nvarchar(500)"); + + b.Property("NotificationStatus") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("nvarchar(20)"); + + b.Property("RequestKey") + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("RequestedByVendorName") + .HasColumnType("nvarchar(max)"); + + b.Property("RequestedNTE") + .HasColumnType("decimal(18,2)"); + + b.Property("RequiredTier") + .HasColumnType("int"); + + b.Property("RowVersion") + .IsConcurrencyToken() + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("rowversion"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("nvarchar(20)"); + + b.Property("VendorReason") + .HasColumnType("nvarchar(max)"); + + b.Property("createdby") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("DispatchId") + .IsUnique() + .HasFilter("[Status] IN ('Pending', 'ChangesRequested')"); + + b.HasIndex("EvidenceDocumentId"); + + b.HasIndex("DispatchId", "RequestKey") + .IsUnique() + .HasFilter("[RequestKey] IS NOT NULL"); + + b.ToTable("DispatchUpliftRequests"); + }); + + modelBuilder.Entity("Data.SeaHavenIndustries.DispatchWorkOrder", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("DispatchId") + .HasColumnType("int"); + + b.Property("WorkOrderId") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("DispatchId"); + + b.HasIndex("WorkOrderId"); + + b.ToTable("DispatchWorkOrders"); + }); + + modelBuilder.Entity("Data.SeaHavenIndustries.DropdownOption", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("Category") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("IsActive") + .HasColumnType("bit"); + + b.Property("ParentValue") + .HasColumnType("nvarchar(max)"); + + b.Property("SortOrder") + .HasColumnType("int"); + + b.Property("Value") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("DropdownOptions"); + }); + + modelBuilder.Entity("Data.SeaHavenIndustries.Employee", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("About") + .HasColumnType("nvarchar(max)"); + + b.Property("CanChangeProviderNumber") + .HasColumnType("bit"); + + b.Property("ConfirmUserName") + .HasColumnType("nvarchar(max)"); + + b.Property("CreatedBy") + .HasColumnType("nvarchar(max)"); + + b.Property("CreatedDate") + .HasColumnType("datetime2"); + + b.Property("DateOfBirth") + .HasColumnType("datetime2"); + + b.Property("DepartmentId") + .HasColumnType("int"); + + b.Property("EmployeeNumber") + .HasColumnType("nvarchar(max)"); + + b.Property("FacebookUrl") + .HasColumnType("nvarchar(max)"); + + b.Property("FirstName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Gender") + .HasColumnType("int"); + + b.Property("HireDate") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("JobTitleId") + .HasColumnType("int"); + + b.Property("LastLogin") + .HasColumnType("datetime2"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2"); + + b.Property("LastModifierUserId") + .HasColumnType("int"); + + b.Property("LastName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("LinkedInUrl") + .HasColumnType("nvarchar(max)"); + + b.Property("MiddleName") + .HasColumnType("nvarchar(max)"); + + b.Property("PermissionGroupId") + .HasColumnType("int"); + + b.Property("RegionId") + .HasColumnType("int"); + + b.Property("SMSAddress") + .HasColumnType("nvarchar(max)"); + + b.Property("Status") + .HasColumnType("nvarchar(max)"); + + b.Property("TimeZone") + .HasColumnType("nvarchar(max)"); + + b.Property("TwitterUrl") + .HasColumnType("nvarchar(max)"); + + b.Property("UserName") + .HasColumnType("nvarchar(max)"); + + b.Property("Website") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("DepartmentId"); + + b.HasIndex("JobTitleId"); + + b.HasIndex("RegionId"); + + b.ToTable("Employees"); + }); + + modelBuilder.Entity("Data.SeaHavenIndustries.EmployeeAddress", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("City") + .HasColumnType("nvarchar(max)"); + + b.Property("CountryCode") + .HasColumnType("nvarchar(max)"); + + b.Property("CountyId") + .HasColumnType("int"); + + b.Property("EmployeeId") + .HasColumnType("int"); + + b.Property("StateCode") + .HasColumnType("nvarchar(max)"); + + b.Property("Street") + .HasColumnType("nvarchar(max)"); + + b.Property("StreetLineTwo") + .HasColumnType("nvarchar(max)"); + + b.Property("Zip") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("EmployeeId") + .IsUnique(); + + b.ToTable("EmployeeAddresses"); + }); + + modelBuilder.Entity("Data.SeaHavenIndustries.EmployeeEmail", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("Address") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("EmailTypeId") + .HasColumnType("int"); + + b.Property("EmployeeId") + .HasColumnType("int"); + + b.Property("IsPrimary") + .HasColumnType("bit"); + + b.HasKey("Id"); + + b.HasIndex("EmployeeId"); + + b.ToTable("EmployeeEmails"); + }); + + modelBuilder.Entity("Data.SeaHavenIndustries.EmployeePhone", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("EmployeeId") + .HasColumnType("int"); + + b.Property("Extension") + .HasColumnType("nvarchar(max)"); + + b.Property("IsPrimary") + .HasColumnType("bit"); + + b.Property("Number") + .HasColumnType("nvarchar(max)"); + + b.Property("PhoneTypeId") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("EmployeeId"); + + b.ToTable("EmployeePhones"); + }); + + modelBuilder.Entity("Data.SeaHavenIndustries.Events", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("AllDay") + .HasColumnType("bit"); + + b.Property("CreatedDate") + .HasColumnType("datetime2"); + + b.Property("DeleterUserId") + .HasColumnType("nvarchar(max)"); + + b.Property("DeletionTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .HasColumnType("nvarchar(max)"); + + b.Property("EndDate") + .HasColumnType("datetime2"); + + b.Property("EndTime") + .HasMaxLength(10) + .HasColumnType("nvarchar(10)"); + + b.Property("EventColor") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("nvarchar(20)"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2"); + + b.Property("LastModifierUserId") + .HasColumnType("int"); + + b.Property("Location") + .HasMaxLength(150) + .HasColumnType("nvarchar(150)"); + + b.Property("RecordID") + .HasColumnType("int"); + + b.Property("RecordName") + .HasColumnType("nvarchar(max)"); + + b.Property("RecordTargetType") + .HasColumnType("nvarchar(max)"); + + b.Property("ReminderMinutes") + .HasColumnType("int"); + + b.Property("StartDate") + .HasColumnType("datetime2"); + + b.Property("StartTime") + .HasMaxLength(10) + .HasColumnType("nvarchar(10)"); + + b.Property("Title") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("createdby") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("Events"); + }); + + modelBuilder.Entity("Data.SeaHavenIndustries.FollowUps", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("AccountId") + .HasColumnType("int"); + + b.Property("CreatedDate") + .HasColumnType("datetime2"); + + b.Property("DeleterUserId") + .HasColumnType("nvarchar(max)"); + + b.Property("DeletionTime") + .HasColumnType("datetime2"); + + b.Property("EmployeeId") + .HasColumnType("int"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2"); + + b.Property("LastModifierUserId") + .HasColumnType("int"); + + b.Property("LocationId") + .HasColumnType("int"); + + b.Property("Reason") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ScheduleDate") + .HasColumnType("datetime2"); + + b.Property("ScheduleStartTime") + .HasColumnType("time"); + + b.Property("Status") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("WorkOrderId") + .HasColumnType("int"); + + b.Property("createdby") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("AccountId"); + + b.HasIndex("EmployeeId"); + + b.HasIndex("LocationId"); + + b.HasIndex("WorkOrderId"); + + b.ToTable("FollowUps"); + }); + + modelBuilder.Entity("Data.SeaHavenIndustries.ForgetPasswordCode", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("Code") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Email") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("UserId") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("ForgetPasswordCodes"); + }); + + modelBuilder.Entity("Data.SeaHavenIndustries.JobTitle", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("Name") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + + b.HasKey("Id"); + + b.ToTable("JobTitles"); + }); + + modelBuilder.Entity("Data.SeaHavenIndustries.Locations", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("AccountId") + .HasColumnType("int"); + + b.Property("Address1") + .HasColumnType("nvarchar(max)"); + + b.Property("Address2") + .HasColumnType("nvarchar(max)"); + + b.Property("City") + .HasColumnType("nvarchar(max)"); + + b.Property("CreatedDate") + .HasColumnType("datetime2"); + + b.Property("DeleterUserId") + .HasColumnType("nvarchar(max)"); + + b.Property("DeletionTime") + .HasColumnType("datetime2"); + + b.Property("Email") + .HasColumnType("nvarchar(max)"); + + b.Property("ExternalLocationId") + .HasMaxLength(450) + .HasColumnType("nvarchar(450)"); + + b.Property("ExternalSource") + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2"); + + b.Property("LastModifierUserId") + .HasColumnType("int"); + + b.Property("Latitude") + .HasColumnType("nvarchar(max)"); + + b.Property("Longitude") + .HasColumnType("nvarchar(max)"); + + b.Property("Name") + .HasColumnType("nvarchar(max)"); + + b.Property("PhoneNumber") + .HasColumnType("nvarchar(max)"); + + b.Property("State") + .HasColumnType("nvarchar(max)"); + + b.Property("Status") + .HasColumnType("nvarchar(max)"); + + b.Property("Title") + .HasColumnType("nvarchar(max)"); + + b.Property("Zip") + .HasColumnType("nvarchar(max)"); + + b.Property("createdby") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("AccountId"); + + b.ToTable("Locations"); + }); + + modelBuilder.Entity("Data.SeaHavenIndustries.PMSchedules", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("AssetId") + .HasColumnType("int"); + + b.Property("CreatedDate") + .HasColumnType("datetime2"); + + b.Property("DeleterUserId") + .HasColumnType("nvarchar(max)"); + + b.Property("DeletionTime") + .HasColumnType("datetime2"); + + b.Property("Frequency") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("IsActive") + .HasColumnType("bit"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2"); + + b.Property("LastModifierUserId") + .HasColumnType("int"); + + b.Property("LocationId") + .HasColumnType("int"); + + b.Property("Name") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("StartDate") + .HasColumnType("datetime2"); + + b.Property("createdby") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("AssetId"); + + b.HasIndex("LocationId"); + + b.ToTable("PMSchedules"); + }); + + modelBuilder.Entity("Data.SeaHavenIndustries.Quotes", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("BillingAddress") + .HasColumnType("nvarchar(max)"); + + b.Property("ContactId") + .HasColumnType("int"); + + b.Property("CreatedDate") + .HasColumnType("datetime2"); + + b.Property("Date") + .HasColumnType("datetime2"); + + b.Property("DeleterUserId") + .HasColumnType("nvarchar(max)"); + + b.Property("DeletionTime") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2"); + + b.Property("LastModifierUserId") + .HasColumnType("int"); + + b.Property("PO") + .HasColumnType("nvarchar(max)"); + + b.Property("ProjectName") + .HasColumnType("nvarchar(max)"); + + b.Property("QuotId") + .HasColumnType("nvarchar(max)"); + + b.Property("ShippingAddress") + .HasColumnType("nvarchar(max)"); + + b.Property("SiteId") + .HasColumnType("nvarchar(max)"); + + b.Property("SiteName") + .HasColumnType("nvarchar(max)"); + + b.Property("Status") + .HasColumnType("nvarchar(max)"); + + b.Property("TT") + .HasColumnType("nvarchar(max)"); + + b.Property("WorkorderId") + .HasColumnType("int"); + + b.Property("createdby") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("ContactId"); + + b.HasIndex("WorkorderId"); + + b.ToTable("Quotes"); + }); + + modelBuilder.Entity("Data.SeaHavenIndustries.QuotesLineItems", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("CreatedDate") + .HasColumnType("datetime2"); + + b.Property("DeleterUserId") + .HasColumnType("nvarchar(max)"); + + b.Property("DeletionTime") + .HasColumnType("datetime2"); + + b.Property("Descriptions") + .HasColumnType("nvarchar(max)"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2"); + + b.Property("LastModifierUserId") + .HasColumnType("int"); + + b.Property("Lineitem") + .HasColumnType("decimal(18,2)"); + + b.Property("LineitemNumber") + .HasColumnType("int"); + + b.Property("QuoteId") + .HasColumnType("int"); + + b.Property("createdby") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("QuoteId"); + + b.ToTable("QuotesLines"); + }); + + modelBuilder.Entity("Data.SeaHavenIndustries.Region", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("Name") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + + b.HasKey("Id"); + + b.ToTable("Regions"); + }); + + modelBuilder.Entity("Data.SeaHavenIndustries.SitePreferredVendor", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("CreatedDate") + .HasColumnType("datetime2"); + + b.Property("DeleterUserId") + .HasColumnType("nvarchar(max)"); + + b.Property("DeletionTime") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2"); + + b.Property("LastModifierUserId") + .HasColumnType("int"); + + b.Property("LocationId") + .HasColumnType("int"); + + b.Property("SortOrder") + .HasColumnType("int"); + + b.Property("Trade") + .HasColumnType("nvarchar(450)"); + + b.Property("UpdatedBy") + .HasColumnType("nvarchar(max)"); + + b.Property("VendorId") + .HasColumnType("int"); + + b.Property("createdby") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("VendorId"); + + b.HasIndex("LocationId", "VendorId") + .IsUnique() + .HasFilter("[Trade] IS NULL"); + + b.HasIndex("LocationId", "VendorId", "Trade") + .IsUnique() + .HasFilter("[Trade] IS NOT NULL"); + + b.ToTable("SitePreferredVendors"); + }); + + modelBuilder.Entity("Data.SeaHavenIndustries.TaskListTemplate", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("CreatedDate") + .HasColumnType("datetime2"); + + b.Property("DeleterUserId") + .HasColumnType("nvarchar(max)"); + + b.Property("DeletionTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .HasColumnType("nvarchar(max)"); + + b.Property("IsActive") + .HasColumnType("bit"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2"); + + b.Property("LastModifierUserId") + .HasColumnType("int"); + + b.Property("Name") + .HasColumnType("nvarchar(max)"); + + b.Property("createdby") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("TaskListTemplates"); + }); + + modelBuilder.Entity("Data.SeaHavenIndustries.TaskListTemplateItem", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("CreatedDate") + .HasColumnType("datetime2"); + + b.Property("DeleterUserId") + .HasColumnType("nvarchar(max)"); + + b.Property("DeletionTime") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("ItemText") + .HasColumnType("nvarchar(max)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2"); + + b.Property("LastModifierUserId") + .HasColumnType("int"); + + b.Property("SortOrder") + .HasColumnType("int"); + + b.Property("TaskListTemplateId") + .HasColumnType("int"); + + b.Property("createdby") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("TaskListTemplateId"); + + b.ToTable("TaskListTemplateItems"); + }); + + modelBuilder.Entity("Data.SeaHavenIndustries.Template", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("AfterPhotoAttachment") + .HasColumnType("nvarchar(max)"); + + b.Property("AfterPhotoIssue") + .HasColumnType("nvarchar(max)"); + + b.Property("AssignTo") + .HasColumnType("nvarchar(450)"); + + b.Property("Attachments") + .HasColumnType("nvarchar(max)"); + + b.Property("BeforPhotoAttachment") + .HasColumnType("nvarchar(max)"); + + b.Property("BeforPhotoIssue") + .HasColumnType("nvarchar(max)"); + + b.Property("CategoryId") + .HasColumnType("int"); + + b.Property("ContactId") + .HasColumnType("int"); + + b.Property("CreatedDate") + .HasColumnType("datetime2"); + + b.Property("DeleterUserId") + .HasColumnType("nvarchar(max)"); + + b.Property("DeletionTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .HasColumnType("nvarchar(max)"); + + b.Property("DueDate") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2"); + + b.Property("LastModifierUserId") + .HasColumnType("int"); + + b.Property("LocationId") + .HasColumnType("int"); + + b.Property("PO") + .HasColumnType("nvarchar(max)"); + + b.Property("Priority") + .HasColumnType("nvarchar(max)"); + + b.Property("SignOffAttachment") + .HasColumnType("nvarchar(max)"); + + b.Property("SignOffName") + .HasColumnType("nvarchar(max)"); + + b.Property("SignOffSignature") + .HasColumnType("nvarchar(max)"); + + b.Property("Status") + .HasColumnType("nvarchar(max)"); + + b.Property("TT") + .HasColumnType("nvarchar(max)"); + + b.Property("WorkerOrderNumber") + .HasColumnType("nvarchar(max)"); + + b.Property("WorkerOrderTitle") + .HasColumnType("nvarchar(max)"); + + b.Property("createdby") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("AssignTo"); + + b.HasIndex("CategoryId"); + + b.HasIndex("ContactId"); + + b.HasIndex("LocationId"); + + b.ToTable("Templates"); + }); + + modelBuilder.Entity("Data.SeaHavenIndustries.Trade", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("IsActive") + .HasColumnType("bit"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("NormalizedName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("SortOrder") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("NormalizedName") + .IsUnique(); + + b.ToTable("Trades"); + }); + + modelBuilder.Entity("Data.SeaHavenIndustries.Vendor", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("Address") + .HasColumnType("nvarchar(max)"); + + b.Property("AvailabilityStatus") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("AvailabilityUpdatedAt") + .HasColumnType("datetime2"); + + b.Property("City") + .HasColumnType("nvarchar(max)"); + + b.Property("CompanyId") + .HasColumnType("int"); + + b.Property("CompanyName") + .HasColumnType("nvarchar(max)"); + + b.Property("CompanyPhone") + .HasColumnType("nvarchar(max)"); + + b.Property("ContactName") + .HasColumnType("nvarchar(max)"); + + b.Property("CreatedDate") + .HasColumnType("datetime2"); + + b.Property("DeleterUserId") + .HasColumnType("nvarchar(max)"); + + b.Property("DeletionTime") + .HasColumnType("datetime2"); + + b.Property("Email") + .HasColumnType("nvarchar(max)"); + + b.Property("GoogleMapsUrl") + .HasColumnType("nvarchar(max)"); + + b.Property("IsActive") + .HasColumnType("bit"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2"); + + b.Property("LastModifierUserId") + .HasColumnType("int"); + + b.Property("Notes") + .HasColumnType("nvarchar(max)"); + + b.Property("Phone") + .HasColumnType("nvarchar(max)"); + + b.Property("PreferredContact") + .HasColumnType("nvarchar(max)"); + + b.Property("State") + .HasColumnType("nvarchar(max)"); + + b.Property("TradeSpecialties") + .HasColumnType("nvarchar(max)"); + + b.Property("Zip") + .HasColumnType("nvarchar(max)"); + + b.Property("createdby") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("CompanyId"); + + b.ToTable("Vendors"); + }); + + modelBuilder.Entity("Data.SeaHavenIndustries.VendorAccessToken", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("CreatedDate") + .HasColumnType("datetime2"); + + b.Property("DeleterUserId") + .HasColumnType("nvarchar(max)"); + + b.Property("DeletionTime") + .HasColumnType("datetime2"); + + b.Property("ExpiresAt") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("IssuedAt") + .HasColumnType("datetime2"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2"); + + b.Property("LastModifierUserId") + .HasColumnType("int"); + + b.Property("LastUsedAt") + .HasColumnType("datetime2"); + + b.Property("RevokedAt") + .HasColumnType("datetime2"); + + b.Property("Token") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("VendorId") + .HasColumnType("int"); + + b.Property("createdby") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Token") + .IsUnique(); + + b.HasIndex("VendorId"); + + b.ToTable("VendorAccessTokens"); + }); + + modelBuilder.Entity("Data.SeaHavenIndustries.VendorAuditLog", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("Actor") + .HasColumnType("nvarchar(max)"); + + b.Property("CreatedAt") + .HasColumnType("datetime2"); + + b.Property("FieldName") + .HasColumnType("nvarchar(max)"); + + b.Property("NewValue") + .HasColumnType("nvarchar(max)"); + + b.Property("OldValue") + .HasColumnType("nvarchar(max)"); + + b.Property("VendorId") + .HasColumnType("int"); + + b.Property("WorkOrderId") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("VendorId"); + + b.ToTable("VendorAuditLogs"); + }); + + modelBuilder.Entity("Data.SeaHavenIndustries.VendorCompany", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("Address") + .HasColumnType("nvarchar(max)"); + + b.Property("City") + .HasColumnType("nvarchar(max)"); + + b.Property("CompanyPhone") + .HasColumnType("nvarchar(max)"); + + b.Property("CreatedDate") + .HasColumnType("datetime2"); + + b.Property("DeleterUserId") + .HasColumnType("nvarchar(max)"); + + b.Property("DeletionTime") + .HasColumnType("datetime2"); + + b.Property("Email") + .HasColumnType("nvarchar(max)"); + + b.Property("GoogleMapsUrl") + .HasColumnType("nvarchar(max)"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2"); + + b.Property("LastModifierUserId") + .HasColumnType("int"); + + b.Property("Name") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("NormalizedName") + .IsRequired() + .HasColumnType("nvarchar(450)"); + + b.Property("Notes") + .HasColumnType("nvarchar(max)"); + + b.Property("RowVersion") + .IsConcurrencyToken() + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("rowversion"); + + b.Property("State") + .HasColumnType("nvarchar(max)"); + + b.Property("Zip") + .HasColumnType("nvarchar(max)"); + + b.Property("createdby") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("NormalizedName") + .IsUnique(); + + b.ToTable("VendorCompanies"); + }); + + modelBuilder.Entity("Data.SeaHavenIndustries.VendorCompletionDocument", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("ContentType") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("CreatedDate") + .HasColumnType("datetime2"); + + b.Property("DeleterUserId") + .HasColumnType("nvarchar(max)"); + + b.Property("DeletionTime") + .HasColumnType("datetime2"); + + b.Property("DispatchId") + .HasColumnType("int"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2"); + + b.Property("LastModifierUserId") + .HasColumnType("int"); + + b.Property("OriginalFileName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Purpose") + .IsRequired() + .HasMaxLength(30) + .HasColumnType("nvarchar(30)"); + + b.Property("RejectionReason") + .HasColumnType("nvarchar(max)"); + + b.Property("ReplacesDocumentId") + .HasColumnType("int"); + + b.Property("ReviewStatus") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ReviewedAt") + .HasColumnType("datetime2"); + + b.Property("ScanStatus") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ScannedAt") + .HasColumnType("datetime2"); + + b.Property("SizeBytes") + .HasColumnType("bigint"); + + b.Property("StoredFileName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("VendorId") + .HasColumnType("int"); + + b.Property("Version") + .HasColumnType("int"); + + b.Property("WorkOrderId") + .HasColumnType("int"); + + b.Property("createdby") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("DispatchId"); + + b.HasIndex("VendorId"); + + b.HasIndex("WorkOrderId"); + + b.ToTable("VendorCompletionDocuments"); + }); + + modelBuilder.Entity("Data.SeaHavenIndustries.WorkOrder", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("AccountId") + .HasColumnType("int"); + + b.Property("AdditionalContacts") + .HasMaxLength(4000) + .HasColumnType("nvarchar(4000)"); + + b.Property("AfterPhotoAttachment") + .HasColumnType("nvarchar(max)"); + + b.Property("AfterPhotoIssue") + .HasColumnType("nvarchar(max)"); + + b.Property("AssignDate") + .HasColumnType("date"); + + b.Property("AssignTo") + .HasColumnType("nvarchar(450)"); + + b.Property("Attachments") + .HasColumnType("nvarchar(max)"); + + b.Property("AvetaRequired") + .HasColumnType("bit"); + + b.Property("AvettaTask") + .HasColumnType("nvarchar(max)"); + + b.Property("BeforPhotoAttachment") + .HasColumnType("nvarchar(max)"); + + b.Property("BeforPhotoIssue") + .HasColumnType("nvarchar(max)"); + + b.Property("Building") + .HasColumnType("nvarchar(max)"); + + b.Property("CarriedOver") + .HasColumnType("int"); + + b.Property("CompletedDate") + .HasColumnType("datetime2"); + + b.Property("CreatedDate") + .HasColumnType("datetime2"); + + b.Property("Customer") + .HasColumnType("nvarchar(max)"); + + b.Property("DateReported") + .HasColumnType("datetime2"); + + b.Property("DeleterUserId") + .HasColumnType("nvarchar(max)"); + + b.Property("DeletionTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .HasColumnType("nvarchar(max)"); + + b.Property("DocStatus") + .HasColumnType("int"); + + b.Property("DueDate") + .HasColumnType("datetime2"); + + b.Property("ExternalAssignedTo") + .HasMaxLength(450) + .HasColumnType("nvarchar(450)"); + + b.Property("ExternalLastOccurredAt") + .HasColumnType("datetimeoffset"); + + b.Property("ExternalRecordType") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ExternalSource") + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("ExternalUpdatedAt") + .HasColumnType("datetimeoffset"); + + b.Property("ExternalVersionHash") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ExternalWorkOrderId") + .HasMaxLength(450) + .HasColumnType("nvarchar(450)"); + + b.Property("ExtraServices") + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)"); + + b.Property("FlagColor") + .HasMaxLength(7) + .HasColumnType("nvarchar(7)"); + + b.Property("FrozenCompany") + .HasColumnType("nvarchar(max)"); + + b.Property("FrozenPoc") + .HasColumnType("nvarchar(max)"); + + b.Property("FrozenSite") + .HasColumnType("nvarchar(max)"); + + b.Property("InternalWONumber") + .HasMaxLength(11) + .HasColumnType("nvarchar(11)"); + + b.Property("IsAddOn") + .HasColumnType("bit"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2"); + + b.Property("LastModifierUserId") + .HasColumnType("int"); + + b.Property("LegacyStatus") + .HasColumnType("nvarchar(max)"); + + b.Property("LifecycleStatus") + .HasColumnType("int"); + + b.Property("LocationId") + .HasColumnType("int"); + + b.Property("OperationalFlags") + .HasColumnType("int"); + + b.Property("OriginalDate") + .HasColumnType("date"); + + b.Property("OriginalWeek") + .HasColumnType("date"); + + b.Property("PO") + .HasColumnType("nvarchar(max)"); + + b.Property("PocName") + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + + b.Property("PocNotes") + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)"); + + b.Property("PocPhone") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("PrimaryDispatchId") + .HasColumnType("int"); + + b.Property("Priority") + .HasColumnType("nvarchar(max)"); + + b.Property("Problem") + .HasColumnType("nvarchar(max)"); + + b.Property("RescheduleCount") + .HasColumnType("int"); + + b.Property("RowVersion") + .IsConcurrencyToken() + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("rowversion"); + + b.Property("ScheduleWeekOnly") + .HasColumnType("bit"); + + b.Property("ScheduledDate") + .HasColumnType("datetime2"); + + b.Property("ScheduledEnd") + .HasColumnType("datetime2"); + + b.Property("ScheduledStart") + .HasColumnType("datetime2"); + + b.Property("Service") + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("ServiceNotes") + .HasMaxLength(4000) + .HasColumnType("nvarchar(4000)"); + + b.Property("Severity") + .HasColumnType("nvarchar(max)"); + + b.Property("SignOffAttachment") + .HasColumnType("nvarchar(max)"); + + b.Property("SignOffName") + .HasColumnType("nvarchar(max)"); + + b.Property("SignOffSignature") + .HasColumnType("nvarchar(max)"); + + b.Property("SiteCode") + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.Property("Source") + .HasColumnType("nvarchar(max)"); + + b.Property("SourceEmailS3Key") + .HasColumnType("nvarchar(max)"); + + b.Property("Status") + .HasColumnType("nvarchar(max)"); + + b.Property("SubTrade") + .HasColumnType("nvarchar(max)"); + + b.Property("TT") + .HasColumnType("nvarchar(max)"); + + b.Property("TargetWeek") + .HasColumnType("date"); + + b.Property("TechPhone") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Trade") + .HasColumnType("nvarchar(max)"); + + b.Property("VendorNTE") + .HasColumnType("decimal(18,2)"); + + b.Property("VendorNotes") + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)"); + + b.Property("WorkOrderType") + .HasColumnType("int"); + + b.Property("WorkerOrderNumber") + .HasColumnType("nvarchar(max)"); + + b.Property("WorkerOrderTitle") + .HasColumnType("nvarchar(max)"); + + b.Property("createdby") + .HasColumnType("nvarchar(max)"); + + b.Property("istemplate") + .HasColumnType("bit"); + + b.HasKey("Id"); + + b.HasIndex("AccountId"); + + b.HasIndex("ExternalWorkOrderId") + .IsUnique() + .HasFilter("[ExternalWorkOrderId] IS NOT NULL AND [ExternalWorkOrderId] <> ''"); + + b.HasIndex("InternalWONumber") + .HasFilter("[istemplate] = 0"); + + b.HasIndex("LocationId"); + + b.HasIndex("PrimaryDispatchId"); + + b.HasIndex("ScheduledDate"); + + b.HasIndex("SiteCode") + .HasFilter("[istemplate] = 0"); + + b.HasIndex("WorkOrderType"); + + b.HasIndex("AssignTo", "ScheduledDate"); + + b.HasIndex("LifecycleStatus", "ScheduledDate") + .HasFilter("[istemplate] = 0"); + + b.ToTable("workOrders"); + }); + + modelBuilder.Entity("Data.SeaHavenIndustries.WorkOrderAttachments", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("Attachments") + .HasColumnType("nvarchar(max)"); + + b.Property("Category") + .HasColumnType("int"); + + b.Property("CreatedDate") + .HasColumnType("datetime2"); + + b.Property("DeleterUserId") + .HasColumnType("nvarchar(max)"); + + b.Property("DeletionTime") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2"); + + b.Property("LastModifierUserId") + .HasColumnType("int"); + + b.Property("WorkorderId") + .HasColumnType("int"); + + b.Property("createdby") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("WorkorderId"); + + b.ToTable("workOrderAttachments"); + }); + + modelBuilder.Entity("Data.SeaHavenIndustries.WorkOrderAuditLog", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("Action") + .HasColumnType("nvarchar(max)"); + + b.Property("ActorType") + .HasColumnType("nvarchar(max)"); + + b.Property("CorrelationId") + .HasColumnType("nvarchar(max)"); + + b.Property("CreatedAt") + .HasColumnType("datetime2"); + + b.Property("DispatchId") + .HasColumnType("int"); + + b.Property("EventType") + .HasColumnType("nvarchar(max)"); + + b.Property("FieldName") + .HasColumnType("nvarchar(max)"); + + b.Property("NewValue") + .HasColumnType("nvarchar(max)"); + + b.Property("OldValue") + .HasColumnType("nvarchar(max)"); + + b.Property("UserId") + .HasColumnType("nvarchar(450)"); + + b.Property("WorkOrderId") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("UserId"); + + b.HasIndex("WorkOrderId"); + + b.ToTable("WorkOrderAuditLogs"); + }); + + modelBuilder.Entity("Data.SeaHavenIndustries.WorkOrderCategories", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("CategoryId") + .HasColumnType("int"); + + b.Property("CreatedDate") + .HasColumnType("datetime2"); + + b.Property("DeleterUserId") + .HasColumnType("nvarchar(max)"); + + b.Property("DeletionTime") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2"); + + b.Property("LastModifierUserId") + .HasColumnType("int"); + + b.Property("WorkorderId") + .HasColumnType("int"); + + b.Property("createdby") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("CategoryId"); + + b.HasIndex("WorkorderId"); + + b.ToTable("workOrderCategories"); + }); + + modelBuilder.Entity("Data.SeaHavenIndustries.WorkOrderContacts", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("ContactId") + .HasColumnType("int"); + + b.Property("CreatedDate") + .HasColumnType("datetime2"); + + b.Property("DeleterUserId") + .HasColumnType("nvarchar(max)"); + + b.Property("DeletionTime") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .HasColumnType("bit"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2"); + + b.Property("LastModifierUserId") + .HasColumnType("int"); + + b.Property("Notes") + .HasColumnType("nvarchar(max)"); + + b.Property("WorkorderId") + .HasColumnType("int"); + + b.Property("createdby") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("ContactId"); + + b.HasIndex("WorkorderId"); + + b.ToTable("WorkOrderContacts"); + }); + + modelBuilder.Entity("Data.SeaHavenIndustries.WorkOrderExternalReceipt", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("ExternalId") + .IsRequired() + .HasMaxLength(450) + .HasColumnType("nvarchar(450)"); + + b.Property("Kind") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.Property("ProcessedAt") + .HasColumnType("datetimeoffset"); + + b.Property("Source") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("UpdatedAt") + .HasColumnType("datetimeoffset"); + + b.Property("VersionHash") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("Source", "Kind", "ExternalId") + .IsUnique() + .HasDatabaseName("IX_WorkOrderExternalReceipts_Source_Kind_ExternalId"); + + b.ToTable("WorkOrderExternalReceipts"); + }); + + modelBuilder.Entity("Data.SeaHavenIndustries.WorkOrderFieldLock", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("FieldName") + .IsRequired() + .HasColumnType("nvarchar(450)"); + + b.Property("LockedAt") + .HasColumnType("datetime2"); + + b.Property("LockedByUserId") + .HasColumnType("nvarchar(max)"); + + b.Property("WorkOrderId") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("WorkOrderId", "FieldName") + .IsUnique(); + + b.ToTable("WorkOrderFieldLocks"); + }); + + modelBuilder.Entity("Data.SeaHavenIndustries.WorkOrderReconciliationJob", b => + { + b.Property("Id") + .HasColumnType("int"); + + b.Property("CommentsProcessed") + .HasColumnType("int"); + + b.Property("CompletedAt") + .HasColumnType("datetimeoffset"); + + b.Property("ErrorCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("FenceToken") + .HasColumnType("uniqueidentifier"); + + b.Property("LeaseExpiresAt") + .HasColumnType("datetimeoffset"); + + b.Property("Reason") + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("RequestedAt") + .HasColumnType("datetimeoffset"); + + b.Property("RowVersion") + .IsConcurrencyToken() + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("rowversion"); + + b.Property("RunId") + .HasColumnType("uniqueidentifier"); + + b.Property("StartedAt") + .HasColumnType("datetimeoffset"); + + b.Property("State") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.Property("WorkOrdersProcessed") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("State"); + + b.ToTable("WorkOrderReconciliationJobs"); + }); + + modelBuilder.Entity("Data.SeaHavenIndustries.WorkOrderWebhookDelivery", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("BodySha256") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("DeliveryId") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("EventType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("OccurredAt") + .HasColumnType("datetimeoffset"); + + b.Property("ProcessedAt") + .HasColumnType("datetimeoffset"); + + b.HasKey("Id"); + + b.HasIndex("DeliveryId") + .IsUnique(); + + b.ToTable("WorkOrderWebhookDeliveries"); + }); + + modelBuilder.Entity("Data.SeaHavenIndustries.WorkOrderWeekRolledLedger", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("CorrelationId") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ProcessedAt") + .HasColumnType("datetime2"); + + b.Property("SourceWeekStart") + .HasColumnType("date"); + + b.Property("WorkOrderId") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("WorkOrderId", "SourceWeekStart") + .IsUnique(); + + b.ToTable("WorkOrderWeekRolledLedgers"); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRole", b => + { + b.Property("Id") + .HasColumnType("nvarchar(450)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasColumnType("nvarchar(max)"); + + b.Property("Name") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("NormalizedName") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.HasKey("Id"); + + b.HasIndex("NormalizedName") + .IsUnique() + .HasDatabaseName("RoleNameIndex") + .HasFilter("[NormalizedName] IS NOT NULL"); + + b.ToTable("AspNetRoles", (string)null); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("ClaimType") + .HasColumnType("nvarchar(max)"); + + b.Property("ClaimValue") + .HasColumnType("nvarchar(max)"); + + b.Property("RoleId") + .IsRequired() + .HasColumnType("nvarchar(450)"); + + b.HasKey("Id"); + + b.HasIndex("RoleId"); + + b.ToTable("AspNetRoleClaims", (string)null); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("ClaimType") + .HasColumnType("nvarchar(max)"); + + b.Property("ClaimValue") + .HasColumnType("nvarchar(max)"); + + b.Property("UserId") + .IsRequired() + .HasColumnType("nvarchar(450)"); + + b.HasKey("Id"); + + b.HasIndex("UserId"); + + b.ToTable("AspNetUserClaims", (string)null); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => + { + b.Property("LoginProvider") + .HasColumnType("nvarchar(450)"); + + b.Property("ProviderKey") + .HasColumnType("nvarchar(450)"); + + b.Property("ProviderDisplayName") + .HasColumnType("nvarchar(max)"); + + b.Property("UserId") + .IsRequired() + .HasColumnType("nvarchar(450)"); + + b.HasKey("LoginProvider", "ProviderKey"); + + b.HasIndex("UserId"); + + b.ToTable("AspNetUserLogins", (string)null); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b => + { + b.Property("UserId") + .HasColumnType("nvarchar(450)"); + + b.Property("RoleId") + .HasColumnType("nvarchar(450)"); + + b.HasKey("UserId", "RoleId"); + + b.HasIndex("RoleId"); + + b.ToTable("AspNetUserRoles", (string)null); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => + { + b.Property("UserId") + .HasColumnType("nvarchar(450)"); + + b.Property("LoginProvider") + .HasColumnType("nvarchar(450)"); + + b.Property("Name") + .HasColumnType("nvarchar(450)"); + + b.Property("Value") + .HasColumnType("nvarchar(max)"); + + b.HasKey("UserId", "LoginProvider", "Name"); + + b.ToTable("AspNetUserTokens", (string)null); + }); + + modelBuilder.Entity("Data.SeaHavenIndustries.Addresses", b => + { + b.HasOne("Data.SeaHavenIndustries.Accounts", "Account") + .WithMany("Addresses") + .HasForeignKey("AccountId") + .OnDelete(DeleteBehavior.Restrict); + + b.HasOne("Data.SeaHavenIndustries.Contacts", "Contact") + .WithMany() + .HasForeignKey("ContactId") + .OnDelete(DeleteBehavior.Restrict); + + b.Navigation("Account"); + + b.Navigation("Contact"); + }); + + modelBuilder.Entity("Data.SeaHavenIndustries.ApplicationUser", b => + { + b.HasOne("Data.SeaHavenIndustries.Accounts", "Account") + .WithMany() + .HasForeignKey("AccountId") + .OnDelete(DeleteBehavior.Restrict); + + b.Navigation("Account"); + }); + + modelBuilder.Entity("Data.SeaHavenIndustries.Assets", b => + { + b.HasOne("Data.SeaHavenIndustries.Accounts", "Account") + .WithMany() + .HasForeignKey("AccountId") + .OnDelete(DeleteBehavior.Restrict); + + b.HasOne("Data.SeaHavenIndustries.Locations", "Location") + .WithMany() + .HasForeignKey("LocationId") + .OnDelete(DeleteBehavior.Restrict); + + b.Navigation("Account"); + + b.Navigation("Location"); + }); + + modelBuilder.Entity("Data.SeaHavenIndustries.Comments", b => + { + b.HasOne("Data.SeaHavenIndustries.Dispatch", "Dispatch") + .WithMany("Comments") + .HasForeignKey("DispatchId") + .OnDelete(DeleteBehavior.Restrict); + + b.HasOne("Data.SeaHavenIndustries.ApplicationUser", "ApplicationUser") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Restrict); + + b.HasOne("Data.SeaHavenIndustries.WorkOrder", "WorkOrder") + .WithMany("Comments") + .HasForeignKey("WorkerOrderId") + .OnDelete(DeleteBehavior.Restrict); + + b.Navigation("ApplicationUser"); + + b.Navigation("Dispatch"); + + b.Navigation("WorkOrder"); + }); + + modelBuilder.Entity("Data.SeaHavenIndustries.ContactDetails", b => + { + b.HasOne("Data.SeaHavenIndustries.Contacts", "Contact") + .WithMany() + .HasForeignKey("ContactId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("Contact"); + }); + + modelBuilder.Entity("Data.SeaHavenIndustries.Contacts", b => + { + b.HasOne("Data.SeaHavenIndustries.Accounts", "Account") + .WithMany("Contacts") + .HasForeignKey("AccountId") + .OnDelete(DeleteBehavior.Restrict); + + b.HasOne("Data.SeaHavenIndustries.Locations", "Location") + .WithMany("Contacts") + .HasForeignKey("LocationId") + .OnDelete(DeleteBehavior.Restrict); + + b.Navigation("Account"); + + b.Navigation("Location"); + }); + + modelBuilder.Entity("Data.SeaHavenIndustries.Dispatch", b => + { + b.HasOne("Data.SeaHavenIndustries.Vendor", "Vendor") + .WithMany("Dispatches") + .HasForeignKey("VendorId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("Data.SeaHavenIndustries.WorkOrder", "WorkOrder") + .WithMany("Dispatches") + .HasForeignKey("WorkOrderId"); + + b.Navigation("Vendor"); + + b.Navigation("WorkOrder"); + }); + + modelBuilder.Entity("Data.SeaHavenIndustries.DispatchChecklistItem", b => + { + b.HasOne("Data.SeaHavenIndustries.Dispatch", "Dispatch") + .WithMany("ChecklistItems") + .HasForeignKey("DispatchId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("Data.SeaHavenIndustries.WorkOrder", "WorkOrder") + .WithMany() + .HasForeignKey("WorkOrderId") + .OnDelete(DeleteBehavior.Restrict); + + b.Navigation("Dispatch"); + + b.Navigation("WorkOrder"); + }); + + modelBuilder.Entity("Data.SeaHavenIndustries.DispatchSignoff", b => + { + b.HasOne("Data.SeaHavenIndustries.Dispatch", "Dispatch") + .WithMany("Signoffs") + .HasForeignKey("DispatchId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("Dispatch"); + }); + + modelBuilder.Entity("Data.SeaHavenIndustries.DispatchUpliftRequest", b => + { + b.HasOne("Data.SeaHavenIndustries.Dispatch", "Dispatch") + .WithMany() + .HasForeignKey("DispatchId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("Data.SeaHavenIndustries.VendorCompletionDocument", "EvidenceDocument") + .WithMany() + .HasForeignKey("EvidenceDocumentId") + .OnDelete(DeleteBehavior.Restrict); + + b.Navigation("Dispatch"); + + b.Navigation("EvidenceDocument"); + }); + + modelBuilder.Entity("Data.SeaHavenIndustries.DispatchWorkOrder", b => + { + b.HasOne("Data.SeaHavenIndustries.Dispatch", "Dispatch") + .WithMany("DispatchWorkOrders") + .HasForeignKey("DispatchId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("Data.SeaHavenIndustries.WorkOrder", "WorkOrder") + .WithMany() + .HasForeignKey("WorkOrderId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("Dispatch"); + + b.Navigation("WorkOrder"); + }); + + modelBuilder.Entity("Data.SeaHavenIndustries.Employee", b => + { + b.HasOne("Data.SeaHavenIndustries.Department", "Department") + .WithMany("Employees") + .HasForeignKey("DepartmentId") + .OnDelete(DeleteBehavior.Restrict); + + b.HasOne("Data.SeaHavenIndustries.JobTitle", "JobTitle") + .WithMany("Employees") + .HasForeignKey("JobTitleId") + .OnDelete(DeleteBehavior.Restrict); + + b.HasOne("Data.SeaHavenIndustries.Region", "Region") + .WithMany("Employees") + .HasForeignKey("RegionId") + .OnDelete(DeleteBehavior.Restrict); + + b.Navigation("Department"); + + b.Navigation("JobTitle"); + + b.Navigation("Region"); + }); + + modelBuilder.Entity("Data.SeaHavenIndustries.EmployeeAddress", b => + { + b.HasOne("Data.SeaHavenIndustries.Employee", "Employee") + .WithOne("Address") + .HasForeignKey("Data.SeaHavenIndustries.EmployeeAddress", "EmployeeId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("Employee"); + }); + + modelBuilder.Entity("Data.SeaHavenIndustries.EmployeeEmail", b => + { + b.HasOne("Data.SeaHavenIndustries.Employee", "Employee") + .WithMany("Emails") + .HasForeignKey("EmployeeId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("Employee"); + }); + + modelBuilder.Entity("Data.SeaHavenIndustries.EmployeePhone", b => + { + b.HasOne("Data.SeaHavenIndustries.Employee", "Employee") + .WithMany("Phones") + .HasForeignKey("EmployeeId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("Employee"); + }); + + modelBuilder.Entity("Data.SeaHavenIndustries.FollowUps", b => + { + b.HasOne("Data.SeaHavenIndustries.Accounts", "Account") + .WithMany() + .HasForeignKey("AccountId") + .OnDelete(DeleteBehavior.Restrict); + + b.HasOne("Data.SeaHavenIndustries.Employee", "Employee") + .WithMany() + .HasForeignKey("EmployeeId") + .OnDelete(DeleteBehavior.Restrict); + + b.HasOne("Data.SeaHavenIndustries.Locations", "Location") + .WithMany() + .HasForeignKey("LocationId") + .OnDelete(DeleteBehavior.Restrict); + + b.HasOne("Data.SeaHavenIndustries.WorkOrder", "WorkOrder") + .WithMany() + .HasForeignKey("WorkOrderId") + .OnDelete(DeleteBehavior.Restrict); + + b.Navigation("Account"); + + b.Navigation("Employee"); + + b.Navigation("Location"); + + b.Navigation("WorkOrder"); + }); + + modelBuilder.Entity("Data.SeaHavenIndustries.Locations", b => + { + b.HasOne("Data.SeaHavenIndustries.Accounts", "Account") + .WithMany() + .HasForeignKey("AccountId") + .OnDelete(DeleteBehavior.Restrict); + + b.Navigation("Account"); + }); + + modelBuilder.Entity("Data.SeaHavenIndustries.PMSchedules", b => + { + b.HasOne("Data.SeaHavenIndustries.Assets", "Asset") + .WithMany("PMSchedules") + .HasForeignKey("AssetId") + .OnDelete(DeleteBehavior.Restrict); + + b.HasOne("Data.SeaHavenIndustries.Locations", "Location") + .WithMany() + .HasForeignKey("LocationId") + .OnDelete(DeleteBehavior.Restrict); + + b.Navigation("Asset"); + + b.Navigation("Location"); + }); + + modelBuilder.Entity("Data.SeaHavenIndustries.Quotes", b => + { + b.HasOne("Data.SeaHavenIndustries.Contacts", "Contacts") + .WithMany() + .HasForeignKey("ContactId") + .OnDelete(DeleteBehavior.Restrict); + + b.HasOne("Data.SeaHavenIndustries.WorkOrder", "WorkOrder") + .WithMany("Quotes") + .HasForeignKey("WorkorderId") + .OnDelete(DeleteBehavior.Restrict); + + b.Navigation("Contacts"); + + b.Navigation("WorkOrder"); + }); + + modelBuilder.Entity("Data.SeaHavenIndustries.QuotesLineItems", b => + { + b.HasOne("Data.SeaHavenIndustries.Quotes", "Quotes") + .WithMany("LineItems") + .HasForeignKey("QuoteId") + .OnDelete(DeleteBehavior.Restrict); + + b.Navigation("Quotes"); + }); + + modelBuilder.Entity("Data.SeaHavenIndustries.SitePreferredVendor", b => + { + b.HasOne("Data.SeaHavenIndustries.Locations", "Location") + .WithMany() + .HasForeignKey("LocationId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("Data.SeaHavenIndustries.Vendor", "Vendor") + .WithMany("SitePreferences") + .HasForeignKey("VendorId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("Location"); + + b.Navigation("Vendor"); + }); + + modelBuilder.Entity("Data.SeaHavenIndustries.TaskListTemplateItem", b => + { + b.HasOne("Data.SeaHavenIndustries.TaskListTemplate", "Template") + .WithMany("Items") + .HasForeignKey("TaskListTemplateId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("Template"); + }); + + modelBuilder.Entity("Data.SeaHavenIndustries.Template", b => + { + b.HasOne("Data.SeaHavenIndustries.ApplicationUser", "AssignToUser") + .WithMany("Templates") + .HasForeignKey("AssignTo") + .OnDelete(DeleteBehavior.Restrict); + + b.HasOne("Data.SeaHavenIndustries.Category", "Category") + .WithMany("Templates") + .HasForeignKey("CategoryId") + .OnDelete(DeleteBehavior.Restrict); + + b.HasOne("Data.SeaHavenIndustries.Contacts", "POC") + .WithMany() + .HasForeignKey("ContactId") + .OnDelete(DeleteBehavior.Restrict); + + b.HasOne("Data.SeaHavenIndustries.Locations", "Locations") + .WithMany("Templates") + .HasForeignKey("LocationId") + .OnDelete(DeleteBehavior.Restrict); + + b.Navigation("AssignToUser"); + + b.Navigation("Category"); + + b.Navigation("Locations"); + + b.Navigation("POC"); + }); + + modelBuilder.Entity("Data.SeaHavenIndustries.Vendor", b => + { + b.HasOne("Data.SeaHavenIndustries.VendorCompany", "Company") + .WithMany("Vendors") + .HasForeignKey("CompanyId") + .OnDelete(DeleteBehavior.Restrict); + + b.Navigation("Company"); + }); + + modelBuilder.Entity("Data.SeaHavenIndustries.VendorAccessToken", b => + { + b.HasOne("Data.SeaHavenIndustries.Vendor", "Vendor") + .WithMany() + .HasForeignKey("VendorId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("Vendor"); + }); + + modelBuilder.Entity("Data.SeaHavenIndustries.VendorAuditLog", b => + { + b.HasOne("Data.SeaHavenIndustries.Vendor", "Vendor") + .WithMany("AuditLogs") + .HasForeignKey("VendorId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("Vendor"); + }); + + modelBuilder.Entity("Data.SeaHavenIndustries.VendorCompletionDocument", b => + { + b.HasOne("Data.SeaHavenIndustries.Dispatch", "Dispatch") + .WithMany("CompletionDocuments") + .HasForeignKey("DispatchId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("Data.SeaHavenIndustries.Vendor", "Vendor") + .WithMany() + .HasForeignKey("VendorId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("Data.SeaHavenIndustries.WorkOrder", "WorkOrder") + .WithMany() + .HasForeignKey("WorkOrderId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("Dispatch"); + + b.Navigation("Vendor"); + + b.Navigation("WorkOrder"); + }); + + modelBuilder.Entity("Data.SeaHavenIndustries.WorkOrder", b => + { + b.HasOne("Data.SeaHavenIndustries.Accounts", "Account") + .WithMany() + .HasForeignKey("AccountId") + .OnDelete(DeleteBehavior.Restrict); + + b.HasOne("Data.SeaHavenIndustries.ApplicationUser", "AssignToUser") + .WithMany("WorkOrders") + .HasForeignKey("AssignTo") + .OnDelete(DeleteBehavior.Restrict); + + b.HasOne("Data.SeaHavenIndustries.Locations", "Locations") + .WithMany("workOrders") + .HasForeignKey("LocationId") + .OnDelete(DeleteBehavior.Restrict); + + b.HasOne("Data.SeaHavenIndustries.Dispatch", "PrimaryDispatch") + .WithMany() + .HasForeignKey("PrimaryDispatchId") + .OnDelete(DeleteBehavior.Restrict); + + b.Navigation("Account"); + + b.Navigation("AssignToUser"); + + b.Navigation("Locations"); + + b.Navigation("PrimaryDispatch"); + }); + + modelBuilder.Entity("Data.SeaHavenIndustries.WorkOrderAttachments", b => + { + b.HasOne("Data.SeaHavenIndustries.WorkOrder", "WorkOrder") + .WithMany("workOrderAttachments") + .HasForeignKey("WorkorderId") + .OnDelete(DeleteBehavior.Restrict); + + b.Navigation("WorkOrder"); + }); + + modelBuilder.Entity("Data.SeaHavenIndustries.WorkOrderAuditLog", b => + { + b.HasOne("Data.SeaHavenIndustries.ApplicationUser", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Restrict); + + b.HasOne("Data.SeaHavenIndustries.WorkOrder", "WorkOrder") + .WithMany() + .HasForeignKey("WorkOrderId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("User"); + + b.Navigation("WorkOrder"); + }); + + modelBuilder.Entity("Data.SeaHavenIndustries.WorkOrderCategories", b => + { + b.HasOne("Data.SeaHavenIndustries.Category", "Category") + .WithMany("WorkOrderCategories") + .HasForeignKey("CategoryId") + .OnDelete(DeleteBehavior.Restrict); + + b.HasOne("Data.SeaHavenIndustries.WorkOrder", "WorkOrder") + .WithMany("WorkOrderCategories") + .HasForeignKey("WorkorderId") + .OnDelete(DeleteBehavior.Restrict); + + b.Navigation("Category"); + + b.Navigation("WorkOrder"); + }); + + modelBuilder.Entity("Data.SeaHavenIndustries.WorkOrderContacts", b => + { + b.HasOne("Data.SeaHavenIndustries.Contacts", "POC") + .WithMany("WorkOrderContacts") + .HasForeignKey("ContactId") + .OnDelete(DeleteBehavior.Restrict); + + b.HasOne("Data.SeaHavenIndustries.WorkOrder", "WorkOrder") + .WithMany("WorkOrderContacts") + .HasForeignKey("WorkorderId") + .OnDelete(DeleteBehavior.Restrict); + + b.Navigation("POC"); + + b.Navigation("WorkOrder"); + }); + + modelBuilder.Entity("Data.SeaHavenIndustries.WorkOrderFieldLock", b => + { + b.HasOne("Data.SeaHavenIndustries.WorkOrder", "WorkOrder") + .WithMany("FieldLocks") + .HasForeignKey("WorkOrderId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("WorkOrder"); + }); + + modelBuilder.Entity("Data.SeaHavenIndustries.WorkOrderWeekRolledLedger", b => + { + b.HasOne("Data.SeaHavenIndustries.WorkOrder", "WorkOrder") + .WithMany() + .HasForeignKey("WorkOrderId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("WorkOrder"); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b => + { + b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole", null) + .WithMany() + .HasForeignKey("RoleId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => + { + b.HasOne("Data.SeaHavenIndustries.ApplicationUser", null) + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => + { + b.HasOne("Data.SeaHavenIndustries.ApplicationUser", null) + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b => + { + b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole", null) + .WithMany() + .HasForeignKey("RoleId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("Data.SeaHavenIndustries.ApplicationUser", null) + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => + { + b.HasOne("Data.SeaHavenIndustries.ApplicationUser", null) + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + }); + + modelBuilder.Entity("Data.SeaHavenIndustries.Accounts", b => + { + b.Navigation("Addresses"); + + b.Navigation("Contacts"); + }); + + modelBuilder.Entity("Data.SeaHavenIndustries.ApplicationUser", b => + { + b.Navigation("Templates"); + + b.Navigation("WorkOrders"); + }); + + modelBuilder.Entity("Data.SeaHavenIndustries.Assets", b => + { + b.Navigation("PMSchedules"); + }); + + modelBuilder.Entity("Data.SeaHavenIndustries.Category", b => + { + b.Navigation("Templates"); + + b.Navigation("WorkOrderCategories"); + }); + + modelBuilder.Entity("Data.SeaHavenIndustries.Contacts", b => + { + b.Navigation("WorkOrderContacts"); + }); + + modelBuilder.Entity("Data.SeaHavenIndustries.Department", b => + { + b.Navigation("Employees"); + }); + + modelBuilder.Entity("Data.SeaHavenIndustries.Dispatch", b => + { + b.Navigation("ChecklistItems"); + + b.Navigation("Comments"); + + b.Navigation("CompletionDocuments"); + + b.Navigation("DispatchWorkOrders"); + + b.Navigation("Signoffs"); + }); + + modelBuilder.Entity("Data.SeaHavenIndustries.Employee", b => + { + b.Navigation("Address"); + + b.Navigation("Emails"); + + b.Navigation("Phones"); + }); + + modelBuilder.Entity("Data.SeaHavenIndustries.JobTitle", b => + { + b.Navigation("Employees"); + }); + + modelBuilder.Entity("Data.SeaHavenIndustries.Locations", b => + { + b.Navigation("Contacts"); + + b.Navigation("Templates"); + + b.Navigation("workOrders"); + }); + + modelBuilder.Entity("Data.SeaHavenIndustries.Quotes", b => + { + b.Navigation("LineItems"); + }); + + modelBuilder.Entity("Data.SeaHavenIndustries.Region", b => + { + b.Navigation("Employees"); + }); + + modelBuilder.Entity("Data.SeaHavenIndustries.TaskListTemplate", b => + { + b.Navigation("Items"); + }); + + modelBuilder.Entity("Data.SeaHavenIndustries.Vendor", b => + { + b.Navigation("AuditLogs"); + + b.Navigation("Dispatches"); + + b.Navigation("SitePreferences"); + }); + + modelBuilder.Entity("Data.SeaHavenIndustries.VendorCompany", b => + { + b.Navigation("Vendors"); + }); + + modelBuilder.Entity("Data.SeaHavenIndustries.WorkOrder", b => + { + b.Navigation("Comments"); + + b.Navigation("Dispatches"); + + b.Navigation("FieldLocks"); + + b.Navigation("Quotes"); + + b.Navigation("WorkOrderCategories"); + + b.Navigation("WorkOrderContacts"); + + b.Navigation("workOrderAttachments"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/Data.SeaHavenIndustries/Migrations/20260915002525_SH138_SiteContacts.cs b/Data.SeaHavenIndustries/Migrations/20260915002525_SH138_SiteContacts.cs new file mode 100644 index 0000000..17191ed --- /dev/null +++ b/Data.SeaHavenIndustries/Migrations/20260915002525_SH138_SiteContacts.cs @@ -0,0 +1,28 @@ +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace Data.SeaHavenIndustries.Migrations +{ + /// + public partial class SH138_SiteContacts : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.AddColumn( + name: "SiteContactOrder", + table: "Contacts", + type: "int", + nullable: true); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropColumn( + name: "SiteContactOrder", + table: "Contacts"); + } + } +} diff --git a/Data.SeaHavenIndustries/Migrations/ApplicationDbContextModelSnapshot.cs b/Data.SeaHavenIndustries/Migrations/ApplicationDbContextModelSnapshot.cs index bc39339..7bf6f39 100644 --- a/Data.SeaHavenIndustries/Migrations/ApplicationDbContextModelSnapshot.cs +++ b/Data.SeaHavenIndustries/Migrations/ApplicationDbContextModelSnapshot.cs @@ -651,6 +651,9 @@ namespace Data.SeaHavenIndustries.Migrations b.Property("PhoneNumber") .HasColumnType("nvarchar(max)"); + b.Property("SiteContactOrder") + .HasColumnType("int"); + b.Property("State") .HasColumnType("nvarchar(max)"); @@ -2400,6 +2403,10 @@ namespace Data.SeaHavenIndustries.Migrations b.Property("AccountId") .HasColumnType("int"); + b.Property("AdditionalContacts") + .HasMaxLength(4000) + .HasColumnType("nvarchar(4000)"); + b.Property("AfterPhotoAttachment") .HasColumnType("nvarchar(max)"); @@ -2548,10 +2555,6 @@ namespace Data.SeaHavenIndustries.Migrations .HasMaxLength(2000) .HasColumnType("nvarchar(2000)"); - b.Property("AdditionalContacts") - .HasMaxLength(4000) - .HasColumnType("nvarchar(4000)"); - b.Property("PocPhone") .HasMaxLength(50) .HasColumnType("nvarchar(50)"); @@ -3224,16 +3227,6 @@ namespace Data.SeaHavenIndustries.Migrations b.Navigation("Account"); }); - modelBuilder.Entity("Data.SeaHavenIndustries.Locations", b => - { - b.HasOne("Data.SeaHavenIndustries.Accounts", "Account") - .WithMany() - .HasForeignKey("AccountId") - .OnDelete(DeleteBehavior.Restrict); - - b.Navigation("Account"); - }); - modelBuilder.Entity("Data.SeaHavenIndustries.Assets", b => { b.HasOne("Data.SeaHavenIndustries.Accounts", "Account") @@ -3294,7 +3287,7 @@ namespace Data.SeaHavenIndustries.Migrations .OnDelete(DeleteBehavior.Restrict); b.HasOne("Data.SeaHavenIndustries.Locations", "Location") - .WithMany() + .WithMany("Contacts") .HasForeignKey("LocationId") .OnDelete(DeleteBehavior.Restrict); @@ -3474,6 +3467,16 @@ namespace Data.SeaHavenIndustries.Migrations b.Navigation("WorkOrder"); }); + modelBuilder.Entity("Data.SeaHavenIndustries.Locations", b => + { + b.HasOne("Data.SeaHavenIndustries.Accounts", "Account") + .WithMany() + .HasForeignKey("AccountId") + .OnDelete(DeleteBehavior.Restrict); + + b.Navigation("Account"); + }); + modelBuilder.Entity("Data.SeaHavenIndustries.PMSchedules", b => { b.HasOne("Data.SeaHavenIndustries.Assets", "Asset") @@ -3869,7 +3872,7 @@ namespace Data.SeaHavenIndustries.Migrations modelBuilder.Entity("Data.SeaHavenIndustries.Locations", b => { - b.Navigation("Account"); + b.Navigation("Contacts"); b.Navigation("Templates"); diff --git a/Data.SeaHavenIndustries/Models/Contacts.cs b/Data.SeaHavenIndustries/Models/Contacts.cs index 27e50f7..062cfcd 100644 --- a/Data.SeaHavenIndustries/Models/Contacts.cs +++ b/Data.SeaHavenIndustries/Models/Contacts.cs @@ -30,6 +30,9 @@ namespace Data.SeaHavenIndustries public int? LocationId { get; set; } public int? AccountId { get; set; } + // SH-138: dense zero-based display order for site-managed contacts + public int? SiteContactOrder { get; set; } + // Navigation Properties [ForeignKey(nameof(LocationId))] public Locations? Location { get; set; } diff --git a/Data.SeaHavenIndustries/Models/Locations.cs b/Data.SeaHavenIndustries/Models/Locations.cs index f2d9e2e..ce8a6ba 100644 --- a/Data.SeaHavenIndustries/Models/Locations.cs +++ b/Data.SeaHavenIndustries/Models/Locations.cs @@ -30,5 +30,8 @@ namespace Data.SeaHavenIndustries // Navigation Properties public ICollection