diff --git a/console/src/oapi/management.generated.ts b/console/src/oapi/management.generated.ts index b1b4657a..682ad788 100644 --- a/console/src/oapi/management.generated.ts +++ b/console/src/oapi/management.generated.ts @@ -116,6 +116,26 @@ export interface paths { patch: operations["updateCampaign"]; trace?: never; }; + "/api/admin/projects/{projectID}/campaigns/{campaignID}/unarchive": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Unarchive campaign + * @description Restores an archived campaign by clearing its deleted_at timestamp + */ + post: operations["unarchiveCampaign"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; "/api/admin/projects/{projectID}/campaigns/{campaignID}/templates": { parameters: { query?: never; @@ -276,6 +296,26 @@ export interface paths { patch: operations["updateList"]; trace?: never; }; + "/api/admin/projects/{projectID}/lists/{listID}/unarchive": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Unarchive list + * @description Restores an archived list by clearing its deleted_at timestamp + */ + post: operations["unarchiveList"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; "/api/admin/projects/{projectID}/lists/{listID}/duplicate": { parameters: { query?: never; @@ -540,6 +580,26 @@ export interface paths { patch?: never; trace?: never; }; + "/api/admin/projects/{projectID}/journeys/{journeyID}/unarchive": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Unarchive journey + * @description Restores an archived journey by clearing its deleted_at timestamp + */ + post: operations["unarchiveJourney"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; "/api/admin/projects/{projectID}/journeys/{journeyID}/duplicate": { parameters: { query?: never; @@ -2748,6 +2808,11 @@ export interface components { templates: components["schemas"]["Template"][]; variables?: components["schemas"]["CampaignVariable"][]; delivery: components["schemas"]["Delivery"]; + /** + * @description Whether the campaign has been archived + * @example false + */ + archived?: boolean; }; Delivery: { /** @example 0 */ @@ -2870,6 +2935,11 @@ export interface components { * @example 2025-11-23T17:20:00.021Z */ updated_at: string; + /** + * @description Whether the list has been archived + * @example false + */ + archived?: boolean; }; Provider: { /** @@ -4795,6 +4865,8 @@ export interface components { Offset: number; /** @description Search query string */ Search: string; + /** @description Include archived/soft-deleted items in the results */ + IncludeDeleted: boolean; }; requestBodies: never; headers: never; @@ -4880,6 +4952,8 @@ export interface operations { offset?: components["parameters"]["Offset"]; /** @description Search query string */ search?: components["parameters"]["Search"]; + /** @description Include archived/soft-deleted items in the results */ + include_deleted?: components["parameters"]["IncludeDeleted"]; }; header?: never; path: { @@ -5004,6 +5078,30 @@ export interface operations { default: components["responses"]["Error"]; }; }; + unarchiveCampaign: { + parameters: { + query?: never; + header?: never; + path: { + /** @description The project ID */ + projectID: string; + /** @description The campaign ID */ + campaignID: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Campaign unarchived successfully */ + 204: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + default: components["responses"]["Error"]; + }; + }; createTemplate: { parameters: { query?: never; @@ -5223,6 +5321,8 @@ export interface operations { offset?: components["parameters"]["Offset"]; /** @description Search query string */ search?: components["parameters"]["Search"]; + /** @description Include archived/soft-deleted items in the results */ + include_deleted?: components["parameters"]["IncludeDeleted"]; }; header?: never; path: { @@ -5345,6 +5445,30 @@ export interface operations { default: components["responses"]["Error"]; }; }; + unarchiveList: { + parameters: { + query?: never; + header?: never; + path: { + /** @description The project ID */ + projectID: string; + /** @description The list ID */ + listID: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description List unarchived successfully */ + 204: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + default: components["responses"]["Error"]; + }; + }; duplicateList: { parameters: { query?: never; @@ -5603,6 +5727,8 @@ export interface operations { offset?: components["parameters"]["Offset"]; /** @description Search query string */ search?: components["parameters"]["Search"]; + /** @description Include archived/soft-deleted items in the results */ + include_deleted?: components["parameters"]["IncludeDeleted"]; }; header?: never; path: { @@ -5972,6 +6098,30 @@ export interface operations { default: components["responses"]["Error"]; }; }; + unarchiveJourney: { + parameters: { + query?: never; + header?: never; + path: { + /** @description The project ID */ + projectID: string; + /** @description The journey ID */ + journeyID: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Journey unarchived successfully */ + 204: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + default: components["responses"]["Error"]; + }; + }; duplicateJourney: { parameters: { query?: never; diff --git a/console/src/types.ts b/console/src/types.ts index 18d46352..5bbdfc5a 100644 --- a/console/src/types.ts +++ b/console/src/types.ts @@ -296,6 +296,7 @@ export interface SearchParams { search?: string tag?: string[] id?: UUID[] + include_deleted?: boolean } export interface SearchResult { @@ -472,6 +473,7 @@ export type List = { total: number } is_visible: boolean + archived?: boolean created_at: string updated_at: string } & ( diff --git a/console/src/views/campaign/Campaigns.tsx b/console/src/views/campaign/Campaigns.tsx index f4832b12..d874eb2f 100644 --- a/console/src/views/campaign/Campaigns.tsx +++ b/console/src/views/campaign/Campaigns.tsx @@ -13,6 +13,7 @@ import { MoreHorizontal, Copy, Archive, + ArchiveRestore, } from "lucide-react" import { oapiClient } from "@/oapi/client" import { useResolver } from "../../hooks" @@ -73,6 +74,7 @@ export default function Campaigns({ create = false }: CampaignsProps) { const [searchQuery, setSearchQuery] = useState("") const [debouncedQuery, setDebouncedQuery] = useState("") const [offset, setOffset] = useState(0) + const [showArchived, setShowArchived] = useState(false) const searchTimeoutRef = useRef | undefined>(undefined) const handleSearch = useCallback((value: string) => { @@ -111,9 +113,31 @@ export default function Campaigns({ create = false }: CampaignsProps) { }, [project.id, debouncedQuery, offset]), ) - const campaigns = result?.results - const hasNextPage = !!result && offset + pageSize < result.total - const hasPrevPage = offset > 0 + const [archivedResult, , reloadArchived] = useResolver( + useCallback(async () => { + if (!showArchived) return null + const response = await oapiClient.GET("/api/admin/projects/{projectID}/campaigns", { + params: { + path: { + projectID: project.id, + }, + query: { + limit: 100, + include_deleted: true, + search: debouncedQuery || undefined, + }, + }, + }) + if (response.error || !response.data) return null + return response.data.results?.filter((c) => c.archived) ?? [] + }, [project.id, debouncedQuery, showArchived]), + ) + + const isArchivedView = showArchived + const campaigns = isArchivedView ? archivedResult : result?.results + const isLoading = isArchivedView ? archivedResult === null : !result + const hasNextPage = !isArchivedView && !!result && offset + pageSize < result.total + const hasPrevPage = !isArchivedView && offset > 0 const handleNextPage = () => { if (hasNextPage) { @@ -156,9 +180,30 @@ export default function Campaigns({ create = false }: CampaignsProps) { }, }, }) + setShowArchived(false) await reload() } + const handleUnarchiveCampaign = async (id: string) => { + const response = await oapiClient.POST( + "/api/admin/projects/{projectID}/campaigns/{campaignID}/unarchive", + { + params: { + path: { + projectID: project.id, + campaignID: id, + }, + }, + }, + ) + if (response.error) { + console.error("Failed to unarchive campaign", response.error) + return + } + setShowArchived(false) + await Promise.all([reload(), reloadArchived()]) + } + const handleRowClick = (campaign: { id: UUID } & unknown) => { navigate(`/projects/${project.id}/campaigns/${campaign.id.toString()}`) } @@ -207,7 +252,19 @@ export default function Campaigns({ create = false }: CampaignsProps) { className="pl-9" /> - +
+ + +
{/* Table */} @@ -224,7 +281,7 @@ export default function Campaigns({ create = false }: CampaignsProps) { - {!campaigns ? ( + {isLoading ? ( Array.from({ length: 5 }).map((_, i) => ( @@ -253,9 +310,14 @@ export default function Campaigns({ create = false }: CampaignsProps) {

- {debouncedQuery - ? t("no_campaigns_found") - : t("no_campaigns_yet", "No campaigns yet")} + {isArchivedView + ? t( + "no_archived_campaigns", + "No archived campaigns", + ) + : debouncedQuery + ? t("no_campaigns_found") + : t("no_campaigns_yet", "No campaigns yet")}

@@ -326,15 +388,32 @@ export default function Campaigns({ create = false }: CampaignsProps) { {t("duplicate")} - - handleArchiveCampaign(e, campaign.id) - } - className="text-destructive" - > - - {t("archive")} - + {isArchivedView ? ( + { + e.stopPropagation() + handleUnarchiveCampaign( + campaign.id.toString(), + ) + }} + > + + {t("unarchive", "Unarchive")} + + ) : ( + + handleArchiveCampaign( + e, + campaign.id, + ) + } + className="text-destructive" + > + + {t("archive")} + + )} @@ -346,7 +425,7 @@ export default function Campaigns({ create = false }: CampaignsProps) { {/* Pagination */} - {campaigns && campaigns.length > 0 && ( + {!isArchivedView && campaigns && campaigns.length > 0 && (

{result?.total ?? campaigns.length} {t("campaign.plural").toLowerCase()} diff --git a/console/src/views/journey/Journeys.tsx b/console/src/views/journey/Journeys.tsx index 5d197d26..a61ee9c7 100644 --- a/console/src/views/journey/Journeys.tsx +++ b/console/src/views/journey/Journeys.tsx @@ -13,9 +13,11 @@ import { MoreHorizontal, Copy, Archive, + ArchiveRestore, } from "lucide-react" import api from "../../api" +import { oapiClient } from "@/oapi/client" import { useResolver } from "../../hooks" import { formatDate } from "../../utils" import { getRandomColor } from "@/lib/colors" @@ -81,6 +83,7 @@ export default function Journeys() { const [cursor, setCursor] = useState() const [pageDirection, setPageDirection] = useState<"next" | "prev" | undefined>() const [cursorHistory, setCursorHistory] = useState([]) + const [showArchived, setShowArchived] = useState(false) const searchTimeoutRef = useRef() const handleSearch = useCallback((value: string) => { @@ -105,10 +108,32 @@ export default function Journeys() { }, [project.id, debouncedQuery, cursor, pageDirection]), ) - const journeys = result?.results + const [archivedResult, , reloadArchived] = useResolver( + useCallback(async () => { + if (!showArchived) return null + const response = await oapiClient.GET("/api/admin/projects/{projectID}/journeys", { + params: { + path: { + projectID: project.id, + }, + query: { + limit: 100, + include_deleted: true, + search: debouncedQuery || undefined, + }, + }, + }) + if (response.error || !response.data) return null + return response.data.results?.filter((j) => j.status === "archived") ?? [] + }, [project.id, debouncedQuery, showArchived]), + ) + + const isArchivedView = showArchived + const journeys = isArchivedView ? archivedResult : result?.results const total = result?.total ?? 0 - const hasNextPage = !!result?.nextCursor - const hasPrevPage = cursorHistory.length > 0 + const isLoading = isArchivedView ? archivedResult === null : !result + const hasNextPage = !isArchivedView && !!result?.nextCursor + const hasPrevPage = !isArchivedView && cursorHistory.length > 0 const handleNextPage = () => { if (result?.nextCursor) { @@ -144,6 +169,23 @@ export default function Journeys() { await reload() } + const handleUnarchiveJourney = async (id: UUID) => { + const response = await oapiClient.POST("/api/admin/projects/{projectID}/journeys/{journeyID}/unarchive", { + params: { + path: { + projectID: project.id, + journeyID: id, + }, + }, + }) + if (response.error) { + throw response.error + } + + setShowArchived(false) + await Promise.all([reload(), reloadArchived()]) + } + return (

{/* Header */} @@ -173,14 +215,26 @@ export default function Journeys() { className="pl-9" />
- +
+ + +
{/* Table */} @@ -200,7 +254,7 @@ export default function Journeys() {
- {!journeys ? ( + {isLoading ? ( Array.from({ length: 5 }).map((_, i) => ( @@ -232,11 +286,16 @@ export default function Journeys() {

- {debouncedQuery - ? t("no_journeys_found", "No journeys found") - : t("no_journeys_yet", "No journeys yet")} + {isArchivedView + ? t( + "no_archived_journeys", + "No archived journeys", + ) + : debouncedQuery + ? t("no_journeys_found", "No journeys found") + : t("no_journeys_yet", "No journeys yet")}

- {!debouncedQuery && ( + {!debouncedQuery && !isArchivedView && (
+ {/* Create Journey Dialog */} diff --git a/console/src/views/users/Lists.tsx b/console/src/views/users/Lists.tsx index f025da1a..f40610a4 100644 --- a/console/src/views/users/Lists.tsx +++ b/console/src/views/users/Lists.tsx @@ -13,10 +13,12 @@ import { MoreHorizontal, Copy, Archive, + ArchiveRestore, } from "lucide-react" import { NIL } from "uuid" import api from "../../api" +import { oapiClient } from "@/oapi/client" import { useResolver } from "../../hooks" import { formatDate, snakeToTitle } from "../../utils" import { getRandomColor } from "@/lib/colors" @@ -78,7 +80,8 @@ export default function Lists() { const [debouncedQuery, setDebouncedQuery] = useState("") const [isCreateOpen, setIsCreateOpen] = useState(false) const [offset, setOffset] = useState(0) - const searchTimeoutRef = useRef>() + const [showArchived, setShowArchived] = useState(false) + const searchTimeoutRef = useRef | undefined>(undefined) const handleSearch = useCallback((value: string) => { setSearchQuery(value) @@ -99,10 +102,32 @@ export default function Lists() { }, [projectId, debouncedQuery, offset]), ) - const lists = result?.results + const [archivedResult, , reloadArchived] = useResolver( + useCallback(async () => { + if (!showArchived) return null + const response = await oapiClient.GET("/api/admin/projects/{projectID}/lists", { + params: { + path: { + projectID: projectId, + }, + query: { + limit: 100, + include_deleted: true, + search: debouncedQuery || undefined, + }, + }, + }) + if (response.error || !response.data) return null + return response.data.results?.filter((l) => l.archived) ?? [] + }, [projectId, debouncedQuery, showArchived]), + ) + + const isArchivedView = showArchived + const lists = isArchivedView ? archivedResult : result?.results const total = result?.total ?? 0 - const hasNextPage = offset + pageSize < total - const hasPrevPage = offset > 0 + const isLoading = isArchivedView ? archivedResult === null : !result + const hasNextPage = !isArchivedView && offset + pageSize < total + const hasPrevPage = !isArchivedView && offset > 0 const handleNextPage = () => { setOffset((prev) => prev + pageSize) @@ -128,6 +153,23 @@ export default function Lists() { await reload() } + const handleUnarchiveList = async (id: UUID) => { + const response = await oapiClient.POST("/api/admin/projects/{projectID}/lists/{listID}/unarchive", { + params: { + path: { + projectID: projectId, + listID: id, + }, + }, + }) + if (response.error) { + throw response.error + } + + setShowArchived(false) + await Promise.all([reload(), reloadArchived()]) + } + return (
{/* Header */} @@ -159,6 +201,16 @@ export default function Lists() { />
+
+ {/* Create List Dialog */} diff --git a/go.mod b/go.mod index 326f96df..7bd1a868 100644 --- a/go.mod +++ b/go.mod @@ -15,7 +15,7 @@ require ( github.com/cloudproud/graceful v1.1.2 github.com/docker/go-connections v0.6.0 github.com/extism/go-sdk v1.7.1 - github.com/getkin/kin-openapi v0.133.0 + github.com/getkin/kin-openapi v0.135.0 github.com/go-chi/chi/v5 v5.2.3 github.com/go-chi/cors v1.2.2 github.com/go-redsync/redsync/v4 v4.14.1 @@ -28,7 +28,7 @@ require ( github.com/nats-io/nats.go v1.48.0 github.com/nyaruka/phonenumbers v1.6.7 github.com/oapi-codegen/nethttp-middleware v1.1.2 - github.com/oapi-codegen/runtime v1.1.1 + github.com/oapi-codegen/runtime v1.4.0 github.com/openfga/api/proto v0.0.0-20260217232149-f917ddb000ce github.com/openfga/openfga v1.11.6 github.com/osteele/liquid v1.7.0 @@ -41,10 +41,11 @@ require ( github.com/testcontainers/testcontainers-go/modules/nats v0.40.0 github.com/testcontainers/testcontainers-go/modules/postgres v0.40.0 github.com/testcontainers/testcontainers-go/modules/redis v0.40.0 + github.com/tetratelabs/wazero v1.9.0 go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.65.0 go.opentelemetry.io/otel v1.40.0 go.uber.org/zap v1.27.1 - golang.org/x/net v0.49.0 + golang.org/x/net v0.50.0 golang.org/x/sync v0.19.0 golang.org/x/text v0.34.0 google.golang.org/protobuf v1.36.11 @@ -145,8 +146,8 @@ require ( github.com/go-logr/logr v1.4.3 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/go-ole/go-ole v1.3.0 // indirect - github.com/go-openapi/jsonpointer v0.21.0 // indirect - github.com/go-openapi/swag v0.23.0 // indirect + github.com/go-openapi/jsonpointer v0.22.4 // indirect + github.com/go-openapi/swag/jsonname v0.25.4 // indirect github.com/go-sql-driver/mysql v1.9.3 // indirect github.com/go-toolsmith/astcast v1.1.0 // indirect github.com/go-toolsmith/astcopy v1.1.0 // indirect @@ -201,7 +202,7 @@ require ( github.com/kisielk/errcheck v1.9.0 // indirect github.com/kkHAIKE/contextcheck v1.1.6 // indirect github.com/klauspost/compress v1.18.0 // indirect - github.com/klauspost/cpuid/v2 v2.2.5 // indirect + github.com/klauspost/cpuid/v2 v2.2.7 // indirect github.com/kulti/thelper v0.6.3 // indirect github.com/kunwardeep/paralleltest v1.0.10 // indirect github.com/lann/builder v0.0.0-20180802200727-47ae307949d0 // indirect @@ -216,7 +217,7 @@ require ( github.com/lufia/plan9stats v0.0.0-20240226150601-1dcf7310316a // indirect github.com/macabu/inamedparam v0.1.3 // indirect github.com/magiconair/properties v1.8.10 // indirect - github.com/mailru/easyjson v0.9.0 // indirect + github.com/mailru/easyjson v0.9.1 // indirect github.com/maratori/testableexamples v1.0.0 // indirect github.com/maratori/testpackage v1.1.1 // indirect github.com/matoous/godox v1.1.0 // indirect @@ -246,9 +247,9 @@ require ( github.com/nishanths/exhaustive v0.12.0 // indirect github.com/nishanths/predeclared v0.2.2 // indirect github.com/nunnatsa/ginkgolinter v0.19.1 // indirect - github.com/oapi-codegen/oapi-codegen/v2 v2.5.1 // indirect - github.com/oasdiff/yaml v0.0.0-20250309154309-f31be36b4037 // indirect - github.com/oasdiff/yaml3 v0.0.0-20250309153720-d2182401db90 // indirect + github.com/oapi-codegen/oapi-codegen/v2 v2.7.0 // indirect + github.com/oasdiff/yaml v0.0.9 // indirect + github.com/oasdiff/yaml3 v0.0.9 // indirect github.com/oklog/ulid/v2 v2.1.1 // indirect github.com/olekukonko/tablewriter v0.0.5 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect @@ -278,7 +279,7 @@ require ( github.com/ryanrolds/sqlclosecheck v0.5.1 // indirect github.com/sagikazarmark/locafero v0.9.0 // indirect github.com/sanposhiho/wastedassign/v2 v2.1.0 // indirect - github.com/santhosh-tekuri/jsonschema/v6 v6.0.1 // indirect + github.com/santhosh-tekuri/jsonschema/v6 v6.0.2 // indirect github.com/sashamelentyev/interfacebloat v1.1.0 // indirect github.com/sashamelentyev/usestdlibvars v1.28.0 // indirect github.com/securego/gosec/v2 v2.22.2 // indirect @@ -290,8 +291,8 @@ require ( github.com/sonatard/noctx v0.1.0 // indirect github.com/sourcegraph/conc v0.3.0 // indirect github.com/sourcegraph/go-diff v0.7.0 // indirect - github.com/speakeasy-api/jsonpath v0.6.0 // indirect - github.com/speakeasy-api/openapi-overlay v0.10.2 // indirect + github.com/speakeasy-api/jsonpath v0.6.3 // indirect + github.com/speakeasy-api/openapi v1.19.2 // indirect github.com/spf13/afero v1.15.0 // indirect github.com/spf13/cast v1.10.0 // indirect github.com/spf13/cobra v1.10.2 // indirect @@ -304,7 +305,6 @@ require ( github.com/tdakkota/asciicheck v0.4.1 // indirect github.com/tetafro/godot v1.5.0 // indirect github.com/tetratelabs/wabin v0.0.0-20230304001439-f6f874872834 // indirect - github.com/tetratelabs/wazero v1.9.0 // indirect github.com/timakin/bodyclose v0.0.0-20241017074812-ed6a65f985e3 // indirect github.com/timonwong/loggercheck v0.10.1 // indirect github.com/tklauser/go-sysconf v0.3.13 // indirect @@ -316,7 +316,7 @@ require ( github.com/uudashr/gocognit v1.2.0 // indirect github.com/uudashr/iface v1.3.1 // indirect github.com/vmware-labs/yaml-jsonpath v0.3.2 // indirect - github.com/woodsbury/decimal128 v1.3.0 // indirect + github.com/woodsbury/decimal128 v1.4.0 // indirect github.com/xen0n/gosmopolitan v1.2.2 // indirect github.com/yagipy/maintidx v1.0.0 // indirect github.com/yeya24/promlinter v0.3.0 // indirect @@ -337,13 +337,14 @@ require ( go.uber.org/mock v0.6.0 // indirect go.uber.org/multierr v1.11.0 // indirect go.yaml.in/yaml/v2 v2.4.3 // indirect - golang.org/x/crypto v0.47.0 // indirect + go.yaml.in/yaml/v3 v3.0.4 // indirect + golang.org/x/crypto v0.48.0 // indirect golang.org/x/exp v0.0.0-20251023183803-a4bb9ffd2546 // indirect golang.org/x/exp/typeparams v0.0.0-20250210185358-939b2ce775ac // indirect - golang.org/x/mod v0.32.0 // indirect - golang.org/x/sys v0.40.0 // indirect - golang.org/x/time v0.12.0 // indirect - golang.org/x/tools v0.41.0 // indirect + golang.org/x/mod v0.33.0 // indirect + golang.org/x/sys v0.41.0 // indirect + golang.org/x/time v0.14.0 // indirect + golang.org/x/tools v0.42.0 // indirect gonum.org/v1/gonum v0.17.0 // indirect google.golang.org/genproto/googleapis/api v0.0.0-20260209200024-4cfbd4190f57 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20260209200024-4cfbd4190f57 // indirect diff --git a/go.sum b/go.sum index 8889c432..9dbf5c11 100644 --- a/go.sum +++ b/go.sum @@ -237,8 +237,8 @@ github.com/fsnotify/fsnotify v1.9.0 h1:2Ml+OJNzbYCTzsxtv8vKSFD9PbJjmhYF14k/jKC7S github.com/fsnotify/fsnotify v1.9.0/go.mod h1:8jBTzvmWwFyi3Pb8djgCCO5IBqzKJ/Jwo8TRcHyHii0= github.com/fzipp/gocyclo v0.6.0 h1:lsblElZG7d3ALtGMx9fmxeTKZaLLpU8mET09yN4BBLo= github.com/fzipp/gocyclo v0.6.0/go.mod h1:rXPyn8fnlpa0R2csP/31uerbiVBugk5whMdlyaLkLoA= -github.com/getkin/kin-openapi v0.133.0 h1:pJdmNohVIJ97r4AUFtEXRXwESr8b0bD721u/Tz6k8PQ= -github.com/getkin/kin-openapi v0.133.0/go.mod h1:boAciF6cXk5FhPqe/NQeBTeenbjqU4LhWBf09ILVvWE= +github.com/getkin/kin-openapi v0.135.0 h1:751SjYfbiwqukYuVjwYEIKNfrSwS5YpA7DZnKSwQgtg= +github.com/getkin/kin-openapi v0.135.0/go.mod h1:6dd5FJl6RdX4usBtFBaQhk9q62Yb2J0Mk5IhUO/QqFI= github.com/ghostiam/protogetter v0.3.9 h1:j+zlLLWzqLay22Cz/aYwTHKQ88GE2DQ6GkWSYFOI4lQ= github.com/ghostiam/protogetter v0.3.9/go.mod h1:WZ0nw9pfzsgxuRsPOFQomgDVSWtDLJRfQJEhsGbmQMA= github.com/go-chi/chi/v5 v5.2.3 h1:WQIt9uxdsAbgIYgid+BpYc+liqQZGMHRaUwp0JUcvdE= @@ -259,10 +259,12 @@ github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= github.com/go-ole/go-ole v1.3.0 h1:Dt6ye7+vXGIKZ7Xtk4s6/xVdGDQynvom7xCFEdWr6uE= github.com/go-ole/go-ole v1.3.0/go.mod h1:5LS6F96DhAwUc7C+1HLexzMXY1xGRSryjyPPKW6zv78= -github.com/go-openapi/jsonpointer v0.21.0 h1:YgdVicSA9vH5RiHs9TZW5oyafXZFc6+2Vc1rr/O9oNQ= -github.com/go-openapi/jsonpointer v0.21.0/go.mod h1:IUyH9l/+uyhIYQ/PXVA41Rexl+kOkAPDdXEYns6fzUY= -github.com/go-openapi/swag v0.23.0 h1:vsEVJDUo2hPJ2tu0/Xc+4noaxyEffXNIs3cOULZ+GrE= -github.com/go-openapi/swag v0.23.0/go.mod h1:esZ8ITTYEsH1V2trKHjAN8Ai7xHb8RV+YSZ577vPjgQ= +github.com/go-openapi/jsonpointer v0.22.4 h1:dZtK82WlNpVLDW2jlA1YCiVJFVqkED1MegOUy9kR5T4= +github.com/go-openapi/jsonpointer v0.22.4/go.mod h1:elX9+UgznpFhgBuaMQ7iu4lvvX1nvNsesQ3oxmYTw80= +github.com/go-openapi/swag/jsonname v0.25.4 h1:bZH0+MsS03MbnwBXYhuTttMOqk+5KcQ9869Vye1bNHI= +github.com/go-openapi/swag/jsonname v0.25.4/go.mod h1:GPVEk9CWVhNvWhZgrnvRA6utbAltopbKwDu8mXNUMag= +github.com/go-openapi/testify/v2 v2.0.2 h1:X999g3jeLcoY8qctY/c/Z8iBHTbwLz7R2WXd6Ub6wls= +github.com/go-openapi/testify/v2 v2.0.2/go.mod h1:HCPmvFFnheKK2BuwSA0TbbdxJ3I16pjwMkYkP4Ywn54= github.com/go-quicktest/qt v1.101.0 h1:O1K29Txy5P2OK0dGo59b7b0LR6wKfIhttaAhHUyn7eI= github.com/go-quicktest/qt v1.101.0/go.mod h1:14Bz/f7NwaXPtdYEgzsx46kqSxVwTbzVZsDC26tQJow= github.com/go-redis/redis v6.15.9+incompatible h1:K0pv1D7EQUjfyoMql+r/jZqCLizCGKFlFgcHWWmHQjg= @@ -460,8 +462,8 @@ github.com/kkHAIKE/contextcheck v1.1.6 h1:7HIyRcnyzxL9Lz06NGhiKvenXq7Zw6Q0UQu/tt github.com/kkHAIKE/contextcheck v1.1.6/go.mod h1:3dDbMRNBFaq8HFXWC1JyvDSPm43CmE6IuHam8Wr0rkg= github.com/klauspost/compress v1.18.0 h1:c/Cqfb0r+Yi+JtIEq73FWXVkRonBlf0CRNYc8Zttxdo= github.com/klauspost/compress v1.18.0/go.mod h1:2Pp+KzxcywXVXMr50+X0Q/Lsb43OQHYWRCY2AiWywWQ= -github.com/klauspost/cpuid/v2 v2.2.5 h1:0E5MSMDEoAulmXNFquVs//DdoomxaoTY1kUhbc/qbZg= -github.com/klauspost/cpuid/v2 v2.2.5/go.mod h1:Lcz8mBdAVJIBVzewtcLocK12l3Y+JytZYpaMropDUws= +github.com/klauspost/cpuid/v2 v2.2.7 h1:ZWSB3igEs+d0qvnxR/ZBzXVmxkgt8DdzP6m9pfuVLDM= +github.com/klauspost/cpuid/v2 v2.2.7/go.mod h1:Lcz8mBdAVJIBVzewtcLocK12l3Y+JytZYpaMropDUws= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= @@ -503,8 +505,8 @@ github.com/macabu/inamedparam v0.1.3 h1:2tk/phHkMlEL/1GNe/Yf6kkR/hkcUdAEY3L0hjYV github.com/macabu/inamedparam v0.1.3/go.mod h1:93FLICAIk/quk7eaPPQvbzihUdn/QkGDwIZEoLtpH6I= github.com/magiconair/properties v1.8.10 h1:s31yESBquKXCV9a/ScB3ESkOjUYYv+X0rg8SYxI99mE= github.com/magiconair/properties v1.8.10/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= -github.com/mailru/easyjson v0.9.0 h1:PrnmzHw7262yW8sTBwxi1PdJA3Iw/EKBa8psRf7d9a4= -github.com/mailru/easyjson v0.9.0/go.mod h1:1+xMtQp2MRNVL/V1bOzuP3aP8VNwRW55fQUto+XFtTU= +github.com/mailru/easyjson v0.9.1 h1:LbtsOm5WAswyWbvTEOqhypdPeZzHavpZx96/n553mR8= +github.com/mailru/easyjson v0.9.1/go.mod h1:1+xMtQp2MRNVL/V1bOzuP3aP8VNwRW55fQUto+XFtTU= github.com/maratori/testableexamples v1.0.0 h1:dU5alXRrD8WKSjOUnmJZuzdxWOEQ57+7s93SLMxb2vI= github.com/maratori/testableexamples v1.0.0/go.mod h1:4rhjL1n20TUTT4vdh3RDqSizKLyXp7K2u6HgraZCGzE= github.com/maratori/testpackage v1.1.1 h1:S58XVV5AD7HADMmD0fNnziNHqKvSdDuEKdPD1rNTU04= @@ -580,14 +582,14 @@ github.com/nyaruka/phonenumbers v1.6.7 h1:WmebT8TNEzNaui5QlrGqbccRC6dZkEkYc+MGQo github.com/nyaruka/phonenumbers v1.6.7/go.mod h1:7gjs+Lchqm49adhAKB5cdcng5ZXgt6x7Jgvi0ZorUtU= github.com/oapi-codegen/nethttp-middleware v1.1.2 h1:TQwEU3WM6ifc7ObBEtiJgbRPaCe513tvJpiMJjypVPA= github.com/oapi-codegen/nethttp-middleware v1.1.2/go.mod h1:5qzjxMSiI8HjLljiOEjvs4RdrWyMPKnExeFS2kr8om4= -github.com/oapi-codegen/oapi-codegen/v2 v2.5.1 h1:5vHNY1uuPBRBWqB2Dp0G7YB03phxLQZupZTIZaeorjc= -github.com/oapi-codegen/oapi-codegen/v2 v2.5.1/go.mod h1:ro0npU1BWkcGpCgGD9QwPp44l5OIZ94tB3eabnT7DjQ= -github.com/oapi-codegen/runtime v1.1.1 h1:EXLHh0DXIJnWhdRPN2w4MXAzFyE4CskzhNLUmtpMYro= -github.com/oapi-codegen/runtime v1.1.1/go.mod h1:SK9X900oXmPWilYR5/WKPzt3Kqxn/uS/+lbpREv+eCg= -github.com/oasdiff/yaml v0.0.0-20250309154309-f31be36b4037 h1:G7ERwszslrBzRxj//JalHPu/3yz+De2J+4aLtSRlHiY= -github.com/oasdiff/yaml v0.0.0-20250309154309-f31be36b4037/go.mod h1:2bpvgLBZEtENV5scfDFEtB/5+1M4hkQhDQrccEJ/qGw= -github.com/oasdiff/yaml3 v0.0.0-20250309153720-d2182401db90 h1:bQx3WeLcUWy+RletIKwUIt4x3t8n2SxavmoclizMb8c= -github.com/oasdiff/yaml3 v0.0.0-20250309153720-d2182401db90/go.mod h1:y5+oSEHCPT/DGrS++Wc/479ERge0zTFxaF8PbGKcg2o= +github.com/oapi-codegen/oapi-codegen/v2 v2.7.0 h1:/8daqIYZfwnsHEAZdHUu9m0D5LA+5DoJCP7zLlT5Cs0= +github.com/oapi-codegen/oapi-codegen/v2 v2.7.0/go.mod h1:qzFy6iuobJw/hD1aRILee4G87/ShmhR0xYCwcUtZMCw= +github.com/oapi-codegen/runtime v1.4.0 h1:KLOSFOp7UzkbS7Cs1ms6NBEKYr0WmH2wZG0KKbd2er4= +github.com/oapi-codegen/runtime v1.4.0/go.mod h1:5sw5fxCDmnOzKNYmkVNF8d34kyUeejJEY8HNT2WaPec= +github.com/oasdiff/yaml v0.0.9 h1:zQOvd2UKoozsSsAknnWoDJlSK4lC0mpmjfDsfqNwX48= +github.com/oasdiff/yaml v0.0.9/go.mod h1:8lvhgJG4xiKPj3HN5lDow4jZHPlx1i7dIwzkdAo6oAM= +github.com/oasdiff/yaml3 v0.0.9 h1:rWPrKccrdUm8J0F3sGuU+fuh9+1K/RdJlWF7O/9yw2g= +github.com/oasdiff/yaml3 v0.0.9/go.mod h1:y5+oSEHCPT/DGrS++Wc/479ERge0zTFxaF8PbGKcg2o= github.com/oklog/ulid/v2 v2.1.1 h1:suPZ4ARWLOJLegGFiZZ1dFAkqzhMjL3J1TzI+5wHz8s= github.com/oklog/ulid/v2 v2.1.1/go.mod h1:rcEKHmBBKfef9DhnvX7y1HZBYxjXb0cP5ExxNsTT1QQ= github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec= @@ -691,8 +693,8 @@ github.com/sagikazarmark/locafero v0.9.0 h1:GbgQGNtTrEmddYDSAH9QLRyfAHY12md+8YFT github.com/sagikazarmark/locafero v0.9.0/go.mod h1:UBUyz37V+EdMS3hDF3QWIiVr/2dPrx49OMO0Bn0hJqk= github.com/sanposhiho/wastedassign/v2 v2.1.0 h1:crurBF7fJKIORrV85u9UUpePDYGWnwvv3+A96WvwXT0= github.com/sanposhiho/wastedassign/v2 v2.1.0/go.mod h1:+oSmSC+9bQ+VUAxA66nBb0Z7N8CK7mscKTDYC6aIek4= -github.com/santhosh-tekuri/jsonschema/v6 v6.0.1 h1:PKK9DyHxif4LZo+uQSgXNqs0jj5+xZwwfKHgph2lxBw= -github.com/santhosh-tekuri/jsonschema/v6 v6.0.1/go.mod h1:JXeL+ps8p7/KNMjDQk3TCwPpBy0wYklyWTfbkIzdIFU= +github.com/santhosh-tekuri/jsonschema/v6 v6.0.2 h1:KRzFb2m7YtdldCEkzs6KqmJw4nqEVZGK7IN2kJkjTuQ= +github.com/santhosh-tekuri/jsonschema/v6 v6.0.2/go.mod h1:JXeL+ps8p7/KNMjDQk3TCwPpBy0wYklyWTfbkIzdIFU= github.com/sashamelentyev/interfacebloat v1.1.0 h1:xdRdJp0irL086OyW1H/RTZTr1h/tMEOsumirXcOJqAw= github.com/sashamelentyev/interfacebloat v1.1.0/go.mod h1:+Y9yU5YdTkrNvoX0xHc84dxiN1iBi9+G8zZIhPVoNjQ= github.com/sashamelentyev/usestdlibvars v1.28.0 h1:jZnudE2zKCtYlGzLVreNp5pmCdOxXUzwsMDBkR21cyQ= @@ -720,10 +722,10 @@ github.com/sourcegraph/conc v0.3.0 h1:OQTbbt6P72L20UqAkXXuLOj79LfEanQ+YQFNpLA9yS github.com/sourcegraph/conc v0.3.0/go.mod h1:Sdozi7LEKbFPqYX2/J+iBAM6HpqSLTASQIKqDmF7Mt0= github.com/sourcegraph/go-diff v0.7.0 h1:9uLlrd5T46OXs5qpp8L/MTltk0zikUGi0sNNyCpA8G0= github.com/sourcegraph/go-diff v0.7.0/go.mod h1:iBszgVvyxdc8SFZ7gm69go2KDdt3ag071iBaWPF6cjs= -github.com/speakeasy-api/jsonpath v0.6.0 h1:IhtFOV9EbXplhyRqsVhHoBmmYjblIRh5D1/g8DHMXJ8= -github.com/speakeasy-api/jsonpath v0.6.0/go.mod h1:ymb2iSkyOycmzKwbEAYPJV/yi2rSmvBCLZJcyD+VVWw= -github.com/speakeasy-api/openapi-overlay v0.10.2 h1:VOdQ03eGKeiHnpb1boZCGm7x8Haj6gST0P3SGTX95GU= -github.com/speakeasy-api/openapi-overlay v0.10.2/go.mod h1:n0iOU7AqKpNFfEt6tq7qYITC4f0yzVVdFw0S7hukemg= +github.com/speakeasy-api/jsonpath v0.6.3 h1:c+QPwzAOdrWvzycuc9HFsIZcxKIaWcNpC+xhOW9rJxU= +github.com/speakeasy-api/jsonpath v0.6.3/go.mod h1:2cXloNuQ+RSXi5HTRaeBh7JEmjRXTiaKpFTdZiL7URI= +github.com/speakeasy-api/openapi v1.19.2 h1:md90tE71/M8jS3cuRlsuWP5Aed4xoG5PSRvXeZgCv/M= +github.com/speakeasy-api/openapi v1.19.2/go.mod h1:UfKa7FqE4jgexJZuj51MmdHAFGmDv0Zaw3+yOd81YKU= github.com/spf13/afero v1.15.0 h1:b/YBCLWAJdFWJTN9cLhiXXcD7mzKn9Dm86dNnfyQw1I= github.com/spf13/afero v1.15.0/go.mod h1:NC2ByUVxtQs4b3sIUphxK0NioZnmxgyCrfzeuq8lxMg= github.com/spf13/cast v1.10.0 h1:h2x0u2shc1QuLHfxi+cTJvs30+ZAHOGRic8uyGTDWxY= @@ -797,8 +799,8 @@ github.com/tomarrell/wrapcheck/v2 v2.10.0 h1:SzRCryzy4IrAH7bVGG4cK40tNUhmVmMDuJu github.com/tomarrell/wrapcheck/v2 v2.10.0/go.mod h1:g9vNIyhb5/9TQgumxQyOEqDHsmGYcGsVMOx/xGkqdMo= github.com/tommy-muehle/go-mnd/v2 v2.5.1 h1:NowYhSdyE/1zwK9QCLeRb6USWdoif80Ie+v+yU8u1Zw= github.com/tommy-muehle/go-mnd/v2 v2.5.1/go.mod h1:WsUAkMJMYww6l/ufffCD3m+P7LEvr8TnZn9lwVDlgzw= -github.com/ugorji/go/codec v1.2.11 h1:BMaWp1Bb6fHwEtbplGBGJ498wD+LKlNSl25MjdZY4dU= -github.com/ugorji/go/codec v1.2.11/go.mod h1:UNopzCgEMSXjBc6AOMqYvWC1ktqTAfzJZUZgYf6w6lg= +github.com/ugorji/go/codec v1.2.12 h1:9LC83zGrHhuUA9l16C9AHXAqEV/2wBQ4nkvumAE65EE= +github.com/ugorji/go/codec v1.2.12/go.mod h1:UNopzCgEMSXjBc6AOMqYvWC1ktqTAfzJZUZgYf6w6lg= github.com/ultraware/funlen v0.2.0 h1:gCHmCn+d2/1SemTdYMiKLAHFYxTYz7z9VIDRaTGyLkI= github.com/ultraware/funlen v0.2.0/go.mod h1:ZE0q4TsJ8T1SQcjmkhN/w+MceuatI6pBFSxxyteHIJA= github.com/ultraware/whitespace v0.2.0 h1:TYowo2m9Nfj1baEQBjuHzvMRbp19i+RCcRYrSWoFa+g= @@ -809,8 +811,8 @@ github.com/uudashr/iface v1.3.1 h1:bA51vmVx1UIhiIsQFSNq6GZ6VPTk3WNMZgRiCe9R29U= github.com/uudashr/iface v1.3.1/go.mod h1:4QvspiRd3JLPAEXBQ9AiZpLbJlrWWgRChOKDJEuQTdg= github.com/vmware-labs/yaml-jsonpath v0.3.2 h1:/5QKeCBGdsInyDCyVNLbXyilb61MXGi9NP674f9Hobk= github.com/vmware-labs/yaml-jsonpath v0.3.2/go.mod h1:U6whw1z03QyqgWdgXxvVnQ90zN1BWz5V+51Ewf8k+rQ= -github.com/woodsbury/decimal128 v1.3.0 h1:8pffMNWIlC0O5vbyHWFZAt5yWvWcrHA+3ovIIjVWss0= -github.com/woodsbury/decimal128 v1.3.0/go.mod h1:C5UTmyTjW3JftjUFzOVhC20BEQa2a4ZKOB5I6Zjb+ds= +github.com/woodsbury/decimal128 v1.4.0 h1:xJATj7lLu4f2oObouMt2tgGiElE5gO6mSWUjQsBgUlc= +github.com/woodsbury/decimal128 v1.4.0/go.mod h1:BP46FUrVjVhdTbKT+XuQh2xfQaGki9LMIRJSFuh6THU= github.com/xen0n/gosmopolitan v1.2.2 h1:/p2KTnMzwRexIW8GlKawsTWOxn7UHA+jCMF/V8HHtvU= github.com/xen0n/gosmopolitan v1.2.2/go.mod h1:7XX7Mj61uLYrj0qmeN0zi7XDon9JRAEhYQqAPLVNTeg= github.com/yagipy/maintidx v1.0.0 h1:h5NvIsCz+nRDapQ0exNv4aJ0yXSI0420omVANTv3GJM= @@ -889,8 +891,8 @@ golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU= golang.org/x/crypto v0.23.0/go.mod h1:CKFgDieR+mRhux2Lsu27y0fO304Db0wZe70UKqHu0v8= golang.org/x/crypto v0.31.0/go.mod h1:kDsLvtWBEx7MV9tJOj9bnXsPbxwJQ6csT/x4KIN4Ssk= -golang.org/x/crypto v0.47.0 h1:V6e3FRj+n4dbpw86FJ8Fv7XVOql7TEwpHapKoMJ/GO8= -golang.org/x/crypto v0.47.0/go.mod h1:ff3Y9VzzKbwSSEzWqJsJVBnWmRwRSHt/6Op5n9bQc4A= +golang.org/x/crypto v0.48.0 h1:/VRzVqiRSggnhY7gNRxPauEQ5Drw9haKdM0jqfcCFts= +golang.org/x/crypto v0.48.0/go.mod h1:r0kV5h3qnFPlQnBSrULhlsRfryS2pmewsg+XfMgkVos= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20251023183803-a4bb9ffd2546 h1:mgKeJMpvi0yx/sU5GsxQ7p6s2wtOnGAHZWCHUM4KGzY= golang.org/x/exp v0.0.0-20251023183803-a4bb9ffd2546/go.mod h1:j/pmGrbnkbPtQfxEe5D0VQhZC6qKbfKifgD0oM7sR70= @@ -915,8 +917,8 @@ golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.13.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/mod v0.15.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= -golang.org/x/mod v0.32.0 h1:9F4d3PHLljb6x//jOyokMv3eX+YDeepZSEo3mFJy93c= -golang.org/x/mod v0.32.0/go.mod h1:SgipZ/3h2Ci89DlEtEXWUk/HteuRin+HHhN+WbNhguU= +golang.org/x/mod v0.33.0 h1:tHFzIWbBifEmbwtGz65eaWyGiGZatSrT9prnU8DbVL8= +golang.org/x/mod v0.33.0/go.mod h1:swjeQEj+6r7fODbD2cqrnje9PnziFuw4bmLbBZFrQ5w= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -942,8 +944,8 @@ golang.org/x/net v0.15.0/go.mod h1:idbUs1IY1+zTqbi8yxTbhexhEEk5ur9LInksu6HrEpk= golang.org/x/net v0.16.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM= -golang.org/x/net v0.49.0 h1:eeHFmOGUTtaaPSGNmjBKpbng9MulQsJURQUAfUwY++o= -golang.org/x/net v0.49.0/go.mod h1:/ysNB2EvaqvesRkuLAyjI1ycPZlQHM3q01F02UY/MV8= +golang.org/x/net v0.50.0 h1:ucWh9eiCGyDR3vtzso0WMQinm2Dnt8cFMuQa9K33J60= +golang.org/x/net v0.50.0/go.mod h1:UgoSli3F/pBgdJBHCTc+tp3gmrU4XswgGRgtnwWTfyM= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -999,8 +1001,8 @@ golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.28.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/sys v0.40.0 h1:DBZZqJ2Rkml6QMQsZywtnjnnGvHza6BTfYFWY9kjEWQ= -golang.org/x/sys v0.40.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks= +golang.org/x/sys v0.41.0 h1:Ivj+2Cp/ylzLiEU89QhWblYnOE9zerudt9Ftecq2C6k= +golang.org/x/sys v0.41.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks= golang.org/x/telemetry v0.0.0-20240228155512-f48c80bd79b2/go.mod h1:TeRTkGYfJXctD9OcfyVLyj2J3IxLnKwHJR8f4D8a3YE= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= @@ -1013,8 +1015,8 @@ golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U= golang.org/x/term v0.17.0/go.mod h1:lLRBjIVuehSbZlaOtGMbcMncT+aqLLLmKrsjNrUguwk= golang.org/x/term v0.20.0/go.mod h1:8UkIAJTvZgivsXaD6/pH6U9ecQzZ45awqEOzuCvwpFY= golang.org/x/term v0.27.0/go.mod h1:iMsnZpn0cago0GOrHO2+Y7u7JPn5AylBrcoWkElMTSM= -golang.org/x/term v0.39.0 h1:RclSuaJf32jOqZz74CkPA9qFuVTX7vhLlpfj/IGWlqY= -golang.org/x/term v0.39.0/go.mod h1:yxzUCTP/U+FzoxfdKmLaA0RV1WgE0VY7hXBwKtY/4ww= +golang.org/x/term v0.40.0 h1:36e4zGLqU4yhjlmxEaagx2KuYbJq3EwY8K943ZsHcvg= +golang.org/x/term v0.40.0/go.mod h1:w2P8uVp06p2iyKKuvXIm7N/y0UCRt3UfJTfZ7oOpglM= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= @@ -1030,8 +1032,8 @@ golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ= golang.org/x/text v0.34.0 h1:oL/Qq0Kdaqxa1KbNeMKwQq0reLCCaFtqu2eNuSeNHbk= golang.org/x/text v0.34.0/go.mod h1:homfLqTYRFyVYemLBFl5GgL/DWEiH5wcsQ5gSh1yziA= -golang.org/x/time v0.12.0 h1:ScB/8o8olJvc+CQPWrK3fPZNfh7qgwCrY0zJmoEQLSE= -golang.org/x/time v0.12.0/go.mod h1:CDIdPxbZBQxdj6cxyCIdrNogrJKMJ7pr37NYpMcMDSg= +golang.org/x/time v0.14.0 h1:MRx4UaLrDotUKUdCIqzPC48t1Y9hANFKIRpNx+Te8PI= +golang.org/x/time v0.14.0/go.mod h1:eL/Oa2bBBK0TkX57Fyni+NgnyQQN4LitPmob2Hjnqw4= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= @@ -1059,8 +1061,8 @@ golang.org/x/tools v0.7.0/go.mod h1:4pg6aUX35JBAogB10C9AtvVL+qowtN4pT3CGSQex14s= golang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58= golang.org/x/tools v0.14.0/go.mod h1:uYBEerGOWcJyEORxN+Ek8+TT266gXkNlHdJBwexUsBg= golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk= -golang.org/x/tools v0.41.0 h1:a9b8iMweWG+S0OBnlU36rzLp20z1Rp10w+IY2czHTQc= -golang.org/x/tools v0.41.0/go.mod h1:XSY6eDqxVNiYgezAVqqCeihT4j1U2CCsqvH3WhQpnlg= +golang.org/x/tools v0.42.0 h1:uNgphsn75Tdz5Ji2q36v/nsFSfR/9BRFvqhGBaJGd5k= +golang.org/x/tools v0.42.0/go.mod h1:Ma6lCIwGZvHK6XtgbswSoWroEkhugApmsXyrUmBhfr0= golang.org/x/tools/go/expect v0.1.1-deprecated h1:jpBZDwmgPhXsKZC6WhL20P4b/wmnpsEAGHaNy0n/rJM= golang.org/x/tools/go/expect v0.1.1-deprecated/go.mod h1:eihoPOH+FgIqa3FpoTwguz/bVUSGBlGQU67vpBeOrBY= golang.org/x/tools/go/packages/packagestest v0.1.1-deprecated h1:1h2MnaIAIXISqTFKdENegdpAgUXz6NrPEsbIeWaBRvM= diff --git a/internal/http/controllers/v1/client/oapi/resources_gen.go b/internal/http/controllers/v1/client/oapi/resources_gen.go index 63efee83..23d63550 100644 --- a/internal/http/controllers/v1/client/oapi/resources_gen.go +++ b/internal/http/controllers/v1/client/oapi/resources_gen.go @@ -1,12 +1,13 @@ // Package oapi provides primitives to interact with the openapi HTTP API. // -// Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.5.1 DO NOT EDIT. +// Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.7.0 DO NOT EDIT. package oapi import ( "bytes" "context" "encoding/json" + "errors" "fmt" "io" "net/http" @@ -20,7 +21,7 @@ import ( ) const ( - HttpBearerAuthScopes = "HttpBearerAuth.Scopes" + HttpBearerAuthScopes httpBearerAuthContextKey = "HttpBearerAuth.Scopes" ) // Defines values for DeviceRegistrationOs. @@ -30,6 +31,20 @@ const ( Web DeviceRegistrationOs = "web" ) +// Valid indicates whether the value is a known member of the DeviceRegistrationOs enum. +func (e DeviceRegistrationOs) Valid() bool { + switch e { + case Android: + return true + case Ios: + return true + case Web: + return true + default: + return false + } +} + // DeleteOrganizationRequest defines model for DeleteOrganizationRequest. type DeleteOrganizationRequest struct { // Identifier One or more external identifiers to identify the organization @@ -75,7 +90,7 @@ type DeviceRegistration struct { // Token Device token for FCM or APNs Token *string `json:"token,omitempty"` } `json:"config"` - Data *json.RawMessage `json:"data"` + Data *json.RawMessage `json:"data,omitempty"` DeviceId string `json:"device_id"` // Identifier One or more external identifiers to identify the user @@ -97,7 +112,7 @@ type Event struct { Identifier *UserIdentifier `json:"identifier,omitempty"` // Match JSONB containment filter to match users by their data attributes. Mutually exclusive with identifier. When set, the event is delivered to every user whose data column contains the given key/value pairs. - Match *map[string]any `json:"match"` + Match *map[string]any `json:"match,omitempty"` // Name The name of the event Name string `json:"name"` @@ -109,7 +124,7 @@ type ExternalID struct { ExternalId string `json:"external_id"` // Metadata Optional metadata associated with this identifier - Metadata *map[string]any `json:"metadata"` + Metadata *map[string]any `json:"metadata,omitempty"` // Source Source of the identifier (e.g. "default", "anonymous", or a custom source). Defaults to "default" if not provided. Source *string `json:"source,omitempty"` @@ -120,7 +135,7 @@ type ExternalIDResponse struct { CreatedAt time.Time `json:"created_at"` ExternalId string `json:"external_id"` Id openapi_types.UUID `json:"id"` - Metadata *map[string]any `json:"metadata"` + Metadata *map[string]any `json:"metadata,omitempty"` Source string `json:"source"` UpdatedAt time.Time `json:"updated_at"` } @@ -128,16 +143,16 @@ type ExternalIDResponse struct { // IdentifyRequest defines model for IdentifyRequest. type IdentifyRequest struct { // Data User-specific attributes - Data *map[string]any `json:"data"` - Email *string `json:"email"` + Data *map[string]any `json:"data,omitempty"` + Email *string `json:"email,omitempty"` // Identifier One or more external identifiers to identify the user Identifier UserIdentifier `json:"identifier"` - Locale *string `json:"locale"` + Locale *string `json:"locale,omitempty"` // Phone E.164 formatted phone number - Phone *string `json:"phone"` - Timezone *string `json:"timezone"` + Phone *string `json:"phone,omitempty"` + Timezone *string `json:"timezone,omitempty"` } // Organization defines model for Organization. @@ -157,13 +172,13 @@ type Organization struct { // OrganizationEvent defines model for OrganizationEvent. type OrganizationEvent struct { // Data Event-specific data - Data *map[string]any `json:"data"` + Data *map[string]any `json:"data,omitempty"` // Identifier One or more external identifiers to identify the organization Identifier *OrganizationIdentifier `json:"identifier,omitempty"` // Match JSONB containment filter to match organizations by their data attributes. Mutually exclusive with identifier. When set, the event is delivered to every organization whose data column contains the given key/value pairs. - Match *map[string]any `json:"match"` + Match *map[string]any `json:"match,omitempty"` // Name The name of the event Name string `json:"name"` @@ -174,17 +189,17 @@ type OrganizationIdentifier = []ExternalID // OrganizationRequest defines model for OrganizationRequest. type OrganizationRequest struct { - Data *map[string]any `json:"data"` + Data *map[string]any `json:"data,omitempty"` // Identifier One or more external identifiers to identify the organization Identifier OrganizationIdentifier `json:"identifier"` - Name *string `json:"name"` + Name *string `json:"name,omitempty"` } // OrganizationUserRequest defines model for OrganizationUserRequest. type OrganizationUserRequest struct { // Data Organization-specific data for this user - Data *map[string]any `json:"data"` + Data *map[string]any `json:"data,omitempty"` Organization struct { // Identifier One or more external identifiers to identify the organization Identifier OrganizationIdentifier `json:"identifier"` @@ -225,7 +240,7 @@ type RemoveOrganizationUserRequest struct { // ScheduledAccepted defines model for ScheduledAccepted. type ScheduledAccepted struct { // Data Scheduled resource data - Data *map[string]any `json:"data"` + Data *map[string]any `json:"data,omitempty"` // Id The unique identifier for the scheduled instance Id openapi_types.UUID `json:"id"` @@ -240,43 +255,43 @@ type ScheduledAccepted struct { // UpsertOrganizationScheduledRequest defines model for UpsertOrganizationScheduledRequest. type UpsertOrganizationScheduledRequest struct { // Data Scheduled resource data - Data *map[string]any `json:"data"` + Data *map[string]any `json:"data,omitempty"` // Identifier One or more external identifiers to identify the organization Identifier OrganizationIdentifier `json:"identifier"` // Interval Interval for recurring schedules. When set, the schedule type is automatically set to recurring. - Interval *string `json:"interval"` + Interval *string `json:"interval,omitempty"` // Name The name of the scheduled resource Name string `json:"name"` // ScheduledAt The time at which the scheduled resource is set to trigger. Required for single schedules. - ScheduledAt *time.Time `json:"scheduled_at"` + ScheduledAt *time.Time `json:"scheduled_at,omitempty"` // StartAt Start time for recurring schedules. If omitted for recurring schedules, defaults to now. - StartAt *time.Time `json:"start_at"` + StartAt *time.Time `json:"start_at,omitempty"` } // UpsertUserScheduledRequest defines model for UpsertUserScheduledRequest. type UpsertUserScheduledRequest struct { // Data Scheduled resource data - Data *map[string]any `json:"data"` + Data *map[string]any `json:"data,omitempty"` // Identifier One or more external identifiers to identify the user Identifier *UserIdentifier `json:"identifier,omitempty"` // Interval Interval for recurring schedules. When set, the schedule type is automatically set to recurring. - Interval *string `json:"interval"` + Interval *string `json:"interval,omitempty"` // Name The name of the scheduled resource Name string `json:"name"` // ScheduledAt The time at which the scheduled resource is set to trigger. Required for single schedules. - ScheduledAt *time.Time `json:"scheduled_at"` + ScheduledAt *time.Time `json:"scheduled_at,omitempty"` // StartAt Start time for recurring schedules. If omitted for recurring schedules, defaults to now. - StartAt *time.Time `json:"start_at"` + StartAt *time.Time `json:"start_at,omitempty"` } // User defines model for User. @@ -311,6 +326,9 @@ type VapidPublicKey struct { // Error defines model for Error. type Error = Problem +// httpBearerAuthContextKey is the context key for HttpBearerAuth security scheme +type httpBearerAuthContextKey string + // UpdatePreferencesFormdataBody defines parameters for UpdatePreferences. type UpdatePreferencesFormdataBody struct { // SubscriptionIds Array of subscription IDs to keep subscribed @@ -920,7 +938,7 @@ func NewDeleteOrganizationClientRequestWithBody(server string, contentType strin return nil, err } - req, err := http.NewRequest("DELETE", queryURL.String(), body) + req, err := http.NewRequest(http.MethodDelete, queryURL.String(), body) if err != nil { return nil, err } @@ -960,7 +978,7 @@ func NewUpsertOrganizationClientRequestWithBody(server string, contentType strin return nil, err } - req, err := http.NewRequest("POST", queryURL.String(), body) + req, err := http.NewRequest(http.MethodPost, queryURL.String(), body) if err != nil { return nil, err } @@ -1000,7 +1018,7 @@ func NewPostOrganizationEventsClientRequestWithBody(server string, contentType s return nil, err } - req, err := http.NewRequest("POST", queryURL.String(), body) + req, err := http.NewRequest(http.MethodPost, queryURL.String(), body) if err != nil { return nil, err } @@ -1040,7 +1058,7 @@ func NewDeleteOrganizationScheduledClientRequestWithBody(server string, contentT return nil, err } - req, err := http.NewRequest("DELETE", queryURL.String(), body) + req, err := http.NewRequest(http.MethodDelete, queryURL.String(), body) if err != nil { return nil, err } @@ -1080,7 +1098,7 @@ func NewUpsertOrganizationScheduledClientRequestWithBody(server string, contentT return nil, err } - req, err := http.NewRequest("POST", queryURL.String(), body) + req, err := http.NewRequest(http.MethodPost, queryURL.String(), body) if err != nil { return nil, err } @@ -1120,7 +1138,7 @@ func NewRemoveOrganizationUserClientRequestWithBody(server string, contentType s return nil, err } - req, err := http.NewRequest("DELETE", queryURL.String(), body) + req, err := http.NewRequest(http.MethodDelete, queryURL.String(), body) if err != nil { return nil, err } @@ -1160,7 +1178,7 @@ func NewAddOrganizationUserClientRequestWithBody(server string, contentType stri return nil, err } - req, err := http.NewRequest("POST", queryURL.String(), body) + req, err := http.NewRequest(http.MethodPost, queryURL.String(), body) if err != nil { return nil, err } @@ -1189,7 +1207,7 @@ func NewGetVapidPublicKeyRequest(server string) (*http.Request, error) { return nil, err } - req, err := http.NewRequest("GET", queryURL.String(), nil) + req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil) if err != nil { return nil, err } @@ -1227,7 +1245,7 @@ func NewDeleteUserClientRequestWithBody(server string, contentType string, body return nil, err } - req, err := http.NewRequest("DELETE", queryURL.String(), body) + req, err := http.NewRequest(http.MethodDelete, queryURL.String(), body) if err != nil { return nil, err } @@ -1267,7 +1285,7 @@ func NewUpsertUserClientRequestWithBody(server string, contentType string, body return nil, err } - req, err := http.NewRequest("POST", queryURL.String(), body) + req, err := http.NewRequest(http.MethodPost, queryURL.String(), body) if err != nil { return nil, err } @@ -1307,7 +1325,7 @@ func NewRegisterDeviceRequestWithBody(server string, contentType string, body io return nil, err } - req, err := http.NewRequest("POST", queryURL.String(), body) + req, err := http.NewRequest(http.MethodPost, queryURL.String(), body) if err != nil { return nil, err } @@ -1347,7 +1365,7 @@ func NewPostUserEventsRequestWithBody(server string, contentType string, body io return nil, err } - req, err := http.NewRequest("POST", queryURL.String(), body) + req, err := http.NewRequest(http.MethodPost, queryURL.String(), body) if err != nil { return nil, err } @@ -1387,7 +1405,7 @@ func NewDeleteUserScheduledClientRequestWithBody(server string, contentType stri return nil, err } - req, err := http.NewRequest("DELETE", queryURL.String(), body) + req, err := http.NewRequest(http.MethodDelete, queryURL.String(), body) if err != nil { return nil, err } @@ -1427,7 +1445,7 @@ func NewUpsertUserScheduledClientRequestWithBody(server string, contentType stri return nil, err } - req, err := http.NewRequest("POST", queryURL.String(), body) + req, err := http.NewRequest(http.MethodPost, queryURL.String(), body) if err != nil { return nil, err } @@ -1443,14 +1461,14 @@ func NewGetPreferencesPageRequest(server string, projectID openapi_types.UUID, u var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "projectID", runtime.ParamLocationPath, projectID) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "projectID", projectID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "userID", runtime.ParamLocationPath, userID) + pathParam1, err = runtime.StyleParamWithOptions("simple", false, "userID", userID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } @@ -1470,7 +1488,7 @@ func NewGetPreferencesPageRequest(server string, projectID openapi_types.UUID, u return nil, err } - req, err := http.NewRequest("GET", queryURL.String(), nil) + req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil) if err != nil { return nil, err } @@ -1495,14 +1513,14 @@ func NewUpdatePreferencesRequestWithBody(server string, projectID openapi_types. var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "projectID", runtime.ParamLocationPath, projectID) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "projectID", projectID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "userID", runtime.ParamLocationPath, userID) + pathParam1, err = runtime.StyleParamWithOptions("simple", false, "userID", userID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } @@ -1522,7 +1540,7 @@ func NewUpdatePreferencesRequestWithBody(server string, projectID openapi_types. return nil, err } - req, err := http.NewRequest("POST", queryURL.String(), body) + req, err := http.NewRequest(http.MethodPost, queryURL.String(), body) if err != nil { return nil, err } @@ -1552,24 +1570,29 @@ func NewEmailUnsubscribeRequest(server string, params *EmailUnsubscribeParams) ( } if params != nil { + // queryValues collects non-styled parameters (passthrough, JSON) + // that are safe to round-trip through url.Values.Encode(). queryValues := queryURL.Query() + // rawQueryFragments collects pre-encoded query fragments from + // styled parameters, preserving literal commas as delimiters + // per the OpenAPI spec (e.g. "color=blue,black,brown"). + var rawQueryFragments []string - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "link", runtime.ParamLocationQuery, params.Link); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "link", params.Link, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { return nil, err } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) } } - queryURL.RawQuery = queryValues.Encode() + if encoded := queryValues.Encode(); encoded != "" { + rawQueryFragments = append(rawQueryFragments, encoded) + } + queryURL.RawQuery = strings.Join(rawQueryFragments, "&") } - req, err := http.NewRequest("GET", queryURL.String(), nil) + req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil) if err != nil { return nil, err } @@ -1722,6 +1745,14 @@ func (r DeleteOrganizationClientResponse) StatusCode() int { return 0 } +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r DeleteOrganizationClientResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + type UpsertOrganizationClientResponse struct { Body []byte HTTPResponse *http.Response @@ -1745,6 +1776,14 @@ func (r UpsertOrganizationClientResponse) StatusCode() int { return 0 } +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r UpsertOrganizationClientResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + type PostOrganizationEventsClientResponse struct { Body []byte HTTPResponse *http.Response @@ -1767,6 +1806,14 @@ func (r PostOrganizationEventsClientResponse) StatusCode() int { return 0 } +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r PostOrganizationEventsClientResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + type DeleteOrganizationScheduledClientResponse struct { Body []byte HTTPResponse *http.Response @@ -1789,6 +1836,14 @@ func (r DeleteOrganizationScheduledClientResponse) StatusCode() int { return 0 } +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r DeleteOrganizationScheduledClientResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + type UpsertOrganizationScheduledClientResponse struct { Body []byte HTTPResponse *http.Response @@ -1812,6 +1867,14 @@ func (r UpsertOrganizationScheduledClientResponse) StatusCode() int { return 0 } +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r UpsertOrganizationScheduledClientResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + type RemoveOrganizationUserClientResponse struct { Body []byte HTTPResponse *http.Response @@ -1834,6 +1897,14 @@ func (r RemoveOrganizationUserClientResponse) StatusCode() int { return 0 } +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r RemoveOrganizationUserClientResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + type AddOrganizationUserClientResponse struct { Body []byte HTTPResponse *http.Response @@ -1856,6 +1927,14 @@ func (r AddOrganizationUserClientResponse) StatusCode() int { return 0 } +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r AddOrganizationUserClientResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + type GetVapidPublicKeyResponse struct { Body []byte HTTPResponse *http.Response @@ -1879,6 +1958,14 @@ func (r GetVapidPublicKeyResponse) StatusCode() int { return 0 } +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r GetVapidPublicKeyResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + type DeleteUserClientResponse struct { Body []byte HTTPResponse *http.Response @@ -1901,6 +1988,14 @@ func (r DeleteUserClientResponse) StatusCode() int { return 0 } +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r DeleteUserClientResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + type UpsertUserClientResponse struct { Body []byte HTTPResponse *http.Response @@ -1924,6 +2019,14 @@ func (r UpsertUserClientResponse) StatusCode() int { return 0 } +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r UpsertUserClientResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + type RegisterDeviceResponse struct { Body []byte HTTPResponse *http.Response @@ -1946,6 +2049,14 @@ func (r RegisterDeviceResponse) StatusCode() int { return 0 } +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r RegisterDeviceResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + type PostUserEventsResponse struct { Body []byte HTTPResponse *http.Response @@ -1968,6 +2079,14 @@ func (r PostUserEventsResponse) StatusCode() int { return 0 } +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r PostUserEventsResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + type DeleteUserScheduledClientResponse struct { Body []byte HTTPResponse *http.Response @@ -1990,6 +2109,14 @@ func (r DeleteUserScheduledClientResponse) StatusCode() int { return 0 } +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r DeleteUserScheduledClientResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + type UpsertUserScheduledClientResponse struct { Body []byte HTTPResponse *http.Response @@ -2013,6 +2140,14 @@ func (r UpsertUserScheduledClientResponse) StatusCode() int { return 0 } +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r UpsertUserScheduledClientResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + type GetPreferencesPageResponse struct { Body []byte HTTPResponse *http.Response @@ -2034,6 +2169,14 @@ func (r GetPreferencesPageResponse) StatusCode() int { return 0 } +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r GetPreferencesPageResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + type UpdatePreferencesResponse struct { Body []byte HTTPResponse *http.Response @@ -2055,6 +2198,14 @@ func (r UpdatePreferencesResponse) StatusCode() int { return 0 } +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r UpdatePreferencesResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + type EmailUnsubscribeResponse struct { Body []byte HTTPResponse *http.Response @@ -2076,6 +2227,14 @@ func (r EmailUnsubscribeResponse) StatusCode() int { return 0 } +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r EmailUnsubscribeResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + // DeleteOrganizationClientWithBodyWithResponse request with arbitrary body returning *DeleteOrganizationClientResponse func (c *ClientWithResponses) DeleteOrganizationClientWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DeleteOrganizationClientResponse, error) { rsp, err := c.DeleteOrganizationClientWithBody(ctx, contentType, body, reqEditors...) @@ -3242,11 +3401,12 @@ func (siw *ServerInterfaceWrapper) UpsertUserScheduledClient(w http.ResponseWrit func (siw *ServerInterfaceWrapper) GetPreferencesPage(w http.ResponseWriter, r *http.Request) { var err error + _ = err // ------------- Path parameter "projectID" ------------- var projectID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "projectID", Err: err}) return @@ -3255,7 +3415,7 @@ func (siw *ServerInterfaceWrapper) GetPreferencesPage(w http.ResponseWriter, r * // ------------- Path parameter "userID" ------------- var userID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "userID", chi.URLParam(r, "userID"), &userID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "userID", chi.URLParam(r, "userID"), &userID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "userID", Err: err}) return @@ -3276,11 +3436,12 @@ func (siw *ServerInterfaceWrapper) GetPreferencesPage(w http.ResponseWriter, r * func (siw *ServerInterfaceWrapper) UpdatePreferences(w http.ResponseWriter, r *http.Request) { var err error + _ = err // ------------- Path parameter "projectID" ------------- var projectID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "projectID", Err: err}) return @@ -3289,7 +3450,7 @@ func (siw *ServerInterfaceWrapper) UpdatePreferences(w http.ResponseWriter, r *h // ------------- Path parameter "userID" ------------- var userID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "userID", chi.URLParam(r, "userID"), &userID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "userID", chi.URLParam(r, "userID"), &userID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "userID", Err: err}) return @@ -3310,22 +3471,21 @@ func (siw *ServerInterfaceWrapper) UpdatePreferences(w http.ResponseWriter, r *h func (siw *ServerInterfaceWrapper) EmailUnsubscribe(w http.ResponseWriter, r *http.Request) { var err error + _ = err // Parameter object where we will unmarshal all parameters from the context var params EmailUnsubscribeParams // ------------- Required query parameter "link" ------------- - if paramValue := r.URL.Query().Get("link"); paramValue != "" { - - } else { - siw.ErrorHandlerFunc(w, r, &RequiredParamError{ParamName: "link"}) - return - } - - err = runtime.BindQueryParameter("form", true, true, "link", r.URL.Query(), ¶ms.Link) + err = runtime.BindQueryParameterWithOptions("form", true, true, "link", r.URL.Query(), ¶ms.Link, runtime.BindQueryParameterOptions{Type: "string", Format: ""}) if err != nil { - siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "link", Err: err}) + var requiredError *runtime.RequiredParameterError + if errors.As(err, &requiredError) { + siw.ErrorHandlerFunc(w, r, &RequiredParamError{ParamName: "link"}) + } else { + siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "link", Err: err}) + } return } diff --git a/internal/http/controllers/v1/management/campaigns.go b/internal/http/controllers/v1/management/campaigns.go index 2098efae..99258e5d 100644 --- a/internal/http/controllers/v1/management/campaigns.go +++ b/internal/http/controllers/v1/management/campaigns.go @@ -158,7 +158,9 @@ func (srv *CampaignsController) ListCampaigns(w http.ResponseWriter, r *http.Req Offset: params.Offset.ToInt(), } - result, total, err := srv.mgmt.ListCampaigns(ctx, projectID, pagination, params.Search.ToString()) + includeDeleted := params.IncludeDeleted != nil && *params.IncludeDeleted + + result, total, err := srv.mgmt.ListCampaigns(ctx, projectID, pagination, params.Search.ToString(), includeDeleted) if err != nil { logger.Error("failed to list campaigns", zap.Error(err)) oapi.WriteProblem(w, err) @@ -326,6 +328,28 @@ func (srv *CampaignsController) DeleteCampaign(w http.ResponseWriter, r *http.Re w.WriteHeader(http.StatusNoContent) } +func (srv *CampaignsController) UnarchiveCampaign(w http.ResponseWriter, r *http.Request, projectID uuid.UUID, campaignID uuid.UUID) { + ctx := r.Context() + err := srv.engine.Allowed(ctx, rbac.Update, rbac.ProjectResourceScope("campaigns", projectID)) + if err != nil { + oapi.WriteProblem(w, err) + return + } + + logger := srv.logger.With(zap.Stringer("project_id", projectID), zap.Stringer("campaign_id", campaignID)) + logger.Info("unarchiving campaign") + + err = srv.mgmt.UnarchiveCampaign(ctx, projectID, campaignID) + if errors.Is(err, sql.ErrNoRows) { + logger.Info("campaign not found", zap.Stringer("campaign_id", campaignID)) + oapi.WriteProblem(w, problem.ErrNotFound(problem.Describe("campaign not found"))) + return + } + + logger.Info("campaign unarchived") + w.WriteHeader(http.StatusNoContent) +} + func (srv *CampaignsController) DuplicateCampaign(w http.ResponseWriter, r *http.Request, projectID uuid.UUID, campaignID uuid.UUID) { ctx := r.Context() err := srv.engine.Allowed(ctx, rbac.Create, rbac.ProjectResourceScope("campaigns", projectID)) diff --git a/internal/http/controllers/v1/management/journeys.go b/internal/http/controllers/v1/management/journeys.go index 0f1d0d2c..ddcf6dfd 100644 --- a/internal/http/controllers/v1/management/journeys.go +++ b/internal/http/controllers/v1/management/journeys.go @@ -69,10 +69,11 @@ func (srv *JourneysController) ListJourneys(w http.ResponseWriter, r *http.Reque } search := params.Search.ToString() + includeDeleted := params.IncludeDeleted != nil && *params.IncludeDeleted logger.Info("listing journeys", zap.Int("limit", pagination.Limit), zap.Int("offset", pagination.Offset)) - journeys, total, err := srv.jrny.ListJourneys(ctx, projectID, pagination, search) + journeys, total, err := srv.jrny.ListJourneys(ctx, projectID, pagination, search, includeDeleted) if err != nil { logger.Error("failed to list journeys", zap.Error(err)) oapi.WriteProblem(w, err) @@ -364,6 +365,45 @@ func (srv *JourneysController) DeleteJourney(w http.ResponseWriter, r *http.Requ w.WriteHeader(http.StatusNoContent) } +func (srv *JourneysController) UnarchiveJourney(w http.ResponseWriter, r *http.Request, projectID, journeyID uuid.UUID) { + ctx := r.Context() + err := srv.engine.Allowed(ctx, rbac.Update, rbac.ProjectResourceScope("journeys", projectID)) + if err != nil { + oapi.WriteProblem(w, err) + return + } + + logger := srv.logger.With( + zap.Stringer("project_id", projectID), + zap.Stringer("journey_id", journeyID), + ) + + logger.Info("unarchiving journey") + + _, err = srv.jrny.GetJourney(ctx, projectID, journeyID) + if errors.Is(err, sql.ErrNoRows) { + logger.Info("journey not found") + oapi.WriteProblem(w, problem.ErrNotFound(problem.Describe("journey not found"))) + return + } + + if err != nil { + logger.Error("failed to get journey", zap.Error(err)) + oapi.WriteProblem(w, err) + return + } + + err = srv.jrny.UnarchiveJourney(ctx, projectID, journeyID) + if err != nil { + logger.Error("failed to unarchive journey", zap.Error(err)) + oapi.WriteProblem(w, err) + return + } + + logger.Info("journey unarchived") + w.WriteHeader(http.StatusNoContent) +} + func (srv *JourneysController) StreamUserJourneySteps( w http.ResponseWriter, r *http.Request, diff --git a/internal/http/controllers/v1/management/lists.go b/internal/http/controllers/v1/management/lists.go index 6e7bcdc8..28775864 100644 --- a/internal/http/controllers/v1/management/lists.go +++ b/internal/http/controllers/v1/management/lists.go @@ -160,8 +160,9 @@ func (srv *ListsController) ListLists(w http.ResponseWriter, r *http.Request, pr } search := params.Search.ToString() + includeDeleted := params.IncludeDeleted != nil && *params.IncludeDeleted - result, total, err := srv.store.ListLists(ctx, projectID, pagination, search) + result, total, err := srv.store.ListLists(ctx, projectID, pagination, search, includeDeleted) if err != nil { logger.Error("failed to list lists", zap.Error(err)) oapi.WriteProblem(w, err) @@ -445,6 +446,41 @@ func (srv *ListsController) DeleteList(w http.ResponseWriter, r *http.Request, p w.WriteHeader(http.StatusNoContent) } +func (srv *ListsController) UnarchiveList(w http.ResponseWriter, r *http.Request, projectID uuid.UUID, listID uuid.UUID) { + ctx := r.Context() + err := srv.engine.Allowed(ctx, rbac.Update, rbac.ProjectResourceScope("lists", projectID)) + if err != nil { + oapi.WriteProblem(w, err) + return + } + + logger := srv.logger.With(zap.Stringer("project_id", projectID), zap.Stringer("list_id", listID)) + logger.Info("unarchiving list") + + _, err = srv.store.GetList(ctx, projectID, listID) + if errors.Is(err, sql.ErrNoRows) { + logger.Info("list not found", zap.Stringer("list_id", listID)) + oapi.WriteProblem(w, problem.ErrNotFound(problem.Describe("list not found"))) + return + } + + if err != nil { + logger.Error("failed to get list", zap.Error(err)) + oapi.WriteProblem(w, err) + return + } + + err = srv.store.UnarchiveList(ctx, projectID, listID) + if err != nil { + logger.Error("failed to unarchive list", zap.Error(err)) + oapi.WriteProblem(w, err) + return + } + + logger.Info("list unarchived") + w.WriteHeader(http.StatusNoContent) +} + func (srv *ListsController) DuplicateList(w http.ResponseWriter, r *http.Request, projectID uuid.UUID, listID uuid.UUID) { ctx := r.Context() err := srv.engine.Allowed(ctx, rbac.Create, rbac.ProjectResourceScope("lists", projectID)) diff --git a/internal/http/controllers/v1/management/oapi/resources.yml b/internal/http/controllers/v1/management/oapi/resources.yml index 6ded2443..1a14ec25 100644 --- a/internal/http/controllers/v1/management/oapi/resources.yml +++ b/internal/http/controllers/v1/management/oapi/resources.yml @@ -94,6 +94,7 @@ paths: - $ref: "#/components/parameters/Limit" - $ref: "#/components/parameters/Offset" - $ref: "#/components/parameters/Search" + - $ref: "#/components/parameters/IncludeDeleted" responses: "200": $ref: "#/components/responses/CampaignListResponse" @@ -239,6 +240,36 @@ paths: default: $ref: "#/components/responses/Error" + /api/admin/projects/{projectID}/campaigns/{campaignID}/unarchive: + post: + summary: Unarchive campaign + description: Restores an archived campaign by clearing its deleted_at timestamp + operationId: unarchiveCampaign + tags: + - Campaigns + security: + - HttpBearerAuth: [] + parameters: + - name: projectID + in: path + required: true + schema: + type: string + format: uuid + description: The project ID + - name: campaignID + in: path + required: true + schema: + type: string + format: uuid + description: The campaign ID + responses: + "204": + description: Campaign unarchived successfully + default: + $ref: "#/components/responses/Error" + /api/admin/projects/{projectID}/campaigns/{campaignID}/templates: post: summary: Create template @@ -557,6 +588,7 @@ paths: - $ref: "#/components/parameters/Limit" - $ref: "#/components/parameters/Offset" - $ref: "#/components/parameters/Search" + - $ref: "#/components/parameters/IncludeDeleted" responses: "200": $ref: "#/components/responses/ListListResponse" @@ -697,6 +729,36 @@ paths: default: $ref: "#/components/responses/Error" + /api/admin/projects/{projectID}/lists/{listID}/unarchive: + post: + summary: Unarchive list + description: Restores an archived list by clearing its deleted_at timestamp + operationId: unarchiveList + tags: + - Lists + security: + - HttpBearerAuth: [] + parameters: + - name: projectID + in: path + required: true + schema: + type: string + format: uuid + description: The project ID + - name: listID + in: path + required: true + schema: + type: string + format: uuid + description: The list ID + responses: + "204": + description: List unarchived successfully + default: + $ref: "#/components/responses/Error" + /api/admin/projects/{projectID}/lists/{listID}/duplicate: post: summary: Duplicate list @@ -993,6 +1055,7 @@ paths: - $ref: "#/components/parameters/Limit" - $ref: "#/components/parameters/Offset" - $ref: "#/components/parameters/Search" + - $ref: "#/components/parameters/IncludeDeleted" responses: "200": $ref: "#/components/responses/JourneyListResponse" @@ -1473,6 +1536,36 @@ paths: default: $ref: "#/components/responses/Error" + /api/admin/projects/{projectID}/journeys/{journeyID}/unarchive: + post: + summary: Unarchive journey + description: Restores an archived journey by clearing its deleted_at timestamp + operationId: unarchiveJourney + tags: + - Journeys + security: + - HttpBearerAuth: [] + parameters: + - name: projectID + in: path + required: true + schema: + type: string + format: uuid + description: The project ID + - name: journeyID + in: path + required: true + schema: + type: string + format: uuid + description: The journey ID + responses: + "204": + description: Journey unarchived successfully + default: + $ref: "#/components/responses/Error" + /api/admin/projects/{projectID}/journeys/{journeyID}/duplicate: post: summary: Duplicate journey @@ -5354,6 +5447,15 @@ components: x-go-type: PaginationSearch description: Search query string + IncludeDeleted: + name: include_deleted + in: query + required: false + schema: + type: boolean + default: false + description: Include archived/soft-deleted items in the results + responses: Error: description: Error response @@ -6417,6 +6519,10 @@ components: $ref: "#/components/schemas/CampaignVariable" delivery: $ref: "#/components/schemas/Delivery" + archived: + type: boolean + example: false + description: "Whether the campaign has been archived" Delivery: type: object @@ -6584,6 +6690,10 @@ components: type: string format: date-time example: "2025-11-23T17:20:00.021Z" + archived: + type: boolean + example: false + description: "Whether the list has been archived" Provider: type: object diff --git a/internal/http/controllers/v1/management/oapi/resources_gen.go b/internal/http/controllers/v1/management/oapi/resources_gen.go index f50662f5..d24fb245 100644 --- a/internal/http/controllers/v1/management/oapi/resources_gen.go +++ b/internal/http/controllers/v1/management/oapi/resources_gen.go @@ -1,12 +1,13 @@ // Package oapi provides primitives to interact with the openapi HTTP API. // -// Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.5.1 DO NOT EDIT. +// Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.7.0 DO NOT EDIT. package oapi import ( "bytes" "context" "encoding/json" + "errors" "fmt" "io" "net/http" @@ -21,7 +22,7 @@ import ( ) const ( - HttpBearerAuthScopes = "HttpBearerAuth.Scopes" + HttpBearerAuthScopes httpBearerAuthContextKey = "HttpBearerAuth.Scopes" ) // Defines values for ApiKeyScope. @@ -30,6 +31,18 @@ const ( Secret ApiKeyScope = "secret" ) +// Valid indicates whether the value is a known member of the ApiKeyScope enum. +func (e ApiKeyScope) Valid() bool { + switch e { + case Public: + return true + case Secret: + return true + default: + return false + } +} + // Defines values for BroadcastState. const ( BroadcastStateCancelled BroadcastState = "cancelled" @@ -40,6 +53,26 @@ const ( BroadcastStateSending BroadcastState = "sending" ) +// Valid indicates whether the value is a known member of the BroadcastState enum. +func (e BroadcastState) Valid() bool { + switch e { + case BroadcastStateCancelled: + return true + case BroadcastStateCompleted: + return true + case BroadcastStateFailed: + return true + case BroadcastStatePending: + return true + case BroadcastStateScheduled: + return true + case BroadcastStateSending: + return true + default: + return false + } +} + // Defines values for CampaignUserStatus. const ( CampaignUserStatusAborted CampaignUserStatus = "aborted" @@ -50,6 +83,26 @@ const ( CampaignUserStatusThrottled CampaignUserStatus = "throttled" ) +// Valid indicates whether the value is a known member of the CampaignUserStatus enum. +func (e CampaignUserStatus) Valid() bool { + switch e { + case CampaignUserStatusAborted: + return true + case CampaignUserStatusFailed: + return true + case CampaignUserStatusOpened: + return true + case CampaignUserStatusPending: + return true + case CampaignUserStatusSent: + return true + case CampaignUserStatusThrottled: + return true + default: + return false + } +} + // Defines values for Channel. const ( ChannelEmail Channel = "email" @@ -57,24 +110,74 @@ const ( ChannelSms Channel = "sms" ) +// Valid indicates whether the value is a known member of the Channel enum. +func (e Channel) Valid() bool { + switch e { + case ChannelEmail: + return true + case ChannelPush: + return true + case ChannelSms: + return true + default: + return false + } +} + // Defines values for CreateListType. const ( CreateListTypeDynamic CreateListType = "dynamic" CreateListTypeStatic CreateListType = "static" ) +// Valid indicates whether the value is a known member of the CreateListType enum. +func (e CreateListType) Valid() bool { + switch e { + case CreateListTypeDynamic: + return true + case CreateListTypeStatic: + return true + default: + return false + } +} + // Defines values for CreateScheduleOffsetRequestDirection. const ( CreateScheduleOffsetRequestDirectionAfter CreateScheduleOffsetRequestDirection = "after" CreateScheduleOffsetRequestDirectionBefore CreateScheduleOffsetRequestDirection = "before" ) +// Valid indicates whether the value is a known member of the CreateScheduleOffsetRequestDirection enum. +func (e CreateScheduleOffsetRequestDirection) Valid() bool { + switch e { + case CreateScheduleOffsetRequestDirectionAfter: + return true + case CreateScheduleOffsetRequestDirectionBefore: + return true + default: + return false + } +} + // Defines values for CreateSenderIdentityChannel. const ( CreateSenderIdentityChannelEmail CreateSenderIdentityChannel = "email" CreateSenderIdentityChannelSms CreateSenderIdentityChannel = "sms" ) +// Valid indicates whether the value is a known member of the CreateSenderIdentityChannel enum. +func (e CreateSenderIdentityChannel) Valid() bool { + switch e { + case CreateSenderIdentityChannelEmail: + return true + case CreateSenderIdentityChannelSms: + return true + default: + return false + } +} + // Defines values for CreateUserDeviceOs. const ( CreateUserDeviceOsAndroid CreateUserDeviceOs = "android" @@ -82,6 +185,20 @@ const ( CreateUserDeviceOsWeb CreateUserDeviceOs = "web" ) +// Valid indicates whether the value is a known member of the CreateUserDeviceOs enum. +func (e CreateUserDeviceOs) Valid() bool { + switch e { + case CreateUserDeviceOsAndroid: + return true + case CreateUserDeviceOsIos: + return true + case CreateUserDeviceOsWeb: + return true + default: + return false + } +} + // Defines values for JourneyStatus. const ( JourneyStatusArchived JourneyStatus = "archived" @@ -89,6 +206,20 @@ const ( JourneyStatusPublished JourneyStatus = "published" ) +// Valid indicates whether the value is a known member of the JourneyStatus enum. +func (e JourneyStatus) Valid() bool { + switch e { + case JourneyStatusArchived: + return true + case JourneyStatusDraft: + return true + case JourneyStatusPublished: + return true + default: + return false + } +} + // Defines values for JourneyStepType. const ( JourneyStepTypeAction JourneyStepType = "action" @@ -105,6 +236,38 @@ const ( JourneyStepTypeUpdate JourneyStepType = "update" ) +// Valid indicates whether the value is a known member of the JourneyStepType enum. +func (e JourneyStepType) Valid() bool { + switch e { + case JourneyStepTypeAction: + return true + case JourneyStepTypeBalancer: + return true + case JourneyStepTypeCampaign: + return true + case JourneyStepTypeDelay: + return true + case JourneyStepTypeEntrance: + return true + case JourneyStepTypeEvent: + return true + case JourneyStepTypeExit: + return true + case JourneyStepTypeExperiment: + return true + case JourneyStepTypeGate: + return true + case JourneyStepTypeSchedule: + return true + case JourneyStepTypeSticky: + return true + case JourneyStepTypeUpdate: + return true + default: + return false + } +} + // Defines values for ListState. const ( ListStateDraft ListState = "draft" @@ -112,12 +275,38 @@ const ( ListStateReady ListState = "ready" ) +// Valid indicates whether the value is a known member of the ListState enum. +func (e ListState) Valid() bool { + switch e { + case ListStateDraft: + return true + case ListStateLoading: + return true + case ListStateReady: + return true + default: + return false + } +} + // Defines values for ListType. const ( ListTypeDynamic ListType = "dynamic" ListTypeStatic ListType = "static" ) +// Valid indicates whether the value is a known member of the ListType enum. +func (e ListType) Valid() bool { + switch e { + case ListTypeDynamic: + return true + case ListTypeStatic: + return true + default: + return false + } +} + // Defines values for OrganizationRole. const ( OrganizationRoleAdmin OrganizationRole = "admin" @@ -125,6 +314,20 @@ const ( OrganizationRoleOwner OrganizationRole = "owner" ) +// Valid indicates whether the value is a known member of the OrganizationRole enum. +func (e OrganizationRole) Valid() bool { + switch e { + case OrganizationRoleAdmin: + return true + case OrganizationRoleMember: + return true + case OrganizationRoleOwner: + return true + default: + return false + } +} + // Defines values for ProjectPushProviderPlatform. const ( ProjectPushProviderPlatformAndroid ProjectPushProviderPlatform = "android" @@ -132,6 +335,20 @@ const ( ProjectPushProviderPlatformWeb ProjectPushProviderPlatform = "web" ) +// Valid indicates whether the value is a known member of the ProjectPushProviderPlatform enum. +func (e ProjectPushProviderPlatform) Valid() bool { + switch e { + case ProjectPushProviderPlatformAndroid: + return true + case ProjectPushProviderPlatformIos: + return true + case ProjectPushProviderPlatformWeb: + return true + default: + return false + } +} + // Defines values for ProjectRole. const ( ProjectRoleAdmin ProjectRole = "admin" @@ -140,65 +357,199 @@ const ( ProjectRoleSupport ProjectRole = "support" ) +// Valid indicates whether the value is a known member of the ProjectRole enum. +func (e ProjectRole) Valid() bool { + switch e { + case ProjectRoleAdmin: + return true + case ProjectRoleClient: + return true + case ProjectRoleEditor: + return true + case ProjectRoleSupport: + return true + default: + return false + } +} + // Defines values for ScheduleOffsetDirection. const ( ScheduleOffsetDirectionAfter ScheduleOffsetDirection = "after" ScheduleOffsetDirectionBefore ScheduleOffsetDirection = "before" ) +// Valid indicates whether the value is a known member of the ScheduleOffsetDirection enum. +func (e ScheduleOffsetDirection) Valid() bool { + switch e { + case ScheduleOffsetDirectionAfter: + return true + case ScheduleOffsetDirectionBefore: + return true + default: + return false + } +} + // Defines values for SenderIdentityChannel. const ( SenderIdentityChannelEmail SenderIdentityChannel = "email" SenderIdentityChannelSms SenderIdentityChannel = "sms" ) +// Valid indicates whether the value is a known member of the SenderIdentityChannel enum. +func (e SenderIdentityChannel) Valid() bool { + switch e { + case SenderIdentityChannelEmail: + return true + case SenderIdentityChannelSms: + return true + default: + return false + } +} + // Defines values for SubscriptionState. const ( Subscribed SubscriptionState = "subscribed" Unsubscribed SubscriptionState = "unsubscribed" ) +// Valid indicates whether the value is a known member of the SubscriptionState enum. +func (e SubscriptionState) Valid() bool { + switch e { + case Subscribed: + return true + case Unsubscribed: + return true + default: + return false + } +} + // Defines values for UpdateOrganizationScheduledRequestPause. const ( UpdateOrganizationScheduledRequestPauseAfterNextInterval UpdateOrganizationScheduledRequestPause = "after_next_interval" UpdateOrganizationScheduledRequestPauseImmediately UpdateOrganizationScheduledRequestPause = "immediately" ) +// Valid indicates whether the value is a known member of the UpdateOrganizationScheduledRequestPause enum. +func (e UpdateOrganizationScheduledRequestPause) Valid() bool { + switch e { + case UpdateOrganizationScheduledRequestPauseAfterNextInterval: + return true + case UpdateOrganizationScheduledRequestPauseImmediately: + return true + default: + return false + } +} + // Defines values for UpdateOrganizationScheduledRequestResume. const ( UpdateOrganizationScheduledRequestResumeAtNextInterval UpdateOrganizationScheduledRequestResume = "at_next_interval" UpdateOrganizationScheduledRequestResumeImmediately UpdateOrganizationScheduledRequestResume = "immediately" ) +// Valid indicates whether the value is a known member of the UpdateOrganizationScheduledRequestResume enum. +func (e UpdateOrganizationScheduledRequestResume) Valid() bool { + switch e { + case UpdateOrganizationScheduledRequestResumeAtNextInterval: + return true + case UpdateOrganizationScheduledRequestResumeImmediately: + return true + default: + return false + } +} + // Defines values for UpdateUserScheduledRequestPause. const ( UpdateUserScheduledRequestPauseAfterNextInterval UpdateUserScheduledRequestPause = "after_next_interval" UpdateUserScheduledRequestPauseImmediately UpdateUserScheduledRequestPause = "immediately" ) +// Valid indicates whether the value is a known member of the UpdateUserScheduledRequestPause enum. +func (e UpdateUserScheduledRequestPause) Valid() bool { + switch e { + case UpdateUserScheduledRequestPauseAfterNextInterval: + return true + case UpdateUserScheduledRequestPauseImmediately: + return true + default: + return false + } +} + // Defines values for UpdateUserScheduledRequestResume. const ( UpdateUserScheduledRequestResumeAtNextInterval UpdateUserScheduledRequestResume = "at_next_interval" UpdateUserScheduledRequestResumeImmediately UpdateUserScheduledRequestResume = "immediately" ) +// Valid indicates whether the value is a known member of the UpdateUserScheduledRequestResume enum. +func (e UpdateUserScheduledRequestResume) Valid() bool { + switch e { + case UpdateUserScheduledRequestResumeAtNextInterval: + return true + case UpdateUserScheduledRequestResumeImmediately: + return true + default: + return false + } +} + // Defines values for ListSenderIdentitiesParamsChannel. const ( ListSenderIdentitiesParamsChannelEmail ListSenderIdentitiesParamsChannel = "email" ListSenderIdentitiesParamsChannelSms ListSenderIdentitiesParamsChannel = "sms" ) +// Valid indicates whether the value is a known member of the ListSenderIdentitiesParamsChannel enum. +func (e ListSenderIdentitiesParamsChannel) Valid() bool { + switch e { + case ListSenderIdentitiesParamsChannelEmail: + return true + case ListSenderIdentitiesParamsChannelSms: + return true + default: + return false + } +} + // Defines values for AuthCallbackParamsDriver. const ( AuthCallbackParamsDriverBasic AuthCallbackParamsDriver = "basic" AuthCallbackParamsDriverClerk AuthCallbackParamsDriver = "clerk" ) +// Valid indicates whether the value is a known member of the AuthCallbackParamsDriver enum. +func (e AuthCallbackParamsDriver) Valid() bool { + switch e { + case AuthCallbackParamsDriverBasic: + return true + case AuthCallbackParamsDriverClerk: + return true + default: + return false + } +} + // Defines values for AuthWebhookParamsDriver. const ( AuthWebhookParamsDriverClerk AuthWebhookParamsDriver = "clerk" ) +// Valid indicates whether the value is a known member of the AuthWebhookParamsDriver enum. +func (e AuthWebhookParamsDriver) Valid() bool { + switch e { + case AuthWebhookParamsDriverClerk: + return true + default: + return false + } +} + // Action defines model for Action. type Action struct { // Config Action configuration (varies by type) @@ -382,6 +733,9 @@ type BroadcastState string // Campaign defines model for Campaign. type Campaign struct { + // Archived Whether the campaign has been archived + Archived *bool `json:"archived,omitempty"` + // Channel Communication channel type Channel Channel `json:"channel"` CreatedAt time.Time `json:"created_at"` @@ -575,19 +929,19 @@ type CreateTag struct { // CreateTemplate defines model for CreateTemplate. type CreateTemplate struct { // Data Template-specific data based on type. Structure varies by template type. - Data *json.RawMessage `json:"data"` + Data *json.RawMessage `json:"data,omitempty"` // Locale The locale/language code for the template Locale string `json:"locale"` // SenderIdentityId The ID of the sender identity to use for this template - SenderIdentityId *openapi_types.UUID `json:"sender_identity_id"` + SenderIdentityId *openapi_types.UUID `json:"sender_identity_id,omitempty"` } // CreateUserDevice defines model for CreateUserDevice. type CreateUserDevice struct { - AppBuild *string `json:"app_build"` - AppVersion *string `json:"app_version"` + AppBuild *string `json:"app_build,omitempty"` + AppVersion *string `json:"app_version,omitempty"` Config struct { // Endpoint Web Push subscription endpoint URL Endpoint *string `json:"endpoint,omitempty"` @@ -600,11 +954,11 @@ type CreateUserDevice struct { // Token Device token for FCM or APNs Token *string `json:"token,omitempty"` } `json:"config"` - Data *json.RawMessage `json:"data"` + Data *json.RawMessage `json:"data,omitempty"` DeviceId string `json:"device_id"` - Model *string `json:"model"` + Model *string `json:"model,omitempty"` Os CreateUserDeviceOs `json:"os"` - OsVersion *string `json:"os_version"` + OsVersion *string `json:"os_version,omitempty"` } // CreateUserDeviceOs defines model for CreateUserDevice.Os. @@ -735,7 +1089,7 @@ type ExternalID struct { ExternalId string `json:"external_id"` // Metadata Optional metadata associated with this identifier - Metadata *map[string]any `json:"metadata"` + Metadata *map[string]any `json:"metadata,omitempty"` // Source Source of the identifier (e.g. "default", "anonymous", or a custom source). Defaults to "default" if not provided. Source *string `json:"source,omitempty"` @@ -746,7 +1100,7 @@ type ExternalIDResponse struct { CreatedAt time.Time `json:"created_at"` ExternalId string `json:"external_id"` Id openapi_types.UUID `json:"id"` - Metadata *map[string]any `json:"metadata"` + Metadata *map[string]any `json:"metadata,omitempty"` Source string `json:"source"` UpdatedAt time.Time `json:"updated_at"` } @@ -822,7 +1176,7 @@ type JourneyStep struct { // JourneyStepChild defines model for JourneyStepChild. type JourneyStepChild struct { // Data Child-specific configuration data (structure varies by parent step type) - Data *json.RawMessage `json:"data"` + Data *json.RawMessage `json:"data,omitempty"` // ExternalId External ID of the child step ExternalId string `json:"external_id"` @@ -839,6 +1193,8 @@ type JourneyStepType string // List defines model for List. type List struct { + // Archived Whether the list has been archived + Archived *bool `json:"archived,omitempty"` CreatedAt time.Time `json:"created_at"` // DraftRule Draft rule definition (from the draft version, if one exists) @@ -979,16 +1335,16 @@ type OrganizationScheduled struct { Id openapi_types.UUID `json:"id"` // Interval Interval for recurring schedules - Interval *string `json:"interval"` + Interval *string `json:"interval,omitempty"` OrganizationId openapi_types.UUID `json:"organization_id"` // PausedAt When set, the schedule is paused and the scheduler will not advance it - PausedAt *time.Time `json:"paused_at"` + PausedAt *time.Time `json:"paused_at,omitempty"` ScheduledAt time.Time `json:"scheduled_at"` ScheduledId openapi_types.UUID `json:"scheduled_id"` // StartAt Start time of the recurring schedule interval - StartAt *time.Time `json:"start_at"` + StartAt *time.Time `json:"start_at,omitempty"` UpdatedAt time.Time `json:"updated_at"` } @@ -1298,7 +1654,7 @@ type Template struct { ProjectId openapi_types.UUID `json:"project_id"` // SenderIdentityId The ID of the sender identity to use for this template - SenderIdentityId *openapi_types.UUID `json:"sender_identity_id"` + SenderIdentityId *openapi_types.UUID `json:"sender_identity_id,omitempty"` // Type Communication channel type Type Channel `json:"type"` @@ -1370,7 +1726,7 @@ type UpdateApiKey struct { // UpdateBroadcast defines model for UpdateBroadcast. type UpdateBroadcast struct { // ScheduledAt Set or update the scheduled send time. Pass null to remove the schedule and revert to pending. Only allowed when the broadcast is in 'pending' or 'scheduled' state. - ScheduledAt *time.Time `json:"scheduled_at"` + ScheduledAt *time.Time `json:"scheduled_at,omitempty"` } // UpdateCampaign defines model for UpdateCampaign. @@ -1461,10 +1817,10 @@ type UpdateTag struct { // UpdateTemplate defines model for UpdateTemplate. type UpdateTemplate struct { // Data Template-specific data based on type. Structure varies by template type. - Data *json.RawMessage `json:"data"` + Data *json.RawMessage `json:"data,omitempty"` // SenderIdentityId The ID of the sender identity to use for this template - SenderIdentityId *openapi_types.UUID `json:"sender_identity_id"` + SenderIdentityId *openapi_types.UUID `json:"sender_identity_id,omitempty"` } // UpdateUser defines model for UpdateUser. @@ -1515,13 +1871,13 @@ type UpsertOrganization struct { // UpsertOrganizationScheduledRequest defines model for UpsertOrganizationScheduledRequest. type UpsertOrganizationScheduledRequest struct { // Data Scheduled resource data - Data *json.RawMessage `json:"data"` + Data *json.RawMessage `json:"data,omitempty"` // Interval Interval for recurring schedules. When set, the schedule type is automatically set to recurring. - Interval *string `json:"interval"` + Interval *string `json:"interval,omitempty"` // ScheduledAt The time at which the scheduled resource is set to trigger. Required for single schedules. - ScheduledAt *time.Time `json:"scheduled_at"` + ScheduledAt *time.Time `json:"scheduled_at,omitempty"` // ScheduledId The scheduled definition ID. Either scheduled_id or scheduled_name must be provided. ScheduledId *openapi_types.UUID `json:"scheduled_id,omitempty"` @@ -1530,7 +1886,7 @@ type UpsertOrganizationScheduledRequest struct { ScheduledName *string `json:"scheduled_name,omitempty"` // StartAt Start time for recurring schedules. If omitted for recurring schedules, defaults to now. - StartAt *time.Time `json:"start_at"` + StartAt *time.Time `json:"start_at,omitempty"` } // UpsertProjectPushProvider defines model for UpsertProjectPushProvider. @@ -1542,13 +1898,13 @@ type UpsertProjectPushProvider struct { // UpsertUserScheduledRequest defines model for UpsertUserScheduledRequest. type UpsertUserScheduledRequest struct { // Data Scheduled resource data - Data *json.RawMessage `json:"data"` + Data *json.RawMessage `json:"data,omitempty"` // Interval Interval for recurring schedules. When set, the schedule type is automatically set to recurring. - Interval *string `json:"interval"` + Interval *string `json:"interval,omitempty"` // ScheduledAt The time at which the scheduled resource is set to trigger. Required for single schedules. - ScheduledAt *time.Time `json:"scheduled_at"` + ScheduledAt *time.Time `json:"scheduled_at,omitempty"` // ScheduledId The scheduled definition ID. Either scheduled_id or scheduled_name must be provided. ScheduledId *openapi_types.UUID `json:"scheduled_id,omitempty"` @@ -1557,7 +1913,7 @@ type UpsertUserScheduledRequest struct { ScheduledName *string `json:"scheduled_name,omitempty"` // StartAt Start time for recurring schedules. If omitted for recurring schedules, defaults to now. - StartAt *time.Time `json:"start_at"` + StartAt *time.Time `json:"start_at,omitempty"` } // User defines model for User. @@ -1582,15 +1938,15 @@ type User struct { // UserDevice defines model for UserDevice. type UserDevice struct { - AppBuild *string `json:"app_build"` - AppVersion *string `json:"app_version"` + AppBuild *string `json:"app_build,omitempty"` + AppVersion *string `json:"app_version,omitempty"` CreatedAt time.Time `json:"created_at"` Data json.RawMessage `json:"data"` DeviceId string `json:"device_id"` Id openapi_types.UUID `json:"id"` - Model *string `json:"model"` - Os *string `json:"os"` - OsVersion *string `json:"os_version"` + Model *string `json:"model,omitempty"` + Os *string `json:"os,omitempty"` + OsVersion *string `json:"os_version,omitempty"` UpdatedAt time.Time `json:"updated_at"` } @@ -1662,21 +2018,21 @@ type UserList struct { // UserScheduled defines model for UserScheduled. type UserScheduled struct { // AnchorAt Anchor time used as the base for occurrence calculations. Rebased when scheduled_at is explicitly set. - AnchorAt *time.Time `json:"anchor_at"` + AnchorAt *time.Time `json:"anchor_at,omitempty"` CreatedAt time.Time `json:"created_at"` Data json.RawMessage `json:"data"` Id openapi_types.UUID `json:"id"` // Interval Interval for recurring schedules - Interval *string `json:"interval"` + Interval *string `json:"interval,omitempty"` // PausedAt When set, the schedule is paused and the scheduler will not advance it - PausedAt *time.Time `json:"paused_at"` + PausedAt *time.Time `json:"paused_at,omitempty"` ScheduledAt time.Time `json:"scheduled_at"` ScheduledId openapi_types.UUID `json:"scheduled_id"` // StartAt Start time of the recurring schedule interval - StartAt *time.Time `json:"start_at"` + StartAt *time.Time `json:"start_at,omitempty"` UpdatedAt time.Time `json:"updated_at"` UserId openapi_types.UUID `json:"user_id"` } @@ -1718,6 +2074,9 @@ type UserSubscriptionList struct { Total int `json:"total"` } +// IncludeDeleted defines model for IncludeDeleted. +type IncludeDeleted = bool + // Limit defines model for Limit. type Limit = PaginationLimit @@ -1883,6 +2242,9 @@ type TagListResponse struct { Total int `json:"total"` } +// httpBearerAuthContextKey is the context key for HttpBearerAuth security scheme +type httpBearerAuthContextKey string + // ListProjectsParams defines parameters for ListProjects. type ListProjectsParams struct { // Limit Maximum number of items to return @@ -1962,6 +2324,9 @@ type ListCampaignsParams struct { // Search Search query string Search *Search `form:"search,omitempty" json:"search,omitempty"` + + // IncludeDeleted Include archived/soft-deleted items in the results + IncludeDeleted *IncludeDeleted `form:"include_deleted,omitempty" json:"include_deleted,omitempty"` } // GetCampaignUsersParams defines parameters for GetCampaignUsers. @@ -2010,6 +2375,9 @@ type ListJourneysParams struct { // Search Search query string Search *Search `form:"search,omitempty" json:"search,omitempty"` + + // IncludeDeleted Include archived/soft-deleted items in the results + IncludeDeleted *IncludeDeleted `form:"include_deleted,omitempty" json:"include_deleted,omitempty"` } // CreateJourneyParams defines parameters for CreateJourney. @@ -2052,6 +2420,9 @@ type ListListsParams struct { // Search Search query string Search *Search `form:"search,omitempty" json:"search,omitempty"` + + // IncludeDeleted Include archived/soft-deleted items in the results + IncludeDeleted *IncludeDeleted `form:"include_deleted,omitempty" json:"include_deleted,omitempty"` } // GetListUsersParams defines parameters for GetListUsers. @@ -2638,6 +3009,9 @@ type ClientInterface interface { SendTest(ctx context.Context, projectID openapi_types.UUID, campaignID openapi_types.UUID, templateID openapi_types.UUID, body SendTestJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + // UnarchiveCampaign request + UnarchiveCampaign(ctx context.Context, projectID openapi_types.UUID, campaignID openapi_types.UUID, reqEditors ...RequestEditorFn) (*http.Response, error) + // GetCampaignUsers request GetCampaignUsers(ctx context.Context, projectID openapi_types.UUID, campaignID openapi_types.UUID, params *GetCampaignUsersParams, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -2692,6 +3066,9 @@ type ClientInterface interface { SetJourneySteps(ctx context.Context, projectID openapi_types.UUID, journeyID openapi_types.UUID, body SetJourneyStepsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + // UnarchiveJourney request + UnarchiveJourney(ctx context.Context, projectID openapi_types.UUID, journeyID openapi_types.UUID, reqEditors ...RequestEditorFn) (*http.Response, error) + // CancelUserJourney request CancelUserJourney(ctx context.Context, projectID openapi_types.UUID, journeyID openapi_types.UUID, userID openapi_types.UUID, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -2755,6 +3132,9 @@ type ClientInterface interface { // DuplicateList request DuplicateList(ctx context.Context, projectID openapi_types.UUID, listID openapi_types.UUID, reqEditors ...RequestEditorFn) (*http.Response, error) + // UnarchiveList request + UnarchiveList(ctx context.Context, projectID openapi_types.UUID, listID openapi_types.UUID, reqEditors ...RequestEditorFn) (*http.Response, error) + // GetListUsers request GetListUsers(ctx context.Context, projectID openapi_types.UUID, listID openapi_types.UUID, params *GetListUsersParams, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -3693,6 +4073,18 @@ func (c *Client) SendTest(ctx context.Context, projectID openapi_types.UUID, cam return c.Client.Do(req) } +func (c *Client) UnarchiveCampaign(ctx context.Context, projectID openapi_types.UUID, campaignID openapi_types.UUID, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUnarchiveCampaignRequest(c.Server, projectID, campaignID) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + func (c *Client) GetCampaignUsers(ctx context.Context, projectID openapi_types.UUID, campaignID openapi_types.UUID, params *GetCampaignUsersParams, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewGetCampaignUsersRequest(c.Server, projectID, campaignID, params) if err != nil { @@ -3921,6 +4313,18 @@ func (c *Client) SetJourneySteps(ctx context.Context, projectID openapi_types.UU return c.Client.Do(req) } +func (c *Client) UnarchiveJourney(ctx context.Context, projectID openapi_types.UUID, journeyID openapi_types.UUID, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUnarchiveJourneyRequest(c.Server, projectID, journeyID) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + func (c *Client) CancelUserJourney(ctx context.Context, projectID openapi_types.UUID, journeyID openapi_types.UUID, userID openapi_types.UUID, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewCancelUserJourneyRequest(c.Server, projectID, journeyID, userID) if err != nil { @@ -4197,6 +4601,18 @@ func (c *Client) DuplicateList(ctx context.Context, projectID openapi_types.UUID return c.Client.Do(req) } +func (c *Client) UnarchiveList(ctx context.Context, projectID openapi_types.UUID, listID openapi_types.UUID, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUnarchiveListRequest(c.Server, projectID, listID) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + func (c *Client) GetListUsers(ctx context.Context, projectID openapi_types.UUID, listID openapi_types.UUID, params *GetListUsersParams, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewGetListUsersRequest(c.Server, projectID, listID, params) if err != nil { @@ -5524,7 +5940,7 @@ func NewGetProfileRequest(server string) (*http.Request, error) { return nil, err } - req, err := http.NewRequest("GET", queryURL.String(), nil) + req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil) if err != nil { return nil, err } @@ -5552,19 +5968,21 @@ func NewListProjectsRequest(server string, params *ListProjectsParams) (*http.Re } if params != nil { + // queryValues collects non-styled parameters (passthrough, JSON) + // that are safe to round-trip through url.Values.Encode(). queryValues := queryURL.Query() + // rawQueryFragments collects pre-encoded query fragments from + // styled parameters, preserving literal commas as delimiters + // per the OpenAPI spec (e.g. "color=blue,black,brown"). + var rawQueryFragments []string if params.Limit != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "limit", runtime.ParamLocationQuery, *params.Limit); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "limit", *params.Limit, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "integer", Format: ""}); err != nil { return nil, err } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) } } @@ -5572,15 +5990,11 @@ func NewListProjectsRequest(server string, params *ListProjectsParams) (*http.Re if params.Offset != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "offset", runtime.ParamLocationQuery, *params.Offset); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "offset", *params.Offset, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "integer", Format: ""}); err != nil { return nil, err } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) } } @@ -5588,24 +6002,23 @@ func NewListProjectsRequest(server string, params *ListProjectsParams) (*http.Re if params.Search != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "search", runtime.ParamLocationQuery, *params.Search); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "search", *params.Search, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { return nil, err } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) } } } - queryURL.RawQuery = queryValues.Encode() + if encoded := queryValues.Encode(); encoded != "" { + rawQueryFragments = append(rawQueryFragments, encoded) + } + queryURL.RawQuery = strings.Join(rawQueryFragments, "&") } - req, err := http.NewRequest("GET", queryURL.String(), nil) + req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil) if err != nil { return nil, err } @@ -5643,7 +6056,7 @@ func NewCreateProjectRequestWithBody(server string, contentType string, body io. return nil, err } - req, err := http.NewRequest("POST", queryURL.String(), body) + req, err := http.NewRequest(http.MethodPost, queryURL.String(), body) if err != nil { return nil, err } @@ -5659,7 +6072,7 @@ func NewDeleteProjectRequest(server string, projectID openapi_types.UUID) (*http var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "projectID", runtime.ParamLocationPath, projectID) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "projectID", projectID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } @@ -5679,7 +6092,7 @@ func NewDeleteProjectRequest(server string, projectID openapi_types.UUID) (*http return nil, err } - req, err := http.NewRequest("DELETE", queryURL.String(), nil) + req, err := http.NewRequest(http.MethodDelete, queryURL.String(), nil) if err != nil { return nil, err } @@ -5693,7 +6106,7 @@ func NewGetProjectRequest(server string, projectID openapi_types.UUID) (*http.Re var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "projectID", runtime.ParamLocationPath, projectID) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "projectID", projectID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } @@ -5713,7 +6126,7 @@ func NewGetProjectRequest(server string, projectID openapi_types.UUID) (*http.Re return nil, err } - req, err := http.NewRequest("GET", queryURL.String(), nil) + req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil) if err != nil { return nil, err } @@ -5738,7 +6151,7 @@ func NewUpdateProjectRequestWithBody(server string, projectID openapi_types.UUID var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "projectID", runtime.ParamLocationPath, projectID) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "projectID", projectID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } @@ -5758,7 +6171,7 @@ func NewUpdateProjectRequestWithBody(server string, projectID openapi_types.UUID return nil, err } - req, err := http.NewRequest("PATCH", queryURL.String(), body) + req, err := http.NewRequest(http.MethodPatch, queryURL.String(), body) if err != nil { return nil, err } @@ -5774,7 +6187,7 @@ func NewListActionsRequest(server string, projectID openapi_types.UUID, params * var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "projectID", runtime.ParamLocationPath, projectID) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "projectID", projectID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } @@ -5795,19 +6208,21 @@ func NewListActionsRequest(server string, projectID openapi_types.UUID, params * } if params != nil { + // queryValues collects non-styled parameters (passthrough, JSON) + // that are safe to round-trip through url.Values.Encode(). queryValues := queryURL.Query() + // rawQueryFragments collects pre-encoded query fragments from + // styled parameters, preserving literal commas as delimiters + // per the OpenAPI spec (e.g. "color=blue,black,brown"). + var rawQueryFragments []string if params.Limit != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "limit", runtime.ParamLocationQuery, *params.Limit); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "limit", *params.Limit, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "integer", Format: ""}); err != nil { return nil, err } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) } } @@ -5815,15 +6230,11 @@ func NewListActionsRequest(server string, projectID openapi_types.UUID, params * if params.Offset != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "offset", runtime.ParamLocationQuery, *params.Offset); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "offset", *params.Offset, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "integer", Format: ""}); err != nil { return nil, err } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) } } @@ -5831,24 +6242,23 @@ func NewListActionsRequest(server string, projectID openapi_types.UUID, params * if params.Search != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "search", runtime.ParamLocationQuery, *params.Search); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "search", *params.Search, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { return nil, err } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) } } } - queryURL.RawQuery = queryValues.Encode() + if encoded := queryValues.Encode(); encoded != "" { + rawQueryFragments = append(rawQueryFragments, encoded) + } + queryURL.RawQuery = strings.Join(rawQueryFragments, "&") } - req, err := http.NewRequest("GET", queryURL.String(), nil) + req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil) if err != nil { return nil, err } @@ -5873,7 +6283,7 @@ func NewCreateActionRequestWithBody(server string, projectID openapi_types.UUID, var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "projectID", runtime.ParamLocationPath, projectID) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "projectID", projectID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } @@ -5893,7 +6303,7 @@ func NewCreateActionRequestWithBody(server string, projectID openapi_types.UUID, return nil, err } - req, err := http.NewRequest("POST", queryURL.String(), body) + req, err := http.NewRequest(http.MethodPost, queryURL.String(), body) if err != nil { return nil, err } @@ -5909,7 +6319,7 @@ func NewListActionMetaRequest(server string, projectID openapi_types.UUID) (*htt var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "projectID", runtime.ParamLocationPath, projectID) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "projectID", projectID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } @@ -5929,7 +6339,7 @@ func NewListActionMetaRequest(server string, projectID openapi_types.UUID) (*htt return nil, err } - req, err := http.NewRequest("GET", queryURL.String(), nil) + req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil) if err != nil { return nil, err } @@ -5943,14 +6353,14 @@ func NewGetActionPreviewRequest(server string, projectID openapi_types.UUID, act var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "projectID", runtime.ParamLocationPath, projectID) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "projectID", projectID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "actionType", runtime.ParamLocationPath, actionType) + pathParam1, err = runtime.StyleParamWithOptions("simple", false, "actionType", actionType, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""}) if err != nil { return nil, err } @@ -5970,7 +6380,7 @@ func NewGetActionPreviewRequest(server string, projectID openapi_types.UUID, act return nil, err } - req, err := http.NewRequest("GET", queryURL.String(), nil) + req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil) if err != nil { return nil, err } @@ -5995,7 +6405,7 @@ func NewTestActionRequestWithBody(server string, projectID openapi_types.UUID, c var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "projectID", runtime.ParamLocationPath, projectID) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "projectID", projectID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } @@ -6015,7 +6425,7 @@ func NewTestActionRequestWithBody(server string, projectID openapi_types.UUID, c return nil, err } - req, err := http.NewRequest("POST", queryURL.String(), body) + req, err := http.NewRequest(http.MethodPost, queryURL.String(), body) if err != nil { return nil, err } @@ -6031,14 +6441,14 @@ func NewDeleteActionRequest(server string, projectID openapi_types.UUID, actionI var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "projectID", runtime.ParamLocationPath, projectID) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "projectID", projectID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "actionID", runtime.ParamLocationPath, actionID) + pathParam1, err = runtime.StyleParamWithOptions("simple", false, "actionID", actionID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } @@ -6058,7 +6468,7 @@ func NewDeleteActionRequest(server string, projectID openapi_types.UUID, actionI return nil, err } - req, err := http.NewRequest("DELETE", queryURL.String(), nil) + req, err := http.NewRequest(http.MethodDelete, queryURL.String(), nil) if err != nil { return nil, err } @@ -6072,14 +6482,14 @@ func NewGetActionRequest(server string, projectID openapi_types.UUID, actionID o var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "projectID", runtime.ParamLocationPath, projectID) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "projectID", projectID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "actionID", runtime.ParamLocationPath, actionID) + pathParam1, err = runtime.StyleParamWithOptions("simple", false, "actionID", actionID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } @@ -6099,7 +6509,7 @@ func NewGetActionRequest(server string, projectID openapi_types.UUID, actionID o return nil, err } - req, err := http.NewRequest("GET", queryURL.String(), nil) + req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil) if err != nil { return nil, err } @@ -6124,14 +6534,14 @@ func NewUpdateActionRequestWithBody(server string, projectID openapi_types.UUID, var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "projectID", runtime.ParamLocationPath, projectID) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "projectID", projectID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "actionID", runtime.ParamLocationPath, actionID) + pathParam1, err = runtime.StyleParamWithOptions("simple", false, "actionID", actionID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } @@ -6151,7 +6561,7 @@ func NewUpdateActionRequestWithBody(server string, projectID openapi_types.UUID, return nil, err } - req, err := http.NewRequest("PATCH", queryURL.String(), body) + req, err := http.NewRequest(http.MethodPatch, queryURL.String(), body) if err != nil { return nil, err } @@ -6167,21 +6577,21 @@ func NewListActionSchemasRequest(server string, projectID openapi_types.UUID, ac var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "projectID", runtime.ParamLocationPath, projectID) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "projectID", projectID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "actionID", runtime.ParamLocationPath, actionID) + pathParam1, err = runtime.StyleParamWithOptions("simple", false, "actionID", actionID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } var pathParam2 string - pathParam2, err = runtime.StyleParamWithLocation("simple", false, "functionID", runtime.ParamLocationPath, functionID) + pathParam2, err = runtime.StyleParamWithOptions("simple", false, "functionID", functionID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""}) if err != nil { return nil, err } @@ -6201,7 +6611,7 @@ func NewListActionSchemasRequest(server string, projectID openapi_types.UUID, ac return nil, err } - req, err := http.NewRequest("GET", queryURL.String(), nil) + req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil) if err != nil { return nil, err } @@ -6226,21 +6636,21 @@ func NewTestActionFunctionRequestWithBody(server string, projectID openapi_types var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "projectID", runtime.ParamLocationPath, projectID) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "projectID", projectID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "actionID", runtime.ParamLocationPath, actionID) + pathParam1, err = runtime.StyleParamWithOptions("simple", false, "actionID", actionID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } var pathParam2 string - pathParam2, err = runtime.StyleParamWithLocation("simple", false, "functionID", runtime.ParamLocationPath, functionID) + pathParam2, err = runtime.StyleParamWithOptions("simple", false, "functionID", functionID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""}) if err != nil { return nil, err } @@ -6260,7 +6670,7 @@ func NewTestActionFunctionRequestWithBody(server string, projectID openapi_types return nil, err } - req, err := http.NewRequest("POST", queryURL.String(), body) + req, err := http.NewRequest(http.MethodPost, queryURL.String(), body) if err != nil { return nil, err } @@ -6276,7 +6686,7 @@ func NewListProjectAdminsRequest(server string, projectID openapi_types.UUID, pa var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "projectID", runtime.ParamLocationPath, projectID) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "projectID", projectID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } @@ -6297,19 +6707,21 @@ func NewListProjectAdminsRequest(server string, projectID openapi_types.UUID, pa } if params != nil { + // queryValues collects non-styled parameters (passthrough, JSON) + // that are safe to round-trip through url.Values.Encode(). queryValues := queryURL.Query() + // rawQueryFragments collects pre-encoded query fragments from + // styled parameters, preserving literal commas as delimiters + // per the OpenAPI spec (e.g. "color=blue,black,brown"). + var rawQueryFragments []string if params.Limit != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "limit", runtime.ParamLocationQuery, *params.Limit); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "limit", *params.Limit, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "integer", Format: ""}); err != nil { return nil, err } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) } } @@ -6317,15 +6729,11 @@ func NewListProjectAdminsRequest(server string, projectID openapi_types.UUID, pa if params.Offset != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "offset", runtime.ParamLocationQuery, *params.Offset); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "offset", *params.Offset, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "integer", Format: ""}); err != nil { return nil, err } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) } } @@ -6333,24 +6741,23 @@ func NewListProjectAdminsRequest(server string, projectID openapi_types.UUID, pa if params.Search != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "search", runtime.ParamLocationQuery, *params.Search); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "search", *params.Search, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { return nil, err } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) } } } - queryURL.RawQuery = queryValues.Encode() + if encoded := queryValues.Encode(); encoded != "" { + rawQueryFragments = append(rawQueryFragments, encoded) + } + queryURL.RawQuery = strings.Join(rawQueryFragments, "&") } - req, err := http.NewRequest("GET", queryURL.String(), nil) + req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil) if err != nil { return nil, err } @@ -6364,14 +6771,14 @@ func NewDeleteProjectAdminRequest(server string, projectID openapi_types.UUID, a var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "projectID", runtime.ParamLocationPath, projectID) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "projectID", projectID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "adminID", runtime.ParamLocationPath, adminID) + pathParam1, err = runtime.StyleParamWithOptions("simple", false, "adminID", adminID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } @@ -6391,7 +6798,7 @@ func NewDeleteProjectAdminRequest(server string, projectID openapi_types.UUID, a return nil, err } - req, err := http.NewRequest("DELETE", queryURL.String(), nil) + req, err := http.NewRequest(http.MethodDelete, queryURL.String(), nil) if err != nil { return nil, err } @@ -6405,14 +6812,14 @@ func NewGetProjectAdminRequest(server string, projectID openapi_types.UUID, admi var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "projectID", runtime.ParamLocationPath, projectID) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "projectID", projectID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "adminID", runtime.ParamLocationPath, adminID) + pathParam1, err = runtime.StyleParamWithOptions("simple", false, "adminID", adminID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } @@ -6432,7 +6839,7 @@ func NewGetProjectAdminRequest(server string, projectID openapi_types.UUID, admi return nil, err } - req, err := http.NewRequest("GET", queryURL.String(), nil) + req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil) if err != nil { return nil, err } @@ -6457,14 +6864,14 @@ func NewUpdateProjectAdminRequestWithBody(server string, projectID openapi_types var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "projectID", runtime.ParamLocationPath, projectID) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "projectID", projectID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "adminID", runtime.ParamLocationPath, adminID) + pathParam1, err = runtime.StyleParamWithOptions("simple", false, "adminID", adminID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } @@ -6484,7 +6891,7 @@ func NewUpdateProjectAdminRequestWithBody(server string, projectID openapi_types return nil, err } - req, err := http.NewRequest("PATCH", queryURL.String(), body) + req, err := http.NewRequest(http.MethodPatch, queryURL.String(), body) if err != nil { return nil, err } @@ -6500,7 +6907,7 @@ func NewListBroadcastsRequest(server string, projectID openapi_types.UUID, param var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "projectID", runtime.ParamLocationPath, projectID) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "projectID", projectID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } @@ -6521,19 +6928,21 @@ func NewListBroadcastsRequest(server string, projectID openapi_types.UUID, param } if params != nil { + // queryValues collects non-styled parameters (passthrough, JSON) + // that are safe to round-trip through url.Values.Encode(). queryValues := queryURL.Query() + // rawQueryFragments collects pre-encoded query fragments from + // styled parameters, preserving literal commas as delimiters + // per the OpenAPI spec (e.g. "color=blue,black,brown"). + var rawQueryFragments []string if params.Limit != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "limit", runtime.ParamLocationQuery, *params.Limit); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "limit", *params.Limit, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "integer", Format: ""}); err != nil { return nil, err } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) } } @@ -6541,15 +6950,11 @@ func NewListBroadcastsRequest(server string, projectID openapi_types.UUID, param if params.Offset != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "offset", runtime.ParamLocationQuery, *params.Offset); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "offset", *params.Offset, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "integer", Format: ""}); err != nil { return nil, err } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) } } @@ -6557,15 +6962,11 @@ func NewListBroadcastsRequest(server string, projectID openapi_types.UUID, param if params.Search != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "search", runtime.ParamLocationQuery, *params.Search); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "search", *params.Search, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { return nil, err } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) } } @@ -6573,15 +6974,11 @@ func NewListBroadcastsRequest(server string, projectID openapi_types.UUID, param if params.CampaignId != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "campaign_id", runtime.ParamLocationQuery, *params.CampaignId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "campaign_id", *params.CampaignId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: "uuid"}); err != nil { return nil, err } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) } } @@ -6589,15 +6986,11 @@ func NewListBroadcastsRequest(server string, projectID openapi_types.UUID, param if params.ListId != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "list_id", runtime.ParamLocationQuery, *params.ListId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "list_id", *params.ListId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: "uuid"}); err != nil { return nil, err } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) } } @@ -6605,24 +6998,23 @@ func NewListBroadcastsRequest(server string, projectID openapi_types.UUID, param if params.State != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "state", runtime.ParamLocationQuery, *params.State); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "state", *params.State, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { return nil, err } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) } } } - queryURL.RawQuery = queryValues.Encode() + if encoded := queryValues.Encode(); encoded != "" { + rawQueryFragments = append(rawQueryFragments, encoded) + } + queryURL.RawQuery = strings.Join(rawQueryFragments, "&") } - req, err := http.NewRequest("GET", queryURL.String(), nil) + req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil) if err != nil { return nil, err } @@ -6647,7 +7039,7 @@ func NewCreateBroadcastRequestWithBody(server string, projectID openapi_types.UU var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "projectID", runtime.ParamLocationPath, projectID) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "projectID", projectID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } @@ -6667,7 +7059,7 @@ func NewCreateBroadcastRequestWithBody(server string, projectID openapi_types.UU return nil, err } - req, err := http.NewRequest("POST", queryURL.String(), body) + req, err := http.NewRequest(http.MethodPost, queryURL.String(), body) if err != nil { return nil, err } @@ -6683,14 +7075,14 @@ func NewCancelBroadcastRequest(server string, projectID openapi_types.UUID, broa var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "projectID", runtime.ParamLocationPath, projectID) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "projectID", projectID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "broadcastID", runtime.ParamLocationPath, broadcastID) + pathParam1, err = runtime.StyleParamWithOptions("simple", false, "broadcastID", broadcastID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } @@ -6710,7 +7102,7 @@ func NewCancelBroadcastRequest(server string, projectID openapi_types.UUID, broa return nil, err } - req, err := http.NewRequest("DELETE", queryURL.String(), nil) + req, err := http.NewRequest(http.MethodDelete, queryURL.String(), nil) if err != nil { return nil, err } @@ -6724,14 +7116,14 @@ func NewGetBroadcastRequest(server string, projectID openapi_types.UUID, broadca var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "projectID", runtime.ParamLocationPath, projectID) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "projectID", projectID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "broadcastID", runtime.ParamLocationPath, broadcastID) + pathParam1, err = runtime.StyleParamWithOptions("simple", false, "broadcastID", broadcastID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } @@ -6751,7 +7143,7 @@ func NewGetBroadcastRequest(server string, projectID openapi_types.UUID, broadca return nil, err } - req, err := http.NewRequest("GET", queryURL.String(), nil) + req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil) if err != nil { return nil, err } @@ -6776,14 +7168,14 @@ func NewUpdateBroadcastRequestWithBody(server string, projectID openapi_types.UU var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "projectID", runtime.ParamLocationPath, projectID) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "projectID", projectID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "broadcastID", runtime.ParamLocationPath, broadcastID) + pathParam1, err = runtime.StyleParamWithOptions("simple", false, "broadcastID", broadcastID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } @@ -6803,7 +7195,7 @@ func NewUpdateBroadcastRequestWithBody(server string, projectID openapi_types.UU return nil, err } - req, err := http.NewRequest("PATCH", queryURL.String(), body) + req, err := http.NewRequest(http.MethodPatch, queryURL.String(), body) if err != nil { return nil, err } @@ -6819,14 +7211,14 @@ func NewStreamBroadcastProgressRequest(server string, projectID openapi_types.UU var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "projectID", runtime.ParamLocationPath, projectID) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "projectID", projectID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "broadcastID", runtime.ParamLocationPath, broadcastID) + pathParam1, err = runtime.StyleParamWithOptions("simple", false, "broadcastID", broadcastID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } @@ -6846,7 +7238,7 @@ func NewStreamBroadcastProgressRequest(server string, projectID openapi_types.UU return nil, err } - req, err := http.NewRequest("GET", queryURL.String(), nil) + req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil) if err != nil { return nil, err } @@ -6860,14 +7252,14 @@ func NewSendBroadcastRequest(server string, projectID openapi_types.UUID, broadc var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "projectID", runtime.ParamLocationPath, projectID) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "projectID", projectID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "broadcastID", runtime.ParamLocationPath, broadcastID) + pathParam1, err = runtime.StyleParamWithOptions("simple", false, "broadcastID", broadcastID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } @@ -6887,7 +7279,7 @@ func NewSendBroadcastRequest(server string, projectID openapi_types.UUID, broadc return nil, err } - req, err := http.NewRequest("POST", queryURL.String(), nil) + req, err := http.NewRequest(http.MethodPost, queryURL.String(), nil) if err != nil { return nil, err } @@ -6901,14 +7293,14 @@ func NewGetBroadcastUsersRequest(server string, projectID openapi_types.UUID, br var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "projectID", runtime.ParamLocationPath, projectID) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "projectID", projectID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "broadcastID", runtime.ParamLocationPath, broadcastID) + pathParam1, err = runtime.StyleParamWithOptions("simple", false, "broadcastID", broadcastID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } @@ -6929,19 +7321,21 @@ func NewGetBroadcastUsersRequest(server string, projectID openapi_types.UUID, br } if params != nil { + // queryValues collects non-styled parameters (passthrough, JSON) + // that are safe to round-trip through url.Values.Encode(). queryValues := queryURL.Query() + // rawQueryFragments collects pre-encoded query fragments from + // styled parameters, preserving literal commas as delimiters + // per the OpenAPI spec (e.g. "color=blue,black,brown"). + var rawQueryFragments []string if params.Limit != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "limit", runtime.ParamLocationQuery, *params.Limit); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "limit", *params.Limit, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "integer", Format: ""}); err != nil { return nil, err } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) } } @@ -6949,15 +7343,11 @@ func NewGetBroadcastUsersRequest(server string, projectID openapi_types.UUID, br if params.Offset != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "offset", runtime.ParamLocationQuery, *params.Offset); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "offset", *params.Offset, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "integer", Format: ""}); err != nil { return nil, err } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) } } @@ -6965,24 +7355,23 @@ func NewGetBroadcastUsersRequest(server string, projectID openapi_types.UUID, br if params.Search != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "search", runtime.ParamLocationQuery, *params.Search); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "search", *params.Search, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { return nil, err } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) } } } - queryURL.RawQuery = queryValues.Encode() + if encoded := queryValues.Encode(); encoded != "" { + rawQueryFragments = append(rawQueryFragments, encoded) + } + queryURL.RawQuery = strings.Join(rawQueryFragments, "&") } - req, err := http.NewRequest("GET", queryURL.String(), nil) + req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil) if err != nil { return nil, err } @@ -6996,7 +7385,7 @@ func NewListCampaignsRequest(server string, projectID openapi_types.UUID, params var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "projectID", runtime.ParamLocationPath, projectID) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "projectID", projectID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } @@ -7017,19 +7406,21 @@ func NewListCampaignsRequest(server string, projectID openapi_types.UUID, params } if params != nil { + // queryValues collects non-styled parameters (passthrough, JSON) + // that are safe to round-trip through url.Values.Encode(). queryValues := queryURL.Query() + // rawQueryFragments collects pre-encoded query fragments from + // styled parameters, preserving literal commas as delimiters + // per the OpenAPI spec (e.g. "color=blue,black,brown"). + var rawQueryFragments []string if params.Limit != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "limit", runtime.ParamLocationQuery, *params.Limit); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "limit", *params.Limit, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "integer", Format: ""}); err != nil { return nil, err } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) } } @@ -7037,15 +7428,11 @@ func NewListCampaignsRequest(server string, projectID openapi_types.UUID, params if params.Offset != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "offset", runtime.ParamLocationQuery, *params.Offset); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "offset", *params.Offset, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "integer", Format: ""}); err != nil { return nil, err } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) } } @@ -7053,24 +7440,35 @@ func NewListCampaignsRequest(server string, projectID openapi_types.UUID, params if params.Search != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "search", runtime.ParamLocationQuery, *params.Search); err != nil { + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "search", *params.Search, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + } else { + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) + } + } + + } + + if params.IncludeDeleted != nil { + + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "include_deleted", *params.IncludeDeleted, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "boolean", Format: ""}); err != nil { return nil, err } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) } } } - queryURL.RawQuery = queryValues.Encode() + if encoded := queryValues.Encode(); encoded != "" { + rawQueryFragments = append(rawQueryFragments, encoded) + } + queryURL.RawQuery = strings.Join(rawQueryFragments, "&") } - req, err := http.NewRequest("GET", queryURL.String(), nil) + req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil) if err != nil { return nil, err } @@ -7095,7 +7493,7 @@ func NewCreateCampaignRequestWithBody(server string, projectID openapi_types.UUI var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "projectID", runtime.ParamLocationPath, projectID) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "projectID", projectID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } @@ -7115,7 +7513,7 @@ func NewCreateCampaignRequestWithBody(server string, projectID openapi_types.UUI return nil, err } - req, err := http.NewRequest("POST", queryURL.String(), body) + req, err := http.NewRequest(http.MethodPost, queryURL.String(), body) if err != nil { return nil, err } @@ -7131,14 +7529,14 @@ func NewDeleteCampaignRequest(server string, projectID openapi_types.UUID, campa var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "projectID", runtime.ParamLocationPath, projectID) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "projectID", projectID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "campaignID", runtime.ParamLocationPath, campaignID) + pathParam1, err = runtime.StyleParamWithOptions("simple", false, "campaignID", campaignID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } @@ -7158,7 +7556,7 @@ func NewDeleteCampaignRequest(server string, projectID openapi_types.UUID, campa return nil, err } - req, err := http.NewRequest("DELETE", queryURL.String(), nil) + req, err := http.NewRequest(http.MethodDelete, queryURL.String(), nil) if err != nil { return nil, err } @@ -7172,14 +7570,14 @@ func NewGetCampaignRequest(server string, projectID openapi_types.UUID, campaign var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "projectID", runtime.ParamLocationPath, projectID) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "projectID", projectID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "campaignID", runtime.ParamLocationPath, campaignID) + pathParam1, err = runtime.StyleParamWithOptions("simple", false, "campaignID", campaignID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } @@ -7199,7 +7597,7 @@ func NewGetCampaignRequest(server string, projectID openapi_types.UUID, campaign return nil, err } - req, err := http.NewRequest("GET", queryURL.String(), nil) + req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil) if err != nil { return nil, err } @@ -7224,14 +7622,14 @@ func NewUpdateCampaignRequestWithBody(server string, projectID openapi_types.UUI var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "projectID", runtime.ParamLocationPath, projectID) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "projectID", projectID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "campaignID", runtime.ParamLocationPath, campaignID) + pathParam1, err = runtime.StyleParamWithOptions("simple", false, "campaignID", campaignID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } @@ -7251,7 +7649,7 @@ func NewUpdateCampaignRequestWithBody(server string, projectID openapi_types.UUI return nil, err } - req, err := http.NewRequest("PATCH", queryURL.String(), body) + req, err := http.NewRequest(http.MethodPatch, queryURL.String(), body) if err != nil { return nil, err } @@ -7267,14 +7665,14 @@ func NewDuplicateCampaignRequest(server string, projectID openapi_types.UUID, ca var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "projectID", runtime.ParamLocationPath, projectID) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "projectID", projectID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "campaignID", runtime.ParamLocationPath, campaignID) + pathParam1, err = runtime.StyleParamWithOptions("simple", false, "campaignID", campaignID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } @@ -7294,7 +7692,7 @@ func NewDuplicateCampaignRequest(server string, projectID openapi_types.UUID, ca return nil, err } - req, err := http.NewRequest("POST", queryURL.String(), nil) + req, err := http.NewRequest(http.MethodPost, queryURL.String(), nil) if err != nil { return nil, err } @@ -7319,14 +7717,14 @@ func NewCreateTemplateRequestWithBody(server string, projectID openapi_types.UUI var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "projectID", runtime.ParamLocationPath, projectID) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "projectID", projectID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "campaignID", runtime.ParamLocationPath, campaignID) + pathParam1, err = runtime.StyleParamWithOptions("simple", false, "campaignID", campaignID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } @@ -7346,7 +7744,7 @@ func NewCreateTemplateRequestWithBody(server string, projectID openapi_types.UUI return nil, err } - req, err := http.NewRequest("POST", queryURL.String(), body) + req, err := http.NewRequest(http.MethodPost, queryURL.String(), body) if err != nil { return nil, err } @@ -7362,21 +7760,21 @@ func NewDeleteTemplateRequest(server string, projectID openapi_types.UUID, campa var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "projectID", runtime.ParamLocationPath, projectID) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "projectID", projectID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "campaignID", runtime.ParamLocationPath, campaignID) + pathParam1, err = runtime.StyleParamWithOptions("simple", false, "campaignID", campaignID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } var pathParam2 string - pathParam2, err = runtime.StyleParamWithLocation("simple", false, "templateID", runtime.ParamLocationPath, templateID) + pathParam2, err = runtime.StyleParamWithOptions("simple", false, "templateID", templateID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } @@ -7396,7 +7794,7 @@ func NewDeleteTemplateRequest(server string, projectID openapi_types.UUID, campa return nil, err } - req, err := http.NewRequest("DELETE", queryURL.String(), nil) + req, err := http.NewRequest(http.MethodDelete, queryURL.String(), nil) if err != nil { return nil, err } @@ -7410,21 +7808,21 @@ func NewGetTemplateRequest(server string, projectID openapi_types.UUID, campaign var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "projectID", runtime.ParamLocationPath, projectID) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "projectID", projectID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "campaignID", runtime.ParamLocationPath, campaignID) + pathParam1, err = runtime.StyleParamWithOptions("simple", false, "campaignID", campaignID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } var pathParam2 string - pathParam2, err = runtime.StyleParamWithLocation("simple", false, "templateID", runtime.ParamLocationPath, templateID) + pathParam2, err = runtime.StyleParamWithOptions("simple", false, "templateID", templateID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } @@ -7444,7 +7842,7 @@ func NewGetTemplateRequest(server string, projectID openapi_types.UUID, campaign return nil, err } - req, err := http.NewRequest("GET", queryURL.String(), nil) + req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil) if err != nil { return nil, err } @@ -7469,21 +7867,21 @@ func NewUpdateTemplateRequestWithBody(server string, projectID openapi_types.UUI var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "projectID", runtime.ParamLocationPath, projectID) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "projectID", projectID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "campaignID", runtime.ParamLocationPath, campaignID) + pathParam1, err = runtime.StyleParamWithOptions("simple", false, "campaignID", campaignID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } var pathParam2 string - pathParam2, err = runtime.StyleParamWithLocation("simple", false, "templateID", runtime.ParamLocationPath, templateID) + pathParam2, err = runtime.StyleParamWithOptions("simple", false, "templateID", templateID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } @@ -7503,7 +7901,7 @@ func NewUpdateTemplateRequestWithBody(server string, projectID openapi_types.UUI return nil, err } - req, err := http.NewRequest("PATCH", queryURL.String(), body) + req, err := http.NewRequest(http.MethodPatch, queryURL.String(), body) if err != nil { return nil, err } @@ -7530,21 +7928,21 @@ func NewSendTestRequestWithBody(server string, projectID openapi_types.UUID, cam var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "projectID", runtime.ParamLocationPath, projectID) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "projectID", projectID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "campaignID", runtime.ParamLocationPath, campaignID) + pathParam1, err = runtime.StyleParamWithOptions("simple", false, "campaignID", campaignID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } var pathParam2 string - pathParam2, err = runtime.StyleParamWithLocation("simple", false, "templateID", runtime.ParamLocationPath, templateID) + pathParam2, err = runtime.StyleParamWithOptions("simple", false, "templateID", templateID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } @@ -7564,7 +7962,7 @@ func NewSendTestRequestWithBody(server string, projectID openapi_types.UUID, cam return nil, err } - req, err := http.NewRequest("POST", queryURL.String(), body) + req, err := http.NewRequest(http.MethodPost, queryURL.String(), body) if err != nil { return nil, err } @@ -7574,20 +7972,61 @@ func NewSendTestRequestWithBody(server string, projectID openapi_types.UUID, cam return req, nil } +// NewUnarchiveCampaignRequest generates requests for UnarchiveCampaign +func NewUnarchiveCampaignRequest(server string, projectID openapi_types.UUID, campaignID openapi_types.UUID) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "projectID", projectID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithOptions("simple", false, "campaignID", campaignID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/api/admin/projects/%s/campaigns/%s/unarchive", pathParam0, pathParam1) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest(http.MethodPost, queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + // NewGetCampaignUsersRequest generates requests for GetCampaignUsers func NewGetCampaignUsersRequest(server string, projectID openapi_types.UUID, campaignID openapi_types.UUID, params *GetCampaignUsersParams) (*http.Request, error) { var err error var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "projectID", runtime.ParamLocationPath, projectID) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "projectID", projectID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "campaignID", runtime.ParamLocationPath, campaignID) + pathParam1, err = runtime.StyleParamWithOptions("simple", false, "campaignID", campaignID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } @@ -7608,19 +8047,21 @@ func NewGetCampaignUsersRequest(server string, projectID openapi_types.UUID, cam } if params != nil { + // queryValues collects non-styled parameters (passthrough, JSON) + // that are safe to round-trip through url.Values.Encode(). queryValues := queryURL.Query() + // rawQueryFragments collects pre-encoded query fragments from + // styled parameters, preserving literal commas as delimiters + // per the OpenAPI spec (e.g. "color=blue,black,brown"). + var rawQueryFragments []string if params.Limit != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "limit", runtime.ParamLocationQuery, *params.Limit); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "limit", *params.Limit, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "integer", Format: ""}); err != nil { return nil, err } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) } } @@ -7628,24 +8069,23 @@ func NewGetCampaignUsersRequest(server string, projectID openapi_types.UUID, cam if params.Offset != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "offset", runtime.ParamLocationQuery, *params.Offset); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "offset", *params.Offset, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "integer", Format: ""}); err != nil { return nil, err } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) } } } - queryURL.RawQuery = queryValues.Encode() + if encoded := queryValues.Encode(); encoded != "" { + rawQueryFragments = append(rawQueryFragments, encoded) + } + queryURL.RawQuery = strings.Join(rawQueryFragments, "&") } - req, err := http.NewRequest("GET", queryURL.String(), nil) + req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil) if err != nil { return nil, err } @@ -7659,7 +8099,7 @@ func NewListDocumentsRequest(server string, projectID openapi_types.UUID, params var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "projectID", runtime.ParamLocationPath, projectID) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "projectID", projectID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } @@ -7680,19 +8120,21 @@ func NewListDocumentsRequest(server string, projectID openapi_types.UUID, params } if params != nil { + // queryValues collects non-styled parameters (passthrough, JSON) + // that are safe to round-trip through url.Values.Encode(). queryValues := queryURL.Query() + // rawQueryFragments collects pre-encoded query fragments from + // styled parameters, preserving literal commas as delimiters + // per the OpenAPI spec (e.g. "color=blue,black,brown"). + var rawQueryFragments []string if params.Limit != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "limit", runtime.ParamLocationQuery, *params.Limit); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "limit", *params.Limit, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "integer", Format: ""}); err != nil { return nil, err } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) } } @@ -7700,24 +8142,23 @@ func NewListDocumentsRequest(server string, projectID openapi_types.UUID, params if params.Offset != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "offset", runtime.ParamLocationQuery, *params.Offset); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "offset", *params.Offset, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "integer", Format: ""}); err != nil { return nil, err } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) } } } - queryURL.RawQuery = queryValues.Encode() + if encoded := queryValues.Encode(); encoded != "" { + rawQueryFragments = append(rawQueryFragments, encoded) + } + queryURL.RawQuery = strings.Join(rawQueryFragments, "&") } - req, err := http.NewRequest("GET", queryURL.String(), nil) + req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil) if err != nil { return nil, err } @@ -7731,7 +8172,7 @@ func NewUploadDocumentsRequestWithBody(server string, projectID openapi_types.UU var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "projectID", runtime.ParamLocationPath, projectID) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "projectID", projectID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } @@ -7751,7 +8192,7 @@ func NewUploadDocumentsRequestWithBody(server string, projectID openapi_types.UU return nil, err } - req, err := http.NewRequest("POST", queryURL.String(), body) + req, err := http.NewRequest(http.MethodPost, queryURL.String(), body) if err != nil { return nil, err } @@ -7767,14 +8208,14 @@ func NewDeleteDocumentRequest(server string, projectID openapi_types.UUID, docum var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "projectID", runtime.ParamLocationPath, projectID) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "projectID", projectID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "documentID", runtime.ParamLocationPath, documentID) + pathParam1, err = runtime.StyleParamWithOptions("simple", false, "documentID", documentID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } @@ -7794,7 +8235,7 @@ func NewDeleteDocumentRequest(server string, projectID openapi_types.UUID, docum return nil, err } - req, err := http.NewRequest("DELETE", queryURL.String(), nil) + req, err := http.NewRequest(http.MethodDelete, queryURL.String(), nil) if err != nil { return nil, err } @@ -7808,14 +8249,14 @@ func NewGetDocumentRequest(server string, projectID openapi_types.UUID, document var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "projectID", runtime.ParamLocationPath, projectID) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "projectID", projectID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "documentID", runtime.ParamLocationPath, documentID) + pathParam1, err = runtime.StyleParamWithOptions("simple", false, "documentID", documentID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } @@ -7835,7 +8276,7 @@ func NewGetDocumentRequest(server string, projectID openapi_types.UUID, document return nil, err } - req, err := http.NewRequest("GET", queryURL.String(), nil) + req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil) if err != nil { return nil, err } @@ -7849,14 +8290,14 @@ func NewGetDocumentMetadataRequest(server string, projectID openapi_types.UUID, var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "projectID", runtime.ParamLocationPath, projectID) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "projectID", projectID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "documentID", runtime.ParamLocationPath, documentID) + pathParam1, err = runtime.StyleParamWithOptions("simple", false, "documentID", documentID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } @@ -7876,7 +8317,7 @@ func NewGetDocumentMetadataRequest(server string, projectID openapi_types.UUID, return nil, err } - req, err := http.NewRequest("GET", queryURL.String(), nil) + req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil) if err != nil { return nil, err } @@ -7890,7 +8331,7 @@ func NewListEmailTemplatesRequest(server string, projectID openapi_types.UUID, p var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "projectID", runtime.ParamLocationPath, projectID) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "projectID", projectID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } @@ -7911,19 +8352,21 @@ func NewListEmailTemplatesRequest(server string, projectID openapi_types.UUID, p } if params != nil { + // queryValues collects non-styled parameters (passthrough, JSON) + // that are safe to round-trip through url.Values.Encode(). queryValues := queryURL.Query() + // rawQueryFragments collects pre-encoded query fragments from + // styled parameters, preserving literal commas as delimiters + // per the OpenAPI spec (e.g. "color=blue,black,brown"). + var rawQueryFragments []string if params.Limit != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "limit", runtime.ParamLocationQuery, *params.Limit); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "limit", *params.Limit, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "integer", Format: ""}); err != nil { return nil, err } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) } } @@ -7931,15 +8374,11 @@ func NewListEmailTemplatesRequest(server string, projectID openapi_types.UUID, p if params.Offset != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "offset", runtime.ParamLocationQuery, *params.Offset); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "offset", *params.Offset, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "integer", Format: ""}); err != nil { return nil, err } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) } } @@ -7947,24 +8386,23 @@ func NewListEmailTemplatesRequest(server string, projectID openapi_types.UUID, p if params.Search != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "search", runtime.ParamLocationQuery, *params.Search); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "search", *params.Search, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { return nil, err } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) } } } - queryURL.RawQuery = queryValues.Encode() + if encoded := queryValues.Encode(); encoded != "" { + rawQueryFragments = append(rawQueryFragments, encoded) + } + queryURL.RawQuery = strings.Join(rawQueryFragments, "&") } - req, err := http.NewRequest("GET", queryURL.String(), nil) + req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil) if err != nil { return nil, err } @@ -7978,7 +8416,7 @@ func NewListJourneysRequest(server string, projectID openapi_types.UUID, params var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "projectID", runtime.ParamLocationPath, projectID) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "projectID", projectID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } @@ -7999,19 +8437,21 @@ func NewListJourneysRequest(server string, projectID openapi_types.UUID, params } if params != nil { + // queryValues collects non-styled parameters (passthrough, JSON) + // that are safe to round-trip through url.Values.Encode(). queryValues := queryURL.Query() + // rawQueryFragments collects pre-encoded query fragments from + // styled parameters, preserving literal commas as delimiters + // per the OpenAPI spec (e.g. "color=blue,black,brown"). + var rawQueryFragments []string if params.Limit != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "limit", runtime.ParamLocationQuery, *params.Limit); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "limit", *params.Limit, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "integer", Format: ""}); err != nil { return nil, err } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) } } @@ -8019,15 +8459,11 @@ func NewListJourneysRequest(server string, projectID openapi_types.UUID, params if params.Offset != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "offset", runtime.ParamLocationQuery, *params.Offset); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "offset", *params.Offset, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "integer", Format: ""}); err != nil { return nil, err } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) } } @@ -8035,24 +8471,35 @@ func NewListJourneysRequest(server string, projectID openapi_types.UUID, params if params.Search != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "search", runtime.ParamLocationQuery, *params.Search); err != nil { + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "search", *params.Search, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + } else { + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) + } + } + + } + + if params.IncludeDeleted != nil { + + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "include_deleted", *params.IncludeDeleted, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "boolean", Format: ""}); err != nil { return nil, err } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) } } } - queryURL.RawQuery = queryValues.Encode() + if encoded := queryValues.Encode(); encoded != "" { + rawQueryFragments = append(rawQueryFragments, encoded) + } + queryURL.RawQuery = strings.Join(rawQueryFragments, "&") } - req, err := http.NewRequest("GET", queryURL.String(), nil) + req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil) if err != nil { return nil, err } @@ -8077,7 +8524,7 @@ func NewCreateJourneyRequestWithBody(server string, projectID openapi_types.UUID var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "projectID", runtime.ParamLocationPath, projectID) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "projectID", projectID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } @@ -8098,28 +8545,33 @@ func NewCreateJourneyRequestWithBody(server string, projectID openapi_types.UUID } if params != nil { + // queryValues collects non-styled parameters (passthrough, JSON) + // that are safe to round-trip through url.Values.Encode(). queryValues := queryURL.Query() + // rawQueryFragments collects pre-encoded query fragments from + // styled parameters, preserving literal commas as delimiters + // per the OpenAPI spec (e.g. "color=blue,black,brown"). + var rawQueryFragments []string if params.Publish != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "publish", runtime.ParamLocationQuery, *params.Publish); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "publish", *params.Publish, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "boolean", Format: ""}); err != nil { return nil, err } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) } } } - queryURL.RawQuery = queryValues.Encode() + if encoded := queryValues.Encode(); encoded != "" { + rawQueryFragments = append(rawQueryFragments, encoded) + } + queryURL.RawQuery = strings.Join(rawQueryFragments, "&") } - req, err := http.NewRequest("POST", queryURL.String(), body) + req, err := http.NewRequest(http.MethodPost, queryURL.String(), body) if err != nil { return nil, err } @@ -8135,14 +8587,14 @@ func NewDeleteJourneyRequest(server string, projectID openapi_types.UUID, journe var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "projectID", runtime.ParamLocationPath, projectID) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "projectID", projectID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "journeyID", runtime.ParamLocationPath, journeyID) + pathParam1, err = runtime.StyleParamWithOptions("simple", false, "journeyID", journeyID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } @@ -8162,7 +8614,7 @@ func NewDeleteJourneyRequest(server string, projectID openapi_types.UUID, journe return nil, err } - req, err := http.NewRequest("DELETE", queryURL.String(), nil) + req, err := http.NewRequest(http.MethodDelete, queryURL.String(), nil) if err != nil { return nil, err } @@ -8176,14 +8628,14 @@ func NewGetJourneyRequest(server string, projectID openapi_types.UUID, journeyID var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "projectID", runtime.ParamLocationPath, projectID) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "projectID", projectID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "journeyID", runtime.ParamLocationPath, journeyID) + pathParam1, err = runtime.StyleParamWithOptions("simple", false, "journeyID", journeyID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } @@ -8203,7 +8655,7 @@ func NewGetJourneyRequest(server string, projectID openapi_types.UUID, journeyID return nil, err } - req, err := http.NewRequest("GET", queryURL.String(), nil) + req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil) if err != nil { return nil, err } @@ -8228,14 +8680,14 @@ func NewUpdateJourneyRequestWithBody(server string, projectID openapi_types.UUID var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "projectID", runtime.ParamLocationPath, projectID) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "projectID", projectID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "journeyID", runtime.ParamLocationPath, journeyID) + pathParam1, err = runtime.StyleParamWithOptions("simple", false, "journeyID", journeyID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } @@ -8255,7 +8707,7 @@ func NewUpdateJourneyRequestWithBody(server string, projectID openapi_types.UUID return nil, err } - req, err := http.NewRequest("PATCH", queryURL.String(), body) + req, err := http.NewRequest(http.MethodPatch, queryURL.String(), body) if err != nil { return nil, err } @@ -8271,14 +8723,14 @@ func NewDuplicateJourneyRequest(server string, projectID openapi_types.UUID, jou var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "projectID", runtime.ParamLocationPath, projectID) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "projectID", projectID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "journeyID", runtime.ParamLocationPath, journeyID) + pathParam1, err = runtime.StyleParamWithOptions("simple", false, "journeyID", journeyID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } @@ -8298,7 +8750,7 @@ func NewDuplicateJourneyRequest(server string, projectID openapi_types.UUID, jou return nil, err } - req, err := http.NewRequest("POST", queryURL.String(), nil) + req, err := http.NewRequest(http.MethodPost, queryURL.String(), nil) if err != nil { return nil, err } @@ -8312,14 +8764,14 @@ func NewPublishJourneyRequest(server string, projectID openapi_types.UUID, journ var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "projectID", runtime.ParamLocationPath, projectID) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "projectID", projectID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "journeyID", runtime.ParamLocationPath, journeyID) + pathParam1, err = runtime.StyleParamWithOptions("simple", false, "journeyID", journeyID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } @@ -8339,7 +8791,7 @@ func NewPublishJourneyRequest(server string, projectID openapi_types.UUID, journ return nil, err } - req, err := http.NewRequest("POST", queryURL.String(), nil) + req, err := http.NewRequest(http.MethodPost, queryURL.String(), nil) if err != nil { return nil, err } @@ -8353,14 +8805,14 @@ func NewGetJourneyStepsRequest(server string, projectID openapi_types.UUID, jour var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "projectID", runtime.ParamLocationPath, projectID) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "projectID", projectID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "journeyID", runtime.ParamLocationPath, journeyID) + pathParam1, err = runtime.StyleParamWithOptions("simple", false, "journeyID", journeyID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } @@ -8380,7 +8832,7 @@ func NewGetJourneyStepsRequest(server string, projectID openapi_types.UUID, jour return nil, err } - req, err := http.NewRequest("GET", queryURL.String(), nil) + req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil) if err != nil { return nil, err } @@ -8405,14 +8857,14 @@ func NewSetJourneyStepsRequestWithBody(server string, projectID openapi_types.UU var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "projectID", runtime.ParamLocationPath, projectID) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "projectID", projectID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "journeyID", runtime.ParamLocationPath, journeyID) + pathParam1, err = runtime.StyleParamWithOptions("simple", false, "journeyID", journeyID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } @@ -8432,7 +8884,7 @@ func NewSetJourneyStepsRequestWithBody(server string, projectID openapi_types.UU return nil, err } - req, err := http.NewRequest("PUT", queryURL.String(), body) + req, err := http.NewRequest(http.MethodPut, queryURL.String(), body) if err != nil { return nil, err } @@ -8442,27 +8894,68 @@ func NewSetJourneyStepsRequestWithBody(server string, projectID openapi_types.UU return req, nil } +// NewUnarchiveJourneyRequest generates requests for UnarchiveJourney +func NewUnarchiveJourneyRequest(server string, projectID openapi_types.UUID, journeyID openapi_types.UUID) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "projectID", projectID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithOptions("simple", false, "journeyID", journeyID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/api/admin/projects/%s/journeys/%s/unarchive", pathParam0, pathParam1) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest(http.MethodPost, queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + // NewCancelUserJourneyRequest generates requests for CancelUserJourney func NewCancelUserJourneyRequest(server string, projectID openapi_types.UUID, journeyID openapi_types.UUID, userID openapi_types.UUID) (*http.Request, error) { var err error var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "projectID", runtime.ParamLocationPath, projectID) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "projectID", projectID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "journeyID", runtime.ParamLocationPath, journeyID) + pathParam1, err = runtime.StyleParamWithOptions("simple", false, "journeyID", journeyID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } var pathParam2 string - pathParam2, err = runtime.StyleParamWithLocation("simple", false, "userID", runtime.ParamLocationPath, userID) + pathParam2, err = runtime.StyleParamWithOptions("simple", false, "userID", userID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } @@ -8482,7 +8975,7 @@ func NewCancelUserJourneyRequest(server string, projectID openapi_types.UUID, jo return nil, err } - req, err := http.NewRequest("DELETE", queryURL.String(), nil) + req, err := http.NewRequest(http.MethodDelete, queryURL.String(), nil) if err != nil { return nil, err } @@ -8496,21 +8989,21 @@ func NewStreamUserJourneyStepsRequest(server string, projectID openapi_types.UUI var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "projectID", runtime.ParamLocationPath, projectID) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "projectID", projectID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "journeyID", runtime.ParamLocationPath, journeyID) + pathParam1, err = runtime.StyleParamWithOptions("simple", false, "journeyID", journeyID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } var pathParam2 string - pathParam2, err = runtime.StyleParamWithLocation("simple", false, "userID", runtime.ParamLocationPath, userID) + pathParam2, err = runtime.StyleParamWithOptions("simple", false, "userID", userID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } @@ -8530,7 +9023,7 @@ func NewStreamUserJourneyStepsRequest(server string, projectID openapi_types.UUI return nil, err } - req, err := http.NewRequest("GET", queryURL.String(), nil) + req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil) if err != nil { return nil, err } @@ -8555,21 +9048,21 @@ func NewTriggerUserRequestWithBody(server string, projectID openapi_types.UUID, var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "projectID", runtime.ParamLocationPath, projectID) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "projectID", projectID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "journeyID", runtime.ParamLocationPath, journeyID) + pathParam1, err = runtime.StyleParamWithOptions("simple", false, "journeyID", journeyID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } var pathParam2 string - pathParam2, err = runtime.StyleParamWithLocation("simple", false, "userID", runtime.ParamLocationPath, userID) + pathParam2, err = runtime.StyleParamWithOptions("simple", false, "userID", userID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } @@ -8589,7 +9082,7 @@ func NewTriggerUserRequestWithBody(server string, projectID openapi_types.UUID, return nil, err } - req, err := http.NewRequest("POST", queryURL.String(), body) + req, err := http.NewRequest(http.MethodPost, queryURL.String(), body) if err != nil { return nil, err } @@ -8616,21 +9109,21 @@ func NewAdvanceUserStepRequestWithBody(server string, projectID openapi_types.UU var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "projectID", runtime.ParamLocationPath, projectID) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "projectID", projectID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "journeyID", runtime.ParamLocationPath, journeyID) + pathParam1, err = runtime.StyleParamWithOptions("simple", false, "journeyID", journeyID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } var pathParam2 string - pathParam2, err = runtime.StyleParamWithLocation("simple", false, "userID", runtime.ParamLocationPath, userID) + pathParam2, err = runtime.StyleParamWithOptions("simple", false, "userID", userID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } @@ -8650,7 +9143,7 @@ func NewAdvanceUserStepRequestWithBody(server string, projectID openapi_types.UU return nil, err } - req, err := http.NewRequest("PUT", queryURL.String(), body) + req, err := http.NewRequest(http.MethodPut, queryURL.String(), body) if err != nil { return nil, err } @@ -8666,21 +9159,21 @@ func NewGetUserJourneyStateRequest(server string, projectID openapi_types.UUID, var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "projectID", runtime.ParamLocationPath, projectID) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "projectID", projectID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "journeyID", runtime.ParamLocationPath, journeyID) + pathParam1, err = runtime.StyleParamWithOptions("simple", false, "journeyID", journeyID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } var pathParam2 string - pathParam2, err = runtime.StyleParamWithLocation("simple", false, "userID", runtime.ParamLocationPath, userID) + pathParam2, err = runtime.StyleParamWithOptions("simple", false, "userID", userID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } @@ -8700,7 +9193,7 @@ func NewGetUserJourneyStateRequest(server string, projectID openapi_types.UUID, return nil, err } - req, err := http.NewRequest("GET", queryURL.String(), nil) + req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil) if err != nil { return nil, err } @@ -8714,14 +9207,14 @@ func NewVersionJourneyRequest(server string, projectID openapi_types.UUID, journ var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "projectID", runtime.ParamLocationPath, projectID) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "projectID", projectID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "journeyID", runtime.ParamLocationPath, journeyID) + pathParam1, err = runtime.StyleParamWithOptions("simple", false, "journeyID", journeyID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } @@ -8741,7 +9234,7 @@ func NewVersionJourneyRequest(server string, projectID openapi_types.UUID, journ return nil, err } - req, err := http.NewRequest("POST", queryURL.String(), nil) + req, err := http.NewRequest(http.MethodPost, queryURL.String(), nil) if err != nil { return nil, err } @@ -8755,7 +9248,7 @@ func NewListApiKeysRequest(server string, projectID openapi_types.UUID, params * var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "projectID", runtime.ParamLocationPath, projectID) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "projectID", projectID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } @@ -8776,19 +9269,21 @@ func NewListApiKeysRequest(server string, projectID openapi_types.UUID, params * } if params != nil { + // queryValues collects non-styled parameters (passthrough, JSON) + // that are safe to round-trip through url.Values.Encode(). queryValues := queryURL.Query() + // rawQueryFragments collects pre-encoded query fragments from + // styled parameters, preserving literal commas as delimiters + // per the OpenAPI spec (e.g. "color=blue,black,brown"). + var rawQueryFragments []string if params.Limit != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "limit", runtime.ParamLocationQuery, *params.Limit); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "limit", *params.Limit, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "integer", Format: ""}); err != nil { return nil, err } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) } } @@ -8796,24 +9291,23 @@ func NewListApiKeysRequest(server string, projectID openapi_types.UUID, params * if params.Offset != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "offset", runtime.ParamLocationQuery, *params.Offset); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "offset", *params.Offset, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "integer", Format: ""}); err != nil { return nil, err } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) } } } - queryURL.RawQuery = queryValues.Encode() + if encoded := queryValues.Encode(); encoded != "" { + rawQueryFragments = append(rawQueryFragments, encoded) + } + queryURL.RawQuery = strings.Join(rawQueryFragments, "&") } - req, err := http.NewRequest("GET", queryURL.String(), nil) + req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil) if err != nil { return nil, err } @@ -8838,7 +9332,7 @@ func NewCreateApiKeyRequestWithBody(server string, projectID openapi_types.UUID, var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "projectID", runtime.ParamLocationPath, projectID) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "projectID", projectID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } @@ -8858,7 +9352,7 @@ func NewCreateApiKeyRequestWithBody(server string, projectID openapi_types.UUID, return nil, err } - req, err := http.NewRequest("POST", queryURL.String(), body) + req, err := http.NewRequest(http.MethodPost, queryURL.String(), body) if err != nil { return nil, err } @@ -8874,14 +9368,14 @@ func NewDeleteApiKeyRequest(server string, projectID openapi_types.UUID, keyID o var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "projectID", runtime.ParamLocationPath, projectID) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "projectID", projectID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "keyID", runtime.ParamLocationPath, keyID) + pathParam1, err = runtime.StyleParamWithOptions("simple", false, "keyID", keyID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } @@ -8901,7 +9395,7 @@ func NewDeleteApiKeyRequest(server string, projectID openapi_types.UUID, keyID o return nil, err } - req, err := http.NewRequest("DELETE", queryURL.String(), nil) + req, err := http.NewRequest(http.MethodDelete, queryURL.String(), nil) if err != nil { return nil, err } @@ -8915,14 +9409,14 @@ func NewGetApiKeyRequest(server string, projectID openapi_types.UUID, keyID open var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "projectID", runtime.ParamLocationPath, projectID) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "projectID", projectID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "keyID", runtime.ParamLocationPath, keyID) + pathParam1, err = runtime.StyleParamWithOptions("simple", false, "keyID", keyID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } @@ -8942,7 +9436,7 @@ func NewGetApiKeyRequest(server string, projectID openapi_types.UUID, keyID open return nil, err } - req, err := http.NewRequest("GET", queryURL.String(), nil) + req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil) if err != nil { return nil, err } @@ -8967,14 +9461,14 @@ func NewUpdateApiKeyRequestWithBody(server string, projectID openapi_types.UUID, var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "projectID", runtime.ParamLocationPath, projectID) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "projectID", projectID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "keyID", runtime.ParamLocationPath, keyID) + pathParam1, err = runtime.StyleParamWithOptions("simple", false, "keyID", keyID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } @@ -8994,7 +9488,7 @@ func NewUpdateApiKeyRequestWithBody(server string, projectID openapi_types.UUID, return nil, err } - req, err := http.NewRequest("PATCH", queryURL.String(), body) + req, err := http.NewRequest(http.MethodPatch, queryURL.String(), body) if err != nil { return nil, err } @@ -9010,7 +9504,7 @@ func NewListListsRequest(server string, projectID openapi_types.UUID, params *Li var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "projectID", runtime.ParamLocationPath, projectID) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "projectID", projectID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } @@ -9031,19 +9525,21 @@ func NewListListsRequest(server string, projectID openapi_types.UUID, params *Li } if params != nil { + // queryValues collects non-styled parameters (passthrough, JSON) + // that are safe to round-trip through url.Values.Encode(). queryValues := queryURL.Query() + // rawQueryFragments collects pre-encoded query fragments from + // styled parameters, preserving literal commas as delimiters + // per the OpenAPI spec (e.g. "color=blue,black,brown"). + var rawQueryFragments []string if params.Limit != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "limit", runtime.ParamLocationQuery, *params.Limit); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "limit", *params.Limit, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "integer", Format: ""}); err != nil { return nil, err } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) } } @@ -9051,15 +9547,11 @@ func NewListListsRequest(server string, projectID openapi_types.UUID, params *Li if params.Offset != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "offset", runtime.ParamLocationQuery, *params.Offset); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "offset", *params.Offset, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "integer", Format: ""}); err != nil { return nil, err } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) } } @@ -9067,25 +9559,36 @@ func NewListListsRequest(server string, projectID openapi_types.UUID, params *Li if params.Search != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "search", runtime.ParamLocationQuery, *params.Search); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "search", *params.Search, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { return nil, err } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) } } } - queryURL.RawQuery = queryValues.Encode() - } + if params.IncludeDeleted != nil { - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "include_deleted", *params.IncludeDeleted, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "boolean", Format: ""}); err != nil { + return nil, err + } else { + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) + } + } + + } + + if encoded := queryValues.Encode(); encoded != "" { + rawQueryFragments = append(rawQueryFragments, encoded) + } + queryURL.RawQuery = strings.Join(rawQueryFragments, "&") + } + + req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil) + if err != nil { return nil, err } @@ -9109,7 +9612,7 @@ func NewCreateListRequestWithBody(server string, projectID openapi_types.UUID, c var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "projectID", runtime.ParamLocationPath, projectID) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "projectID", projectID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } @@ -9129,7 +9632,7 @@ func NewCreateListRequestWithBody(server string, projectID openapi_types.UUID, c return nil, err } - req, err := http.NewRequest("POST", queryURL.String(), body) + req, err := http.NewRequest(http.MethodPost, queryURL.String(), body) if err != nil { return nil, err } @@ -9145,14 +9648,14 @@ func NewDeleteListRequest(server string, projectID openapi_types.UUID, listID op var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "projectID", runtime.ParamLocationPath, projectID) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "projectID", projectID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "listID", runtime.ParamLocationPath, listID) + pathParam1, err = runtime.StyleParamWithOptions("simple", false, "listID", listID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } @@ -9172,7 +9675,7 @@ func NewDeleteListRequest(server string, projectID openapi_types.UUID, listID op return nil, err } - req, err := http.NewRequest("DELETE", queryURL.String(), nil) + req, err := http.NewRequest(http.MethodDelete, queryURL.String(), nil) if err != nil { return nil, err } @@ -9186,14 +9689,14 @@ func NewGetListRequest(server string, projectID openapi_types.UUID, listID opena var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "projectID", runtime.ParamLocationPath, projectID) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "projectID", projectID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "listID", runtime.ParamLocationPath, listID) + pathParam1, err = runtime.StyleParamWithOptions("simple", false, "listID", listID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } @@ -9213,7 +9716,7 @@ func NewGetListRequest(server string, projectID openapi_types.UUID, listID opena return nil, err } - req, err := http.NewRequest("GET", queryURL.String(), nil) + req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil) if err != nil { return nil, err } @@ -9238,14 +9741,14 @@ func NewUpdateListRequestWithBody(server string, projectID openapi_types.UUID, l var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "projectID", runtime.ParamLocationPath, projectID) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "projectID", projectID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "listID", runtime.ParamLocationPath, listID) + pathParam1, err = runtime.StyleParamWithOptions("simple", false, "listID", listID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } @@ -9265,7 +9768,7 @@ func NewUpdateListRequestWithBody(server string, projectID openapi_types.UUID, l return nil, err } - req, err := http.NewRequest("PATCH", queryURL.String(), body) + req, err := http.NewRequest(http.MethodPatch, queryURL.String(), body) if err != nil { return nil, err } @@ -9281,14 +9784,14 @@ func NewDuplicateListRequest(server string, projectID openapi_types.UUID, listID var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "projectID", runtime.ParamLocationPath, projectID) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "projectID", projectID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "listID", runtime.ParamLocationPath, listID) + pathParam1, err = runtime.StyleParamWithOptions("simple", false, "listID", listID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } @@ -9308,7 +9811,48 @@ func NewDuplicateListRequest(server string, projectID openapi_types.UUID, listID return nil, err } - req, err := http.NewRequest("POST", queryURL.String(), nil) + req, err := http.NewRequest(http.MethodPost, queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewUnarchiveListRequest generates requests for UnarchiveList +func NewUnarchiveListRequest(server string, projectID openapi_types.UUID, listID openapi_types.UUID) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "projectID", projectID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithOptions("simple", false, "listID", listID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/api/admin/projects/%s/lists/%s/unarchive", pathParam0, pathParam1) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest(http.MethodPost, queryURL.String(), nil) if err != nil { return nil, err } @@ -9322,14 +9866,14 @@ func NewGetListUsersRequest(server string, projectID openapi_types.UUID, listID var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "projectID", runtime.ParamLocationPath, projectID) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "projectID", projectID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "listID", runtime.ParamLocationPath, listID) + pathParam1, err = runtime.StyleParamWithOptions("simple", false, "listID", listID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } @@ -9350,19 +9894,21 @@ func NewGetListUsersRequest(server string, projectID openapi_types.UUID, listID } if params != nil { + // queryValues collects non-styled parameters (passthrough, JSON) + // that are safe to round-trip through url.Values.Encode(). queryValues := queryURL.Query() + // rawQueryFragments collects pre-encoded query fragments from + // styled parameters, preserving literal commas as delimiters + // per the OpenAPI spec (e.g. "color=blue,black,brown"). + var rawQueryFragments []string if params.Limit != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "limit", runtime.ParamLocationQuery, *params.Limit); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "limit", *params.Limit, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "integer", Format: ""}); err != nil { return nil, err } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) } } @@ -9370,15 +9916,11 @@ func NewGetListUsersRequest(server string, projectID openapi_types.UUID, listID if params.Offset != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "offset", runtime.ParamLocationQuery, *params.Offset); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "offset", *params.Offset, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "integer", Format: ""}); err != nil { return nil, err } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) } } @@ -9386,24 +9928,23 @@ func NewGetListUsersRequest(server string, projectID openapi_types.UUID, listID if params.Search != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "search", runtime.ParamLocationQuery, *params.Search); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "search", *params.Search, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { return nil, err } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) } } } - queryURL.RawQuery = queryValues.Encode() + if encoded := queryValues.Encode(); encoded != "" { + rawQueryFragments = append(rawQueryFragments, encoded) + } + queryURL.RawQuery = strings.Join(rawQueryFragments, "&") } - req, err := http.NewRequest("GET", queryURL.String(), nil) + req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil) if err != nil { return nil, err } @@ -9417,14 +9958,14 @@ func NewPreviewListUsersRequest(server string, projectID openapi_types.UUID, lis var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "projectID", runtime.ParamLocationPath, projectID) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "projectID", projectID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "listID", runtime.ParamLocationPath, listID) + pathParam1, err = runtime.StyleParamWithOptions("simple", false, "listID", listID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } @@ -9445,28 +9986,33 @@ func NewPreviewListUsersRequest(server string, projectID openapi_types.UUID, lis } if params != nil { + // queryValues collects non-styled parameters (passthrough, JSON) + // that are safe to round-trip through url.Values.Encode(). queryValues := queryURL.Query() + // rawQueryFragments collects pre-encoded query fragments from + // styled parameters, preserving literal commas as delimiters + // per the OpenAPI spec (e.g. "color=blue,black,brown"). + var rawQueryFragments []string if params.Limit != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "limit", runtime.ParamLocationQuery, *params.Limit); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "limit", *params.Limit, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "integer", Format: ""}); err != nil { return nil, err } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) } } } - queryURL.RawQuery = queryValues.Encode() + if encoded := queryValues.Encode(); encoded != "" { + rawQueryFragments = append(rawQueryFragments, encoded) + } + queryURL.RawQuery = strings.Join(rawQueryFragments, "&") } - req, err := http.NewRequest("GET", queryURL.String(), nil) + req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil) if err != nil { return nil, err } @@ -9480,14 +10026,14 @@ func NewImportListUsersRequestWithBody(server string, projectID openapi_types.UU var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "projectID", runtime.ParamLocationPath, projectID) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "projectID", projectID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "listID", runtime.ParamLocationPath, listID) + pathParam1, err = runtime.StyleParamWithOptions("simple", false, "listID", listID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } @@ -9507,7 +10053,7 @@ func NewImportListUsersRequestWithBody(server string, projectID openapi_types.UU return nil, err } - req, err := http.NewRequest("POST", queryURL.String(), body) + req, err := http.NewRequest(http.MethodPost, queryURL.String(), body) if err != nil { return nil, err } @@ -9523,7 +10069,7 @@ func NewListLocalesRequest(server string, projectID openapi_types.UUID, params * var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "projectID", runtime.ParamLocationPath, projectID) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "projectID", projectID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } @@ -9544,19 +10090,21 @@ func NewListLocalesRequest(server string, projectID openapi_types.UUID, params * } if params != nil { + // queryValues collects non-styled parameters (passthrough, JSON) + // that are safe to round-trip through url.Values.Encode(). queryValues := queryURL.Query() + // rawQueryFragments collects pre-encoded query fragments from + // styled parameters, preserving literal commas as delimiters + // per the OpenAPI spec (e.g. "color=blue,black,brown"). + var rawQueryFragments []string if params.Limit != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "limit", runtime.ParamLocationQuery, *params.Limit); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "limit", *params.Limit, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "integer", Format: ""}); err != nil { return nil, err } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) } } @@ -9564,24 +10112,23 @@ func NewListLocalesRequest(server string, projectID openapi_types.UUID, params * if params.Offset != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "offset", runtime.ParamLocationQuery, *params.Offset); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "offset", *params.Offset, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "integer", Format: ""}); err != nil { return nil, err } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) } } } - queryURL.RawQuery = queryValues.Encode() + if encoded := queryValues.Encode(); encoded != "" { + rawQueryFragments = append(rawQueryFragments, encoded) + } + queryURL.RawQuery = strings.Join(rawQueryFragments, "&") } - req, err := http.NewRequest("GET", queryURL.String(), nil) + req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil) if err != nil { return nil, err } @@ -9606,7 +10153,7 @@ func NewCreateLocaleRequestWithBody(server string, projectID openapi_types.UUID, var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "projectID", runtime.ParamLocationPath, projectID) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "projectID", projectID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } @@ -9626,7 +10173,7 @@ func NewCreateLocaleRequestWithBody(server string, projectID openapi_types.UUID, return nil, err } - req, err := http.NewRequest("POST", queryURL.String(), body) + req, err := http.NewRequest(http.MethodPost, queryURL.String(), body) if err != nil { return nil, err } @@ -9642,14 +10189,14 @@ func NewDeleteLocaleRequest(server string, projectID openapi_types.UUID, localeI var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "projectID", runtime.ParamLocationPath, projectID) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "projectID", projectID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "localeID", runtime.ParamLocationPath, localeID) + pathParam1, err = runtime.StyleParamWithOptions("simple", false, "localeID", localeID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } @@ -9669,7 +10216,7 @@ func NewDeleteLocaleRequest(server string, projectID openapi_types.UUID, localeI return nil, err } - req, err := http.NewRequest("DELETE", queryURL.String(), nil) + req, err := http.NewRequest(http.MethodDelete, queryURL.String(), nil) if err != nil { return nil, err } @@ -9683,14 +10230,14 @@ func NewGetLocaleRequest(server string, projectID openapi_types.UUID, localeID s var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "projectID", runtime.ParamLocationPath, projectID) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "projectID", projectID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "localeID", runtime.ParamLocationPath, localeID) + pathParam1, err = runtime.StyleParamWithOptions("simple", false, "localeID", localeID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""}) if err != nil { return nil, err } @@ -9710,7 +10257,7 @@ func NewGetLocaleRequest(server string, projectID openapi_types.UUID, localeID s return nil, err } - req, err := http.NewRequest("GET", queryURL.String(), nil) + req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil) if err != nil { return nil, err } @@ -9724,7 +10271,7 @@ func NewListProvidersRequest(server string, projectID openapi_types.UUID, params var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "projectID", runtime.ParamLocationPath, projectID) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "projectID", projectID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } @@ -9745,19 +10292,21 @@ func NewListProvidersRequest(server string, projectID openapi_types.UUID, params } if params != nil { + // queryValues collects non-styled parameters (passthrough, JSON) + // that are safe to round-trip through url.Values.Encode(). queryValues := queryURL.Query() + // rawQueryFragments collects pre-encoded query fragments from + // styled parameters, preserving literal commas as delimiters + // per the OpenAPI spec (e.g. "color=blue,black,brown"). + var rawQueryFragments []string if params.Limit != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "limit", runtime.ParamLocationQuery, *params.Limit); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "limit", *params.Limit, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "integer", Format: ""}); err != nil { return nil, err } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) } } @@ -9765,24 +10314,23 @@ func NewListProvidersRequest(server string, projectID openapi_types.UUID, params if params.Offset != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "offset", runtime.ParamLocationQuery, *params.Offset); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "offset", *params.Offset, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "integer", Format: ""}); err != nil { return nil, err } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) } } } - queryURL.RawQuery = queryValues.Encode() + if encoded := queryValues.Encode(); encoded != "" { + rawQueryFragments = append(rawQueryFragments, encoded) + } + queryURL.RawQuery = strings.Join(rawQueryFragments, "&") } - req, err := http.NewRequest("GET", queryURL.String(), nil) + req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil) if err != nil { return nil, err } @@ -9796,7 +10344,7 @@ func NewListProviderMetaRequest(server string, projectID openapi_types.UUID) (*h var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "projectID", runtime.ParamLocationPath, projectID) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "projectID", projectID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } @@ -9816,7 +10364,7 @@ func NewListProviderMetaRequest(server string, projectID openapi_types.UUID) (*h return nil, err } - req, err := http.NewRequest("GET", queryURL.String(), nil) + req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil) if err != nil { return nil, err } @@ -9830,14 +10378,14 @@ func NewDeleteProviderRequest(server string, projectID openapi_types.UUID, provi var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "projectID", runtime.ParamLocationPath, projectID) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "projectID", projectID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "providerID", runtime.ParamLocationPath, providerID) + pathParam1, err = runtime.StyleParamWithOptions("simple", false, "providerID", providerID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } @@ -9857,7 +10405,7 @@ func NewDeleteProviderRequest(server string, projectID openapi_types.UUID, provi return nil, err } - req, err := http.NewRequest("DELETE", queryURL.String(), nil) + req, err := http.NewRequest(http.MethodDelete, queryURL.String(), nil) if err != nil { return nil, err } @@ -9882,14 +10430,14 @@ func NewCreateProviderRequestWithBody(server string, projectID openapi_types.UUI var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "projectID", runtime.ParamLocationPath, projectID) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "projectID", projectID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "type", runtime.ParamLocationPath, pType) + pathParam1, err = runtime.StyleParamWithOptions("simple", false, "type", pType, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""}) if err != nil { return nil, err } @@ -9909,7 +10457,7 @@ func NewCreateProviderRequestWithBody(server string, projectID openapi_types.UUI return nil, err } - req, err := http.NewRequest("POST", queryURL.String(), body) + req, err := http.NewRequest(http.MethodPost, queryURL.String(), body) if err != nil { return nil, err } @@ -9925,21 +10473,21 @@ func NewGetProviderRequest(server string, projectID openapi_types.UUID, pType st var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "projectID", runtime.ParamLocationPath, projectID) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "projectID", projectID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "type", runtime.ParamLocationPath, pType) + pathParam1, err = runtime.StyleParamWithOptions("simple", false, "type", pType, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""}) if err != nil { return nil, err } var pathParam2 string - pathParam2, err = runtime.StyleParamWithLocation("simple", false, "providerID", runtime.ParamLocationPath, providerID) + pathParam2, err = runtime.StyleParamWithOptions("simple", false, "providerID", providerID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } @@ -9959,7 +10507,7 @@ func NewGetProviderRequest(server string, projectID openapi_types.UUID, pType st return nil, err } - req, err := http.NewRequest("GET", queryURL.String(), nil) + req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil) if err != nil { return nil, err } @@ -9984,21 +10532,21 @@ func NewUpdateProviderRequestWithBody(server string, projectID openapi_types.UUI var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "projectID", runtime.ParamLocationPath, projectID) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "projectID", projectID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "type", runtime.ParamLocationPath, pType) + pathParam1, err = runtime.StyleParamWithOptions("simple", false, "type", pType, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""}) if err != nil { return nil, err } var pathParam2 string - pathParam2, err = runtime.StyleParamWithLocation("simple", false, "providerID", runtime.ParamLocationPath, providerID) + pathParam2, err = runtime.StyleParamWithOptions("simple", false, "providerID", providerID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } @@ -10018,7 +10566,7 @@ func NewUpdateProviderRequestWithBody(server string, projectID openapi_types.UUI return nil, err } - req, err := http.NewRequest("PATCH", queryURL.String(), body) + req, err := http.NewRequest(http.MethodPatch, queryURL.String(), body) if err != nil { return nil, err } @@ -10034,7 +10582,7 @@ func NewListProjectPushProvidersRequest(server string, projectID openapi_types.U var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "projectID", runtime.ParamLocationPath, projectID) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "projectID", projectID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } @@ -10054,7 +10602,7 @@ func NewListProjectPushProvidersRequest(server string, projectID openapi_types.U return nil, err } - req, err := http.NewRequest("GET", queryURL.String(), nil) + req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil) if err != nil { return nil, err } @@ -10068,14 +10616,14 @@ func NewDeleteProjectPushProviderRequest(server string, projectID openapi_types. var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "projectID", runtime.ParamLocationPath, projectID) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "projectID", projectID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "platform", runtime.ParamLocationPath, platform) + pathParam1, err = runtime.StyleParamWithOptions("simple", false, "platform", platform, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""}) if err != nil { return nil, err } @@ -10095,7 +10643,7 @@ func NewDeleteProjectPushProviderRequest(server string, projectID openapi_types. return nil, err } - req, err := http.NewRequest("DELETE", queryURL.String(), nil) + req, err := http.NewRequest(http.MethodDelete, queryURL.String(), nil) if err != nil { return nil, err } @@ -10120,14 +10668,14 @@ func NewUpsertProjectPushProviderRequestWithBody(server string, projectID openap var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "projectID", runtime.ParamLocationPath, projectID) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "projectID", projectID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "platform", runtime.ParamLocationPath, platform) + pathParam1, err = runtime.StyleParamWithOptions("simple", false, "platform", platform, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""}) if err != nil { return nil, err } @@ -10147,7 +10695,7 @@ func NewUpsertProjectPushProviderRequestWithBody(server string, projectID openap return nil, err } - req, err := http.NewRequest("PUT", queryURL.String(), body) + req, err := http.NewRequest(http.MethodPut, queryURL.String(), body) if err != nil { return nil, err } @@ -10163,7 +10711,7 @@ func NewListSenderIdentitiesRequest(server string, projectID openapi_types.UUID, var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "projectID", runtime.ParamLocationPath, projectID) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "projectID", projectID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } @@ -10184,19 +10732,21 @@ func NewListSenderIdentitiesRequest(server string, projectID openapi_types.UUID, } if params != nil { + // queryValues collects non-styled parameters (passthrough, JSON) + // that are safe to round-trip through url.Values.Encode(). queryValues := queryURL.Query() + // rawQueryFragments collects pre-encoded query fragments from + // styled parameters, preserving literal commas as delimiters + // per the OpenAPI spec (e.g. "color=blue,black,brown"). + var rawQueryFragments []string if params.ProviderId != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "provider_id", runtime.ParamLocationQuery, *params.ProviderId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "provider_id", *params.ProviderId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: "uuid"}); err != nil { return nil, err } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) } } @@ -10204,15 +10754,11 @@ func NewListSenderIdentitiesRequest(server string, projectID openapi_types.UUID, if params.Channel != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "channel", runtime.ParamLocationQuery, *params.Channel); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "channel", *params.Channel, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { return nil, err } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) } } @@ -10220,15 +10766,11 @@ func NewListSenderIdentitiesRequest(server string, projectID openapi_types.UUID, if params.Limit != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "limit", runtime.ParamLocationQuery, *params.Limit); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "limit", *params.Limit, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "integer", Format: ""}); err != nil { return nil, err } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) } } @@ -10236,24 +10778,23 @@ func NewListSenderIdentitiesRequest(server string, projectID openapi_types.UUID, if params.Offset != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "offset", runtime.ParamLocationQuery, *params.Offset); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "offset", *params.Offset, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "integer", Format: ""}); err != nil { return nil, err } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) } } } - queryURL.RawQuery = queryValues.Encode() + if encoded := queryValues.Encode(); encoded != "" { + rawQueryFragments = append(rawQueryFragments, encoded) + } + queryURL.RawQuery = strings.Join(rawQueryFragments, "&") } - req, err := http.NewRequest("GET", queryURL.String(), nil) + req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil) if err != nil { return nil, err } @@ -10278,7 +10819,7 @@ func NewCreateSenderIdentityRequestWithBody(server string, projectID openapi_typ var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "projectID", runtime.ParamLocationPath, projectID) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "projectID", projectID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } @@ -10298,7 +10839,7 @@ func NewCreateSenderIdentityRequestWithBody(server string, projectID openapi_typ return nil, err } - req, err := http.NewRequest("POST", queryURL.String(), body) + req, err := http.NewRequest(http.MethodPost, queryURL.String(), body) if err != nil { return nil, err } @@ -10314,14 +10855,14 @@ func NewDeleteSenderIdentityRequest(server string, projectID openapi_types.UUID, var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "projectID", runtime.ParamLocationPath, projectID) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "projectID", projectID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "senderIdentityID", runtime.ParamLocationPath, senderIdentityID) + pathParam1, err = runtime.StyleParamWithOptions("simple", false, "senderIdentityID", senderIdentityID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } @@ -10341,7 +10882,7 @@ func NewDeleteSenderIdentityRequest(server string, projectID openapi_types.UUID, return nil, err } - req, err := http.NewRequest("DELETE", queryURL.String(), nil) + req, err := http.NewRequest(http.MethodDelete, queryURL.String(), nil) if err != nil { return nil, err } @@ -10355,14 +10896,14 @@ func NewGetSenderIdentityRequest(server string, projectID openapi_types.UUID, se var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "projectID", runtime.ParamLocationPath, projectID) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "projectID", projectID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "senderIdentityID", runtime.ParamLocationPath, senderIdentityID) + pathParam1, err = runtime.StyleParamWithOptions("simple", false, "senderIdentityID", senderIdentityID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } @@ -10382,7 +10923,7 @@ func NewGetSenderIdentityRequest(server string, projectID openapi_types.UUID, se return nil, err } - req, err := http.NewRequest("GET", queryURL.String(), nil) + req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil) if err != nil { return nil, err } @@ -10396,7 +10937,7 @@ func NewListOrganizationEventSchemasRequest(server string, projectID openapi_typ var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "projectID", runtime.ParamLocationPath, projectID) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "projectID", projectID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } @@ -10416,7 +10957,7 @@ func NewListOrganizationEventSchemasRequest(server string, projectID openapi_typ return nil, err } - req, err := http.NewRequest("GET", queryURL.String(), nil) + req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil) if err != nil { return nil, err } @@ -10430,14 +10971,14 @@ func NewDeleteOrganizationEventSchemaRequest(server string, projectID openapi_ty var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "projectID", runtime.ParamLocationPath, projectID) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "projectID", projectID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "eventID", runtime.ParamLocationPath, eventID) + pathParam1, err = runtime.StyleParamWithOptions("simple", false, "eventID", eventID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } @@ -10457,7 +10998,7 @@ func NewDeleteOrganizationEventSchemaRequest(server string, projectID openapi_ty return nil, err } - req, err := http.NewRequest("DELETE", queryURL.String(), nil) + req, err := http.NewRequest(http.MethodDelete, queryURL.String(), nil) if err != nil { return nil, err } @@ -10471,7 +11012,7 @@ func NewListOrganizationsRequest(server string, projectID openapi_types.UUID, pa var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "projectID", runtime.ParamLocationPath, projectID) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "projectID", projectID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } @@ -10492,19 +11033,21 @@ func NewListOrganizationsRequest(server string, projectID openapi_types.UUID, pa } if params != nil { + // queryValues collects non-styled parameters (passthrough, JSON) + // that are safe to round-trip through url.Values.Encode(). queryValues := queryURL.Query() + // rawQueryFragments collects pre-encoded query fragments from + // styled parameters, preserving literal commas as delimiters + // per the OpenAPI spec (e.g. "color=blue,black,brown"). + var rawQueryFragments []string if params.Limit != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "limit", runtime.ParamLocationQuery, *params.Limit); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "limit", *params.Limit, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "integer", Format: ""}); err != nil { return nil, err } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) } } @@ -10512,15 +11055,11 @@ func NewListOrganizationsRequest(server string, projectID openapi_types.UUID, pa if params.Offset != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "offset", runtime.ParamLocationQuery, *params.Offset); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "offset", *params.Offset, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "integer", Format: ""}); err != nil { return nil, err } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) } } @@ -10528,24 +11067,23 @@ func NewListOrganizationsRequest(server string, projectID openapi_types.UUID, pa if params.Search != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "search", runtime.ParamLocationQuery, *params.Search); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "search", *params.Search, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { return nil, err } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) } } } - queryURL.RawQuery = queryValues.Encode() + if encoded := queryValues.Encode(); encoded != "" { + rawQueryFragments = append(rawQueryFragments, encoded) + } + queryURL.RawQuery = strings.Join(rawQueryFragments, "&") } - req, err := http.NewRequest("GET", queryURL.String(), nil) + req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil) if err != nil { return nil, err } @@ -10570,7 +11108,7 @@ func NewUpsertOrganizationRequestWithBody(server string, projectID openapi_types var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "projectID", runtime.ParamLocationPath, projectID) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "projectID", projectID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } @@ -10590,7 +11128,7 @@ func NewUpsertOrganizationRequestWithBody(server string, projectID openapi_types return nil, err } - req, err := http.NewRequest("POST", queryURL.String(), body) + req, err := http.NewRequest(http.MethodPost, queryURL.String(), body) if err != nil { return nil, err } @@ -10606,7 +11144,7 @@ func NewListOrganizationSchemasRequest(server string, projectID openapi_types.UU var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "projectID", runtime.ParamLocationPath, projectID) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "projectID", projectID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } @@ -10626,7 +11164,7 @@ func NewListOrganizationSchemasRequest(server string, projectID openapi_types.UU return nil, err } - req, err := http.NewRequest("GET", queryURL.String(), nil) + req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil) if err != nil { return nil, err } @@ -10640,7 +11178,7 @@ func NewListOrganizationMemberSchemasRequest(server string, projectID openapi_ty var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "projectID", runtime.ParamLocationPath, projectID) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "projectID", projectID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } @@ -10660,7 +11198,7 @@ func NewListOrganizationMemberSchemasRequest(server string, projectID openapi_ty return nil, err } - req, err := http.NewRequest("GET", queryURL.String(), nil) + req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil) if err != nil { return nil, err } @@ -10674,14 +11212,14 @@ func NewDeleteOrganizationRequest(server string, projectID openapi_types.UUID, o var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "projectID", runtime.ParamLocationPath, projectID) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "projectID", projectID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "organizationID", runtime.ParamLocationPath, organizationID) + pathParam1, err = runtime.StyleParamWithOptions("simple", false, "organizationID", organizationID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } @@ -10701,7 +11239,7 @@ func NewDeleteOrganizationRequest(server string, projectID openapi_types.UUID, o return nil, err } - req, err := http.NewRequest("DELETE", queryURL.String(), nil) + req, err := http.NewRequest(http.MethodDelete, queryURL.String(), nil) if err != nil { return nil, err } @@ -10715,14 +11253,14 @@ func NewGetOrganizationRequest(server string, projectID openapi_types.UUID, orga var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "projectID", runtime.ParamLocationPath, projectID) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "projectID", projectID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "organizationID", runtime.ParamLocationPath, organizationID) + pathParam1, err = runtime.StyleParamWithOptions("simple", false, "organizationID", organizationID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } @@ -10742,7 +11280,7 @@ func NewGetOrganizationRequest(server string, projectID openapi_types.UUID, orga return nil, err } - req, err := http.NewRequest("GET", queryURL.String(), nil) + req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil) if err != nil { return nil, err } @@ -10767,14 +11305,14 @@ func NewUpdateOrganizationRequestWithBody(server string, projectID openapi_types var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "projectID", runtime.ParamLocationPath, projectID) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "projectID", projectID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "organizationID", runtime.ParamLocationPath, organizationID) + pathParam1, err = runtime.StyleParamWithOptions("simple", false, "organizationID", organizationID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } @@ -10794,7 +11332,7 @@ func NewUpdateOrganizationRequestWithBody(server string, projectID openapi_types return nil, err } - req, err := http.NewRequest("PATCH", queryURL.String(), body) + req, err := http.NewRequest(http.MethodPatch, queryURL.String(), body) if err != nil { return nil, err } @@ -10810,14 +11348,14 @@ func NewGetOrganizationEventsRequest(server string, projectID openapi_types.UUID var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "projectID", runtime.ParamLocationPath, projectID) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "projectID", projectID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "organizationID", runtime.ParamLocationPath, organizationID) + pathParam1, err = runtime.StyleParamWithOptions("simple", false, "organizationID", organizationID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } @@ -10838,19 +11376,21 @@ func NewGetOrganizationEventsRequest(server string, projectID openapi_types.UUID } if params != nil { + // queryValues collects non-styled parameters (passthrough, JSON) + // that are safe to round-trip through url.Values.Encode(). queryValues := queryURL.Query() + // rawQueryFragments collects pre-encoded query fragments from + // styled parameters, preserving literal commas as delimiters + // per the OpenAPI spec (e.g. "color=blue,black,brown"). + var rawQueryFragments []string if params.Limit != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "limit", runtime.ParamLocationQuery, *params.Limit); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "limit", *params.Limit, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "integer", Format: ""}); err != nil { return nil, err } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) } } @@ -10858,15 +11398,11 @@ func NewGetOrganizationEventsRequest(server string, projectID openapi_types.UUID if params.Offset != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "offset", runtime.ParamLocationQuery, *params.Offset); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "offset", *params.Offset, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "integer", Format: ""}); err != nil { return nil, err } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) } } @@ -10874,24 +11410,23 @@ func NewGetOrganizationEventsRequest(server string, projectID openapi_types.UUID if params.Search != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "search", runtime.ParamLocationQuery, *params.Search); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "search", *params.Search, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { return nil, err } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) } } } - queryURL.RawQuery = queryValues.Encode() + if encoded := queryValues.Encode(); encoded != "" { + rawQueryFragments = append(rawQueryFragments, encoded) + } + queryURL.RawQuery = strings.Join(rawQueryFragments, "&") } - req, err := http.NewRequest("GET", queryURL.String(), nil) + req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil) if err != nil { return nil, err } @@ -10916,14 +11451,14 @@ func NewCreateOrganizationEventRequestWithBody(server string, projectID openapi_ var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "projectID", runtime.ParamLocationPath, projectID) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "projectID", projectID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "organizationID", runtime.ParamLocationPath, organizationID) + pathParam1, err = runtime.StyleParamWithOptions("simple", false, "organizationID", organizationID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } @@ -10943,7 +11478,7 @@ func NewCreateOrganizationEventRequestWithBody(server string, projectID openapi_ return nil, err } - req, err := http.NewRequest("POST", queryURL.String(), body) + req, err := http.NewRequest(http.MethodPost, queryURL.String(), body) if err != nil { return nil, err } @@ -10959,21 +11494,21 @@ func NewDeleteOrganizationExternalIDRequest(server string, projectID openapi_typ var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "projectID", runtime.ParamLocationPath, projectID) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "projectID", projectID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "organizationID", runtime.ParamLocationPath, organizationID) + pathParam1, err = runtime.StyleParamWithOptions("simple", false, "organizationID", organizationID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } var pathParam2 string - pathParam2, err = runtime.StyleParamWithLocation("simple", false, "identifierID", runtime.ParamLocationPath, identifierID) + pathParam2, err = runtime.StyleParamWithOptions("simple", false, "identifierID", identifierID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } @@ -10993,7 +11528,7 @@ func NewDeleteOrganizationExternalIDRequest(server string, projectID openapi_typ return nil, err } - req, err := http.NewRequest("DELETE", queryURL.String(), nil) + req, err := http.NewRequest(http.MethodDelete, queryURL.String(), nil) if err != nil { return nil, err } @@ -11007,14 +11542,14 @@ func NewGetOrganizationScheduledRequest(server string, projectID openapi_types.U var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "projectID", runtime.ParamLocationPath, projectID) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "projectID", projectID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "organizationID", runtime.ParamLocationPath, organizationID) + pathParam1, err = runtime.StyleParamWithOptions("simple", false, "organizationID", organizationID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } @@ -11035,19 +11570,21 @@ func NewGetOrganizationScheduledRequest(server string, projectID openapi_types.U } if params != nil { + // queryValues collects non-styled parameters (passthrough, JSON) + // that are safe to round-trip through url.Values.Encode(). queryValues := queryURL.Query() + // rawQueryFragments collects pre-encoded query fragments from + // styled parameters, preserving literal commas as delimiters + // per the OpenAPI spec (e.g. "color=blue,black,brown"). + var rawQueryFragments []string if params.Limit != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "limit", runtime.ParamLocationQuery, *params.Limit); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "limit", *params.Limit, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "integer", Format: ""}); err != nil { return nil, err } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) } } @@ -11055,24 +11592,23 @@ func NewGetOrganizationScheduledRequest(server string, projectID openapi_types.U if params.Offset != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "offset", runtime.ParamLocationQuery, *params.Offset); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "offset", *params.Offset, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "integer", Format: ""}); err != nil { return nil, err } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) } } } - queryURL.RawQuery = queryValues.Encode() + if encoded := queryValues.Encode(); encoded != "" { + rawQueryFragments = append(rawQueryFragments, encoded) + } + queryURL.RawQuery = strings.Join(rawQueryFragments, "&") } - req, err := http.NewRequest("GET", queryURL.String(), nil) + req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil) if err != nil { return nil, err } @@ -11097,14 +11633,14 @@ func NewUpsertOrganizationScheduledRequestWithBody(server string, projectID open var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "projectID", runtime.ParamLocationPath, projectID) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "projectID", projectID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "organizationID", runtime.ParamLocationPath, organizationID) + pathParam1, err = runtime.StyleParamWithOptions("simple", false, "organizationID", organizationID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } @@ -11124,7 +11660,7 @@ func NewUpsertOrganizationScheduledRequestWithBody(server string, projectID open return nil, err } - req, err := http.NewRequest("PUT", queryURL.String(), body) + req, err := http.NewRequest(http.MethodPut, queryURL.String(), body) if err != nil { return nil, err } @@ -11140,21 +11676,21 @@ func NewDeleteOrganizationScheduledRequest(server string, projectID openapi_type var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "projectID", runtime.ParamLocationPath, projectID) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "projectID", projectID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "organizationID", runtime.ParamLocationPath, organizationID) + pathParam1, err = runtime.StyleParamWithOptions("simple", false, "organizationID", organizationID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } var pathParam2 string - pathParam2, err = runtime.StyleParamWithLocation("simple", false, "scheduledInstanceID", runtime.ParamLocationPath, scheduledInstanceID) + pathParam2, err = runtime.StyleParamWithOptions("simple", false, "scheduledInstanceID", scheduledInstanceID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } @@ -11174,7 +11710,7 @@ func NewDeleteOrganizationScheduledRequest(server string, projectID openapi_type return nil, err } - req, err := http.NewRequest("DELETE", queryURL.String(), nil) + req, err := http.NewRequest(http.MethodDelete, queryURL.String(), nil) if err != nil { return nil, err } @@ -11199,21 +11735,21 @@ func NewUpdateOrganizationScheduledRequestWithBody(server string, projectID open var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "projectID", runtime.ParamLocationPath, projectID) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "projectID", projectID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "organizationID", runtime.ParamLocationPath, organizationID) + pathParam1, err = runtime.StyleParamWithOptions("simple", false, "organizationID", organizationID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } var pathParam2 string - pathParam2, err = runtime.StyleParamWithLocation("simple", false, "scheduledInstanceID", runtime.ParamLocationPath, scheduledInstanceID) + pathParam2, err = runtime.StyleParamWithOptions("simple", false, "scheduledInstanceID", scheduledInstanceID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } @@ -11233,7 +11769,7 @@ func NewUpdateOrganizationScheduledRequestWithBody(server string, projectID open return nil, err } - req, err := http.NewRequest("PATCH", queryURL.String(), body) + req, err := http.NewRequest(http.MethodPatch, queryURL.String(), body) if err != nil { return nil, err } @@ -11249,14 +11785,14 @@ func NewListOrganizationMembersRequest(server string, projectID openapi_types.UU var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "projectID", runtime.ParamLocationPath, projectID) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "projectID", projectID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "organizationID", runtime.ParamLocationPath, organizationID) + pathParam1, err = runtime.StyleParamWithOptions("simple", false, "organizationID", organizationID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } @@ -11277,19 +11813,21 @@ func NewListOrganizationMembersRequest(server string, projectID openapi_types.UU } if params != nil { + // queryValues collects non-styled parameters (passthrough, JSON) + // that are safe to round-trip through url.Values.Encode(). queryValues := queryURL.Query() + // rawQueryFragments collects pre-encoded query fragments from + // styled parameters, preserving literal commas as delimiters + // per the OpenAPI spec (e.g. "color=blue,black,brown"). + var rawQueryFragments []string if params.Limit != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "limit", runtime.ParamLocationQuery, *params.Limit); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "limit", *params.Limit, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "integer", Format: ""}); err != nil { return nil, err } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) } } @@ -11297,24 +11835,23 @@ func NewListOrganizationMembersRequest(server string, projectID openapi_types.UU if params.Offset != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "offset", runtime.ParamLocationQuery, *params.Offset); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "offset", *params.Offset, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "integer", Format: ""}); err != nil { return nil, err } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) } } } - queryURL.RawQuery = queryValues.Encode() + if encoded := queryValues.Encode(); encoded != "" { + rawQueryFragments = append(rawQueryFragments, encoded) + } + queryURL.RawQuery = strings.Join(rawQueryFragments, "&") } - req, err := http.NewRequest("GET", queryURL.String(), nil) + req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil) if err != nil { return nil, err } @@ -11339,14 +11876,14 @@ func NewAddOrganizationMemberRequestWithBody(server string, projectID openapi_ty var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "projectID", runtime.ParamLocationPath, projectID) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "projectID", projectID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "organizationID", runtime.ParamLocationPath, organizationID) + pathParam1, err = runtime.StyleParamWithOptions("simple", false, "organizationID", organizationID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } @@ -11366,7 +11903,7 @@ func NewAddOrganizationMemberRequestWithBody(server string, projectID openapi_ty return nil, err } - req, err := http.NewRequest("POST", queryURL.String(), body) + req, err := http.NewRequest(http.MethodPost, queryURL.String(), body) if err != nil { return nil, err } @@ -11382,21 +11919,21 @@ func NewRemoveOrganizationMemberRequest(server string, projectID openapi_types.U var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "projectID", runtime.ParamLocationPath, projectID) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "projectID", projectID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "organizationID", runtime.ParamLocationPath, organizationID) + pathParam1, err = runtime.StyleParamWithOptions("simple", false, "organizationID", organizationID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } var pathParam2 string - pathParam2, err = runtime.StyleParamWithLocation("simple", false, "userID", runtime.ParamLocationPath, userID) + pathParam2, err = runtime.StyleParamWithOptions("simple", false, "userID", userID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } @@ -11416,7 +11953,7 @@ func NewRemoveOrganizationMemberRequest(server string, projectID openapi_types.U return nil, err } - req, err := http.NewRequest("DELETE", queryURL.String(), nil) + req, err := http.NewRequest(http.MethodDelete, queryURL.String(), nil) if err != nil { return nil, err } @@ -11430,7 +11967,7 @@ func NewListUserEventSchemasRequest(server string, projectID openapi_types.UUID) var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "projectID", runtime.ParamLocationPath, projectID) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "projectID", projectID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } @@ -11450,7 +11987,7 @@ func NewListUserEventSchemasRequest(server string, projectID openapi_types.UUID) return nil, err } - req, err := http.NewRequest("GET", queryURL.String(), nil) + req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil) if err != nil { return nil, err } @@ -11464,14 +12001,14 @@ func NewDeleteUserEventSchemaRequest(server string, projectID openapi_types.UUID var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "projectID", runtime.ParamLocationPath, projectID) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "projectID", projectID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "eventID", runtime.ParamLocationPath, eventID) + pathParam1, err = runtime.StyleParamWithOptions("simple", false, "eventID", eventID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } @@ -11491,7 +12028,7 @@ func NewDeleteUserEventSchemaRequest(server string, projectID openapi_types.UUID return nil, err } - req, err := http.NewRequest("DELETE", queryURL.String(), nil) + req, err := http.NewRequest(http.MethodDelete, queryURL.String(), nil) if err != nil { return nil, err } @@ -11505,7 +12042,7 @@ func NewListScheduledSchemasRequest(server string, projectID openapi_types.UUID) var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "projectID", runtime.ParamLocationPath, projectID) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "projectID", projectID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } @@ -11525,7 +12062,7 @@ func NewListScheduledSchemasRequest(server string, projectID openapi_types.UUID) return nil, err } - req, err := http.NewRequest("GET", queryURL.String(), nil) + req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil) if err != nil { return nil, err } @@ -11539,14 +12076,14 @@ func NewDeleteScheduledSchemaRequest(server string, projectID openapi_types.UUID var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "projectID", runtime.ParamLocationPath, projectID) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "projectID", projectID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "scheduledID", runtime.ParamLocationPath, scheduledID) + pathParam1, err = runtime.StyleParamWithOptions("simple", false, "scheduledID", scheduledID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } @@ -11566,7 +12103,7 @@ func NewDeleteScheduledSchemaRequest(server string, projectID openapi_types.UUID return nil, err } - req, err := http.NewRequest("DELETE", queryURL.String(), nil) + req, err := http.NewRequest(http.MethodDelete, queryURL.String(), nil) if err != nil { return nil, err } @@ -11591,14 +12128,14 @@ func NewCreateScheduleOffsetRequestWithBody(server string, projectID openapi_typ var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "projectID", runtime.ParamLocationPath, projectID) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "projectID", projectID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "scheduledID", runtime.ParamLocationPath, scheduledID) + pathParam1, err = runtime.StyleParamWithOptions("simple", false, "scheduledID", scheduledID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } @@ -11618,7 +12155,7 @@ func NewCreateScheduleOffsetRequestWithBody(server string, projectID openapi_typ return nil, err } - req, err := http.NewRequest("POST", queryURL.String(), body) + req, err := http.NewRequest(http.MethodPost, queryURL.String(), body) if err != nil { return nil, err } @@ -11634,7 +12171,7 @@ func NewListUsersRequest(server string, projectID openapi_types.UUID, params *Li var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "projectID", runtime.ParamLocationPath, projectID) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "projectID", projectID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } @@ -11655,19 +12192,21 @@ func NewListUsersRequest(server string, projectID openapi_types.UUID, params *Li } if params != nil { + // queryValues collects non-styled parameters (passthrough, JSON) + // that are safe to round-trip through url.Values.Encode(). queryValues := queryURL.Query() + // rawQueryFragments collects pre-encoded query fragments from + // styled parameters, preserving literal commas as delimiters + // per the OpenAPI spec (e.g. "color=blue,black,brown"). + var rawQueryFragments []string if params.Limit != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "limit", runtime.ParamLocationQuery, *params.Limit); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "limit", *params.Limit, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "integer", Format: ""}); err != nil { return nil, err } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) } } @@ -11675,15 +12214,11 @@ func NewListUsersRequest(server string, projectID openapi_types.UUID, params *Li if params.Offset != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "offset", runtime.ParamLocationQuery, *params.Offset); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "offset", *params.Offset, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "integer", Format: ""}); err != nil { return nil, err } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) } } @@ -11691,24 +12226,23 @@ func NewListUsersRequest(server string, projectID openapi_types.UUID, params *Li if params.Search != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "search", runtime.ParamLocationQuery, *params.Search); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "search", *params.Search, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { return nil, err } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) } } } - queryURL.RawQuery = queryValues.Encode() + if encoded := queryValues.Encode(); encoded != "" { + rawQueryFragments = append(rawQueryFragments, encoded) + } + queryURL.RawQuery = strings.Join(rawQueryFragments, "&") } - req, err := http.NewRequest("GET", queryURL.String(), nil) + req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil) if err != nil { return nil, err } @@ -11733,7 +12267,7 @@ func NewIdentifyUserRequestWithBody(server string, projectID openapi_types.UUID, var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "projectID", runtime.ParamLocationPath, projectID) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "projectID", projectID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } @@ -11753,7 +12287,7 @@ func NewIdentifyUserRequestWithBody(server string, projectID openapi_types.UUID, return nil, err } - req, err := http.NewRequest("POST", queryURL.String(), body) + req, err := http.NewRequest(http.MethodPost, queryURL.String(), body) if err != nil { return nil, err } @@ -11769,7 +12303,7 @@ func NewImportUsersRequestWithBody(server string, projectID openapi_types.UUID, var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "projectID", runtime.ParamLocationPath, projectID) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "projectID", projectID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } @@ -11789,7 +12323,7 @@ func NewImportUsersRequestWithBody(server string, projectID openapi_types.UUID, return nil, err } - req, err := http.NewRequest("POST", queryURL.String(), body) + req, err := http.NewRequest(http.MethodPost, queryURL.String(), body) if err != nil { return nil, err } @@ -11805,7 +12339,7 @@ func NewListUserSchemasRequest(server string, projectID openapi_types.UUID) (*ht var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "projectID", runtime.ParamLocationPath, projectID) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "projectID", projectID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } @@ -11825,7 +12359,7 @@ func NewListUserSchemasRequest(server string, projectID openapi_types.UUID) (*ht return nil, err } - req, err := http.NewRequest("GET", queryURL.String(), nil) + req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil) if err != nil { return nil, err } @@ -11839,14 +12373,14 @@ func NewDeleteUserRequest(server string, projectID openapi_types.UUID, userID op var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "projectID", runtime.ParamLocationPath, projectID) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "projectID", projectID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "userID", runtime.ParamLocationPath, userID) + pathParam1, err = runtime.StyleParamWithOptions("simple", false, "userID", userID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } @@ -11866,7 +12400,7 @@ func NewDeleteUserRequest(server string, projectID openapi_types.UUID, userID op return nil, err } - req, err := http.NewRequest("DELETE", queryURL.String(), nil) + req, err := http.NewRequest(http.MethodDelete, queryURL.String(), nil) if err != nil { return nil, err } @@ -11880,14 +12414,14 @@ func NewGetUserRequest(server string, projectID openapi_types.UUID, userID opena var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "projectID", runtime.ParamLocationPath, projectID) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "projectID", projectID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "userID", runtime.ParamLocationPath, userID) + pathParam1, err = runtime.StyleParamWithOptions("simple", false, "userID", userID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } @@ -11907,7 +12441,7 @@ func NewGetUserRequest(server string, projectID openapi_types.UUID, userID opena return nil, err } - req, err := http.NewRequest("GET", queryURL.String(), nil) + req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil) if err != nil { return nil, err } @@ -11932,14 +12466,14 @@ func NewUpdateUserRequestWithBody(server string, projectID openapi_types.UUID, u var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "projectID", runtime.ParamLocationPath, projectID) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "projectID", projectID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "userID", runtime.ParamLocationPath, userID) + pathParam1, err = runtime.StyleParamWithOptions("simple", false, "userID", userID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } @@ -11959,7 +12493,7 @@ func NewUpdateUserRequestWithBody(server string, projectID openapi_types.UUID, u return nil, err } - req, err := http.NewRequest("PATCH", queryURL.String(), body) + req, err := http.NewRequest(http.MethodPatch, queryURL.String(), body) if err != nil { return nil, err } @@ -11975,14 +12509,14 @@ func NewGetUserDevicesRequest(server string, projectID openapi_types.UUID, userI var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "projectID", runtime.ParamLocationPath, projectID) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "projectID", projectID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "userID", runtime.ParamLocationPath, userID) + pathParam1, err = runtime.StyleParamWithOptions("simple", false, "userID", userID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } @@ -12002,7 +12536,7 @@ func NewGetUserDevicesRequest(server string, projectID openapi_types.UUID, userI return nil, err } - req, err := http.NewRequest("GET", queryURL.String(), nil) + req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil) if err != nil { return nil, err } @@ -12027,14 +12561,14 @@ func NewCreateUserDeviceRequestWithBody(server string, projectID openapi_types.U var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "projectID", runtime.ParamLocationPath, projectID) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "projectID", projectID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "userID", runtime.ParamLocationPath, userID) + pathParam1, err = runtime.StyleParamWithOptions("simple", false, "userID", userID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } @@ -12054,7 +12588,7 @@ func NewCreateUserDeviceRequestWithBody(server string, projectID openapi_types.U return nil, err } - req, err := http.NewRequest("POST", queryURL.String(), body) + req, err := http.NewRequest(http.MethodPost, queryURL.String(), body) if err != nil { return nil, err } @@ -12070,21 +12604,21 @@ func NewDeleteUserDeviceRequest(server string, projectID openapi_types.UUID, use var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "projectID", runtime.ParamLocationPath, projectID) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "projectID", projectID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "userID", runtime.ParamLocationPath, userID) + pathParam1, err = runtime.StyleParamWithOptions("simple", false, "userID", userID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } var pathParam2 string - pathParam2, err = runtime.StyleParamWithLocation("simple", false, "deviceID", runtime.ParamLocationPath, deviceID) + pathParam2, err = runtime.StyleParamWithOptions("simple", false, "deviceID", deviceID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } @@ -12104,7 +12638,7 @@ func NewDeleteUserDeviceRequest(server string, projectID openapi_types.UUID, use return nil, err } - req, err := http.NewRequest("DELETE", queryURL.String(), nil) + req, err := http.NewRequest(http.MethodDelete, queryURL.String(), nil) if err != nil { return nil, err } @@ -12118,14 +12652,14 @@ func NewGetUserEventsRequest(server string, projectID openapi_types.UUID, userID var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "projectID", runtime.ParamLocationPath, projectID) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "projectID", projectID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "userID", runtime.ParamLocationPath, userID) + pathParam1, err = runtime.StyleParamWithOptions("simple", false, "userID", userID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } @@ -12146,19 +12680,21 @@ func NewGetUserEventsRequest(server string, projectID openapi_types.UUID, userID } if params != nil { + // queryValues collects non-styled parameters (passthrough, JSON) + // that are safe to round-trip through url.Values.Encode(). queryValues := queryURL.Query() + // rawQueryFragments collects pre-encoded query fragments from + // styled parameters, preserving literal commas as delimiters + // per the OpenAPI spec (e.g. "color=blue,black,brown"). + var rawQueryFragments []string if params.Limit != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "limit", runtime.ParamLocationQuery, *params.Limit); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "limit", *params.Limit, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "integer", Format: ""}); err != nil { return nil, err } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) } } @@ -12166,15 +12702,11 @@ func NewGetUserEventsRequest(server string, projectID openapi_types.UUID, userID if params.Offset != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "offset", runtime.ParamLocationQuery, *params.Offset); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "offset", *params.Offset, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "integer", Format: ""}); err != nil { return nil, err } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) } } @@ -12182,24 +12714,23 @@ func NewGetUserEventsRequest(server string, projectID openapi_types.UUID, userID if params.Search != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "search", runtime.ParamLocationQuery, *params.Search); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "search", *params.Search, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { return nil, err } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) } } } - queryURL.RawQuery = queryValues.Encode() + if encoded := queryValues.Encode(); encoded != "" { + rawQueryFragments = append(rawQueryFragments, encoded) + } + queryURL.RawQuery = strings.Join(rawQueryFragments, "&") } - req, err := http.NewRequest("GET", queryURL.String(), nil) + req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil) if err != nil { return nil, err } @@ -12224,14 +12755,14 @@ func NewCreateUserEventRequestWithBody(server string, projectID openapi_types.UU var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "projectID", runtime.ParamLocationPath, projectID) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "projectID", projectID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "userID", runtime.ParamLocationPath, userID) + pathParam1, err = runtime.StyleParamWithOptions("simple", false, "userID", userID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } @@ -12251,7 +12782,7 @@ func NewCreateUserEventRequestWithBody(server string, projectID openapi_types.UU return nil, err } - req, err := http.NewRequest("POST", queryURL.String(), body) + req, err := http.NewRequest(http.MethodPost, queryURL.String(), body) if err != nil { return nil, err } @@ -12267,21 +12798,21 @@ func NewDeleteUserExternalIDRequest(server string, projectID openapi_types.UUID, var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "projectID", runtime.ParamLocationPath, projectID) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "projectID", projectID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "userID", runtime.ParamLocationPath, userID) + pathParam1, err = runtime.StyleParamWithOptions("simple", false, "userID", userID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } var pathParam2 string - pathParam2, err = runtime.StyleParamWithLocation("simple", false, "identifierID", runtime.ParamLocationPath, identifierID) + pathParam2, err = runtime.StyleParamWithOptions("simple", false, "identifierID", identifierID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } @@ -12301,7 +12832,7 @@ func NewDeleteUserExternalIDRequest(server string, projectID openapi_types.UUID, return nil, err } - req, err := http.NewRequest("DELETE", queryURL.String(), nil) + req, err := http.NewRequest(http.MethodDelete, queryURL.String(), nil) if err != nil { return nil, err } @@ -12315,14 +12846,14 @@ func NewGetUserJourneysRequest(server string, projectID openapi_types.UUID, user var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "projectID", runtime.ParamLocationPath, projectID) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "projectID", projectID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "userID", runtime.ParamLocationPath, userID) + pathParam1, err = runtime.StyleParamWithOptions("simple", false, "userID", userID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } @@ -12343,19 +12874,21 @@ func NewGetUserJourneysRequest(server string, projectID openapi_types.UUID, user } if params != nil { + // queryValues collects non-styled parameters (passthrough, JSON) + // that are safe to round-trip through url.Values.Encode(). queryValues := queryURL.Query() + // rawQueryFragments collects pre-encoded query fragments from + // styled parameters, preserving literal commas as delimiters + // per the OpenAPI spec (e.g. "color=blue,black,brown"). + var rawQueryFragments []string if params.Limit != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "limit", runtime.ParamLocationQuery, *params.Limit); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "limit", *params.Limit, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "integer", Format: ""}); err != nil { return nil, err } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) } } @@ -12363,24 +12896,23 @@ func NewGetUserJourneysRequest(server string, projectID openapi_types.UUID, user if params.Offset != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "offset", runtime.ParamLocationQuery, *params.Offset); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "offset", *params.Offset, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "integer", Format: ""}); err != nil { return nil, err } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) } } } - queryURL.RawQuery = queryValues.Encode() + if encoded := queryValues.Encode(); encoded != "" { + rawQueryFragments = append(rawQueryFragments, encoded) + } + queryURL.RawQuery = strings.Join(rawQueryFragments, "&") } - req, err := http.NewRequest("GET", queryURL.String(), nil) + req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil) if err != nil { return nil, err } @@ -12394,14 +12926,14 @@ func NewGetUserScheduledRequest(server string, projectID openapi_types.UUID, use var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "projectID", runtime.ParamLocationPath, projectID) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "projectID", projectID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "userID", runtime.ParamLocationPath, userID) + pathParam1, err = runtime.StyleParamWithOptions("simple", false, "userID", userID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } @@ -12422,19 +12954,21 @@ func NewGetUserScheduledRequest(server string, projectID openapi_types.UUID, use } if params != nil { + // queryValues collects non-styled parameters (passthrough, JSON) + // that are safe to round-trip through url.Values.Encode(). queryValues := queryURL.Query() + // rawQueryFragments collects pre-encoded query fragments from + // styled parameters, preserving literal commas as delimiters + // per the OpenAPI spec (e.g. "color=blue,black,brown"). + var rawQueryFragments []string if params.Limit != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "limit", runtime.ParamLocationQuery, *params.Limit); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "limit", *params.Limit, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "integer", Format: ""}); err != nil { return nil, err } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) } } @@ -12442,24 +12976,23 @@ func NewGetUserScheduledRequest(server string, projectID openapi_types.UUID, use if params.Offset != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "offset", runtime.ParamLocationQuery, *params.Offset); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "offset", *params.Offset, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "integer", Format: ""}); err != nil { return nil, err } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) } } } - queryURL.RawQuery = queryValues.Encode() + if encoded := queryValues.Encode(); encoded != "" { + rawQueryFragments = append(rawQueryFragments, encoded) + } + queryURL.RawQuery = strings.Join(rawQueryFragments, "&") } - req, err := http.NewRequest("GET", queryURL.String(), nil) + req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil) if err != nil { return nil, err } @@ -12484,14 +13017,14 @@ func NewUpsertUserScheduledRequestWithBody(server string, projectID openapi_type var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "projectID", runtime.ParamLocationPath, projectID) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "projectID", projectID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "userID", runtime.ParamLocationPath, userID) + pathParam1, err = runtime.StyleParamWithOptions("simple", false, "userID", userID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } @@ -12511,7 +13044,7 @@ func NewUpsertUserScheduledRequestWithBody(server string, projectID openapi_type return nil, err } - req, err := http.NewRequest("PUT", queryURL.String(), body) + req, err := http.NewRequest(http.MethodPut, queryURL.String(), body) if err != nil { return nil, err } @@ -12527,21 +13060,21 @@ func NewDeleteUserScheduledRequest(server string, projectID openapi_types.UUID, var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "projectID", runtime.ParamLocationPath, projectID) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "projectID", projectID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "userID", runtime.ParamLocationPath, userID) + pathParam1, err = runtime.StyleParamWithOptions("simple", false, "userID", userID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } var pathParam2 string - pathParam2, err = runtime.StyleParamWithLocation("simple", false, "scheduledInstanceID", runtime.ParamLocationPath, scheduledInstanceID) + pathParam2, err = runtime.StyleParamWithOptions("simple", false, "scheduledInstanceID", scheduledInstanceID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } @@ -12561,7 +13094,7 @@ func NewDeleteUserScheduledRequest(server string, projectID openapi_types.UUID, return nil, err } - req, err := http.NewRequest("DELETE", queryURL.String(), nil) + req, err := http.NewRequest(http.MethodDelete, queryURL.String(), nil) if err != nil { return nil, err } @@ -12586,21 +13119,21 @@ func NewUpdateUserScheduledRequestWithBody(server string, projectID openapi_type var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "projectID", runtime.ParamLocationPath, projectID) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "projectID", projectID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "userID", runtime.ParamLocationPath, userID) + pathParam1, err = runtime.StyleParamWithOptions("simple", false, "userID", userID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } var pathParam2 string - pathParam2, err = runtime.StyleParamWithLocation("simple", false, "scheduledInstanceID", runtime.ParamLocationPath, scheduledInstanceID) + pathParam2, err = runtime.StyleParamWithOptions("simple", false, "scheduledInstanceID", scheduledInstanceID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } @@ -12620,7 +13153,7 @@ func NewUpdateUserScheduledRequestWithBody(server string, projectID openapi_type return nil, err } - req, err := http.NewRequest("PATCH", queryURL.String(), body) + req, err := http.NewRequest(http.MethodPatch, queryURL.String(), body) if err != nil { return nil, err } @@ -12636,14 +13169,14 @@ func NewGetUserOrganizationsRequest(server string, projectID openapi_types.UUID, var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "projectID", runtime.ParamLocationPath, projectID) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "projectID", projectID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "userID", runtime.ParamLocationPath, userID) + pathParam1, err = runtime.StyleParamWithOptions("simple", false, "userID", userID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } @@ -12664,19 +13197,21 @@ func NewGetUserOrganizationsRequest(server string, projectID openapi_types.UUID, } if params != nil { + // queryValues collects non-styled parameters (passthrough, JSON) + // that are safe to round-trip through url.Values.Encode(). queryValues := queryURL.Query() + // rawQueryFragments collects pre-encoded query fragments from + // styled parameters, preserving literal commas as delimiters + // per the OpenAPI spec (e.g. "color=blue,black,brown"). + var rawQueryFragments []string if params.Limit != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "limit", runtime.ParamLocationQuery, *params.Limit); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "limit", *params.Limit, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "integer", Format: ""}); err != nil { return nil, err } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) } } @@ -12684,15 +13219,11 @@ func NewGetUserOrganizationsRequest(server string, projectID openapi_types.UUID, if params.Offset != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "offset", runtime.ParamLocationQuery, *params.Offset); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "offset", *params.Offset, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "integer", Format: ""}); err != nil { return nil, err } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) } } @@ -12700,24 +13231,23 @@ func NewGetUserOrganizationsRequest(server string, projectID openapi_types.UUID, if params.Search != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "search", runtime.ParamLocationQuery, *params.Search); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "search", *params.Search, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { return nil, err } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) } } } - queryURL.RawQuery = queryValues.Encode() + if encoded := queryValues.Encode(); encoded != "" { + rawQueryFragments = append(rawQueryFragments, encoded) + } + queryURL.RawQuery = strings.Join(rawQueryFragments, "&") } - req, err := http.NewRequest("GET", queryURL.String(), nil) + req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil) if err != nil { return nil, err } @@ -12731,14 +13261,14 @@ func NewGetUserSubscriptionsRequest(server string, projectID openapi_types.UUID, var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "projectID", runtime.ParamLocationPath, projectID) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "projectID", projectID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "userID", runtime.ParamLocationPath, userID) + pathParam1, err = runtime.StyleParamWithOptions("simple", false, "userID", userID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } @@ -12759,19 +13289,21 @@ func NewGetUserSubscriptionsRequest(server string, projectID openapi_types.UUID, } if params != nil { + // queryValues collects non-styled parameters (passthrough, JSON) + // that are safe to round-trip through url.Values.Encode(). queryValues := queryURL.Query() + // rawQueryFragments collects pre-encoded query fragments from + // styled parameters, preserving literal commas as delimiters + // per the OpenAPI spec (e.g. "color=blue,black,brown"). + var rawQueryFragments []string if params.Limit != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "limit", runtime.ParamLocationQuery, *params.Limit); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "limit", *params.Limit, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "integer", Format: ""}); err != nil { return nil, err } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) } } @@ -12779,24 +13311,23 @@ func NewGetUserSubscriptionsRequest(server string, projectID openapi_types.UUID, if params.Offset != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "offset", runtime.ParamLocationQuery, *params.Offset); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "offset", *params.Offset, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "integer", Format: ""}); err != nil { return nil, err } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) } } } - queryURL.RawQuery = queryValues.Encode() + if encoded := queryValues.Encode(); encoded != "" { + rawQueryFragments = append(rawQueryFragments, encoded) + } + queryURL.RawQuery = strings.Join(rawQueryFragments, "&") } - req, err := http.NewRequest("GET", queryURL.String(), nil) + req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil) if err != nil { return nil, err } @@ -12821,14 +13352,14 @@ func NewUpdateUserSubscriptionsRequestWithBody(server string, projectID openapi_ var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "projectID", runtime.ParamLocationPath, projectID) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "projectID", projectID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "userID", runtime.ParamLocationPath, userID) + pathParam1, err = runtime.StyleParamWithOptions("simple", false, "userID", userID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } @@ -12848,7 +13379,7 @@ func NewUpdateUserSubscriptionsRequestWithBody(server string, projectID openapi_ return nil, err } - req, err := http.NewRequest("PATCH", queryURL.String(), body) + req, err := http.NewRequest(http.MethodPatch, queryURL.String(), body) if err != nil { return nil, err } @@ -12864,7 +13395,7 @@ func NewListSubscriptionsRequest(server string, projectID openapi_types.UUID, pa var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "projectID", runtime.ParamLocationPath, projectID) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "projectID", projectID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } @@ -12885,19 +13416,21 @@ func NewListSubscriptionsRequest(server string, projectID openapi_types.UUID, pa } if params != nil { + // queryValues collects non-styled parameters (passthrough, JSON) + // that are safe to round-trip through url.Values.Encode(). queryValues := queryURL.Query() + // rawQueryFragments collects pre-encoded query fragments from + // styled parameters, preserving literal commas as delimiters + // per the OpenAPI spec (e.g. "color=blue,black,brown"). + var rawQueryFragments []string if params.Limit != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "limit", runtime.ParamLocationQuery, *params.Limit); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "limit", *params.Limit, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "integer", Format: ""}); err != nil { return nil, err } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) } } @@ -12905,24 +13438,23 @@ func NewListSubscriptionsRequest(server string, projectID openapi_types.UUID, pa if params.Offset != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "offset", runtime.ParamLocationQuery, *params.Offset); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "offset", *params.Offset, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "integer", Format: ""}); err != nil { return nil, err } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) } } } - queryURL.RawQuery = queryValues.Encode() + if encoded := queryValues.Encode(); encoded != "" { + rawQueryFragments = append(rawQueryFragments, encoded) + } + queryURL.RawQuery = strings.Join(rawQueryFragments, "&") } - req, err := http.NewRequest("GET", queryURL.String(), nil) + req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil) if err != nil { return nil, err } @@ -12947,7 +13479,7 @@ func NewCreateSubscriptionRequestWithBody(server string, projectID openapi_types var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "projectID", runtime.ParamLocationPath, projectID) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "projectID", projectID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } @@ -12967,7 +13499,7 @@ func NewCreateSubscriptionRequestWithBody(server string, projectID openapi_types return nil, err } - req, err := http.NewRequest("POST", queryURL.String(), body) + req, err := http.NewRequest(http.MethodPost, queryURL.String(), body) if err != nil { return nil, err } @@ -12983,14 +13515,14 @@ func NewGetSubscriptionRequest(server string, projectID openapi_types.UUID, subs var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "projectID", runtime.ParamLocationPath, projectID) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "projectID", projectID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "subscriptionID", runtime.ParamLocationPath, subscriptionID) + pathParam1, err = runtime.StyleParamWithOptions("simple", false, "subscriptionID", subscriptionID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } @@ -13010,7 +13542,7 @@ func NewGetSubscriptionRequest(server string, projectID openapi_types.UUID, subs return nil, err } - req, err := http.NewRequest("GET", queryURL.String(), nil) + req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil) if err != nil { return nil, err } @@ -13035,14 +13567,14 @@ func NewUpdateSubscriptionRequestWithBody(server string, projectID openapi_types var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "projectID", runtime.ParamLocationPath, projectID) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "projectID", projectID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "subscriptionID", runtime.ParamLocationPath, subscriptionID) + pathParam1, err = runtime.StyleParamWithOptions("simple", false, "subscriptionID", subscriptionID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } @@ -13062,7 +13594,7 @@ func NewUpdateSubscriptionRequestWithBody(server string, projectID openapi_types return nil, err } - req, err := http.NewRequest("PATCH", queryURL.String(), body) + req, err := http.NewRequest(http.MethodPatch, queryURL.String(), body) if err != nil { return nil, err } @@ -13078,7 +13610,7 @@ func NewListTagsRequest(server string, projectID openapi_types.UUID, params *Lis var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "projectID", runtime.ParamLocationPath, projectID) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "projectID", projectID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } @@ -13099,19 +13631,21 @@ func NewListTagsRequest(server string, projectID openapi_types.UUID, params *Lis } if params != nil { + // queryValues collects non-styled parameters (passthrough, JSON) + // that are safe to round-trip through url.Values.Encode(). queryValues := queryURL.Query() + // rawQueryFragments collects pre-encoded query fragments from + // styled parameters, preserving literal commas as delimiters + // per the OpenAPI spec (e.g. "color=blue,black,brown"). + var rawQueryFragments []string if params.Limit != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "limit", runtime.ParamLocationQuery, *params.Limit); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "limit", *params.Limit, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "integer", Format: ""}); err != nil { return nil, err } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) } } @@ -13119,15 +13653,11 @@ func NewListTagsRequest(server string, projectID openapi_types.UUID, params *Lis if params.Offset != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "offset", runtime.ParamLocationQuery, *params.Offset); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "offset", *params.Offset, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "integer", Format: ""}); err != nil { return nil, err } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) } } @@ -13135,24 +13665,23 @@ func NewListTagsRequest(server string, projectID openapi_types.UUID, params *Lis if params.Search != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "search", runtime.ParamLocationQuery, *params.Search); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "search", *params.Search, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { return nil, err } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) } } } - queryURL.RawQuery = queryValues.Encode() + if encoded := queryValues.Encode(); encoded != "" { + rawQueryFragments = append(rawQueryFragments, encoded) + } + queryURL.RawQuery = strings.Join(rawQueryFragments, "&") } - req, err := http.NewRequest("GET", queryURL.String(), nil) + req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil) if err != nil { return nil, err } @@ -13177,7 +13706,7 @@ func NewCreateTagRequestWithBody(server string, projectID openapi_types.UUID, co var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "projectID", runtime.ParamLocationPath, projectID) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "projectID", projectID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } @@ -13197,7 +13726,7 @@ func NewCreateTagRequestWithBody(server string, projectID openapi_types.UUID, co return nil, err } - req, err := http.NewRequest("POST", queryURL.String(), body) + req, err := http.NewRequest(http.MethodPost, queryURL.String(), body) if err != nil { return nil, err } @@ -13213,14 +13742,14 @@ func NewDeleteTagRequest(server string, projectID openapi_types.UUID, tagID open var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "projectID", runtime.ParamLocationPath, projectID) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "projectID", projectID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "tagID", runtime.ParamLocationPath, tagID) + pathParam1, err = runtime.StyleParamWithOptions("simple", false, "tagID", tagID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } @@ -13240,7 +13769,7 @@ func NewDeleteTagRequest(server string, projectID openapi_types.UUID, tagID open return nil, err } - req, err := http.NewRequest("DELETE", queryURL.String(), nil) + req, err := http.NewRequest(http.MethodDelete, queryURL.String(), nil) if err != nil { return nil, err } @@ -13254,14 +13783,14 @@ func NewGetTagRequest(server string, projectID openapi_types.UUID, tagID openapi var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "projectID", runtime.ParamLocationPath, projectID) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "projectID", projectID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "tagID", runtime.ParamLocationPath, tagID) + pathParam1, err = runtime.StyleParamWithOptions("simple", false, "tagID", tagID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } @@ -13281,7 +13810,7 @@ func NewGetTagRequest(server string, projectID openapi_types.UUID, tagID openapi return nil, err } - req, err := http.NewRequest("GET", queryURL.String(), nil) + req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil) if err != nil { return nil, err } @@ -13306,14 +13835,14 @@ func NewUpdateTagRequestWithBody(server string, projectID openapi_types.UUID, ta var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "projectID", runtime.ParamLocationPath, projectID) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "projectID", projectID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "tagID", runtime.ParamLocationPath, tagID) + pathParam1, err = runtime.StyleParamWithOptions("simple", false, "tagID", tagID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } @@ -13333,7 +13862,7 @@ func NewUpdateTagRequestWithBody(server string, projectID openapi_types.UUID, ta return nil, err } - req, err := http.NewRequest("PATCH", queryURL.String(), body) + req, err := http.NewRequest(http.MethodPatch, queryURL.String(), body) if err != nil { return nil, err } @@ -13363,19 +13892,21 @@ func NewListAdminsRequest(server string, params *ListAdminsParams) (*http.Reques } if params != nil { + // queryValues collects non-styled parameters (passthrough, JSON) + // that are safe to round-trip through url.Values.Encode(). queryValues := queryURL.Query() + // rawQueryFragments collects pre-encoded query fragments from + // styled parameters, preserving literal commas as delimiters + // per the OpenAPI spec (e.g. "color=blue,black,brown"). + var rawQueryFragments []string if params.Limit != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "limit", runtime.ParamLocationQuery, *params.Limit); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "limit", *params.Limit, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "integer", Format: ""}); err != nil { return nil, err } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) } } @@ -13383,15 +13914,11 @@ func NewListAdminsRequest(server string, params *ListAdminsParams) (*http.Reques if params.Offset != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "offset", runtime.ParamLocationQuery, *params.Offset); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "offset", *params.Offset, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "integer", Format: ""}); err != nil { return nil, err } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) } } @@ -13399,24 +13926,23 @@ func NewListAdminsRequest(server string, params *ListAdminsParams) (*http.Reques if params.Search != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "search", runtime.ParamLocationQuery, *params.Search); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "search", *params.Search, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { return nil, err } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) } } } - queryURL.RawQuery = queryValues.Encode() + if encoded := queryValues.Encode(); encoded != "" { + rawQueryFragments = append(rawQueryFragments, encoded) + } + queryURL.RawQuery = strings.Join(rawQueryFragments, "&") } - req, err := http.NewRequest("GET", queryURL.String(), nil) + req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil) if err != nil { return nil, err } @@ -13454,7 +13980,7 @@ func NewCreateAdminRequestWithBody(server string, contentType string, body io.Re return nil, err } - req, err := http.NewRequest("POST", queryURL.String(), body) + req, err := http.NewRequest(http.MethodPost, queryURL.String(), body) if err != nil { return nil, err } @@ -13470,7 +13996,7 @@ func NewDeleteAdminRequest(server string, adminID openapi_types.UUID) (*http.Req var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "adminID", runtime.ParamLocationPath, adminID) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "adminID", adminID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } @@ -13490,7 +14016,7 @@ func NewDeleteAdminRequest(server string, adminID openapi_types.UUID) (*http.Req return nil, err } - req, err := http.NewRequest("DELETE", queryURL.String(), nil) + req, err := http.NewRequest(http.MethodDelete, queryURL.String(), nil) if err != nil { return nil, err } @@ -13504,7 +14030,7 @@ func NewGetAdminRequest(server string, adminID openapi_types.UUID) (*http.Reques var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "adminID", runtime.ParamLocationPath, adminID) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "adminID", adminID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } @@ -13524,7 +14050,7 @@ func NewGetAdminRequest(server string, adminID openapi_types.UUID) (*http.Reques return nil, err } - req, err := http.NewRequest("GET", queryURL.String(), nil) + req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil) if err != nil { return nil, err } @@ -13549,7 +14075,7 @@ func NewUpdateAdminRequestWithBody(server string, adminID openapi_types.UUID, co var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "adminID", runtime.ParamLocationPath, adminID) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "adminID", adminID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"}) if err != nil { return nil, err } @@ -13569,7 +14095,7 @@ func NewUpdateAdminRequestWithBody(server string, adminID openapi_types.UUID, co return nil, err } - req, err := http.NewRequest("PATCH", queryURL.String(), body) + req, err := http.NewRequest(http.MethodPatch, queryURL.String(), body) if err != nil { return nil, err } @@ -13598,7 +14124,7 @@ func NewWhoamiRequest(server string) (*http.Request, error) { return nil, err } - req, err := http.NewRequest("GET", queryURL.String(), nil) + req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil) if err != nil { return nil, err } @@ -13623,7 +14149,7 @@ func NewAuthCallbackRequestWithBody(server string, driver AuthCallbackParamsDriv var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "driver", runtime.ParamLocationPath, driver) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "driver", driver, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""}) if err != nil { return nil, err } @@ -13643,7 +14169,7 @@ func NewAuthCallbackRequestWithBody(server string, driver AuthCallbackParamsDriv return nil, err } - req, err := http.NewRequest("POST", queryURL.String(), body) + req, err := http.NewRequest(http.MethodPost, queryURL.String(), body) if err != nil { return nil, err } @@ -13672,7 +14198,7 @@ func NewGetAuthMethodsRequest(server string) (*http.Request, error) { return nil, err } - req, err := http.NewRequest("GET", queryURL.String(), nil) + req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil) if err != nil { return nil, err } @@ -13686,7 +14212,7 @@ func NewAuthWebhookRequest(server string, driver AuthWebhookParamsDriver) (*http var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "driver", runtime.ParamLocationPath, driver) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "driver", driver, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""}) if err != nil { return nil, err } @@ -13706,7 +14232,7 @@ func NewAuthWebhookRequest(server string, driver AuthWebhookParamsDriver) (*http return nil, err } - req, err := http.NewRequest("POST", queryURL.String(), nil) + req, err := http.NewRequest(http.MethodPost, queryURL.String(), nil) if err != nil { return nil, err } @@ -13902,6 +14428,9 @@ type ClientWithResponsesInterface interface { SendTestWithResponse(ctx context.Context, projectID openapi_types.UUID, campaignID openapi_types.UUID, templateID openapi_types.UUID, body SendTestJSONRequestBody, reqEditors ...RequestEditorFn) (*SendTestResponse, error) + // UnarchiveCampaignWithResponse request + UnarchiveCampaignWithResponse(ctx context.Context, projectID openapi_types.UUID, campaignID openapi_types.UUID, reqEditors ...RequestEditorFn) (*UnarchiveCampaignResponse, error) + // GetCampaignUsersWithResponse request GetCampaignUsersWithResponse(ctx context.Context, projectID openapi_types.UUID, campaignID openapi_types.UUID, params *GetCampaignUsersParams, reqEditors ...RequestEditorFn) (*GetCampaignUsersResponse, error) @@ -13956,6 +14485,9 @@ type ClientWithResponsesInterface interface { SetJourneyStepsWithResponse(ctx context.Context, projectID openapi_types.UUID, journeyID openapi_types.UUID, body SetJourneyStepsJSONRequestBody, reqEditors ...RequestEditorFn) (*SetJourneyStepsResponse, error) + // UnarchiveJourneyWithResponse request + UnarchiveJourneyWithResponse(ctx context.Context, projectID openapi_types.UUID, journeyID openapi_types.UUID, reqEditors ...RequestEditorFn) (*UnarchiveJourneyResponse, error) + // CancelUserJourneyWithResponse request CancelUserJourneyWithResponse(ctx context.Context, projectID openapi_types.UUID, journeyID openapi_types.UUID, userID openapi_types.UUID, reqEditors ...RequestEditorFn) (*CancelUserJourneyResponse, error) @@ -14019,6 +14551,9 @@ type ClientWithResponsesInterface interface { // DuplicateListWithResponse request DuplicateListWithResponse(ctx context.Context, projectID openapi_types.UUID, listID openapi_types.UUID, reqEditors ...RequestEditorFn) (*DuplicateListResponse, error) + // UnarchiveListWithResponse request + UnarchiveListWithResponse(ctx context.Context, projectID openapi_types.UUID, listID openapi_types.UUID, reqEditors ...RequestEditorFn) (*UnarchiveListResponse, error) + // GetListUsersWithResponse request GetListUsersWithResponse(ctx context.Context, projectID openapi_types.UUID, listID openapi_types.UUID, params *GetListUsersParams, reqEditors ...RequestEditorFn) (*GetListUsersResponse, error) @@ -14344,6 +14879,14 @@ func (r GetProfileResponse) StatusCode() int { return 0 } +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r GetProfileResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + type ListProjectsResponse struct { Body []byte HTTPResponse *http.Response @@ -14367,6 +14910,14 @@ func (r ListProjectsResponse) StatusCode() int { return 0 } +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r ListProjectsResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + type CreateProjectResponse struct { Body []byte HTTPResponse *http.Response @@ -14390,6 +14941,14 @@ func (r CreateProjectResponse) StatusCode() int { return 0 } +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r CreateProjectResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + type DeleteProjectResponse struct { Body []byte HTTPResponse *http.Response @@ -14412,6 +14971,14 @@ func (r DeleteProjectResponse) StatusCode() int { return 0 } +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r DeleteProjectResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + type GetProjectResponse struct { Body []byte HTTPResponse *http.Response @@ -14435,6 +15002,14 @@ func (r GetProjectResponse) StatusCode() int { return 0 } +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r GetProjectResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + type UpdateProjectResponse struct { Body []byte HTTPResponse *http.Response @@ -14458,6 +15033,14 @@ func (r UpdateProjectResponse) StatusCode() int { return 0 } +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r UpdateProjectResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + type ListActionsResponse struct { Body []byte HTTPResponse *http.Response @@ -14481,6 +15064,14 @@ func (r ListActionsResponse) StatusCode() int { return 0 } +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r ListActionsResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + type CreateActionResponse struct { Body []byte HTTPResponse *http.Response @@ -14504,6 +15095,14 @@ func (r CreateActionResponse) StatusCode() int { return 0 } +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r CreateActionResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + type ListActionMetaResponse struct { Body []byte HTTPResponse *http.Response @@ -14527,6 +15126,14 @@ func (r ListActionMetaResponse) StatusCode() int { return 0 } +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r ListActionMetaResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + type GetActionPreviewResponse struct { Body []byte HTTPResponse *http.Response @@ -14549,6 +15156,14 @@ func (r GetActionPreviewResponse) StatusCode() int { return 0 } +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r GetActionPreviewResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + type TestActionResponse struct { Body []byte HTTPResponse *http.Response @@ -14572,6 +15187,14 @@ func (r TestActionResponse) StatusCode() int { return 0 } +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r TestActionResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + type DeleteActionResponse struct { Body []byte HTTPResponse *http.Response @@ -14594,6 +15217,14 @@ func (r DeleteActionResponse) StatusCode() int { return 0 } +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r DeleteActionResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + type GetActionResponse struct { Body []byte HTTPResponse *http.Response @@ -14617,6 +15248,14 @@ func (r GetActionResponse) StatusCode() int { return 0 } +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r GetActionResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + type UpdateActionResponse struct { Body []byte HTTPResponse *http.Response @@ -14640,6 +15279,14 @@ func (r UpdateActionResponse) StatusCode() int { return 0 } +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r UpdateActionResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + type ListActionSchemasResponse struct { Body []byte HTTPResponse *http.Response @@ -14663,6 +15310,14 @@ func (r ListActionSchemasResponse) StatusCode() int { return 0 } +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r ListActionSchemasResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + type TestActionFunctionResponse struct { Body []byte HTTPResponse *http.Response @@ -14686,6 +15341,14 @@ func (r TestActionFunctionResponse) StatusCode() int { return 0 } +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r TestActionFunctionResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + type ListProjectAdminsResponse struct { Body []byte HTTPResponse *http.Response @@ -14709,6 +15372,14 @@ func (r ListProjectAdminsResponse) StatusCode() int { return 0 } +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r ListProjectAdminsResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + type DeleteProjectAdminResponse struct { Body []byte HTTPResponse *http.Response @@ -14731,6 +15402,14 @@ func (r DeleteProjectAdminResponse) StatusCode() int { return 0 } +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r DeleteProjectAdminResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + type GetProjectAdminResponse struct { Body []byte HTTPResponse *http.Response @@ -14754,6 +15433,14 @@ func (r GetProjectAdminResponse) StatusCode() int { return 0 } +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r GetProjectAdminResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + type UpdateProjectAdminResponse struct { Body []byte HTTPResponse *http.Response @@ -14777,6 +15464,14 @@ func (r UpdateProjectAdminResponse) StatusCode() int { return 0 } +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r UpdateProjectAdminResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + type ListBroadcastsResponse struct { Body []byte HTTPResponse *http.Response @@ -14800,6 +15495,14 @@ func (r ListBroadcastsResponse) StatusCode() int { return 0 } +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r ListBroadcastsResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + type CreateBroadcastResponse struct { Body []byte HTTPResponse *http.Response @@ -14823,6 +15526,14 @@ func (r CreateBroadcastResponse) StatusCode() int { return 0 } +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r CreateBroadcastResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + type CancelBroadcastResponse struct { Body []byte HTTPResponse *http.Response @@ -14846,6 +15557,14 @@ func (r CancelBroadcastResponse) StatusCode() int { return 0 } +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r CancelBroadcastResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + type GetBroadcastResponse struct { Body []byte HTTPResponse *http.Response @@ -14869,6 +15588,14 @@ func (r GetBroadcastResponse) StatusCode() int { return 0 } +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r GetBroadcastResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + type UpdateBroadcastResponse struct { Body []byte HTTPResponse *http.Response @@ -14892,6 +15619,14 @@ func (r UpdateBroadcastResponse) StatusCode() int { return 0 } +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r UpdateBroadcastResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + type StreamBroadcastProgressResponse struct { Body []byte HTTPResponse *http.Response @@ -14914,6 +15649,14 @@ func (r StreamBroadcastProgressResponse) StatusCode() int { return 0 } +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r StreamBroadcastProgressResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + type SendBroadcastResponse struct { Body []byte HTTPResponse *http.Response @@ -14937,6 +15680,14 @@ func (r SendBroadcastResponse) StatusCode() int { return 0 } +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r SendBroadcastResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + type GetBroadcastUsersResponse struct { Body []byte HTTPResponse *http.Response @@ -14973,6 +15724,14 @@ func (r GetBroadcastUsersResponse) StatusCode() int { return 0 } +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r GetBroadcastUsersResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + type ListCampaignsResponse struct { Body []byte HTTPResponse *http.Response @@ -14996,6 +15755,14 @@ func (r ListCampaignsResponse) StatusCode() int { return 0 } +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r ListCampaignsResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + type CreateCampaignResponse struct { Body []byte HTTPResponse *http.Response @@ -15019,6 +15786,14 @@ func (r CreateCampaignResponse) StatusCode() int { return 0 } +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r CreateCampaignResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + type DeleteCampaignResponse struct { Body []byte HTTPResponse *http.Response @@ -15041,6 +15816,14 @@ func (r DeleteCampaignResponse) StatusCode() int { return 0 } +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r DeleteCampaignResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + type GetCampaignResponse struct { Body []byte HTTPResponse *http.Response @@ -15066,6 +15849,14 @@ func (r GetCampaignResponse) StatusCode() int { return 0 } +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r GetCampaignResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + type UpdateCampaignResponse struct { Body []byte HTTPResponse *http.Response @@ -15089,6 +15880,14 @@ func (r UpdateCampaignResponse) StatusCode() int { return 0 } +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r UpdateCampaignResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + type DuplicateCampaignResponse struct { Body []byte HTTPResponse *http.Response @@ -15112,6 +15911,14 @@ func (r DuplicateCampaignResponse) StatusCode() int { return 0 } +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r DuplicateCampaignResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + type CreateTemplateResponse struct { Body []byte HTTPResponse *http.Response @@ -15135,6 +15942,14 @@ func (r CreateTemplateResponse) StatusCode() int { return 0 } +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r CreateTemplateResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + type DeleteTemplateResponse struct { Body []byte HTTPResponse *http.Response @@ -15157,6 +15972,14 @@ func (r DeleteTemplateResponse) StatusCode() int { return 0 } +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r DeleteTemplateResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + type GetTemplateResponse struct { Body []byte HTTPResponse *http.Response @@ -15182,6 +16005,14 @@ func (r GetTemplateResponse) StatusCode() int { return 0 } +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r GetTemplateResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + type UpdateTemplateResponse struct { Body []byte HTTPResponse *http.Response @@ -15205,6 +16036,14 @@ func (r UpdateTemplateResponse) StatusCode() int { return 0 } +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r UpdateTemplateResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + type SendTestResponse struct { Body []byte HTTPResponse *http.Response @@ -15227,6 +16066,44 @@ func (r SendTestResponse) StatusCode() int { return 0 } +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r SendTestResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + +type UnarchiveCampaignResponse struct { + Body []byte + HTTPResponse *http.Response + JSONDefault *Error +} + +// Status returns HTTPResponse.Status +func (r UnarchiveCampaignResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r UnarchiveCampaignResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r UnarchiveCampaignResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + type GetCampaignUsersResponse struct { Body []byte HTTPResponse *http.Response @@ -15255,6 +16132,14 @@ func (r GetCampaignUsersResponse) StatusCode() int { return 0 } +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r GetCampaignUsersResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + type ListDocumentsResponse struct { Body []byte HTTPResponse *http.Response @@ -15278,6 +16163,14 @@ func (r ListDocumentsResponse) StatusCode() int { return 0 } +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r ListDocumentsResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + type UploadDocumentsResponse struct { Body []byte HTTPResponse *http.Response @@ -15304,6 +16197,14 @@ func (r UploadDocumentsResponse) StatusCode() int { return 0 } +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r UploadDocumentsResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + type DeleteDocumentResponse struct { Body []byte HTTPResponse *http.Response @@ -15326,6 +16227,14 @@ func (r DeleteDocumentResponse) StatusCode() int { return 0 } +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r DeleteDocumentResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + type GetDocumentResponse struct { Body []byte HTTPResponse *http.Response @@ -15348,6 +16257,14 @@ func (r GetDocumentResponse) StatusCode() int { return 0 } +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r GetDocumentResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + type GetDocumentMetadataResponse struct { Body []byte HTTPResponse *http.Response @@ -15371,6 +16288,14 @@ func (r GetDocumentMetadataResponse) StatusCode() int { return 0 } +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r GetDocumentMetadataResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + type ListEmailTemplatesResponse struct { Body []byte HTTPResponse *http.Response @@ -15394,6 +16319,14 @@ func (r ListEmailTemplatesResponse) StatusCode() int { return 0 } +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r ListEmailTemplatesResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + type ListJourneysResponse struct { Body []byte HTTPResponse *http.Response @@ -15417,6 +16350,14 @@ func (r ListJourneysResponse) StatusCode() int { return 0 } +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r ListJourneysResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + type CreateJourneyResponse struct { Body []byte HTTPResponse *http.Response @@ -15440,6 +16381,14 @@ func (r CreateJourneyResponse) StatusCode() int { return 0 } +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r CreateJourneyResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + type DeleteJourneyResponse struct { Body []byte HTTPResponse *http.Response @@ -15462,6 +16411,14 @@ func (r DeleteJourneyResponse) StatusCode() int { return 0 } +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r DeleteJourneyResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + type GetJourneyResponse struct { Body []byte HTTPResponse *http.Response @@ -15485,6 +16442,14 @@ func (r GetJourneyResponse) StatusCode() int { return 0 } +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r GetJourneyResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + type UpdateJourneyResponse struct { Body []byte HTTPResponse *http.Response @@ -15508,6 +16473,14 @@ func (r UpdateJourneyResponse) StatusCode() int { return 0 } +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r UpdateJourneyResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + type DuplicateJourneyResponse struct { Body []byte HTTPResponse *http.Response @@ -15531,6 +16504,14 @@ func (r DuplicateJourneyResponse) StatusCode() int { return 0 } +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r DuplicateJourneyResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + type PublishJourneyResponse struct { Body []byte HTTPResponse *http.Response @@ -15554,6 +16535,14 @@ func (r PublishJourneyResponse) StatusCode() int { return 0 } +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r PublishJourneyResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + type GetJourneyStepsResponse struct { Body []byte HTTPResponse *http.Response @@ -15577,6 +16566,14 @@ func (r GetJourneyStepsResponse) StatusCode() int { return 0 } +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r GetJourneyStepsResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + type SetJourneyStepsResponse struct { Body []byte HTTPResponse *http.Response @@ -15600,6 +16597,44 @@ func (r SetJourneyStepsResponse) StatusCode() int { return 0 } +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r SetJourneyStepsResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + +type UnarchiveJourneyResponse struct { + Body []byte + HTTPResponse *http.Response + JSONDefault *Error +} + +// Status returns HTTPResponse.Status +func (r UnarchiveJourneyResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r UnarchiveJourneyResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r UnarchiveJourneyResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + type CancelUserJourneyResponse struct { Body []byte HTTPResponse *http.Response @@ -15622,6 +16657,14 @@ func (r CancelUserJourneyResponse) StatusCode() int { return 0 } +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r CancelUserJourneyResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + type StreamUserJourneyStepsResponse struct { Body []byte HTTPResponse *http.Response @@ -15644,6 +16687,14 @@ func (r StreamUserJourneyStepsResponse) StatusCode() int { return 0 } +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r StreamUserJourneyStepsResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + type TriggerUserResponse struct { Body []byte HTTPResponse *http.Response @@ -15666,6 +16717,14 @@ func (r TriggerUserResponse) StatusCode() int { return 0 } +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r TriggerUserResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + type AdvanceUserStepResponse struct { Body []byte HTTPResponse *http.Response @@ -15688,6 +16747,14 @@ func (r AdvanceUserStepResponse) StatusCode() int { return 0 } +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r AdvanceUserStepResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + type GetUserJourneyStateResponse struct { Body []byte HTTPResponse *http.Response @@ -15715,6 +16782,14 @@ func (r GetUserJourneyStateResponse) StatusCode() int { return 0 } +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r GetUserJourneyStateResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + type VersionJourneyResponse struct { Body []byte HTTPResponse *http.Response @@ -15738,6 +16813,14 @@ func (r VersionJourneyResponse) StatusCode() int { return 0 } +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r VersionJourneyResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + type ListApiKeysResponse struct { Body []byte HTTPResponse *http.Response @@ -15761,6 +16844,14 @@ func (r ListApiKeysResponse) StatusCode() int { return 0 } +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r ListApiKeysResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + type CreateApiKeyResponse struct { Body []byte HTTPResponse *http.Response @@ -15784,6 +16875,14 @@ func (r CreateApiKeyResponse) StatusCode() int { return 0 } +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r CreateApiKeyResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + type DeleteApiKeyResponse struct { Body []byte HTTPResponse *http.Response @@ -15806,6 +16905,14 @@ func (r DeleteApiKeyResponse) StatusCode() int { return 0 } +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r DeleteApiKeyResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + type GetApiKeyResponse struct { Body []byte HTTPResponse *http.Response @@ -15829,6 +16936,14 @@ func (r GetApiKeyResponse) StatusCode() int { return 0 } +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r GetApiKeyResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + type UpdateApiKeyResponse struct { Body []byte HTTPResponse *http.Response @@ -15852,6 +16967,14 @@ func (r UpdateApiKeyResponse) StatusCode() int { return 0 } +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r UpdateApiKeyResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + type ListListsResponse struct { Body []byte HTTPResponse *http.Response @@ -15875,6 +16998,14 @@ func (r ListListsResponse) StatusCode() int { return 0 } +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r ListListsResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + type CreateListResponse struct { Body []byte HTTPResponse *http.Response @@ -15898,6 +17029,14 @@ func (r CreateListResponse) StatusCode() int { return 0 } +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r CreateListResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + type DeleteListResponse struct { Body []byte HTTPResponse *http.Response @@ -15920,6 +17059,14 @@ func (r DeleteListResponse) StatusCode() int { return 0 } +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r DeleteListResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + type GetListResponse struct { Body []byte HTTPResponse *http.Response @@ -15943,6 +17090,14 @@ func (r GetListResponse) StatusCode() int { return 0 } +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r GetListResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + type UpdateListResponse struct { Body []byte HTTPResponse *http.Response @@ -15966,6 +17121,14 @@ func (r UpdateListResponse) StatusCode() int { return 0 } +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r UpdateListResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + type DuplicateListResponse struct { Body []byte HTTPResponse *http.Response @@ -15989,6 +17152,44 @@ func (r DuplicateListResponse) StatusCode() int { return 0 } +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r DuplicateListResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + +type UnarchiveListResponse struct { + Body []byte + HTTPResponse *http.Response + JSONDefault *Error +} + +// Status returns HTTPResponse.Status +func (r UnarchiveListResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r UnarchiveListResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r UnarchiveListResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + type GetListUsersResponse struct { Body []byte HTTPResponse *http.Response @@ -16012,6 +17213,14 @@ func (r GetListUsersResponse) StatusCode() int { return 0 } +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r GetListUsersResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + type PreviewListUsersResponse struct { Body []byte HTTPResponse *http.Response @@ -16035,6 +17244,14 @@ func (r PreviewListUsersResponse) StatusCode() int { return 0 } +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r PreviewListUsersResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + type ImportListUsersResponse struct { Body []byte HTTPResponse *http.Response @@ -16057,6 +17274,14 @@ func (r ImportListUsersResponse) StatusCode() int { return 0 } +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r ImportListUsersResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + type ListLocalesResponse struct { Body []byte HTTPResponse *http.Response @@ -16090,6 +17315,14 @@ func (r ListLocalesResponse) StatusCode() int { return 0 } +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r ListLocalesResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + type CreateLocaleResponse struct { Body []byte HTTPResponse *http.Response @@ -16113,6 +17346,14 @@ func (r CreateLocaleResponse) StatusCode() int { return 0 } +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r CreateLocaleResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + type DeleteLocaleResponse struct { Body []byte HTTPResponse *http.Response @@ -16135,6 +17376,14 @@ func (r DeleteLocaleResponse) StatusCode() int { return 0 } +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r DeleteLocaleResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + type GetLocaleResponse struct { Body []byte HTTPResponse *http.Response @@ -16158,6 +17407,14 @@ func (r GetLocaleResponse) StatusCode() int { return 0 } +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r GetLocaleResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + type ListProvidersResponse struct { Body []byte HTTPResponse *http.Response @@ -16181,6 +17438,14 @@ func (r ListProvidersResponse) StatusCode() int { return 0 } +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r ListProvidersResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + type ListProviderMetaResponse struct { Body []byte HTTPResponse *http.Response @@ -16204,6 +17469,14 @@ func (r ListProviderMetaResponse) StatusCode() int { return 0 } +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r ListProviderMetaResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + type DeleteProviderResponse struct { Body []byte HTTPResponse *http.Response @@ -16226,6 +17499,14 @@ func (r DeleteProviderResponse) StatusCode() int { return 0 } +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r DeleteProviderResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + type CreateProviderResponse struct { Body []byte HTTPResponse *http.Response @@ -16249,6 +17530,14 @@ func (r CreateProviderResponse) StatusCode() int { return 0 } +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r CreateProviderResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + type GetProviderResponse struct { Body []byte HTTPResponse *http.Response @@ -16272,6 +17561,14 @@ func (r GetProviderResponse) StatusCode() int { return 0 } +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r GetProviderResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + type UpdateProviderResponse struct { Body []byte HTTPResponse *http.Response @@ -16295,6 +17592,14 @@ func (r UpdateProviderResponse) StatusCode() int { return 0 } +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r UpdateProviderResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + type ListProjectPushProvidersResponse struct { Body []byte HTTPResponse *http.Response @@ -16320,6 +17625,14 @@ func (r ListProjectPushProvidersResponse) StatusCode() int { return 0 } +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r ListProjectPushProvidersResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + type DeleteProjectPushProviderResponse struct { Body []byte HTTPResponse *http.Response @@ -16342,6 +17655,14 @@ func (r DeleteProjectPushProviderResponse) StatusCode() int { return 0 } +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r DeleteProjectPushProviderResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + type UpsertProjectPushProviderResponse struct { Body []byte HTTPResponse *http.Response @@ -16365,6 +17686,14 @@ func (r UpsertProjectPushProviderResponse) StatusCode() int { return 0 } +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r UpsertProjectPushProviderResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + type ListSenderIdentitiesResponse struct { Body []byte HTTPResponse *http.Response @@ -16398,6 +17727,14 @@ func (r ListSenderIdentitiesResponse) StatusCode() int { return 0 } +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r ListSenderIdentitiesResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + type CreateSenderIdentityResponse struct { Body []byte HTTPResponse *http.Response @@ -16421,6 +17758,14 @@ func (r CreateSenderIdentityResponse) StatusCode() int { return 0 } +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r CreateSenderIdentityResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + type DeleteSenderIdentityResponse struct { Body []byte HTTPResponse *http.Response @@ -16443,6 +17788,14 @@ func (r DeleteSenderIdentityResponse) StatusCode() int { return 0 } +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r DeleteSenderIdentityResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + type GetSenderIdentityResponse struct { Body []byte HTTPResponse *http.Response @@ -16466,6 +17819,14 @@ func (r GetSenderIdentityResponse) StatusCode() int { return 0 } +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r GetSenderIdentityResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + type ListOrganizationEventSchemasResponse struct { Body []byte HTTPResponse *http.Response @@ -16489,6 +17850,14 @@ func (r ListOrganizationEventSchemasResponse) StatusCode() int { return 0 } +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r ListOrganizationEventSchemasResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + type DeleteOrganizationEventSchemaResponse struct { Body []byte HTTPResponse *http.Response @@ -16511,6 +17880,14 @@ func (r DeleteOrganizationEventSchemaResponse) StatusCode() int { return 0 } +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r DeleteOrganizationEventSchemaResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + type ListOrganizationsResponse struct { Body []byte HTTPResponse *http.Response @@ -16534,6 +17911,14 @@ func (r ListOrganizationsResponse) StatusCode() int { return 0 } +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r ListOrganizationsResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + type UpsertOrganizationResponse struct { Body []byte HTTPResponse *http.Response @@ -16557,6 +17942,14 @@ func (r UpsertOrganizationResponse) StatusCode() int { return 0 } +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r UpsertOrganizationResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + type ListOrganizationSchemasResponse struct { Body []byte HTTPResponse *http.Response @@ -16582,6 +17975,14 @@ func (r ListOrganizationSchemasResponse) StatusCode() int { return 0 } +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r ListOrganizationSchemasResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + type ListOrganizationMemberSchemasResponse struct { Body []byte HTTPResponse *http.Response @@ -16607,6 +18008,14 @@ func (r ListOrganizationMemberSchemasResponse) StatusCode() int { return 0 } +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r ListOrganizationMemberSchemasResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + type DeleteOrganizationResponse struct { Body []byte HTTPResponse *http.Response @@ -16629,6 +18038,14 @@ func (r DeleteOrganizationResponse) StatusCode() int { return 0 } +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r DeleteOrganizationResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + type GetOrganizationResponse struct { Body []byte HTTPResponse *http.Response @@ -16652,6 +18069,14 @@ func (r GetOrganizationResponse) StatusCode() int { return 0 } +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r GetOrganizationResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + type UpdateOrganizationResponse struct { Body []byte HTTPResponse *http.Response @@ -16675,6 +18100,14 @@ func (r UpdateOrganizationResponse) StatusCode() int { return 0 } +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r UpdateOrganizationResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + type GetOrganizationEventsResponse struct { Body []byte HTTPResponse *http.Response @@ -16698,6 +18131,14 @@ func (r GetOrganizationEventsResponse) StatusCode() int { return 0 } +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r GetOrganizationEventsResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + type CreateOrganizationEventResponse struct { Body []byte HTTPResponse *http.Response @@ -16720,6 +18161,14 @@ func (r CreateOrganizationEventResponse) StatusCode() int { return 0 } +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r CreateOrganizationEventResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + type DeleteOrganizationExternalIDResponse struct { Body []byte HTTPResponse *http.Response @@ -16742,6 +18191,14 @@ func (r DeleteOrganizationExternalIDResponse) StatusCode() int { return 0 } +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r DeleteOrganizationExternalIDResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + type GetOrganizationScheduledResponse struct { Body []byte HTTPResponse *http.Response @@ -16765,6 +18222,14 @@ func (r GetOrganizationScheduledResponse) StatusCode() int { return 0 } +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r GetOrganizationScheduledResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + type UpsertOrganizationScheduledResponse struct { Body []byte HTTPResponse *http.Response @@ -16788,6 +18253,14 @@ func (r UpsertOrganizationScheduledResponse) StatusCode() int { return 0 } +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r UpsertOrganizationScheduledResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + type DeleteOrganizationScheduledResponse struct { Body []byte HTTPResponse *http.Response @@ -16810,6 +18283,14 @@ func (r DeleteOrganizationScheduledResponse) StatusCode() int { return 0 } +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r DeleteOrganizationScheduledResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + type UpdateOrganizationScheduledResponse struct { Body []byte HTTPResponse *http.Response @@ -16833,6 +18314,14 @@ func (r UpdateOrganizationScheduledResponse) StatusCode() int { return 0 } +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r UpdateOrganizationScheduledResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + type ListOrganizationMembersResponse struct { Body []byte HTTPResponse *http.Response @@ -16851,9 +18340,17 @@ func (r ListOrganizationMembersResponse) Status() string { // StatusCode returns HTTPResponse.StatusCode func (r ListOrganizationMembersResponse) StatusCode() int { if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode + return r.HTTPResponse.StatusCode + } + return 0 +} + +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r ListOrganizationMembersResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") } - return 0 + return "" } type AddOrganizationMemberResponse struct { @@ -16878,6 +18375,14 @@ func (r AddOrganizationMemberResponse) StatusCode() int { return 0 } +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r AddOrganizationMemberResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + type RemoveOrganizationMemberResponse struct { Body []byte HTTPResponse *http.Response @@ -16900,6 +18405,14 @@ func (r RemoveOrganizationMemberResponse) StatusCode() int { return 0 } +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r RemoveOrganizationMemberResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + type ListUserEventSchemasResponse struct { Body []byte HTTPResponse *http.Response @@ -16923,6 +18436,14 @@ func (r ListUserEventSchemasResponse) StatusCode() int { return 0 } +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r ListUserEventSchemasResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + type DeleteUserEventSchemaResponse struct { Body []byte HTTPResponse *http.Response @@ -16945,6 +18466,14 @@ func (r DeleteUserEventSchemaResponse) StatusCode() int { return 0 } +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r DeleteUserEventSchemaResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + type ListScheduledSchemasResponse struct { Body []byte HTTPResponse *http.Response @@ -16968,6 +18497,14 @@ func (r ListScheduledSchemasResponse) StatusCode() int { return 0 } +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r ListScheduledSchemasResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + type DeleteScheduledSchemaResponse struct { Body []byte HTTPResponse *http.Response @@ -16990,6 +18527,14 @@ func (r DeleteScheduledSchemaResponse) StatusCode() int { return 0 } +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r DeleteScheduledSchemaResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + type CreateScheduleOffsetResponse struct { Body []byte HTTPResponse *http.Response @@ -17013,6 +18558,14 @@ func (r CreateScheduleOffsetResponse) StatusCode() int { return 0 } +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r CreateScheduleOffsetResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + type ListUsersResponse struct { Body []byte HTTPResponse *http.Response @@ -17036,6 +18589,14 @@ func (r ListUsersResponse) StatusCode() int { return 0 } +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r ListUsersResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + type IdentifyUserResponse struct { Body []byte HTTPResponse *http.Response @@ -17059,6 +18620,14 @@ func (r IdentifyUserResponse) StatusCode() int { return 0 } +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r IdentifyUserResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + type ImportUsersResponse struct { Body []byte HTTPResponse *http.Response @@ -17081,6 +18650,14 @@ func (r ImportUsersResponse) StatusCode() int { return 0 } +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r ImportUsersResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + type ListUserSchemasResponse struct { Body []byte HTTPResponse *http.Response @@ -17106,6 +18683,14 @@ func (r ListUserSchemasResponse) StatusCode() int { return 0 } +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r ListUserSchemasResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + type DeleteUserResponse struct { Body []byte HTTPResponse *http.Response @@ -17128,6 +18713,14 @@ func (r DeleteUserResponse) StatusCode() int { return 0 } +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r DeleteUserResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + type GetUserResponse struct { Body []byte HTTPResponse *http.Response @@ -17151,6 +18744,14 @@ func (r GetUserResponse) StatusCode() int { return 0 } +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r GetUserResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + type UpdateUserResponse struct { Body []byte HTTPResponse *http.Response @@ -17174,6 +18775,14 @@ func (r UpdateUserResponse) StatusCode() int { return 0 } +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r UpdateUserResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + type GetUserDevicesResponse struct { Body []byte HTTPResponse *http.Response @@ -17197,6 +18806,14 @@ func (r GetUserDevicesResponse) StatusCode() int { return 0 } +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r GetUserDevicesResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + type CreateUserDeviceResponse struct { Body []byte HTTPResponse *http.Response @@ -17219,6 +18836,14 @@ func (r CreateUserDeviceResponse) StatusCode() int { return 0 } +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r CreateUserDeviceResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + type DeleteUserDeviceResponse struct { Body []byte HTTPResponse *http.Response @@ -17241,6 +18866,14 @@ func (r DeleteUserDeviceResponse) StatusCode() int { return 0 } +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r DeleteUserDeviceResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + type GetUserEventsResponse struct { Body []byte HTTPResponse *http.Response @@ -17264,6 +18897,14 @@ func (r GetUserEventsResponse) StatusCode() int { return 0 } +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r GetUserEventsResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + type CreateUserEventResponse struct { Body []byte HTTPResponse *http.Response @@ -17286,6 +18927,14 @@ func (r CreateUserEventResponse) StatusCode() int { return 0 } +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r CreateUserEventResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + type DeleteUserExternalIDResponse struct { Body []byte HTTPResponse *http.Response @@ -17308,6 +18957,14 @@ func (r DeleteUserExternalIDResponse) StatusCode() int { return 0 } +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r DeleteUserExternalIDResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + type GetUserJourneysResponse struct { Body []byte HTTPResponse *http.Response @@ -17331,6 +18988,14 @@ func (r GetUserJourneysResponse) StatusCode() int { return 0 } +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r GetUserJourneysResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + type GetUserScheduledResponse struct { Body []byte HTTPResponse *http.Response @@ -17354,6 +19019,14 @@ func (r GetUserScheduledResponse) StatusCode() int { return 0 } +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r GetUserScheduledResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + type UpsertUserScheduledResponse struct { Body []byte HTTPResponse *http.Response @@ -17377,6 +19050,14 @@ func (r UpsertUserScheduledResponse) StatusCode() int { return 0 } +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r UpsertUserScheduledResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + type DeleteUserScheduledResponse struct { Body []byte HTTPResponse *http.Response @@ -17399,6 +19080,14 @@ func (r DeleteUserScheduledResponse) StatusCode() int { return 0 } +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r DeleteUserScheduledResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + type UpdateUserScheduledResponse struct { Body []byte HTTPResponse *http.Response @@ -17422,6 +19111,14 @@ func (r UpdateUserScheduledResponse) StatusCode() int { return 0 } +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r UpdateUserScheduledResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + type GetUserOrganizationsResponse struct { Body []byte HTTPResponse *http.Response @@ -17450,6 +19147,14 @@ func (r GetUserOrganizationsResponse) StatusCode() int { return 0 } +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r GetUserOrganizationsResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + type GetUserSubscriptionsResponse struct { Body []byte HTTPResponse *http.Response @@ -17473,6 +19178,14 @@ func (r GetUserSubscriptionsResponse) StatusCode() int { return 0 } +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r GetUserSubscriptionsResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + type UpdateUserSubscriptionsResponse struct { Body []byte HTTPResponse *http.Response @@ -17496,6 +19209,14 @@ func (r UpdateUserSubscriptionsResponse) StatusCode() int { return 0 } +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r UpdateUserSubscriptionsResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + type ListSubscriptionsResponse struct { Body []byte HTTPResponse *http.Response @@ -17519,6 +19240,14 @@ func (r ListSubscriptionsResponse) StatusCode() int { return 0 } +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r ListSubscriptionsResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + type CreateSubscriptionResponse struct { Body []byte HTTPResponse *http.Response @@ -17542,6 +19271,14 @@ func (r CreateSubscriptionResponse) StatusCode() int { return 0 } +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r CreateSubscriptionResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + type GetSubscriptionResponse struct { Body []byte HTTPResponse *http.Response @@ -17565,6 +19302,14 @@ func (r GetSubscriptionResponse) StatusCode() int { return 0 } +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r GetSubscriptionResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + type UpdateSubscriptionResponse struct { Body []byte HTTPResponse *http.Response @@ -17588,6 +19333,14 @@ func (r UpdateSubscriptionResponse) StatusCode() int { return 0 } +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r UpdateSubscriptionResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + type ListTagsResponse struct { Body []byte HTTPResponse *http.Response @@ -17611,6 +19364,14 @@ func (r ListTagsResponse) StatusCode() int { return 0 } +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r ListTagsResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + type CreateTagResponse struct { Body []byte HTTPResponse *http.Response @@ -17634,6 +19395,14 @@ func (r CreateTagResponse) StatusCode() int { return 0 } +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r CreateTagResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + type DeleteTagResponse struct { Body []byte HTTPResponse *http.Response @@ -17656,6 +19425,14 @@ func (r DeleteTagResponse) StatusCode() int { return 0 } +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r DeleteTagResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + type GetTagResponse struct { Body []byte HTTPResponse *http.Response @@ -17679,6 +19456,14 @@ func (r GetTagResponse) StatusCode() int { return 0 } +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r GetTagResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + type UpdateTagResponse struct { Body []byte HTTPResponse *http.Response @@ -17702,6 +19487,14 @@ func (r UpdateTagResponse) StatusCode() int { return 0 } +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r UpdateTagResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + type ListAdminsResponse struct { Body []byte HTTPResponse *http.Response @@ -17725,6 +19518,14 @@ func (r ListAdminsResponse) StatusCode() int { return 0 } +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r ListAdminsResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + type CreateAdminResponse struct { Body []byte HTTPResponse *http.Response @@ -17748,6 +19549,14 @@ func (r CreateAdminResponse) StatusCode() int { return 0 } +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r CreateAdminResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + type DeleteAdminResponse struct { Body []byte HTTPResponse *http.Response @@ -17770,6 +19579,14 @@ func (r DeleteAdminResponse) StatusCode() int { return 0 } +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r DeleteAdminResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + type GetAdminResponse struct { Body []byte HTTPResponse *http.Response @@ -17793,6 +19610,14 @@ func (r GetAdminResponse) StatusCode() int { return 0 } +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r GetAdminResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + type UpdateAdminResponse struct { Body []byte HTTPResponse *http.Response @@ -17816,6 +19641,14 @@ func (r UpdateAdminResponse) StatusCode() int { return 0 } +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r UpdateAdminResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + type WhoamiResponse struct { Body []byte HTTPResponse *http.Response @@ -17839,6 +19672,14 @@ func (r WhoamiResponse) StatusCode() int { return 0 } +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r WhoamiResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + type AuthCallbackResponse struct { Body []byte HTTPResponse *http.Response @@ -17861,6 +19702,14 @@ func (r AuthCallbackResponse) StatusCode() int { return 0 } +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r AuthCallbackResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + type GetAuthMethodsResponse struct { Body []byte HTTPResponse *http.Response @@ -17884,6 +19733,14 @@ func (r GetAuthMethodsResponse) StatusCode() int { return 0 } +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r GetAuthMethodsResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + type AuthWebhookResponse struct { Body []byte HTTPResponse *http.Response @@ -17906,6 +19763,14 @@ func (r AuthWebhookResponse) StatusCode() int { return 0 } +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r AuthWebhookResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + // GetProfileWithResponse request returning *GetProfileResponse func (c *ClientWithResponses) GetProfileWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetProfileResponse, error) { rsp, err := c.GetProfile(ctx, reqEditors...) @@ -18369,6 +20234,15 @@ func (c *ClientWithResponses) SendTestWithResponse(ctx context.Context, projectI return ParseSendTestResponse(rsp) } +// UnarchiveCampaignWithResponse request returning *UnarchiveCampaignResponse +func (c *ClientWithResponses) UnarchiveCampaignWithResponse(ctx context.Context, projectID openapi_types.UUID, campaignID openapi_types.UUID, reqEditors ...RequestEditorFn) (*UnarchiveCampaignResponse, error) { + rsp, err := c.UnarchiveCampaign(ctx, projectID, campaignID, reqEditors...) + if err != nil { + return nil, err + } + return ParseUnarchiveCampaignResponse(rsp) +} + // GetCampaignUsersWithResponse request returning *GetCampaignUsersResponse func (c *ClientWithResponses) GetCampaignUsersWithResponse(ctx context.Context, projectID openapi_types.UUID, campaignID openapi_types.UUID, params *GetCampaignUsersParams, reqEditors ...RequestEditorFn) (*GetCampaignUsersResponse, error) { rsp, err := c.GetCampaignUsers(ctx, projectID, campaignID, params, reqEditors...) @@ -18537,6 +20411,15 @@ func (c *ClientWithResponses) SetJourneyStepsWithResponse(ctx context.Context, p return ParseSetJourneyStepsResponse(rsp) } +// UnarchiveJourneyWithResponse request returning *UnarchiveJourneyResponse +func (c *ClientWithResponses) UnarchiveJourneyWithResponse(ctx context.Context, projectID openapi_types.UUID, journeyID openapi_types.UUID, reqEditors ...RequestEditorFn) (*UnarchiveJourneyResponse, error) { + rsp, err := c.UnarchiveJourney(ctx, projectID, journeyID, reqEditors...) + if err != nil { + return nil, err + } + return ParseUnarchiveJourneyResponse(rsp) +} + // CancelUserJourneyWithResponse request returning *CancelUserJourneyResponse func (c *ClientWithResponses) CancelUserJourneyWithResponse(ctx context.Context, projectID openapi_types.UUID, journeyID openapi_types.UUID, userID openapi_types.UUID, reqEditors ...RequestEditorFn) (*CancelUserJourneyResponse, error) { rsp, err := c.CancelUserJourney(ctx, projectID, journeyID, userID, reqEditors...) @@ -18738,6 +20621,15 @@ func (c *ClientWithResponses) DuplicateListWithResponse(ctx context.Context, pro return ParseDuplicateListResponse(rsp) } +// UnarchiveListWithResponse request returning *UnarchiveListResponse +func (c *ClientWithResponses) UnarchiveListWithResponse(ctx context.Context, projectID openapi_types.UUID, listID openapi_types.UUID, reqEditors ...RequestEditorFn) (*UnarchiveListResponse, error) { + rsp, err := c.UnarchiveList(ctx, projectID, listID, reqEditors...) + if err != nil { + return nil, err + } + return ParseUnarchiveListResponse(rsp) +} + // GetListUsersWithResponse request returning *GetListUsersResponse func (c *ClientWithResponses) GetListUsersWithResponse(ctx context.Context, projectID openapi_types.UUID, listID openapi_types.UUID, params *GetListUsersParams, reqEditors ...RequestEditorFn) (*GetListUsersResponse, error) { rsp, err := c.GetListUsers(ctx, projectID, listID, params, reqEditors...) @@ -20941,6 +22833,32 @@ func ParseSendTestResponse(rsp *http.Response) (*SendTestResponse, error) { return response, nil } +// ParseUnarchiveCampaignResponse parses an HTTP response from a UnarchiveCampaignWithResponse call +func ParseUnarchiveCampaignResponse(rsp *http.Response) (*UnarchiveCampaignResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &UnarchiveCampaignResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && true: + var dest Error + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSONDefault = &dest + + } + + return response, nil +} + // ParseGetCampaignUsersResponse parses an HTTP response from a GetCampaignUsersWithResponse call func ParseGetCampaignUsersResponse(rsp *http.Response) (*GetCampaignUsersResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) @@ -21398,7 +23316,40 @@ func ParseGetJourneyStepsResponse(rsp *http.Response) (*GetJourneyStepsResponse, return nil, err } - response := &GetJourneyStepsResponse{ + response := &GetJourneyStepsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest JourneyStepMap + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && true: + var dest Error + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSONDefault = &dest + + } + + return response, nil +} + +// ParseSetJourneyStepsResponse parses an HTTP response from a SetJourneyStepsWithResponse call +func ParseSetJourneyStepsResponse(rsp *http.Response) (*SetJourneyStepsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &SetJourneyStepsResponse{ Body: bodyBytes, HTTPResponse: rsp, } @@ -21423,27 +23374,20 @@ func ParseGetJourneyStepsResponse(rsp *http.Response) (*GetJourneyStepsResponse, return response, nil } -// ParseSetJourneyStepsResponse parses an HTTP response from a SetJourneyStepsWithResponse call -func ParseSetJourneyStepsResponse(rsp *http.Response) (*SetJourneyStepsResponse, error) { +// ParseUnarchiveJourneyResponse parses an HTTP response from a UnarchiveJourneyWithResponse call +func ParseUnarchiveJourneyResponse(rsp *http.Response) (*UnarchiveJourneyResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &SetJourneyStepsResponse{ + response := &UnarchiveJourneyResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest JourneyStepMap - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && true: var dest Error if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -21979,6 +23923,32 @@ func ParseDuplicateListResponse(rsp *http.Response) (*DuplicateListResponse, err return response, nil } +// ParseUnarchiveListResponse parses an HTTP response from a UnarchiveListWithResponse call +func ParseUnarchiveListResponse(rsp *http.Response) (*UnarchiveListResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &UnarchiveListResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && true: + var dest Error + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSONDefault = &dest + + } + + return response, nil +} + // ParseGetListUsersResponse parses an HTTP response from a GetListUsersWithResponse call func ParseGetListUsersResponse(rsp *http.Response) (*GetListUsersResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) @@ -24695,6 +26665,9 @@ type ServerInterface interface { // Send test // (POST /api/admin/projects/{projectID}/campaigns/{campaignID}/templates/{templateID}/test) SendTest(w http.ResponseWriter, r *http.Request, projectID openapi_types.UUID, campaignID openapi_types.UUID, templateID openapi_types.UUID) + // Unarchive campaign + // (POST /api/admin/projects/{projectID}/campaigns/{campaignID}/unarchive) + UnarchiveCampaign(w http.ResponseWriter, r *http.Request, projectID openapi_types.UUID, campaignID openapi_types.UUID) // Get campaign users // (GET /api/admin/projects/{projectID}/campaigns/{campaignID}/users) GetCampaignUsers(w http.ResponseWriter, r *http.Request, projectID openapi_types.UUID, campaignID openapi_types.UUID, params GetCampaignUsersParams) @@ -24743,6 +26716,9 @@ type ServerInterface interface { // Set journey steps // (PUT /api/admin/projects/{projectID}/journeys/{journeyID}/steps) SetJourneySteps(w http.ResponseWriter, r *http.Request, projectID openapi_types.UUID, journeyID openapi_types.UUID) + // Unarchive journey + // (POST /api/admin/projects/{projectID}/journeys/{journeyID}/unarchive) + UnarchiveJourney(w http.ResponseWriter, r *http.Request, projectID openapi_types.UUID, journeyID openapi_types.UUID) // Cancel user journey // (DELETE /api/admin/projects/{projectID}/journeys/{journeyID}/users/{userID}) CancelUserJourney(w http.ResponseWriter, r *http.Request, projectID openapi_types.UUID, journeyID openapi_types.UUID, userID openapi_types.UUID) @@ -24794,6 +26770,9 @@ type ServerInterface interface { // Duplicate list // (POST /api/admin/projects/{projectID}/lists/{listID}/duplicate) DuplicateList(w http.ResponseWriter, r *http.Request, projectID openapi_types.UUID, listID openapi_types.UUID) + // Unarchive list + // (POST /api/admin/projects/{projectID}/lists/{listID}/unarchive) + UnarchiveList(w http.ResponseWriter, r *http.Request, projectID openapi_types.UUID, listID openapi_types.UUID) // Get list users // (GET /api/admin/projects/{projectID}/lists/{listID}/users) GetListUsers(w http.ResponseWriter, r *http.Request, projectID openapi_types.UUID, listID openapi_types.UUID, params GetListUsersParams) @@ -25283,6 +27262,12 @@ func (_ Unimplemented) SendTest(w http.ResponseWriter, r *http.Request, projectI w.WriteHeader(http.StatusNotImplemented) } +// Unarchive campaign +// (POST /api/admin/projects/{projectID}/campaigns/{campaignID}/unarchive) +func (_ Unimplemented) UnarchiveCampaign(w http.ResponseWriter, r *http.Request, projectID openapi_types.UUID, campaignID openapi_types.UUID) { + w.WriteHeader(http.StatusNotImplemented) +} + // Get campaign users // (GET /api/admin/projects/{projectID}/campaigns/{campaignID}/users) func (_ Unimplemented) GetCampaignUsers(w http.ResponseWriter, r *http.Request, projectID openapi_types.UUID, campaignID openapi_types.UUID, params GetCampaignUsersParams) { @@ -25379,6 +27364,12 @@ func (_ Unimplemented) SetJourneySteps(w http.ResponseWriter, r *http.Request, p w.WriteHeader(http.StatusNotImplemented) } +// Unarchive journey +// (POST /api/admin/projects/{projectID}/journeys/{journeyID}/unarchive) +func (_ Unimplemented) UnarchiveJourney(w http.ResponseWriter, r *http.Request, projectID openapi_types.UUID, journeyID openapi_types.UUID) { + w.WriteHeader(http.StatusNotImplemented) +} + // Cancel user journey // (DELETE /api/admin/projects/{projectID}/journeys/{journeyID}/users/{userID}) func (_ Unimplemented) CancelUserJourney(w http.ResponseWriter, r *http.Request, projectID openapi_types.UUID, journeyID openapi_types.UUID, userID openapi_types.UUID) { @@ -25481,6 +27472,12 @@ func (_ Unimplemented) DuplicateList(w http.ResponseWriter, r *http.Request, pro w.WriteHeader(http.StatusNotImplemented) } +// Unarchive list +// (POST /api/admin/projects/{projectID}/lists/{listID}/unarchive) +func (_ Unimplemented) UnarchiveList(w http.ResponseWriter, r *http.Request, projectID openapi_types.UUID, listID openapi_types.UUID) { + w.WriteHeader(http.StatusNotImplemented) +} + // Get list users // (GET /api/admin/projects/{projectID}/lists/{listID}/users) func (_ Unimplemented) GetListUsers(w http.ResponseWriter, r *http.Request, projectID openapi_types.UUID, listID openapi_types.UUID, params GetListUsersParams) { @@ -26012,6 +28009,7 @@ func (siw *ServerInterfaceWrapper) GetProfile(w http.ResponseWriter, r *http.Req func (siw *ServerInterfaceWrapper) ListProjects(w http.ResponseWriter, r *http.Request) { var err error + _ = err ctx := r.Context() @@ -26024,25 +28022,40 @@ func (siw *ServerInterfaceWrapper) ListProjects(w http.ResponseWriter, r *http.R // ------------- Optional query parameter "limit" ------------- - err = runtime.BindQueryParameter("form", true, false, "limit", r.URL.Query(), ¶ms.Limit) + err = runtime.BindQueryParameterWithOptions("form", true, false, "limit", r.URL.Query(), ¶ms.Limit, runtime.BindQueryParameterOptions{Type: "integer", Format: ""}) if err != nil { - siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "limit", Err: err}) + var requiredError *runtime.RequiredParameterError + if errors.As(err, &requiredError) { + siw.ErrorHandlerFunc(w, r, &RequiredParamError{ParamName: "limit"}) + } else { + siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "limit", Err: err}) + } return } // ------------- Optional query parameter "offset" ------------- - err = runtime.BindQueryParameter("form", true, false, "offset", r.URL.Query(), ¶ms.Offset) + err = runtime.BindQueryParameterWithOptions("form", true, false, "offset", r.URL.Query(), ¶ms.Offset, runtime.BindQueryParameterOptions{Type: "integer", Format: ""}) if err != nil { - siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "offset", Err: err}) + var requiredError *runtime.RequiredParameterError + if errors.As(err, &requiredError) { + siw.ErrorHandlerFunc(w, r, &RequiredParamError{ParamName: "offset"}) + } else { + siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "offset", Err: err}) + } return } // ------------- Optional query parameter "search" ------------- - err = runtime.BindQueryParameter("form", true, false, "search", r.URL.Query(), ¶ms.Search) + err = runtime.BindQueryParameterWithOptions("form", true, false, "search", r.URL.Query(), ¶ms.Search, runtime.BindQueryParameterOptions{Type: "string", Format: ""}) if err != nil { - siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "search", Err: err}) + var requiredError *runtime.RequiredParameterError + if errors.As(err, &requiredError) { + siw.ErrorHandlerFunc(w, r, &RequiredParamError{ParamName: "search"}) + } else { + siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "search", Err: err}) + } return } @@ -26081,11 +28094,12 @@ func (siw *ServerInterfaceWrapper) CreateProject(w http.ResponseWriter, r *http. func (siw *ServerInterfaceWrapper) DeleteProject(w http.ResponseWriter, r *http.Request) { var err error + _ = err // ------------- Path parameter "projectID" ------------- var projectID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "projectID", Err: err}) return @@ -26112,11 +28126,12 @@ func (siw *ServerInterfaceWrapper) DeleteProject(w http.ResponseWriter, r *http. func (siw *ServerInterfaceWrapper) GetProject(w http.ResponseWriter, r *http.Request) { var err error + _ = err // ------------- Path parameter "projectID" ------------- var projectID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "projectID", Err: err}) return @@ -26143,11 +28158,12 @@ func (siw *ServerInterfaceWrapper) GetProject(w http.ResponseWriter, r *http.Req func (siw *ServerInterfaceWrapper) UpdateProject(w http.ResponseWriter, r *http.Request) { var err error + _ = err // ------------- Path parameter "projectID" ------------- var projectID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "projectID", Err: err}) return @@ -26174,11 +28190,12 @@ func (siw *ServerInterfaceWrapper) UpdateProject(w http.ResponseWriter, r *http. func (siw *ServerInterfaceWrapper) ListActions(w http.ResponseWriter, r *http.Request) { var err error + _ = err // ------------- Path parameter "projectID" ------------- var projectID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "projectID", Err: err}) return @@ -26195,25 +28212,40 @@ func (siw *ServerInterfaceWrapper) ListActions(w http.ResponseWriter, r *http.Re // ------------- Optional query parameter "limit" ------------- - err = runtime.BindQueryParameter("form", true, false, "limit", r.URL.Query(), ¶ms.Limit) + err = runtime.BindQueryParameterWithOptions("form", true, false, "limit", r.URL.Query(), ¶ms.Limit, runtime.BindQueryParameterOptions{Type: "integer", Format: ""}) if err != nil { - siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "limit", Err: err}) + var requiredError *runtime.RequiredParameterError + if errors.As(err, &requiredError) { + siw.ErrorHandlerFunc(w, r, &RequiredParamError{ParamName: "limit"}) + } else { + siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "limit", Err: err}) + } return } // ------------- Optional query parameter "offset" ------------- - err = runtime.BindQueryParameter("form", true, false, "offset", r.URL.Query(), ¶ms.Offset) + err = runtime.BindQueryParameterWithOptions("form", true, false, "offset", r.URL.Query(), ¶ms.Offset, runtime.BindQueryParameterOptions{Type: "integer", Format: ""}) if err != nil { - siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "offset", Err: err}) + var requiredError *runtime.RequiredParameterError + if errors.As(err, &requiredError) { + siw.ErrorHandlerFunc(w, r, &RequiredParamError{ParamName: "offset"}) + } else { + siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "offset", Err: err}) + } return } // ------------- Optional query parameter "search" ------------- - err = runtime.BindQueryParameter("form", true, false, "search", r.URL.Query(), ¶ms.Search) + err = runtime.BindQueryParameterWithOptions("form", true, false, "search", r.URL.Query(), ¶ms.Search, runtime.BindQueryParameterOptions{Type: "string", Format: ""}) if err != nil { - siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "search", Err: err}) + var requiredError *runtime.RequiredParameterError + if errors.As(err, &requiredError) { + siw.ErrorHandlerFunc(w, r, &RequiredParamError{ParamName: "search"}) + } else { + siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "search", Err: err}) + } return } @@ -26232,11 +28264,12 @@ func (siw *ServerInterfaceWrapper) ListActions(w http.ResponseWriter, r *http.Re func (siw *ServerInterfaceWrapper) CreateAction(w http.ResponseWriter, r *http.Request) { var err error + _ = err // ------------- Path parameter "projectID" ------------- var projectID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "projectID", Err: err}) return @@ -26263,11 +28296,12 @@ func (siw *ServerInterfaceWrapper) CreateAction(w http.ResponseWriter, r *http.R func (siw *ServerInterfaceWrapper) ListActionMeta(w http.ResponseWriter, r *http.Request) { var err error + _ = err // ------------- Path parameter "projectID" ------------- var projectID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "projectID", Err: err}) return @@ -26294,11 +28328,12 @@ func (siw *ServerInterfaceWrapper) ListActionMeta(w http.ResponseWriter, r *http func (siw *ServerInterfaceWrapper) GetActionPreview(w http.ResponseWriter, r *http.Request) { var err error + _ = err // ------------- Path parameter "projectID" ------------- var projectID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "projectID", Err: err}) return @@ -26307,7 +28342,7 @@ func (siw *ServerInterfaceWrapper) GetActionPreview(w http.ResponseWriter, r *ht // ------------- Path parameter "actionType" ------------- var actionType string - err = runtime.BindStyledParameterWithOptions("simple", "actionType", chi.URLParam(r, "actionType"), &actionType, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "actionType", chi.URLParam(r, "actionType"), &actionType, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: ""}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "actionType", Err: err}) return @@ -26334,11 +28369,12 @@ func (siw *ServerInterfaceWrapper) GetActionPreview(w http.ResponseWriter, r *ht func (siw *ServerInterfaceWrapper) TestAction(w http.ResponseWriter, r *http.Request) { var err error + _ = err // ------------- Path parameter "projectID" ------------- var projectID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "projectID", Err: err}) return @@ -26365,11 +28401,12 @@ func (siw *ServerInterfaceWrapper) TestAction(w http.ResponseWriter, r *http.Req func (siw *ServerInterfaceWrapper) DeleteAction(w http.ResponseWriter, r *http.Request) { var err error + _ = err // ------------- Path parameter "projectID" ------------- var projectID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "projectID", Err: err}) return @@ -26378,7 +28415,7 @@ func (siw *ServerInterfaceWrapper) DeleteAction(w http.ResponseWriter, r *http.R // ------------- Path parameter "actionID" ------------- var actionID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "actionID", chi.URLParam(r, "actionID"), &actionID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "actionID", chi.URLParam(r, "actionID"), &actionID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "actionID", Err: err}) return @@ -26405,11 +28442,12 @@ func (siw *ServerInterfaceWrapper) DeleteAction(w http.ResponseWriter, r *http.R func (siw *ServerInterfaceWrapper) GetAction(w http.ResponseWriter, r *http.Request) { var err error + _ = err // ------------- Path parameter "projectID" ------------- var projectID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "projectID", Err: err}) return @@ -26418,7 +28456,7 @@ func (siw *ServerInterfaceWrapper) GetAction(w http.ResponseWriter, r *http.Requ // ------------- Path parameter "actionID" ------------- var actionID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "actionID", chi.URLParam(r, "actionID"), &actionID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "actionID", chi.URLParam(r, "actionID"), &actionID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "actionID", Err: err}) return @@ -26445,11 +28483,12 @@ func (siw *ServerInterfaceWrapper) GetAction(w http.ResponseWriter, r *http.Requ func (siw *ServerInterfaceWrapper) UpdateAction(w http.ResponseWriter, r *http.Request) { var err error + _ = err // ------------- Path parameter "projectID" ------------- var projectID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "projectID", Err: err}) return @@ -26458,7 +28497,7 @@ func (siw *ServerInterfaceWrapper) UpdateAction(w http.ResponseWriter, r *http.R // ------------- Path parameter "actionID" ------------- var actionID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "actionID", chi.URLParam(r, "actionID"), &actionID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "actionID", chi.URLParam(r, "actionID"), &actionID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "actionID", Err: err}) return @@ -26485,11 +28524,12 @@ func (siw *ServerInterfaceWrapper) UpdateAction(w http.ResponseWriter, r *http.R func (siw *ServerInterfaceWrapper) ListActionSchemas(w http.ResponseWriter, r *http.Request) { var err error + _ = err // ------------- Path parameter "projectID" ------------- var projectID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "projectID", Err: err}) return @@ -26498,7 +28538,7 @@ func (siw *ServerInterfaceWrapper) ListActionSchemas(w http.ResponseWriter, r *h // ------------- Path parameter "actionID" ------------- var actionID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "actionID", chi.URLParam(r, "actionID"), &actionID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "actionID", chi.URLParam(r, "actionID"), &actionID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "actionID", Err: err}) return @@ -26507,7 +28547,7 @@ func (siw *ServerInterfaceWrapper) ListActionSchemas(w http.ResponseWriter, r *h // ------------- Path parameter "functionID" ------------- var functionID string - err = runtime.BindStyledParameterWithOptions("simple", "functionID", chi.URLParam(r, "functionID"), &functionID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "functionID", chi.URLParam(r, "functionID"), &functionID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: ""}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "functionID", Err: err}) return @@ -26534,11 +28574,12 @@ func (siw *ServerInterfaceWrapper) ListActionSchemas(w http.ResponseWriter, r *h func (siw *ServerInterfaceWrapper) TestActionFunction(w http.ResponseWriter, r *http.Request) { var err error + _ = err // ------------- Path parameter "projectID" ------------- var projectID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "projectID", Err: err}) return @@ -26547,7 +28588,7 @@ func (siw *ServerInterfaceWrapper) TestActionFunction(w http.ResponseWriter, r * // ------------- Path parameter "actionID" ------------- var actionID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "actionID", chi.URLParam(r, "actionID"), &actionID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "actionID", chi.URLParam(r, "actionID"), &actionID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "actionID", Err: err}) return @@ -26556,7 +28597,7 @@ func (siw *ServerInterfaceWrapper) TestActionFunction(w http.ResponseWriter, r * // ------------- Path parameter "functionID" ------------- var functionID string - err = runtime.BindStyledParameterWithOptions("simple", "functionID", chi.URLParam(r, "functionID"), &functionID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "functionID", chi.URLParam(r, "functionID"), &functionID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: ""}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "functionID", Err: err}) return @@ -26583,11 +28624,12 @@ func (siw *ServerInterfaceWrapper) TestActionFunction(w http.ResponseWriter, r * func (siw *ServerInterfaceWrapper) ListProjectAdmins(w http.ResponseWriter, r *http.Request) { var err error + _ = err // ------------- Path parameter "projectID" ------------- var projectID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "projectID", Err: err}) return @@ -26604,25 +28646,40 @@ func (siw *ServerInterfaceWrapper) ListProjectAdmins(w http.ResponseWriter, r *h // ------------- Optional query parameter "limit" ------------- - err = runtime.BindQueryParameter("form", true, false, "limit", r.URL.Query(), ¶ms.Limit) + err = runtime.BindQueryParameterWithOptions("form", true, false, "limit", r.URL.Query(), ¶ms.Limit, runtime.BindQueryParameterOptions{Type: "integer", Format: ""}) if err != nil { - siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "limit", Err: err}) + var requiredError *runtime.RequiredParameterError + if errors.As(err, &requiredError) { + siw.ErrorHandlerFunc(w, r, &RequiredParamError{ParamName: "limit"}) + } else { + siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "limit", Err: err}) + } return } // ------------- Optional query parameter "offset" ------------- - err = runtime.BindQueryParameter("form", true, false, "offset", r.URL.Query(), ¶ms.Offset) + err = runtime.BindQueryParameterWithOptions("form", true, false, "offset", r.URL.Query(), ¶ms.Offset, runtime.BindQueryParameterOptions{Type: "integer", Format: ""}) if err != nil { - siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "offset", Err: err}) + var requiredError *runtime.RequiredParameterError + if errors.As(err, &requiredError) { + siw.ErrorHandlerFunc(w, r, &RequiredParamError{ParamName: "offset"}) + } else { + siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "offset", Err: err}) + } return } // ------------- Optional query parameter "search" ------------- - err = runtime.BindQueryParameter("form", true, false, "search", r.URL.Query(), ¶ms.Search) + err = runtime.BindQueryParameterWithOptions("form", true, false, "search", r.URL.Query(), ¶ms.Search, runtime.BindQueryParameterOptions{Type: "string", Format: ""}) if err != nil { - siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "search", Err: err}) + var requiredError *runtime.RequiredParameterError + if errors.As(err, &requiredError) { + siw.ErrorHandlerFunc(w, r, &RequiredParamError{ParamName: "search"}) + } else { + siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "search", Err: err}) + } return } @@ -26641,11 +28698,12 @@ func (siw *ServerInterfaceWrapper) ListProjectAdmins(w http.ResponseWriter, r *h func (siw *ServerInterfaceWrapper) DeleteProjectAdmin(w http.ResponseWriter, r *http.Request) { var err error + _ = err // ------------- Path parameter "projectID" ------------- var projectID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "projectID", Err: err}) return @@ -26654,7 +28712,7 @@ func (siw *ServerInterfaceWrapper) DeleteProjectAdmin(w http.ResponseWriter, r * // ------------- Path parameter "adminID" ------------- var adminID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "adminID", chi.URLParam(r, "adminID"), &adminID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "adminID", chi.URLParam(r, "adminID"), &adminID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "adminID", Err: err}) return @@ -26681,11 +28739,12 @@ func (siw *ServerInterfaceWrapper) DeleteProjectAdmin(w http.ResponseWriter, r * func (siw *ServerInterfaceWrapper) GetProjectAdmin(w http.ResponseWriter, r *http.Request) { var err error + _ = err // ------------- Path parameter "projectID" ------------- var projectID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "projectID", Err: err}) return @@ -26694,7 +28753,7 @@ func (siw *ServerInterfaceWrapper) GetProjectAdmin(w http.ResponseWriter, r *htt // ------------- Path parameter "adminID" ------------- var adminID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "adminID", chi.URLParam(r, "adminID"), &adminID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "adminID", chi.URLParam(r, "adminID"), &adminID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "adminID", Err: err}) return @@ -26721,11 +28780,12 @@ func (siw *ServerInterfaceWrapper) GetProjectAdmin(w http.ResponseWriter, r *htt func (siw *ServerInterfaceWrapper) UpdateProjectAdmin(w http.ResponseWriter, r *http.Request) { var err error + _ = err // ------------- Path parameter "projectID" ------------- var projectID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "projectID", Err: err}) return @@ -26734,7 +28794,7 @@ func (siw *ServerInterfaceWrapper) UpdateProjectAdmin(w http.ResponseWriter, r * // ------------- Path parameter "adminID" ------------- var adminID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "adminID", chi.URLParam(r, "adminID"), &adminID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "adminID", chi.URLParam(r, "adminID"), &adminID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "adminID", Err: err}) return @@ -26761,11 +28821,12 @@ func (siw *ServerInterfaceWrapper) UpdateProjectAdmin(w http.ResponseWriter, r * func (siw *ServerInterfaceWrapper) ListBroadcasts(w http.ResponseWriter, r *http.Request) { var err error + _ = err // ------------- Path parameter "projectID" ------------- var projectID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "projectID", Err: err}) return @@ -26782,49 +28843,79 @@ func (siw *ServerInterfaceWrapper) ListBroadcasts(w http.ResponseWriter, r *http // ------------- Optional query parameter "limit" ------------- - err = runtime.BindQueryParameter("form", true, false, "limit", r.URL.Query(), ¶ms.Limit) + err = runtime.BindQueryParameterWithOptions("form", true, false, "limit", r.URL.Query(), ¶ms.Limit, runtime.BindQueryParameterOptions{Type: "integer", Format: ""}) if err != nil { - siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "limit", Err: err}) + var requiredError *runtime.RequiredParameterError + if errors.As(err, &requiredError) { + siw.ErrorHandlerFunc(w, r, &RequiredParamError{ParamName: "limit"}) + } else { + siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "limit", Err: err}) + } return } // ------------- Optional query parameter "offset" ------------- - err = runtime.BindQueryParameter("form", true, false, "offset", r.URL.Query(), ¶ms.Offset) + err = runtime.BindQueryParameterWithOptions("form", true, false, "offset", r.URL.Query(), ¶ms.Offset, runtime.BindQueryParameterOptions{Type: "integer", Format: ""}) if err != nil { - siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "offset", Err: err}) + var requiredError *runtime.RequiredParameterError + if errors.As(err, &requiredError) { + siw.ErrorHandlerFunc(w, r, &RequiredParamError{ParamName: "offset"}) + } else { + siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "offset", Err: err}) + } return } // ------------- Optional query parameter "search" ------------- - err = runtime.BindQueryParameter("form", true, false, "search", r.URL.Query(), ¶ms.Search) + err = runtime.BindQueryParameterWithOptions("form", true, false, "search", r.URL.Query(), ¶ms.Search, runtime.BindQueryParameterOptions{Type: "string", Format: ""}) if err != nil { - siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "search", Err: err}) + var requiredError *runtime.RequiredParameterError + if errors.As(err, &requiredError) { + siw.ErrorHandlerFunc(w, r, &RequiredParamError{ParamName: "search"}) + } else { + siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "search", Err: err}) + } return } // ------------- Optional query parameter "campaign_id" ------------- - err = runtime.BindQueryParameter("form", true, false, "campaign_id", r.URL.Query(), ¶ms.CampaignId) + err = runtime.BindQueryParameterWithOptions("form", true, false, "campaign_id", r.URL.Query(), ¶ms.CampaignId, runtime.BindQueryParameterOptions{Type: "string", Format: "uuid"}) if err != nil { - siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "campaign_id", Err: err}) + var requiredError *runtime.RequiredParameterError + if errors.As(err, &requiredError) { + siw.ErrorHandlerFunc(w, r, &RequiredParamError{ParamName: "campaign_id"}) + } else { + siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "campaign_id", Err: err}) + } return } // ------------- Optional query parameter "list_id" ------------- - err = runtime.BindQueryParameter("form", true, false, "list_id", r.URL.Query(), ¶ms.ListId) + err = runtime.BindQueryParameterWithOptions("form", true, false, "list_id", r.URL.Query(), ¶ms.ListId, runtime.BindQueryParameterOptions{Type: "string", Format: "uuid"}) if err != nil { - siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "list_id", Err: err}) + var requiredError *runtime.RequiredParameterError + if errors.As(err, &requiredError) { + siw.ErrorHandlerFunc(w, r, &RequiredParamError{ParamName: "list_id"}) + } else { + siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "list_id", Err: err}) + } return } // ------------- Optional query parameter "state" ------------- - err = runtime.BindQueryParameter("form", true, false, "state", r.URL.Query(), ¶ms.State) + err = runtime.BindQueryParameterWithOptions("form", true, false, "state", r.URL.Query(), ¶ms.State, runtime.BindQueryParameterOptions{Type: "string", Format: ""}) if err != nil { - siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "state", Err: err}) + var requiredError *runtime.RequiredParameterError + if errors.As(err, &requiredError) { + siw.ErrorHandlerFunc(w, r, &RequiredParamError{ParamName: "state"}) + } else { + siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "state", Err: err}) + } return } @@ -26843,11 +28934,12 @@ func (siw *ServerInterfaceWrapper) ListBroadcasts(w http.ResponseWriter, r *http func (siw *ServerInterfaceWrapper) CreateBroadcast(w http.ResponseWriter, r *http.Request) { var err error + _ = err // ------------- Path parameter "projectID" ------------- var projectID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "projectID", Err: err}) return @@ -26874,11 +28966,12 @@ func (siw *ServerInterfaceWrapper) CreateBroadcast(w http.ResponseWriter, r *htt func (siw *ServerInterfaceWrapper) CancelBroadcast(w http.ResponseWriter, r *http.Request) { var err error + _ = err // ------------- Path parameter "projectID" ------------- var projectID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "projectID", Err: err}) return @@ -26887,7 +28980,7 @@ func (siw *ServerInterfaceWrapper) CancelBroadcast(w http.ResponseWriter, r *htt // ------------- Path parameter "broadcastID" ------------- var broadcastID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "broadcastID", chi.URLParam(r, "broadcastID"), &broadcastID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "broadcastID", chi.URLParam(r, "broadcastID"), &broadcastID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "broadcastID", Err: err}) return @@ -26914,11 +29007,12 @@ func (siw *ServerInterfaceWrapper) CancelBroadcast(w http.ResponseWriter, r *htt func (siw *ServerInterfaceWrapper) GetBroadcast(w http.ResponseWriter, r *http.Request) { var err error + _ = err // ------------- Path parameter "projectID" ------------- var projectID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "projectID", Err: err}) return @@ -26927,7 +29021,7 @@ func (siw *ServerInterfaceWrapper) GetBroadcast(w http.ResponseWriter, r *http.R // ------------- Path parameter "broadcastID" ------------- var broadcastID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "broadcastID", chi.URLParam(r, "broadcastID"), &broadcastID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "broadcastID", chi.URLParam(r, "broadcastID"), &broadcastID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "broadcastID", Err: err}) return @@ -26954,11 +29048,12 @@ func (siw *ServerInterfaceWrapper) GetBroadcast(w http.ResponseWriter, r *http.R func (siw *ServerInterfaceWrapper) UpdateBroadcast(w http.ResponseWriter, r *http.Request) { var err error + _ = err // ------------- Path parameter "projectID" ------------- var projectID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "projectID", Err: err}) return @@ -26967,7 +29062,7 @@ func (siw *ServerInterfaceWrapper) UpdateBroadcast(w http.ResponseWriter, r *htt // ------------- Path parameter "broadcastID" ------------- var broadcastID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "broadcastID", chi.URLParam(r, "broadcastID"), &broadcastID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "broadcastID", chi.URLParam(r, "broadcastID"), &broadcastID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "broadcastID", Err: err}) return @@ -26994,11 +29089,12 @@ func (siw *ServerInterfaceWrapper) UpdateBroadcast(w http.ResponseWriter, r *htt func (siw *ServerInterfaceWrapper) StreamBroadcastProgress(w http.ResponseWriter, r *http.Request) { var err error + _ = err // ------------- Path parameter "projectID" ------------- var projectID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "projectID", Err: err}) return @@ -27007,7 +29103,7 @@ func (siw *ServerInterfaceWrapper) StreamBroadcastProgress(w http.ResponseWriter // ------------- Path parameter "broadcastID" ------------- var broadcastID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "broadcastID", chi.URLParam(r, "broadcastID"), &broadcastID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "broadcastID", chi.URLParam(r, "broadcastID"), &broadcastID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "broadcastID", Err: err}) return @@ -27034,11 +29130,12 @@ func (siw *ServerInterfaceWrapper) StreamBroadcastProgress(w http.ResponseWriter func (siw *ServerInterfaceWrapper) SendBroadcast(w http.ResponseWriter, r *http.Request) { var err error + _ = err // ------------- Path parameter "projectID" ------------- var projectID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "projectID", Err: err}) return @@ -27047,7 +29144,7 @@ func (siw *ServerInterfaceWrapper) SendBroadcast(w http.ResponseWriter, r *http. // ------------- Path parameter "broadcastID" ------------- var broadcastID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "broadcastID", chi.URLParam(r, "broadcastID"), &broadcastID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "broadcastID", chi.URLParam(r, "broadcastID"), &broadcastID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "broadcastID", Err: err}) return @@ -27074,11 +29171,12 @@ func (siw *ServerInterfaceWrapper) SendBroadcast(w http.ResponseWriter, r *http. func (siw *ServerInterfaceWrapper) GetBroadcastUsers(w http.ResponseWriter, r *http.Request) { var err error + _ = err // ------------- Path parameter "projectID" ------------- var projectID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "projectID", Err: err}) return @@ -27087,7 +29185,7 @@ func (siw *ServerInterfaceWrapper) GetBroadcastUsers(w http.ResponseWriter, r *h // ------------- Path parameter "broadcastID" ------------- var broadcastID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "broadcastID", chi.URLParam(r, "broadcastID"), &broadcastID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "broadcastID", chi.URLParam(r, "broadcastID"), &broadcastID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "broadcastID", Err: err}) return @@ -27104,25 +29202,40 @@ func (siw *ServerInterfaceWrapper) GetBroadcastUsers(w http.ResponseWriter, r *h // ------------- Optional query parameter "limit" ------------- - err = runtime.BindQueryParameter("form", true, false, "limit", r.URL.Query(), ¶ms.Limit) + err = runtime.BindQueryParameterWithOptions("form", true, false, "limit", r.URL.Query(), ¶ms.Limit, runtime.BindQueryParameterOptions{Type: "integer", Format: ""}) if err != nil { - siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "limit", Err: err}) + var requiredError *runtime.RequiredParameterError + if errors.As(err, &requiredError) { + siw.ErrorHandlerFunc(w, r, &RequiredParamError{ParamName: "limit"}) + } else { + siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "limit", Err: err}) + } return } // ------------- Optional query parameter "offset" ------------- - err = runtime.BindQueryParameter("form", true, false, "offset", r.URL.Query(), ¶ms.Offset) + err = runtime.BindQueryParameterWithOptions("form", true, false, "offset", r.URL.Query(), ¶ms.Offset, runtime.BindQueryParameterOptions{Type: "integer", Format: ""}) if err != nil { - siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "offset", Err: err}) + var requiredError *runtime.RequiredParameterError + if errors.As(err, &requiredError) { + siw.ErrorHandlerFunc(w, r, &RequiredParamError{ParamName: "offset"}) + } else { + siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "offset", Err: err}) + } return } // ------------- Optional query parameter "search" ------------- - err = runtime.BindQueryParameter("form", true, false, "search", r.URL.Query(), ¶ms.Search) + err = runtime.BindQueryParameterWithOptions("form", true, false, "search", r.URL.Query(), ¶ms.Search, runtime.BindQueryParameterOptions{Type: "string", Format: ""}) if err != nil { - siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "search", Err: err}) + var requiredError *runtime.RequiredParameterError + if errors.As(err, &requiredError) { + siw.ErrorHandlerFunc(w, r, &RequiredParamError{ParamName: "search"}) + } else { + siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "search", Err: err}) + } return } @@ -27141,11 +29254,12 @@ func (siw *ServerInterfaceWrapper) GetBroadcastUsers(w http.ResponseWriter, r *h func (siw *ServerInterfaceWrapper) ListCampaigns(w http.ResponseWriter, r *http.Request) { var err error + _ = err // ------------- Path parameter "projectID" ------------- var projectID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "projectID", Err: err}) return @@ -27162,25 +29276,53 @@ func (siw *ServerInterfaceWrapper) ListCampaigns(w http.ResponseWriter, r *http. // ------------- Optional query parameter "limit" ------------- - err = runtime.BindQueryParameter("form", true, false, "limit", r.URL.Query(), ¶ms.Limit) + err = runtime.BindQueryParameterWithOptions("form", true, false, "limit", r.URL.Query(), ¶ms.Limit, runtime.BindQueryParameterOptions{Type: "integer", Format: ""}) if err != nil { - siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "limit", Err: err}) + var requiredError *runtime.RequiredParameterError + if errors.As(err, &requiredError) { + siw.ErrorHandlerFunc(w, r, &RequiredParamError{ParamName: "limit"}) + } else { + siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "limit", Err: err}) + } return } // ------------- Optional query parameter "offset" ------------- - err = runtime.BindQueryParameter("form", true, false, "offset", r.URL.Query(), ¶ms.Offset) + err = runtime.BindQueryParameterWithOptions("form", true, false, "offset", r.URL.Query(), ¶ms.Offset, runtime.BindQueryParameterOptions{Type: "integer", Format: ""}) if err != nil { - siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "offset", Err: err}) + var requiredError *runtime.RequiredParameterError + if errors.As(err, &requiredError) { + siw.ErrorHandlerFunc(w, r, &RequiredParamError{ParamName: "offset"}) + } else { + siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "offset", Err: err}) + } return } // ------------- Optional query parameter "search" ------------- - err = runtime.BindQueryParameter("form", true, false, "search", r.URL.Query(), ¶ms.Search) + err = runtime.BindQueryParameterWithOptions("form", true, false, "search", r.URL.Query(), ¶ms.Search, runtime.BindQueryParameterOptions{Type: "string", Format: ""}) + if err != nil { + var requiredError *runtime.RequiredParameterError + if errors.As(err, &requiredError) { + siw.ErrorHandlerFunc(w, r, &RequiredParamError{ParamName: "search"}) + } else { + siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "search", Err: err}) + } + return + } + + // ------------- Optional query parameter "include_deleted" ------------- + + err = runtime.BindQueryParameterWithOptions("form", true, false, "include_deleted", r.URL.Query(), ¶ms.IncludeDeleted, runtime.BindQueryParameterOptions{Type: "boolean", Format: ""}) if err != nil { - siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "search", Err: err}) + var requiredError *runtime.RequiredParameterError + if errors.As(err, &requiredError) { + siw.ErrorHandlerFunc(w, r, &RequiredParamError{ParamName: "include_deleted"}) + } else { + siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "include_deleted", Err: err}) + } return } @@ -27199,11 +29341,12 @@ func (siw *ServerInterfaceWrapper) ListCampaigns(w http.ResponseWriter, r *http. func (siw *ServerInterfaceWrapper) CreateCampaign(w http.ResponseWriter, r *http.Request) { var err error + _ = err // ------------- Path parameter "projectID" ------------- var projectID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "projectID", Err: err}) return @@ -27230,11 +29373,12 @@ func (siw *ServerInterfaceWrapper) CreateCampaign(w http.ResponseWriter, r *http func (siw *ServerInterfaceWrapper) DeleteCampaign(w http.ResponseWriter, r *http.Request) { var err error + _ = err // ------------- Path parameter "projectID" ------------- var projectID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "projectID", Err: err}) return @@ -27243,7 +29387,7 @@ func (siw *ServerInterfaceWrapper) DeleteCampaign(w http.ResponseWriter, r *http // ------------- Path parameter "campaignID" ------------- var campaignID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "campaignID", chi.URLParam(r, "campaignID"), &campaignID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "campaignID", chi.URLParam(r, "campaignID"), &campaignID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "campaignID", Err: err}) return @@ -27270,11 +29414,12 @@ func (siw *ServerInterfaceWrapper) DeleteCampaign(w http.ResponseWriter, r *http func (siw *ServerInterfaceWrapper) GetCampaign(w http.ResponseWriter, r *http.Request) { var err error + _ = err // ------------- Path parameter "projectID" ------------- var projectID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "projectID", Err: err}) return @@ -27283,7 +29428,7 @@ func (siw *ServerInterfaceWrapper) GetCampaign(w http.ResponseWriter, r *http.Re // ------------- Path parameter "campaignID" ------------- var campaignID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "campaignID", chi.URLParam(r, "campaignID"), &campaignID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "campaignID", chi.URLParam(r, "campaignID"), &campaignID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "campaignID", Err: err}) return @@ -27310,11 +29455,12 @@ func (siw *ServerInterfaceWrapper) GetCampaign(w http.ResponseWriter, r *http.Re func (siw *ServerInterfaceWrapper) UpdateCampaign(w http.ResponseWriter, r *http.Request) { var err error + _ = err // ------------- Path parameter "projectID" ------------- var projectID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "projectID", Err: err}) return @@ -27323,7 +29469,7 @@ func (siw *ServerInterfaceWrapper) UpdateCampaign(w http.ResponseWriter, r *http // ------------- Path parameter "campaignID" ------------- var campaignID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "campaignID", chi.URLParam(r, "campaignID"), &campaignID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "campaignID", chi.URLParam(r, "campaignID"), &campaignID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "campaignID", Err: err}) return @@ -27350,11 +29496,12 @@ func (siw *ServerInterfaceWrapper) UpdateCampaign(w http.ResponseWriter, r *http func (siw *ServerInterfaceWrapper) DuplicateCampaign(w http.ResponseWriter, r *http.Request) { var err error + _ = err // ------------- Path parameter "projectID" ------------- var projectID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "projectID", Err: err}) return @@ -27363,7 +29510,7 @@ func (siw *ServerInterfaceWrapper) DuplicateCampaign(w http.ResponseWriter, r *h // ------------- Path parameter "campaignID" ------------- var campaignID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "campaignID", chi.URLParam(r, "campaignID"), &campaignID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "campaignID", chi.URLParam(r, "campaignID"), &campaignID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "campaignID", Err: err}) return @@ -27390,11 +29537,12 @@ func (siw *ServerInterfaceWrapper) DuplicateCampaign(w http.ResponseWriter, r *h func (siw *ServerInterfaceWrapper) CreateTemplate(w http.ResponseWriter, r *http.Request) { var err error + _ = err // ------------- Path parameter "projectID" ------------- var projectID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "projectID", Err: err}) return @@ -27403,7 +29551,7 @@ func (siw *ServerInterfaceWrapper) CreateTemplate(w http.ResponseWriter, r *http // ------------- Path parameter "campaignID" ------------- var campaignID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "campaignID", chi.URLParam(r, "campaignID"), &campaignID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "campaignID", chi.URLParam(r, "campaignID"), &campaignID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "campaignID", Err: err}) return @@ -27430,11 +29578,12 @@ func (siw *ServerInterfaceWrapper) CreateTemplate(w http.ResponseWriter, r *http func (siw *ServerInterfaceWrapper) DeleteTemplate(w http.ResponseWriter, r *http.Request) { var err error + _ = err // ------------- Path parameter "projectID" ------------- var projectID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "projectID", Err: err}) return @@ -27443,7 +29592,7 @@ func (siw *ServerInterfaceWrapper) DeleteTemplate(w http.ResponseWriter, r *http // ------------- Path parameter "campaignID" ------------- var campaignID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "campaignID", chi.URLParam(r, "campaignID"), &campaignID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "campaignID", chi.URLParam(r, "campaignID"), &campaignID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "campaignID", Err: err}) return @@ -27452,7 +29601,7 @@ func (siw *ServerInterfaceWrapper) DeleteTemplate(w http.ResponseWriter, r *http // ------------- Path parameter "templateID" ------------- var templateID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "templateID", chi.URLParam(r, "templateID"), &templateID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "templateID", chi.URLParam(r, "templateID"), &templateID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "templateID", Err: err}) return @@ -27479,11 +29628,12 @@ func (siw *ServerInterfaceWrapper) DeleteTemplate(w http.ResponseWriter, r *http func (siw *ServerInterfaceWrapper) GetTemplate(w http.ResponseWriter, r *http.Request) { var err error + _ = err // ------------- Path parameter "projectID" ------------- var projectID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "projectID", Err: err}) return @@ -27492,7 +29642,7 @@ func (siw *ServerInterfaceWrapper) GetTemplate(w http.ResponseWriter, r *http.Re // ------------- Path parameter "campaignID" ------------- var campaignID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "campaignID", chi.URLParam(r, "campaignID"), &campaignID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "campaignID", chi.URLParam(r, "campaignID"), &campaignID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "campaignID", Err: err}) return @@ -27501,7 +29651,7 @@ func (siw *ServerInterfaceWrapper) GetTemplate(w http.ResponseWriter, r *http.Re // ------------- Path parameter "templateID" ------------- var templateID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "templateID", chi.URLParam(r, "templateID"), &templateID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "templateID", chi.URLParam(r, "templateID"), &templateID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "templateID", Err: err}) return @@ -27528,11 +29678,12 @@ func (siw *ServerInterfaceWrapper) GetTemplate(w http.ResponseWriter, r *http.Re func (siw *ServerInterfaceWrapper) UpdateTemplate(w http.ResponseWriter, r *http.Request) { var err error + _ = err // ------------- Path parameter "projectID" ------------- var projectID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "projectID", Err: err}) return @@ -27541,7 +29692,7 @@ func (siw *ServerInterfaceWrapper) UpdateTemplate(w http.ResponseWriter, r *http // ------------- Path parameter "campaignID" ------------- var campaignID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "campaignID", chi.URLParam(r, "campaignID"), &campaignID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "campaignID", chi.URLParam(r, "campaignID"), &campaignID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "campaignID", Err: err}) return @@ -27550,7 +29701,7 @@ func (siw *ServerInterfaceWrapper) UpdateTemplate(w http.ResponseWriter, r *http // ------------- Path parameter "templateID" ------------- var templateID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "templateID", chi.URLParam(r, "templateID"), &templateID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "templateID", chi.URLParam(r, "templateID"), &templateID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "templateID", Err: err}) return @@ -27577,11 +29728,12 @@ func (siw *ServerInterfaceWrapper) UpdateTemplate(w http.ResponseWriter, r *http func (siw *ServerInterfaceWrapper) SendTest(w http.ResponseWriter, r *http.Request) { var err error + _ = err // ------------- Path parameter "projectID" ------------- var projectID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "projectID", Err: err}) return @@ -27590,7 +29742,7 @@ func (siw *ServerInterfaceWrapper) SendTest(w http.ResponseWriter, r *http.Reque // ------------- Path parameter "campaignID" ------------- var campaignID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "campaignID", chi.URLParam(r, "campaignID"), &campaignID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "campaignID", chi.URLParam(r, "campaignID"), &campaignID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "campaignID", Err: err}) return @@ -27599,7 +29751,7 @@ func (siw *ServerInterfaceWrapper) SendTest(w http.ResponseWriter, r *http.Reque // ------------- Path parameter "templateID" ------------- var templateID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "templateID", chi.URLParam(r, "templateID"), &templateID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "templateID", chi.URLParam(r, "templateID"), &templateID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "templateID", Err: err}) return @@ -27622,15 +29774,57 @@ func (siw *ServerInterfaceWrapper) SendTest(w http.ResponseWriter, r *http.Reque handler.ServeHTTP(w, r) } +// UnarchiveCampaign operation middleware +func (siw *ServerInterfaceWrapper) UnarchiveCampaign(w http.ResponseWriter, r *http.Request) { + + var err error + _ = err + + // ------------- Path parameter "projectID" ------------- + var projectID openapi_types.UUID + + err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) + if err != nil { + siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "projectID", Err: err}) + return + } + + // ------------- Path parameter "campaignID" ------------- + var campaignID openapi_types.UUID + + err = runtime.BindStyledParameterWithOptions("simple", "campaignID", chi.URLParam(r, "campaignID"), &campaignID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) + if err != nil { + siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "campaignID", Err: err}) + return + } + + ctx := r.Context() + + ctx = context.WithValue(ctx, HttpBearerAuthScopes, []string{}) + + r = r.WithContext(ctx) + + handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + siw.Handler.UnarchiveCampaign(w, r, projectID, campaignID) + })) + + for _, middleware := range siw.HandlerMiddlewares { + handler = middleware(handler) + } + + handler.ServeHTTP(w, r) +} + // GetCampaignUsers operation middleware func (siw *ServerInterfaceWrapper) GetCampaignUsers(w http.ResponseWriter, r *http.Request) { var err error + _ = err // ------------- Path parameter "projectID" ------------- var projectID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "projectID", Err: err}) return @@ -27639,7 +29833,7 @@ func (siw *ServerInterfaceWrapper) GetCampaignUsers(w http.ResponseWriter, r *ht // ------------- Path parameter "campaignID" ------------- var campaignID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "campaignID", chi.URLParam(r, "campaignID"), &campaignID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "campaignID", chi.URLParam(r, "campaignID"), &campaignID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "campaignID", Err: err}) return @@ -27656,17 +29850,27 @@ func (siw *ServerInterfaceWrapper) GetCampaignUsers(w http.ResponseWriter, r *ht // ------------- Optional query parameter "limit" ------------- - err = runtime.BindQueryParameter("form", true, false, "limit", r.URL.Query(), ¶ms.Limit) + err = runtime.BindQueryParameterWithOptions("form", true, false, "limit", r.URL.Query(), ¶ms.Limit, runtime.BindQueryParameterOptions{Type: "integer", Format: ""}) if err != nil { - siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "limit", Err: err}) + var requiredError *runtime.RequiredParameterError + if errors.As(err, &requiredError) { + siw.ErrorHandlerFunc(w, r, &RequiredParamError{ParamName: "limit"}) + } else { + siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "limit", Err: err}) + } return } // ------------- Optional query parameter "offset" ------------- - err = runtime.BindQueryParameter("form", true, false, "offset", r.URL.Query(), ¶ms.Offset) + err = runtime.BindQueryParameterWithOptions("form", true, false, "offset", r.URL.Query(), ¶ms.Offset, runtime.BindQueryParameterOptions{Type: "integer", Format: ""}) if err != nil { - siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "offset", Err: err}) + var requiredError *runtime.RequiredParameterError + if errors.As(err, &requiredError) { + siw.ErrorHandlerFunc(w, r, &RequiredParamError{ParamName: "offset"}) + } else { + siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "offset", Err: err}) + } return } @@ -27685,11 +29889,12 @@ func (siw *ServerInterfaceWrapper) GetCampaignUsers(w http.ResponseWriter, r *ht func (siw *ServerInterfaceWrapper) ListDocuments(w http.ResponseWriter, r *http.Request) { var err error + _ = err // ------------- Path parameter "projectID" ------------- var projectID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "projectID", Err: err}) return @@ -27706,17 +29911,27 @@ func (siw *ServerInterfaceWrapper) ListDocuments(w http.ResponseWriter, r *http. // ------------- Optional query parameter "limit" ------------- - err = runtime.BindQueryParameter("form", true, false, "limit", r.URL.Query(), ¶ms.Limit) + err = runtime.BindQueryParameterWithOptions("form", true, false, "limit", r.URL.Query(), ¶ms.Limit, runtime.BindQueryParameterOptions{Type: "integer", Format: ""}) if err != nil { - siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "limit", Err: err}) + var requiredError *runtime.RequiredParameterError + if errors.As(err, &requiredError) { + siw.ErrorHandlerFunc(w, r, &RequiredParamError{ParamName: "limit"}) + } else { + siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "limit", Err: err}) + } return } // ------------- Optional query parameter "offset" ------------- - err = runtime.BindQueryParameter("form", true, false, "offset", r.URL.Query(), ¶ms.Offset) + err = runtime.BindQueryParameterWithOptions("form", true, false, "offset", r.URL.Query(), ¶ms.Offset, runtime.BindQueryParameterOptions{Type: "integer", Format: ""}) if err != nil { - siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "offset", Err: err}) + var requiredError *runtime.RequiredParameterError + if errors.As(err, &requiredError) { + siw.ErrorHandlerFunc(w, r, &RequiredParamError{ParamName: "offset"}) + } else { + siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "offset", Err: err}) + } return } @@ -27735,11 +29950,12 @@ func (siw *ServerInterfaceWrapper) ListDocuments(w http.ResponseWriter, r *http. func (siw *ServerInterfaceWrapper) UploadDocuments(w http.ResponseWriter, r *http.Request) { var err error + _ = err // ------------- Path parameter "projectID" ------------- var projectID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "projectID", Err: err}) return @@ -27766,11 +29982,12 @@ func (siw *ServerInterfaceWrapper) UploadDocuments(w http.ResponseWriter, r *htt func (siw *ServerInterfaceWrapper) DeleteDocument(w http.ResponseWriter, r *http.Request) { var err error + _ = err // ------------- Path parameter "projectID" ------------- var projectID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "projectID", Err: err}) return @@ -27779,7 +29996,7 @@ func (siw *ServerInterfaceWrapper) DeleteDocument(w http.ResponseWriter, r *http // ------------- Path parameter "documentID" ------------- var documentID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "documentID", chi.URLParam(r, "documentID"), &documentID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "documentID", chi.URLParam(r, "documentID"), &documentID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "documentID", Err: err}) return @@ -27806,11 +30023,12 @@ func (siw *ServerInterfaceWrapper) DeleteDocument(w http.ResponseWriter, r *http func (siw *ServerInterfaceWrapper) GetDocument(w http.ResponseWriter, r *http.Request) { var err error + _ = err // ------------- Path parameter "projectID" ------------- var projectID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "projectID", Err: err}) return @@ -27819,7 +30037,7 @@ func (siw *ServerInterfaceWrapper) GetDocument(w http.ResponseWriter, r *http.Re // ------------- Path parameter "documentID" ------------- var documentID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "documentID", chi.URLParam(r, "documentID"), &documentID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "documentID", chi.URLParam(r, "documentID"), &documentID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "documentID", Err: err}) return @@ -27846,11 +30064,12 @@ func (siw *ServerInterfaceWrapper) GetDocument(w http.ResponseWriter, r *http.Re func (siw *ServerInterfaceWrapper) GetDocumentMetadata(w http.ResponseWriter, r *http.Request) { var err error + _ = err // ------------- Path parameter "projectID" ------------- var projectID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "projectID", Err: err}) return @@ -27859,7 +30078,7 @@ func (siw *ServerInterfaceWrapper) GetDocumentMetadata(w http.ResponseWriter, r // ------------- Path parameter "documentID" ------------- var documentID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "documentID", chi.URLParam(r, "documentID"), &documentID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "documentID", chi.URLParam(r, "documentID"), &documentID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "documentID", Err: err}) return @@ -27886,11 +30105,12 @@ func (siw *ServerInterfaceWrapper) GetDocumentMetadata(w http.ResponseWriter, r func (siw *ServerInterfaceWrapper) ListEmailTemplates(w http.ResponseWriter, r *http.Request) { var err error + _ = err // ------------- Path parameter "projectID" ------------- var projectID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "projectID", Err: err}) return @@ -27907,25 +30127,40 @@ func (siw *ServerInterfaceWrapper) ListEmailTemplates(w http.ResponseWriter, r * // ------------- Optional query parameter "limit" ------------- - err = runtime.BindQueryParameter("form", true, false, "limit", r.URL.Query(), ¶ms.Limit) + err = runtime.BindQueryParameterWithOptions("form", true, false, "limit", r.URL.Query(), ¶ms.Limit, runtime.BindQueryParameterOptions{Type: "integer", Format: ""}) if err != nil { - siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "limit", Err: err}) + var requiredError *runtime.RequiredParameterError + if errors.As(err, &requiredError) { + siw.ErrorHandlerFunc(w, r, &RequiredParamError{ParamName: "limit"}) + } else { + siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "limit", Err: err}) + } return } // ------------- Optional query parameter "offset" ------------- - err = runtime.BindQueryParameter("form", true, false, "offset", r.URL.Query(), ¶ms.Offset) + err = runtime.BindQueryParameterWithOptions("form", true, false, "offset", r.URL.Query(), ¶ms.Offset, runtime.BindQueryParameterOptions{Type: "integer", Format: ""}) if err != nil { - siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "offset", Err: err}) + var requiredError *runtime.RequiredParameterError + if errors.As(err, &requiredError) { + siw.ErrorHandlerFunc(w, r, &RequiredParamError{ParamName: "offset"}) + } else { + siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "offset", Err: err}) + } return } // ------------- Optional query parameter "search" ------------- - err = runtime.BindQueryParameter("form", true, false, "search", r.URL.Query(), ¶ms.Search) + err = runtime.BindQueryParameterWithOptions("form", true, false, "search", r.URL.Query(), ¶ms.Search, runtime.BindQueryParameterOptions{Type: "string", Format: ""}) if err != nil { - siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "search", Err: err}) + var requiredError *runtime.RequiredParameterError + if errors.As(err, &requiredError) { + siw.ErrorHandlerFunc(w, r, &RequiredParamError{ParamName: "search"}) + } else { + siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "search", Err: err}) + } return } @@ -27944,11 +30179,12 @@ func (siw *ServerInterfaceWrapper) ListEmailTemplates(w http.ResponseWriter, r * func (siw *ServerInterfaceWrapper) ListJourneys(w http.ResponseWriter, r *http.Request) { var err error + _ = err // ------------- Path parameter "projectID" ------------- var projectID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "projectID", Err: err}) return @@ -27965,25 +30201,53 @@ func (siw *ServerInterfaceWrapper) ListJourneys(w http.ResponseWriter, r *http.R // ------------- Optional query parameter "limit" ------------- - err = runtime.BindQueryParameter("form", true, false, "limit", r.URL.Query(), ¶ms.Limit) + err = runtime.BindQueryParameterWithOptions("form", true, false, "limit", r.URL.Query(), ¶ms.Limit, runtime.BindQueryParameterOptions{Type: "integer", Format: ""}) if err != nil { - siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "limit", Err: err}) + var requiredError *runtime.RequiredParameterError + if errors.As(err, &requiredError) { + siw.ErrorHandlerFunc(w, r, &RequiredParamError{ParamName: "limit"}) + } else { + siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "limit", Err: err}) + } return } // ------------- Optional query parameter "offset" ------------- - err = runtime.BindQueryParameter("form", true, false, "offset", r.URL.Query(), ¶ms.Offset) + err = runtime.BindQueryParameterWithOptions("form", true, false, "offset", r.URL.Query(), ¶ms.Offset, runtime.BindQueryParameterOptions{Type: "integer", Format: ""}) if err != nil { - siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "offset", Err: err}) + var requiredError *runtime.RequiredParameterError + if errors.As(err, &requiredError) { + siw.ErrorHandlerFunc(w, r, &RequiredParamError{ParamName: "offset"}) + } else { + siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "offset", Err: err}) + } return } // ------------- Optional query parameter "search" ------------- - err = runtime.BindQueryParameter("form", true, false, "search", r.URL.Query(), ¶ms.Search) + err = runtime.BindQueryParameterWithOptions("form", true, false, "search", r.URL.Query(), ¶ms.Search, runtime.BindQueryParameterOptions{Type: "string", Format: ""}) + if err != nil { + var requiredError *runtime.RequiredParameterError + if errors.As(err, &requiredError) { + siw.ErrorHandlerFunc(w, r, &RequiredParamError{ParamName: "search"}) + } else { + siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "search", Err: err}) + } + return + } + + // ------------- Optional query parameter "include_deleted" ------------- + + err = runtime.BindQueryParameterWithOptions("form", true, false, "include_deleted", r.URL.Query(), ¶ms.IncludeDeleted, runtime.BindQueryParameterOptions{Type: "boolean", Format: ""}) if err != nil { - siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "search", Err: err}) + var requiredError *runtime.RequiredParameterError + if errors.As(err, &requiredError) { + siw.ErrorHandlerFunc(w, r, &RequiredParamError{ParamName: "include_deleted"}) + } else { + siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "include_deleted", Err: err}) + } return } @@ -28002,11 +30266,12 @@ func (siw *ServerInterfaceWrapper) ListJourneys(w http.ResponseWriter, r *http.R func (siw *ServerInterfaceWrapper) CreateJourney(w http.ResponseWriter, r *http.Request) { var err error + _ = err // ------------- Path parameter "projectID" ------------- var projectID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "projectID", Err: err}) return @@ -28023,9 +30288,14 @@ func (siw *ServerInterfaceWrapper) CreateJourney(w http.ResponseWriter, r *http. // ------------- Optional query parameter "publish" ------------- - err = runtime.BindQueryParameter("form", true, false, "publish", r.URL.Query(), ¶ms.Publish) + err = runtime.BindQueryParameterWithOptions("form", true, false, "publish", r.URL.Query(), ¶ms.Publish, runtime.BindQueryParameterOptions{Type: "boolean", Format: ""}) if err != nil { - siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "publish", Err: err}) + var requiredError *runtime.RequiredParameterError + if errors.As(err, &requiredError) { + siw.ErrorHandlerFunc(w, r, &RequiredParamError{ParamName: "publish"}) + } else { + siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "publish", Err: err}) + } return } @@ -28044,11 +30314,12 @@ func (siw *ServerInterfaceWrapper) CreateJourney(w http.ResponseWriter, r *http. func (siw *ServerInterfaceWrapper) DeleteJourney(w http.ResponseWriter, r *http.Request) { var err error + _ = err // ------------- Path parameter "projectID" ------------- var projectID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "projectID", Err: err}) return @@ -28057,7 +30328,7 @@ func (siw *ServerInterfaceWrapper) DeleteJourney(w http.ResponseWriter, r *http. // ------------- Path parameter "journeyID" ------------- var journeyID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "journeyID", chi.URLParam(r, "journeyID"), &journeyID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "journeyID", chi.URLParam(r, "journeyID"), &journeyID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "journeyID", Err: err}) return @@ -28084,11 +30355,12 @@ func (siw *ServerInterfaceWrapper) DeleteJourney(w http.ResponseWriter, r *http. func (siw *ServerInterfaceWrapper) GetJourney(w http.ResponseWriter, r *http.Request) { var err error + _ = err // ------------- Path parameter "projectID" ------------- var projectID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "projectID", Err: err}) return @@ -28097,7 +30369,7 @@ func (siw *ServerInterfaceWrapper) GetJourney(w http.ResponseWriter, r *http.Req // ------------- Path parameter "journeyID" ------------- var journeyID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "journeyID", chi.URLParam(r, "journeyID"), &journeyID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "journeyID", chi.URLParam(r, "journeyID"), &journeyID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "journeyID", Err: err}) return @@ -28124,11 +30396,12 @@ func (siw *ServerInterfaceWrapper) GetJourney(w http.ResponseWriter, r *http.Req func (siw *ServerInterfaceWrapper) UpdateJourney(w http.ResponseWriter, r *http.Request) { var err error + _ = err // ------------- Path parameter "projectID" ------------- var projectID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "projectID", Err: err}) return @@ -28137,7 +30410,7 @@ func (siw *ServerInterfaceWrapper) UpdateJourney(w http.ResponseWriter, r *http. // ------------- Path parameter "journeyID" ------------- var journeyID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "journeyID", chi.URLParam(r, "journeyID"), &journeyID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "journeyID", chi.URLParam(r, "journeyID"), &journeyID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "journeyID", Err: err}) return @@ -28164,11 +30437,12 @@ func (siw *ServerInterfaceWrapper) UpdateJourney(w http.ResponseWriter, r *http. func (siw *ServerInterfaceWrapper) DuplicateJourney(w http.ResponseWriter, r *http.Request) { var err error + _ = err // ------------- Path parameter "projectID" ------------- var projectID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "projectID", Err: err}) return @@ -28177,7 +30451,7 @@ func (siw *ServerInterfaceWrapper) DuplicateJourney(w http.ResponseWriter, r *ht // ------------- Path parameter "journeyID" ------------- var journeyID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "journeyID", chi.URLParam(r, "journeyID"), &journeyID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "journeyID", chi.URLParam(r, "journeyID"), &journeyID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "journeyID", Err: err}) return @@ -28204,11 +30478,12 @@ func (siw *ServerInterfaceWrapper) DuplicateJourney(w http.ResponseWriter, r *ht func (siw *ServerInterfaceWrapper) PublishJourney(w http.ResponseWriter, r *http.Request) { var err error + _ = err // ------------- Path parameter "projectID" ------------- var projectID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "projectID", Err: err}) return @@ -28217,7 +30492,7 @@ func (siw *ServerInterfaceWrapper) PublishJourney(w http.ResponseWriter, r *http // ------------- Path parameter "journeyID" ------------- var journeyID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "journeyID", chi.URLParam(r, "journeyID"), &journeyID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "journeyID", chi.URLParam(r, "journeyID"), &journeyID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "journeyID", Err: err}) return @@ -28244,11 +30519,12 @@ func (siw *ServerInterfaceWrapper) PublishJourney(w http.ResponseWriter, r *http func (siw *ServerInterfaceWrapper) GetJourneySteps(w http.ResponseWriter, r *http.Request) { var err error + _ = err // ------------- Path parameter "projectID" ------------- var projectID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "projectID", Err: err}) return @@ -28257,7 +30533,7 @@ func (siw *ServerInterfaceWrapper) GetJourneySteps(w http.ResponseWriter, r *htt // ------------- Path parameter "journeyID" ------------- var journeyID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "journeyID", chi.URLParam(r, "journeyID"), &journeyID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "journeyID", chi.URLParam(r, "journeyID"), &journeyID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "journeyID", Err: err}) return @@ -28284,11 +30560,12 @@ func (siw *ServerInterfaceWrapper) GetJourneySteps(w http.ResponseWriter, r *htt func (siw *ServerInterfaceWrapper) SetJourneySteps(w http.ResponseWriter, r *http.Request) { var err error + _ = err // ------------- Path parameter "projectID" ------------- var projectID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "projectID", Err: err}) return @@ -28297,7 +30574,7 @@ func (siw *ServerInterfaceWrapper) SetJourneySteps(w http.ResponseWriter, r *htt // ------------- Path parameter "journeyID" ------------- var journeyID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "journeyID", chi.URLParam(r, "journeyID"), &journeyID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "journeyID", chi.URLParam(r, "journeyID"), &journeyID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "journeyID", Err: err}) return @@ -28320,15 +30597,57 @@ func (siw *ServerInterfaceWrapper) SetJourneySteps(w http.ResponseWriter, r *htt handler.ServeHTTP(w, r) } +// UnarchiveJourney operation middleware +func (siw *ServerInterfaceWrapper) UnarchiveJourney(w http.ResponseWriter, r *http.Request) { + + var err error + _ = err + + // ------------- Path parameter "projectID" ------------- + var projectID openapi_types.UUID + + err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) + if err != nil { + siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "projectID", Err: err}) + return + } + + // ------------- Path parameter "journeyID" ------------- + var journeyID openapi_types.UUID + + err = runtime.BindStyledParameterWithOptions("simple", "journeyID", chi.URLParam(r, "journeyID"), &journeyID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) + if err != nil { + siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "journeyID", Err: err}) + return + } + + ctx := r.Context() + + ctx = context.WithValue(ctx, HttpBearerAuthScopes, []string{}) + + r = r.WithContext(ctx) + + handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + siw.Handler.UnarchiveJourney(w, r, projectID, journeyID) + })) + + for _, middleware := range siw.HandlerMiddlewares { + handler = middleware(handler) + } + + handler.ServeHTTP(w, r) +} + // CancelUserJourney operation middleware func (siw *ServerInterfaceWrapper) CancelUserJourney(w http.ResponseWriter, r *http.Request) { var err error + _ = err // ------------- Path parameter "projectID" ------------- var projectID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "projectID", Err: err}) return @@ -28337,7 +30656,7 @@ func (siw *ServerInterfaceWrapper) CancelUserJourney(w http.ResponseWriter, r *h // ------------- Path parameter "journeyID" ------------- var journeyID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "journeyID", chi.URLParam(r, "journeyID"), &journeyID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "journeyID", chi.URLParam(r, "journeyID"), &journeyID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "journeyID", Err: err}) return @@ -28346,7 +30665,7 @@ func (siw *ServerInterfaceWrapper) CancelUserJourney(w http.ResponseWriter, r *h // ------------- Path parameter "userID" ------------- var userID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "userID", chi.URLParam(r, "userID"), &userID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "userID", chi.URLParam(r, "userID"), &userID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "userID", Err: err}) return @@ -28373,11 +30692,12 @@ func (siw *ServerInterfaceWrapper) CancelUserJourney(w http.ResponseWriter, r *h func (siw *ServerInterfaceWrapper) StreamUserJourneySteps(w http.ResponseWriter, r *http.Request) { var err error + _ = err // ------------- Path parameter "projectID" ------------- var projectID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "projectID", Err: err}) return @@ -28386,7 +30706,7 @@ func (siw *ServerInterfaceWrapper) StreamUserJourneySteps(w http.ResponseWriter, // ------------- Path parameter "journeyID" ------------- var journeyID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "journeyID", chi.URLParam(r, "journeyID"), &journeyID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "journeyID", chi.URLParam(r, "journeyID"), &journeyID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "journeyID", Err: err}) return @@ -28395,7 +30715,7 @@ func (siw *ServerInterfaceWrapper) StreamUserJourneySteps(w http.ResponseWriter, // ------------- Path parameter "userID" ------------- var userID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "userID", chi.URLParam(r, "userID"), &userID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "userID", chi.URLParam(r, "userID"), &userID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "userID", Err: err}) return @@ -28422,11 +30742,12 @@ func (siw *ServerInterfaceWrapper) StreamUserJourneySteps(w http.ResponseWriter, func (siw *ServerInterfaceWrapper) TriggerUser(w http.ResponseWriter, r *http.Request) { var err error + _ = err // ------------- Path parameter "projectID" ------------- var projectID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "projectID", Err: err}) return @@ -28435,7 +30756,7 @@ func (siw *ServerInterfaceWrapper) TriggerUser(w http.ResponseWriter, r *http.Re // ------------- Path parameter "journeyID" ------------- var journeyID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "journeyID", chi.URLParam(r, "journeyID"), &journeyID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "journeyID", chi.URLParam(r, "journeyID"), &journeyID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "journeyID", Err: err}) return @@ -28444,7 +30765,7 @@ func (siw *ServerInterfaceWrapper) TriggerUser(w http.ResponseWriter, r *http.Re // ------------- Path parameter "userID" ------------- var userID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "userID", chi.URLParam(r, "userID"), &userID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "userID", chi.URLParam(r, "userID"), &userID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "userID", Err: err}) return @@ -28471,11 +30792,12 @@ func (siw *ServerInterfaceWrapper) TriggerUser(w http.ResponseWriter, r *http.Re func (siw *ServerInterfaceWrapper) AdvanceUserStep(w http.ResponseWriter, r *http.Request) { var err error + _ = err // ------------- Path parameter "projectID" ------------- var projectID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "projectID", Err: err}) return @@ -28484,7 +30806,7 @@ func (siw *ServerInterfaceWrapper) AdvanceUserStep(w http.ResponseWriter, r *htt // ------------- Path parameter "journeyID" ------------- var journeyID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "journeyID", chi.URLParam(r, "journeyID"), &journeyID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "journeyID", chi.URLParam(r, "journeyID"), &journeyID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "journeyID", Err: err}) return @@ -28493,7 +30815,7 @@ func (siw *ServerInterfaceWrapper) AdvanceUserStep(w http.ResponseWriter, r *htt // ------------- Path parameter "userID" ------------- var userID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "userID", chi.URLParam(r, "userID"), &userID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "userID", chi.URLParam(r, "userID"), &userID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "userID", Err: err}) return @@ -28520,11 +30842,12 @@ func (siw *ServerInterfaceWrapper) AdvanceUserStep(w http.ResponseWriter, r *htt func (siw *ServerInterfaceWrapper) GetUserJourneyState(w http.ResponseWriter, r *http.Request) { var err error + _ = err // ------------- Path parameter "projectID" ------------- var projectID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "projectID", Err: err}) return @@ -28533,7 +30856,7 @@ func (siw *ServerInterfaceWrapper) GetUserJourneyState(w http.ResponseWriter, r // ------------- Path parameter "journeyID" ------------- var journeyID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "journeyID", chi.URLParam(r, "journeyID"), &journeyID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "journeyID", chi.URLParam(r, "journeyID"), &journeyID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "journeyID", Err: err}) return @@ -28542,7 +30865,7 @@ func (siw *ServerInterfaceWrapper) GetUserJourneyState(w http.ResponseWriter, r // ------------- Path parameter "userID" ------------- var userID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "userID", chi.URLParam(r, "userID"), &userID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "userID", chi.URLParam(r, "userID"), &userID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "userID", Err: err}) return @@ -28569,11 +30892,12 @@ func (siw *ServerInterfaceWrapper) GetUserJourneyState(w http.ResponseWriter, r func (siw *ServerInterfaceWrapper) VersionJourney(w http.ResponseWriter, r *http.Request) { var err error + _ = err // ------------- Path parameter "projectID" ------------- var projectID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "projectID", Err: err}) return @@ -28582,7 +30906,7 @@ func (siw *ServerInterfaceWrapper) VersionJourney(w http.ResponseWriter, r *http // ------------- Path parameter "journeyID" ------------- var journeyID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "journeyID", chi.URLParam(r, "journeyID"), &journeyID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "journeyID", chi.URLParam(r, "journeyID"), &journeyID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "journeyID", Err: err}) return @@ -28609,11 +30933,12 @@ func (siw *ServerInterfaceWrapper) VersionJourney(w http.ResponseWriter, r *http func (siw *ServerInterfaceWrapper) ListApiKeys(w http.ResponseWriter, r *http.Request) { var err error + _ = err // ------------- Path parameter "projectID" ------------- var projectID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "projectID", Err: err}) return @@ -28630,17 +30955,27 @@ func (siw *ServerInterfaceWrapper) ListApiKeys(w http.ResponseWriter, r *http.Re // ------------- Optional query parameter "limit" ------------- - err = runtime.BindQueryParameter("form", true, false, "limit", r.URL.Query(), ¶ms.Limit) + err = runtime.BindQueryParameterWithOptions("form", true, false, "limit", r.URL.Query(), ¶ms.Limit, runtime.BindQueryParameterOptions{Type: "integer", Format: ""}) if err != nil { - siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "limit", Err: err}) + var requiredError *runtime.RequiredParameterError + if errors.As(err, &requiredError) { + siw.ErrorHandlerFunc(w, r, &RequiredParamError{ParamName: "limit"}) + } else { + siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "limit", Err: err}) + } return } // ------------- Optional query parameter "offset" ------------- - err = runtime.BindQueryParameter("form", true, false, "offset", r.URL.Query(), ¶ms.Offset) + err = runtime.BindQueryParameterWithOptions("form", true, false, "offset", r.URL.Query(), ¶ms.Offset, runtime.BindQueryParameterOptions{Type: "integer", Format: ""}) if err != nil { - siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "offset", Err: err}) + var requiredError *runtime.RequiredParameterError + if errors.As(err, &requiredError) { + siw.ErrorHandlerFunc(w, r, &RequiredParamError{ParamName: "offset"}) + } else { + siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "offset", Err: err}) + } return } @@ -28659,11 +30994,12 @@ func (siw *ServerInterfaceWrapper) ListApiKeys(w http.ResponseWriter, r *http.Re func (siw *ServerInterfaceWrapper) CreateApiKey(w http.ResponseWriter, r *http.Request) { var err error + _ = err // ------------- Path parameter "projectID" ------------- var projectID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "projectID", Err: err}) return @@ -28690,11 +31026,12 @@ func (siw *ServerInterfaceWrapper) CreateApiKey(w http.ResponseWriter, r *http.R func (siw *ServerInterfaceWrapper) DeleteApiKey(w http.ResponseWriter, r *http.Request) { var err error + _ = err // ------------- Path parameter "projectID" ------------- var projectID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "projectID", Err: err}) return @@ -28703,7 +31040,7 @@ func (siw *ServerInterfaceWrapper) DeleteApiKey(w http.ResponseWriter, r *http.R // ------------- Path parameter "keyID" ------------- var keyID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "keyID", chi.URLParam(r, "keyID"), &keyID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "keyID", chi.URLParam(r, "keyID"), &keyID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "keyID", Err: err}) return @@ -28730,11 +31067,12 @@ func (siw *ServerInterfaceWrapper) DeleteApiKey(w http.ResponseWriter, r *http.R func (siw *ServerInterfaceWrapper) GetApiKey(w http.ResponseWriter, r *http.Request) { var err error + _ = err // ------------- Path parameter "projectID" ------------- var projectID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "projectID", Err: err}) return @@ -28743,7 +31081,7 @@ func (siw *ServerInterfaceWrapper) GetApiKey(w http.ResponseWriter, r *http.Requ // ------------- Path parameter "keyID" ------------- var keyID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "keyID", chi.URLParam(r, "keyID"), &keyID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "keyID", chi.URLParam(r, "keyID"), &keyID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "keyID", Err: err}) return @@ -28770,11 +31108,12 @@ func (siw *ServerInterfaceWrapper) GetApiKey(w http.ResponseWriter, r *http.Requ func (siw *ServerInterfaceWrapper) UpdateApiKey(w http.ResponseWriter, r *http.Request) { var err error + _ = err // ------------- Path parameter "projectID" ------------- var projectID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "projectID", Err: err}) return @@ -28783,7 +31122,7 @@ func (siw *ServerInterfaceWrapper) UpdateApiKey(w http.ResponseWriter, r *http.R // ------------- Path parameter "keyID" ------------- var keyID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "keyID", chi.URLParam(r, "keyID"), &keyID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "keyID", chi.URLParam(r, "keyID"), &keyID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "keyID", Err: err}) return @@ -28810,11 +31149,12 @@ func (siw *ServerInterfaceWrapper) UpdateApiKey(w http.ResponseWriter, r *http.R func (siw *ServerInterfaceWrapper) ListLists(w http.ResponseWriter, r *http.Request) { var err error + _ = err // ------------- Path parameter "projectID" ------------- var projectID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "projectID", Err: err}) return @@ -28831,25 +31171,53 @@ func (siw *ServerInterfaceWrapper) ListLists(w http.ResponseWriter, r *http.Requ // ------------- Optional query parameter "limit" ------------- - err = runtime.BindQueryParameter("form", true, false, "limit", r.URL.Query(), ¶ms.Limit) + err = runtime.BindQueryParameterWithOptions("form", true, false, "limit", r.URL.Query(), ¶ms.Limit, runtime.BindQueryParameterOptions{Type: "integer", Format: ""}) if err != nil { - siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "limit", Err: err}) + var requiredError *runtime.RequiredParameterError + if errors.As(err, &requiredError) { + siw.ErrorHandlerFunc(w, r, &RequiredParamError{ParamName: "limit"}) + } else { + siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "limit", Err: err}) + } return } // ------------- Optional query parameter "offset" ------------- - err = runtime.BindQueryParameter("form", true, false, "offset", r.URL.Query(), ¶ms.Offset) + err = runtime.BindQueryParameterWithOptions("form", true, false, "offset", r.URL.Query(), ¶ms.Offset, runtime.BindQueryParameterOptions{Type: "integer", Format: ""}) if err != nil { - siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "offset", Err: err}) + var requiredError *runtime.RequiredParameterError + if errors.As(err, &requiredError) { + siw.ErrorHandlerFunc(w, r, &RequiredParamError{ParamName: "offset"}) + } else { + siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "offset", Err: err}) + } return } // ------------- Optional query parameter "search" ------------- - err = runtime.BindQueryParameter("form", true, false, "search", r.URL.Query(), ¶ms.Search) + err = runtime.BindQueryParameterWithOptions("form", true, false, "search", r.URL.Query(), ¶ms.Search, runtime.BindQueryParameterOptions{Type: "string", Format: ""}) + if err != nil { + var requiredError *runtime.RequiredParameterError + if errors.As(err, &requiredError) { + siw.ErrorHandlerFunc(w, r, &RequiredParamError{ParamName: "search"}) + } else { + siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "search", Err: err}) + } + return + } + + // ------------- Optional query parameter "include_deleted" ------------- + + err = runtime.BindQueryParameterWithOptions("form", true, false, "include_deleted", r.URL.Query(), ¶ms.IncludeDeleted, runtime.BindQueryParameterOptions{Type: "boolean", Format: ""}) if err != nil { - siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "search", Err: err}) + var requiredError *runtime.RequiredParameterError + if errors.As(err, &requiredError) { + siw.ErrorHandlerFunc(w, r, &RequiredParamError{ParamName: "include_deleted"}) + } else { + siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "include_deleted", Err: err}) + } return } @@ -28868,11 +31236,12 @@ func (siw *ServerInterfaceWrapper) ListLists(w http.ResponseWriter, r *http.Requ func (siw *ServerInterfaceWrapper) CreateList(w http.ResponseWriter, r *http.Request) { var err error + _ = err // ------------- Path parameter "projectID" ------------- var projectID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "projectID", Err: err}) return @@ -28899,11 +31268,12 @@ func (siw *ServerInterfaceWrapper) CreateList(w http.ResponseWriter, r *http.Req func (siw *ServerInterfaceWrapper) DeleteList(w http.ResponseWriter, r *http.Request) { var err error + _ = err // ------------- Path parameter "projectID" ------------- var projectID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "projectID", Err: err}) return @@ -28912,7 +31282,7 @@ func (siw *ServerInterfaceWrapper) DeleteList(w http.ResponseWriter, r *http.Req // ------------- Path parameter "listID" ------------- var listID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "listID", chi.URLParam(r, "listID"), &listID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "listID", chi.URLParam(r, "listID"), &listID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "listID", Err: err}) return @@ -28939,11 +31309,12 @@ func (siw *ServerInterfaceWrapper) DeleteList(w http.ResponseWriter, r *http.Req func (siw *ServerInterfaceWrapper) GetList(w http.ResponseWriter, r *http.Request) { var err error + _ = err // ------------- Path parameter "projectID" ------------- var projectID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "projectID", Err: err}) return @@ -28952,7 +31323,7 @@ func (siw *ServerInterfaceWrapper) GetList(w http.ResponseWriter, r *http.Reques // ------------- Path parameter "listID" ------------- var listID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "listID", chi.URLParam(r, "listID"), &listID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "listID", chi.URLParam(r, "listID"), &listID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "listID", Err: err}) return @@ -28979,11 +31350,12 @@ func (siw *ServerInterfaceWrapper) GetList(w http.ResponseWriter, r *http.Reques func (siw *ServerInterfaceWrapper) UpdateList(w http.ResponseWriter, r *http.Request) { var err error + _ = err // ------------- Path parameter "projectID" ------------- var projectID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "projectID", Err: err}) return @@ -28992,7 +31364,7 @@ func (siw *ServerInterfaceWrapper) UpdateList(w http.ResponseWriter, r *http.Req // ------------- Path parameter "listID" ------------- var listID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "listID", chi.URLParam(r, "listID"), &listID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "listID", chi.URLParam(r, "listID"), &listID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "listID", Err: err}) return @@ -29019,11 +31391,12 @@ func (siw *ServerInterfaceWrapper) UpdateList(w http.ResponseWriter, r *http.Req func (siw *ServerInterfaceWrapper) DuplicateList(w http.ResponseWriter, r *http.Request) { var err error + _ = err // ------------- Path parameter "projectID" ------------- var projectID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "projectID", Err: err}) return @@ -29032,7 +31405,7 @@ func (siw *ServerInterfaceWrapper) DuplicateList(w http.ResponseWriter, r *http. // ------------- Path parameter "listID" ------------- var listID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "listID", chi.URLParam(r, "listID"), &listID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "listID", chi.URLParam(r, "listID"), &listID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "listID", Err: err}) return @@ -29055,15 +31428,57 @@ func (siw *ServerInterfaceWrapper) DuplicateList(w http.ResponseWriter, r *http. handler.ServeHTTP(w, r) } +// UnarchiveList operation middleware +func (siw *ServerInterfaceWrapper) UnarchiveList(w http.ResponseWriter, r *http.Request) { + + var err error + _ = err + + // ------------- Path parameter "projectID" ------------- + var projectID openapi_types.UUID + + err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) + if err != nil { + siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "projectID", Err: err}) + return + } + + // ------------- Path parameter "listID" ------------- + var listID openapi_types.UUID + + err = runtime.BindStyledParameterWithOptions("simple", "listID", chi.URLParam(r, "listID"), &listID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) + if err != nil { + siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "listID", Err: err}) + return + } + + ctx := r.Context() + + ctx = context.WithValue(ctx, HttpBearerAuthScopes, []string{}) + + r = r.WithContext(ctx) + + handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + siw.Handler.UnarchiveList(w, r, projectID, listID) + })) + + for _, middleware := range siw.HandlerMiddlewares { + handler = middleware(handler) + } + + handler.ServeHTTP(w, r) +} + // GetListUsers operation middleware func (siw *ServerInterfaceWrapper) GetListUsers(w http.ResponseWriter, r *http.Request) { var err error + _ = err // ------------- Path parameter "projectID" ------------- var projectID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "projectID", Err: err}) return @@ -29072,7 +31487,7 @@ func (siw *ServerInterfaceWrapper) GetListUsers(w http.ResponseWriter, r *http.R // ------------- Path parameter "listID" ------------- var listID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "listID", chi.URLParam(r, "listID"), &listID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "listID", chi.URLParam(r, "listID"), &listID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "listID", Err: err}) return @@ -29089,25 +31504,40 @@ func (siw *ServerInterfaceWrapper) GetListUsers(w http.ResponseWriter, r *http.R // ------------- Optional query parameter "limit" ------------- - err = runtime.BindQueryParameter("form", true, false, "limit", r.URL.Query(), ¶ms.Limit) + err = runtime.BindQueryParameterWithOptions("form", true, false, "limit", r.URL.Query(), ¶ms.Limit, runtime.BindQueryParameterOptions{Type: "integer", Format: ""}) if err != nil { - siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "limit", Err: err}) + var requiredError *runtime.RequiredParameterError + if errors.As(err, &requiredError) { + siw.ErrorHandlerFunc(w, r, &RequiredParamError{ParamName: "limit"}) + } else { + siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "limit", Err: err}) + } return } // ------------- Optional query parameter "offset" ------------- - err = runtime.BindQueryParameter("form", true, false, "offset", r.URL.Query(), ¶ms.Offset) + err = runtime.BindQueryParameterWithOptions("form", true, false, "offset", r.URL.Query(), ¶ms.Offset, runtime.BindQueryParameterOptions{Type: "integer", Format: ""}) if err != nil { - siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "offset", Err: err}) + var requiredError *runtime.RequiredParameterError + if errors.As(err, &requiredError) { + siw.ErrorHandlerFunc(w, r, &RequiredParamError{ParamName: "offset"}) + } else { + siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "offset", Err: err}) + } return } // ------------- Optional query parameter "search" ------------- - err = runtime.BindQueryParameter("form", true, false, "search", r.URL.Query(), ¶ms.Search) + err = runtime.BindQueryParameterWithOptions("form", true, false, "search", r.URL.Query(), ¶ms.Search, runtime.BindQueryParameterOptions{Type: "string", Format: ""}) if err != nil { - siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "search", Err: err}) + var requiredError *runtime.RequiredParameterError + if errors.As(err, &requiredError) { + siw.ErrorHandlerFunc(w, r, &RequiredParamError{ParamName: "search"}) + } else { + siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "search", Err: err}) + } return } @@ -29126,11 +31556,12 @@ func (siw *ServerInterfaceWrapper) GetListUsers(w http.ResponseWriter, r *http.R func (siw *ServerInterfaceWrapper) PreviewListUsers(w http.ResponseWriter, r *http.Request) { var err error + _ = err // ------------- Path parameter "projectID" ------------- var projectID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "projectID", Err: err}) return @@ -29139,7 +31570,7 @@ func (siw *ServerInterfaceWrapper) PreviewListUsers(w http.ResponseWriter, r *ht // ------------- Path parameter "listID" ------------- var listID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "listID", chi.URLParam(r, "listID"), &listID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "listID", chi.URLParam(r, "listID"), &listID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "listID", Err: err}) return @@ -29156,9 +31587,14 @@ func (siw *ServerInterfaceWrapper) PreviewListUsers(w http.ResponseWriter, r *ht // ------------- Optional query parameter "limit" ------------- - err = runtime.BindQueryParameter("form", true, false, "limit", r.URL.Query(), ¶ms.Limit) + err = runtime.BindQueryParameterWithOptions("form", true, false, "limit", r.URL.Query(), ¶ms.Limit, runtime.BindQueryParameterOptions{Type: "integer", Format: ""}) if err != nil { - siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "limit", Err: err}) + var requiredError *runtime.RequiredParameterError + if errors.As(err, &requiredError) { + siw.ErrorHandlerFunc(w, r, &RequiredParamError{ParamName: "limit"}) + } else { + siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "limit", Err: err}) + } return } @@ -29177,11 +31613,12 @@ func (siw *ServerInterfaceWrapper) PreviewListUsers(w http.ResponseWriter, r *ht func (siw *ServerInterfaceWrapper) ImportListUsers(w http.ResponseWriter, r *http.Request) { var err error + _ = err // ------------- Path parameter "projectID" ------------- var projectID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "projectID", Err: err}) return @@ -29190,7 +31627,7 @@ func (siw *ServerInterfaceWrapper) ImportListUsers(w http.ResponseWriter, r *htt // ------------- Path parameter "listID" ------------- var listID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "listID", chi.URLParam(r, "listID"), &listID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "listID", chi.URLParam(r, "listID"), &listID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "listID", Err: err}) return @@ -29217,11 +31654,12 @@ func (siw *ServerInterfaceWrapper) ImportListUsers(w http.ResponseWriter, r *htt func (siw *ServerInterfaceWrapper) ListLocales(w http.ResponseWriter, r *http.Request) { var err error + _ = err // ------------- Path parameter "projectID" ------------- var projectID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "projectID", Err: err}) return @@ -29238,17 +31676,27 @@ func (siw *ServerInterfaceWrapper) ListLocales(w http.ResponseWriter, r *http.Re // ------------- Optional query parameter "limit" ------------- - err = runtime.BindQueryParameter("form", true, false, "limit", r.URL.Query(), ¶ms.Limit) + err = runtime.BindQueryParameterWithOptions("form", true, false, "limit", r.URL.Query(), ¶ms.Limit, runtime.BindQueryParameterOptions{Type: "integer", Format: ""}) if err != nil { - siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "limit", Err: err}) + var requiredError *runtime.RequiredParameterError + if errors.As(err, &requiredError) { + siw.ErrorHandlerFunc(w, r, &RequiredParamError{ParamName: "limit"}) + } else { + siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "limit", Err: err}) + } return } // ------------- Optional query parameter "offset" ------------- - err = runtime.BindQueryParameter("form", true, false, "offset", r.URL.Query(), ¶ms.Offset) + err = runtime.BindQueryParameterWithOptions("form", true, false, "offset", r.URL.Query(), ¶ms.Offset, runtime.BindQueryParameterOptions{Type: "integer", Format: ""}) if err != nil { - siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "offset", Err: err}) + var requiredError *runtime.RequiredParameterError + if errors.As(err, &requiredError) { + siw.ErrorHandlerFunc(w, r, &RequiredParamError{ParamName: "offset"}) + } else { + siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "offset", Err: err}) + } return } @@ -29267,11 +31715,12 @@ func (siw *ServerInterfaceWrapper) ListLocales(w http.ResponseWriter, r *http.Re func (siw *ServerInterfaceWrapper) CreateLocale(w http.ResponseWriter, r *http.Request) { var err error + _ = err // ------------- Path parameter "projectID" ------------- var projectID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "projectID", Err: err}) return @@ -29298,11 +31747,12 @@ func (siw *ServerInterfaceWrapper) CreateLocale(w http.ResponseWriter, r *http.R func (siw *ServerInterfaceWrapper) DeleteLocale(w http.ResponseWriter, r *http.Request) { var err error + _ = err // ------------- Path parameter "projectID" ------------- var projectID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "projectID", Err: err}) return @@ -29311,7 +31761,7 @@ func (siw *ServerInterfaceWrapper) DeleteLocale(w http.ResponseWriter, r *http.R // ------------- Path parameter "localeID" ------------- var localeID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "localeID", chi.URLParam(r, "localeID"), &localeID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "localeID", chi.URLParam(r, "localeID"), &localeID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "localeID", Err: err}) return @@ -29338,11 +31788,12 @@ func (siw *ServerInterfaceWrapper) DeleteLocale(w http.ResponseWriter, r *http.R func (siw *ServerInterfaceWrapper) GetLocale(w http.ResponseWriter, r *http.Request) { var err error + _ = err // ------------- Path parameter "projectID" ------------- var projectID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "projectID", Err: err}) return @@ -29351,7 +31802,7 @@ func (siw *ServerInterfaceWrapper) GetLocale(w http.ResponseWriter, r *http.Requ // ------------- Path parameter "localeID" ------------- var localeID string - err = runtime.BindStyledParameterWithOptions("simple", "localeID", chi.URLParam(r, "localeID"), &localeID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "localeID", chi.URLParam(r, "localeID"), &localeID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: ""}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "localeID", Err: err}) return @@ -29378,11 +31829,12 @@ func (siw *ServerInterfaceWrapper) GetLocale(w http.ResponseWriter, r *http.Requ func (siw *ServerInterfaceWrapper) ListProviders(w http.ResponseWriter, r *http.Request) { var err error + _ = err // ------------- Path parameter "projectID" ------------- var projectID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "projectID", Err: err}) return @@ -29399,17 +31851,27 @@ func (siw *ServerInterfaceWrapper) ListProviders(w http.ResponseWriter, r *http. // ------------- Optional query parameter "limit" ------------- - err = runtime.BindQueryParameter("form", true, false, "limit", r.URL.Query(), ¶ms.Limit) + err = runtime.BindQueryParameterWithOptions("form", true, false, "limit", r.URL.Query(), ¶ms.Limit, runtime.BindQueryParameterOptions{Type: "integer", Format: ""}) if err != nil { - siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "limit", Err: err}) + var requiredError *runtime.RequiredParameterError + if errors.As(err, &requiredError) { + siw.ErrorHandlerFunc(w, r, &RequiredParamError{ParamName: "limit"}) + } else { + siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "limit", Err: err}) + } return } // ------------- Optional query parameter "offset" ------------- - err = runtime.BindQueryParameter("form", true, false, "offset", r.URL.Query(), ¶ms.Offset) + err = runtime.BindQueryParameterWithOptions("form", true, false, "offset", r.URL.Query(), ¶ms.Offset, runtime.BindQueryParameterOptions{Type: "integer", Format: ""}) if err != nil { - siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "offset", Err: err}) + var requiredError *runtime.RequiredParameterError + if errors.As(err, &requiredError) { + siw.ErrorHandlerFunc(w, r, &RequiredParamError{ParamName: "offset"}) + } else { + siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "offset", Err: err}) + } return } @@ -29428,11 +31890,12 @@ func (siw *ServerInterfaceWrapper) ListProviders(w http.ResponseWriter, r *http. func (siw *ServerInterfaceWrapper) ListProviderMeta(w http.ResponseWriter, r *http.Request) { var err error + _ = err // ------------- Path parameter "projectID" ------------- var projectID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "projectID", Err: err}) return @@ -29459,11 +31922,12 @@ func (siw *ServerInterfaceWrapper) ListProviderMeta(w http.ResponseWriter, r *ht func (siw *ServerInterfaceWrapper) DeleteProvider(w http.ResponseWriter, r *http.Request) { var err error + _ = err // ------------- Path parameter "projectID" ------------- var projectID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "projectID", Err: err}) return @@ -29472,7 +31936,7 @@ func (siw *ServerInterfaceWrapper) DeleteProvider(w http.ResponseWriter, r *http // ------------- Path parameter "providerID" ------------- var providerID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "providerID", chi.URLParam(r, "providerID"), &providerID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "providerID", chi.URLParam(r, "providerID"), &providerID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "providerID", Err: err}) return @@ -29499,11 +31963,12 @@ func (siw *ServerInterfaceWrapper) DeleteProvider(w http.ResponseWriter, r *http func (siw *ServerInterfaceWrapper) CreateProvider(w http.ResponseWriter, r *http.Request) { var err error + _ = err // ------------- Path parameter "projectID" ------------- var projectID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "projectID", Err: err}) return @@ -29512,7 +31977,7 @@ func (siw *ServerInterfaceWrapper) CreateProvider(w http.ResponseWriter, r *http // ------------- Path parameter "type" ------------- var pType string - err = runtime.BindStyledParameterWithOptions("simple", "type", chi.URLParam(r, "type"), &pType, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "type", chi.URLParam(r, "type"), &pType, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: ""}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "type", Err: err}) return @@ -29539,11 +32004,12 @@ func (siw *ServerInterfaceWrapper) CreateProvider(w http.ResponseWriter, r *http func (siw *ServerInterfaceWrapper) GetProvider(w http.ResponseWriter, r *http.Request) { var err error + _ = err // ------------- Path parameter "projectID" ------------- var projectID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "projectID", Err: err}) return @@ -29552,7 +32018,7 @@ func (siw *ServerInterfaceWrapper) GetProvider(w http.ResponseWriter, r *http.Re // ------------- Path parameter "type" ------------- var pType string - err = runtime.BindStyledParameterWithOptions("simple", "type", chi.URLParam(r, "type"), &pType, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "type", chi.URLParam(r, "type"), &pType, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: ""}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "type", Err: err}) return @@ -29561,7 +32027,7 @@ func (siw *ServerInterfaceWrapper) GetProvider(w http.ResponseWriter, r *http.Re // ------------- Path parameter "providerID" ------------- var providerID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "providerID", chi.URLParam(r, "providerID"), &providerID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "providerID", chi.URLParam(r, "providerID"), &providerID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "providerID", Err: err}) return @@ -29588,11 +32054,12 @@ func (siw *ServerInterfaceWrapper) GetProvider(w http.ResponseWriter, r *http.Re func (siw *ServerInterfaceWrapper) UpdateProvider(w http.ResponseWriter, r *http.Request) { var err error + _ = err // ------------- Path parameter "projectID" ------------- var projectID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "projectID", Err: err}) return @@ -29601,7 +32068,7 @@ func (siw *ServerInterfaceWrapper) UpdateProvider(w http.ResponseWriter, r *http // ------------- Path parameter "type" ------------- var pType string - err = runtime.BindStyledParameterWithOptions("simple", "type", chi.URLParam(r, "type"), &pType, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "type", chi.URLParam(r, "type"), &pType, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: ""}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "type", Err: err}) return @@ -29610,7 +32077,7 @@ func (siw *ServerInterfaceWrapper) UpdateProvider(w http.ResponseWriter, r *http // ------------- Path parameter "providerID" ------------- var providerID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "providerID", chi.URLParam(r, "providerID"), &providerID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "providerID", chi.URLParam(r, "providerID"), &providerID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "providerID", Err: err}) return @@ -29637,11 +32104,12 @@ func (siw *ServerInterfaceWrapper) UpdateProvider(w http.ResponseWriter, r *http func (siw *ServerInterfaceWrapper) ListProjectPushProviders(w http.ResponseWriter, r *http.Request) { var err error + _ = err // ------------- Path parameter "projectID" ------------- var projectID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "projectID", Err: err}) return @@ -29668,11 +32136,12 @@ func (siw *ServerInterfaceWrapper) ListProjectPushProviders(w http.ResponseWrite func (siw *ServerInterfaceWrapper) DeleteProjectPushProvider(w http.ResponseWriter, r *http.Request) { var err error + _ = err // ------------- Path parameter "projectID" ------------- var projectID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "projectID", Err: err}) return @@ -29681,7 +32150,7 @@ func (siw *ServerInterfaceWrapper) DeleteProjectPushProvider(w http.ResponseWrit // ------------- Path parameter "platform" ------------- var platform ProjectPushProviderPlatform - err = runtime.BindStyledParameterWithOptions("simple", "platform", chi.URLParam(r, "platform"), &platform, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "platform", chi.URLParam(r, "platform"), &platform, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: ""}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "platform", Err: err}) return @@ -29708,11 +32177,12 @@ func (siw *ServerInterfaceWrapper) DeleteProjectPushProvider(w http.ResponseWrit func (siw *ServerInterfaceWrapper) UpsertProjectPushProvider(w http.ResponseWriter, r *http.Request) { var err error + _ = err // ------------- Path parameter "projectID" ------------- var projectID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "projectID", Err: err}) return @@ -29721,7 +32191,7 @@ func (siw *ServerInterfaceWrapper) UpsertProjectPushProvider(w http.ResponseWrit // ------------- Path parameter "platform" ------------- var platform ProjectPushProviderPlatform - err = runtime.BindStyledParameterWithOptions("simple", "platform", chi.URLParam(r, "platform"), &platform, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "platform", chi.URLParam(r, "platform"), &platform, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: ""}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "platform", Err: err}) return @@ -29748,11 +32218,12 @@ func (siw *ServerInterfaceWrapper) UpsertProjectPushProvider(w http.ResponseWrit func (siw *ServerInterfaceWrapper) ListSenderIdentities(w http.ResponseWriter, r *http.Request) { var err error + _ = err // ------------- Path parameter "projectID" ------------- var projectID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "projectID", Err: err}) return @@ -29769,33 +32240,53 @@ func (siw *ServerInterfaceWrapper) ListSenderIdentities(w http.ResponseWriter, r // ------------- Optional query parameter "provider_id" ------------- - err = runtime.BindQueryParameter("form", true, false, "provider_id", r.URL.Query(), ¶ms.ProviderId) + err = runtime.BindQueryParameterWithOptions("form", true, false, "provider_id", r.URL.Query(), ¶ms.ProviderId, runtime.BindQueryParameterOptions{Type: "string", Format: "uuid"}) if err != nil { - siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "provider_id", Err: err}) + var requiredError *runtime.RequiredParameterError + if errors.As(err, &requiredError) { + siw.ErrorHandlerFunc(w, r, &RequiredParamError{ParamName: "provider_id"}) + } else { + siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "provider_id", Err: err}) + } return } // ------------- Optional query parameter "channel" ------------- - err = runtime.BindQueryParameter("form", true, false, "channel", r.URL.Query(), ¶ms.Channel) + err = runtime.BindQueryParameterWithOptions("form", true, false, "channel", r.URL.Query(), ¶ms.Channel, runtime.BindQueryParameterOptions{Type: "string", Format: ""}) if err != nil { - siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "channel", Err: err}) + var requiredError *runtime.RequiredParameterError + if errors.As(err, &requiredError) { + siw.ErrorHandlerFunc(w, r, &RequiredParamError{ParamName: "channel"}) + } else { + siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "channel", Err: err}) + } return } // ------------- Optional query parameter "limit" ------------- - err = runtime.BindQueryParameter("form", true, false, "limit", r.URL.Query(), ¶ms.Limit) + err = runtime.BindQueryParameterWithOptions("form", true, false, "limit", r.URL.Query(), ¶ms.Limit, runtime.BindQueryParameterOptions{Type: "integer", Format: ""}) if err != nil { - siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "limit", Err: err}) + var requiredError *runtime.RequiredParameterError + if errors.As(err, &requiredError) { + siw.ErrorHandlerFunc(w, r, &RequiredParamError{ParamName: "limit"}) + } else { + siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "limit", Err: err}) + } return } // ------------- Optional query parameter "offset" ------------- - err = runtime.BindQueryParameter("form", true, false, "offset", r.URL.Query(), ¶ms.Offset) + err = runtime.BindQueryParameterWithOptions("form", true, false, "offset", r.URL.Query(), ¶ms.Offset, runtime.BindQueryParameterOptions{Type: "integer", Format: ""}) if err != nil { - siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "offset", Err: err}) + var requiredError *runtime.RequiredParameterError + if errors.As(err, &requiredError) { + siw.ErrorHandlerFunc(w, r, &RequiredParamError{ParamName: "offset"}) + } else { + siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "offset", Err: err}) + } return } @@ -29814,11 +32305,12 @@ func (siw *ServerInterfaceWrapper) ListSenderIdentities(w http.ResponseWriter, r func (siw *ServerInterfaceWrapper) CreateSenderIdentity(w http.ResponseWriter, r *http.Request) { var err error + _ = err // ------------- Path parameter "projectID" ------------- var projectID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "projectID", Err: err}) return @@ -29845,11 +32337,12 @@ func (siw *ServerInterfaceWrapper) CreateSenderIdentity(w http.ResponseWriter, r func (siw *ServerInterfaceWrapper) DeleteSenderIdentity(w http.ResponseWriter, r *http.Request) { var err error + _ = err // ------------- Path parameter "projectID" ------------- var projectID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "projectID", Err: err}) return @@ -29858,7 +32351,7 @@ func (siw *ServerInterfaceWrapper) DeleteSenderIdentity(w http.ResponseWriter, r // ------------- Path parameter "senderIdentityID" ------------- var senderIdentityID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "senderIdentityID", chi.URLParam(r, "senderIdentityID"), &senderIdentityID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "senderIdentityID", chi.URLParam(r, "senderIdentityID"), &senderIdentityID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "senderIdentityID", Err: err}) return @@ -29885,11 +32378,12 @@ func (siw *ServerInterfaceWrapper) DeleteSenderIdentity(w http.ResponseWriter, r func (siw *ServerInterfaceWrapper) GetSenderIdentity(w http.ResponseWriter, r *http.Request) { var err error + _ = err // ------------- Path parameter "projectID" ------------- var projectID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "projectID", Err: err}) return @@ -29898,7 +32392,7 @@ func (siw *ServerInterfaceWrapper) GetSenderIdentity(w http.ResponseWriter, r *h // ------------- Path parameter "senderIdentityID" ------------- var senderIdentityID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "senderIdentityID", chi.URLParam(r, "senderIdentityID"), &senderIdentityID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "senderIdentityID", chi.URLParam(r, "senderIdentityID"), &senderIdentityID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "senderIdentityID", Err: err}) return @@ -29925,11 +32419,12 @@ func (siw *ServerInterfaceWrapper) GetSenderIdentity(w http.ResponseWriter, r *h func (siw *ServerInterfaceWrapper) ListOrganizationEventSchemas(w http.ResponseWriter, r *http.Request) { var err error + _ = err // ------------- Path parameter "projectID" ------------- var projectID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "projectID", Err: err}) return @@ -29956,11 +32451,12 @@ func (siw *ServerInterfaceWrapper) ListOrganizationEventSchemas(w http.ResponseW func (siw *ServerInterfaceWrapper) DeleteOrganizationEventSchema(w http.ResponseWriter, r *http.Request) { var err error + _ = err // ------------- Path parameter "projectID" ------------- var projectID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "projectID", Err: err}) return @@ -29969,7 +32465,7 @@ func (siw *ServerInterfaceWrapper) DeleteOrganizationEventSchema(w http.Response // ------------- Path parameter "eventID" ------------- var eventID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "eventID", chi.URLParam(r, "eventID"), &eventID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "eventID", chi.URLParam(r, "eventID"), &eventID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "eventID", Err: err}) return @@ -29996,11 +32492,12 @@ func (siw *ServerInterfaceWrapper) DeleteOrganizationEventSchema(w http.Response func (siw *ServerInterfaceWrapper) ListOrganizations(w http.ResponseWriter, r *http.Request) { var err error + _ = err // ------------- Path parameter "projectID" ------------- var projectID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "projectID", Err: err}) return @@ -30017,25 +32514,40 @@ func (siw *ServerInterfaceWrapper) ListOrganizations(w http.ResponseWriter, r *h // ------------- Optional query parameter "limit" ------------- - err = runtime.BindQueryParameter("form", true, false, "limit", r.URL.Query(), ¶ms.Limit) + err = runtime.BindQueryParameterWithOptions("form", true, false, "limit", r.URL.Query(), ¶ms.Limit, runtime.BindQueryParameterOptions{Type: "integer", Format: ""}) if err != nil { - siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "limit", Err: err}) + var requiredError *runtime.RequiredParameterError + if errors.As(err, &requiredError) { + siw.ErrorHandlerFunc(w, r, &RequiredParamError{ParamName: "limit"}) + } else { + siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "limit", Err: err}) + } return } // ------------- Optional query parameter "offset" ------------- - err = runtime.BindQueryParameter("form", true, false, "offset", r.URL.Query(), ¶ms.Offset) + err = runtime.BindQueryParameterWithOptions("form", true, false, "offset", r.URL.Query(), ¶ms.Offset, runtime.BindQueryParameterOptions{Type: "integer", Format: ""}) if err != nil { - siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "offset", Err: err}) + var requiredError *runtime.RequiredParameterError + if errors.As(err, &requiredError) { + siw.ErrorHandlerFunc(w, r, &RequiredParamError{ParamName: "offset"}) + } else { + siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "offset", Err: err}) + } return } // ------------- Optional query parameter "search" ------------- - err = runtime.BindQueryParameter("form", true, false, "search", r.URL.Query(), ¶ms.Search) + err = runtime.BindQueryParameterWithOptions("form", true, false, "search", r.URL.Query(), ¶ms.Search, runtime.BindQueryParameterOptions{Type: "string", Format: ""}) if err != nil { - siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "search", Err: err}) + var requiredError *runtime.RequiredParameterError + if errors.As(err, &requiredError) { + siw.ErrorHandlerFunc(w, r, &RequiredParamError{ParamName: "search"}) + } else { + siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "search", Err: err}) + } return } @@ -30054,11 +32566,12 @@ func (siw *ServerInterfaceWrapper) ListOrganizations(w http.ResponseWriter, r *h func (siw *ServerInterfaceWrapper) UpsertOrganization(w http.ResponseWriter, r *http.Request) { var err error + _ = err // ------------- Path parameter "projectID" ------------- var projectID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "projectID", Err: err}) return @@ -30085,11 +32598,12 @@ func (siw *ServerInterfaceWrapper) UpsertOrganization(w http.ResponseWriter, r * func (siw *ServerInterfaceWrapper) ListOrganizationSchemas(w http.ResponseWriter, r *http.Request) { var err error + _ = err // ------------- Path parameter "projectID" ------------- var projectID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "projectID", Err: err}) return @@ -30116,11 +32630,12 @@ func (siw *ServerInterfaceWrapper) ListOrganizationSchemas(w http.ResponseWriter func (siw *ServerInterfaceWrapper) ListOrganizationMemberSchemas(w http.ResponseWriter, r *http.Request) { var err error + _ = err // ------------- Path parameter "projectID" ------------- var projectID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "projectID", Err: err}) return @@ -30147,11 +32662,12 @@ func (siw *ServerInterfaceWrapper) ListOrganizationMemberSchemas(w http.Response func (siw *ServerInterfaceWrapper) DeleteOrganization(w http.ResponseWriter, r *http.Request) { var err error + _ = err // ------------- Path parameter "projectID" ------------- var projectID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "projectID", Err: err}) return @@ -30160,7 +32676,7 @@ func (siw *ServerInterfaceWrapper) DeleteOrganization(w http.ResponseWriter, r * // ------------- Path parameter "organizationID" ------------- var organizationID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "organizationID", chi.URLParam(r, "organizationID"), &organizationID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "organizationID", chi.URLParam(r, "organizationID"), &organizationID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "organizationID", Err: err}) return @@ -30187,11 +32703,12 @@ func (siw *ServerInterfaceWrapper) DeleteOrganization(w http.ResponseWriter, r * func (siw *ServerInterfaceWrapper) GetOrganization(w http.ResponseWriter, r *http.Request) { var err error + _ = err // ------------- Path parameter "projectID" ------------- var projectID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "projectID", Err: err}) return @@ -30200,7 +32717,7 @@ func (siw *ServerInterfaceWrapper) GetOrganization(w http.ResponseWriter, r *htt // ------------- Path parameter "organizationID" ------------- var organizationID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "organizationID", chi.URLParam(r, "organizationID"), &organizationID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "organizationID", chi.URLParam(r, "organizationID"), &organizationID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "organizationID", Err: err}) return @@ -30227,11 +32744,12 @@ func (siw *ServerInterfaceWrapper) GetOrganization(w http.ResponseWriter, r *htt func (siw *ServerInterfaceWrapper) UpdateOrganization(w http.ResponseWriter, r *http.Request) { var err error + _ = err // ------------- Path parameter "projectID" ------------- var projectID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "projectID", Err: err}) return @@ -30240,7 +32758,7 @@ func (siw *ServerInterfaceWrapper) UpdateOrganization(w http.ResponseWriter, r * // ------------- Path parameter "organizationID" ------------- var organizationID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "organizationID", chi.URLParam(r, "organizationID"), &organizationID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "organizationID", chi.URLParam(r, "organizationID"), &organizationID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "organizationID", Err: err}) return @@ -30267,11 +32785,12 @@ func (siw *ServerInterfaceWrapper) UpdateOrganization(w http.ResponseWriter, r * func (siw *ServerInterfaceWrapper) GetOrganizationEvents(w http.ResponseWriter, r *http.Request) { var err error + _ = err // ------------- Path parameter "projectID" ------------- var projectID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "projectID", Err: err}) return @@ -30280,7 +32799,7 @@ func (siw *ServerInterfaceWrapper) GetOrganizationEvents(w http.ResponseWriter, // ------------- Path parameter "organizationID" ------------- var organizationID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "organizationID", chi.URLParam(r, "organizationID"), &organizationID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "organizationID", chi.URLParam(r, "organizationID"), &organizationID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "organizationID", Err: err}) return @@ -30297,25 +32816,40 @@ func (siw *ServerInterfaceWrapper) GetOrganizationEvents(w http.ResponseWriter, // ------------- Optional query parameter "limit" ------------- - err = runtime.BindQueryParameter("form", true, false, "limit", r.URL.Query(), ¶ms.Limit) + err = runtime.BindQueryParameterWithOptions("form", true, false, "limit", r.URL.Query(), ¶ms.Limit, runtime.BindQueryParameterOptions{Type: "integer", Format: ""}) if err != nil { - siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "limit", Err: err}) + var requiredError *runtime.RequiredParameterError + if errors.As(err, &requiredError) { + siw.ErrorHandlerFunc(w, r, &RequiredParamError{ParamName: "limit"}) + } else { + siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "limit", Err: err}) + } return } // ------------- Optional query parameter "offset" ------------- - err = runtime.BindQueryParameter("form", true, false, "offset", r.URL.Query(), ¶ms.Offset) + err = runtime.BindQueryParameterWithOptions("form", true, false, "offset", r.URL.Query(), ¶ms.Offset, runtime.BindQueryParameterOptions{Type: "integer", Format: ""}) if err != nil { - siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "offset", Err: err}) + var requiredError *runtime.RequiredParameterError + if errors.As(err, &requiredError) { + siw.ErrorHandlerFunc(w, r, &RequiredParamError{ParamName: "offset"}) + } else { + siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "offset", Err: err}) + } return } // ------------- Optional query parameter "search" ------------- - err = runtime.BindQueryParameter("form", true, false, "search", r.URL.Query(), ¶ms.Search) + err = runtime.BindQueryParameterWithOptions("form", true, false, "search", r.URL.Query(), ¶ms.Search, runtime.BindQueryParameterOptions{Type: "string", Format: ""}) if err != nil { - siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "search", Err: err}) + var requiredError *runtime.RequiredParameterError + if errors.As(err, &requiredError) { + siw.ErrorHandlerFunc(w, r, &RequiredParamError{ParamName: "search"}) + } else { + siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "search", Err: err}) + } return } @@ -30334,11 +32868,12 @@ func (siw *ServerInterfaceWrapper) GetOrganizationEvents(w http.ResponseWriter, func (siw *ServerInterfaceWrapper) CreateOrganizationEvent(w http.ResponseWriter, r *http.Request) { var err error + _ = err // ------------- Path parameter "projectID" ------------- var projectID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "projectID", Err: err}) return @@ -30347,7 +32882,7 @@ func (siw *ServerInterfaceWrapper) CreateOrganizationEvent(w http.ResponseWriter // ------------- Path parameter "organizationID" ------------- var organizationID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "organizationID", chi.URLParam(r, "organizationID"), &organizationID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "organizationID", chi.URLParam(r, "organizationID"), &organizationID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "organizationID", Err: err}) return @@ -30374,11 +32909,12 @@ func (siw *ServerInterfaceWrapper) CreateOrganizationEvent(w http.ResponseWriter func (siw *ServerInterfaceWrapper) DeleteOrganizationExternalID(w http.ResponseWriter, r *http.Request) { var err error + _ = err // ------------- Path parameter "projectID" ------------- var projectID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "projectID", Err: err}) return @@ -30387,7 +32923,7 @@ func (siw *ServerInterfaceWrapper) DeleteOrganizationExternalID(w http.ResponseW // ------------- Path parameter "organizationID" ------------- var organizationID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "organizationID", chi.URLParam(r, "organizationID"), &organizationID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "organizationID", chi.URLParam(r, "organizationID"), &organizationID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "organizationID", Err: err}) return @@ -30396,7 +32932,7 @@ func (siw *ServerInterfaceWrapper) DeleteOrganizationExternalID(w http.ResponseW // ------------- Path parameter "identifierID" ------------- var identifierID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "identifierID", chi.URLParam(r, "identifierID"), &identifierID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "identifierID", chi.URLParam(r, "identifierID"), &identifierID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "identifierID", Err: err}) return @@ -30423,11 +32959,12 @@ func (siw *ServerInterfaceWrapper) DeleteOrganizationExternalID(w http.ResponseW func (siw *ServerInterfaceWrapper) GetOrganizationScheduled(w http.ResponseWriter, r *http.Request) { var err error + _ = err // ------------- Path parameter "projectID" ------------- var projectID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "projectID", Err: err}) return @@ -30436,7 +32973,7 @@ func (siw *ServerInterfaceWrapper) GetOrganizationScheduled(w http.ResponseWrite // ------------- Path parameter "organizationID" ------------- var organizationID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "organizationID", chi.URLParam(r, "organizationID"), &organizationID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "organizationID", chi.URLParam(r, "organizationID"), &organizationID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "organizationID", Err: err}) return @@ -30453,17 +32990,27 @@ func (siw *ServerInterfaceWrapper) GetOrganizationScheduled(w http.ResponseWrite // ------------- Optional query parameter "limit" ------------- - err = runtime.BindQueryParameter("form", true, false, "limit", r.URL.Query(), ¶ms.Limit) + err = runtime.BindQueryParameterWithOptions("form", true, false, "limit", r.URL.Query(), ¶ms.Limit, runtime.BindQueryParameterOptions{Type: "integer", Format: ""}) if err != nil { - siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "limit", Err: err}) + var requiredError *runtime.RequiredParameterError + if errors.As(err, &requiredError) { + siw.ErrorHandlerFunc(w, r, &RequiredParamError{ParamName: "limit"}) + } else { + siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "limit", Err: err}) + } return } // ------------- Optional query parameter "offset" ------------- - err = runtime.BindQueryParameter("form", true, false, "offset", r.URL.Query(), ¶ms.Offset) + err = runtime.BindQueryParameterWithOptions("form", true, false, "offset", r.URL.Query(), ¶ms.Offset, runtime.BindQueryParameterOptions{Type: "integer", Format: ""}) if err != nil { - siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "offset", Err: err}) + var requiredError *runtime.RequiredParameterError + if errors.As(err, &requiredError) { + siw.ErrorHandlerFunc(w, r, &RequiredParamError{ParamName: "offset"}) + } else { + siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "offset", Err: err}) + } return } @@ -30482,11 +33029,12 @@ func (siw *ServerInterfaceWrapper) GetOrganizationScheduled(w http.ResponseWrite func (siw *ServerInterfaceWrapper) UpsertOrganizationScheduled(w http.ResponseWriter, r *http.Request) { var err error + _ = err // ------------- Path parameter "projectID" ------------- var projectID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "projectID", Err: err}) return @@ -30495,7 +33043,7 @@ func (siw *ServerInterfaceWrapper) UpsertOrganizationScheduled(w http.ResponseWr // ------------- Path parameter "organizationID" ------------- var organizationID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "organizationID", chi.URLParam(r, "organizationID"), &organizationID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "organizationID", chi.URLParam(r, "organizationID"), &organizationID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "organizationID", Err: err}) return @@ -30522,11 +33070,12 @@ func (siw *ServerInterfaceWrapper) UpsertOrganizationScheduled(w http.ResponseWr func (siw *ServerInterfaceWrapper) DeleteOrganizationScheduled(w http.ResponseWriter, r *http.Request) { var err error + _ = err // ------------- Path parameter "projectID" ------------- var projectID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "projectID", Err: err}) return @@ -30535,7 +33084,7 @@ func (siw *ServerInterfaceWrapper) DeleteOrganizationScheduled(w http.ResponseWr // ------------- Path parameter "organizationID" ------------- var organizationID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "organizationID", chi.URLParam(r, "organizationID"), &organizationID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "organizationID", chi.URLParam(r, "organizationID"), &organizationID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "organizationID", Err: err}) return @@ -30544,7 +33093,7 @@ func (siw *ServerInterfaceWrapper) DeleteOrganizationScheduled(w http.ResponseWr // ------------- Path parameter "scheduledInstanceID" ------------- var scheduledInstanceID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "scheduledInstanceID", chi.URLParam(r, "scheduledInstanceID"), &scheduledInstanceID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "scheduledInstanceID", chi.URLParam(r, "scheduledInstanceID"), &scheduledInstanceID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "scheduledInstanceID", Err: err}) return @@ -30571,11 +33120,12 @@ func (siw *ServerInterfaceWrapper) DeleteOrganizationScheduled(w http.ResponseWr func (siw *ServerInterfaceWrapper) UpdateOrganizationScheduled(w http.ResponseWriter, r *http.Request) { var err error + _ = err // ------------- Path parameter "projectID" ------------- var projectID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "projectID", Err: err}) return @@ -30584,7 +33134,7 @@ func (siw *ServerInterfaceWrapper) UpdateOrganizationScheduled(w http.ResponseWr // ------------- Path parameter "organizationID" ------------- var organizationID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "organizationID", chi.URLParam(r, "organizationID"), &organizationID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "organizationID", chi.URLParam(r, "organizationID"), &organizationID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "organizationID", Err: err}) return @@ -30593,7 +33143,7 @@ func (siw *ServerInterfaceWrapper) UpdateOrganizationScheduled(w http.ResponseWr // ------------- Path parameter "scheduledInstanceID" ------------- var scheduledInstanceID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "scheduledInstanceID", chi.URLParam(r, "scheduledInstanceID"), &scheduledInstanceID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "scheduledInstanceID", chi.URLParam(r, "scheduledInstanceID"), &scheduledInstanceID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "scheduledInstanceID", Err: err}) return @@ -30620,11 +33170,12 @@ func (siw *ServerInterfaceWrapper) UpdateOrganizationScheduled(w http.ResponseWr func (siw *ServerInterfaceWrapper) ListOrganizationMembers(w http.ResponseWriter, r *http.Request) { var err error + _ = err // ------------- Path parameter "projectID" ------------- var projectID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "projectID", Err: err}) return @@ -30633,7 +33184,7 @@ func (siw *ServerInterfaceWrapper) ListOrganizationMembers(w http.ResponseWriter // ------------- Path parameter "organizationID" ------------- var organizationID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "organizationID", chi.URLParam(r, "organizationID"), &organizationID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "organizationID", chi.URLParam(r, "organizationID"), &organizationID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "organizationID", Err: err}) return @@ -30650,17 +33201,27 @@ func (siw *ServerInterfaceWrapper) ListOrganizationMembers(w http.ResponseWriter // ------------- Optional query parameter "limit" ------------- - err = runtime.BindQueryParameter("form", true, false, "limit", r.URL.Query(), ¶ms.Limit) + err = runtime.BindQueryParameterWithOptions("form", true, false, "limit", r.URL.Query(), ¶ms.Limit, runtime.BindQueryParameterOptions{Type: "integer", Format: ""}) if err != nil { - siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "limit", Err: err}) + var requiredError *runtime.RequiredParameterError + if errors.As(err, &requiredError) { + siw.ErrorHandlerFunc(w, r, &RequiredParamError{ParamName: "limit"}) + } else { + siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "limit", Err: err}) + } return } // ------------- Optional query parameter "offset" ------------- - err = runtime.BindQueryParameter("form", true, false, "offset", r.URL.Query(), ¶ms.Offset) + err = runtime.BindQueryParameterWithOptions("form", true, false, "offset", r.URL.Query(), ¶ms.Offset, runtime.BindQueryParameterOptions{Type: "integer", Format: ""}) if err != nil { - siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "offset", Err: err}) + var requiredError *runtime.RequiredParameterError + if errors.As(err, &requiredError) { + siw.ErrorHandlerFunc(w, r, &RequiredParamError{ParamName: "offset"}) + } else { + siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "offset", Err: err}) + } return } @@ -30679,11 +33240,12 @@ func (siw *ServerInterfaceWrapper) ListOrganizationMembers(w http.ResponseWriter func (siw *ServerInterfaceWrapper) AddOrganizationMember(w http.ResponseWriter, r *http.Request) { var err error + _ = err // ------------- Path parameter "projectID" ------------- var projectID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "projectID", Err: err}) return @@ -30692,7 +33254,7 @@ func (siw *ServerInterfaceWrapper) AddOrganizationMember(w http.ResponseWriter, // ------------- Path parameter "organizationID" ------------- var organizationID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "organizationID", chi.URLParam(r, "organizationID"), &organizationID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "organizationID", chi.URLParam(r, "organizationID"), &organizationID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "organizationID", Err: err}) return @@ -30719,11 +33281,12 @@ func (siw *ServerInterfaceWrapper) AddOrganizationMember(w http.ResponseWriter, func (siw *ServerInterfaceWrapper) RemoveOrganizationMember(w http.ResponseWriter, r *http.Request) { var err error + _ = err // ------------- Path parameter "projectID" ------------- var projectID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "projectID", Err: err}) return @@ -30732,7 +33295,7 @@ func (siw *ServerInterfaceWrapper) RemoveOrganizationMember(w http.ResponseWrite // ------------- Path parameter "organizationID" ------------- var organizationID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "organizationID", chi.URLParam(r, "organizationID"), &organizationID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "organizationID", chi.URLParam(r, "organizationID"), &organizationID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "organizationID", Err: err}) return @@ -30741,7 +33304,7 @@ func (siw *ServerInterfaceWrapper) RemoveOrganizationMember(w http.ResponseWrite // ------------- Path parameter "userID" ------------- var userID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "userID", chi.URLParam(r, "userID"), &userID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "userID", chi.URLParam(r, "userID"), &userID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "userID", Err: err}) return @@ -30768,11 +33331,12 @@ func (siw *ServerInterfaceWrapper) RemoveOrganizationMember(w http.ResponseWrite func (siw *ServerInterfaceWrapper) ListUserEventSchemas(w http.ResponseWriter, r *http.Request) { var err error + _ = err // ------------- Path parameter "projectID" ------------- var projectID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "projectID", Err: err}) return @@ -30799,11 +33363,12 @@ func (siw *ServerInterfaceWrapper) ListUserEventSchemas(w http.ResponseWriter, r func (siw *ServerInterfaceWrapper) DeleteUserEventSchema(w http.ResponseWriter, r *http.Request) { var err error + _ = err // ------------- Path parameter "projectID" ------------- var projectID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "projectID", Err: err}) return @@ -30812,7 +33377,7 @@ func (siw *ServerInterfaceWrapper) DeleteUserEventSchema(w http.ResponseWriter, // ------------- Path parameter "eventID" ------------- var eventID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "eventID", chi.URLParam(r, "eventID"), &eventID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "eventID", chi.URLParam(r, "eventID"), &eventID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "eventID", Err: err}) return @@ -30839,11 +33404,12 @@ func (siw *ServerInterfaceWrapper) DeleteUserEventSchema(w http.ResponseWriter, func (siw *ServerInterfaceWrapper) ListScheduledSchemas(w http.ResponseWriter, r *http.Request) { var err error + _ = err // ------------- Path parameter "projectID" ------------- var projectID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "projectID", Err: err}) return @@ -30870,11 +33436,12 @@ func (siw *ServerInterfaceWrapper) ListScheduledSchemas(w http.ResponseWriter, r func (siw *ServerInterfaceWrapper) DeleteScheduledSchema(w http.ResponseWriter, r *http.Request) { var err error + _ = err // ------------- Path parameter "projectID" ------------- var projectID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "projectID", Err: err}) return @@ -30883,7 +33450,7 @@ func (siw *ServerInterfaceWrapper) DeleteScheduledSchema(w http.ResponseWriter, // ------------- Path parameter "scheduledID" ------------- var scheduledID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "scheduledID", chi.URLParam(r, "scheduledID"), &scheduledID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "scheduledID", chi.URLParam(r, "scheduledID"), &scheduledID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "scheduledID", Err: err}) return @@ -30910,11 +33477,12 @@ func (siw *ServerInterfaceWrapper) DeleteScheduledSchema(w http.ResponseWriter, func (siw *ServerInterfaceWrapper) CreateScheduleOffset(w http.ResponseWriter, r *http.Request) { var err error + _ = err // ------------- Path parameter "projectID" ------------- var projectID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "projectID", Err: err}) return @@ -30923,7 +33491,7 @@ func (siw *ServerInterfaceWrapper) CreateScheduleOffset(w http.ResponseWriter, r // ------------- Path parameter "scheduledID" ------------- var scheduledID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "scheduledID", chi.URLParam(r, "scheduledID"), &scheduledID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "scheduledID", chi.URLParam(r, "scheduledID"), &scheduledID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "scheduledID", Err: err}) return @@ -30950,11 +33518,12 @@ func (siw *ServerInterfaceWrapper) CreateScheduleOffset(w http.ResponseWriter, r func (siw *ServerInterfaceWrapper) ListUsers(w http.ResponseWriter, r *http.Request) { var err error + _ = err // ------------- Path parameter "projectID" ------------- var projectID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "projectID", Err: err}) return @@ -30971,25 +33540,40 @@ func (siw *ServerInterfaceWrapper) ListUsers(w http.ResponseWriter, r *http.Requ // ------------- Optional query parameter "limit" ------------- - err = runtime.BindQueryParameter("form", true, false, "limit", r.URL.Query(), ¶ms.Limit) + err = runtime.BindQueryParameterWithOptions("form", true, false, "limit", r.URL.Query(), ¶ms.Limit, runtime.BindQueryParameterOptions{Type: "integer", Format: ""}) if err != nil { - siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "limit", Err: err}) + var requiredError *runtime.RequiredParameterError + if errors.As(err, &requiredError) { + siw.ErrorHandlerFunc(w, r, &RequiredParamError{ParamName: "limit"}) + } else { + siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "limit", Err: err}) + } return } // ------------- Optional query parameter "offset" ------------- - err = runtime.BindQueryParameter("form", true, false, "offset", r.URL.Query(), ¶ms.Offset) + err = runtime.BindQueryParameterWithOptions("form", true, false, "offset", r.URL.Query(), ¶ms.Offset, runtime.BindQueryParameterOptions{Type: "integer", Format: ""}) if err != nil { - siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "offset", Err: err}) + var requiredError *runtime.RequiredParameterError + if errors.As(err, &requiredError) { + siw.ErrorHandlerFunc(w, r, &RequiredParamError{ParamName: "offset"}) + } else { + siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "offset", Err: err}) + } return } // ------------- Optional query parameter "search" ------------- - err = runtime.BindQueryParameter("form", true, false, "search", r.URL.Query(), ¶ms.Search) + err = runtime.BindQueryParameterWithOptions("form", true, false, "search", r.URL.Query(), ¶ms.Search, runtime.BindQueryParameterOptions{Type: "string", Format: ""}) if err != nil { - siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "search", Err: err}) + var requiredError *runtime.RequiredParameterError + if errors.As(err, &requiredError) { + siw.ErrorHandlerFunc(w, r, &RequiredParamError{ParamName: "search"}) + } else { + siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "search", Err: err}) + } return } @@ -31008,11 +33592,12 @@ func (siw *ServerInterfaceWrapper) ListUsers(w http.ResponseWriter, r *http.Requ func (siw *ServerInterfaceWrapper) IdentifyUser(w http.ResponseWriter, r *http.Request) { var err error + _ = err // ------------- Path parameter "projectID" ------------- var projectID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "projectID", Err: err}) return @@ -31039,11 +33624,12 @@ func (siw *ServerInterfaceWrapper) IdentifyUser(w http.ResponseWriter, r *http.R func (siw *ServerInterfaceWrapper) ImportUsers(w http.ResponseWriter, r *http.Request) { var err error + _ = err // ------------- Path parameter "projectID" ------------- var projectID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "projectID", Err: err}) return @@ -31070,11 +33656,12 @@ func (siw *ServerInterfaceWrapper) ImportUsers(w http.ResponseWriter, r *http.Re func (siw *ServerInterfaceWrapper) ListUserSchemas(w http.ResponseWriter, r *http.Request) { var err error + _ = err // ------------- Path parameter "projectID" ------------- var projectID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "projectID", Err: err}) return @@ -31101,11 +33688,12 @@ func (siw *ServerInterfaceWrapper) ListUserSchemas(w http.ResponseWriter, r *htt func (siw *ServerInterfaceWrapper) DeleteUser(w http.ResponseWriter, r *http.Request) { var err error + _ = err // ------------- Path parameter "projectID" ------------- var projectID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "projectID", Err: err}) return @@ -31114,7 +33702,7 @@ func (siw *ServerInterfaceWrapper) DeleteUser(w http.ResponseWriter, r *http.Req // ------------- Path parameter "userID" ------------- var userID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "userID", chi.URLParam(r, "userID"), &userID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "userID", chi.URLParam(r, "userID"), &userID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "userID", Err: err}) return @@ -31141,11 +33729,12 @@ func (siw *ServerInterfaceWrapper) DeleteUser(w http.ResponseWriter, r *http.Req func (siw *ServerInterfaceWrapper) GetUser(w http.ResponseWriter, r *http.Request) { var err error + _ = err // ------------- Path parameter "projectID" ------------- var projectID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "projectID", Err: err}) return @@ -31154,7 +33743,7 @@ func (siw *ServerInterfaceWrapper) GetUser(w http.ResponseWriter, r *http.Reques // ------------- Path parameter "userID" ------------- var userID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "userID", chi.URLParam(r, "userID"), &userID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "userID", chi.URLParam(r, "userID"), &userID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "userID", Err: err}) return @@ -31181,11 +33770,12 @@ func (siw *ServerInterfaceWrapper) GetUser(w http.ResponseWriter, r *http.Reques func (siw *ServerInterfaceWrapper) UpdateUser(w http.ResponseWriter, r *http.Request) { var err error + _ = err // ------------- Path parameter "projectID" ------------- var projectID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "projectID", Err: err}) return @@ -31194,7 +33784,7 @@ func (siw *ServerInterfaceWrapper) UpdateUser(w http.ResponseWriter, r *http.Req // ------------- Path parameter "userID" ------------- var userID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "userID", chi.URLParam(r, "userID"), &userID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "userID", chi.URLParam(r, "userID"), &userID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "userID", Err: err}) return @@ -31221,11 +33811,12 @@ func (siw *ServerInterfaceWrapper) UpdateUser(w http.ResponseWriter, r *http.Req func (siw *ServerInterfaceWrapper) GetUserDevices(w http.ResponseWriter, r *http.Request) { var err error + _ = err // ------------- Path parameter "projectID" ------------- var projectID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "projectID", Err: err}) return @@ -31234,7 +33825,7 @@ func (siw *ServerInterfaceWrapper) GetUserDevices(w http.ResponseWriter, r *http // ------------- Path parameter "userID" ------------- var userID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "userID", chi.URLParam(r, "userID"), &userID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "userID", chi.URLParam(r, "userID"), &userID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "userID", Err: err}) return @@ -31261,11 +33852,12 @@ func (siw *ServerInterfaceWrapper) GetUserDevices(w http.ResponseWriter, r *http func (siw *ServerInterfaceWrapper) CreateUserDevice(w http.ResponseWriter, r *http.Request) { var err error + _ = err // ------------- Path parameter "projectID" ------------- var projectID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "projectID", Err: err}) return @@ -31274,7 +33866,7 @@ func (siw *ServerInterfaceWrapper) CreateUserDevice(w http.ResponseWriter, r *ht // ------------- Path parameter "userID" ------------- var userID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "userID", chi.URLParam(r, "userID"), &userID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "userID", chi.URLParam(r, "userID"), &userID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "userID", Err: err}) return @@ -31301,11 +33893,12 @@ func (siw *ServerInterfaceWrapper) CreateUserDevice(w http.ResponseWriter, r *ht func (siw *ServerInterfaceWrapper) DeleteUserDevice(w http.ResponseWriter, r *http.Request) { var err error + _ = err // ------------- Path parameter "projectID" ------------- var projectID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "projectID", Err: err}) return @@ -31314,7 +33907,7 @@ func (siw *ServerInterfaceWrapper) DeleteUserDevice(w http.ResponseWriter, r *ht // ------------- Path parameter "userID" ------------- var userID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "userID", chi.URLParam(r, "userID"), &userID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "userID", chi.URLParam(r, "userID"), &userID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "userID", Err: err}) return @@ -31323,7 +33916,7 @@ func (siw *ServerInterfaceWrapper) DeleteUserDevice(w http.ResponseWriter, r *ht // ------------- Path parameter "deviceID" ------------- var deviceID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "deviceID", chi.URLParam(r, "deviceID"), &deviceID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "deviceID", chi.URLParam(r, "deviceID"), &deviceID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "deviceID", Err: err}) return @@ -31350,11 +33943,12 @@ func (siw *ServerInterfaceWrapper) DeleteUserDevice(w http.ResponseWriter, r *ht func (siw *ServerInterfaceWrapper) GetUserEvents(w http.ResponseWriter, r *http.Request) { var err error + _ = err // ------------- Path parameter "projectID" ------------- var projectID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "projectID", Err: err}) return @@ -31363,7 +33957,7 @@ func (siw *ServerInterfaceWrapper) GetUserEvents(w http.ResponseWriter, r *http. // ------------- Path parameter "userID" ------------- var userID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "userID", chi.URLParam(r, "userID"), &userID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "userID", chi.URLParam(r, "userID"), &userID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "userID", Err: err}) return @@ -31380,25 +33974,40 @@ func (siw *ServerInterfaceWrapper) GetUserEvents(w http.ResponseWriter, r *http. // ------------- Optional query parameter "limit" ------------- - err = runtime.BindQueryParameter("form", true, false, "limit", r.URL.Query(), ¶ms.Limit) + err = runtime.BindQueryParameterWithOptions("form", true, false, "limit", r.URL.Query(), ¶ms.Limit, runtime.BindQueryParameterOptions{Type: "integer", Format: ""}) if err != nil { - siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "limit", Err: err}) + var requiredError *runtime.RequiredParameterError + if errors.As(err, &requiredError) { + siw.ErrorHandlerFunc(w, r, &RequiredParamError{ParamName: "limit"}) + } else { + siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "limit", Err: err}) + } return } // ------------- Optional query parameter "offset" ------------- - err = runtime.BindQueryParameter("form", true, false, "offset", r.URL.Query(), ¶ms.Offset) + err = runtime.BindQueryParameterWithOptions("form", true, false, "offset", r.URL.Query(), ¶ms.Offset, runtime.BindQueryParameterOptions{Type: "integer", Format: ""}) if err != nil { - siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "offset", Err: err}) + var requiredError *runtime.RequiredParameterError + if errors.As(err, &requiredError) { + siw.ErrorHandlerFunc(w, r, &RequiredParamError{ParamName: "offset"}) + } else { + siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "offset", Err: err}) + } return } // ------------- Optional query parameter "search" ------------- - err = runtime.BindQueryParameter("form", true, false, "search", r.URL.Query(), ¶ms.Search) + err = runtime.BindQueryParameterWithOptions("form", true, false, "search", r.URL.Query(), ¶ms.Search, runtime.BindQueryParameterOptions{Type: "string", Format: ""}) if err != nil { - siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "search", Err: err}) + var requiredError *runtime.RequiredParameterError + if errors.As(err, &requiredError) { + siw.ErrorHandlerFunc(w, r, &RequiredParamError{ParamName: "search"}) + } else { + siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "search", Err: err}) + } return } @@ -31417,11 +34026,12 @@ func (siw *ServerInterfaceWrapper) GetUserEvents(w http.ResponseWriter, r *http. func (siw *ServerInterfaceWrapper) CreateUserEvent(w http.ResponseWriter, r *http.Request) { var err error + _ = err // ------------- Path parameter "projectID" ------------- var projectID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "projectID", Err: err}) return @@ -31430,7 +34040,7 @@ func (siw *ServerInterfaceWrapper) CreateUserEvent(w http.ResponseWriter, r *htt // ------------- Path parameter "userID" ------------- var userID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "userID", chi.URLParam(r, "userID"), &userID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "userID", chi.URLParam(r, "userID"), &userID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "userID", Err: err}) return @@ -31457,11 +34067,12 @@ func (siw *ServerInterfaceWrapper) CreateUserEvent(w http.ResponseWriter, r *htt func (siw *ServerInterfaceWrapper) DeleteUserExternalID(w http.ResponseWriter, r *http.Request) { var err error + _ = err // ------------- Path parameter "projectID" ------------- var projectID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "projectID", Err: err}) return @@ -31470,7 +34081,7 @@ func (siw *ServerInterfaceWrapper) DeleteUserExternalID(w http.ResponseWriter, r // ------------- Path parameter "userID" ------------- var userID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "userID", chi.URLParam(r, "userID"), &userID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "userID", chi.URLParam(r, "userID"), &userID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "userID", Err: err}) return @@ -31479,7 +34090,7 @@ func (siw *ServerInterfaceWrapper) DeleteUserExternalID(w http.ResponseWriter, r // ------------- Path parameter "identifierID" ------------- var identifierID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "identifierID", chi.URLParam(r, "identifierID"), &identifierID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "identifierID", chi.URLParam(r, "identifierID"), &identifierID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "identifierID", Err: err}) return @@ -31506,11 +34117,12 @@ func (siw *ServerInterfaceWrapper) DeleteUserExternalID(w http.ResponseWriter, r func (siw *ServerInterfaceWrapper) GetUserJourneys(w http.ResponseWriter, r *http.Request) { var err error + _ = err // ------------- Path parameter "projectID" ------------- var projectID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "projectID", Err: err}) return @@ -31519,7 +34131,7 @@ func (siw *ServerInterfaceWrapper) GetUserJourneys(w http.ResponseWriter, r *htt // ------------- Path parameter "userID" ------------- var userID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "userID", chi.URLParam(r, "userID"), &userID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "userID", chi.URLParam(r, "userID"), &userID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "userID", Err: err}) return @@ -31536,17 +34148,27 @@ func (siw *ServerInterfaceWrapper) GetUserJourneys(w http.ResponseWriter, r *htt // ------------- Optional query parameter "limit" ------------- - err = runtime.BindQueryParameter("form", true, false, "limit", r.URL.Query(), ¶ms.Limit) + err = runtime.BindQueryParameterWithOptions("form", true, false, "limit", r.URL.Query(), ¶ms.Limit, runtime.BindQueryParameterOptions{Type: "integer", Format: ""}) if err != nil { - siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "limit", Err: err}) + var requiredError *runtime.RequiredParameterError + if errors.As(err, &requiredError) { + siw.ErrorHandlerFunc(w, r, &RequiredParamError{ParamName: "limit"}) + } else { + siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "limit", Err: err}) + } return } // ------------- Optional query parameter "offset" ------------- - err = runtime.BindQueryParameter("form", true, false, "offset", r.URL.Query(), ¶ms.Offset) + err = runtime.BindQueryParameterWithOptions("form", true, false, "offset", r.URL.Query(), ¶ms.Offset, runtime.BindQueryParameterOptions{Type: "integer", Format: ""}) if err != nil { - siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "offset", Err: err}) + var requiredError *runtime.RequiredParameterError + if errors.As(err, &requiredError) { + siw.ErrorHandlerFunc(w, r, &RequiredParamError{ParamName: "offset"}) + } else { + siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "offset", Err: err}) + } return } @@ -31565,11 +34187,12 @@ func (siw *ServerInterfaceWrapper) GetUserJourneys(w http.ResponseWriter, r *htt func (siw *ServerInterfaceWrapper) GetUserScheduled(w http.ResponseWriter, r *http.Request) { var err error + _ = err // ------------- Path parameter "projectID" ------------- var projectID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "projectID", Err: err}) return @@ -31578,7 +34201,7 @@ func (siw *ServerInterfaceWrapper) GetUserScheduled(w http.ResponseWriter, r *ht // ------------- Path parameter "userID" ------------- var userID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "userID", chi.URLParam(r, "userID"), &userID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "userID", chi.URLParam(r, "userID"), &userID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "userID", Err: err}) return @@ -31595,17 +34218,27 @@ func (siw *ServerInterfaceWrapper) GetUserScheduled(w http.ResponseWriter, r *ht // ------------- Optional query parameter "limit" ------------- - err = runtime.BindQueryParameter("form", true, false, "limit", r.URL.Query(), ¶ms.Limit) + err = runtime.BindQueryParameterWithOptions("form", true, false, "limit", r.URL.Query(), ¶ms.Limit, runtime.BindQueryParameterOptions{Type: "integer", Format: ""}) if err != nil { - siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "limit", Err: err}) + var requiredError *runtime.RequiredParameterError + if errors.As(err, &requiredError) { + siw.ErrorHandlerFunc(w, r, &RequiredParamError{ParamName: "limit"}) + } else { + siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "limit", Err: err}) + } return } // ------------- Optional query parameter "offset" ------------- - err = runtime.BindQueryParameter("form", true, false, "offset", r.URL.Query(), ¶ms.Offset) + err = runtime.BindQueryParameterWithOptions("form", true, false, "offset", r.URL.Query(), ¶ms.Offset, runtime.BindQueryParameterOptions{Type: "integer", Format: ""}) if err != nil { - siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "offset", Err: err}) + var requiredError *runtime.RequiredParameterError + if errors.As(err, &requiredError) { + siw.ErrorHandlerFunc(w, r, &RequiredParamError{ParamName: "offset"}) + } else { + siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "offset", Err: err}) + } return } @@ -31624,11 +34257,12 @@ func (siw *ServerInterfaceWrapper) GetUserScheduled(w http.ResponseWriter, r *ht func (siw *ServerInterfaceWrapper) UpsertUserScheduled(w http.ResponseWriter, r *http.Request) { var err error + _ = err // ------------- Path parameter "projectID" ------------- var projectID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "projectID", Err: err}) return @@ -31637,7 +34271,7 @@ func (siw *ServerInterfaceWrapper) UpsertUserScheduled(w http.ResponseWriter, r // ------------- Path parameter "userID" ------------- var userID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "userID", chi.URLParam(r, "userID"), &userID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "userID", chi.URLParam(r, "userID"), &userID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "userID", Err: err}) return @@ -31664,11 +34298,12 @@ func (siw *ServerInterfaceWrapper) UpsertUserScheduled(w http.ResponseWriter, r func (siw *ServerInterfaceWrapper) DeleteUserScheduled(w http.ResponseWriter, r *http.Request) { var err error + _ = err // ------------- Path parameter "projectID" ------------- var projectID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "projectID", Err: err}) return @@ -31677,7 +34312,7 @@ func (siw *ServerInterfaceWrapper) DeleteUserScheduled(w http.ResponseWriter, r // ------------- Path parameter "userID" ------------- var userID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "userID", chi.URLParam(r, "userID"), &userID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "userID", chi.URLParam(r, "userID"), &userID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "userID", Err: err}) return @@ -31686,7 +34321,7 @@ func (siw *ServerInterfaceWrapper) DeleteUserScheduled(w http.ResponseWriter, r // ------------- Path parameter "scheduledInstanceID" ------------- var scheduledInstanceID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "scheduledInstanceID", chi.URLParam(r, "scheduledInstanceID"), &scheduledInstanceID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "scheduledInstanceID", chi.URLParam(r, "scheduledInstanceID"), &scheduledInstanceID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "scheduledInstanceID", Err: err}) return @@ -31713,11 +34348,12 @@ func (siw *ServerInterfaceWrapper) DeleteUserScheduled(w http.ResponseWriter, r func (siw *ServerInterfaceWrapper) UpdateUserScheduled(w http.ResponseWriter, r *http.Request) { var err error + _ = err // ------------- Path parameter "projectID" ------------- var projectID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "projectID", Err: err}) return @@ -31726,7 +34362,7 @@ func (siw *ServerInterfaceWrapper) UpdateUserScheduled(w http.ResponseWriter, r // ------------- Path parameter "userID" ------------- var userID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "userID", chi.URLParam(r, "userID"), &userID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "userID", chi.URLParam(r, "userID"), &userID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "userID", Err: err}) return @@ -31735,7 +34371,7 @@ func (siw *ServerInterfaceWrapper) UpdateUserScheduled(w http.ResponseWriter, r // ------------- Path parameter "scheduledInstanceID" ------------- var scheduledInstanceID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "scheduledInstanceID", chi.URLParam(r, "scheduledInstanceID"), &scheduledInstanceID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "scheduledInstanceID", chi.URLParam(r, "scheduledInstanceID"), &scheduledInstanceID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "scheduledInstanceID", Err: err}) return @@ -31762,11 +34398,12 @@ func (siw *ServerInterfaceWrapper) UpdateUserScheduled(w http.ResponseWriter, r func (siw *ServerInterfaceWrapper) GetUserOrganizations(w http.ResponseWriter, r *http.Request) { var err error + _ = err // ------------- Path parameter "projectID" ------------- var projectID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "projectID", Err: err}) return @@ -31775,7 +34412,7 @@ func (siw *ServerInterfaceWrapper) GetUserOrganizations(w http.ResponseWriter, r // ------------- Path parameter "userID" ------------- var userID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "userID", chi.URLParam(r, "userID"), &userID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "userID", chi.URLParam(r, "userID"), &userID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "userID", Err: err}) return @@ -31792,25 +34429,40 @@ func (siw *ServerInterfaceWrapper) GetUserOrganizations(w http.ResponseWriter, r // ------------- Optional query parameter "limit" ------------- - err = runtime.BindQueryParameter("form", true, false, "limit", r.URL.Query(), ¶ms.Limit) + err = runtime.BindQueryParameterWithOptions("form", true, false, "limit", r.URL.Query(), ¶ms.Limit, runtime.BindQueryParameterOptions{Type: "integer", Format: ""}) if err != nil { - siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "limit", Err: err}) + var requiredError *runtime.RequiredParameterError + if errors.As(err, &requiredError) { + siw.ErrorHandlerFunc(w, r, &RequiredParamError{ParamName: "limit"}) + } else { + siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "limit", Err: err}) + } return } // ------------- Optional query parameter "offset" ------------- - err = runtime.BindQueryParameter("form", true, false, "offset", r.URL.Query(), ¶ms.Offset) + err = runtime.BindQueryParameterWithOptions("form", true, false, "offset", r.URL.Query(), ¶ms.Offset, runtime.BindQueryParameterOptions{Type: "integer", Format: ""}) if err != nil { - siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "offset", Err: err}) + var requiredError *runtime.RequiredParameterError + if errors.As(err, &requiredError) { + siw.ErrorHandlerFunc(w, r, &RequiredParamError{ParamName: "offset"}) + } else { + siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "offset", Err: err}) + } return } // ------------- Optional query parameter "search" ------------- - err = runtime.BindQueryParameter("form", true, false, "search", r.URL.Query(), ¶ms.Search) + err = runtime.BindQueryParameterWithOptions("form", true, false, "search", r.URL.Query(), ¶ms.Search, runtime.BindQueryParameterOptions{Type: "string", Format: ""}) if err != nil { - siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "search", Err: err}) + var requiredError *runtime.RequiredParameterError + if errors.As(err, &requiredError) { + siw.ErrorHandlerFunc(w, r, &RequiredParamError{ParamName: "search"}) + } else { + siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "search", Err: err}) + } return } @@ -31829,11 +34481,12 @@ func (siw *ServerInterfaceWrapper) GetUserOrganizations(w http.ResponseWriter, r func (siw *ServerInterfaceWrapper) GetUserSubscriptions(w http.ResponseWriter, r *http.Request) { var err error + _ = err // ------------- Path parameter "projectID" ------------- var projectID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "projectID", Err: err}) return @@ -31842,7 +34495,7 @@ func (siw *ServerInterfaceWrapper) GetUserSubscriptions(w http.ResponseWriter, r // ------------- Path parameter "userID" ------------- var userID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "userID", chi.URLParam(r, "userID"), &userID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "userID", chi.URLParam(r, "userID"), &userID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "userID", Err: err}) return @@ -31859,17 +34512,27 @@ func (siw *ServerInterfaceWrapper) GetUserSubscriptions(w http.ResponseWriter, r // ------------- Optional query parameter "limit" ------------- - err = runtime.BindQueryParameter("form", true, false, "limit", r.URL.Query(), ¶ms.Limit) + err = runtime.BindQueryParameterWithOptions("form", true, false, "limit", r.URL.Query(), ¶ms.Limit, runtime.BindQueryParameterOptions{Type: "integer", Format: ""}) if err != nil { - siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "limit", Err: err}) + var requiredError *runtime.RequiredParameterError + if errors.As(err, &requiredError) { + siw.ErrorHandlerFunc(w, r, &RequiredParamError{ParamName: "limit"}) + } else { + siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "limit", Err: err}) + } return } // ------------- Optional query parameter "offset" ------------- - err = runtime.BindQueryParameter("form", true, false, "offset", r.URL.Query(), ¶ms.Offset) + err = runtime.BindQueryParameterWithOptions("form", true, false, "offset", r.URL.Query(), ¶ms.Offset, runtime.BindQueryParameterOptions{Type: "integer", Format: ""}) if err != nil { - siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "offset", Err: err}) + var requiredError *runtime.RequiredParameterError + if errors.As(err, &requiredError) { + siw.ErrorHandlerFunc(w, r, &RequiredParamError{ParamName: "offset"}) + } else { + siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "offset", Err: err}) + } return } @@ -31888,11 +34551,12 @@ func (siw *ServerInterfaceWrapper) GetUserSubscriptions(w http.ResponseWriter, r func (siw *ServerInterfaceWrapper) UpdateUserSubscriptions(w http.ResponseWriter, r *http.Request) { var err error + _ = err // ------------- Path parameter "projectID" ------------- var projectID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "projectID", Err: err}) return @@ -31901,7 +34565,7 @@ func (siw *ServerInterfaceWrapper) UpdateUserSubscriptions(w http.ResponseWriter // ------------- Path parameter "userID" ------------- var userID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "userID", chi.URLParam(r, "userID"), &userID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "userID", chi.URLParam(r, "userID"), &userID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "userID", Err: err}) return @@ -31928,11 +34592,12 @@ func (siw *ServerInterfaceWrapper) UpdateUserSubscriptions(w http.ResponseWriter func (siw *ServerInterfaceWrapper) ListSubscriptions(w http.ResponseWriter, r *http.Request) { var err error + _ = err // ------------- Path parameter "projectID" ------------- var projectID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "projectID", Err: err}) return @@ -31949,17 +34614,27 @@ func (siw *ServerInterfaceWrapper) ListSubscriptions(w http.ResponseWriter, r *h // ------------- Optional query parameter "limit" ------------- - err = runtime.BindQueryParameter("form", true, false, "limit", r.URL.Query(), ¶ms.Limit) + err = runtime.BindQueryParameterWithOptions("form", true, false, "limit", r.URL.Query(), ¶ms.Limit, runtime.BindQueryParameterOptions{Type: "integer", Format: ""}) if err != nil { - siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "limit", Err: err}) + var requiredError *runtime.RequiredParameterError + if errors.As(err, &requiredError) { + siw.ErrorHandlerFunc(w, r, &RequiredParamError{ParamName: "limit"}) + } else { + siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "limit", Err: err}) + } return } // ------------- Optional query parameter "offset" ------------- - err = runtime.BindQueryParameter("form", true, false, "offset", r.URL.Query(), ¶ms.Offset) + err = runtime.BindQueryParameterWithOptions("form", true, false, "offset", r.URL.Query(), ¶ms.Offset, runtime.BindQueryParameterOptions{Type: "integer", Format: ""}) if err != nil { - siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "offset", Err: err}) + var requiredError *runtime.RequiredParameterError + if errors.As(err, &requiredError) { + siw.ErrorHandlerFunc(w, r, &RequiredParamError{ParamName: "offset"}) + } else { + siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "offset", Err: err}) + } return } @@ -31978,11 +34653,12 @@ func (siw *ServerInterfaceWrapper) ListSubscriptions(w http.ResponseWriter, r *h func (siw *ServerInterfaceWrapper) CreateSubscription(w http.ResponseWriter, r *http.Request) { var err error + _ = err // ------------- Path parameter "projectID" ------------- var projectID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "projectID", Err: err}) return @@ -32009,11 +34685,12 @@ func (siw *ServerInterfaceWrapper) CreateSubscription(w http.ResponseWriter, r * func (siw *ServerInterfaceWrapper) GetSubscription(w http.ResponseWriter, r *http.Request) { var err error + _ = err // ------------- Path parameter "projectID" ------------- var projectID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "projectID", Err: err}) return @@ -32022,7 +34699,7 @@ func (siw *ServerInterfaceWrapper) GetSubscription(w http.ResponseWriter, r *htt // ------------- Path parameter "subscriptionID" ------------- var subscriptionID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "subscriptionID", chi.URLParam(r, "subscriptionID"), &subscriptionID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "subscriptionID", chi.URLParam(r, "subscriptionID"), &subscriptionID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "subscriptionID", Err: err}) return @@ -32049,11 +34726,12 @@ func (siw *ServerInterfaceWrapper) GetSubscription(w http.ResponseWriter, r *htt func (siw *ServerInterfaceWrapper) UpdateSubscription(w http.ResponseWriter, r *http.Request) { var err error + _ = err // ------------- Path parameter "projectID" ------------- var projectID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "projectID", Err: err}) return @@ -32062,7 +34740,7 @@ func (siw *ServerInterfaceWrapper) UpdateSubscription(w http.ResponseWriter, r * // ------------- Path parameter "subscriptionID" ------------- var subscriptionID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "subscriptionID", chi.URLParam(r, "subscriptionID"), &subscriptionID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "subscriptionID", chi.URLParam(r, "subscriptionID"), &subscriptionID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "subscriptionID", Err: err}) return @@ -32089,11 +34767,12 @@ func (siw *ServerInterfaceWrapper) UpdateSubscription(w http.ResponseWriter, r * func (siw *ServerInterfaceWrapper) ListTags(w http.ResponseWriter, r *http.Request) { var err error + _ = err // ------------- Path parameter "projectID" ------------- var projectID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "projectID", Err: err}) return @@ -32110,25 +34789,40 @@ func (siw *ServerInterfaceWrapper) ListTags(w http.ResponseWriter, r *http.Reque // ------------- Optional query parameter "limit" ------------- - err = runtime.BindQueryParameter("form", true, false, "limit", r.URL.Query(), ¶ms.Limit) + err = runtime.BindQueryParameterWithOptions("form", true, false, "limit", r.URL.Query(), ¶ms.Limit, runtime.BindQueryParameterOptions{Type: "integer", Format: ""}) if err != nil { - siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "limit", Err: err}) + var requiredError *runtime.RequiredParameterError + if errors.As(err, &requiredError) { + siw.ErrorHandlerFunc(w, r, &RequiredParamError{ParamName: "limit"}) + } else { + siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "limit", Err: err}) + } return } // ------------- Optional query parameter "offset" ------------- - err = runtime.BindQueryParameter("form", true, false, "offset", r.URL.Query(), ¶ms.Offset) + err = runtime.BindQueryParameterWithOptions("form", true, false, "offset", r.URL.Query(), ¶ms.Offset, runtime.BindQueryParameterOptions{Type: "integer", Format: ""}) if err != nil { - siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "offset", Err: err}) + var requiredError *runtime.RequiredParameterError + if errors.As(err, &requiredError) { + siw.ErrorHandlerFunc(w, r, &RequiredParamError{ParamName: "offset"}) + } else { + siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "offset", Err: err}) + } return } // ------------- Optional query parameter "search" ------------- - err = runtime.BindQueryParameter("form", true, false, "search", r.URL.Query(), ¶ms.Search) + err = runtime.BindQueryParameterWithOptions("form", true, false, "search", r.URL.Query(), ¶ms.Search, runtime.BindQueryParameterOptions{Type: "string", Format: ""}) if err != nil { - siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "search", Err: err}) + var requiredError *runtime.RequiredParameterError + if errors.As(err, &requiredError) { + siw.ErrorHandlerFunc(w, r, &RequiredParamError{ParamName: "search"}) + } else { + siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "search", Err: err}) + } return } @@ -32147,11 +34841,12 @@ func (siw *ServerInterfaceWrapper) ListTags(w http.ResponseWriter, r *http.Reque func (siw *ServerInterfaceWrapper) CreateTag(w http.ResponseWriter, r *http.Request) { var err error + _ = err // ------------- Path parameter "projectID" ------------- var projectID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "projectID", Err: err}) return @@ -32178,11 +34873,12 @@ func (siw *ServerInterfaceWrapper) CreateTag(w http.ResponseWriter, r *http.Requ func (siw *ServerInterfaceWrapper) DeleteTag(w http.ResponseWriter, r *http.Request) { var err error + _ = err // ------------- Path parameter "projectID" ------------- var projectID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "projectID", Err: err}) return @@ -32191,7 +34887,7 @@ func (siw *ServerInterfaceWrapper) DeleteTag(w http.ResponseWriter, r *http.Requ // ------------- Path parameter "tagID" ------------- var tagID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "tagID", chi.URLParam(r, "tagID"), &tagID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "tagID", chi.URLParam(r, "tagID"), &tagID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "tagID", Err: err}) return @@ -32218,11 +34914,12 @@ func (siw *ServerInterfaceWrapper) DeleteTag(w http.ResponseWriter, r *http.Requ func (siw *ServerInterfaceWrapper) GetTag(w http.ResponseWriter, r *http.Request) { var err error + _ = err // ------------- Path parameter "projectID" ------------- var projectID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "projectID", Err: err}) return @@ -32231,7 +34928,7 @@ func (siw *ServerInterfaceWrapper) GetTag(w http.ResponseWriter, r *http.Request // ------------- Path parameter "tagID" ------------- var tagID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "tagID", chi.URLParam(r, "tagID"), &tagID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "tagID", chi.URLParam(r, "tagID"), &tagID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "tagID", Err: err}) return @@ -32258,11 +34955,12 @@ func (siw *ServerInterfaceWrapper) GetTag(w http.ResponseWriter, r *http.Request func (siw *ServerInterfaceWrapper) UpdateTag(w http.ResponseWriter, r *http.Request) { var err error + _ = err // ------------- Path parameter "projectID" ------------- var projectID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "projectID", chi.URLParam(r, "projectID"), &projectID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "projectID", Err: err}) return @@ -32271,7 +34969,7 @@ func (siw *ServerInterfaceWrapper) UpdateTag(w http.ResponseWriter, r *http.Requ // ------------- Path parameter "tagID" ------------- var tagID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "tagID", chi.URLParam(r, "tagID"), &tagID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "tagID", chi.URLParam(r, "tagID"), &tagID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "tagID", Err: err}) return @@ -32298,6 +34996,7 @@ func (siw *ServerInterfaceWrapper) UpdateTag(w http.ResponseWriter, r *http.Requ func (siw *ServerInterfaceWrapper) ListAdmins(w http.ResponseWriter, r *http.Request) { var err error + _ = err ctx := r.Context() @@ -32310,25 +35009,40 @@ func (siw *ServerInterfaceWrapper) ListAdmins(w http.ResponseWriter, r *http.Req // ------------- Optional query parameter "limit" ------------- - err = runtime.BindQueryParameter("form", true, false, "limit", r.URL.Query(), ¶ms.Limit) + err = runtime.BindQueryParameterWithOptions("form", true, false, "limit", r.URL.Query(), ¶ms.Limit, runtime.BindQueryParameterOptions{Type: "integer", Format: ""}) if err != nil { - siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "limit", Err: err}) + var requiredError *runtime.RequiredParameterError + if errors.As(err, &requiredError) { + siw.ErrorHandlerFunc(w, r, &RequiredParamError{ParamName: "limit"}) + } else { + siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "limit", Err: err}) + } return } // ------------- Optional query parameter "offset" ------------- - err = runtime.BindQueryParameter("form", true, false, "offset", r.URL.Query(), ¶ms.Offset) + err = runtime.BindQueryParameterWithOptions("form", true, false, "offset", r.URL.Query(), ¶ms.Offset, runtime.BindQueryParameterOptions{Type: "integer", Format: ""}) if err != nil { - siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "offset", Err: err}) + var requiredError *runtime.RequiredParameterError + if errors.As(err, &requiredError) { + siw.ErrorHandlerFunc(w, r, &RequiredParamError{ParamName: "offset"}) + } else { + siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "offset", Err: err}) + } return } // ------------- Optional query parameter "search" ------------- - err = runtime.BindQueryParameter("form", true, false, "search", r.URL.Query(), ¶ms.Search) + err = runtime.BindQueryParameterWithOptions("form", true, false, "search", r.URL.Query(), ¶ms.Search, runtime.BindQueryParameterOptions{Type: "string", Format: ""}) if err != nil { - siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "search", Err: err}) + var requiredError *runtime.RequiredParameterError + if errors.As(err, &requiredError) { + siw.ErrorHandlerFunc(w, r, &RequiredParamError{ParamName: "search"}) + } else { + siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "search", Err: err}) + } return } @@ -32367,11 +35081,12 @@ func (siw *ServerInterfaceWrapper) CreateAdmin(w http.ResponseWriter, r *http.Re func (siw *ServerInterfaceWrapper) DeleteAdmin(w http.ResponseWriter, r *http.Request) { var err error + _ = err // ------------- Path parameter "adminID" ------------- var adminID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "adminID", chi.URLParam(r, "adminID"), &adminID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "adminID", chi.URLParam(r, "adminID"), &adminID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "adminID", Err: err}) return @@ -32398,11 +35113,12 @@ func (siw *ServerInterfaceWrapper) DeleteAdmin(w http.ResponseWriter, r *http.Re func (siw *ServerInterfaceWrapper) GetAdmin(w http.ResponseWriter, r *http.Request) { var err error + _ = err // ------------- Path parameter "adminID" ------------- var adminID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "adminID", chi.URLParam(r, "adminID"), &adminID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "adminID", chi.URLParam(r, "adminID"), &adminID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "adminID", Err: err}) return @@ -32429,11 +35145,12 @@ func (siw *ServerInterfaceWrapper) GetAdmin(w http.ResponseWriter, r *http.Reque func (siw *ServerInterfaceWrapper) UpdateAdmin(w http.ResponseWriter, r *http.Request) { var err error + _ = err // ------------- Path parameter "adminID" ------------- var adminID openapi_types.UUID - err = runtime.BindStyledParameterWithOptions("simple", "adminID", chi.URLParam(r, "adminID"), &adminID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "adminID", chi.URLParam(r, "adminID"), &adminID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "uuid"}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "adminID", Err: err}) return @@ -32480,11 +35197,12 @@ func (siw *ServerInterfaceWrapper) Whoami(w http.ResponseWriter, r *http.Request func (siw *ServerInterfaceWrapper) AuthCallback(w http.ResponseWriter, r *http.Request) { var err error + _ = err // ------------- Path parameter "driver" ------------- var driver AuthCallbackParamsDriver - err = runtime.BindStyledParameterWithOptions("simple", "driver", chi.URLParam(r, "driver"), &driver, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "driver", chi.URLParam(r, "driver"), &driver, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: ""}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "driver", Err: err}) return @@ -32519,11 +35237,12 @@ func (siw *ServerInterfaceWrapper) GetAuthMethods(w http.ResponseWriter, r *http func (siw *ServerInterfaceWrapper) AuthWebhook(w http.ResponseWriter, r *http.Request) { var err error + _ = err // ------------- Path parameter "driver" ------------- var driver AuthWebhookParamsDriver - err = runtime.BindStyledParameterWithOptions("simple", "driver", chi.URLParam(r, "driver"), &driver, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "driver", chi.URLParam(r, "driver"), &driver, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: ""}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "driver", Err: err}) return @@ -32770,6 +35489,9 @@ func HandlerWithOptions(si ServerInterface, options ChiServerOptions) http.Handl r.Group(func(r chi.Router) { r.Post(options.BaseURL+"/api/admin/projects/{projectID}/campaigns/{campaignID}/templates/{templateID}/test", wrapper.SendTest) }) + r.Group(func(r chi.Router) { + r.Post(options.BaseURL+"/api/admin/projects/{projectID}/campaigns/{campaignID}/unarchive", wrapper.UnarchiveCampaign) + }) r.Group(func(r chi.Router) { r.Get(options.BaseURL+"/api/admin/projects/{projectID}/campaigns/{campaignID}/users", wrapper.GetCampaignUsers) }) @@ -32818,6 +35540,9 @@ func HandlerWithOptions(si ServerInterface, options ChiServerOptions) http.Handl r.Group(func(r chi.Router) { r.Put(options.BaseURL+"/api/admin/projects/{projectID}/journeys/{journeyID}/steps", wrapper.SetJourneySteps) }) + r.Group(func(r chi.Router) { + r.Post(options.BaseURL+"/api/admin/projects/{projectID}/journeys/{journeyID}/unarchive", wrapper.UnarchiveJourney) + }) r.Group(func(r chi.Router) { r.Delete(options.BaseURL+"/api/admin/projects/{projectID}/journeys/{journeyID}/users/{userID}", wrapper.CancelUserJourney) }) @@ -32869,6 +35594,9 @@ func HandlerWithOptions(si ServerInterface, options ChiServerOptions) http.Handl r.Group(func(r chi.Router) { r.Post(options.BaseURL+"/api/admin/projects/{projectID}/lists/{listID}/duplicate", wrapper.DuplicateList) }) + r.Group(func(r chi.Router) { + r.Post(options.BaseURL+"/api/admin/projects/{projectID}/lists/{listID}/unarchive", wrapper.UnarchiveList) + }) r.Group(func(r chi.Router) { r.Get(options.BaseURL+"/api/admin/projects/{projectID}/lists/{listID}/users", wrapper.GetListUsers) }) diff --git a/internal/store/journey/journeys.go b/internal/store/journey/journeys.go index e4eaee4c..a666b86c 100644 --- a/internal/store/journey/journeys.go +++ b/internal/store/journey/journeys.go @@ -332,7 +332,7 @@ func (s *JourneysStore) CreateJourney(ctx context.Context, journey Journey) (uui return id, nil } -func (s *JourneysStore) ListJourneys(ctx context.Context, projectID uuid.UUID, pagination store.Pagination, search string) (Journeys, int, error) { +func (s *JourneysStore) ListJourneys(ctx context.Context, projectID uuid.UUID, pagination store.Pagination, search string, includeDeleted bool) (Journeys, int, error) { query := ` SELECT id, @@ -342,9 +342,10 @@ func (s *JourneysStore) ListJourneys(ctx context.Context, projectID uuid.UUID, p version_id, created_at, updated_at, + deleted_at, COUNT(*) OVER () AS total_count FROM journeys - WHERE project_id = $1 AND deleted_at IS NULL + WHERE project_id = $1 AND ($5 = true OR deleted_at IS NULL) AND ($4 = '' OR name ILIKE '%' || $4 || '%') ORDER BY created_at DESC LIMIT $2 OFFSET $3` @@ -355,7 +356,7 @@ func (s *JourneysStore) ListJourneys(ctx context.Context, projectID uuid.UUID, p } var results []rows - err := s.db.SelectContext(ctx, &results, query, projectID, pagination.Limit, pagination.Offset, search) + err := s.db.SelectContext(ctx, &results, query, projectID, pagination.Limit, pagination.Offset, search, includeDeleted) if err != nil { return nil, 0, err } @@ -449,6 +450,16 @@ func (s *JourneysStore) DeleteJourney(ctx context.Context, projectID, journeyID return err } +func (s *JourneysStore) UnarchiveJourney(ctx context.Context, projectID, journeyID uuid.UUID) error { + stmt := ` + UPDATE journeys + SET deleted_at = NULL + WHERE id = $1 AND project_id = $2 AND deleted_at IS NOT NULL` + + _, err := s.db.ExecContext(ctx, stmt, journeyID, projectID) + return err +} + func (s *JourneysStore) CreateJourneyVersion(ctx context.Context, journeyID uuid.UUID, status string) (uuid.UUID, error) { stmt := ` WITH next_version AS ( diff --git a/internal/store/management/campaigns.go b/internal/store/management/campaigns.go index 06109460..ad133327 100644 --- a/internal/store/management/campaigns.go +++ b/internal/store/management/campaigns.go @@ -50,6 +50,7 @@ func (campaign Campaign) OAPI() oapi.Campaign { } } + archived := campaign.DeletedAt != nil result := oapi.Campaign{ Id: campaign.ID, ProjectId: campaign.ProjectID, @@ -62,6 +63,7 @@ func (campaign Campaign) OAPI() oapi.Campaign { Templates: campaign.Templates.OAPI(), CreatedAt: campaign.CreatedAt, UpdatedAt: campaign.UpdatedAt, + Archived: &archived, } return result @@ -110,13 +112,13 @@ func (s *CampaignsStore) CreateCampaign(ctx context.Context, campaign Campaign) return id, nil } -func (s *CampaignsStore) ListCampaigns(ctx context.Context, project uuid.UUID, pagination store.Pagination, search string) (Campaigns, int, error) { +func (s *CampaignsStore) ListCampaigns(ctx context.Context, project uuid.UUID, pagination store.Pagination, search string, includeDeleted bool) (Campaigns, int, error) { query := ` SELECT id, project_id, COALESCE(name, '') AS name, channel, subscription_id, transactional, delivery, variables, created_at, updated_at, deleted_at, COUNT(*) OVER () AS total_count FROM campaigns WHERE project_id = $1 - AND deleted_at IS NULL + AND ($5 = true OR deleted_at IS NULL) AND ($4 = '' OR COALESCE(name, '') ILIKE '%' || $4 || '%') ORDER BY created_at DESC LIMIT $2 OFFSET $3` @@ -125,7 +127,7 @@ func (s *CampaignsStore) ListCampaigns(ctx context.Context, project uuid.UUID, p Campaign TotalCount int `db:"total_count"` } - err := s.db.SelectContext(ctx, &results, query, project, pagination.Limit, pagination.Offset, search) + err := s.db.SelectContext(ctx, &results, query, project, pagination.Limit, pagination.Offset, search, includeDeleted) if err != nil { return nil, 0, err } @@ -212,6 +214,28 @@ func (s *CampaignsStore) DeleteCampaign(ctx context.Context, projectID, campaign return err } +func (s *CampaignsStore) UnarchiveCampaign(ctx context.Context, projectID, campaignID uuid.UUID) error { + query := ` + UPDATE campaigns + SET deleted_at = NULL + WHERE project_id = $1 + AND id = $2 + AND deleted_at IS NOT NULL` + + result, err := s.db.ExecContext(ctx, query, projectID, campaignID) + if err != nil { + return err + } + rowsAffected, err := result.RowsAffected() + if err != nil { + return err + } + if rowsAffected == 0 { + return store.ErrNoRows + } + return nil +} + type CampaignUsers []CampaignUser func (users CampaignUsers) OAPI() []oapi.CampaignUser { diff --git a/internal/store/subjects/lists.go b/internal/store/subjects/lists.go index 3a75687f..28fe8980 100644 --- a/internal/store/subjects/lists.go +++ b/internal/store/subjects/lists.go @@ -63,6 +63,7 @@ type List struct { UsersCount int `db:"users_count"` CreatedAt time.Time `db:"created_at"` UpdatedAt time.Time `db:"updated_at"` + DeletedAt *time.Time `db:"deleted_at"` } func (list List) OAPI() oapi.List { @@ -75,6 +76,7 @@ func (list List) OAPI() oapi.List { state = oapi.ListStateDraft } + archived := list.DeletedAt != nil result := oapi.List{ Id: list.ID, ProjectId: list.ProjectID, @@ -85,6 +87,7 @@ func (list List) OAPI() oapi.List { Version: list.Version, CreatedAt: list.CreatedAt, UpdatedAt: list.UpdatedAt, + Archived: &archived, } if list.VersionNumber > 0 { @@ -149,7 +152,8 @@ const listSelectFields = ` pub_r.rule AS rule, draft_r.rule AS draft_rule, COALESCE(active_v.version_number, 0) AS version_number, - l.version` + l.version, + l.deleted_at` // listSelectJoins returns the common JOIN clause for list queries. // - active_v: the version pointed to by lists.version_id @@ -170,7 +174,7 @@ const listSelectJoins = ` LEFT JOIN list_versions draft_v ON draft_v.list_id = l.id AND draft_v.status = 'draft' LEFT JOIN rules draft_r ON draft_v.rule_id = draft_r.id` -func (s *ListsStore) ListLists(ctx context.Context, projectID uuid.UUID, pagination store.Pagination, search string) (Lists, int, error) { +func (s *ListsStore) ListLists(ctx context.Context, projectID uuid.UUID, pagination store.Pagination, search string, includeDeleted bool) (Lists, int, error) { q := fmt.Sprintf(` SELECT %s, @@ -182,7 +186,7 @@ func (s *ListsStore) ListLists(ctx context.Context, projectID uuid.UUID, paginat %s LEFT JOIN list_users lu ON lu.list_id = l.id WHERE l.project_id = $1 - AND l.deleted_at IS NULL + AND ($5 = true OR l.deleted_at IS NULL) AND ($4 = '' OR l.name ILIKE '%%' || $4 || '%%') GROUP BY l.id, l.project_id, l.name, l.type, l.version_id, active_v.status, pub_r.rule, draft_r.rule, active_v.version_number, @@ -194,7 +198,7 @@ func (s *ListsStore) ListLists(ctx context.Context, projectID uuid.UUID, paginat List TotalCount int `db:"total_count"` } - err := s.db.SelectContext(ctx, &results, q, projectID, pagination.Limit, pagination.Offset, search) + err := s.db.SelectContext(ctx, &results, q, projectID, pagination.Limit, pagination.Offset, search, includeDeleted) if err != nil { return nil, 0, err } @@ -425,6 +429,28 @@ func (s *ListsStore) DeleteList(ctx context.Context, projectID, listID uuid.UUID return err } +func (s *ListsStore) UnarchiveList(ctx context.Context, projectID, listID uuid.UUID) error { + query := ` + UPDATE lists + SET deleted_at = NULL + WHERE project_id = $1 + AND id = $2 + AND deleted_at IS NOT NULL` + + result, err := s.db.ExecContext(ctx, query, projectID, listID) + if err != nil { + return err + } + rowsAffected, err := result.RowsAffected() + if err != nil { + return err + } + if rowsAffected == 0 { + return sql.ErrNoRows + } + return nil +} + func (s *ListsStore) DuplicateList(ctx context.Context, projectID, listID uuid.UUID, newName string) (uuid.UUID, error) { // Create the new list (without version_id — it starts as a draft) q := ` diff --git a/internal/store/subjects/lists_test.go b/internal/store/subjects/lists_test.go index 56a4b08a..f99c9814 100644 --- a/internal/store/subjects/lists_test.go +++ b/internal/store/subjects/lists_test.go @@ -964,7 +964,7 @@ func TestListLists(t *testing.T) { }) require.NoError(t, err) - lists, total, err := db.ListLists(ctx, projectID, store.Pagination{Limit: 10, Offset: 0}, "") + lists, total, err := db.ListLists(ctx, projectID, store.Pagination{Limit: 10, Offset: 0}, "", false) require.NoError(t, err) require.Equal(t, 3, total) require.Len(t, lists, 3) diff --git a/internal/wasm/test/action.wasm b/internal/wasm/test/action.wasm index f04e3f6f..8518df2f 100644 Binary files a/internal/wasm/test/action.wasm and b/internal/wasm/test/action.wasm differ diff --git a/internal/wasm/test/provider.wasm b/internal/wasm/test/provider.wasm index 5647cdb8..18e81c1e 100644 Binary files a/internal/wasm/test/provider.wasm and b/internal/wasm/test/provider.wasm differ diff --git a/oapi/webhooks_gen.go b/oapi/webhooks_gen.go index b5aa6a47..e29671bb 100644 --- a/oapi/webhooks_gen.go +++ b/oapi/webhooks_gen.go @@ -1,6 +1,6 @@ // Package oapi provides primitives to interact with the openapi HTTP API. // -// Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.5.1 DO NOT EDIT. +// Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.7.0 DO NOT EDIT. package oapi import ( @@ -14,12 +14,34 @@ const ( ProjectCreated ProjectCreatedEventEvent = "project.created" ) +// Valid indicates whether the value is a known member of the ProjectCreatedEventEvent enum. +func (e ProjectCreatedEventEvent) Valid() bool { + switch e { + case ProjectCreated: + return true + default: + return false + } +} + // Defines values for WebhookResponseStatus. const ( Error WebhookResponseStatus = "error" Ok WebhookResponseStatus = "ok" ) +// Valid indicates whether the value is a known member of the WebhookResponseStatus enum. +func (e WebhookResponseStatus) Valid() bool { + switch e { + case Error: + return true + case Ok: + return true + default: + return false + } +} + // ProjectCreatedEvent defines model for ProjectCreatedEvent. type ProjectCreatedEvent struct { // Event The event type