From c0adda4ce42e7e3bca4fa1c9bfd2184fc538c4d0 Mon Sep 17 00:00:00 2001 From: Matt Jones <885417+jonesmac@users.noreply.github.com> Date: Fri, 8 Dec 2023 17:23:24 -0500 Subject: [PATCH] build payloads without builder --- packages/sdk/packages/storybook/src/samplePayload.ts | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/packages/sdk/packages/storybook/src/samplePayload.ts b/packages/sdk/packages/storybook/src/samplePayload.ts index b3ce66e4ff..361327b2e4 100644 --- a/packages/sdk/packages/storybook/src/samplePayload.ts +++ b/packages/sdk/packages/storybook/src/samplePayload.ts @@ -1,8 +1,12 @@ -import { PayloadBuilder } from '@xyo-network/payload-builder' -import { Payload } from '@xyo-network/payload-model' +import { Payload } from '@xyo-network/payload-model'; -export const samplePayloadFromBuilder = { - ...new PayloadBuilder>({ schema: 'network.xyo.temp' }).fields({ test: 'hello' }).build(), +type TestPayload = Payload<{ + test: string +}, 'network.xyo.temp'> + +// needs to be in a function since cjs doesn't support top level awaits +export const samplePayloadFromBuilder ={ + ...{ test: 'hello', schema: 'network.xyo.temp' } as TestPayload, _archive: 'temp', }