diff --git a/packages/helpers/src/countries.ts b/packages/helpers/src/countries.ts index 08b6a6fb7..e36ea4e3d 100644 --- a/packages/helpers/src/countries.ts +++ b/packages/helpers/src/countries.ts @@ -14,8 +14,9 @@ type Translator = (s: string) => string; -// ISO 3166-1 alpha-2 country codes +// ISO 3166-1 alpha-2 country codes and supported regions. export const countries = [ + "GLOBAL", "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", @@ -46,6 +47,7 @@ export const countries = [ export type CountryCode = typeof countries[number]; const countryNames: Record string> = { + "GLOBAL": (__) => __("Global"), "AD": (__) => __("Andorra"), "AE": (__) => __("United Arab Emirates"), "AF": (__) => __("Afghanistan"), diff --git a/packages/n8n-node/nodes/Probo/actions/thirdParty/create.operation.ts b/packages/n8n-node/nodes/Probo/actions/thirdParty/create.operation.ts index 54dc6b9e7..1b9b6ab22 100644 --- a/packages/n8n-node/nodes/Probo/actions/thirdParty/create.operation.ts +++ b/packages/n8n-node/nodes/Probo/actions/thirdParty/create.operation.ts @@ -169,7 +169,7 @@ export const description: INodeProperties[] = [ name: 'countries', type: 'string', default: '', - description: 'Comma-separated list of country codes', + description: 'Comma-separated list of country or region codes', }, { displayName: 'Data Processing Agreement URL', diff --git a/packages/n8n-node/nodes/Probo/actions/thirdParty/update.operation.ts b/packages/n8n-node/nodes/Probo/actions/thirdParty/update.operation.ts index 9a2372d89..13741a9b1 100644 --- a/packages/n8n-node/nodes/Probo/actions/thirdParty/update.operation.ts +++ b/packages/n8n-node/nodes/Probo/actions/thirdParty/update.operation.ts @@ -181,7 +181,7 @@ export const description: INodeProperties[] = [ name: 'countries', type: 'string', default: '', - description: 'Comma-separated list of country codes', + description: 'Comma-separated list of country or region codes', }, { displayName: 'Data Processing Agreement URL', diff --git a/pkg/coredata/country_code.go b/pkg/coredata/country_code.go index 642706715..82b89cffe 100644 --- a/pkg/coredata/country_code.go +++ b/pkg/coredata/country_code.go @@ -25,6 +25,10 @@ type ( CountryCode string ) +const ( + CountryCodeGlobal CountryCode = "GLOBAL" +) + const ( CountryCodeAD CountryCode = "AD" CountryCodeAE CountryCode = "AE" @@ -286,6 +290,7 @@ var ( func (v CountryCode) IsValid() bool { switch v { case + CountryCodeGlobal, CountryCodeAD, CountryCodeAE, CountryCodeAF, diff --git a/pkg/coredata/migrations/20260528T182700Z.sql b/pkg/coredata/migrations/20260528T182700Z.sql new file mode 100644 index 000000000..d23f38276 --- /dev/null +++ b/pkg/coredata/migrations/20260528T182700Z.sql @@ -0,0 +1,16 @@ +-- Copyright (c) 2026 Probo Inc . +-- +-- 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. + +-- Add the Global region to vendor country selections. +ALTER TYPE country_code ADD VALUE 'GLOBAL' BEFORE 'AD'; diff --git a/pkg/server/api/console/v1/graphql/base.graphql b/pkg/server/api/console/v1/graphql/base.graphql index 767ff0ff0..fdb7fed66 100644 --- a/pkg/server/api/console/v1/graphql/base.graphql +++ b/pkg/server/api/console/v1/graphql/base.graphql @@ -45,6 +45,7 @@ enum OrderDirection enum CountryCode @goModel(model: "go.probo.inc/probo/pkg/coredata.CountryCode") { + GLOBAL @goEnum(value: "go.probo.inc/probo/pkg/coredata.CountryCodeGlobal") AD @goEnum(value: "go.probo.inc/probo/pkg/coredata.CountryCodeAD") AE @goEnum(value: "go.probo.inc/probo/pkg/coredata.CountryCodeAE") AF @goEnum(value: "go.probo.inc/probo/pkg/coredata.CountryCodeAF") diff --git a/pkg/server/api/mcp/v1/specification.yaml b/pkg/server/api/mcp/v1/specification.yaml index c386d2cee..67e8abec2 100644 --- a/pkg/server/api/mcp/v1/specification.yaml +++ b/pkg/server/api/mcp/v1/specification.yaml @@ -218,6 +218,7 @@ components: CountryCode: type: string enum: + - GLOBAL - AD - AE - AF @@ -828,7 +829,7 @@ components: type: array items: type: string - description: Countries (ISO 3166-1 alpha-2 country codes) + description: Countries or regions (ISO 3166-1 alpha-2 country codes, EU, or GLOBAL) business_owner_id: anyOf: - $ref: "#/components/schemas/GID" @@ -1054,7 +1055,7 @@ components: type: array items: type: string - description: Countries (ISO 3166-1 alpha-2 country codes) + description: Countries or regions (ISO 3166-1 alpha-2 country codes, EU, or GLOBAL) business_owner_id: $ref: "#/components/schemas/GID" description: Business owner ID @@ -1155,7 +1156,7 @@ components: type: array items: type: string - description: Countries (ISO 3166-1 alpha-2 country codes) + description: Countries or regions (ISO 3166-1 alpha-2 country codes, EU, or GLOBAL) business_owner_id: $ref: "#/components/schemas/GID" description: Business owner ID diff --git a/pkg/server/api/trust/v1/graphql/base.graphql b/pkg/server/api/trust/v1/graphql/base.graphql index ac990032a..5b49bc8a2 100644 --- a/pkg/server/api/trust/v1/graphql/base.graphql +++ b/pkg/server/api/trust/v1/graphql/base.graphql @@ -55,6 +55,7 @@ type PageInfo { enum CountryCode @goModel(model: "go.probo.inc/probo/pkg/coredata.CountryCode") { + GLOBAL @goEnum(value: "go.probo.inc/probo/pkg/coredata.CountryCodeGlobal") AD @goEnum(value: "go.probo.inc/probo/pkg/coredata.CountryCodeAD") AE @goEnum(value: "go.probo.inc/probo/pkg/coredata.CountryCodeAE") AF @goEnum(value: "go.probo.inc/probo/pkg/coredata.CountryCodeAF")