Update schema (#2159)

This commit is contained in:
Dominik Żegleń 2022-07-12 10:38:49 +02:00 committed by GitHub
parent f1ffb5093f
commit 0c3148893b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 330 additions and 3 deletions

View file

@ -4659,6 +4659,105 @@
"enumValues": null, "enumValues": null,
"possibleTypes": null "possibleTypes": null
}, },
{
"kind": "OBJECT",
"name": "AppManifestWebhook",
"description": null,
"fields": [
{
"name": "name",
"description": "The name of the webhook.",
"args": [],
"type": {
"kind": "NON_NULL",
"name": null,
"ofType": {
"kind": "SCALAR",
"name": "String",
"ofType": null
}
},
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "asyncEvents",
"description": "The asynchronous events that webhook wants to subscribe.",
"args": [],
"type": {
"kind": "LIST",
"name": null,
"ofType": {
"kind": "NON_NULL",
"name": null,
"ofType": {
"kind": "ENUM",
"name": "WebhookEventTypeAsyncEnum",
"ofType": null
}
}
},
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "syncEvents",
"description": "The synchronous events that webhook wants to subscribe.",
"args": [],
"type": {
"kind": "LIST",
"name": null,
"ofType": {
"kind": "NON_NULL",
"name": null,
"ofType": {
"kind": "ENUM",
"name": "WebhookEventTypeSyncEnum",
"ofType": null
}
}
},
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "query",
"description": "Subscription query of a webhook",
"args": [],
"type": {
"kind": "NON_NULL",
"name": null,
"ofType": {
"kind": "SCALAR",
"name": "String",
"ofType": null
}
},
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "targetUrl",
"description": "The url to receive the payload.",
"args": [],
"type": {
"kind": "NON_NULL",
"name": null,
"ofType": {
"kind": "SCALAR",
"name": "String",
"ofType": null
}
},
"isDeprecated": false,
"deprecationReason": null
}
],
"inputFields": null,
"interfaces": [],
"enumValues": null,
"possibleTypes": null
},
{ {
"kind": "OBJECT", "kind": "OBJECT",
"name": "AppRetryInstall", "name": "AppRetryInstall",
@ -24823,6 +24922,11 @@
"name": "SaleDeleted", "name": "SaleDeleted",
"ofType": null "ofType": null
}, },
{
"kind": "OBJECT",
"name": "SaleToggle",
"ofType": null
},
{ {
"kind": "OBJECT", "kind": "OBJECT",
"name": "SaleUpdated", "name": "SaleUpdated",
@ -38497,6 +38601,30 @@
}, },
"isDeprecated": false, "isDeprecated": false,
"deprecationReason": null "deprecationReason": null
},
{
"name": "webhooks",
"description": "List of the app's webhooks.\n\nAdded in Saleor 3.5.\n\nNote: this API is currently in Feature Preview and can be subject to changes at later point.",
"args": [],
"type": {
"kind": "NON_NULL",
"name": null,
"ofType": {
"kind": "LIST",
"name": null,
"ofType": {
"kind": "NON_NULL",
"name": null,
"ofType": {
"kind": "OBJECT",
"name": "AppManifestWebhook",
"ofType": null
}
}
}
},
"isDeprecated": false,
"deprecationReason": null
} }
], ],
"inputFields": null, "inputFields": null,
@ -84182,6 +84310,96 @@
"enumValues": null, "enumValues": null,
"possibleTypes": null "possibleTypes": null
}, },
{
"kind": "OBJECT",
"name": "SaleToggle",
"description": "The event informs about the start or end of the sale.\n\nAdded in Saleor 3.5.\n\nNote: this API is currently in Feature Preview and can be subject to changes at later point.",
"fields": [
{
"name": "issuedAt",
"description": "Time of the event.",
"args": [],
"type": {
"kind": "SCALAR",
"name": "DateTime",
"ofType": null
},
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "version",
"description": "Saleor version that triggered the event.",
"args": [],
"type": {
"kind": "SCALAR",
"name": "String",
"ofType": null
},
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "issuingPrincipal",
"description": "The user or application that triggered the event.",
"args": [],
"type": {
"kind": "UNION",
"name": "IssuingPrincipal",
"ofType": null
},
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "recipient",
"description": "The application receiving the webhook.",
"args": [],
"type": {
"kind": "OBJECT",
"name": "App",
"ofType": null
},
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "sale",
"description": "The sale the event relates to.\n\nAdded in Saleor 3.5.\n\nNote: this API is currently in Feature Preview and can be subject to changes at later point.",
"args": [
{
"name": "channel",
"description": "Slug of a channel for which the data should be returned.",
"type": {
"kind": "SCALAR",
"name": "String",
"ofType": null
},
"defaultValue": null,
"isDeprecated": false,
"deprecationReason": null
}
],
"type": {
"kind": "OBJECT",
"name": "Sale",
"ofType": null
},
"isDeprecated": false,
"deprecationReason": null
}
],
"inputFields": null,
"interfaces": [
{
"kind": "INTERFACE",
"name": "Event",
"ofType": null
}
],
"enumValues": null,
"possibleTypes": null
},
{ {
"kind": "OBJECT", "kind": "OBJECT",
"name": "SaleTranslatableContent", "name": "SaleTranslatableContent",
@ -101850,6 +102068,12 @@
"isDeprecated": false, "isDeprecated": false,
"deprecationReason": null "deprecationReason": null
}, },
{
"name": "SALE_TOGGLE",
"description": null,
"isDeprecated": false,
"deprecationReason": null
},
{ {
"name": "INVOICE_REQUESTED", "name": "INVOICE_REQUESTED",
"description": "An invoice for order requested.", "description": "An invoice for order requested.",
@ -102401,6 +102625,12 @@
"isDeprecated": false, "isDeprecated": false,
"deprecationReason": null "deprecationReason": null
}, },
{
"name": "SALE_TOGGLE",
"description": null,
"isDeprecated": false,
"deprecationReason": null
},
{ {
"name": "INVOICE_REQUESTED", "name": "INVOICE_REQUESTED",
"description": "An invoice for order requested.", "description": "An invoice for order requested.",
@ -103077,6 +103307,12 @@
"isDeprecated": false, "isDeprecated": false,
"deprecationReason": null "deprecationReason": null
}, },
{
"name": "SALE_TOGGLE",
"description": null,
"isDeprecated": false,
"deprecationReason": null
},
{ {
"name": "INVOICE_REQUESTED", "name": "INVOICE_REQUESTED",
"description": null, "description": null,

2
package-lock.json generated
View file

@ -27216,7 +27216,7 @@
"request-progress": { "request-progress": {
"version": "3.0.0", "version": "3.0.0",
"resolved": "https://registry.npmjs.org/request-progress/-/request-progress-3.0.0.tgz", "resolved": "https://registry.npmjs.org/request-progress/-/request-progress-3.0.0.tgz",
"integrity": "sha1-TKdUCBx/7GP1BeT6qCWqBs1mnb4=", "integrity": "sha512-MnWzEHHaxHO2iWiQuHrUPBi/1WeBf5PkxQqNyNvLl9VAYSdXkP8tQ3pBSeCPD+yw0v0Aq1zosWLz0BdeXpWwZg==",
"dev": true, "dev": true,
"requires": { "requires": {
"throttleit": "^1.0.0" "throttleit": "^1.0.0"

View file

@ -840,6 +840,23 @@ type AppManifestExtension {
target: AppExtensionTargetEnum! target: AppExtensionTargetEnum!
} }
type AppManifestWebhook {
"""The name of the webhook."""
name: String!
"""The asynchronous events that webhook wants to subscribe."""
asyncEvents: [WebhookEventTypeAsyncEnum!]
"""The synchronous events that webhook wants to subscribe."""
syncEvents: [WebhookEventTypeSyncEnum!]
"""Subscription query of a webhook"""
query: String!
"""The url to receive the payload."""
targetUrl: String!
}
""" """
Retry failed installation of new app. Retry failed installation of new app.
@ -7686,6 +7703,15 @@ type Manifest {
homepageUrl: String homepageUrl: String
supportUrl: String supportUrl: String
extensions: [AppManifestExtension!]! extensions: [AppManifestExtension!]!
"""
List of the app's webhooks.
Added in Saleor 3.5.
Note: this API is currently in Feature Preview and can be subject to changes at later point.
"""
webhooks: [AppManifestWebhook!]!
} }
type Margin { type Margin {
@ -18666,6 +18692,39 @@ input SaleSortingInput {
field: SaleSortField! field: SaleSortField!
} }
"""
The event informs about the start or end of the sale.
Added in Saleor 3.5.
Note: this API is currently in Feature Preview and can be subject to changes at later point.
"""
type SaleToggle implements Event {
"""Time of the event."""
issuedAt: DateTime
"""Saleor version that triggered the event."""
version: String
"""The user or application that triggered the event."""
issuingPrincipal: IssuingPrincipal
"""The application receiving the webhook."""
recipient: App
"""
The sale the event relates to.
Added in Saleor 3.5.
Note: this API is currently in Feature Preview and can be subject to changes at later point.
"""
sale(
"""Slug of a channel for which the data should be returned."""
channel: String
): Sale
}
type SaleTranslatableContent implements Node { type SaleTranslatableContent implements Node {
id: ID! id: ID!
name: String! name: String!
@ -22537,6 +22596,7 @@ enum WebhookEventTypeAsyncEnum {
SALE_CREATED SALE_CREATED
SALE_UPDATED SALE_UPDATED
SALE_DELETED SALE_DELETED
SALE_TOGGLE
"""An invoice for order requested.""" """An invoice for order requested."""
INVOICE_REQUESTED INVOICE_REQUESTED
@ -22790,6 +22850,7 @@ enum WebhookEventTypeEnum {
SALE_CREATED SALE_CREATED
SALE_UPDATED SALE_UPDATED
SALE_DELETED SALE_DELETED
SALE_TOGGLE
"""An invoice for order requested.""" """An invoice for order requested."""
INVOICE_REQUESTED INVOICE_REQUESTED
@ -22989,6 +23050,7 @@ enum WebhookSampleEventTypeEnum {
SALE_CREATED SALE_CREATED
SALE_UPDATED SALE_UPDATED
SALE_DELETED SALE_DELETED
SALE_TOGGLE
INVOICE_REQUESTED INVOICE_REQUESTED
INVOICE_DELETED INVOICE_DELETED
INVOICE_SENT INVOICE_SENT

View file

@ -79,6 +79,7 @@
"ProductVariantUpdated", "ProductVariantUpdated",
"SaleCreated", "SaleCreated",
"SaleDeleted", "SaleDeleted",
"SaleToggle",
"SaleUpdated", "SaleUpdated",
"ShippingPriceCreated", "ShippingPriceCreated",
"ShippingPriceDeleted", "ShippingPriceDeleted",

View file

@ -297,6 +297,14 @@ export type AppManifestExtensionFieldPolicy = {
mount?: FieldPolicy<any> | FieldReadFunction<any>, mount?: FieldPolicy<any> | FieldReadFunction<any>,
target?: FieldPolicy<any> | FieldReadFunction<any> target?: FieldPolicy<any> | FieldReadFunction<any>
}; };
export type AppManifestWebhookKeySpecifier = ('name' | 'asyncEvents' | 'syncEvents' | 'query' | 'targetUrl' | AppManifestWebhookKeySpecifier)[];
export type AppManifestWebhookFieldPolicy = {
name?: FieldPolicy<any> | FieldReadFunction<any>,
asyncEvents?: FieldPolicy<any> | FieldReadFunction<any>,
syncEvents?: FieldPolicy<any> | FieldReadFunction<any>,
query?: FieldPolicy<any> | FieldReadFunction<any>,
targetUrl?: FieldPolicy<any> | FieldReadFunction<any>
};
export type AppRetryInstallKeySpecifier = ('appErrors' | 'errors' | 'appInstallation' | AppRetryInstallKeySpecifier)[]; export type AppRetryInstallKeySpecifier = ('appErrors' | 'errors' | 'appInstallation' | AppRetryInstallKeySpecifier)[];
export type AppRetryInstallFieldPolicy = { export type AppRetryInstallFieldPolicy = {
appErrors?: FieldPolicy<any> | FieldReadFunction<any>, appErrors?: FieldPolicy<any> | FieldReadFunction<any>,
@ -1988,7 +1996,7 @@ export type LimitsFieldPolicy = {
staffUsers?: FieldPolicy<any> | FieldReadFunction<any>, staffUsers?: FieldPolicy<any> | FieldReadFunction<any>,
warehouses?: FieldPolicy<any> | FieldReadFunction<any> warehouses?: FieldPolicy<any> | FieldReadFunction<any>
}; };
export type ManifestKeySpecifier = ('identifier' | 'version' | 'name' | 'about' | 'permissions' | 'appUrl' | 'configurationUrl' | 'tokenTargetUrl' | 'dataPrivacy' | 'dataPrivacyUrl' | 'homepageUrl' | 'supportUrl' | 'extensions' | ManifestKeySpecifier)[]; export type ManifestKeySpecifier = ('identifier' | 'version' | 'name' | 'about' | 'permissions' | 'appUrl' | 'configurationUrl' | 'tokenTargetUrl' | 'dataPrivacy' | 'dataPrivacyUrl' | 'homepageUrl' | 'supportUrl' | 'extensions' | 'webhooks' | ManifestKeySpecifier)[];
export type ManifestFieldPolicy = { export type ManifestFieldPolicy = {
identifier?: FieldPolicy<any> | FieldReadFunction<any>, identifier?: FieldPolicy<any> | FieldReadFunction<any>,
version?: FieldPolicy<any> | FieldReadFunction<any>, version?: FieldPolicy<any> | FieldReadFunction<any>,
@ -2002,7 +2010,8 @@ export type ManifestFieldPolicy = {
dataPrivacyUrl?: FieldPolicy<any> | FieldReadFunction<any>, dataPrivacyUrl?: FieldPolicy<any> | FieldReadFunction<any>,
homepageUrl?: FieldPolicy<any> | FieldReadFunction<any>, homepageUrl?: FieldPolicy<any> | FieldReadFunction<any>,
supportUrl?: FieldPolicy<any> | FieldReadFunction<any>, supportUrl?: FieldPolicy<any> | FieldReadFunction<any>,
extensions?: FieldPolicy<any> | FieldReadFunction<any> extensions?: FieldPolicy<any> | FieldReadFunction<any>,
webhooks?: FieldPolicy<any> | FieldReadFunction<any>
}; };
export type MarginKeySpecifier = ('start' | 'stop' | MarginKeySpecifier)[]; export type MarginKeySpecifier = ('start' | 'stop' | MarginKeySpecifier)[];
export type MarginFieldPolicy = { export type MarginFieldPolicy = {
@ -4007,6 +4016,14 @@ export type SaleRemoveCataloguesFieldPolicy = {
discountErrors?: FieldPolicy<any> | FieldReadFunction<any>, discountErrors?: FieldPolicy<any> | FieldReadFunction<any>,
errors?: FieldPolicy<any> | FieldReadFunction<any> errors?: FieldPolicy<any> | FieldReadFunction<any>
}; };
export type SaleToggleKeySpecifier = ('issuedAt' | 'version' | 'issuingPrincipal' | 'recipient' | 'sale' | SaleToggleKeySpecifier)[];
export type SaleToggleFieldPolicy = {
issuedAt?: FieldPolicy<any> | FieldReadFunction<any>,
version?: FieldPolicy<any> | FieldReadFunction<any>,
issuingPrincipal?: FieldPolicy<any> | FieldReadFunction<any>,
recipient?: FieldPolicy<any> | FieldReadFunction<any>,
sale?: FieldPolicy<any> | FieldReadFunction<any>
};
export type SaleTranslatableContentKeySpecifier = ('id' | 'name' | 'translation' | 'sale' | SaleTranslatableContentKeySpecifier)[]; export type SaleTranslatableContentKeySpecifier = ('id' | 'name' | 'translation' | 'sale' | SaleTranslatableContentKeySpecifier)[];
export type SaleTranslatableContentFieldPolicy = { export type SaleTranslatableContentFieldPolicy = {
id?: FieldPolicy<any> | FieldReadFunction<any>, id?: FieldPolicy<any> | FieldReadFunction<any>,
@ -5189,6 +5206,10 @@ export type StrictTypedTypePolicies = {
keyFields?: false | AppManifestExtensionKeySpecifier | (() => undefined | AppManifestExtensionKeySpecifier), keyFields?: false | AppManifestExtensionKeySpecifier | (() => undefined | AppManifestExtensionKeySpecifier),
fields?: AppManifestExtensionFieldPolicy, fields?: AppManifestExtensionFieldPolicy,
}, },
AppManifestWebhook?: Omit<TypePolicy, "fields" | "keyFields"> & {
keyFields?: false | AppManifestWebhookKeySpecifier | (() => undefined | AppManifestWebhookKeySpecifier),
fields?: AppManifestWebhookFieldPolicy,
},
AppRetryInstall?: Omit<TypePolicy, "fields" | "keyFields"> & { AppRetryInstall?: Omit<TypePolicy, "fields" | "keyFields"> & {
keyFields?: false | AppRetryInstallKeySpecifier | (() => undefined | AppRetryInstallKeySpecifier), keyFields?: false | AppRetryInstallKeySpecifier | (() => undefined | AppRetryInstallKeySpecifier),
fields?: AppRetryInstallFieldPolicy, fields?: AppRetryInstallFieldPolicy,
@ -6937,6 +6958,10 @@ export type StrictTypedTypePolicies = {
keyFields?: false | SaleRemoveCataloguesKeySpecifier | (() => undefined | SaleRemoveCataloguesKeySpecifier), keyFields?: false | SaleRemoveCataloguesKeySpecifier | (() => undefined | SaleRemoveCataloguesKeySpecifier),
fields?: SaleRemoveCataloguesFieldPolicy, fields?: SaleRemoveCataloguesFieldPolicy,
}, },
SaleToggle?: Omit<TypePolicy, "fields" | "keyFields"> & {
keyFields?: false | SaleToggleKeySpecifier | (() => undefined | SaleToggleKeySpecifier),
fields?: SaleToggleFieldPolicy,
},
SaleTranslatableContent?: Omit<TypePolicy, "fields" | "keyFields"> & { SaleTranslatableContent?: Omit<TypePolicy, "fields" | "keyFields"> & {
keyFields?: false | SaleTranslatableContentKeySpecifier | (() => undefined | SaleTranslatableContentKeySpecifier), keyFields?: false | SaleTranslatableContentKeySpecifier | (() => undefined | SaleTranslatableContentKeySpecifier),
fields?: SaleTranslatableContentFieldPolicy, fields?: SaleTranslatableContentFieldPolicy,

View file

@ -5002,6 +5002,7 @@ export enum WebhookEventTypeAsyncEnum {
SALE_CREATED = 'SALE_CREATED', SALE_CREATED = 'SALE_CREATED',
SALE_UPDATED = 'SALE_UPDATED', SALE_UPDATED = 'SALE_UPDATED',
SALE_DELETED = 'SALE_DELETED', SALE_DELETED = 'SALE_DELETED',
SALE_TOGGLE = 'SALE_TOGGLE',
/** An invoice for order requested. */ /** An invoice for order requested. */
INVOICE_REQUESTED = 'INVOICE_REQUESTED', INVOICE_REQUESTED = 'INVOICE_REQUESTED',
/** An invoice is deleted. */ /** An invoice is deleted. */
@ -5173,6 +5174,7 @@ export enum WebhookEventTypeEnum {
SALE_CREATED = 'SALE_CREATED', SALE_CREATED = 'SALE_CREATED',
SALE_UPDATED = 'SALE_UPDATED', SALE_UPDATED = 'SALE_UPDATED',
SALE_DELETED = 'SALE_DELETED', SALE_DELETED = 'SALE_DELETED',
SALE_TOGGLE = 'SALE_TOGGLE',
/** An invoice for order requested. */ /** An invoice for order requested. */
INVOICE_REQUESTED = 'INVOICE_REQUESTED', INVOICE_REQUESTED = 'INVOICE_REQUESTED',
/** An invoice is deleted. */ /** An invoice is deleted. */
@ -5330,6 +5332,7 @@ export enum WebhookSampleEventTypeEnum {
SALE_CREATED = 'SALE_CREATED', SALE_CREATED = 'SALE_CREATED',
SALE_UPDATED = 'SALE_UPDATED', SALE_UPDATED = 'SALE_UPDATED',
SALE_DELETED = 'SALE_DELETED', SALE_DELETED = 'SALE_DELETED',
SALE_TOGGLE = 'SALE_TOGGLE',
INVOICE_REQUESTED = 'INVOICE_REQUESTED', INVOICE_REQUESTED = 'INVOICE_REQUESTED',
INVOICE_DELETED = 'INVOICE_DELETED', INVOICE_DELETED = 'INVOICE_DELETED',
INVOICE_SENT = 'INVOICE_SENT', INVOICE_SENT = 'INVOICE_SENT',