diff --git a/introspection.json b/introspection.json index 6ea8ee790..a82c1cc72 100644 --- a/introspection.json +++ b/introspection.json @@ -25274,6 +25274,11 @@ "name": "DraftOrderUpdated", "ofType": null }, + { + "kind": "OBJECT", + "name": "FulfillmentApproved", + "ofType": null + }, { "kind": "OBJECT", "name": "FulfillmentCanceled", @@ -28636,6 +28641,95 @@ "enumValues": 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", "name": "FulfillmentCancel", @@ -104554,6 +104648,12 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "FULFILLMENT_APPROVED", + "description": "A fulfillment is approved.", + "isDeprecated": false, + "deprecationReason": null + }, { "name": "NOTIFY_USER", "description": "User notification triggered.", @@ -105129,6 +105229,12 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "FULFILLMENT_APPROVED", + "description": "A fulfillment is approved.", + "isDeprecated": false, + "deprecationReason": null + }, { "name": "NOTIFY_USER", "description": "User notification triggered.", @@ -105853,6 +105959,12 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "FULFILLMENT_APPROVED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "NOTIFY_USER", "description": null, diff --git a/schema.graphql b/schema.graphql index 8f2d02178..e5bd18a89 100644 --- a/schema.graphql +++ b/schema.graphql @@ -5823,6 +5823,33 @@ type FulfillmentApprove { 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. @@ -23511,6 +23538,9 @@ enum WebhookEventTypeAsyncEnum { """A fulfillment is cancelled.""" FULFILLMENT_CANCELED + """A fulfillment is approved.""" + FULFILLMENT_APPROVED + """User notification triggered.""" NOTIFY_USER @@ -23802,6 +23832,9 @@ enum WebhookEventTypeEnum { """A fulfillment is cancelled.""" FULFILLMENT_CANCELED + """A fulfillment is approved.""" + FULFILLMENT_APPROVED + """User notification triggered.""" NOTIFY_USER @@ -24055,6 +24088,7 @@ enum WebhookSampleEventTypeEnum { CHECKOUT_UPDATED FULFILLMENT_CREATED FULFILLMENT_CANCELED + FULFILLMENT_APPROVED NOTIFY_USER PAGE_CREATED PAGE_UPDATED diff --git a/src/graphql/fragmentTypes.generated.ts b/src/graphql/fragmentTypes.generated.ts index aeb4cb5e5..32a2ca98d 100644 --- a/src/graphql/fragmentTypes.generated.ts +++ b/src/graphql/fragmentTypes.generated.ts @@ -44,6 +44,7 @@ "DraftOrderCreated", "DraftOrderDeleted", "DraftOrderUpdated", + "FulfillmentApproved", "FulfillmentCanceled", "FulfillmentCreated", "GiftCardCreated", diff --git a/src/graphql/typePolicies.generated.ts b/src/graphql/typePolicies.generated.ts index e4a039a4e..28a2fd82d 100644 --- a/src/graphql/typePolicies.generated.ts +++ b/src/graphql/typePolicies.generated.ts @@ -1630,6 +1630,15 @@ export type FulfillmentApproveFieldPolicy = { orderErrors?: FieldPolicy | FieldReadFunction, errors?: FieldPolicy | FieldReadFunction }; +export type FulfillmentApprovedKeySpecifier = ('issuedAt' | 'version' | 'issuingPrincipal' | 'recipient' | 'fulfillment' | 'order' | FulfillmentApprovedKeySpecifier)[]; +export type FulfillmentApprovedFieldPolicy = { + issuedAt?: FieldPolicy | FieldReadFunction, + version?: FieldPolicy | FieldReadFunction, + issuingPrincipal?: FieldPolicy | FieldReadFunction, + recipient?: FieldPolicy | FieldReadFunction, + fulfillment?: FieldPolicy | FieldReadFunction, + order?: FieldPolicy | FieldReadFunction +}; export type FulfillmentCancelKeySpecifier = ('fulfillment' | 'order' | 'orderErrors' | 'errors' | FulfillmentCancelKeySpecifier)[]; export type FulfillmentCancelFieldPolicy = { fulfillment?: FieldPolicy | FieldReadFunction, @@ -6077,6 +6086,10 @@ export type StrictTypedTypePolicies = { keyFields?: false | FulfillmentApproveKeySpecifier | (() => undefined | FulfillmentApproveKeySpecifier), fields?: FulfillmentApproveFieldPolicy, }, + FulfillmentApproved?: Omit & { + keyFields?: false | FulfillmentApprovedKeySpecifier | (() => undefined | FulfillmentApprovedKeySpecifier), + fields?: FulfillmentApprovedFieldPolicy, + }, FulfillmentCancel?: Omit & { keyFields?: false | FulfillmentCancelKeySpecifier | (() => undefined | FulfillmentCancelKeySpecifier), fields?: FulfillmentCancelFieldPolicy, diff --git a/src/graphql/types.generated.ts b/src/graphql/types.generated.ts index 735c7ce8b..d95471439 100644 --- a/src/graphql/types.generated.ts +++ b/src/graphql/types.generated.ts @@ -5174,6 +5174,8 @@ export enum WebhookEventTypeAsyncEnum { FULFILLMENT_CREATED = 'FULFILLMENT_CREATED', /** A fulfillment is cancelled. */ FULFILLMENT_CANCELED = 'FULFILLMENT_CANCELED', + /** A fulfillment is approved. */ + FULFILLMENT_APPROVED = 'FULFILLMENT_APPROVED', /** User notification triggered. */ NOTIFY_USER = 'NOTIFY_USER', /** A new page is created. */ @@ -5366,6 +5368,8 @@ export enum WebhookEventTypeEnum { FULFILLMENT_CREATED = 'FULFILLMENT_CREATED', /** A fulfillment is cancelled. */ FULFILLMENT_CANCELED = 'FULFILLMENT_CANCELED', + /** A fulfillment is approved. */ + FULFILLMENT_APPROVED = 'FULFILLMENT_APPROVED', /** User notification triggered. */ NOTIFY_USER = 'NOTIFY_USER', /** A new page is created. */ @@ -5568,6 +5572,7 @@ export enum WebhookSampleEventTypeEnum { CHECKOUT_UPDATED = 'CHECKOUT_UPDATED', FULFILLMENT_CREATED = 'FULFILLMENT_CREATED', FULFILLMENT_CANCELED = 'FULFILLMENT_CANCELED', + FULFILLMENT_APPROVED = 'FULFILLMENT_APPROVED', NOTIFY_USER = 'NOTIFY_USER', PAGE_CREATED = 'PAGE_CREATED', PAGE_UPDATED = 'PAGE_UPDATED',