Introduce a required cookie_policy_url alongside the existing
privacy_policy_url (now optional) so banners can link directly to a
dedicated cookie policy — a compliance best practice recommended by
CNIL, ICO, and the EDPB. Existing rows are seeded from their current
privacy_policy_url value.
Both {{cookie_policy_link}} and {{privacy_policy_link}} placeholders
are supported independently in banner description translations.
Signed-off-by: Émile Ré <emile@getprobo.com>
425 lines
9.7 KiB
GraphQL
425 lines
9.7 KiB
GraphQL
enum CookieBannerState
|
|
@goModel(model: "go.probo.inc/probo/pkg/coredata.CookieBannerState") {
|
|
ACTIVE
|
|
@goEnum(
|
|
value: "go.probo.inc/probo/pkg/coredata.CookieBannerStateActive"
|
|
)
|
|
INACTIVE
|
|
@goEnum(
|
|
value: "go.probo.inc/probo/pkg/coredata.CookieBannerStateInactive"
|
|
)
|
|
}
|
|
|
|
enum CookieConsentMode
|
|
@goModel(model: "go.probo.inc/probo/pkg/coredata.CookieConsentMode") {
|
|
OPT_IN
|
|
@goEnum(
|
|
value: "go.probo.inc/probo/pkg/coredata.CookieConsentModeOptIn"
|
|
)
|
|
OPT_OUT
|
|
@goEnum(
|
|
value: "go.probo.inc/probo/pkg/coredata.CookieConsentModeOptOut"
|
|
)
|
|
}
|
|
|
|
enum CookieBannerOrderField
|
|
@goModel(
|
|
model: "go.probo.inc/probo/pkg/coredata.CookieBannerOrderField"
|
|
) {
|
|
CREATED_AT
|
|
@goEnum(
|
|
value: "go.probo.inc/probo/pkg/coredata.CookieBannerOrderFieldCreatedAt"
|
|
)
|
|
}
|
|
|
|
enum CookieCategoryOrderField
|
|
@goModel(
|
|
model: "go.probo.inc/probo/pkg/coredata.CookieCategoryOrderField"
|
|
) {
|
|
RANK
|
|
@goEnum(
|
|
value: "go.probo.inc/probo/pkg/coredata.CookieCategoryOrderFieldRank"
|
|
)
|
|
}
|
|
|
|
enum CookieCategoryKind
|
|
@goModel(
|
|
model: "go.probo.inc/probo/pkg/coredata.CookieCategoryKind"
|
|
) {
|
|
NORMAL
|
|
@goEnum(
|
|
value: "go.probo.inc/probo/pkg/coredata.CookieCategoryKindNormal"
|
|
)
|
|
NECESSARY
|
|
@goEnum(
|
|
value: "go.probo.inc/probo/pkg/coredata.CookieCategoryKindNecessary"
|
|
)
|
|
UNCATEGORISED
|
|
@goEnum(
|
|
value: "go.probo.inc/probo/pkg/coredata.CookieCategoryKindUncategorised"
|
|
)
|
|
}
|
|
|
|
input CookieBannerOrder
|
|
@goModel(
|
|
model: "go.probo.inc/probo/pkg/server/api/console/v1/types.CookieBannerOrderBy"
|
|
) {
|
|
direction: OrderDirection!
|
|
field: CookieBannerOrderField!
|
|
}
|
|
|
|
input CookieCategoryOrder
|
|
@goModel(
|
|
model: "go.probo.inc/probo/pkg/server/api/console/v1/types.CookieCategoryOrderBy"
|
|
) {
|
|
direction: OrderDirection!
|
|
field: CookieCategoryOrderField!
|
|
}
|
|
|
|
type CookieBanner implements Node {
|
|
id: ID!
|
|
name: String!
|
|
origin: String!
|
|
state: CookieBannerState!
|
|
privacyPolicyUrl: String
|
|
cookiePolicyUrl: String!
|
|
consentExpiryDays: Int!
|
|
consentMode: CookieConsentMode!
|
|
showBranding: Boolean!
|
|
defaultLanguage: String!
|
|
|
|
organization: Organization @goField(forceResolver: true)
|
|
|
|
categories(
|
|
first: Int
|
|
after: CursorKey
|
|
last: Int
|
|
before: CursorKey
|
|
orderBy: CookieCategoryOrder
|
|
): CookieCategoryConnection @goField(forceResolver: true)
|
|
|
|
translations: [CookieBannerTranslation!]! @goField(forceResolver: true)
|
|
|
|
latestVersion: CookieBannerVersion @goField(forceResolver: true)
|
|
|
|
createdAt: Datetime!
|
|
updatedAt: Datetime!
|
|
|
|
permission(action: String!): Boolean! @goField(forceResolver: true)
|
|
}
|
|
|
|
type CookieBannerTranslation implements Node {
|
|
id: ID!
|
|
language: String!
|
|
translations: String!
|
|
createdAt: Datetime!
|
|
updatedAt: Datetime!
|
|
}
|
|
|
|
type CookieCategory implements Node {
|
|
id: ID!
|
|
cookieBanner: CookieBanner @goField(forceResolver: true)
|
|
name: String!
|
|
slug: String!
|
|
description: String!
|
|
kind: CookieCategoryKind!
|
|
rank: Int!
|
|
gcmConsentTypes: [String!]!
|
|
posthogConsent: Boolean!
|
|
|
|
cookies(
|
|
first: Int
|
|
after: CursorKey
|
|
last: Int
|
|
before: CursorKey
|
|
orderBy: CookieOrder
|
|
): CookieConnection @goField(forceResolver: true)
|
|
|
|
createdAt: Datetime!
|
|
updatedAt: Datetime!
|
|
|
|
permission(action: String!): Boolean! @goField(forceResolver: true)
|
|
}
|
|
|
|
enum CookieOrderField
|
|
@goModel(
|
|
model: "go.probo.inc/probo/pkg/coredata.CookieOrderField"
|
|
) {
|
|
CREATED_AT
|
|
@goEnum(
|
|
value: "go.probo.inc/probo/pkg/coredata.CookieOrderFieldCreatedAt"
|
|
)
|
|
}
|
|
|
|
input CookieOrder
|
|
@goModel(
|
|
model: "go.probo.inc/probo/pkg/server/api/console/v1/types.CookieOrderBy"
|
|
) {
|
|
direction: OrderDirection!
|
|
field: CookieOrderField!
|
|
}
|
|
|
|
type Cookie implements Node {
|
|
id: ID!
|
|
cookieCategory: CookieCategory @goField(forceResolver: true)
|
|
name: String!
|
|
duration: String!
|
|
description: String!
|
|
createdAt: Datetime!
|
|
updatedAt: Datetime!
|
|
|
|
permission(action: String!): Boolean! @goField(forceResolver: true)
|
|
}
|
|
|
|
type CookieConnection
|
|
@goModel(
|
|
model: "go.probo.inc/probo/pkg/server/api/console/v1/types.CookieConnection"
|
|
) {
|
|
totalCount: Int! @goField(forceResolver: true)
|
|
edges: [CookieEdge!]!
|
|
pageInfo: PageInfo!
|
|
}
|
|
|
|
type CookieEdge {
|
|
cursor: CursorKey!
|
|
node: Cookie!
|
|
}
|
|
|
|
type CookieBannerVersion implements Node {
|
|
id: ID!
|
|
version: Int!
|
|
state: String!
|
|
createdAt: Datetime!
|
|
updatedAt: Datetime!
|
|
}
|
|
|
|
type CookieBannerConnection
|
|
@goModel(
|
|
model: "go.probo.inc/probo/pkg/server/api/console/v1/types.CookieBannerConnection"
|
|
) {
|
|
totalCount: Int! @goField(forceResolver: true)
|
|
edges: [CookieBannerEdge!]!
|
|
pageInfo: PageInfo!
|
|
}
|
|
|
|
type CookieBannerEdge {
|
|
cursor: CursorKey!
|
|
node: CookieBanner!
|
|
}
|
|
|
|
type CookieCategoryConnection
|
|
@goModel(
|
|
model: "go.probo.inc/probo/pkg/server/api/console/v1/types.CookieCategoryConnection"
|
|
) {
|
|
totalCount: Int! @goField(forceResolver: true)
|
|
edges: [CookieCategoryEdge!]!
|
|
pageInfo: PageInfo!
|
|
}
|
|
|
|
type CookieCategoryEdge {
|
|
cursor: CursorKey!
|
|
node: CookieCategory!
|
|
}
|
|
|
|
extend type Mutation {
|
|
createCookieBanner(
|
|
input: CreateCookieBannerInput!
|
|
): CreateCookieBannerPayload!
|
|
updateCookieBanner(
|
|
input: UpdateCookieBannerInput!
|
|
): UpdateCookieBannerPayload!
|
|
deleteCookieBanner(
|
|
input: DeleteCookieBannerInput!
|
|
): DeleteCookieBannerPayload!
|
|
activateCookieBanner(
|
|
input: ActivateCookieBannerInput!
|
|
): ActivateCookieBannerPayload!
|
|
deactivateCookieBanner(
|
|
input: DeactivateCookieBannerInput!
|
|
): DeactivateCookieBannerPayload!
|
|
publishCookieBannerVersion(
|
|
input: PublishCookieBannerVersionInput!
|
|
): PublishCookieBannerVersionPayload!
|
|
createCookieCategory(
|
|
input: CreateCookieCategoryInput!
|
|
): CreateCookieCategoryPayload!
|
|
updateCookieCategory(
|
|
input: UpdateCookieCategoryInput!
|
|
): UpdateCookieCategoryPayload!
|
|
deleteCookieCategory(
|
|
input: DeleteCookieCategoryInput!
|
|
): DeleteCookieCategoryPayload!
|
|
reorderCookieCategory(
|
|
input: ReorderCookieCategoryInput!
|
|
): ReorderCookieCategoryPayload!
|
|
moveCookieToCategory(
|
|
input: MoveCookieToCategoryInput!
|
|
): MoveCookieToCategoryPayload!
|
|
createCookie(input: CreateCookieInput!): CreateCookiePayload!
|
|
updateCookie(input: UpdateCookieInput!): UpdateCookiePayload!
|
|
deleteCookie(input: DeleteCookieInput!): DeleteCookiePayload!
|
|
upsertCookieBannerTranslation(
|
|
input: UpsertCookieBannerTranslationInput!
|
|
): UpsertCookieBannerTranslationPayload!
|
|
}
|
|
|
|
input CreateCookieBannerInput {
|
|
organizationId: ID!
|
|
name: String!
|
|
origin: String!
|
|
privacyPolicyUrl: String
|
|
cookiePolicyUrl: String!
|
|
consentExpiryDays: Int!
|
|
consentMode: CookieConsentMode!
|
|
}
|
|
|
|
input UpdateCookieBannerInput {
|
|
cookieBannerId: ID!
|
|
name: String
|
|
privacyPolicyUrl: String
|
|
cookiePolicyUrl: String
|
|
consentExpiryDays: Int
|
|
consentMode: CookieConsentMode
|
|
defaultLanguage: String
|
|
}
|
|
|
|
input DeleteCookieBannerInput {
|
|
cookieBannerId: ID!
|
|
}
|
|
|
|
input ActivateCookieBannerInput {
|
|
cookieBannerId: ID!
|
|
}
|
|
|
|
input DeactivateCookieBannerInput {
|
|
cookieBannerId: ID!
|
|
}
|
|
|
|
input PublishCookieBannerVersionInput {
|
|
cookieBannerId: ID!
|
|
}
|
|
|
|
input CreateCookieCategoryInput {
|
|
cookieBannerId: ID!
|
|
name: String!
|
|
slug: String!
|
|
description: String!
|
|
rank: Int!
|
|
}
|
|
|
|
input UpdateCookieCategoryInput {
|
|
cookieCategoryId: ID!
|
|
name: String
|
|
slug: String
|
|
description: String
|
|
gcmConsentTypes: [String!]
|
|
posthogConsent: Boolean
|
|
}
|
|
|
|
input DeleteCookieCategoryInput {
|
|
cookieCategoryId: ID!
|
|
}
|
|
|
|
input ReorderCookieCategoryInput {
|
|
cookieCategoryId: ID!
|
|
rank: Int!
|
|
}
|
|
|
|
input MoveCookieToCategoryInput {
|
|
cookieId: ID!
|
|
targetCookieCategoryId: ID!
|
|
}
|
|
|
|
input CreateCookieInput {
|
|
cookieCategoryId: ID!
|
|
name: String!
|
|
duration: String!
|
|
description: String!
|
|
}
|
|
|
|
input UpdateCookieInput {
|
|
cookieId: ID!
|
|
name: String
|
|
duration: String
|
|
description: String
|
|
}
|
|
|
|
input DeleteCookieInput {
|
|
cookieId: ID!
|
|
}
|
|
|
|
type CreateCookieBannerPayload {
|
|
cookieBannerEdge: CookieBannerEdge!
|
|
}
|
|
|
|
type UpdateCookieBannerPayload {
|
|
cookieBanner: CookieBanner!
|
|
}
|
|
|
|
type DeleteCookieBannerPayload {
|
|
deletedCookieBannerId: ID!
|
|
}
|
|
|
|
type ActivateCookieBannerPayload {
|
|
cookieBanner: CookieBanner!
|
|
}
|
|
|
|
type DeactivateCookieBannerPayload {
|
|
cookieBanner: CookieBanner!
|
|
}
|
|
|
|
type PublishCookieBannerVersionPayload {
|
|
cookieBannerVersion: CookieBannerVersion!
|
|
cookieBanner: CookieBanner!
|
|
}
|
|
|
|
type CreateCookieCategoryPayload {
|
|
cookieCategoryEdge: CookieCategoryEdge!
|
|
cookieBanner: CookieBanner!
|
|
}
|
|
|
|
type UpdateCookieCategoryPayload {
|
|
cookieCategory: CookieCategory!
|
|
cookieBanner: CookieBanner!
|
|
}
|
|
|
|
type DeleteCookieCategoryPayload {
|
|
deletedCookieCategoryId: ID!
|
|
cookieBanner: CookieBanner!
|
|
}
|
|
|
|
type ReorderCookieCategoryPayload {
|
|
cookieBanner: CookieBanner!
|
|
}
|
|
|
|
type MoveCookieToCategoryPayload {
|
|
cookie: Cookie!
|
|
cookieBanner: CookieBanner!
|
|
}
|
|
|
|
type CreateCookiePayload {
|
|
cookieEdge: CookieEdge!
|
|
cookieBanner: CookieBanner!
|
|
}
|
|
|
|
type UpdateCookiePayload {
|
|
cookie: Cookie!
|
|
cookieBanner: CookieBanner!
|
|
}
|
|
|
|
type DeleteCookiePayload {
|
|
deletedCookieId: ID!
|
|
cookieBanner: CookieBanner!
|
|
}
|
|
|
|
input UpsertCookieBannerTranslationInput {
|
|
cookieBannerId: ID!
|
|
language: String!
|
|
translations: String!
|
|
}
|
|
|
|
type UpsertCookieBannerTranslationPayload {
|
|
cookieBannerTranslation: CookieBannerTranslation!
|
|
cookieBanner: CookieBanner!
|
|
}
|