The mutation was wired up in the GraphQL schema and resolver but never called from the console frontend. This removes the service method, request type, resolver, schema entries, and two unused error sentinels (ErrTranslationNotFound, ErrTranslationAlreadyExists). Signed-off-by: Émile Ré <emile@getprobo.com>
419 lines
9.5 KiB
GraphQL
419 lines
9.5 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!
|
|
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!
|
|
|
|
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!
|
|
consentExpiryDays: Int!
|
|
consentMode: CookieConsentMode!
|
|
}
|
|
|
|
input UpdateCookieBannerInput {
|
|
cookieBannerId: ID!
|
|
name: String
|
|
origin: String
|
|
privacyPolicyUrl: 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
|
|
}
|
|
|
|
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!
|
|
}
|