import { Command } from '@boostercloud/framework-core' ; import { Address } from '../common/address' ; import { UUID , Register } from '@boostercloud/framework-types' ; import { ShippingAddressUpdated } from '../events/shipping-address-updated' ; @ Command ( { authorize : 'all' , } ) export class UpdateShippingAddress { public constructor ( readonly cartId , readonly address ) { } public static async handle ( command , register ) { register . events ( new ShippingAddressUpdated ( command . cartId , command . address ) ) ; } }