import { squareTriggerDefinitions as triggerDefinitions } from "@automate.ax/catalog/triggers/square" import { createTrigger } from "../../../automation/create-trigger" import type { IntegrationAccountReference } from "../../../automation/integrations" /** Options shared by Square webhook triggers. */ export interface OnSquareEventOptions { /** Square seller account binding to watch. */ account?: string | IntegrationAccountReference<"square"> } /** Subscribes to every current event delivered for one Square seller. */ export const onSquareEvent = createTrigger(triggerDefinitions.squareEvent) /** * Published when you link a seller's or buyer's bank account to a Square * account. Square sets the initial status to VERIFICATION_IN_PROGRESS and * publishes the event. */ export const onSquareBankAccountCreated = createTrigger( triggerDefinitions.squareBankAccountCreated, ) /** Published when Square sets the status of a bank account to DISABLED. */ export const onSquareBankAccountDisabled = createTrigger( triggerDefinitions.squareBankAccountDisabled, ) /** Published when Square sets the status of a bank account to VERIFIED. */ export const onSquareBankAccountVerified = createTrigger( triggerDefinitions.squareBankAccountVerified, ) /** A booking is created by calling CreateBooking . */ export const onSquareBookingCreated = createTrigger( triggerDefinitions.squareBookingCreated, ) /** * A custom attribute definition was created by your application. The * application that created the custom attribute definition is the owner of the * definition and corresponding custom attributes. */ export const onSquareBookingCustomAttributeDefinitionOwnedCreated = createTrigger( triggerDefinitions.squareBookingCustomAttributeDefinitionOwnedCreated, ) /** * A custom attribute definition owned by your application was deleted. Note * that only the definition owner can delete a custom attribute definition. */ export const onSquareBookingCustomAttributeDefinitionOwnedDeleted = createTrigger( triggerDefinitions.squareBookingCustomAttributeDefinitionOwnedDeleted, ) /** * A custom attribute definition owned by your application was updated. Note * that only the definition owner can update a custom attribute definition. */ export const onSquareBookingCustomAttributeDefinitionOwnedUpdated = createTrigger( triggerDefinitions.squareBookingCustomAttributeDefinitionOwnedUpdated, ) /** A custom attribute definition that's visible to your application was created. */ export const onSquareBookingCustomAttributeDefinitionVisibleCreated = createTrigger( triggerDefinitions.squareBookingCustomAttributeDefinitionVisibleCreated, ) /** A custom attribute definition that's visible to your application was deleted. */ export const onSquareBookingCustomAttributeDefinitionVisibleDeleted = createTrigger( triggerDefinitions.squareBookingCustomAttributeDefinitionVisibleDeleted, ) /** A custom attribute definition that's visible to your application was updated. */ export const onSquareBookingCustomAttributeDefinitionVisibleUpdated = createTrigger( triggerDefinitions.squareBookingCustomAttributeDefinitionVisibleUpdated, ) /** A custom attribute owned by your application was deleted from a booking. */ export const onSquareBookingCustomAttributeOwnedDeleted = createTrigger( triggerDefinitions.squareBookingCustomAttributeOwnedDeleted, ) /** * A custom attribute owned by your application was created or updated for a * booking. */ export const onSquareBookingCustomAttributeOwnedUpdated = createTrigger( triggerDefinitions.squareBookingCustomAttributeOwnedUpdated, ) /** * A custom attribute that's visible to your application was deleted from a * booking. */ export const onSquareBookingCustomAttributeVisibleDeleted = createTrigger( triggerDefinitions.squareBookingCustomAttributeVisibleDeleted, ) /** * A custom attribute that's visible to your application was created or updated * for a booking. */ export const onSquareBookingCustomAttributeVisibleUpdated = createTrigger( triggerDefinitions.squareBookingCustomAttributeVisibleUpdated, ) /** * An API-created booking is updated in the Square Dashboard, on the seller's * online booking site, or by calling UpdateBooking . */ export const onSquareBookingUpdated = createTrigger( triggerDefinitions.squareBookingUpdated, ) /** * Published when Square automatically updates the expiration date or primary * account number (PAN) of a card or adds or removes an issuer alert. */ export const onSquareCardAutomaticallyUpdated = createTrigger( triggerDefinitions.squareCardAutomaticallyUpdated, ) /** Published when a card is created or imported. */ export const onSquareCardCreated = createTrigger( triggerDefinitions.squareCardCreated, ) /** Published when a card is disabled. */ export const onSquareCardDisabled = createTrigger( triggerDefinitions.squareCardDisabled, ) /** Published when a card is GDPR forgotten or vaulted. */ export const onSquareCardForgotten = createTrigger( triggerDefinitions.squareCardForgotten, ) /** Published when a card is updated by the seller in the Square Dashboard. */ export const onSquareCardUpdated = createTrigger( triggerDefinitions.squareCardUpdated, ) /** * The catalog was updated. Webhook notification data is packaged as * "catalog_version": { "updated_at": "2019-05-14T17:51:27Z"} . */ export const onSquareCatalogVersionUpdated = createTrigger( triggerDefinitions.squareCatalogVersionUpdated, ) /** * A customer profile is created, including when customer profiles are merged * into a new customer profile. */ export const onSquareCustomerCreated = createTrigger( triggerDefinitions.squareCustomerCreated, ) /** * A custom attribute definition was created by your application. The * application that created the custom attribute definition is the owner of the * definition and corresponding custom attributes. This event replaces the * deprecated customer.custom_attribute_definition.created event. */ export const onSquareCustomerCustomAttributeDefinitionOwnedCreated = createTrigger( triggerDefinitions.squareCustomerCustomAttributeDefinitionOwnedCreated, ) /** * A custom attribute definition owned by your application was deleted. Note * that only the definition owner can delete a custom attribute definition. This * event replaces the deprecated customer.custom_attribute_definition.deleted * event. */ export const onSquareCustomerCustomAttributeDefinitionOwnedDeleted = createTrigger( triggerDefinitions.squareCustomerCustomAttributeDefinitionOwnedDeleted, ) /** * A custom attribute definition owned by your application was updated. Note * that only the definition owner can update a custom attribute definition. This * event replaces the deprecated customer.custom_attribute_definition.updated * event. */ export const onSquareCustomerCustomAttributeDefinitionOwnedUpdated = createTrigger( triggerDefinitions.squareCustomerCustomAttributeDefinitionOwnedUpdated, ) /** * A custom attribute definition that's visible to your application was created. * This event replaces the deprecated * customer.custom_attribute_definition.public.created event. */ export const onSquareCustomerCustomAttributeDefinitionVisibleCreated = createTrigger( triggerDefinitions.squareCustomerCustomAttributeDefinitionVisibleCreated, ) /** * A custom attribute definition that's visible to your application was deleted. * This event replaces the deprecated * customer.custom_attribute_definition.public.deleted event. */ export const onSquareCustomerCustomAttributeDefinitionVisibleDeleted = createTrigger( triggerDefinitions.squareCustomerCustomAttributeDefinitionVisibleDeleted, ) /** * A custom attribute definition that's visible to your application was updated. * This event replaces the deprecated * customer.custom_attribute_definition.public.updated event. */ export const onSquareCustomerCustomAttributeDefinitionVisibleUpdated = createTrigger( triggerDefinitions.squareCustomerCustomAttributeDefinitionVisibleUpdated, ) /** * A custom attribute owned by your application was deleted from a customer * profile. This event replaces the deprecated customer.custom_attribute.deleted * event. */ export const onSquareCustomerCustomAttributeOwnedDeleted = createTrigger( triggerDefinitions.squareCustomerCustomAttributeOwnedDeleted, ) /** * A custom attribute owned by your application was created or updated for a * customer profile. This event replaces the deprecated * customer.custom_attribute.updated event. */ export const onSquareCustomerCustomAttributeOwnedUpdated = createTrigger( triggerDefinitions.squareCustomerCustomAttributeOwnedUpdated, ) /** * A custom attribute that's visible to your application was deleted from a * customer profile. This event replaces the deprecated * customer.custom_attribute.public.deleted event. */ export const onSquareCustomerCustomAttributeVisibleDeleted = createTrigger( triggerDefinitions.squareCustomerCustomAttributeVisibleDeleted, ) /** * A custom attribute that's visible to your application was created or updated * for a customer profile. This event replaces the deprecated * customer.custom_attribute.public.updated event. */ export const onSquareCustomerCustomAttributeVisibleUpdated = createTrigger( triggerDefinitions.squareCustomerCustomAttributeVisibleUpdated, ) /** * A customer profile is deleted, including when customer profiles are merged * into a new customer profile. */ export const onSquareCustomerDeleted = createTrigger( triggerDefinitions.squareCustomerDeleted, ) /** * An attribute on a customer profile is changed, except for the segment_ids * field. */ export const onSquareCustomerUpdated = createTrigger( triggerDefinitions.squareCustomerUpdated, ) /** * A Square Terminal has been paired with a Terminal API client and the * device_id of the paired Square Terminal is available. */ export const onSquareDeviceCodePaired = createTrigger( triggerDefinitions.squareDeviceCodePaired, ) /** * A new Square Terminal was created. This means the Square Terminal has been * associated with the given seller's account. */ export const onSquareDeviceCreated = createTrigger( triggerDefinitions.squareDeviceCreated, ) /** A dispute was created. */ export const onSquareDisputeCreated = createTrigger( triggerDefinitions.squareDisputeCreated, ) /** * Evidence was added to a dispute from the Disputes Dashboard in the Square * Dashboard , in the Square Point of Sale application, or by calling the * Disputes API (CreateDisputeEvidenceFile or CreateDisputeEvidenceText ). */ export const onSquareDisputeEvidenceCreated = createTrigger( triggerDefinitions.squareDisputeEvidenceCreated, ) /** * Evidence was removed from a dispute from the Disputes Dashboard in the Square * Dashboard , in the Square Point of Sale application, or by calling * DeleteDisputeEvidence. */ export const onSquareDisputeEvidenceDeleted = createTrigger( triggerDefinitions.squareDisputeEvidenceDeleted, ) /** * The state of a dispute changed. This includes the dispute resolution (WON or * LOST) reported by the bank. The event data includes details about what * changed. */ export const onSquareDisputeStateUpdated = createTrigger( triggerDefinitions.squareDisputeStateUpdated, ) /** A gift card activity was created. */ export const onSquareGiftCardActivityCreated = createTrigger( triggerDefinitions.squareGiftCardActivityCreated, ) /** * A REDEEM or IMPORT gift card activity was updated. For REDEEM activities, * this event is invoked when the status changes from PENDING to COMPLETED or * CANCELED . This status change applies only when the gift card was redeemed * using Square Point of Sale or the Square Dashboard. For IMPORT activities, * this event is invoked when the balance of an imported third-party gift card * is updated by Square. */ export const onSquareGiftCardActivityUpdated = createTrigger( triggerDefinitions.squareGiftCardActivityUpdated, ) /** A digital gift card was created or a physical gift card was registered. */ export const onSquareGiftCardCreated = createTrigger( triggerDefinitions.squareGiftCardCreated, ) /** A customer was linked to a gift card. */ export const onSquareGiftCardCustomerLinked = createTrigger( triggerDefinitions.squareGiftCardCustomerLinked, ) /** A customer was unlinked from a gift card. */ export const onSquareGiftCardCustomerUnlinked = createTrigger( triggerDefinitions.squareGiftCardCustomerUnlinked, ) /** * A gift card was updated. The balance_money , state , and customer_ids fields * of a gift card can be updated through a gift card activity or when a customer * is linked or unlinked. */ export const onSquareGiftCardUpdated = createTrigger( triggerDefinitions.squareGiftCardUpdated, ) /** * The quantity was updated for a catalog item variation. Webhook notification * data is packaged as InventoryCount[] . */ export const onSquareInventoryCountUpdated = createTrigger( triggerDefinitions.squareInventoryCountUpdated, ) /** An invoice was canceled. */ export const onSquareInvoiceCanceled = createTrigger( triggerDefinitions.squareInvoiceCanceled, ) /** A draft invoice was created. */ export const onSquareInvoiceCreated = createTrigger( triggerDefinitions.squareInvoiceCreated, ) /** * A draft invoice was deleted. A deleted invoice is removed entirely from the * seller account (including any attachments) and cannot be retrieved. */ export const onSquareInvoiceDeleted = createTrigger( triggerDefinitions.squareInvoiceDeleted, ) /** A payment was made for an invoice. */ export const onSquareInvoicePaymentMade = createTrigger( triggerDefinitions.squareInvoicePaymentMade, ) /** * An invoice was published. This also applies to invoices that are published * but scheduled to be processed at a later time. */ export const onSquareInvoicePublished = createTrigger( triggerDefinitions.squareInvoicePublished, ) /** A refund was processed for an invoice. */ export const onSquareInvoiceRefunded = createTrigger( triggerDefinitions.squareInvoiceRefunded, ) /** A scheduled automatic payment has failed. */ export const onSquareInvoiceScheduledChargeFailed = createTrigger( triggerDefinitions.squareInvoiceScheduledChargeFailed, ) /** * An invoice was changed. This event is also invoked following * invoice.published and invoice.canceled events. Note that link expiry and * dynamic link generation for the public_url field don't trigger an event. */ export const onSquareInvoiceUpdated = createTrigger( triggerDefinitions.squareInvoiceUpdated, ) /** A job was created. */ export const onSquareJobCreated = createTrigger( triggerDefinitions.squareJobCreated, ) /** A job was updated. */ export const onSquareJobUpdated = createTrigger( triggerDefinitions.squareJobUpdated, ) /** * A scheduled shift was created. The event data contains the new ScheduledShift * object. */ export const onSquareLaborScheduledShiftCreated = createTrigger( triggerDefinitions.squareLaborScheduledShiftCreated, ) /** * A scheduled shift was permanently deleted (hard delete). The event data * contains the id of the deleted shift and the deleted field for the event is * set to true . This event occurs in two scenarios: An update operation deletes * a shift that was never published. It also triggers * labor.scheduled_shift.updated . A publish operation deletes a previously * published shift. Also triggers labor.scheduled_shift.updated and * labor.scheduled_shift.published . For more information, see Deleting * scheduled shifts . */ export const onSquareLaborScheduledShiftDeleted = createTrigger( triggerDefinitions.squareLaborScheduledShiftDeleted, ) /** * A scheduled shift was published. The event data contains the published * ScheduledShift object. For bulk operations, this event is triggered after * each individual publish request succeeds. A publish operation also triggers a * labor.scheduled_shift.updated event. */ export const onSquareLaborScheduledShiftPublished = createTrigger( triggerDefinitions.squareLaborScheduledShiftPublished, ) /** * A scheduled shift was updated. The event data contains the updated * ScheduledShift object. */ export const onSquareLaborScheduledShiftUpdated = createTrigger( triggerDefinitions.squareLaborScheduledShiftUpdated, ) /** * A timecard was created at the start of a shift. The event data contains the * complete Timecard object. */ export const onSquareLaborTimecardCreated = createTrigger( triggerDefinitions.squareLaborTimecardCreated, ) /** * A timecard was deleted. The event data contains only the id of the deleted * timecard and the deleted field set to true . */ export const onSquareLaborTimecardDeleted = createTrigger( triggerDefinitions.squareLaborTimecardDeleted, ) /** A timecard was updated. The event data contains the complete Timecard object. */ export const onSquareLaborTimecardUpdated = createTrigger( triggerDefinitions.squareLaborTimecardUpdated, ) /** A Location was created. */ export const onSquareLocationCreated = createTrigger( triggerDefinitions.squareLocationCreated, ) /** * A custom attribute definition was created by your application. The * application that created the custom attribute definition is the owner of the * definition and corresponding custom attributes. */ export const onSquareLocationCustomAttributeDefinitionOwnedCreated = createTrigger( triggerDefinitions.squareLocationCustomAttributeDefinitionOwnedCreated, ) /** * A custom attribute definition owned by your application was deleted. Note * that only the definition owner can delete a custom attribute definition. */ export const onSquareLocationCustomAttributeDefinitionOwnedDeleted = createTrigger( triggerDefinitions.squareLocationCustomAttributeDefinitionOwnedDeleted, ) /** * A custom attribute definition owned by your application was updated. Note * that only the definition owner can update a custom attribute definition. */ export const onSquareLocationCustomAttributeDefinitionOwnedUpdated = createTrigger( triggerDefinitions.squareLocationCustomAttributeDefinitionOwnedUpdated, ) /** A custom attribute definition that's visible to your application was created. */ export const onSquareLocationCustomAttributeDefinitionVisibleCreated = createTrigger( triggerDefinitions.squareLocationCustomAttributeDefinitionVisibleCreated, ) /** A custom attribute definition that's visible to your application was deleted. */ export const onSquareLocationCustomAttributeDefinitionVisibleDeleted = createTrigger( triggerDefinitions.squareLocationCustomAttributeDefinitionVisibleDeleted, ) /** A custom attribute definition that's visible to your application was updated. */ export const onSquareLocationCustomAttributeDefinitionVisibleUpdated = createTrigger( triggerDefinitions.squareLocationCustomAttributeDefinitionVisibleUpdated, ) /** A custom attribute owned by your application was deleted from a location. */ export const onSquareLocationCustomAttributeOwnedDeleted = createTrigger( triggerDefinitions.squareLocationCustomAttributeOwnedDeleted, ) /** * A custom attribute owned by your application was created or updated for a * location. */ export const onSquareLocationCustomAttributeOwnedUpdated = createTrigger( triggerDefinitions.squareLocationCustomAttributeOwnedUpdated, ) /** * A custom attribute that's visible to your application was deleted from a * location. */ export const onSquareLocationCustomAttributeVisibleDeleted = createTrigger( triggerDefinitions.squareLocationCustomAttributeVisibleDeleted, ) /** * A custom attribute that's visible to your application was created or updated * for a location. */ export const onSquareLocationCustomAttributeVisibleUpdated = createTrigger( triggerDefinitions.squareLocationCustomAttributeVisibleUpdated, ) /** A Location was updated. */ export const onSquareLocationUpdated = createTrigger( triggerDefinitions.squareLocationUpdated, ) /** * A loyalty account was created for a buyer. A loyalty account can be created * using any of the following methods, which all publish this event: An * application calls the CreateLoyaltyAccount endpoint. A buyer enrolls in the * program from a Square Point of Sale application. The seller enrolls a buyer * using the Customer Directory. The seller merges two customer accounts into * one account using the Customer Directory. In this process, sellers might * merge the two corresponding loyalty accounts by creating a new account and * deleting the existing accounts. */ export const onSquareLoyaltyAccountCreated = createTrigger( triggerDefinitions.squareLoyaltyAccountCreated, ) /** * Published when a loyalty account is deleted. The published event does not * contain the customer_id that was associated with the deleted account. The * following actions to delete the account can publish this event: The seller * deletes an account using the Square Dashboard. The seller merges two customer * profiles using the Customer Directory. In this process, sellers might merge * the two corresponding loyalty accounts by creating a new account and deleting * the existing accounts. */ export const onSquareLoyaltyAccountDeleted = createTrigger( triggerDefinitions.squareLoyaltyAccountDeleted, ) /** * A loyalty account was updated. For example: The seller updates the phone * number registered for the loyalty account using the Square Dashboard. For * more information, see Square Loyalty FAQ . Any change in the loyalty point * balance, such as points added for visits, points expiration, or a manual * adjustment to the point balance that a seller might perform. The customer ID * of the loyalty account was changed. For example, the loyalty account moved to * another customer. */ export const onSquareLoyaltyAccountUpdated = createTrigger( triggerDefinitions.squareLoyaltyAccountUpdated, ) /** * A balance-changing event occurred. Square Loyalty maintains a ledger of * events that occur over the lifetime of a loyalty account. Square publishes * notifications for each loyalty event logged to the ledger. These loyalty * events are immutable, which means they are never updated or deleted. For * example, when a buyer redeems a reward and then returns the order, Square * publishes separate notifications for the corresponding CREATE_REWARD and * DELETE_REWARD events. Similarly, Square publishes a notification for the * OTHER event when points are deducted after a purchase that accrued points is * refunded. */ export const onSquareLoyaltyEventCreated = createTrigger( triggerDefinitions.squareLoyaltyEventCreated, ) /** * A loyalty program was created. Loyalty programs can only be created from the * Square Dashboard. */ export const onSquareLoyaltyProgramCreated = createTrigger( triggerDefinitions.squareLoyaltyProgramCreated, ) /** * A loyalty program was updated. Loyalty programs can only be updated from the * Square Dashboard. */ export const onSquareLoyaltyProgramUpdated = createTrigger( triggerDefinitions.squareLoyaltyProgramUpdated, ) /** A loyalty promotion was created. */ export const onSquareLoyaltyPromotionCreated = createTrigger( triggerDefinitions.squareLoyaltyPromotionCreated, ) /** A loyalty promotion was canceled. */ export const onSquareLoyaltyPromotionUpdated = createTrigger( triggerDefinitions.squareLoyaltyPromotionUpdated, ) /** * A custom attribute definition was created by your application. The * application that created the custom attribute definition is the owner of the * definition and corresponding custom attributes. */ export const onSquareMerchantCustomAttributeDefinitionOwnedCreated = createTrigger( triggerDefinitions.squareMerchantCustomAttributeDefinitionOwnedCreated, ) /** * A custom attribute definition owned by your application was deleted. Note * that only the definition owner can delete a custom attribute definition. */ export const onSquareMerchantCustomAttributeDefinitionOwnedDeleted = createTrigger( triggerDefinitions.squareMerchantCustomAttributeDefinitionOwnedDeleted, ) /** * A custom attribute definition owned by your application was updated. Note * that only the definition owner can update a custom attribute definition. */ export const onSquareMerchantCustomAttributeDefinitionOwnedUpdated = createTrigger( triggerDefinitions.squareMerchantCustomAttributeDefinitionOwnedUpdated, ) /** A custom attribute definition that's visible to your application was created. */ export const onSquareMerchantCustomAttributeDefinitionVisibleCreated = createTrigger( triggerDefinitions.squareMerchantCustomAttributeDefinitionVisibleCreated, ) /** A custom attribute definition that's visible to your application was deleted. */ export const onSquareMerchantCustomAttributeDefinitionVisibleDeleted = createTrigger( triggerDefinitions.squareMerchantCustomAttributeDefinitionVisibleDeleted, ) /** A custom attribute definition that's visible to your application was updated. */ export const onSquareMerchantCustomAttributeDefinitionVisibleUpdated = createTrigger( triggerDefinitions.squareMerchantCustomAttributeDefinitionVisibleUpdated, ) /** A custom attribute owned by your application was deleted from a merchant. */ export const onSquareMerchantCustomAttributeOwnedDeleted = createTrigger( triggerDefinitions.squareMerchantCustomAttributeOwnedDeleted, ) /** * A custom attribute owned by your application was created or updated for a * merchant. */ export const onSquareMerchantCustomAttributeOwnedUpdated = createTrigger( triggerDefinitions.squareMerchantCustomAttributeOwnedUpdated, ) /** * A custom attribute that's visible to your application was deleted from a * merchant. */ export const onSquareMerchantCustomAttributeVisibleDeleted = createTrigger( triggerDefinitions.squareMerchantCustomAttributeVisibleDeleted, ) /** * A custom attribute that's visible to your application was created or updated * for a merchant. */ export const onSquareMerchantCustomAttributeVisibleUpdated = createTrigger( triggerDefinitions.squareMerchantCustomAttributeVisibleUpdated, ) /** * Notifies an application whenever a seller revokes all access tokens and * refresh tokens granted to the application. */ export const onSquareOauthAuthorizationRevoked = createTrigger( triggerDefinitions.squareOauthAuthorizationRevoked, ) /** Published when online checkout location settings are updated. */ export const onSquareOnlineCheckoutLocationSettingsUpdated = createTrigger( triggerDefinitions.squareOnlineCheckoutLocationSettingsUpdated, ) /** Published when online checkout merchant settings are updated. */ export const onSquareOnlineCheckoutMerchantSettingsUpdated = createTrigger( triggerDefinitions.squareOnlineCheckoutMerchantSettingsUpdated, ) /** * An Order was created. This event is triggered when an order is created by a * Square product or your application. */ export const onSquareOrderCreated = createTrigger( triggerDefinitions.squareOrderCreated, ) /** * A custom attribute definition was created by your application. The * application that created the custom attribute definition is the owner of the * definition and corresponding custom attributes. */ export const onSquareOrderCustomAttributeDefinitionOwnedCreated = createTrigger( triggerDefinitions.squareOrderCustomAttributeDefinitionOwnedCreated, ) /** * A custom attribute definition owned by your application was deleted. Note * that only the definition owner can delete a custom attribute definition. */ export const onSquareOrderCustomAttributeDefinitionOwnedDeleted = createTrigger( triggerDefinitions.squareOrderCustomAttributeDefinitionOwnedDeleted, ) /** * A custom attribute definition owned by your application was updated. Note * that only the definition owner can update a custom attribute definition. */ export const onSquareOrderCustomAttributeDefinitionOwnedUpdated = createTrigger( triggerDefinitions.squareOrderCustomAttributeDefinitionOwnedUpdated, ) /** A custom attribute definition that's visible to your application was created. */ export const onSquareOrderCustomAttributeDefinitionVisibleCreated = createTrigger( triggerDefinitions.squareOrderCustomAttributeDefinitionVisibleCreated, ) /** A custom attribute definition that's visible to your application was deleted. */ export const onSquareOrderCustomAttributeDefinitionVisibleDeleted = createTrigger( triggerDefinitions.squareOrderCustomAttributeDefinitionVisibleDeleted, ) /** A custom attribute definition that's visible to your application was updated. */ export const onSquareOrderCustomAttributeDefinitionVisibleUpdated = createTrigger( triggerDefinitions.squareOrderCustomAttributeDefinitionVisibleUpdated, ) /** A custom attribute owned by your application was deleted from an order. */ export const onSquareOrderCustomAttributeOwnedDeleted = createTrigger( triggerDefinitions.squareOrderCustomAttributeOwnedDeleted, ) /** * A custom attribute owned by your application was created or updated for an * order. */ export const onSquareOrderCustomAttributeOwnedUpdated = createTrigger( triggerDefinitions.squareOrderCustomAttributeOwnedUpdated, ) /** * A custom attribute that's visible to your application was deleted from an * order. */ export const onSquareOrderCustomAttributeVisibleDeleted = createTrigger( triggerDefinitions.squareOrderCustomAttributeVisibleDeleted, ) /** * A custom attribute that's visible to your application was created or updated * for an order. */ export const onSquareOrderCustomAttributeVisibleUpdated = createTrigger( triggerDefinitions.squareOrderCustomAttributeVisibleUpdated, ) /** * An OrderFulfillment was created or updated. This event is triggered when a * Square product updates an order fulfillment or when a fulfillment is updated * by an UpdateOrder endpoint call. */ export const onSquareOrderFulfillmentUpdated = createTrigger( triggerDefinitions.squareOrderFulfillmentUpdated, ) /** * An Order was updated. This event is triggered only by the UpdateOrder * endpoint call or when a seller updates an order using a Square product. */ export const onSquareOrderUpdated = createTrigger( triggerDefinitions.squareOrderUpdated, ) /** A Payment was created. */ export const onSquarePaymentCreated = createTrigger( triggerDefinitions.squarePaymentCreated, ) /** * A Payment field was updated. For example, the payment.status or * card_details.status field is updated when a payment is authorized, canceled, * or completed. */ export const onSquarePaymentUpdated = createTrigger( triggerDefinitions.squarePaymentUpdated, ) /** A Payout has failed. */ export const onSquarePayoutFailed = createTrigger( triggerDefinitions.squarePayoutFailed, ) /** A Payout was completed. */ export const onSquarePayoutPaid = createTrigger( triggerDefinitions.squarePayoutPaid, ) /** A Payout was sent. */ export const onSquarePayoutSent = createTrigger( triggerDefinitions.squarePayoutSent, ) /** A Refund was created. */ export const onSquareRefundCreated = createTrigger( triggerDefinitions.squareRefundCreated, ) /** * A Refund was updated. Typically, the refund.status field changes when a * refund is completed. */ export const onSquareRefundUpdated = createTrigger( triggerDefinitions.squareRefundUpdated, ) /** A Subscription object was created. */ export const onSquareSubscriptionCreated = createTrigger( triggerDefinitions.squareSubscriptionCreated, ) /** A Subscription object was updated. */ export const onSquareSubscriptionUpdated = createTrigger( triggerDefinitions.squareSubscriptionUpdated, ) /** A team member was created. */ export const onSquareTeamMemberCreated = createTrigger( triggerDefinitions.squareTeamMemberCreated, ) /** A team member was updated. */ export const onSquareTeamMemberUpdated = createTrigger( triggerDefinitions.squareTeamMemberUpdated, ) /** A team member's wage setting was updated. */ export const onSquareTeamMemberWageSettingUpdated = createTrigger( triggerDefinitions.squareTeamMemberWageSettingUpdated, ) /** A TerminalAction request was created. */ export const onSquareTerminalActionCreated = createTrigger( triggerDefinitions.squareTerminalActionCreated, ) /** A TerminalAction status was updated. */ export const onSquareTerminalActionUpdated = createTrigger( triggerDefinitions.squareTerminalActionUpdated, ) /** A TerminalCheckout request was created. */ export const onSquareTerminalCheckoutCreated = createTrigger( triggerDefinitions.squareTerminalCheckoutCreated, ) /** A TerminalCheckout status was changed. */ export const onSquareTerminalCheckoutUpdated = createTrigger( triggerDefinitions.squareTerminalCheckoutUpdated, ) /** A TerminalRefund request was created. */ export const onSquareTerminalRefundCreated = createTrigger( triggerDefinitions.squareTerminalRefundCreated, ) /** A TerminalRefund status was changed. */ export const onSquareTerminalRefundUpdated = createTrigger( triggerDefinitions.squareTerminalRefundUpdated, ) /** Published when a new transfer order is created. */ export const onSquareTransferOrderCreated = createTrigger( triggerDefinitions.squareTransferOrderCreated, ) /** Published when a transfer order is updated. */ export const onSquareTransferOrderDeleted = createTrigger( triggerDefinitions.squareTransferOrderDeleted, ) /** Published when a transfer order is updated. */ export const onSquareTransferOrderUpdated = createTrigger( triggerDefinitions.squareTransferOrderUpdated, ) /** * Published when a vendor is created by calling CreateVendor or * BulkCreateVendors , as well as using the Square Dashboard. */ export const onSquareVendorCreated = createTrigger( triggerDefinitions.squareVendorCreated, ) /** * Published when a vendor is updated by calling UpdateVendor or * BulkUpdateVendors , as well as using the Square Dashboard. */ export const onSquareVendorUpdated = createTrigger( triggerDefinitions.squareVendorUpdated, )