Add fulfillment approve webhook (#2300)
* Update schema * Update types * Trigger deployment
This commit is contained in:
parent
19d5e7e71d
commit
8f0cdf0134
5 changed files with 165 additions and 0 deletions
|
@ -25274,6 +25274,11 @@
|
||||||
"name": "DraftOrderUpdated",
|
"name": "DraftOrderUpdated",
|
||||||
"ofType": null
|
"ofType": null
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"kind": "OBJECT",
|
||||||
|
"name": "FulfillmentApproved",
|
||||||
|
"ofType": null
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"kind": "OBJECT",
|
"kind": "OBJECT",
|
||||||
"name": "FulfillmentCanceled",
|
"name": "FulfillmentCanceled",
|
||||||
|
@ -28636,6 +28641,95 @@
|
||||||
"enumValues": null,
|
"enumValues": null,
|
||||||
"possibleTypes": null
|
"possibleTypes": null
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"kind": "OBJECT",
|
||||||
|
"name": "FulfillmentApproved",
|
||||||
|
"description": "Event sent when fulfillment is approved.\n\nAdded in Saleor 3.7.\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": "fulfillment",
|
||||||
|
"description": "The fulfillment the event relates to.",
|
||||||
|
"args": [],
|
||||||
|
"type": {
|
||||||
|
"kind": "OBJECT",
|
||||||
|
"name": "Fulfillment",
|
||||||
|
"ofType": null
|
||||||
|
},
|
||||||
|
"isDeprecated": false,
|
||||||
|
"deprecationReason": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "order",
|
||||||
|
"description": "The order the fulfillment belongs to.",
|
||||||
|
"args": [],
|
||||||
|
"type": {
|
||||||
|
"kind": "OBJECT",
|
||||||
|
"name": "Order",
|
||||||
|
"ofType": null
|
||||||
|
},
|
||||||
|
"isDeprecated": false,
|
||||||
|
"deprecationReason": null
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"inputFields": null,
|
||||||
|
"interfaces": [
|
||||||
|
{
|
||||||
|
"kind": "INTERFACE",
|
||||||
|
"name": "Event",
|
||||||
|
"ofType": null
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"enumValues": null,
|
||||||
|
"possibleTypes": null
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"kind": "OBJECT",
|
"kind": "OBJECT",
|
||||||
"name": "FulfillmentCancel",
|
"name": "FulfillmentCancel",
|
||||||
|
@ -104554,6 +104648,12 @@
|
||||||
"isDeprecated": false,
|
"isDeprecated": false,
|
||||||
"deprecationReason": null
|
"deprecationReason": null
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "FULFILLMENT_APPROVED",
|
||||||
|
"description": "A fulfillment is approved.",
|
||||||
|
"isDeprecated": false,
|
||||||
|
"deprecationReason": null
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "NOTIFY_USER",
|
"name": "NOTIFY_USER",
|
||||||
"description": "User notification triggered.",
|
"description": "User notification triggered.",
|
||||||
|
@ -105129,6 +105229,12 @@
|
||||||
"isDeprecated": false,
|
"isDeprecated": false,
|
||||||
"deprecationReason": null
|
"deprecationReason": null
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "FULFILLMENT_APPROVED",
|
||||||
|
"description": "A fulfillment is approved.",
|
||||||
|
"isDeprecated": false,
|
||||||
|
"deprecationReason": null
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "NOTIFY_USER",
|
"name": "NOTIFY_USER",
|
||||||
"description": "User notification triggered.",
|
"description": "User notification triggered.",
|
||||||
|
@ -105853,6 +105959,12 @@
|
||||||
"isDeprecated": false,
|
"isDeprecated": false,
|
||||||
"deprecationReason": null
|
"deprecationReason": null
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "FULFILLMENT_APPROVED",
|
||||||
|
"description": null,
|
||||||
|
"isDeprecated": false,
|
||||||
|
"deprecationReason": null
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "NOTIFY_USER",
|
"name": "NOTIFY_USER",
|
||||||
"description": null,
|
"description": null,
|
||||||
|
|
|
@ -5823,6 +5823,33 @@ type FulfillmentApprove {
|
||||||
errors: [OrderError!]!
|
errors: [OrderError!]!
|
||||||
}
|
}
|
||||||
|
|
||||||
|
"""
|
||||||
|
Event sent when fulfillment is approved.
|
||||||
|
|
||||||
|
Added in Saleor 3.7.
|
||||||
|
|
||||||
|
Note: this API is currently in Feature Preview and can be subject to changes at later point.
|
||||||
|
"""
|
||||||
|
type FulfillmentApproved 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 fulfillment the event relates to."""
|
||||||
|
fulfillment: Fulfillment
|
||||||
|
|
||||||
|
"""The order the fulfillment belongs to."""
|
||||||
|
order: Order
|
||||||
|
}
|
||||||
|
|
||||||
"""
|
"""
|
||||||
Cancels existing fulfillment and optionally restocks items.
|
Cancels existing fulfillment and optionally restocks items.
|
||||||
|
|
||||||
|
@ -23511,6 +23538,9 @@ enum WebhookEventTypeAsyncEnum {
|
||||||
"""A fulfillment is cancelled."""
|
"""A fulfillment is cancelled."""
|
||||||
FULFILLMENT_CANCELED
|
FULFILLMENT_CANCELED
|
||||||
|
|
||||||
|
"""A fulfillment is approved."""
|
||||||
|
FULFILLMENT_APPROVED
|
||||||
|
|
||||||
"""User notification triggered."""
|
"""User notification triggered."""
|
||||||
NOTIFY_USER
|
NOTIFY_USER
|
||||||
|
|
||||||
|
@ -23802,6 +23832,9 @@ enum WebhookEventTypeEnum {
|
||||||
"""A fulfillment is cancelled."""
|
"""A fulfillment is cancelled."""
|
||||||
FULFILLMENT_CANCELED
|
FULFILLMENT_CANCELED
|
||||||
|
|
||||||
|
"""A fulfillment is approved."""
|
||||||
|
FULFILLMENT_APPROVED
|
||||||
|
|
||||||
"""User notification triggered."""
|
"""User notification triggered."""
|
||||||
NOTIFY_USER
|
NOTIFY_USER
|
||||||
|
|
||||||
|
@ -24055,6 +24088,7 @@ enum WebhookSampleEventTypeEnum {
|
||||||
CHECKOUT_UPDATED
|
CHECKOUT_UPDATED
|
||||||
FULFILLMENT_CREATED
|
FULFILLMENT_CREATED
|
||||||
FULFILLMENT_CANCELED
|
FULFILLMENT_CANCELED
|
||||||
|
FULFILLMENT_APPROVED
|
||||||
NOTIFY_USER
|
NOTIFY_USER
|
||||||
PAGE_CREATED
|
PAGE_CREATED
|
||||||
PAGE_UPDATED
|
PAGE_UPDATED
|
||||||
|
|
|
@ -44,6 +44,7 @@
|
||||||
"DraftOrderCreated",
|
"DraftOrderCreated",
|
||||||
"DraftOrderDeleted",
|
"DraftOrderDeleted",
|
||||||
"DraftOrderUpdated",
|
"DraftOrderUpdated",
|
||||||
|
"FulfillmentApproved",
|
||||||
"FulfillmentCanceled",
|
"FulfillmentCanceled",
|
||||||
"FulfillmentCreated",
|
"FulfillmentCreated",
|
||||||
"GiftCardCreated",
|
"GiftCardCreated",
|
||||||
|
|
|
@ -1630,6 +1630,15 @@ export type FulfillmentApproveFieldPolicy = {
|
||||||
orderErrors?: FieldPolicy<any> | FieldReadFunction<any>,
|
orderErrors?: FieldPolicy<any> | FieldReadFunction<any>,
|
||||||
errors?: FieldPolicy<any> | FieldReadFunction<any>
|
errors?: FieldPolicy<any> | FieldReadFunction<any>
|
||||||
};
|
};
|
||||||
|
export type FulfillmentApprovedKeySpecifier = ('issuedAt' | 'version' | 'issuingPrincipal' | 'recipient' | 'fulfillment' | 'order' | FulfillmentApprovedKeySpecifier)[];
|
||||||
|
export type FulfillmentApprovedFieldPolicy = {
|
||||||
|
issuedAt?: FieldPolicy<any> | FieldReadFunction<any>,
|
||||||
|
version?: FieldPolicy<any> | FieldReadFunction<any>,
|
||||||
|
issuingPrincipal?: FieldPolicy<any> | FieldReadFunction<any>,
|
||||||
|
recipient?: FieldPolicy<any> | FieldReadFunction<any>,
|
||||||
|
fulfillment?: FieldPolicy<any> | FieldReadFunction<any>,
|
||||||
|
order?: FieldPolicy<any> | FieldReadFunction<any>
|
||||||
|
};
|
||||||
export type FulfillmentCancelKeySpecifier = ('fulfillment' | 'order' | 'orderErrors' | 'errors' | FulfillmentCancelKeySpecifier)[];
|
export type FulfillmentCancelKeySpecifier = ('fulfillment' | 'order' | 'orderErrors' | 'errors' | FulfillmentCancelKeySpecifier)[];
|
||||||
export type FulfillmentCancelFieldPolicy = {
|
export type FulfillmentCancelFieldPolicy = {
|
||||||
fulfillment?: FieldPolicy<any> | FieldReadFunction<any>,
|
fulfillment?: FieldPolicy<any> | FieldReadFunction<any>,
|
||||||
|
@ -6077,6 +6086,10 @@ export type StrictTypedTypePolicies = {
|
||||||
keyFields?: false | FulfillmentApproveKeySpecifier | (() => undefined | FulfillmentApproveKeySpecifier),
|
keyFields?: false | FulfillmentApproveKeySpecifier | (() => undefined | FulfillmentApproveKeySpecifier),
|
||||||
fields?: FulfillmentApproveFieldPolicy,
|
fields?: FulfillmentApproveFieldPolicy,
|
||||||
},
|
},
|
||||||
|
FulfillmentApproved?: Omit<TypePolicy, "fields" | "keyFields"> & {
|
||||||
|
keyFields?: false | FulfillmentApprovedKeySpecifier | (() => undefined | FulfillmentApprovedKeySpecifier),
|
||||||
|
fields?: FulfillmentApprovedFieldPolicy,
|
||||||
|
},
|
||||||
FulfillmentCancel?: Omit<TypePolicy, "fields" | "keyFields"> & {
|
FulfillmentCancel?: Omit<TypePolicy, "fields" | "keyFields"> & {
|
||||||
keyFields?: false | FulfillmentCancelKeySpecifier | (() => undefined | FulfillmentCancelKeySpecifier),
|
keyFields?: false | FulfillmentCancelKeySpecifier | (() => undefined | FulfillmentCancelKeySpecifier),
|
||||||
fields?: FulfillmentCancelFieldPolicy,
|
fields?: FulfillmentCancelFieldPolicy,
|
||||||
|
|
|
@ -5174,6 +5174,8 @@ export enum WebhookEventTypeAsyncEnum {
|
||||||
FULFILLMENT_CREATED = 'FULFILLMENT_CREATED',
|
FULFILLMENT_CREATED = 'FULFILLMENT_CREATED',
|
||||||
/** A fulfillment is cancelled. */
|
/** A fulfillment is cancelled. */
|
||||||
FULFILLMENT_CANCELED = 'FULFILLMENT_CANCELED',
|
FULFILLMENT_CANCELED = 'FULFILLMENT_CANCELED',
|
||||||
|
/** A fulfillment is approved. */
|
||||||
|
FULFILLMENT_APPROVED = 'FULFILLMENT_APPROVED',
|
||||||
/** User notification triggered. */
|
/** User notification triggered. */
|
||||||
NOTIFY_USER = 'NOTIFY_USER',
|
NOTIFY_USER = 'NOTIFY_USER',
|
||||||
/** A new page is created. */
|
/** A new page is created. */
|
||||||
|
@ -5366,6 +5368,8 @@ export enum WebhookEventTypeEnum {
|
||||||
FULFILLMENT_CREATED = 'FULFILLMENT_CREATED',
|
FULFILLMENT_CREATED = 'FULFILLMENT_CREATED',
|
||||||
/** A fulfillment is cancelled. */
|
/** A fulfillment is cancelled. */
|
||||||
FULFILLMENT_CANCELED = 'FULFILLMENT_CANCELED',
|
FULFILLMENT_CANCELED = 'FULFILLMENT_CANCELED',
|
||||||
|
/** A fulfillment is approved. */
|
||||||
|
FULFILLMENT_APPROVED = 'FULFILLMENT_APPROVED',
|
||||||
/** User notification triggered. */
|
/** User notification triggered. */
|
||||||
NOTIFY_USER = 'NOTIFY_USER',
|
NOTIFY_USER = 'NOTIFY_USER',
|
||||||
/** A new page is created. */
|
/** A new page is created. */
|
||||||
|
@ -5568,6 +5572,7 @@ export enum WebhookSampleEventTypeEnum {
|
||||||
CHECKOUT_UPDATED = 'CHECKOUT_UPDATED',
|
CHECKOUT_UPDATED = 'CHECKOUT_UPDATED',
|
||||||
FULFILLMENT_CREATED = 'FULFILLMENT_CREATED',
|
FULFILLMENT_CREATED = 'FULFILLMENT_CREATED',
|
||||||
FULFILLMENT_CANCELED = 'FULFILLMENT_CANCELED',
|
FULFILLMENT_CANCELED = 'FULFILLMENT_CANCELED',
|
||||||
|
FULFILLMENT_APPROVED = 'FULFILLMENT_APPROVED',
|
||||||
NOTIFY_USER = 'NOTIFY_USER',
|
NOTIFY_USER = 'NOTIFY_USER',
|
||||||
PAGE_CREATED = 'PAGE_CREATED',
|
PAGE_CREATED = 'PAGE_CREATED',
|
||||||
PAGE_UPDATED = 'PAGE_UPDATED',
|
PAGE_UPDATED = 'PAGE_UPDATED',
|
||||||
|
|
Loading…
Reference in a new issue