Add countries and category to vendors
Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
This commit is contained in:
169
apps/console/src/components/form/CountriesField.tsx
Normal file
169
apps/console/src/components/form/CountriesField.tsx
Normal file
@@ -0,0 +1,169 @@
|
|||||||
|
import { useTranslate } from "@probo/i18n";
|
||||||
|
import { useRef, useState } from "react";
|
||||||
|
import { Badge, Input, IconCrossLargeX } from "@probo/ui";
|
||||||
|
import { type Control, Controller, type FieldPath, type FieldValues } from "react-hook-form";
|
||||||
|
import { getCountryName, getCountryOptions, countries, type CountryCode } from "@probo/helpers";
|
||||||
|
import clsx from "clsx";
|
||||||
|
|
||||||
|
type Props<T extends FieldValues = FieldValues> = {
|
||||||
|
control: Control<T>;
|
||||||
|
name: FieldPath<T>;
|
||||||
|
disabled?: boolean;
|
||||||
|
};
|
||||||
|
|
||||||
|
export function CountriesField<T extends FieldValues = FieldValues>({ control, name, disabled }: Props<T>) {
|
||||||
|
return (
|
||||||
|
<Controller
|
||||||
|
control={control}
|
||||||
|
name={name}
|
||||||
|
render={({ field }) => (
|
||||||
|
<CountriesFieldInput
|
||||||
|
value={field.value}
|
||||||
|
onValueChange={field.onChange}
|
||||||
|
disabled={disabled}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
type CountriesFieldInputProps = {
|
||||||
|
value: string[];
|
||||||
|
onValueChange: (value: string[]) => void;
|
||||||
|
disabled?: boolean;
|
||||||
|
};
|
||||||
|
|
||||||
|
function CountriesFieldInput(props: CountriesFieldInputProps) {
|
||||||
|
const { __ } = useTranslate();
|
||||||
|
const animateBadge = useRef(false);
|
||||||
|
|
||||||
|
const addCountry = (code: string) => {
|
||||||
|
animateBadge.current = true;
|
||||||
|
props.onValueChange([...props.value, code]);
|
||||||
|
};
|
||||||
|
|
||||||
|
const removeCountry = (code: string) => {
|
||||||
|
animateBadge.current = true;
|
||||||
|
props.onValueChange(props.value.filter((v) => v !== code));
|
||||||
|
};
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div className={clsx(props.value.length > 0 ? "space-y-4" : "")}>
|
||||||
|
{props.value.length > 0 && (
|
||||||
|
<div className="space-y-2">
|
||||||
|
<div className="flex flex-wrap gap-2">
|
||||||
|
{props.value.map((countryCode) => (
|
||||||
|
<Badge asChild size="md" key={countryCode}>
|
||||||
|
<button
|
||||||
|
onClick={() => removeCountry(countryCode)}
|
||||||
|
type="button"
|
||||||
|
disabled={props.disabled}
|
||||||
|
className={clsx(
|
||||||
|
"hover:bg-subtle-hover cursor-pointer",
|
||||||
|
props.disabled && "opacity-50 cursor-not-allowed",
|
||||||
|
animateBadge.current &&
|
||||||
|
"starting:opacity-0 starting:w-0 w-max transition-all duration-500 starting:bg-accent"
|
||||||
|
)}
|
||||||
|
>
|
||||||
|
{getCountryName(__, countryCode as CountryCode)}
|
||||||
|
<div className="w-0 overflow-hidden group-hover:w-4 duration-200">
|
||||||
|
<IconCrossLargeX size={12} />
|
||||||
|
</div>
|
||||||
|
</button>
|
||||||
|
</Badge>
|
||||||
|
))}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
{!props.disabled && (
|
||||||
|
<CountryInput
|
||||||
|
availableCountries={countries.filter(
|
||||||
|
(c: CountryCode) => !props.value.includes(c)
|
||||||
|
)}
|
||||||
|
onAdd={addCountry}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
type CountryInputProps = {
|
||||||
|
availableCountries: readonly CountryCode[];
|
||||||
|
onAdd: (code: string) => void;
|
||||||
|
};
|
||||||
|
|
||||||
|
function CountryInput({ availableCountries, onAdd }: CountryInputProps) {
|
||||||
|
const { __ } = useTranslate();
|
||||||
|
const [search, setSearch] = useState("");
|
||||||
|
const [isOpen, setIsOpen] = useState(false);
|
||||||
|
const countryOptions = getCountryOptions(__);
|
||||||
|
|
||||||
|
const filteredCountries = countryOptions
|
||||||
|
.filter((option: { value: string; label: string }) => availableCountries.includes(option.value as CountryCode))
|
||||||
|
.filter((option: { value: string; label: string }) =>
|
||||||
|
option.label.toLowerCase().includes(search.toLowerCase())
|
||||||
|
);
|
||||||
|
|
||||||
|
const handleCountryClick = (value: string) => {
|
||||||
|
onAdd(value);
|
||||||
|
setSearch("");
|
||||||
|
};
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div className="relative">
|
||||||
|
<div className="flex items-center gap-2">
|
||||||
|
<div className="relative flex-1">
|
||||||
|
<Input
|
||||||
|
type="text"
|
||||||
|
value={search}
|
||||||
|
onChange={(e) => setSearch(e.target.value)}
|
||||||
|
onFocus={() => setIsOpen(true)}
|
||||||
|
placeholder={__("Search and add countries...")}
|
||||||
|
className="w-full pr-8"
|
||||||
|
/>
|
||||||
|
<button
|
||||||
|
type="button"
|
||||||
|
onClick={() => setIsOpen(!isOpen)}
|
||||||
|
className="absolute right-2 top-1/2 -translate-y-1/2 text-txt-secondary hover:text-txt-primary transition-colors"
|
||||||
|
>
|
||||||
|
<svg
|
||||||
|
className="w-4 h-4"
|
||||||
|
fill="none"
|
||||||
|
stroke="currentColor"
|
||||||
|
viewBox="0 0 24 24"
|
||||||
|
>
|
||||||
|
<path
|
||||||
|
strokeLinecap="round"
|
||||||
|
strokeLinejoin="round"
|
||||||
|
strokeWidth={2}
|
||||||
|
d="M19 9l-7 7-7-7"
|
||||||
|
/>
|
||||||
|
</svg>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{isOpen && filteredCountries.length > 0 && (
|
||||||
|
<div className="absolute z-50 w-full mt-1 p-2 shadow-mid bg-level-1 overflow-y-auto overflow-x-hidden rounded-2xl border-border-low max-h-60">
|
||||||
|
{filteredCountries.map((option: { value: string; label: string }) => (
|
||||||
|
<button
|
||||||
|
key={option.value}
|
||||||
|
type="button"
|
||||||
|
onClick={() => handleCountryClick(option.value)}
|
||||||
|
className="w-full px-3 py-2 text-left text-sm text-txt-primary hover:bg-highlight-hover focus:bg-highlight-pressed focus:outline-none rounded-lg"
|
||||||
|
>
|
||||||
|
{option.label}
|
||||||
|
</button>
|
||||||
|
))}
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
|
||||||
|
{isOpen && (
|
||||||
|
<div
|
||||||
|
className="fixed inset-0 z-40"
|
||||||
|
onClick={() => setIsOpen(false)}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* @generated SignedSource<<ea3e7fd6a3b7dd5f78622e9f21cdb1d3>>
|
* @generated SignedSource<<28b582a607c240a6304ea42cb2451776>>
|
||||||
* @lightSyntaxTransform
|
* @lightSyntaxTransform
|
||||||
* @nogrep
|
* @nogrep
|
||||||
*/
|
*/
|
||||||
@@ -9,12 +9,16 @@
|
|||||||
// @ts-nocheck
|
// @ts-nocheck
|
||||||
|
|
||||||
import { ReaderFragment } from 'relay-runtime';
|
import { ReaderFragment } from 'relay-runtime';
|
||||||
|
export type CountryCode = "AD" | "AE" | "AF" | "AG" | "AI" | "AL" | "AM" | "AO" | "AQ" | "AR" | "AS" | "AT" | "AU" | "AW" | "AX" | "AZ" | "BA" | "BB" | "BD" | "BE" | "BF" | "BG" | "BH" | "BI" | "BJ" | "BL" | "BM" | "BN" | "BO" | "BQ" | "BR" | "BS" | "BT" | "BV" | "BW" | "BY" | "BZ" | "CA" | "CC" | "CD" | "CF" | "CG" | "CH" | "CI" | "CK" | "CL" | "CM" | "CN" | "CO" | "CR" | "CU" | "CV" | "CW" | "CX" | "CY" | "CZ" | "DE" | "DJ" | "DK" | "DM" | "DO" | "DZ" | "EC" | "EE" | "EG" | "EH" | "ER" | "ES" | "ET" | "FI" | "FJ" | "FK" | "FM" | "FO" | "FR" | "GA" | "GB" | "GD" | "GE" | "GF" | "GG" | "GH" | "GI" | "GL" | "GM" | "GN" | "GP" | "GQ" | "GR" | "GT" | "GU" | "GW" | "GY" | "HK" | "HM" | "HN" | "HR" | "HT" | "HU" | "ID" | "IE" | "IL" | "IM" | "IN" | "IO" | "IQ" | "IR" | "IS" | "IT" | "JE" | "JM" | "JO" | "JP" | "KE" | "KG" | "KH" | "KI" | "KM" | "KN" | "KP" | "KR" | "KW" | "KY" | "KZ" | "LA" | "LB" | "LC" | "LI" | "LK" | "LR" | "LS" | "LT" | "LU" | "LV" | "LY" | "MA" | "MC" | "MD" | "ME" | "MF" | "MG" | "MH" | "MK" | "ML" | "MM" | "MN" | "MO" | "MP" | "MQ" | "MR" | "MS" | "MT" | "MU" | "MV" | "MW" | "MX" | "MY" | "MZ" | "NA" | "NC" | "NE" | "NF" | "NG" | "NI" | "NL" | "NO" | "NP" | "NR" | "NU" | "NZ" | "OM" | "PA" | "PE" | "PF" | "PG" | "PH" | "PK" | "PL" | "PM" | "PN" | "PR" | "PS" | "PT" | "PW" | "PY" | "QA" | "RE" | "RO" | "RS" | "RU" | "RW" | "SA" | "SB" | "SC" | "SD" | "SE" | "SG" | "SH" | "SI" | "SJ" | "SK" | "SL" | "SM" | "SN" | "SO" | "SR" | "SS" | "ST" | "SV" | "SX" | "SY" | "SZ" | "TC" | "TD" | "TF" | "TG" | "TH" | "TJ" | "TK" | "TL" | "TM" | "TN" | "TO" | "TR" | "TT" | "TV" | "TW" | "TZ" | "UA" | "UG" | "UM" | "US" | "UY" | "UZ" | "VA" | "VC" | "VE" | "VG" | "VI" | "VN" | "VU" | "WF" | "WS" | "YE" | "YT" | "ZA" | "ZM" | "ZW";
|
||||||
|
export type VendorCategory = "ANALYTICS" | "CLOUD_MONITORING" | "CLOUD_PROVIDER" | "COLLABORATION" | "CUSTOMER_SUPPORT" | "DATA_STORAGE_AND_PROCESSING" | "DOCUMENT_MANAGEMENT" | "EMPLOYEE_MANAGEMENT" | "ENGINEERING" | "FINANCE" | "IDENTITY_PROVIDER" | "IT" | "MARKETING" | "OFFICE_OPERATIONS" | "OTHER" | "PASSWORD_MANAGEMENT" | "PRODUCT_AND_DESIGN" | "PROFESSIONAL_SERVICES" | "RECRUITING" | "SALES" | "SECURITY" | "VERSION_CONTROL";
|
||||||
import { FragmentRefs } from "relay-runtime";
|
import { FragmentRefs } from "relay-runtime";
|
||||||
export type useVendorFormFragment$data = {
|
export type useVendorFormFragment$data = {
|
||||||
readonly businessOwner: {
|
readonly businessOwner: {
|
||||||
readonly id: string;
|
readonly id: string;
|
||||||
} | null | undefined;
|
} | null | undefined;
|
||||||
|
readonly category: VendorCategory;
|
||||||
readonly certifications: ReadonlyArray<string>;
|
readonly certifications: ReadonlyArray<string>;
|
||||||
|
readonly countries: ReadonlyArray<CountryCode>;
|
||||||
readonly dataProcessingAgreementUrl: string | null | undefined;
|
readonly dataProcessingAgreementUrl: string | null | undefined;
|
||||||
readonly description: string | null | undefined;
|
readonly description: string | null | undefined;
|
||||||
readonly headquarterAddress: string | null | undefined;
|
readonly headquarterAddress: string | null | undefined;
|
||||||
@@ -70,6 +74,13 @@ return {
|
|||||||
"name": "description",
|
"name": "description",
|
||||||
"storageKey": null
|
"storageKey": null
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"alias": null,
|
||||||
|
"args": null,
|
||||||
|
"kind": "ScalarField",
|
||||||
|
"name": "category",
|
||||||
|
"storageKey": null
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"alias": null,
|
"alias": null,
|
||||||
"args": null,
|
"args": null,
|
||||||
@@ -133,6 +144,13 @@ return {
|
|||||||
"name": "certifications",
|
"name": "certifications",
|
||||||
"storageKey": null
|
"storageKey": null
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"alias": null,
|
||||||
|
"args": null,
|
||||||
|
"kind": "ScalarField",
|
||||||
|
"name": "countries",
|
||||||
|
"storageKey": null
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"alias": null,
|
"alias": null,
|
||||||
"args": null,
|
"args": null,
|
||||||
@@ -173,6 +191,6 @@ return {
|
|||||||
};
|
};
|
||||||
})();
|
})();
|
||||||
|
|
||||||
(node as any).hash = "87f1029f8c634a5f7efdb6d7abe17709";
|
(node as any).hash = "89148658660d29dbe0ab6761300c6771";
|
||||||
|
|
||||||
export default node;
|
export default node;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* @generated SignedSource<<faa26838a242a98d5df14f51ff257950>>
|
* @generated SignedSource<<3f3a2de3bcfe5c2e7abbea0ba0fb4848>>
|
||||||
* @lightSyntaxTransform
|
* @lightSyntaxTransform
|
||||||
* @nogrep
|
* @nogrep
|
||||||
*/
|
*/
|
||||||
@@ -10,12 +10,14 @@
|
|||||||
|
|
||||||
import { ConcreteRequest } from 'relay-runtime';
|
import { ConcreteRequest } from 'relay-runtime';
|
||||||
import { FragmentRefs } from "relay-runtime";
|
import { FragmentRefs } from "relay-runtime";
|
||||||
|
export type CountryCode = "AD" | "AE" | "AF" | "AG" | "AI" | "AL" | "AM" | "AO" | "AQ" | "AR" | "AS" | "AT" | "AU" | "AW" | "AX" | "AZ" | "BA" | "BB" | "BD" | "BE" | "BF" | "BG" | "BH" | "BI" | "BJ" | "BL" | "BM" | "BN" | "BO" | "BQ" | "BR" | "BS" | "BT" | "BV" | "BW" | "BY" | "BZ" | "CA" | "CC" | "CD" | "CF" | "CG" | "CH" | "CI" | "CK" | "CL" | "CM" | "CN" | "CO" | "CR" | "CU" | "CV" | "CW" | "CX" | "CY" | "CZ" | "DE" | "DJ" | "DK" | "DM" | "DO" | "DZ" | "EC" | "EE" | "EG" | "EH" | "ER" | "ES" | "ET" | "FI" | "FJ" | "FK" | "FM" | "FO" | "FR" | "GA" | "GB" | "GD" | "GE" | "GF" | "GG" | "GH" | "GI" | "GL" | "GM" | "GN" | "GP" | "GQ" | "GR" | "GT" | "GU" | "GW" | "GY" | "HK" | "HM" | "HN" | "HR" | "HT" | "HU" | "ID" | "IE" | "IL" | "IM" | "IN" | "IO" | "IQ" | "IR" | "IS" | "IT" | "JE" | "JM" | "JO" | "JP" | "KE" | "KG" | "KH" | "KI" | "KM" | "KN" | "KP" | "KR" | "KW" | "KY" | "KZ" | "LA" | "LB" | "LC" | "LI" | "LK" | "LR" | "LS" | "LT" | "LU" | "LV" | "LY" | "MA" | "MC" | "MD" | "ME" | "MF" | "MG" | "MH" | "MK" | "ML" | "MM" | "MN" | "MO" | "MP" | "MQ" | "MR" | "MS" | "MT" | "MU" | "MV" | "MW" | "MX" | "MY" | "MZ" | "NA" | "NC" | "NE" | "NF" | "NG" | "NI" | "NL" | "NO" | "NP" | "NR" | "NU" | "NZ" | "OM" | "PA" | "PE" | "PF" | "PG" | "PH" | "PK" | "PL" | "PM" | "PN" | "PR" | "PS" | "PT" | "PW" | "PY" | "QA" | "RE" | "RO" | "RS" | "RU" | "RW" | "SA" | "SB" | "SC" | "SD" | "SE" | "SG" | "SH" | "SI" | "SJ" | "SK" | "SL" | "SM" | "SN" | "SO" | "SR" | "SS" | "ST" | "SV" | "SX" | "SY" | "SZ" | "TC" | "TD" | "TF" | "TG" | "TH" | "TJ" | "TK" | "TL" | "TM" | "TN" | "TO" | "TR" | "TT" | "TV" | "TW" | "TZ" | "UA" | "UG" | "UM" | "US" | "UY" | "UZ" | "VA" | "VC" | "VE" | "VG" | "VI" | "VN" | "VU" | "WF" | "WS" | "YE" | "YT" | "ZA" | "ZM" | "ZW";
|
||||||
export type VendorCategory = "ANALYTICS" | "CLOUD_MONITORING" | "CLOUD_PROVIDER" | "COLLABORATION" | "CUSTOMER_SUPPORT" | "DATA_STORAGE_AND_PROCESSING" | "DOCUMENT_MANAGEMENT" | "EMPLOYEE_MANAGEMENT" | "ENGINEERING" | "FINANCE" | "IDENTITY_PROVIDER" | "IT" | "MARKETING" | "OFFICE_OPERATIONS" | "OTHER" | "PASSWORD_MANAGEMENT" | "PRODUCT_AND_DESIGN" | "PROFESSIONAL_SERVICES" | "RECRUITING" | "SALES" | "SECURITY" | "VERSION_CONTROL";
|
export type VendorCategory = "ANALYTICS" | "CLOUD_MONITORING" | "CLOUD_PROVIDER" | "COLLABORATION" | "CUSTOMER_SUPPORT" | "DATA_STORAGE_AND_PROCESSING" | "DOCUMENT_MANAGEMENT" | "EMPLOYEE_MANAGEMENT" | "ENGINEERING" | "FINANCE" | "IDENTITY_PROVIDER" | "IT" | "MARKETING" | "OFFICE_OPERATIONS" | "OTHER" | "PASSWORD_MANAGEMENT" | "PRODUCT_AND_DESIGN" | "PROFESSIONAL_SERVICES" | "RECRUITING" | "SALES" | "SECURITY" | "VERSION_CONTROL";
|
||||||
export type UpdateVendorInput = {
|
export type UpdateVendorInput = {
|
||||||
businessAssociateAgreementUrl?: string | null | undefined;
|
businessAssociateAgreementUrl?: string | null | undefined;
|
||||||
businessOwnerId?: string | null | undefined;
|
businessOwnerId?: string | null | undefined;
|
||||||
category?: VendorCategory | null | undefined;
|
category?: VendorCategory | null | undefined;
|
||||||
certifications?: ReadonlyArray<string> | null | undefined;
|
certifications?: ReadonlyArray<string> | null | undefined;
|
||||||
|
countries?: ReadonlyArray<CountryCode> | null | undefined;
|
||||||
dataProcessingAgreementUrl?: string | null | undefined;
|
dataProcessingAgreementUrl?: string | null | undefined;
|
||||||
description?: string | null | undefined;
|
description?: string | null | undefined;
|
||||||
headquarterAddress?: string | null | undefined;
|
headquarterAddress?: string | null | undefined;
|
||||||
@@ -148,6 +150,13 @@ return {
|
|||||||
"name": "description",
|
"name": "description",
|
||||||
"storageKey": null
|
"storageKey": null
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"alias": null,
|
||||||
|
"args": null,
|
||||||
|
"kind": "ScalarField",
|
||||||
|
"name": "category",
|
||||||
|
"storageKey": null
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"alias": null,
|
"alias": null,
|
||||||
"args": null,
|
"args": null,
|
||||||
@@ -211,6 +220,13 @@ return {
|
|||||||
"name": "certifications",
|
"name": "certifications",
|
||||||
"storageKey": null
|
"storageKey": null
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"alias": null,
|
||||||
|
"args": null,
|
||||||
|
"kind": "ScalarField",
|
||||||
|
"name": "countries",
|
||||||
|
"storageKey": null
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"alias": null,
|
"alias": null,
|
||||||
"args": null,
|
"args": null,
|
||||||
@@ -254,12 +270,12 @@ return {
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"params": {
|
"params": {
|
||||||
"cacheID": "324b4589b4692806f555489703521bcd",
|
"cacheID": "35a5e6d13ef172a9a8640740a5606b46",
|
||||||
"id": null,
|
"id": null,
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"name": "useVendorFormMutation",
|
"name": "useVendorFormMutation",
|
||||||
"operationKind": "mutation",
|
"operationKind": "mutation",
|
||||||
"text": "mutation useVendorFormMutation(\n $input: UpdateVendorInput!\n) {\n updateVendor(input: $input) {\n vendor {\n ...useVendorFormFragment\n id\n }\n }\n}\n\nfragment useVendorFormFragment on Vendor {\n id\n name\n description\n statusPageUrl\n termsOfServiceUrl\n privacyPolicyUrl\n serviceLevelAgreementUrl\n dataProcessingAgreementUrl\n websiteUrl\n legalName\n headquarterAddress\n certifications\n securityPageUrl\n trustPageUrl\n businessOwner {\n id\n }\n securityOwner {\n id\n }\n}\n"
|
"text": "mutation useVendorFormMutation(\n $input: UpdateVendorInput!\n) {\n updateVendor(input: $input) {\n vendor {\n ...useVendorFormFragment\n id\n }\n }\n}\n\nfragment useVendorFormFragment on Vendor {\n id\n name\n description\n category\n statusPageUrl\n termsOfServiceUrl\n privacyPolicyUrl\n serviceLevelAgreementUrl\n dataProcessingAgreementUrl\n websiteUrl\n legalName\n headquarterAddress\n certifications\n countries\n securityPageUrl\n trustPageUrl\n businessOwner {\n id\n }\n securityOwner {\n id\n }\n}\n"
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
})();
|
})();
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ import { useEffect, useMemo } from "react";
|
|||||||
const schema = z.object({
|
const schema = z.object({
|
||||||
name: z.string(),
|
name: z.string(),
|
||||||
description: z.string(),
|
description: z.string(),
|
||||||
|
category: z.string().nullish(),
|
||||||
statusPageUrl: z.string(),
|
statusPageUrl: z.string(),
|
||||||
termsOfServiceUrl: z.string(),
|
termsOfServiceUrl: z.string(),
|
||||||
privacyPolicyUrl: z.string(),
|
privacyPolicyUrl: z.string(),
|
||||||
@@ -19,6 +20,7 @@ const schema = z.object({
|
|||||||
legalName: z.string(),
|
legalName: z.string(),
|
||||||
headquarterAddress: z.string(),
|
headquarterAddress: z.string(),
|
||||||
certifications: z.array(z.string()),
|
certifications: z.array(z.string()),
|
||||||
|
countries: z.array(z.string()),
|
||||||
securityPageUrl: z.string(),
|
securityPageUrl: z.string(),
|
||||||
trustPageUrl: z.string(),
|
trustPageUrl: z.string(),
|
||||||
businessOwnerId: z.string().nullish(),
|
businessOwnerId: z.string().nullish(),
|
||||||
@@ -30,6 +32,7 @@ const vendorFormFragment = graphql`
|
|||||||
id
|
id
|
||||||
name
|
name
|
||||||
description
|
description
|
||||||
|
category
|
||||||
statusPageUrl
|
statusPageUrl
|
||||||
termsOfServiceUrl
|
termsOfServiceUrl
|
||||||
privacyPolicyUrl
|
privacyPolicyUrl
|
||||||
@@ -39,6 +42,7 @@ const vendorFormFragment = graphql`
|
|||||||
legalName
|
legalName
|
||||||
headquarterAddress
|
headquarterAddress
|
||||||
certifications
|
certifications
|
||||||
|
countries
|
||||||
securityPageUrl
|
securityPageUrl
|
||||||
trustPageUrl
|
trustPageUrl
|
||||||
businessOwner {
|
businessOwner {
|
||||||
@@ -73,6 +77,7 @@ export function useVendorForm(vendorKey: useVendorFormFragment$key) {
|
|||||||
() => ({
|
() => ({
|
||||||
name: vendor.name,
|
name: vendor.name,
|
||||||
description: vendor.description ?? "",
|
description: vendor.description ?? "",
|
||||||
|
category: vendor.category ?? null,
|
||||||
statusPageUrl: vendor.statusPageUrl ?? "",
|
statusPageUrl: vendor.statusPageUrl ?? "",
|
||||||
termsOfServiceUrl: vendor.termsOfServiceUrl ?? "",
|
termsOfServiceUrl: vendor.termsOfServiceUrl ?? "",
|
||||||
privacyPolicyUrl: vendor.privacyPolicyUrl ?? "",
|
privacyPolicyUrl: vendor.privacyPolicyUrl ?? "",
|
||||||
@@ -82,6 +87,7 @@ export function useVendorForm(vendorKey: useVendorFormFragment$key) {
|
|||||||
legalName: vendor.legalName ?? "",
|
legalName: vendor.legalName ?? "",
|
||||||
headquarterAddress: vendor.headquarterAddress ?? "",
|
headquarterAddress: vendor.headquarterAddress ?? "",
|
||||||
certifications: [...(vendor.certifications ?? [])],
|
certifications: [...(vendor.certifications ?? [])],
|
||||||
|
countries: [...(vendor.countries ?? [])],
|
||||||
securityPageUrl: vendor.securityPageUrl ?? "",
|
securityPageUrl: vendor.securityPageUrl ?? "",
|
||||||
trustPageUrl: vendor.trustPageUrl ?? "",
|
trustPageUrl: vendor.trustPageUrl ?? "",
|
||||||
businessOwnerId: vendor.businessOwner?.id,
|
businessOwnerId: vendor.businessOwner?.id,
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* @generated SignedSource<<be30aebdf9a7304cd154284fa9f6b207>>
|
* @generated SignedSource<<309fa8f1d9e203536f9b7d00b3622456>>
|
||||||
* @lightSyntaxTransform
|
* @lightSyntaxTransform
|
||||||
* @nogrep
|
* @nogrep
|
||||||
*/
|
*/
|
||||||
@@ -10,12 +10,14 @@
|
|||||||
|
|
||||||
import { ConcreteRequest } from 'relay-runtime';
|
import { ConcreteRequest } from 'relay-runtime';
|
||||||
import { FragmentRefs } from "relay-runtime";
|
import { FragmentRefs } from "relay-runtime";
|
||||||
|
export type CountryCode = "AD" | "AE" | "AF" | "AG" | "AI" | "AL" | "AM" | "AO" | "AQ" | "AR" | "AS" | "AT" | "AU" | "AW" | "AX" | "AZ" | "BA" | "BB" | "BD" | "BE" | "BF" | "BG" | "BH" | "BI" | "BJ" | "BL" | "BM" | "BN" | "BO" | "BQ" | "BR" | "BS" | "BT" | "BV" | "BW" | "BY" | "BZ" | "CA" | "CC" | "CD" | "CF" | "CG" | "CH" | "CI" | "CK" | "CL" | "CM" | "CN" | "CO" | "CR" | "CU" | "CV" | "CW" | "CX" | "CY" | "CZ" | "DE" | "DJ" | "DK" | "DM" | "DO" | "DZ" | "EC" | "EE" | "EG" | "EH" | "ER" | "ES" | "ET" | "FI" | "FJ" | "FK" | "FM" | "FO" | "FR" | "GA" | "GB" | "GD" | "GE" | "GF" | "GG" | "GH" | "GI" | "GL" | "GM" | "GN" | "GP" | "GQ" | "GR" | "GT" | "GU" | "GW" | "GY" | "HK" | "HM" | "HN" | "HR" | "HT" | "HU" | "ID" | "IE" | "IL" | "IM" | "IN" | "IO" | "IQ" | "IR" | "IS" | "IT" | "JE" | "JM" | "JO" | "JP" | "KE" | "KG" | "KH" | "KI" | "KM" | "KN" | "KP" | "KR" | "KW" | "KY" | "KZ" | "LA" | "LB" | "LC" | "LI" | "LK" | "LR" | "LS" | "LT" | "LU" | "LV" | "LY" | "MA" | "MC" | "MD" | "ME" | "MF" | "MG" | "MH" | "MK" | "ML" | "MM" | "MN" | "MO" | "MP" | "MQ" | "MR" | "MS" | "MT" | "MU" | "MV" | "MW" | "MX" | "MY" | "MZ" | "NA" | "NC" | "NE" | "NF" | "NG" | "NI" | "NL" | "NO" | "NP" | "NR" | "NU" | "NZ" | "OM" | "PA" | "PE" | "PF" | "PG" | "PH" | "PK" | "PL" | "PM" | "PN" | "PR" | "PS" | "PT" | "PW" | "PY" | "QA" | "RE" | "RO" | "RS" | "RU" | "RW" | "SA" | "SB" | "SC" | "SD" | "SE" | "SG" | "SH" | "SI" | "SJ" | "SK" | "SL" | "SM" | "SN" | "SO" | "SR" | "SS" | "ST" | "SV" | "SX" | "SY" | "SZ" | "TC" | "TD" | "TF" | "TG" | "TH" | "TJ" | "TK" | "TL" | "TM" | "TN" | "TO" | "TR" | "TT" | "TV" | "TW" | "TZ" | "UA" | "UG" | "UM" | "US" | "UY" | "UZ" | "VA" | "VC" | "VE" | "VG" | "VI" | "VN" | "VU" | "WF" | "WS" | "YE" | "YT" | "ZA" | "ZM" | "ZW";
|
||||||
export type VendorCategory = "ANALYTICS" | "CLOUD_MONITORING" | "CLOUD_PROVIDER" | "COLLABORATION" | "CUSTOMER_SUPPORT" | "DATA_STORAGE_AND_PROCESSING" | "DOCUMENT_MANAGEMENT" | "EMPLOYEE_MANAGEMENT" | "ENGINEERING" | "FINANCE" | "IDENTITY_PROVIDER" | "IT" | "MARKETING" | "OFFICE_OPERATIONS" | "OTHER" | "PASSWORD_MANAGEMENT" | "PRODUCT_AND_DESIGN" | "PROFESSIONAL_SERVICES" | "RECRUITING" | "SALES" | "SECURITY" | "VERSION_CONTROL";
|
export type VendorCategory = "ANALYTICS" | "CLOUD_MONITORING" | "CLOUD_PROVIDER" | "COLLABORATION" | "CUSTOMER_SUPPORT" | "DATA_STORAGE_AND_PROCESSING" | "DOCUMENT_MANAGEMENT" | "EMPLOYEE_MANAGEMENT" | "ENGINEERING" | "FINANCE" | "IDENTITY_PROVIDER" | "IT" | "MARKETING" | "OFFICE_OPERATIONS" | "OTHER" | "PASSWORD_MANAGEMENT" | "PRODUCT_AND_DESIGN" | "PROFESSIONAL_SERVICES" | "RECRUITING" | "SALES" | "SECURITY" | "VERSION_CONTROL";
|
||||||
export type UpdateVendorInput = {
|
export type UpdateVendorInput = {
|
||||||
businessAssociateAgreementUrl?: string | null | undefined;
|
businessAssociateAgreementUrl?: string | null | undefined;
|
||||||
businessOwnerId?: string | null | undefined;
|
businessOwnerId?: string | null | undefined;
|
||||||
category?: VendorCategory | null | undefined;
|
category?: VendorCategory | null | undefined;
|
||||||
certifications?: ReadonlyArray<string> | null | undefined;
|
certifications?: ReadonlyArray<string> | null | undefined;
|
||||||
|
countries?: ReadonlyArray<CountryCode> | null | undefined;
|
||||||
dataProcessingAgreementUrl?: string | null | undefined;
|
dataProcessingAgreementUrl?: string | null | undefined;
|
||||||
description?: string | null | undefined;
|
description?: string | null | undefined;
|
||||||
headquarterAddress?: string | null | undefined;
|
headquarterAddress?: string | null | undefined;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* @generated SignedSource<<8ef289e99926f279eb0e2d5ea955cb32>>
|
* @generated SignedSource<<58e32433a39672dcebad5b51c5d18bd4>>
|
||||||
* @lightSyntaxTransform
|
* @lightSyntaxTransform
|
||||||
* @nogrep
|
* @nogrep
|
||||||
*/
|
*/
|
||||||
@@ -9,12 +9,14 @@
|
|||||||
// @ts-nocheck
|
// @ts-nocheck
|
||||||
|
|
||||||
import { ConcreteRequest } from 'relay-runtime';
|
import { ConcreteRequest } from 'relay-runtime';
|
||||||
|
export type CountryCode = "AD" | "AE" | "AF" | "AG" | "AI" | "AL" | "AM" | "AO" | "AQ" | "AR" | "AS" | "AT" | "AU" | "AW" | "AX" | "AZ" | "BA" | "BB" | "BD" | "BE" | "BF" | "BG" | "BH" | "BI" | "BJ" | "BL" | "BM" | "BN" | "BO" | "BQ" | "BR" | "BS" | "BT" | "BV" | "BW" | "BY" | "BZ" | "CA" | "CC" | "CD" | "CF" | "CG" | "CH" | "CI" | "CK" | "CL" | "CM" | "CN" | "CO" | "CR" | "CU" | "CV" | "CW" | "CX" | "CY" | "CZ" | "DE" | "DJ" | "DK" | "DM" | "DO" | "DZ" | "EC" | "EE" | "EG" | "EH" | "ER" | "ES" | "ET" | "FI" | "FJ" | "FK" | "FM" | "FO" | "FR" | "GA" | "GB" | "GD" | "GE" | "GF" | "GG" | "GH" | "GI" | "GL" | "GM" | "GN" | "GP" | "GQ" | "GR" | "GT" | "GU" | "GW" | "GY" | "HK" | "HM" | "HN" | "HR" | "HT" | "HU" | "ID" | "IE" | "IL" | "IM" | "IN" | "IO" | "IQ" | "IR" | "IS" | "IT" | "JE" | "JM" | "JO" | "JP" | "KE" | "KG" | "KH" | "KI" | "KM" | "KN" | "KP" | "KR" | "KW" | "KY" | "KZ" | "LA" | "LB" | "LC" | "LI" | "LK" | "LR" | "LS" | "LT" | "LU" | "LV" | "LY" | "MA" | "MC" | "MD" | "ME" | "MF" | "MG" | "MH" | "MK" | "ML" | "MM" | "MN" | "MO" | "MP" | "MQ" | "MR" | "MS" | "MT" | "MU" | "MV" | "MW" | "MX" | "MY" | "MZ" | "NA" | "NC" | "NE" | "NF" | "NG" | "NI" | "NL" | "NO" | "NP" | "NR" | "NU" | "NZ" | "OM" | "PA" | "PE" | "PF" | "PG" | "PH" | "PK" | "PL" | "PM" | "PN" | "PR" | "PS" | "PT" | "PW" | "PY" | "QA" | "RE" | "RO" | "RS" | "RU" | "RW" | "SA" | "SB" | "SC" | "SD" | "SE" | "SG" | "SH" | "SI" | "SJ" | "SK" | "SL" | "SM" | "SN" | "SO" | "SR" | "SS" | "ST" | "SV" | "SX" | "SY" | "SZ" | "TC" | "TD" | "TF" | "TG" | "TH" | "TJ" | "TK" | "TL" | "TM" | "TN" | "TO" | "TR" | "TT" | "TV" | "TW" | "TZ" | "UA" | "UG" | "UM" | "US" | "UY" | "UZ" | "VA" | "VC" | "VE" | "VG" | "VI" | "VN" | "VU" | "WF" | "WS" | "YE" | "YT" | "ZA" | "ZM" | "ZW";
|
||||||
export type VendorCategory = "ANALYTICS" | "CLOUD_MONITORING" | "CLOUD_PROVIDER" | "COLLABORATION" | "CUSTOMER_SUPPORT" | "DATA_STORAGE_AND_PROCESSING" | "DOCUMENT_MANAGEMENT" | "EMPLOYEE_MANAGEMENT" | "ENGINEERING" | "FINANCE" | "IDENTITY_PROVIDER" | "IT" | "MARKETING" | "OFFICE_OPERATIONS" | "OTHER" | "PASSWORD_MANAGEMENT" | "PRODUCT_AND_DESIGN" | "PROFESSIONAL_SERVICES" | "RECRUITING" | "SALES" | "SECURITY" | "VERSION_CONTROL";
|
export type VendorCategory = "ANALYTICS" | "CLOUD_MONITORING" | "CLOUD_PROVIDER" | "COLLABORATION" | "CUSTOMER_SUPPORT" | "DATA_STORAGE_AND_PROCESSING" | "DOCUMENT_MANAGEMENT" | "EMPLOYEE_MANAGEMENT" | "ENGINEERING" | "FINANCE" | "IDENTITY_PROVIDER" | "IT" | "MARKETING" | "OFFICE_OPERATIONS" | "OTHER" | "PASSWORD_MANAGEMENT" | "PRODUCT_AND_DESIGN" | "PROFESSIONAL_SERVICES" | "RECRUITING" | "SALES" | "SECURITY" | "VERSION_CONTROL";
|
||||||
export type CreateVendorInput = {
|
export type CreateVendorInput = {
|
||||||
businessAssociateAgreementUrl?: string | null | undefined;
|
businessAssociateAgreementUrl?: string | null | undefined;
|
||||||
businessOwnerId?: string | null | undefined;
|
businessOwnerId?: string | null | undefined;
|
||||||
category?: VendorCategory | null | undefined;
|
category?: VendorCategory | null | undefined;
|
||||||
certifications?: ReadonlyArray<string> | null | undefined;
|
certifications?: ReadonlyArray<string> | null | undefined;
|
||||||
|
countries?: ReadonlyArray<CountryCode> | null | undefined;
|
||||||
dataProcessingAgreementUrl?: string | null | undefined;
|
dataProcessingAgreementUrl?: string | null | undefined;
|
||||||
description?: string | null | undefined;
|
description?: string | null | undefined;
|
||||||
headquarterAddress?: string | null | undefined;
|
headquarterAddress?: string | null | undefined;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* @generated SignedSource<<c3a7e9de9c7f072bbca3ad552e5860cd>>
|
* @generated SignedSource<<15c7796ac43c03708488ba03ef9d76a6>>
|
||||||
* @lightSyntaxTransform
|
* @lightSyntaxTransform
|
||||||
* @nogrep
|
* @nogrep
|
||||||
*/
|
*/
|
||||||
@@ -361,6 +361,13 @@ return {
|
|||||||
(v5/*: any*/),
|
(v5/*: any*/),
|
||||||
(v6/*: any*/),
|
(v6/*: any*/),
|
||||||
(v10/*: any*/),
|
(v10/*: any*/),
|
||||||
|
{
|
||||||
|
"alias": null,
|
||||||
|
"args": null,
|
||||||
|
"kind": "ScalarField",
|
||||||
|
"name": "category",
|
||||||
|
"storageKey": null
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"alias": null,
|
"alias": null,
|
||||||
"args": null,
|
"args": null,
|
||||||
@@ -417,6 +424,13 @@ return {
|
|||||||
"name": "certifications",
|
"name": "certifications",
|
||||||
"storageKey": null
|
"storageKey": null
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"alias": null,
|
||||||
|
"args": null,
|
||||||
|
"kind": "ScalarField",
|
||||||
|
"name": "countries",
|
||||||
|
"storageKey": null
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"alias": null,
|
"alias": null,
|
||||||
"args": null,
|
"args": null,
|
||||||
@@ -807,12 +821,12 @@ return {
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"params": {
|
"params": {
|
||||||
"cacheID": "f0b506b57e84959deb0b1e3fa0481897",
|
"cacheID": "90924936acacd1851e8e81b1d94d6655",
|
||||||
"id": null,
|
"id": null,
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"name": "VendorGraphNodeQuery",
|
"name": "VendorGraphNodeQuery",
|
||||||
"operationKind": "query",
|
"operationKind": "query",
|
||||||
"text": "query VendorGraphNodeQuery(\n $vendorId: ID!\n $organizationId: ID!\n) {\n node(id: $vendorId) {\n __typename\n ... on Vendor {\n id\n snapshotId\n name\n websiteUrl\n ...useVendorFormFragment\n ...VendorComplianceTabFragment\n ...VendorContactsTabFragment\n ...VendorServicesTabFragment\n ...VendorRiskAssessmentTabFragment\n ...VendorOverviewTabBusinessAssociateAgreementFragment\n ...VendorOverviewTabDataPrivacyAgreementFragment\n }\n id\n }\n viewer {\n user {\n people(organizationId: $organizationId) {\n id\n }\n id\n }\n id\n }\n}\n\nfragment VendorComplianceTabFragment on Vendor {\n complianceReports(first: 50) {\n edges {\n node {\n id\n ...VendorComplianceTabFragment_report\n __typename\n }\n cursor\n }\n pageInfo {\n endCursor\n hasNextPage\n hasPreviousPage\n startCursor\n }\n }\n id\n}\n\nfragment VendorComplianceTabFragment_report on VendorComplianceReport {\n id\n reportDate\n validUntil\n reportName\n fileUrl\n fileSize\n}\n\nfragment VendorContactsTabFragment on Vendor {\n contacts(first: 50) {\n edges {\n node {\n id\n ...VendorContactsTabFragment_contact\n __typename\n }\n cursor\n }\n pageInfo {\n endCursor\n hasNextPage\n hasPreviousPage\n startCursor\n }\n }\n id\n}\n\nfragment VendorContactsTabFragment_contact on VendorContact {\n id\n fullName\n email\n phone\n role\n createdAt\n updatedAt\n}\n\nfragment VendorOverviewTabBusinessAssociateAgreementFragment on Vendor {\n businessAssociateAgreement {\n id\n fileName\n fileUrl\n validFrom\n validUntil\n createdAt\n }\n}\n\nfragment VendorOverviewTabDataPrivacyAgreementFragment on Vendor {\n dataPrivacyAgreement {\n id\n fileName\n fileUrl\n validFrom\n validUntil\n createdAt\n }\n}\n\nfragment VendorRiskAssessmentTabFragment on Vendor {\n id\n riskAssessments(first: 50) {\n edges {\n node {\n id\n ...VendorRiskAssessmentTabFragment_assessment\n __typename\n }\n cursor\n }\n pageInfo {\n hasNextPage\n endCursor\n hasPreviousPage\n startCursor\n }\n }\n}\n\nfragment VendorRiskAssessmentTabFragment_assessment on VendorRiskAssessment {\n id\n assessedAt\n assessedBy {\n id\n fullName\n }\n expiresAt\n dataSensitivity\n businessImpact\n notes\n}\n\nfragment VendorServicesTabFragment on Vendor {\n services(first: 50) {\n edges {\n node {\n id\n ...VendorServicesTabFragment_service\n __typename\n }\n cursor\n }\n pageInfo {\n endCursor\n hasNextPage\n hasPreviousPage\n startCursor\n }\n }\n id\n}\n\nfragment VendorServicesTabFragment_service on VendorService {\n id\n name\n description\n createdAt\n updatedAt\n}\n\nfragment useVendorFormFragment on Vendor {\n id\n name\n description\n statusPageUrl\n termsOfServiceUrl\n privacyPolicyUrl\n serviceLevelAgreementUrl\n dataProcessingAgreementUrl\n websiteUrl\n legalName\n headquarterAddress\n certifications\n securityPageUrl\n trustPageUrl\n businessOwner {\n id\n }\n securityOwner {\n id\n }\n}\n"
|
"text": "query VendorGraphNodeQuery(\n $vendorId: ID!\n $organizationId: ID!\n) {\n node(id: $vendorId) {\n __typename\n ... on Vendor {\n id\n snapshotId\n name\n websiteUrl\n ...useVendorFormFragment\n ...VendorComplianceTabFragment\n ...VendorContactsTabFragment\n ...VendorServicesTabFragment\n ...VendorRiskAssessmentTabFragment\n ...VendorOverviewTabBusinessAssociateAgreementFragment\n ...VendorOverviewTabDataPrivacyAgreementFragment\n }\n id\n }\n viewer {\n user {\n people(organizationId: $organizationId) {\n id\n }\n id\n }\n id\n }\n}\n\nfragment VendorComplianceTabFragment on Vendor {\n complianceReports(first: 50) {\n edges {\n node {\n id\n ...VendorComplianceTabFragment_report\n __typename\n }\n cursor\n }\n pageInfo {\n endCursor\n hasNextPage\n hasPreviousPage\n startCursor\n }\n }\n id\n}\n\nfragment VendorComplianceTabFragment_report on VendorComplianceReport {\n id\n reportDate\n validUntil\n reportName\n fileUrl\n fileSize\n}\n\nfragment VendorContactsTabFragment on Vendor {\n contacts(first: 50) {\n edges {\n node {\n id\n ...VendorContactsTabFragment_contact\n __typename\n }\n cursor\n }\n pageInfo {\n endCursor\n hasNextPage\n hasPreviousPage\n startCursor\n }\n }\n id\n}\n\nfragment VendorContactsTabFragment_contact on VendorContact {\n id\n fullName\n email\n phone\n role\n createdAt\n updatedAt\n}\n\nfragment VendorOverviewTabBusinessAssociateAgreementFragment on Vendor {\n businessAssociateAgreement {\n id\n fileName\n fileUrl\n validFrom\n validUntil\n createdAt\n }\n}\n\nfragment VendorOverviewTabDataPrivacyAgreementFragment on Vendor {\n dataPrivacyAgreement {\n id\n fileName\n fileUrl\n validFrom\n validUntil\n createdAt\n }\n}\n\nfragment VendorRiskAssessmentTabFragment on Vendor {\n id\n riskAssessments(first: 50) {\n edges {\n node {\n id\n ...VendorRiskAssessmentTabFragment_assessment\n __typename\n }\n cursor\n }\n pageInfo {\n hasNextPage\n endCursor\n hasPreviousPage\n startCursor\n }\n }\n}\n\nfragment VendorRiskAssessmentTabFragment_assessment on VendorRiskAssessment {\n id\n assessedAt\n assessedBy {\n id\n fullName\n }\n expiresAt\n dataSensitivity\n businessImpact\n notes\n}\n\nfragment VendorServicesTabFragment on Vendor {\n services(first: 50) {\n edges {\n node {\n id\n ...VendorServicesTabFragment_service\n __typename\n }\n cursor\n }\n pageInfo {\n endCursor\n hasNextPage\n hasPreviousPage\n startCursor\n }\n }\n id\n}\n\nfragment VendorServicesTabFragment_service on VendorService {\n id\n name\n description\n createdAt\n updatedAt\n}\n\nfragment useVendorFormFragment on Vendor {\n id\n name\n description\n category\n statusPageUrl\n termsOfServiceUrl\n privacyPolicyUrl\n serviceLevelAgreementUrl\n dataProcessingAgreementUrl\n websiteUrl\n legalName\n headquarterAddress\n certifications\n countries\n securityPageUrl\n trustPageUrl\n businessOwner {\n id\n }\n securityOwner {\n id\n }\n}\n"
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
})();
|
})();
|
||||||
|
|||||||
@@ -51,6 +51,7 @@ export function CreateVendorDialog({
|
|||||||
serviceLevelAgreementUrl: vendor.serviceLevelAgreementUrl,
|
serviceLevelAgreementUrl: vendor.serviceLevelAgreementUrl,
|
||||||
dataProcessingAgreementUrl: vendor.dataProcessingAgreementUrl,
|
dataProcessingAgreementUrl: vendor.dataProcessingAgreementUrl,
|
||||||
certifications: vendor.certifications,
|
certifications: vendor.certifications,
|
||||||
|
countries: vendor.countries,
|
||||||
securityPageUrl: vendor.securityPageUrl,
|
securityPageUrl: vendor.securityPageUrl,
|
||||||
trustPageUrl: vendor.trustPageUrl,
|
trustPageUrl: vendor.trustPageUrl,
|
||||||
statusPageUrl: vendor.statusPageUrl,
|
statusPageUrl: vendor.statusPageUrl,
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* @generated SignedSource<<a0f6e47aa4001c2a99c02b7eabe5c99a>>
|
* @generated SignedSource<<6db92ed13cdca3a852d1b7b9c113840e>>
|
||||||
* @lightSyntaxTransform
|
* @lightSyntaxTransform
|
||||||
* @nogrep
|
* @nogrep
|
||||||
*/
|
*/
|
||||||
@@ -218,6 +218,13 @@ return {
|
|||||||
"name": "description",
|
"name": "description",
|
||||||
"storageKey": null
|
"storageKey": null
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"alias": null,
|
||||||
|
"args": null,
|
||||||
|
"kind": "ScalarField",
|
||||||
|
"name": "category",
|
||||||
|
"storageKey": null
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"alias": null,
|
"alias": null,
|
||||||
"args": null,
|
"args": null,
|
||||||
@@ -274,6 +281,13 @@ return {
|
|||||||
"name": "certifications",
|
"name": "certifications",
|
||||||
"storageKey": null
|
"storageKey": null
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"alias": null,
|
||||||
|
"args": null,
|
||||||
|
"kind": "ScalarField",
|
||||||
|
"name": "countries",
|
||||||
|
"storageKey": null
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"alias": null,
|
"alias": null,
|
||||||
"args": null,
|
"args": null,
|
||||||
@@ -528,12 +542,12 @@ return {
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"params": {
|
"params": {
|
||||||
"cacheID": "dbe0c3ef0f5d4d36436224603629d30a",
|
"cacheID": "025f271f1dca46c6f052f0d59a4315cc",
|
||||||
"id": null,
|
"id": null,
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"name": "ImportAssessmentDialogMutation",
|
"name": "ImportAssessmentDialogMutation",
|
||||||
"operationKind": "mutation",
|
"operationKind": "mutation",
|
||||||
"text": "mutation ImportAssessmentDialogMutation(\n $input: AssessVendorInput!\n) {\n assessVendor(input: $input) {\n vendor {\n id\n name\n websiteUrl\n ...useVendorFormFragment\n ...VendorComplianceTabFragment\n ...VendorRiskAssessmentTabFragment\n }\n }\n}\n\nfragment VendorComplianceTabFragment on Vendor {\n complianceReports(first: 50) {\n edges {\n node {\n id\n ...VendorComplianceTabFragment_report\n __typename\n }\n cursor\n }\n pageInfo {\n endCursor\n hasNextPage\n hasPreviousPage\n startCursor\n }\n }\n id\n}\n\nfragment VendorComplianceTabFragment_report on VendorComplianceReport {\n id\n reportDate\n validUntil\n reportName\n fileUrl\n fileSize\n}\n\nfragment VendorRiskAssessmentTabFragment on Vendor {\n id\n riskAssessments(first: 50) {\n edges {\n node {\n id\n ...VendorRiskAssessmentTabFragment_assessment\n __typename\n }\n cursor\n }\n pageInfo {\n hasNextPage\n endCursor\n hasPreviousPage\n startCursor\n }\n }\n}\n\nfragment VendorRiskAssessmentTabFragment_assessment on VendorRiskAssessment {\n id\n assessedAt\n assessedBy {\n id\n fullName\n }\n expiresAt\n dataSensitivity\n businessImpact\n notes\n}\n\nfragment useVendorFormFragment on Vendor {\n id\n name\n description\n statusPageUrl\n termsOfServiceUrl\n privacyPolicyUrl\n serviceLevelAgreementUrl\n dataProcessingAgreementUrl\n websiteUrl\n legalName\n headquarterAddress\n certifications\n securityPageUrl\n trustPageUrl\n businessOwner {\n id\n }\n securityOwner {\n id\n }\n}\n"
|
"text": "mutation ImportAssessmentDialogMutation(\n $input: AssessVendorInput!\n) {\n assessVendor(input: $input) {\n vendor {\n id\n name\n websiteUrl\n ...useVendorFormFragment\n ...VendorComplianceTabFragment\n ...VendorRiskAssessmentTabFragment\n }\n }\n}\n\nfragment VendorComplianceTabFragment on Vendor {\n complianceReports(first: 50) {\n edges {\n node {\n id\n ...VendorComplianceTabFragment_report\n __typename\n }\n cursor\n }\n pageInfo {\n endCursor\n hasNextPage\n hasPreviousPage\n startCursor\n }\n }\n id\n}\n\nfragment VendorComplianceTabFragment_report on VendorComplianceReport {\n id\n reportDate\n validUntil\n reportName\n fileUrl\n fileSize\n}\n\nfragment VendorRiskAssessmentTabFragment on Vendor {\n id\n riskAssessments(first: 50) {\n edges {\n node {\n id\n ...VendorRiskAssessmentTabFragment_assessment\n __typename\n }\n cursor\n }\n pageInfo {\n hasNextPage\n endCursor\n hasPreviousPage\n startCursor\n }\n }\n}\n\nfragment VendorRiskAssessmentTabFragment_assessment on VendorRiskAssessment {\n id\n assessedAt\n assessedBy {\n id\n fullName\n }\n expiresAt\n dataSensitivity\n businessImpact\n notes\n}\n\nfragment useVendorFormFragment on Vendor {\n id\n name\n description\n category\n statusPageUrl\n termsOfServiceUrl\n privacyPolicyUrl\n serviceLevelAgreementUrl\n dataProcessingAgreementUrl\n websiteUrl\n legalName\n headquarterAddress\n certifications\n countries\n securityPageUrl\n trustPageUrl\n businessOwner {\n id\n }\n securityOwner {\n id\n }\n}\n"
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
})();
|
})();
|
||||||
|
|||||||
@@ -1,8 +1,10 @@
|
|||||||
import { useTranslate } from "@probo/i18n";
|
import { useTranslate } from "@probo/i18n";
|
||||||
import { useVendorForm } from "/hooks/forms/useVendorForm";
|
import { useVendorForm } from "/hooks/forms/useVendorForm";
|
||||||
import { useOutletContext, useParams } from "react-router";
|
import { useOutletContext, useParams } from "react-router";
|
||||||
import { Button, Card, Field, Input, IconPlusLarge, IconTrashCan, IconPencil } from "@probo/ui";
|
import { Button, Card, Field, Input, IconPlusLarge, IconTrashCan, IconPencil, Option } from "@probo/ui";
|
||||||
import { PeopleSelectField } from "/components/form/PeopleSelectField";
|
import { PeopleSelectField } from "/components/form/PeopleSelectField";
|
||||||
|
import { ControlledField } from "/components/form/ControlledField";
|
||||||
|
import { CountriesField } from "/components/form/CountriesField";
|
||||||
import { useOrganizationId } from "/hooks/useOrganizationId";
|
import { useOrganizationId } from "/hooks/useOrganizationId";
|
||||||
import { useMemo } from "react";
|
import { useMemo } from "react";
|
||||||
import { usePageTitle } from "@probo/hooks";
|
import { usePageTitle } from "@probo/hooks";
|
||||||
@@ -17,6 +19,7 @@ import { EditDataPrivacyAgreementDialog } from "../dialogs/EditDataPrivacyAgreem
|
|||||||
import type { useVendorFormFragment$key } from "/hooks/forms/__generated__/useVendorFormFragment.graphql";
|
import type { useVendorFormFragment$key } from "/hooks/forms/__generated__/useVendorFormFragment.graphql";
|
||||||
import type { VendorOverviewTabBusinessAssociateAgreementFragment$key } from "./__generated__/VendorOverviewTabBusinessAssociateAgreementFragment.graphql";
|
import type { VendorOverviewTabBusinessAssociateAgreementFragment$key } from "./__generated__/VendorOverviewTabBusinessAssociateAgreementFragment.graphql";
|
||||||
import type { VendorOverviewTabDataPrivacyAgreementFragment$key } from "./__generated__/VendorOverviewTabDataPrivacyAgreementFragment.graphql";
|
import type { VendorOverviewTabDataPrivacyAgreementFragment$key } from "./__generated__/VendorOverviewTabDataPrivacyAgreementFragment.graphql";
|
||||||
|
import type { VendorCategory } from "@probo/vendors";
|
||||||
|
|
||||||
const vendorBusinessAssociateAgreementFragment = graphql`
|
const vendorBusinessAssociateAgreementFragment = graphql`
|
||||||
fragment VendorOverviewTabBusinessAssociateAgreementFragment on Vendor {
|
fragment VendorOverviewTabBusinessAssociateAgreementFragment on Vendor {
|
||||||
@@ -54,6 +57,31 @@ export default function VendorOverviewTab() {
|
|||||||
}>();
|
}>();
|
||||||
|
|
||||||
const { __ } = useTranslate();
|
const { __ } = useTranslate();
|
||||||
|
|
||||||
|
const vendorCategories: { value: VendorCategory; label: string }[] = [
|
||||||
|
{ value: "ANALYTICS", label: __("Analytics") },
|
||||||
|
{ value: "CLOUD_MONITORING", label: __("Cloud Monitoring") },
|
||||||
|
{ value: "CLOUD_PROVIDER", label: __("Cloud Provider") },
|
||||||
|
{ value: "COLLABORATION", label: __("Collaboration") },
|
||||||
|
{ value: "CUSTOMER_SUPPORT", label: __("Customer Support") },
|
||||||
|
{ value: "DATA_STORAGE_AND_PROCESSING", label: __("Data Storage and Processing") },
|
||||||
|
{ value: "DOCUMENT_MANAGEMENT", label: __("Document Management") },
|
||||||
|
{ value: "EMPLOYEE_MANAGEMENT", label: __("Employee Management") },
|
||||||
|
{ value: "ENGINEERING", label: __("Engineering") },
|
||||||
|
{ value: "FINANCE", label: __("Finance") },
|
||||||
|
{ value: "IDENTITY_PROVIDER", label: __("Identity Provider") },
|
||||||
|
{ value: "IT", label: __("IT") },
|
||||||
|
{ value: "MARKETING", label: __("Marketing") },
|
||||||
|
{ value: "OFFICE_OPERATIONS", label: __("Office Operations") },
|
||||||
|
{ value: "OTHER", label: __("Other") },
|
||||||
|
{ value: "PASSWORD_MANAGEMENT", label: __("Password Management") },
|
||||||
|
{ value: "PRODUCT_AND_DESIGN", label: __("Product and Design") },
|
||||||
|
{ value: "PROFESSIONAL_SERVICES", label: __("Professional Services") },
|
||||||
|
{ value: "RECRUITING", label: __("Recruiting") },
|
||||||
|
{ value: "SALES", label: __("Sales") },
|
||||||
|
{ value: "SECURITY", label: __("Security") },
|
||||||
|
{ value: "VERSION_CONTROL", label: __("Version Control") },
|
||||||
|
];
|
||||||
const organizationId = useOrganizationId();
|
const organizationId = useOrganizationId();
|
||||||
const { snapshotId } = useParams<{ snapshotId?: string }>();
|
const { snapshotId } = useParams<{ snapshotId?: string }>();
|
||||||
const isSnapshotMode = Boolean(snapshotId);
|
const isSnapshotMode = Boolean(snapshotId);
|
||||||
@@ -119,6 +147,21 @@ export default function VendorOverviewTab() {
|
|||||||
error={errors.description?.message}
|
error={errors.description?.message}
|
||||||
disabled={isSubmitting || isSnapshotMode}
|
disabled={isSubmitting || isSnapshotMode}
|
||||||
/>
|
/>
|
||||||
|
<ControlledField
|
||||||
|
control={control}
|
||||||
|
name="category"
|
||||||
|
type="select"
|
||||||
|
label={__("Category")}
|
||||||
|
placeholder={__("Select a category")}
|
||||||
|
error={errors.category?.message}
|
||||||
|
disabled={isSubmitting || isSnapshotMode}
|
||||||
|
>
|
||||||
|
{vendorCategories.map((category) => (
|
||||||
|
<Option key={category.value} value={category.value}>
|
||||||
|
{category.label}
|
||||||
|
</Option>
|
||||||
|
))}
|
||||||
|
</ControlledField>
|
||||||
<Field
|
<Field
|
||||||
{...register("legalName")}
|
{...register("legalName")}
|
||||||
label={__("Legal name")}
|
label={__("Legal name")}
|
||||||
@@ -143,6 +186,17 @@ export default function VendorOverviewTab() {
|
|||||||
</Card>
|
</Card>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div className="space-y-4">
|
||||||
|
<h2 className="text-base font-medium">{__("Countries")}</h2>
|
||||||
|
<Card padded>
|
||||||
|
<CountriesField
|
||||||
|
control={control}
|
||||||
|
name="countries"
|
||||||
|
disabled={isSubmitting || isSnapshotMode}
|
||||||
|
/>
|
||||||
|
</Card>
|
||||||
|
</div>
|
||||||
|
|
||||||
{/* Ownership */}
|
{/* Ownership */}
|
||||||
<div className="space-y-4">
|
<div className="space-y-4">
|
||||||
<h2 className="text-base font-medium">{__("Ownership details")}</h2>
|
<h2 className="text-base font-medium">{__("Ownership details")}</h2>
|
||||||
|
|||||||
299
packages/helpers/src/countries.ts
Normal file
299
packages/helpers/src/countries.ts
Normal file
@@ -0,0 +1,299 @@
|
|||||||
|
type Translator = (s: string) => string;
|
||||||
|
|
||||||
|
// ISO 3166-1 alpha-2 country codes
|
||||||
|
export const countries = [
|
||||||
|
"AD", "AE", "AF", "AG", "AI", "AL", "AM", "AO", "AQ", "AR",
|
||||||
|
"AS", "AT", "AU", "AW", "AX", "AZ", "BA", "BB", "BD", "BE",
|
||||||
|
"BF", "BG", "BH", "BI", "BJ", "BL", "BM", "BN", "BO", "BQ",
|
||||||
|
"BR", "BS", "BT", "BV", "BW", "BY", "BZ", "CA", "CC", "CD",
|
||||||
|
"CF", "CG", "CH", "CI", "CK", "CL", "CM", "CN", "CO", "CR",
|
||||||
|
"CU", "CV", "CW", "CX", "CY", "CZ", "DE", "DJ", "DK", "DM",
|
||||||
|
"DO", "DZ", "EC", "EE", "EG", "EH", "ER", "ES", "ET", "FI",
|
||||||
|
"FJ", "FK", "FM", "FO", "FR", "GA", "GB", "GD", "GE", "GF",
|
||||||
|
"GG", "GH", "GI", "GL", "GM", "GN", "GP", "GQ", "GR", "GT",
|
||||||
|
"GU", "GW", "GY", "HK", "HM", "HN", "HR", "HT", "HU", "ID",
|
||||||
|
"IE", "IL", "IM", "IN", "IO", "IQ", "IR", "IS", "IT", "JE",
|
||||||
|
"JM", "JO", "JP", "KE", "KG", "KH", "KI", "KM", "KN", "KP",
|
||||||
|
"KR", "KW", "KY", "KZ", "LA", "LB", "LC", "LI", "LK", "LR",
|
||||||
|
"LS", "LT", "LU", "LV", "LY", "MA", "MC", "MD", "ME", "MF",
|
||||||
|
"MG", "MH", "MK", "ML", "MM", "MN", "MO", "MP", "MQ", "MR",
|
||||||
|
"MS", "MT", "MU", "MV", "MW", "MX", "MY", "MZ", "NA", "NC",
|
||||||
|
"NE", "NF", "NG", "NI", "NL", "NO", "NP", "NR", "NU", "NZ",
|
||||||
|
"OM", "PA", "PE", "PF", "PG", "PH", "PK", "PL", "PM", "PN",
|
||||||
|
"PR", "PS", "PT", "PW", "PY", "QA", "RE", "RO", "RS", "RU",
|
||||||
|
"RW", "SA", "SB", "SC", "SD", "SE", "SG", "SH", "SI", "SJ",
|
||||||
|
"SK", "SL", "SM", "SN", "SO", "SR", "SS", "ST", "SV", "SX",
|
||||||
|
"SY", "SZ", "TC", "TD", "TF", "TG", "TH", "TJ", "TK", "TL",
|
||||||
|
"TM", "TN", "TO", "TR", "TT", "TV", "TW", "TZ", "UA", "UG",
|
||||||
|
"UM", "US", "UY", "UZ", "VA", "VC", "VE", "VG", "VI", "VN",
|
||||||
|
"VU", "WF", "WS", "YE", "YT", "ZA", "ZM", "ZW",
|
||||||
|
] as const;
|
||||||
|
|
||||||
|
export type CountryCode = typeof countries[number];
|
||||||
|
|
||||||
|
const countryNames: Record<CountryCode, (t: Translator) => string> = {
|
||||||
|
"AD": (__) => __("Andorra"),
|
||||||
|
"AE": (__) => __("United Arab Emirates"),
|
||||||
|
"AF": (__) => __("Afghanistan"),
|
||||||
|
"AG": (__) => __("Antigua and Barbuda"),
|
||||||
|
"AI": (__) => __("Anguilla"),
|
||||||
|
"AL": (__) => __("Albania"),
|
||||||
|
"AM": (__) => __("Armenia"),
|
||||||
|
"AO": (__) => __("Angola"),
|
||||||
|
"AQ": (__) => __("Antarctica"),
|
||||||
|
"AR": (__) => __("Argentina"),
|
||||||
|
"AS": (__) => __("American Samoa"),
|
||||||
|
"AT": (__) => __("Austria"),
|
||||||
|
"AU": (__) => __("Australia"),
|
||||||
|
"AW": (__) => __("Aruba"),
|
||||||
|
"AX": (__) => __("Åland Islands"),
|
||||||
|
"AZ": (__) => __("Azerbaijan"),
|
||||||
|
"BA": (__) => __("Bosnia and Herzegovina"),
|
||||||
|
"BB": (__) => __("Barbados"),
|
||||||
|
"BD": (__) => __("Bangladesh"),
|
||||||
|
"BE": (__) => __("Belgium"),
|
||||||
|
"BF": (__) => __("Burkina Faso"),
|
||||||
|
"BG": (__) => __("Bulgaria"),
|
||||||
|
"BH": (__) => __("Bahrain"),
|
||||||
|
"BI": (__) => __("Burundi"),
|
||||||
|
"BJ": (__) => __("Benin"),
|
||||||
|
"BL": (__) => __("Saint Barthélemy"),
|
||||||
|
"BM": (__) => __("Bermuda"),
|
||||||
|
"BN": (__) => __("Brunei"),
|
||||||
|
"BO": (__) => __("Bolivia"),
|
||||||
|
"BQ": (__) => __("Bonaire, Sint Eustatius and Saba"),
|
||||||
|
"BR": (__) => __("Brazil"),
|
||||||
|
"BS": (__) => __("Bahamas"),
|
||||||
|
"BT": (__) => __("Bhutan"),
|
||||||
|
"BV": (__) => __("Bouvet Island"),
|
||||||
|
"BW": (__) => __("Botswana"),
|
||||||
|
"BY": (__) => __("Belarus"),
|
||||||
|
"BZ": (__) => __("Belize"),
|
||||||
|
"CA": (__) => __("Canada"),
|
||||||
|
"CC": (__) => __("Cocos (Keeling) Islands"),
|
||||||
|
"CD": (__) => __("Congo (DRC)"),
|
||||||
|
"CF": (__) => __("Central African Republic"),
|
||||||
|
"CG": (__) => __("Congo (Republic)"),
|
||||||
|
"CH": (__) => __("Switzerland"),
|
||||||
|
"CI": (__) => __("Côte d'Ivoire"),
|
||||||
|
"CK": (__) => __("Cook Islands"),
|
||||||
|
"CL": (__) => __("Chile"),
|
||||||
|
"CM": (__) => __("Cameroon"),
|
||||||
|
"CN": (__) => __("China"),
|
||||||
|
"CO": (__) => __("Colombia"),
|
||||||
|
"CR": (__) => __("Costa Rica"),
|
||||||
|
"CU": (__) => __("Cuba"),
|
||||||
|
"CV": (__) => __("Cape Verde"),
|
||||||
|
"CW": (__) => __("Curaçao"),
|
||||||
|
"CX": (__) => __("Christmas Island"),
|
||||||
|
"CY": (__) => __("Cyprus"),
|
||||||
|
"CZ": (__) => __("Czechia"),
|
||||||
|
"DE": (__) => __("Germany"),
|
||||||
|
"DJ": (__) => __("Djibouti"),
|
||||||
|
"DK": (__) => __("Denmark"),
|
||||||
|
"DM": (__) => __("Dominica"),
|
||||||
|
"DO": (__) => __("Dominican Republic"),
|
||||||
|
"DZ": (__) => __("Algeria"),
|
||||||
|
"EC": (__) => __("Ecuador"),
|
||||||
|
"EE": (__) => __("Estonia"),
|
||||||
|
"EG": (__) => __("Egypt"),
|
||||||
|
"EH": (__) => __("Western Sahara"),
|
||||||
|
"ER": (__) => __("Eritrea"),
|
||||||
|
"ES": (__) => __("Spain"),
|
||||||
|
"ET": (__) => __("Ethiopia"),
|
||||||
|
"FI": (__) => __("Finland"),
|
||||||
|
"FJ": (__) => __("Fiji"),
|
||||||
|
"FK": (__) => __("Falkland Islands"),
|
||||||
|
"FM": (__) => __("Micronesia"),
|
||||||
|
"FO": (__) => __("Faroe Islands"),
|
||||||
|
"FR": (__) => __("France"),
|
||||||
|
"GA": (__) => __("Gabon"),
|
||||||
|
"GB": (__) => __("United Kingdom"),
|
||||||
|
"GD": (__) => __("Grenada"),
|
||||||
|
"GE": (__) => __("Georgia"),
|
||||||
|
"GF": (__) => __("French Guiana"),
|
||||||
|
"GG": (__) => __("Guernsey"),
|
||||||
|
"GH": (__) => __("Ghana"),
|
||||||
|
"GI": (__) => __("Gibraltar"),
|
||||||
|
"GL": (__) => __("Greenland"),
|
||||||
|
"GM": (__) => __("Gambia"),
|
||||||
|
"GN": (__) => __("Guinea"),
|
||||||
|
"GP": (__) => __("Guadeloupe"),
|
||||||
|
"GQ": (__) => __("Equatorial Guinea"),
|
||||||
|
"GR": (__) => __("Greece"),
|
||||||
|
"GT": (__) => __("Guatemala"),
|
||||||
|
"GU": (__) => __("Guam"),
|
||||||
|
"GW": (__) => __("Guinea-Bissau"),
|
||||||
|
"GY": (__) => __("Guyana"),
|
||||||
|
"HK": (__) => __("Hong Kong"),
|
||||||
|
"HM": (__) => __("Heard Island and McDonald Islands"),
|
||||||
|
"HN": (__) => __("Honduras"),
|
||||||
|
"HR": (__) => __("Croatia"),
|
||||||
|
"HT": (__) => __("Haiti"),
|
||||||
|
"HU": (__) => __("Hungary"),
|
||||||
|
"ID": (__) => __("Indonesia"),
|
||||||
|
"IE": (__) => __("Ireland"),
|
||||||
|
"IL": (__) => __("Israel"),
|
||||||
|
"IM": (__) => __("Isle of Man"),
|
||||||
|
"IN": (__) => __("India"),
|
||||||
|
"IO": (__) => __("British Indian Ocean Territory"),
|
||||||
|
"IQ": (__) => __("Iraq"),
|
||||||
|
"IR": (__) => __("Iran"),
|
||||||
|
"IS": (__) => __("Iceland"),
|
||||||
|
"IT": (__) => __("Italy"),
|
||||||
|
"JE": (__) => __("Jersey"),
|
||||||
|
"JM": (__) => __("Jamaica"),
|
||||||
|
"JO": (__) => __("Jordan"),
|
||||||
|
"JP": (__) => __("Japan"),
|
||||||
|
"KE": (__) => __("Kenya"),
|
||||||
|
"KG": (__) => __("Kyrgyzstan"),
|
||||||
|
"KH": (__) => __("Cambodia"),
|
||||||
|
"KI": (__) => __("Kiribati"),
|
||||||
|
"KM": (__) => __("Comoros"),
|
||||||
|
"KN": (__) => __("Saint Kitts and Nevis"),
|
||||||
|
"KP": (__) => __("North Korea"),
|
||||||
|
"KR": (__) => __("South Korea"),
|
||||||
|
"KW": (__) => __("Kuwait"),
|
||||||
|
"KY": (__) => __("Cayman Islands"),
|
||||||
|
"KZ": (__) => __("Kazakhstan"),
|
||||||
|
"LA": (__) => __("Laos"),
|
||||||
|
"LB": (__) => __("Lebanon"),
|
||||||
|
"LC": (__) => __("Saint Lucia"),
|
||||||
|
"LI": (__) => __("Liechtenstein"),
|
||||||
|
"LK": (__) => __("Sri Lanka"),
|
||||||
|
"LR": (__) => __("Liberia"),
|
||||||
|
"LS": (__) => __("Lesotho"),
|
||||||
|
"LT": (__) => __("Lithuania"),
|
||||||
|
"LU": (__) => __("Luxembourg"),
|
||||||
|
"LV": (__) => __("Latvia"),
|
||||||
|
"LY": (__) => __("Libya"),
|
||||||
|
"MA": (__) => __("Morocco"),
|
||||||
|
"MC": (__) => __("Monaco"),
|
||||||
|
"MD": (__) => __("Moldova"),
|
||||||
|
"ME": (__) => __("Montenegro"),
|
||||||
|
"MF": (__) => __("Saint Martin"),
|
||||||
|
"MG": (__) => __("Madagascar"),
|
||||||
|
"MH": (__) => __("Marshall Islands"),
|
||||||
|
"MK": (__) => __("North Macedonia"),
|
||||||
|
"ML": (__) => __("Mali"),
|
||||||
|
"MM": (__) => __("Myanmar"),
|
||||||
|
"MN": (__) => __("Mongolia"),
|
||||||
|
"MO": (__) => __("Macau"),
|
||||||
|
"MP": (__) => __("Northern Mariana Islands"),
|
||||||
|
"MQ": (__) => __("Martinique"),
|
||||||
|
"MR": (__) => __("Mauritania"),
|
||||||
|
"MS": (__) => __("Montserrat"),
|
||||||
|
"MT": (__) => __("Malta"),
|
||||||
|
"MU": (__) => __("Mauritius"),
|
||||||
|
"MV": (__) => __("Maldives"),
|
||||||
|
"MW": (__) => __("Malawi"),
|
||||||
|
"MX": (__) => __("Mexico"),
|
||||||
|
"MY": (__) => __("Malaysia"),
|
||||||
|
"MZ": (__) => __("Mozambique"),
|
||||||
|
"NA": (__) => __("Namibia"),
|
||||||
|
"NC": (__) => __("New Caledonia"),
|
||||||
|
"NE": (__) => __("Niger"),
|
||||||
|
"NF": (__) => __("Norfolk Island"),
|
||||||
|
"NG": (__) => __("Nigeria"),
|
||||||
|
"NI": (__) => __("Nicaragua"),
|
||||||
|
"NL": (__) => __("Netherlands"),
|
||||||
|
"NO": (__) => __("Norway"),
|
||||||
|
"NP": (__) => __("Nepal"),
|
||||||
|
"NR": (__) => __("Nauru"),
|
||||||
|
"NU": (__) => __("Niue"),
|
||||||
|
"NZ": (__) => __("New Zealand"),
|
||||||
|
"OM": (__) => __("Oman"),
|
||||||
|
"PA": (__) => __("Panama"),
|
||||||
|
"PE": (__) => __("Peru"),
|
||||||
|
"PF": (__) => __("French Polynesia"),
|
||||||
|
"PG": (__) => __("Papua New Guinea"),
|
||||||
|
"PH": (__) => __("Philippines"),
|
||||||
|
"PK": (__) => __("Pakistan"),
|
||||||
|
"PL": (__) => __("Poland"),
|
||||||
|
"PM": (__) => __("Saint Pierre and Miquelon"),
|
||||||
|
"PN": (__) => __("Pitcairn"),
|
||||||
|
"PR": (__) => __("Puerto Rico"),
|
||||||
|
"PS": (__) => __("Palestine"),
|
||||||
|
"PT": (__) => __("Portugal"),
|
||||||
|
"PW": (__) => __("Palau"),
|
||||||
|
"PY": (__) => __("Paraguay"),
|
||||||
|
"QA": (__) => __("Qatar"),
|
||||||
|
"RE": (__) => __("Réunion"),
|
||||||
|
"RO": (__) => __("Romania"),
|
||||||
|
"RS": (__) => __("Serbia"),
|
||||||
|
"RU": (__) => __("Russia"),
|
||||||
|
"RW": (__) => __("Rwanda"),
|
||||||
|
"SA": (__) => __("Saudi Arabia"),
|
||||||
|
"SB": (__) => __("Solomon Islands"),
|
||||||
|
"SC": (__) => __("Seychelles"),
|
||||||
|
"SD": (__) => __("Sudan"),
|
||||||
|
"SE": (__) => __("Sweden"),
|
||||||
|
"SG": (__) => __("Singapore"),
|
||||||
|
"SH": (__) => __("Saint Helena"),
|
||||||
|
"SI": (__) => __("Slovenia"),
|
||||||
|
"SJ": (__) => __("Svalbard and Jan Mayen"),
|
||||||
|
"SK": (__) => __("Slovakia"),
|
||||||
|
"SL": (__) => __("Sierra Leone"),
|
||||||
|
"SM": (__) => __("San Marino"),
|
||||||
|
"SN": (__) => __("Senegal"),
|
||||||
|
"SO": (__) => __("Somalia"),
|
||||||
|
"SR": (__) => __("Suriname"),
|
||||||
|
"SS": (__) => __("South Sudan"),
|
||||||
|
"ST": (__) => __("São Tomé and Príncipe"),
|
||||||
|
"SV": (__) => __("El Salvador"),
|
||||||
|
"SX": (__) => __("Sint Maarten"),
|
||||||
|
"SY": (__) => __("Syria"),
|
||||||
|
"SZ": (__) => __("Eswatini"),
|
||||||
|
"TC": (__) => __("Turks and Caicos Islands"),
|
||||||
|
"TD": (__) => __("Chad"),
|
||||||
|
"TF": (__) => __("French Southern Territories"),
|
||||||
|
"TG": (__) => __("Togo"),
|
||||||
|
"TH": (__) => __("Thailand"),
|
||||||
|
"TJ": (__) => __("Tajikistan"),
|
||||||
|
"TK": (__) => __("Tokelau"),
|
||||||
|
"TL": (__) => __("Timor-Leste"),
|
||||||
|
"TM": (__) => __("Turkmenistan"),
|
||||||
|
"TN": (__) => __("Tunisia"),
|
||||||
|
"TO": (__) => __("Tonga"),
|
||||||
|
"TR": (__) => __("Turkey"),
|
||||||
|
"TT": (__) => __("Trinidad and Tobago"),
|
||||||
|
"TV": (__) => __("Tuvalu"),
|
||||||
|
"TW": (__) => __("Taiwan"),
|
||||||
|
"TZ": (__) => __("Tanzania"),
|
||||||
|
"UA": (__) => __("Ukraine"),
|
||||||
|
"UG": (__) => __("Uganda"),
|
||||||
|
"UM": (__) => __("United States Minor Outlying Islands"),
|
||||||
|
"US": (__) => __("United States"),
|
||||||
|
"UY": (__) => __("Uruguay"),
|
||||||
|
"UZ": (__) => __("Uzbekistan"),
|
||||||
|
"VA": (__) => __("Vatican City"),
|
||||||
|
"VC": (__) => __("Saint Vincent and the Grenadines"),
|
||||||
|
"VE": (__) => __("Venezuela"),
|
||||||
|
"VG": (__) => __("Virgin Islands (British)"),
|
||||||
|
"VI": (__) => __("Virgin Islands (U.S.)"),
|
||||||
|
"VN": (__) => __("Vietnam"),
|
||||||
|
"VU": (__) => __("Vanuatu"),
|
||||||
|
"WF": (__) => __("Wallis and Futuna"),
|
||||||
|
"WS": (__) => __("Samoa"),
|
||||||
|
"YE": (__) => __("Yemen"),
|
||||||
|
"YT": (__) => __("Mayotte"),
|
||||||
|
"ZA": (__) => __("South Africa"),
|
||||||
|
"ZM": (__) => __("Zambia"),
|
||||||
|
"ZW": (__) => __("Zimbabwe"),
|
||||||
|
};
|
||||||
|
|
||||||
|
export function getCountryName(__: Translator, code: CountryCode): string {
|
||||||
|
const translator = countryNames[code];
|
||||||
|
return translator ? translator(__) : code;
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getCountryOptions(__: Translator) {
|
||||||
|
return countries.map(code => ({
|
||||||
|
value: code,
|
||||||
|
label: getCountryName(__, code),
|
||||||
|
}));
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getCountryLabel(__: Translator, code: CountryCode): string {
|
||||||
|
return getCountryName(__, code);
|
||||||
|
}
|
||||||
@@ -12,6 +12,7 @@ export { randomInt } from "./number";
|
|||||||
export { getMeasureStateLabel, measureStates } from "./measure";
|
export { getMeasureStateLabel, measureStates } from "./measure";
|
||||||
export { getRole, getRoles, peopleRoles } from "./people";
|
export { getRole, getRoles, peopleRoles } from "./people";
|
||||||
export { certificationCategoryLabel, certifications } from "./certifications";
|
export { certificationCategoryLabel, certifications } from "./certifications";
|
||||||
|
export { getCountryName, getCountryOptions, getCountryLabel, countries, type CountryCode } from "./countries";
|
||||||
export { availableFrameworks } from "./frameworks";
|
export { availableFrameworks } from "./frameworks";
|
||||||
export { getDocumentTypeLabel, documentTypes } from "./documents";
|
export { getDocumentTypeLabel, documentTypes } from "./documents";
|
||||||
export { getAssetTypeVariant, getCriticityVariant } from "./assets";
|
export { getAssetTypeVariant, getCriticityVariant } from "./assets";
|
||||||
|
|||||||
3
packages/vendors/data.d.ts
vendored
3
packages/vendors/data.d.ts
vendored
@@ -83,6 +83,9 @@ export interface Vendor {
|
|||||||
|
|
||||||
/** URL to vendor's status page */
|
/** URL to vendor's status page */
|
||||||
statusPageUrl?: string;
|
statusPageUrl?: string;
|
||||||
|
|
||||||
|
/** Countries where the vendor is located */
|
||||||
|
countries?: CountryCode[];
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
854
pkg/coredata/country_code.go
Normal file
854
pkg/coredata/country_code.go
Normal file
@@ -0,0 +1,854 @@
|
|||||||
|
// Copyright (c) 2025 Probo Inc <hello@getprobo.com>.
|
||||||
|
//
|
||||||
|
// Permission to use, copy, modify, and/or distribute this software for any
|
||||||
|
// purpose with or without fee is hereby granted, provided that the above
|
||||||
|
// copyright notice and this permission notice appear in all copies.
|
||||||
|
//
|
||||||
|
// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
||||||
|
// REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||||||
|
// AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||||||
|
// INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
||||||
|
// LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
||||||
|
// OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||||
|
// PERFORMANCE OF THIS SOFTWARE.
|
||||||
|
|
||||||
|
package coredata
|
||||||
|
|
||||||
|
import (
|
||||||
|
"database/sql/driver"
|
||||||
|
"fmt"
|
||||||
|
"strings"
|
||||||
|
)
|
||||||
|
|
||||||
|
type (
|
||||||
|
CountryCode string
|
||||||
|
)
|
||||||
|
|
||||||
|
const (
|
||||||
|
CountryCodeAD CountryCode = "AD"
|
||||||
|
CountryCodeAE CountryCode = "AE"
|
||||||
|
CountryCodeAF CountryCode = "AF"
|
||||||
|
CountryCodeAG CountryCode = "AG"
|
||||||
|
CountryCodeAI CountryCode = "AI"
|
||||||
|
CountryCodeAL CountryCode = "AL"
|
||||||
|
CountryCodeAM CountryCode = "AM"
|
||||||
|
CountryCodeAO CountryCode = "AO"
|
||||||
|
CountryCodeAQ CountryCode = "AQ"
|
||||||
|
CountryCodeAR CountryCode = "AR"
|
||||||
|
CountryCodeAS CountryCode = "AS"
|
||||||
|
CountryCodeAT CountryCode = "AT"
|
||||||
|
CountryCodeAU CountryCode = "AU"
|
||||||
|
CountryCodeAW CountryCode = "AW"
|
||||||
|
CountryCodeAX CountryCode = "AX"
|
||||||
|
CountryCodeAZ CountryCode = "AZ"
|
||||||
|
CountryCodeBA CountryCode = "BA"
|
||||||
|
CountryCodeBB CountryCode = "BB"
|
||||||
|
CountryCodeBD CountryCode = "BD"
|
||||||
|
CountryCodeBE CountryCode = "BE"
|
||||||
|
CountryCodeBF CountryCode = "BF"
|
||||||
|
CountryCodeBG CountryCode = "BG"
|
||||||
|
CountryCodeBH CountryCode = "BH"
|
||||||
|
CountryCodeBI CountryCode = "BI"
|
||||||
|
CountryCodeBJ CountryCode = "BJ"
|
||||||
|
CountryCodeBL CountryCode = "BL"
|
||||||
|
CountryCodeBM CountryCode = "BM"
|
||||||
|
CountryCodeBN CountryCode = "BN"
|
||||||
|
CountryCodeBO CountryCode = "BO"
|
||||||
|
CountryCodeBQ CountryCode = "BQ"
|
||||||
|
CountryCodeBR CountryCode = "BR"
|
||||||
|
CountryCodeBS CountryCode = "BS"
|
||||||
|
CountryCodeBT CountryCode = "BT"
|
||||||
|
CountryCodeBV CountryCode = "BV"
|
||||||
|
CountryCodeBW CountryCode = "BW"
|
||||||
|
CountryCodeBY CountryCode = "BY"
|
||||||
|
CountryCodeBZ CountryCode = "BZ"
|
||||||
|
CountryCodeCA CountryCode = "CA"
|
||||||
|
CountryCodeCC CountryCode = "CC"
|
||||||
|
CountryCodeCD CountryCode = "CD"
|
||||||
|
CountryCodeCF CountryCode = "CF"
|
||||||
|
CountryCodeCG CountryCode = "CG"
|
||||||
|
CountryCodeCH CountryCode = "CH"
|
||||||
|
CountryCodeCI CountryCode = "CI"
|
||||||
|
CountryCodeCK CountryCode = "CK"
|
||||||
|
CountryCodeCL CountryCode = "CL"
|
||||||
|
CountryCodeCM CountryCode = "CM"
|
||||||
|
CountryCodeCN CountryCode = "CN"
|
||||||
|
CountryCodeCO CountryCode = "CO"
|
||||||
|
CountryCodeCR CountryCode = "CR"
|
||||||
|
CountryCodeCU CountryCode = "CU"
|
||||||
|
CountryCodeCV CountryCode = "CV"
|
||||||
|
CountryCodeCW CountryCode = "CW"
|
||||||
|
CountryCodeCX CountryCode = "CX"
|
||||||
|
CountryCodeCY CountryCode = "CY"
|
||||||
|
CountryCodeCZ CountryCode = "CZ"
|
||||||
|
CountryCodeDE CountryCode = "DE"
|
||||||
|
CountryCodeDJ CountryCode = "DJ"
|
||||||
|
CountryCodeDK CountryCode = "DK"
|
||||||
|
CountryCodeDM CountryCode = "DM"
|
||||||
|
CountryCodeDO CountryCode = "DO"
|
||||||
|
CountryCodeDZ CountryCode = "DZ"
|
||||||
|
CountryCodeEC CountryCode = "EC"
|
||||||
|
CountryCodeEE CountryCode = "EE"
|
||||||
|
CountryCodeEG CountryCode = "EG"
|
||||||
|
CountryCodeEH CountryCode = "EH"
|
||||||
|
CountryCodeER CountryCode = "ER"
|
||||||
|
CountryCodeES CountryCode = "ES"
|
||||||
|
CountryCodeET CountryCode = "ET"
|
||||||
|
CountryCodeFI CountryCode = "FI"
|
||||||
|
CountryCodeFJ CountryCode = "FJ"
|
||||||
|
CountryCodeFK CountryCode = "FK"
|
||||||
|
CountryCodeFM CountryCode = "FM"
|
||||||
|
CountryCodeFO CountryCode = "FO"
|
||||||
|
CountryCodeFR CountryCode = "FR"
|
||||||
|
CountryCodeGA CountryCode = "GA"
|
||||||
|
CountryCodeGB CountryCode = "GB"
|
||||||
|
CountryCodeGD CountryCode = "GD"
|
||||||
|
CountryCodeGE CountryCode = "GE"
|
||||||
|
CountryCodeGF CountryCode = "GF"
|
||||||
|
CountryCodeGG CountryCode = "GG"
|
||||||
|
CountryCodeGH CountryCode = "GH"
|
||||||
|
CountryCodeGI CountryCode = "GI"
|
||||||
|
CountryCodeGL CountryCode = "GL"
|
||||||
|
CountryCodeGM CountryCode = "GM"
|
||||||
|
CountryCodeGN CountryCode = "GN"
|
||||||
|
CountryCodeGP CountryCode = "GP"
|
||||||
|
CountryCodeGQ CountryCode = "GQ"
|
||||||
|
CountryCodeGR CountryCode = "GR"
|
||||||
|
CountryCodeGT CountryCode = "GT"
|
||||||
|
CountryCodeGU CountryCode = "GU"
|
||||||
|
CountryCodeGW CountryCode = "GW"
|
||||||
|
CountryCodeGY CountryCode = "GY"
|
||||||
|
CountryCodeHK CountryCode = "HK"
|
||||||
|
CountryCodeHM CountryCode = "HM"
|
||||||
|
CountryCodeHN CountryCode = "HN"
|
||||||
|
CountryCodeHR CountryCode = "HR"
|
||||||
|
CountryCodeHT CountryCode = "HT"
|
||||||
|
CountryCodeHU CountryCode = "HU"
|
||||||
|
CountryCodeID CountryCode = "ID"
|
||||||
|
CountryCodeIE CountryCode = "IE"
|
||||||
|
CountryCodeIL CountryCode = "IL"
|
||||||
|
CountryCodeIM CountryCode = "IM"
|
||||||
|
CountryCodeIN CountryCode = "IN"
|
||||||
|
CountryCodeIO CountryCode = "IO"
|
||||||
|
CountryCodeIQ CountryCode = "IQ"
|
||||||
|
CountryCodeIR CountryCode = "IR"
|
||||||
|
CountryCodeIS CountryCode = "IS"
|
||||||
|
CountryCodeIT CountryCode = "IT"
|
||||||
|
CountryCodeJE CountryCode = "JE"
|
||||||
|
CountryCodeJM CountryCode = "JM"
|
||||||
|
CountryCodeJO CountryCode = "JO"
|
||||||
|
CountryCodeJP CountryCode = "JP"
|
||||||
|
CountryCodeKE CountryCode = "KE"
|
||||||
|
CountryCodeKG CountryCode = "KG"
|
||||||
|
CountryCodeKH CountryCode = "KH"
|
||||||
|
CountryCodeKI CountryCode = "KI"
|
||||||
|
CountryCodeKM CountryCode = "KM"
|
||||||
|
CountryCodeKN CountryCode = "KN"
|
||||||
|
CountryCodeKP CountryCode = "KP"
|
||||||
|
CountryCodeKR CountryCode = "KR"
|
||||||
|
CountryCodeKW CountryCode = "KW"
|
||||||
|
CountryCodeKY CountryCode = "KY"
|
||||||
|
CountryCodeKZ CountryCode = "KZ"
|
||||||
|
CountryCodeLA CountryCode = "LA"
|
||||||
|
CountryCodeLB CountryCode = "LB"
|
||||||
|
CountryCodeLC CountryCode = "LC"
|
||||||
|
CountryCodeLI CountryCode = "LI"
|
||||||
|
CountryCodeLK CountryCode = "LK"
|
||||||
|
CountryCodeLR CountryCode = "LR"
|
||||||
|
CountryCodeLS CountryCode = "LS"
|
||||||
|
CountryCodeLT CountryCode = "LT"
|
||||||
|
CountryCodeLU CountryCode = "LU"
|
||||||
|
CountryCodeLV CountryCode = "LV"
|
||||||
|
CountryCodeLY CountryCode = "LY"
|
||||||
|
CountryCodeMA CountryCode = "MA"
|
||||||
|
CountryCodeMC CountryCode = "MC"
|
||||||
|
CountryCodeMD CountryCode = "MD"
|
||||||
|
CountryCodeME CountryCode = "ME"
|
||||||
|
CountryCodeMF CountryCode = "MF"
|
||||||
|
CountryCodeMG CountryCode = "MG"
|
||||||
|
CountryCodeMH CountryCode = "MH"
|
||||||
|
CountryCodeMK CountryCode = "MK"
|
||||||
|
CountryCodeML CountryCode = "ML"
|
||||||
|
CountryCodeMM CountryCode = "MM"
|
||||||
|
CountryCodeMN CountryCode = "MN"
|
||||||
|
CountryCodeMO CountryCode = "MO"
|
||||||
|
CountryCodeMP CountryCode = "MP"
|
||||||
|
CountryCodeMQ CountryCode = "MQ"
|
||||||
|
CountryCodeMR CountryCode = "MR"
|
||||||
|
CountryCodeMS CountryCode = "MS"
|
||||||
|
CountryCodeMT CountryCode = "MT"
|
||||||
|
CountryCodeMU CountryCode = "MU"
|
||||||
|
CountryCodeMV CountryCode = "MV"
|
||||||
|
CountryCodeMW CountryCode = "MW"
|
||||||
|
CountryCodeMX CountryCode = "MX"
|
||||||
|
CountryCodeMY CountryCode = "MY"
|
||||||
|
CountryCodeMZ CountryCode = "MZ"
|
||||||
|
CountryCodeNA CountryCode = "NA"
|
||||||
|
CountryCodeNC CountryCode = "NC"
|
||||||
|
CountryCodeNE CountryCode = "NE"
|
||||||
|
CountryCodeNF CountryCode = "NF"
|
||||||
|
CountryCodeNG CountryCode = "NG"
|
||||||
|
CountryCodeNI CountryCode = "NI"
|
||||||
|
CountryCodeNL CountryCode = "NL"
|
||||||
|
CountryCodeNO CountryCode = "NO"
|
||||||
|
CountryCodeNP CountryCode = "NP"
|
||||||
|
CountryCodeNR CountryCode = "NR"
|
||||||
|
CountryCodeNU CountryCode = "NU"
|
||||||
|
CountryCodeNZ CountryCode = "NZ"
|
||||||
|
CountryCodeOM CountryCode = "OM"
|
||||||
|
CountryCodePA CountryCode = "PA"
|
||||||
|
CountryCodePE CountryCode = "PE"
|
||||||
|
CountryCodePF CountryCode = "PF"
|
||||||
|
CountryCodePG CountryCode = "PG"
|
||||||
|
CountryCodePH CountryCode = "PH"
|
||||||
|
CountryCodePK CountryCode = "PK"
|
||||||
|
CountryCodePL CountryCode = "PL"
|
||||||
|
CountryCodePM CountryCode = "PM"
|
||||||
|
CountryCodePN CountryCode = "PN"
|
||||||
|
CountryCodePR CountryCode = "PR"
|
||||||
|
CountryCodePS CountryCode = "PS"
|
||||||
|
CountryCodePT CountryCode = "PT"
|
||||||
|
CountryCodePW CountryCode = "PW"
|
||||||
|
CountryCodePY CountryCode = "PY"
|
||||||
|
CountryCodeQA CountryCode = "QA"
|
||||||
|
CountryCodeRE CountryCode = "RE"
|
||||||
|
CountryCodeRO CountryCode = "RO"
|
||||||
|
CountryCodeRS CountryCode = "RS"
|
||||||
|
CountryCodeRU CountryCode = "RU"
|
||||||
|
CountryCodeRW CountryCode = "RW"
|
||||||
|
CountryCodeSA CountryCode = "SA"
|
||||||
|
CountryCodeSB CountryCode = "SB"
|
||||||
|
CountryCodeSC CountryCode = "SC"
|
||||||
|
CountryCodeSD CountryCode = "SD"
|
||||||
|
CountryCodeSE CountryCode = "SE"
|
||||||
|
CountryCodeSG CountryCode = "SG"
|
||||||
|
CountryCodeSH CountryCode = "SH"
|
||||||
|
CountryCodeSI CountryCode = "SI"
|
||||||
|
CountryCodeSJ CountryCode = "SJ"
|
||||||
|
CountryCodeSK CountryCode = "SK"
|
||||||
|
CountryCodeSL CountryCode = "SL"
|
||||||
|
CountryCodeSM CountryCode = "SM"
|
||||||
|
CountryCodeSN CountryCode = "SN"
|
||||||
|
CountryCodeSO CountryCode = "SO"
|
||||||
|
CountryCodeSR CountryCode = "SR"
|
||||||
|
CountryCodeSS CountryCode = "SS"
|
||||||
|
CountryCodeST CountryCode = "ST"
|
||||||
|
CountryCodeSV CountryCode = "SV"
|
||||||
|
CountryCodeSX CountryCode = "SX"
|
||||||
|
CountryCodeSY CountryCode = "SY"
|
||||||
|
CountryCodeSZ CountryCode = "SZ"
|
||||||
|
CountryCodeTC CountryCode = "TC"
|
||||||
|
CountryCodeTD CountryCode = "TD"
|
||||||
|
CountryCodeTF CountryCode = "TF"
|
||||||
|
CountryCodeTG CountryCode = "TG"
|
||||||
|
CountryCodeTH CountryCode = "TH"
|
||||||
|
CountryCodeTJ CountryCode = "TJ"
|
||||||
|
CountryCodeTK CountryCode = "TK"
|
||||||
|
CountryCodeTL CountryCode = "TL"
|
||||||
|
CountryCodeTM CountryCode = "TM"
|
||||||
|
CountryCodeTN CountryCode = "TN"
|
||||||
|
CountryCodeTO CountryCode = "TO"
|
||||||
|
CountryCodeTR CountryCode = "TR"
|
||||||
|
CountryCodeTT CountryCode = "TT"
|
||||||
|
CountryCodeTV CountryCode = "TV"
|
||||||
|
CountryCodeTW CountryCode = "TW"
|
||||||
|
CountryCodeTZ CountryCode = "TZ"
|
||||||
|
CountryCodeUA CountryCode = "UA"
|
||||||
|
CountryCodeUG CountryCode = "UG"
|
||||||
|
CountryCodeUM CountryCode = "UM"
|
||||||
|
CountryCodeUS CountryCode = "US"
|
||||||
|
CountryCodeUY CountryCode = "UY"
|
||||||
|
CountryCodeUZ CountryCode = "UZ"
|
||||||
|
CountryCodeVA CountryCode = "VA"
|
||||||
|
CountryCodeVC CountryCode = "VC"
|
||||||
|
CountryCodeVE CountryCode = "VE"
|
||||||
|
CountryCodeVG CountryCode = "VG"
|
||||||
|
CountryCodeVI CountryCode = "VI"
|
||||||
|
CountryCodeVN CountryCode = "VN"
|
||||||
|
CountryCodeVU CountryCode = "VU"
|
||||||
|
CountryCodeWF CountryCode = "WF"
|
||||||
|
CountryCodeWS CountryCode = "WS"
|
||||||
|
CountryCodeYE CountryCode = "YE"
|
||||||
|
CountryCodeYT CountryCode = "YT"
|
||||||
|
CountryCodeZA CountryCode = "ZA"
|
||||||
|
CountryCodeZM CountryCode = "ZM"
|
||||||
|
CountryCodeZW CountryCode = "ZW"
|
||||||
|
)
|
||||||
|
|
||||||
|
func (ct CountryCode) String() string {
|
||||||
|
return string(ct)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (ct *CountryCode) Scan(value any) error {
|
||||||
|
var s string
|
||||||
|
switch v := value.(type) {
|
||||||
|
case string:
|
||||||
|
s = v
|
||||||
|
case []byte:
|
||||||
|
s = string(v)
|
||||||
|
default:
|
||||||
|
return fmt.Errorf("unsupported type for CountryCode: %T", value)
|
||||||
|
}
|
||||||
|
|
||||||
|
switch s {
|
||||||
|
case CountryCodeAD.String():
|
||||||
|
*ct = CountryCodeAD
|
||||||
|
case CountryCodeAE.String():
|
||||||
|
*ct = CountryCodeAE
|
||||||
|
case CountryCodeAF.String():
|
||||||
|
*ct = CountryCodeAF
|
||||||
|
case CountryCodeAG.String():
|
||||||
|
*ct = CountryCodeAG
|
||||||
|
case CountryCodeAI.String():
|
||||||
|
*ct = CountryCodeAI
|
||||||
|
case CountryCodeAL.String():
|
||||||
|
*ct = CountryCodeAL
|
||||||
|
case CountryCodeAM.String():
|
||||||
|
*ct = CountryCodeAM
|
||||||
|
case CountryCodeAO.String():
|
||||||
|
*ct = CountryCodeAO
|
||||||
|
case CountryCodeAQ.String():
|
||||||
|
*ct = CountryCodeAQ
|
||||||
|
case CountryCodeAR.String():
|
||||||
|
*ct = CountryCodeAR
|
||||||
|
case CountryCodeAS.String():
|
||||||
|
*ct = CountryCodeAS
|
||||||
|
case CountryCodeAT.String():
|
||||||
|
*ct = CountryCodeAT
|
||||||
|
case CountryCodeAU.String():
|
||||||
|
*ct = CountryCodeAU
|
||||||
|
case CountryCodeAW.String():
|
||||||
|
*ct = CountryCodeAW
|
||||||
|
case CountryCodeAX.String():
|
||||||
|
*ct = CountryCodeAX
|
||||||
|
case CountryCodeAZ.String():
|
||||||
|
*ct = CountryCodeAZ
|
||||||
|
case CountryCodeBA.String():
|
||||||
|
*ct = CountryCodeBA
|
||||||
|
case CountryCodeBB.String():
|
||||||
|
*ct = CountryCodeBB
|
||||||
|
case CountryCodeBD.String():
|
||||||
|
*ct = CountryCodeBD
|
||||||
|
case CountryCodeBE.String():
|
||||||
|
*ct = CountryCodeBE
|
||||||
|
case CountryCodeBF.String():
|
||||||
|
*ct = CountryCodeBF
|
||||||
|
case CountryCodeBG.String():
|
||||||
|
*ct = CountryCodeBG
|
||||||
|
case CountryCodeBH.String():
|
||||||
|
*ct = CountryCodeBH
|
||||||
|
case CountryCodeBI.String():
|
||||||
|
*ct = CountryCodeBI
|
||||||
|
case CountryCodeBJ.String():
|
||||||
|
*ct = CountryCodeBJ
|
||||||
|
case CountryCodeBL.String():
|
||||||
|
*ct = CountryCodeBL
|
||||||
|
case CountryCodeBM.String():
|
||||||
|
*ct = CountryCodeBM
|
||||||
|
case CountryCodeBN.String():
|
||||||
|
*ct = CountryCodeBN
|
||||||
|
case CountryCodeBO.String():
|
||||||
|
*ct = CountryCodeBO
|
||||||
|
case CountryCodeBQ.String():
|
||||||
|
*ct = CountryCodeBQ
|
||||||
|
case CountryCodeBR.String():
|
||||||
|
*ct = CountryCodeBR
|
||||||
|
case CountryCodeBS.String():
|
||||||
|
*ct = CountryCodeBS
|
||||||
|
case CountryCodeBT.String():
|
||||||
|
*ct = CountryCodeBT
|
||||||
|
case CountryCodeBV.String():
|
||||||
|
*ct = CountryCodeBV
|
||||||
|
case CountryCodeBW.String():
|
||||||
|
*ct = CountryCodeBW
|
||||||
|
case CountryCodeBY.String():
|
||||||
|
*ct = CountryCodeBY
|
||||||
|
case CountryCodeBZ.String():
|
||||||
|
*ct = CountryCodeBZ
|
||||||
|
case CountryCodeCA.String():
|
||||||
|
*ct = CountryCodeCA
|
||||||
|
case CountryCodeCC.String():
|
||||||
|
*ct = CountryCodeCC
|
||||||
|
case CountryCodeCD.String():
|
||||||
|
*ct = CountryCodeCD
|
||||||
|
case CountryCodeCF.String():
|
||||||
|
*ct = CountryCodeCF
|
||||||
|
case CountryCodeCG.String():
|
||||||
|
*ct = CountryCodeCG
|
||||||
|
case CountryCodeCH.String():
|
||||||
|
*ct = CountryCodeCH
|
||||||
|
case CountryCodeCI.String():
|
||||||
|
*ct = CountryCodeCI
|
||||||
|
case CountryCodeCK.String():
|
||||||
|
*ct = CountryCodeCK
|
||||||
|
case CountryCodeCL.String():
|
||||||
|
*ct = CountryCodeCL
|
||||||
|
case CountryCodeCM.String():
|
||||||
|
*ct = CountryCodeCM
|
||||||
|
case CountryCodeCN.String():
|
||||||
|
*ct = CountryCodeCN
|
||||||
|
case CountryCodeCO.String():
|
||||||
|
*ct = CountryCodeCO
|
||||||
|
case CountryCodeCR.String():
|
||||||
|
*ct = CountryCodeCR
|
||||||
|
case CountryCodeCU.String():
|
||||||
|
*ct = CountryCodeCU
|
||||||
|
case CountryCodeCV.String():
|
||||||
|
*ct = CountryCodeCV
|
||||||
|
case CountryCodeCW.String():
|
||||||
|
*ct = CountryCodeCW
|
||||||
|
case CountryCodeCX.String():
|
||||||
|
*ct = CountryCodeCX
|
||||||
|
case CountryCodeCY.String():
|
||||||
|
*ct = CountryCodeCY
|
||||||
|
case CountryCodeCZ.String():
|
||||||
|
*ct = CountryCodeCZ
|
||||||
|
case CountryCodeDE.String():
|
||||||
|
*ct = CountryCodeDE
|
||||||
|
case CountryCodeDJ.String():
|
||||||
|
*ct = CountryCodeDJ
|
||||||
|
case CountryCodeDK.String():
|
||||||
|
*ct = CountryCodeDK
|
||||||
|
case CountryCodeDM.String():
|
||||||
|
*ct = CountryCodeDM
|
||||||
|
case CountryCodeDO.String():
|
||||||
|
*ct = CountryCodeDO
|
||||||
|
case CountryCodeDZ.String():
|
||||||
|
*ct = CountryCodeDZ
|
||||||
|
case CountryCodeEC.String():
|
||||||
|
*ct = CountryCodeEC
|
||||||
|
case CountryCodeEE.String():
|
||||||
|
*ct = CountryCodeEE
|
||||||
|
case CountryCodeEG.String():
|
||||||
|
*ct = CountryCodeEG
|
||||||
|
case CountryCodeEH.String():
|
||||||
|
*ct = CountryCodeEH
|
||||||
|
case CountryCodeER.String():
|
||||||
|
*ct = CountryCodeER
|
||||||
|
case CountryCodeES.String():
|
||||||
|
*ct = CountryCodeES
|
||||||
|
case CountryCodeET.String():
|
||||||
|
*ct = CountryCodeET
|
||||||
|
case CountryCodeFI.String():
|
||||||
|
*ct = CountryCodeFI
|
||||||
|
case CountryCodeFJ.String():
|
||||||
|
*ct = CountryCodeFJ
|
||||||
|
case CountryCodeFK.String():
|
||||||
|
*ct = CountryCodeFK
|
||||||
|
case CountryCodeFM.String():
|
||||||
|
*ct = CountryCodeFM
|
||||||
|
case CountryCodeFO.String():
|
||||||
|
*ct = CountryCodeFO
|
||||||
|
case CountryCodeFR.String():
|
||||||
|
*ct = CountryCodeFR
|
||||||
|
case CountryCodeGA.String():
|
||||||
|
*ct = CountryCodeGA
|
||||||
|
case CountryCodeGB.String():
|
||||||
|
*ct = CountryCodeGB
|
||||||
|
case CountryCodeGD.String():
|
||||||
|
*ct = CountryCodeGD
|
||||||
|
case CountryCodeGE.String():
|
||||||
|
*ct = CountryCodeGE
|
||||||
|
case CountryCodeGF.String():
|
||||||
|
*ct = CountryCodeGF
|
||||||
|
case CountryCodeGG.String():
|
||||||
|
*ct = CountryCodeGG
|
||||||
|
case CountryCodeGH.String():
|
||||||
|
*ct = CountryCodeGH
|
||||||
|
case CountryCodeGI.String():
|
||||||
|
*ct = CountryCodeGI
|
||||||
|
case CountryCodeGL.String():
|
||||||
|
*ct = CountryCodeGL
|
||||||
|
case CountryCodeGM.String():
|
||||||
|
*ct = CountryCodeGM
|
||||||
|
case CountryCodeGN.String():
|
||||||
|
*ct = CountryCodeGN
|
||||||
|
case CountryCodeGP.String():
|
||||||
|
*ct = CountryCodeGP
|
||||||
|
case CountryCodeGQ.String():
|
||||||
|
*ct = CountryCodeGQ
|
||||||
|
case CountryCodeGR.String():
|
||||||
|
*ct = CountryCodeGR
|
||||||
|
case CountryCodeGT.String():
|
||||||
|
*ct = CountryCodeGT
|
||||||
|
case CountryCodeGU.String():
|
||||||
|
*ct = CountryCodeGU
|
||||||
|
case CountryCodeGW.String():
|
||||||
|
*ct = CountryCodeGW
|
||||||
|
case CountryCodeGY.String():
|
||||||
|
*ct = CountryCodeGY
|
||||||
|
case CountryCodeHK.String():
|
||||||
|
*ct = CountryCodeHK
|
||||||
|
case CountryCodeHM.String():
|
||||||
|
*ct = CountryCodeHM
|
||||||
|
case CountryCodeHN.String():
|
||||||
|
*ct = CountryCodeHN
|
||||||
|
case CountryCodeHR.String():
|
||||||
|
*ct = CountryCodeHR
|
||||||
|
case CountryCodeHT.String():
|
||||||
|
*ct = CountryCodeHT
|
||||||
|
case CountryCodeHU.String():
|
||||||
|
*ct = CountryCodeHU
|
||||||
|
case CountryCodeID.String():
|
||||||
|
*ct = CountryCodeID
|
||||||
|
case CountryCodeIE.String():
|
||||||
|
*ct = CountryCodeIE
|
||||||
|
case CountryCodeIL.String():
|
||||||
|
*ct = CountryCodeIL
|
||||||
|
case CountryCodeIM.String():
|
||||||
|
*ct = CountryCodeIM
|
||||||
|
case CountryCodeIN.String():
|
||||||
|
*ct = CountryCodeIN
|
||||||
|
case CountryCodeIO.String():
|
||||||
|
*ct = CountryCodeIO
|
||||||
|
case CountryCodeIQ.String():
|
||||||
|
*ct = CountryCodeIQ
|
||||||
|
case CountryCodeIR.String():
|
||||||
|
*ct = CountryCodeIR
|
||||||
|
case CountryCodeIS.String():
|
||||||
|
*ct = CountryCodeIS
|
||||||
|
case CountryCodeIT.String():
|
||||||
|
*ct = CountryCodeIT
|
||||||
|
case CountryCodeJE.String():
|
||||||
|
*ct = CountryCodeJE
|
||||||
|
case CountryCodeJM.String():
|
||||||
|
*ct = CountryCodeJM
|
||||||
|
case CountryCodeJO.String():
|
||||||
|
*ct = CountryCodeJO
|
||||||
|
case CountryCodeJP.String():
|
||||||
|
*ct = CountryCodeJP
|
||||||
|
case CountryCodeKE.String():
|
||||||
|
*ct = CountryCodeKE
|
||||||
|
case CountryCodeKG.String():
|
||||||
|
*ct = CountryCodeKG
|
||||||
|
case CountryCodeKH.String():
|
||||||
|
*ct = CountryCodeKH
|
||||||
|
case CountryCodeKI.String():
|
||||||
|
*ct = CountryCodeKI
|
||||||
|
case CountryCodeKM.String():
|
||||||
|
*ct = CountryCodeKM
|
||||||
|
case CountryCodeKN.String():
|
||||||
|
*ct = CountryCodeKN
|
||||||
|
case CountryCodeKP.String():
|
||||||
|
*ct = CountryCodeKP
|
||||||
|
case CountryCodeKR.String():
|
||||||
|
*ct = CountryCodeKR
|
||||||
|
case CountryCodeKW.String():
|
||||||
|
*ct = CountryCodeKW
|
||||||
|
case CountryCodeKY.String():
|
||||||
|
*ct = CountryCodeKY
|
||||||
|
case CountryCodeKZ.String():
|
||||||
|
*ct = CountryCodeKZ
|
||||||
|
case CountryCodeLA.String():
|
||||||
|
*ct = CountryCodeLA
|
||||||
|
case CountryCodeLB.String():
|
||||||
|
*ct = CountryCodeLB
|
||||||
|
case CountryCodeLC.String():
|
||||||
|
*ct = CountryCodeLC
|
||||||
|
case CountryCodeLI.String():
|
||||||
|
*ct = CountryCodeLI
|
||||||
|
case CountryCodeLK.String():
|
||||||
|
*ct = CountryCodeLK
|
||||||
|
case CountryCodeLR.String():
|
||||||
|
*ct = CountryCodeLR
|
||||||
|
case CountryCodeLS.String():
|
||||||
|
*ct = CountryCodeLS
|
||||||
|
case CountryCodeLT.String():
|
||||||
|
*ct = CountryCodeLT
|
||||||
|
case CountryCodeLU.String():
|
||||||
|
*ct = CountryCodeLU
|
||||||
|
case CountryCodeLV.String():
|
||||||
|
*ct = CountryCodeLV
|
||||||
|
case CountryCodeLY.String():
|
||||||
|
*ct = CountryCodeLY
|
||||||
|
case CountryCodeMA.String():
|
||||||
|
*ct = CountryCodeMA
|
||||||
|
case CountryCodeMC.String():
|
||||||
|
*ct = CountryCodeMC
|
||||||
|
case CountryCodeMD.String():
|
||||||
|
*ct = CountryCodeMD
|
||||||
|
case CountryCodeME.String():
|
||||||
|
*ct = CountryCodeME
|
||||||
|
case CountryCodeMF.String():
|
||||||
|
*ct = CountryCodeMF
|
||||||
|
case CountryCodeMG.String():
|
||||||
|
*ct = CountryCodeMG
|
||||||
|
case CountryCodeMH.String():
|
||||||
|
*ct = CountryCodeMH
|
||||||
|
case CountryCodeMK.String():
|
||||||
|
*ct = CountryCodeMK
|
||||||
|
case CountryCodeML.String():
|
||||||
|
*ct = CountryCodeML
|
||||||
|
case CountryCodeMM.String():
|
||||||
|
*ct = CountryCodeMM
|
||||||
|
case CountryCodeMN.String():
|
||||||
|
*ct = CountryCodeMN
|
||||||
|
case CountryCodeMO.String():
|
||||||
|
*ct = CountryCodeMO
|
||||||
|
case CountryCodeMP.String():
|
||||||
|
*ct = CountryCodeMP
|
||||||
|
case CountryCodeMQ.String():
|
||||||
|
*ct = CountryCodeMQ
|
||||||
|
case CountryCodeMR.String():
|
||||||
|
*ct = CountryCodeMR
|
||||||
|
case CountryCodeMS.String():
|
||||||
|
*ct = CountryCodeMS
|
||||||
|
case CountryCodeMT.String():
|
||||||
|
*ct = CountryCodeMT
|
||||||
|
case CountryCodeMU.String():
|
||||||
|
*ct = CountryCodeMU
|
||||||
|
case CountryCodeMV.String():
|
||||||
|
*ct = CountryCodeMV
|
||||||
|
case CountryCodeMW.String():
|
||||||
|
*ct = CountryCodeMW
|
||||||
|
case CountryCodeMX.String():
|
||||||
|
*ct = CountryCodeMX
|
||||||
|
case CountryCodeMY.String():
|
||||||
|
*ct = CountryCodeMY
|
||||||
|
case CountryCodeMZ.String():
|
||||||
|
*ct = CountryCodeMZ
|
||||||
|
case CountryCodeNA.String():
|
||||||
|
*ct = CountryCodeNA
|
||||||
|
case CountryCodeNC.String():
|
||||||
|
*ct = CountryCodeNC
|
||||||
|
case CountryCodeNE.String():
|
||||||
|
*ct = CountryCodeNE
|
||||||
|
case CountryCodeNF.String():
|
||||||
|
*ct = CountryCodeNF
|
||||||
|
case CountryCodeNG.String():
|
||||||
|
*ct = CountryCodeNG
|
||||||
|
case CountryCodeNI.String():
|
||||||
|
*ct = CountryCodeNI
|
||||||
|
case CountryCodeNL.String():
|
||||||
|
*ct = CountryCodeNL
|
||||||
|
case CountryCodeNO.String():
|
||||||
|
*ct = CountryCodeNO
|
||||||
|
case CountryCodeNP.String():
|
||||||
|
*ct = CountryCodeNP
|
||||||
|
case CountryCodeNR.String():
|
||||||
|
*ct = CountryCodeNR
|
||||||
|
case CountryCodeNU.String():
|
||||||
|
*ct = CountryCodeNU
|
||||||
|
case CountryCodeNZ.String():
|
||||||
|
*ct = CountryCodeNZ
|
||||||
|
case CountryCodeOM.String():
|
||||||
|
*ct = CountryCodeOM
|
||||||
|
case CountryCodePA.String():
|
||||||
|
*ct = CountryCodePA
|
||||||
|
case CountryCodePE.String():
|
||||||
|
*ct = CountryCodePE
|
||||||
|
case CountryCodePF.String():
|
||||||
|
*ct = CountryCodePF
|
||||||
|
case CountryCodePG.String():
|
||||||
|
*ct = CountryCodePG
|
||||||
|
case CountryCodePH.String():
|
||||||
|
*ct = CountryCodePH
|
||||||
|
case CountryCodePK.String():
|
||||||
|
*ct = CountryCodePK
|
||||||
|
case CountryCodePL.String():
|
||||||
|
*ct = CountryCodePL
|
||||||
|
case CountryCodePM.String():
|
||||||
|
*ct = CountryCodePM
|
||||||
|
case CountryCodePN.String():
|
||||||
|
*ct = CountryCodePN
|
||||||
|
case CountryCodePR.String():
|
||||||
|
*ct = CountryCodePR
|
||||||
|
case CountryCodePS.String():
|
||||||
|
*ct = CountryCodePS
|
||||||
|
case CountryCodePT.String():
|
||||||
|
*ct = CountryCodePT
|
||||||
|
case CountryCodePW.String():
|
||||||
|
*ct = CountryCodePW
|
||||||
|
case CountryCodePY.String():
|
||||||
|
*ct = CountryCodePY
|
||||||
|
case CountryCodeQA.String():
|
||||||
|
*ct = CountryCodeQA
|
||||||
|
case CountryCodeRE.String():
|
||||||
|
*ct = CountryCodeRE
|
||||||
|
case CountryCodeRO.String():
|
||||||
|
*ct = CountryCodeRO
|
||||||
|
case CountryCodeRS.String():
|
||||||
|
*ct = CountryCodeRS
|
||||||
|
case CountryCodeRU.String():
|
||||||
|
*ct = CountryCodeRU
|
||||||
|
case CountryCodeRW.String():
|
||||||
|
*ct = CountryCodeRW
|
||||||
|
case CountryCodeSA.String():
|
||||||
|
*ct = CountryCodeSA
|
||||||
|
case CountryCodeSB.String():
|
||||||
|
*ct = CountryCodeSB
|
||||||
|
case CountryCodeSC.String():
|
||||||
|
*ct = CountryCodeSC
|
||||||
|
case CountryCodeSD.String():
|
||||||
|
*ct = CountryCodeSD
|
||||||
|
case CountryCodeSE.String():
|
||||||
|
*ct = CountryCodeSE
|
||||||
|
case CountryCodeSG.String():
|
||||||
|
*ct = CountryCodeSG
|
||||||
|
case CountryCodeSH.String():
|
||||||
|
*ct = CountryCodeSH
|
||||||
|
case CountryCodeSI.String():
|
||||||
|
*ct = CountryCodeSI
|
||||||
|
case CountryCodeSJ.String():
|
||||||
|
*ct = CountryCodeSJ
|
||||||
|
case CountryCodeSK.String():
|
||||||
|
*ct = CountryCodeSK
|
||||||
|
case CountryCodeSL.String():
|
||||||
|
*ct = CountryCodeSL
|
||||||
|
case CountryCodeSM.String():
|
||||||
|
*ct = CountryCodeSM
|
||||||
|
case CountryCodeSN.String():
|
||||||
|
*ct = CountryCodeSN
|
||||||
|
case CountryCodeSO.String():
|
||||||
|
*ct = CountryCodeSO
|
||||||
|
case CountryCodeSR.String():
|
||||||
|
*ct = CountryCodeSR
|
||||||
|
case CountryCodeSS.String():
|
||||||
|
*ct = CountryCodeSS
|
||||||
|
case CountryCodeST.String():
|
||||||
|
*ct = CountryCodeST
|
||||||
|
case CountryCodeSV.String():
|
||||||
|
*ct = CountryCodeSV
|
||||||
|
case CountryCodeSY.String():
|
||||||
|
*ct = CountryCodeSY
|
||||||
|
case CountryCodeSZ.String():
|
||||||
|
*ct = CountryCodeSZ
|
||||||
|
case CountryCodeTC.String():
|
||||||
|
*ct = CountryCodeTC
|
||||||
|
case CountryCodeTD.String():
|
||||||
|
*ct = CountryCodeTD
|
||||||
|
case CountryCodeTF.String():
|
||||||
|
*ct = CountryCodeTF
|
||||||
|
case CountryCodeTG.String():
|
||||||
|
*ct = CountryCodeTG
|
||||||
|
case CountryCodeTH.String():
|
||||||
|
*ct = CountryCodeTH
|
||||||
|
case CountryCodeTJ.String():
|
||||||
|
*ct = CountryCodeTJ
|
||||||
|
case CountryCodeTK.String():
|
||||||
|
*ct = CountryCodeTK
|
||||||
|
case CountryCodeTL.String():
|
||||||
|
*ct = CountryCodeTL
|
||||||
|
case CountryCodeTM.String():
|
||||||
|
*ct = CountryCodeTM
|
||||||
|
case CountryCodeTN.String():
|
||||||
|
*ct = CountryCodeTN
|
||||||
|
case CountryCodeTO.String():
|
||||||
|
*ct = CountryCodeTO
|
||||||
|
case CountryCodeTR.String():
|
||||||
|
*ct = CountryCodeTR
|
||||||
|
case CountryCodeTT.String():
|
||||||
|
*ct = CountryCodeTT
|
||||||
|
case CountryCodeTV.String():
|
||||||
|
*ct = CountryCodeTV
|
||||||
|
case CountryCodeTW.String():
|
||||||
|
*ct = CountryCodeTW
|
||||||
|
case CountryCodeTZ.String():
|
||||||
|
*ct = CountryCodeTZ
|
||||||
|
case CountryCodeUA.String():
|
||||||
|
*ct = CountryCodeUA
|
||||||
|
case CountryCodeUG.String():
|
||||||
|
*ct = CountryCodeUG
|
||||||
|
case CountryCodeUM.String():
|
||||||
|
*ct = CountryCodeUM
|
||||||
|
case CountryCodeUS.String():
|
||||||
|
*ct = CountryCodeUS
|
||||||
|
case CountryCodeUY.String():
|
||||||
|
*ct = CountryCodeUY
|
||||||
|
case CountryCodeUZ.String():
|
||||||
|
*ct = CountryCodeUZ
|
||||||
|
case CountryCodeVA.String():
|
||||||
|
*ct = CountryCodeVA
|
||||||
|
case CountryCodeVC.String():
|
||||||
|
*ct = CountryCodeVC
|
||||||
|
case CountryCodeVE.String():
|
||||||
|
*ct = CountryCodeVE
|
||||||
|
case CountryCodeVG.String():
|
||||||
|
*ct = CountryCodeVG
|
||||||
|
case CountryCodeVI.String():
|
||||||
|
*ct = CountryCodeVI
|
||||||
|
case CountryCodeVN.String():
|
||||||
|
*ct = CountryCodeVN
|
||||||
|
case CountryCodeVU.String():
|
||||||
|
*ct = CountryCodeVU
|
||||||
|
case CountryCodeWF.String():
|
||||||
|
*ct = CountryCodeWF
|
||||||
|
case CountryCodeWS.String():
|
||||||
|
*ct = CountryCodeWS
|
||||||
|
case CountryCodeYE.String():
|
||||||
|
*ct = CountryCodeYE
|
||||||
|
case CountryCodeYT.String():
|
||||||
|
*ct = CountryCodeYT
|
||||||
|
case CountryCodeZA.String():
|
||||||
|
*ct = CountryCodeZA
|
||||||
|
case CountryCodeZM.String():
|
||||||
|
*ct = CountryCodeZM
|
||||||
|
case CountryCodeZW.String():
|
||||||
|
*ct = CountryCodeZW
|
||||||
|
default:
|
||||||
|
return fmt.Errorf("invalid CountryCode value: %q", s)
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (st CountryCode) Value() (driver.Value, error) {
|
||||||
|
return st.String(), nil
|
||||||
|
}
|
||||||
|
|
||||||
|
type CountryCodes []CountryCode
|
||||||
|
|
||||||
|
func (s *CountryCodes) Scan(value any) error {
|
||||||
|
switch v := value.(type) {
|
||||||
|
case string:
|
||||||
|
return s.scanFromString(v)
|
||||||
|
case []byte:
|
||||||
|
return s.scanFromString(string(v))
|
||||||
|
default:
|
||||||
|
return fmt.Errorf("unsupported type for CountryCodes: %T", value)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (s *CountryCodes) scanFromString(str string) error {
|
||||||
|
str = strings.TrimSpace(str)
|
||||||
|
if str == "{}" || str == "" {
|
||||||
|
*s = []CountryCode{}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
if strings.HasPrefix(str, "{") && strings.HasSuffix(str, "}") {
|
||||||
|
str = str[1 : len(str)-1]
|
||||||
|
}
|
||||||
|
|
||||||
|
parts := strings.Split(str, ",")
|
||||||
|
result := make([]CountryCode, len(parts))
|
||||||
|
|
||||||
|
for i, part := range parts {
|
||||||
|
part = strings.TrimSpace(part)
|
||||||
|
|
||||||
|
if strings.HasPrefix(part, `"`) && strings.HasSuffix(part, `"`) {
|
||||||
|
part = part[1 : len(part)-1]
|
||||||
|
}
|
||||||
|
|
||||||
|
var ct CountryCode
|
||||||
|
if err := ct.Scan(part); err != nil {
|
||||||
|
return fmt.Errorf("invalid country code in array: %s", part)
|
||||||
|
}
|
||||||
|
result[i] = ct
|
||||||
|
}
|
||||||
|
|
||||||
|
*s = result
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (s CountryCodes) Value() (driver.Value, error) {
|
||||||
|
if len(s) == 0 {
|
||||||
|
return "{}", nil
|
||||||
|
}
|
||||||
|
|
||||||
|
values := make([]string, len(s))
|
||||||
|
for i, ct := range s {
|
||||||
|
values[i] = ct.String()
|
||||||
|
}
|
||||||
|
|
||||||
|
return "{" + strings.Join(values, ",") + "}", nil
|
||||||
|
}
|
||||||
31
pkg/coredata/migrations/20250912T131913Z.sql
Normal file
31
pkg/coredata/migrations/20250912T131913Z.sql
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
-- ISO 3166-1 alpha-2 country codes
|
||||||
|
CREATE TYPE country_code AS ENUM (
|
||||||
|
'AD','AE','AF','AG','AI','AL','AM','AO','AQ','AR',
|
||||||
|
'AS','AT','AU','AW','AX','AZ','BA','BB','BD','BE',
|
||||||
|
'BF','BG','BH','BI','BJ','BL','BM','BN','BO','BQ',
|
||||||
|
'BR','BS','BT','BV','BW','BY','BZ','CA','CC','CD',
|
||||||
|
'CF','CG','CH','CI','CK','CL','CM','CN','CO','CR',
|
||||||
|
'CU','CV','CW','CX','CY','CZ','DE','DJ','DK','DM',
|
||||||
|
'DO','DZ','EC','EE','EG','EH','ER','ES','ET','FI',
|
||||||
|
'FJ','FK','FM','FO','FR','GA','GB','GD','GE','GF',
|
||||||
|
'GG','GH','GI','GL','GM','GN','GP','GQ','GR','GT',
|
||||||
|
'GU','GW','GY','HK','HM','HN','HR','HT','HU','ID',
|
||||||
|
'IE','IL','IM','IN','IO','IQ','IR','IS','IT','JE',
|
||||||
|
'JM','JO','JP','KE','KG','KH','KI','KM','KN','KP',
|
||||||
|
'KR','KW','KY','KZ','LA','LB','LC','LI','LK','LR',
|
||||||
|
'LS','LT','LU','LV','LY','MA','MC','MD','ME','MF',
|
||||||
|
'MG','MH','MK','ML','MM','MN','MO','MP','MQ','MR',
|
||||||
|
'MS','MT','MU','MV','MW','MX','MY','MZ','NA','NC',
|
||||||
|
'NE','NF','NG','NI','NL','NO','NP','NR','NU','NZ',
|
||||||
|
'OM','PA','PE','PF','PG','PH','PK','PL','PM','PN',
|
||||||
|
'PR','PS','PT','PW','PY','QA','RE','RO','RS','RU',
|
||||||
|
'RW','SA','SB','SC','SD','SE','SG','SH','SI','SJ',
|
||||||
|
'SK','SL','SM','SN','SO','SR','SS','ST','SV','SX',
|
||||||
|
'SY','SZ','TC','TD','TF','TG','TH','TJ','TK','TL',
|
||||||
|
'TM','TN','TO','TR','TT','TV','TW','TZ','UA','UG',
|
||||||
|
'UM','US','UY','UZ','VA','VC','VE','VG','VI','VN',
|
||||||
|
'VU','WF','WS','YE','YT','ZA','ZM','ZW'
|
||||||
|
);
|
||||||
|
|
||||||
|
ALTER TABLE vendors ADD COLUMN countries country_code[] NOT NULL DEFAULT '{}';
|
||||||
|
ALTER TABLE vendors ALTER COLUMN countries DROP DEFAULT;
|
||||||
@@ -43,6 +43,7 @@ type (
|
|||||||
BusinessAssociateAgreementURL *string `db:"business_associate_agreement_url"`
|
BusinessAssociateAgreementURL *string `db:"business_associate_agreement_url"`
|
||||||
SubprocessorsListURL *string `db:"subprocessors_list_url"`
|
SubprocessorsListURL *string `db:"subprocessors_list_url"`
|
||||||
Certifications []string `db:"certifications"`
|
Certifications []string `db:"certifications"`
|
||||||
|
Countries CountryCodes `db:"countries"`
|
||||||
BusinessOwnerID *gid.GID `db:"business_owner_id"`
|
BusinessOwnerID *gid.GID `db:"business_owner_id"`
|
||||||
SecurityOwnerID *gid.GID `db:"security_owner_id"`
|
SecurityOwnerID *gid.GID `db:"security_owner_id"`
|
||||||
StatusPageURL *string `db:"status_page_url"`
|
StatusPageURL *string `db:"status_page_url"`
|
||||||
@@ -99,6 +100,7 @@ SELECT
|
|||||||
business_associate_agreement_url,
|
business_associate_agreement_url,
|
||||||
subprocessors_list_url,
|
subprocessors_list_url,
|
||||||
certifications,
|
certifications,
|
||||||
|
countries,
|
||||||
business_owner_id,
|
business_owner_id,
|
||||||
security_owner_id,
|
security_owner_id,
|
||||||
status_page_url,
|
status_page_url,
|
||||||
@@ -162,6 +164,7 @@ INSERT INTO
|
|||||||
business_associate_agreement_url,
|
business_associate_agreement_url,
|
||||||
subprocessors_list_url,
|
subprocessors_list_url,
|
||||||
certifications,
|
certifications,
|
||||||
|
countries,
|
||||||
business_owner_id,
|
business_owner_id,
|
||||||
security_owner_id,
|
security_owner_id,
|
||||||
status_page_url,
|
status_page_url,
|
||||||
@@ -190,6 +193,7 @@ VALUES (
|
|||||||
@business_associate_agreement_url,
|
@business_associate_agreement_url,
|
||||||
@subprocessors_list_url,
|
@subprocessors_list_url,
|
||||||
@certifications,
|
@certifications,
|
||||||
|
@countries,
|
||||||
@business_owner_id,
|
@business_owner_id,
|
||||||
@security_owner_id,
|
@security_owner_id,
|
||||||
@status_page_url,
|
@status_page_url,
|
||||||
@@ -220,6 +224,7 @@ VALUES (
|
|||||||
"business_associate_agreement_url": v.BusinessAssociateAgreementURL,
|
"business_associate_agreement_url": v.BusinessAssociateAgreementURL,
|
||||||
"subprocessors_list_url": v.SubprocessorsListURL,
|
"subprocessors_list_url": v.SubprocessorsListURL,
|
||||||
"certifications": v.Certifications,
|
"certifications": v.Certifications,
|
||||||
|
"countries": v.Countries,
|
||||||
"business_owner_id": v.BusinessOwnerID,
|
"business_owner_id": v.BusinessOwnerID,
|
||||||
"security_owner_id": v.SecurityOwnerID,
|
"security_owner_id": v.SecurityOwnerID,
|
||||||
"status_page_url": v.StatusPageURL,
|
"status_page_url": v.StatusPageURL,
|
||||||
@@ -311,6 +316,7 @@ SELECT
|
|||||||
business_associate_agreement_url,
|
business_associate_agreement_url,
|
||||||
subprocessors_list_url,
|
subprocessors_list_url,
|
||||||
certifications,
|
certifications,
|
||||||
|
countries,
|
||||||
business_owner_id,
|
business_owner_id,
|
||||||
security_owner_id,
|
security_owner_id,
|
||||||
status_page_url,
|
status_page_url,
|
||||||
@@ -372,6 +378,7 @@ SET
|
|||||||
business_associate_agreement_url = @business_associate_agreement_url,
|
business_associate_agreement_url = @business_associate_agreement_url,
|
||||||
subprocessors_list_url = @subprocessors_list_url,
|
subprocessors_list_url = @subprocessors_list_url,
|
||||||
certifications = @certifications,
|
certifications = @certifications,
|
||||||
|
countries = @countries,
|
||||||
status_page_url = @status_page_url,
|
status_page_url = @status_page_url,
|
||||||
terms_of_service_url = @terms_of_service_url,
|
terms_of_service_url = @terms_of_service_url,
|
||||||
security_page_url = @security_page_url,
|
security_page_url = @security_page_url,
|
||||||
@@ -400,6 +407,7 @@ WHERE %s
|
|||||||
"business_associate_agreement_url": v.BusinessAssociateAgreementURL,
|
"business_associate_agreement_url": v.BusinessAssociateAgreementURL,
|
||||||
"subprocessors_list_url": v.SubprocessorsListURL,
|
"subprocessors_list_url": v.SubprocessorsListURL,
|
||||||
"certifications": v.Certifications,
|
"certifications": v.Certifications,
|
||||||
|
"countries": v.Countries,
|
||||||
"status_page_url": v.StatusPageURL,
|
"status_page_url": v.StatusPageURL,
|
||||||
"terms_of_service_url": v.TermsOfServiceURL,
|
"terms_of_service_url": v.TermsOfServiceURL,
|
||||||
"security_page_url": v.SecurityPageURL,
|
"security_page_url": v.SecurityPageURL,
|
||||||
@@ -513,6 +521,7 @@ WITH vend AS (
|
|||||||
v.business_associate_agreement_url,
|
v.business_associate_agreement_url,
|
||||||
v.subprocessors_list_url,
|
v.subprocessors_list_url,
|
||||||
v.certifications,
|
v.certifications,
|
||||||
|
v.countries,
|
||||||
v.business_owner_id,
|
v.business_owner_id,
|
||||||
v.security_owner_id,
|
v.security_owner_id,
|
||||||
v.status_page_url,
|
v.status_page_url,
|
||||||
@@ -547,6 +556,7 @@ SELECT
|
|||||||
business_associate_agreement_url,
|
business_associate_agreement_url,
|
||||||
subprocessors_list_url,
|
subprocessors_list_url,
|
||||||
certifications,
|
certifications,
|
||||||
|
countries,
|
||||||
business_owner_id,
|
business_owner_id,
|
||||||
security_owner_id,
|
security_owner_id,
|
||||||
status_page_url,
|
status_page_url,
|
||||||
@@ -648,6 +658,7 @@ WITH vend AS (
|
|||||||
v.business_associate_agreement_url,
|
v.business_associate_agreement_url,
|
||||||
v.subprocessors_list_url,
|
v.subprocessors_list_url,
|
||||||
v.certifications,
|
v.certifications,
|
||||||
|
v.countries,
|
||||||
v.business_owner_id,
|
v.business_owner_id,
|
||||||
v.security_owner_id,
|
v.security_owner_id,
|
||||||
v.status_page_url,
|
v.status_page_url,
|
||||||
@@ -682,6 +693,7 @@ SELECT
|
|||||||
business_associate_agreement_url,
|
business_associate_agreement_url,
|
||||||
subprocessors_list_url,
|
subprocessors_list_url,
|
||||||
certifications,
|
certifications,
|
||||||
|
countries,
|
||||||
business_owner_id,
|
business_owner_id,
|
||||||
security_owner_id,
|
security_owner_id,
|
||||||
status_page_url,
|
status_page_url,
|
||||||
@@ -761,6 +773,7 @@ INSERT INTO vendors (
|
|||||||
business_associate_agreement_url,
|
business_associate_agreement_url,
|
||||||
subprocessors_list_url,
|
subprocessors_list_url,
|
||||||
certifications,
|
certifications,
|
||||||
|
countries,
|
||||||
business_owner_id,
|
business_owner_id,
|
||||||
security_owner_id,
|
security_owner_id,
|
||||||
status_page_url,
|
status_page_url,
|
||||||
@@ -789,6 +802,7 @@ SELECT
|
|||||||
v.business_associate_agreement_url,
|
v.business_associate_agreement_url,
|
||||||
v.subprocessors_list_url,
|
v.subprocessors_list_url,
|
||||||
v.certifications,
|
v.certifications,
|
||||||
|
v.countries,
|
||||||
v.business_owner_id,
|
v.business_owner_id,
|
||||||
v.security_owner_id,
|
v.security_owner_id,
|
||||||
v.status_page_url,
|
v.status_page_url,
|
||||||
@@ -861,6 +875,7 @@ INSERT INTO vendors (
|
|||||||
business_associate_agreement_url,
|
business_associate_agreement_url,
|
||||||
subprocessors_list_url,
|
subprocessors_list_url,
|
||||||
certifications,
|
certifications,
|
||||||
|
countries,
|
||||||
business_owner_id,
|
business_owner_id,
|
||||||
security_owner_id,
|
security_owner_id,
|
||||||
status_page_url,
|
status_page_url,
|
||||||
@@ -889,6 +904,7 @@ SELECT
|
|||||||
v.business_associate_agreement_url,
|
v.business_associate_agreement_url,
|
||||||
v.subprocessors_list_url,
|
v.subprocessors_list_url,
|
||||||
v.certifications,
|
v.certifications,
|
||||||
|
v.countries,
|
||||||
v.business_owner_id,
|
v.business_owner_id,
|
||||||
v.security_owner_id,
|
v.security_owner_id,
|
||||||
v.status_page_url,
|
v.status_page_url,
|
||||||
@@ -963,6 +979,7 @@ INSERT INTO vendors (
|
|||||||
business_associate_agreement_url,
|
business_associate_agreement_url,
|
||||||
subprocessors_list_url,
|
subprocessors_list_url,
|
||||||
certifications,
|
certifications,
|
||||||
|
countries,
|
||||||
business_owner_id,
|
business_owner_id,
|
||||||
security_owner_id,
|
security_owner_id,
|
||||||
status_page_url,
|
status_page_url,
|
||||||
@@ -991,6 +1008,7 @@ SELECT
|
|||||||
v.business_associate_agreement_url,
|
v.business_associate_agreement_url,
|
||||||
v.subprocessors_list_url,
|
v.subprocessors_list_url,
|
||||||
v.certifications,
|
v.certifications,
|
||||||
|
v.countries,
|
||||||
v.business_owner_id,
|
v.business_owner_id,
|
||||||
v.security_owner_id,
|
v.security_owner_id,
|
||||||
v.status_page_url,
|
v.status_page_url,
|
||||||
|
|||||||
@@ -44,6 +44,7 @@ type (
|
|||||||
BusinessAssociateAgreementURL *string
|
BusinessAssociateAgreementURL *string
|
||||||
SubprocessorsListURL *string
|
SubprocessorsListURL *string
|
||||||
Certifications []string
|
Certifications []string
|
||||||
|
Countries coredata.CountryCodes
|
||||||
SecurityPageURL *string
|
SecurityPageURL *string
|
||||||
TrustPageURL *string
|
TrustPageURL *string
|
||||||
TermsOfServiceURL *string
|
TermsOfServiceURL *string
|
||||||
@@ -67,6 +68,7 @@ type (
|
|||||||
BusinessAssociateAgreementURL *string
|
BusinessAssociateAgreementURL *string
|
||||||
SubprocessorsListURL *string
|
SubprocessorsListURL *string
|
||||||
Certifications []string
|
Certifications []string
|
||||||
|
Countries coredata.CountryCodes
|
||||||
SecurityPageURL *string
|
SecurityPageURL *string
|
||||||
TrustPageURL *string
|
TrustPageURL *string
|
||||||
StatusPageURL *string
|
StatusPageURL *string
|
||||||
@@ -290,6 +292,10 @@ func (s VendorService) Update(
|
|||||||
vendor.Certifications = req.Certifications
|
vendor.Certifications = req.Certifications
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if req.Countries != nil {
|
||||||
|
vendor.Countries = req.Countries
|
||||||
|
}
|
||||||
|
|
||||||
if req.StatusPageURL != nil {
|
if req.StatusPageURL != nil {
|
||||||
vendor.StatusPageURL = req.StatusPageURL
|
vendor.StatusPageURL = req.StatusPageURL
|
||||||
}
|
}
|
||||||
@@ -396,6 +402,7 @@ func (s VendorService) Create(
|
|||||||
BusinessAssociateAgreementURL: req.BusinessAssociateAgreementURL,
|
BusinessAssociateAgreementURL: req.BusinessAssociateAgreementURL,
|
||||||
SubprocessorsListURL: req.SubprocessorsListURL,
|
SubprocessorsListURL: req.SubprocessorsListURL,
|
||||||
Certifications: req.Certifications,
|
Certifications: req.Certifications,
|
||||||
|
Countries: req.Countries,
|
||||||
SecurityPageURL: req.SecurityPageURL,
|
SecurityPageURL: req.SecurityPageURL,
|
||||||
TrustPageURL: req.TrustPageURL,
|
TrustPageURL: req.TrustPageURL,
|
||||||
StatusPageURL: req.StatusPageURL,
|
StatusPageURL: req.StatusPageURL,
|
||||||
|
|||||||
@@ -563,6 +563,258 @@ enum DocumentVersionOrderField
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
enum CountryCode
|
||||||
|
@goModel(model: "github.com/getprobo/probo/pkg/coredata.CountryCode") {
|
||||||
|
AD @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeAD")
|
||||||
|
AE @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeAE")
|
||||||
|
AF @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeAF")
|
||||||
|
AG @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeAG")
|
||||||
|
AI @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeAI")
|
||||||
|
AL @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeAL")
|
||||||
|
AM @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeAM")
|
||||||
|
AO @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeAO")
|
||||||
|
AQ @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeAQ")
|
||||||
|
AR @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeAR")
|
||||||
|
AS @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeAS")
|
||||||
|
AT @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeAT")
|
||||||
|
AU @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeAU")
|
||||||
|
AW @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeAW")
|
||||||
|
AX @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeAX")
|
||||||
|
AZ @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeAZ")
|
||||||
|
BA @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeBA")
|
||||||
|
BB @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeBB")
|
||||||
|
BD @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeBD")
|
||||||
|
BE @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeBE")
|
||||||
|
BF @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeBF")
|
||||||
|
BG @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeBG")
|
||||||
|
BH @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeBH")
|
||||||
|
BI @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeBI")
|
||||||
|
BJ @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeBJ")
|
||||||
|
BL @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeBL")
|
||||||
|
BM @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeBM")
|
||||||
|
BN @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeBN")
|
||||||
|
BO @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeBO")
|
||||||
|
BQ @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeBQ")
|
||||||
|
BR @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeBR")
|
||||||
|
BS @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeBS")
|
||||||
|
BT @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeBT")
|
||||||
|
BV @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeBV")
|
||||||
|
BW @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeBW")
|
||||||
|
BY @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeBY")
|
||||||
|
BZ @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeBZ")
|
||||||
|
CA @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeCA")
|
||||||
|
CC @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeCC")
|
||||||
|
CD @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeCD")
|
||||||
|
CF @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeCF")
|
||||||
|
CG @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeCG")
|
||||||
|
CH @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeCH")
|
||||||
|
CI @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeCI")
|
||||||
|
CK @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeCK")
|
||||||
|
CL @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeCL")
|
||||||
|
CM @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeCM")
|
||||||
|
CN @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeCN")
|
||||||
|
CO @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeCO")
|
||||||
|
CR @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeCR")
|
||||||
|
CU @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeCU")
|
||||||
|
CV @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeCV")
|
||||||
|
CW @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeCW")
|
||||||
|
CX @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeCX")
|
||||||
|
CY @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeCY")
|
||||||
|
CZ @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeCZ")
|
||||||
|
DE @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeDE")
|
||||||
|
DJ @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeDJ")
|
||||||
|
DK @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeDK")
|
||||||
|
DM @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeDM")
|
||||||
|
DO @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeDO")
|
||||||
|
DZ @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeDZ")
|
||||||
|
EC @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeEC")
|
||||||
|
EE @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeEE")
|
||||||
|
EG @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeEG")
|
||||||
|
EH @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeEH")
|
||||||
|
ER @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeER")
|
||||||
|
ES @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeES")
|
||||||
|
ET @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeET")
|
||||||
|
FI @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeFI")
|
||||||
|
FJ @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeFJ")
|
||||||
|
FK @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeFK")
|
||||||
|
FM @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeFM")
|
||||||
|
FO @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeFO")
|
||||||
|
FR @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeFR")
|
||||||
|
GA @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeGA")
|
||||||
|
GB @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeGB")
|
||||||
|
GD @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeGD")
|
||||||
|
GE @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeGE")
|
||||||
|
GF @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeGF")
|
||||||
|
GG @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeGG")
|
||||||
|
GH @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeGH")
|
||||||
|
GI @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeGI")
|
||||||
|
GL @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeGL")
|
||||||
|
GM @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeGM")
|
||||||
|
GN @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeGN")
|
||||||
|
GP @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeGP")
|
||||||
|
GQ @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeGQ")
|
||||||
|
GR @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeGR")
|
||||||
|
GT @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeGT")
|
||||||
|
GU @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeGU")
|
||||||
|
GW @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeGW")
|
||||||
|
GY @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeGY")
|
||||||
|
HK @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeHK")
|
||||||
|
HM @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeHM")
|
||||||
|
HN @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeHN")
|
||||||
|
HR @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeHR")
|
||||||
|
HT @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeHT")
|
||||||
|
HU @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeHU")
|
||||||
|
ID @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeID")
|
||||||
|
IE @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeIE")
|
||||||
|
IL @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeIL")
|
||||||
|
IM @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeIM")
|
||||||
|
IN @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeIN")
|
||||||
|
IO @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeIO")
|
||||||
|
IQ @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeIQ")
|
||||||
|
IR @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeIR")
|
||||||
|
IS @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeIS")
|
||||||
|
IT @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeIT")
|
||||||
|
JE @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeJE")
|
||||||
|
JM @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeJM")
|
||||||
|
JO @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeJO")
|
||||||
|
JP @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeJP")
|
||||||
|
KE @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeKE")
|
||||||
|
KG @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeKG")
|
||||||
|
KH @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeKH")
|
||||||
|
KI @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeKI")
|
||||||
|
KM @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeKM")
|
||||||
|
KN @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeKN")
|
||||||
|
KP @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeKP")
|
||||||
|
KR @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeKR")
|
||||||
|
KW @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeKW")
|
||||||
|
KY @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeKY")
|
||||||
|
KZ @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeKZ")
|
||||||
|
LA @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeLA")
|
||||||
|
LB @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeLB")
|
||||||
|
LC @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeLC")
|
||||||
|
LI @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeLI")
|
||||||
|
LK @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeLK")
|
||||||
|
LR @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeLR")
|
||||||
|
LS @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeLS")
|
||||||
|
LT @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeLT")
|
||||||
|
LU @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeLU")
|
||||||
|
LV @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeLV")
|
||||||
|
LY @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeLY")
|
||||||
|
MA @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeMA")
|
||||||
|
MC @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeMC")
|
||||||
|
MD @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeMD")
|
||||||
|
ME @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeME")
|
||||||
|
MF @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeMF")
|
||||||
|
MG @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeMG")
|
||||||
|
MH @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeMH")
|
||||||
|
MK @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeMK")
|
||||||
|
ML @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeML")
|
||||||
|
MM @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeMM")
|
||||||
|
MN @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeMN")
|
||||||
|
MO @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeMO")
|
||||||
|
MP @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeMP")
|
||||||
|
MQ @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeMQ")
|
||||||
|
MR @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeMR")
|
||||||
|
MS @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeMS")
|
||||||
|
MT @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeMT")
|
||||||
|
MU @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeMU")
|
||||||
|
MV @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeMV")
|
||||||
|
MW @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeMW")
|
||||||
|
MX @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeMX")
|
||||||
|
MY @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeMY")
|
||||||
|
MZ @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeMZ")
|
||||||
|
NA @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeNA")
|
||||||
|
NC @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeNC")
|
||||||
|
NE @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeNE")
|
||||||
|
NF @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeNF")
|
||||||
|
NG @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeNG")
|
||||||
|
NI @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeNI")
|
||||||
|
NL @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeNL")
|
||||||
|
NO @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeNO")
|
||||||
|
NP @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeNP")
|
||||||
|
NR @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeNR")
|
||||||
|
NU @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeNU")
|
||||||
|
NZ @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeNZ")
|
||||||
|
OM @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeOM")
|
||||||
|
PA @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodePA")
|
||||||
|
PE @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodePE")
|
||||||
|
PF @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodePF")
|
||||||
|
PG @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodePG")
|
||||||
|
PH @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodePH")
|
||||||
|
PK @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodePK")
|
||||||
|
PL @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodePL")
|
||||||
|
PM @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodePM")
|
||||||
|
PN @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodePN")
|
||||||
|
PR @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodePR")
|
||||||
|
PS @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodePS")
|
||||||
|
PT @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodePT")
|
||||||
|
PW @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodePW")
|
||||||
|
PY @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodePY")
|
||||||
|
QA @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeQA")
|
||||||
|
RE @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeRE")
|
||||||
|
RO @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeRO")
|
||||||
|
RS @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeRS")
|
||||||
|
RU @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeRU")
|
||||||
|
RW @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeRW")
|
||||||
|
SA @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeSA")
|
||||||
|
SB @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeSB")
|
||||||
|
SC @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeSC")
|
||||||
|
SD @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeSD")
|
||||||
|
SE @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeSE")
|
||||||
|
SG @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeSG")
|
||||||
|
SH @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeSH")
|
||||||
|
SI @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeSI")
|
||||||
|
SJ @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeSJ")
|
||||||
|
SK @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeSK")
|
||||||
|
SL @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeSL")
|
||||||
|
SM @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeSM")
|
||||||
|
SN @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeSN")
|
||||||
|
SO @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeSO")
|
||||||
|
SR @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeSR")
|
||||||
|
SS @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeSS")
|
||||||
|
ST @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeST")
|
||||||
|
SV @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeSV")
|
||||||
|
SX @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeSX")
|
||||||
|
SY @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeSY")
|
||||||
|
SZ @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeSZ")
|
||||||
|
TC @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeTC")
|
||||||
|
TD @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeTD")
|
||||||
|
TF @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeTF")
|
||||||
|
TG @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeTG")
|
||||||
|
TH @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeTH")
|
||||||
|
TJ @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeTJ")
|
||||||
|
TK @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeTK")
|
||||||
|
TL @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeTL")
|
||||||
|
TM @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeTM")
|
||||||
|
TN @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeTN")
|
||||||
|
TO @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeTO")
|
||||||
|
TR @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeTR")
|
||||||
|
TT @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeTT")
|
||||||
|
TV @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeTV")
|
||||||
|
TW @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeTW")
|
||||||
|
TZ @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeTZ")
|
||||||
|
UA @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeUA")
|
||||||
|
UG @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeUG")
|
||||||
|
UM @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeUM")
|
||||||
|
US @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeUS")
|
||||||
|
UY @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeUY")
|
||||||
|
UZ @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeUZ")
|
||||||
|
VA @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeVA")
|
||||||
|
VC @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeVC")
|
||||||
|
VE @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeVE")
|
||||||
|
VG @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeVG")
|
||||||
|
VI @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeVI")
|
||||||
|
VN @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeVN")
|
||||||
|
VU @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeVU")
|
||||||
|
WF @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeWF")
|
||||||
|
WS @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeWS")
|
||||||
|
YE @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeYE")
|
||||||
|
YT @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeYT")
|
||||||
|
ZA @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeZA")
|
||||||
|
ZM @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeZM")
|
||||||
|
ZW @goEnum(value: "github.com/getprobo/probo/pkg/coredata.CountryCodeZW")
|
||||||
|
}
|
||||||
|
|
||||||
enum VendorCategory
|
enum VendorCategory
|
||||||
@goModel(model: "github.com/getprobo/probo/pkg/coredata.VendorCategory") {
|
@goModel(model: "github.com/getprobo/probo/pkg/coredata.VendorCategory") {
|
||||||
ANALYTICS
|
ANALYTICS
|
||||||
@@ -1412,6 +1664,7 @@ type Vendor implements Node {
|
|||||||
businessAssociateAgreementUrl: String
|
businessAssociateAgreementUrl: String
|
||||||
subprocessorsListUrl: String
|
subprocessorsListUrl: String
|
||||||
certifications: [String!]!
|
certifications: [String!]!
|
||||||
|
countries: [CountryCode!]!
|
||||||
securityPageUrl: String
|
securityPageUrl: String
|
||||||
trustPageUrl: String
|
trustPageUrl: String
|
||||||
headquarterAddress: String
|
headquarterAddress: String
|
||||||
@@ -2555,6 +2808,7 @@ input CreateVendorInput {
|
|||||||
businessAssociateAgreementUrl: String
|
businessAssociateAgreementUrl: String
|
||||||
subprocessorsListUrl: String
|
subprocessorsListUrl: String
|
||||||
certifications: [String!]
|
certifications: [String!]
|
||||||
|
countries: [CountryCode!]
|
||||||
securityPageUrl: String
|
securityPageUrl: String
|
||||||
trustPageUrl: String
|
trustPageUrl: String
|
||||||
statusPageUrl: String
|
statusPageUrl: String
|
||||||
@@ -2579,6 +2833,7 @@ input UpdateVendorInput {
|
|||||||
headquarterAddress: String
|
headquarterAddress: String
|
||||||
category: VendorCategory
|
category: VendorCategory
|
||||||
certifications: [String!]
|
certifications: [String!]
|
||||||
|
countries: [CountryCode!]
|
||||||
securityPageUrl: String
|
securityPageUrl: String
|
||||||
trustPageUrl: String
|
trustPageUrl: String
|
||||||
businessOwnerId: ID
|
businessOwnerId: ID
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -547,6 +547,7 @@ type CreateVendorInput struct {
|
|||||||
BusinessAssociateAgreementURL *string `json:"businessAssociateAgreementUrl,omitempty"`
|
BusinessAssociateAgreementURL *string `json:"businessAssociateAgreementUrl,omitempty"`
|
||||||
SubprocessorsListURL *string `json:"subprocessorsListUrl,omitempty"`
|
SubprocessorsListURL *string `json:"subprocessorsListUrl,omitempty"`
|
||||||
Certifications []string `json:"certifications,omitempty"`
|
Certifications []string `json:"certifications,omitempty"`
|
||||||
|
Countries []coredata.CountryCode `json:"countries,omitempty"`
|
||||||
SecurityPageURL *string `json:"securityPageUrl,omitempty"`
|
SecurityPageURL *string `json:"securityPageUrl,omitempty"`
|
||||||
TrustPageURL *string `json:"trustPageUrl,omitempty"`
|
TrustPageURL *string `json:"trustPageUrl,omitempty"`
|
||||||
StatusPageURL *string `json:"statusPageUrl,omitempty"`
|
StatusPageURL *string `json:"statusPageUrl,omitempty"`
|
||||||
@@ -1792,6 +1793,7 @@ type UpdateVendorInput struct {
|
|||||||
HeadquarterAddress *string `json:"headquarterAddress,omitempty"`
|
HeadquarterAddress *string `json:"headquarterAddress,omitempty"`
|
||||||
Category *coredata.VendorCategory `json:"category,omitempty"`
|
Category *coredata.VendorCategory `json:"category,omitempty"`
|
||||||
Certifications []string `json:"certifications,omitempty"`
|
Certifications []string `json:"certifications,omitempty"`
|
||||||
|
Countries []coredata.CountryCode `json:"countries,omitempty"`
|
||||||
SecurityPageURL *string `json:"securityPageUrl,omitempty"`
|
SecurityPageURL *string `json:"securityPageUrl,omitempty"`
|
||||||
TrustPageURL *string `json:"trustPageUrl,omitempty"`
|
TrustPageURL *string `json:"trustPageUrl,omitempty"`
|
||||||
BusinessOwnerID *gid.GID `json:"businessOwnerId,omitempty"`
|
BusinessOwnerID *gid.GID `json:"businessOwnerId,omitempty"`
|
||||||
@@ -1933,6 +1935,7 @@ type Vendor struct {
|
|||||||
BusinessAssociateAgreementURL *string `json:"businessAssociateAgreementUrl,omitempty"`
|
BusinessAssociateAgreementURL *string `json:"businessAssociateAgreementUrl,omitempty"`
|
||||||
SubprocessorsListURL *string `json:"subprocessorsListUrl,omitempty"`
|
SubprocessorsListURL *string `json:"subprocessorsListUrl,omitempty"`
|
||||||
Certifications []string `json:"certifications"`
|
Certifications []string `json:"certifications"`
|
||||||
|
Countries []coredata.CountryCode `json:"countries"`
|
||||||
SecurityPageURL *string `json:"securityPageUrl,omitempty"`
|
SecurityPageURL *string `json:"securityPageUrl,omitempty"`
|
||||||
TrustPageURL *string `json:"trustPageUrl,omitempty"`
|
TrustPageURL *string `json:"trustPageUrl,omitempty"`
|
||||||
HeadquarterAddress *string `json:"headquarterAddress,omitempty"`
|
HeadquarterAddress *string `json:"headquarterAddress,omitempty"`
|
||||||
|
|||||||
@@ -81,6 +81,7 @@ func NewVendor(v *coredata.Vendor) *Vendor {
|
|||||||
Category: v.Category,
|
Category: v.Category,
|
||||||
ShowOnTrustCenter: v.ShowOnTrustCenter,
|
ShowOnTrustCenter: v.ShowOnTrustCenter,
|
||||||
SnapshotID: v.SnapshotID,
|
SnapshotID: v.SnapshotID,
|
||||||
|
Countries: v.Countries,
|
||||||
UpdatedAt: v.UpdatedAt,
|
UpdatedAt: v.UpdatedAt,
|
||||||
CreatedAt: v.CreatedAt,
|
CreatedAt: v.CreatedAt,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1390,6 +1390,7 @@ func (r *mutationResolver) CreateVendor(ctx context.Context, input types.CreateV
|
|||||||
TrustPageURL: input.TrustPageURL,
|
TrustPageURL: input.TrustPageURL,
|
||||||
BusinessOwnerID: input.BusinessOwnerID,
|
BusinessOwnerID: input.BusinessOwnerID,
|
||||||
SecurityOwnerID: input.SecurityOwnerID,
|
SecurityOwnerID: input.SecurityOwnerID,
|
||||||
|
Countries: input.Countries,
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@@ -1425,6 +1426,7 @@ func (r *mutationResolver) UpdateVendor(ctx context.Context, input types.UpdateV
|
|||||||
BusinessOwnerID: &input.BusinessOwnerID,
|
BusinessOwnerID: &input.BusinessOwnerID,
|
||||||
SecurityOwnerID: &input.SecurityOwnerID,
|
SecurityOwnerID: &input.SecurityOwnerID,
|
||||||
ShowOnTrustCenter: input.ShowOnTrustCenter,
|
ShowOnTrustCenter: input.ShowOnTrustCenter,
|
||||||
|
Countries: input.Countries,
|
||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, fmt.Errorf("cannot update vendor: %w", err)
|
return nil, fmt.Errorf("cannot update vendor: %w", err)
|
||||||
|
|||||||
@@ -182,6 +182,7 @@ type Vendor implements Node {
|
|||||||
category: VendorCategory!
|
category: VendorCategory!
|
||||||
websiteUrl: String
|
websiteUrl: String
|
||||||
privacyPolicyUrl: String
|
privacyPolicyUrl: String
|
||||||
|
countries: [String!]!
|
||||||
}
|
}
|
||||||
|
|
||||||
type VendorConnection {
|
type VendorConnection {
|
||||||
|
|||||||
Reference in New Issue
Block a user